From c47bf9f4ee30d235f996e50b96157b2635a91654 Mon Sep 17 00:00:00 2001 From: adam-urbanczyk <13981538+adam-urbanczyk@users.noreply.github.com> Date: Sun, 15 Jun 2025 20:49:27 +0200 Subject: [PATCH 01/74] Adding 7.9 --- opencascade/AIS.hxx | 82 +- opencascade/AIS_Animation.hxx | 132 +- opencascade/AIS_AnimationAxisRotation.hxx | 24 +- opencascade/AIS_AnimationCamera.hxx | 25 +- opencascade/AIS_AnimationObject.hxx | 21 +- opencascade/AIS_AttributeFilter.hxx | 26 +- opencascade/AIS_Axis.hxx | 64 +- opencascade/AIS_BadEdgeFilter.hxx | 46 +- opencascade/AIS_BaseAnimationObject.hxx | 16 +- opencascade/AIS_C0RegularityFilter.hxx | 29 +- opencascade/AIS_CameraFrustum.hxx | 23 +- opencascade/AIS_Circle.hxx | 73 +- opencascade/AIS_ColorScale.hxx | 334 +- opencascade/AIS_ColoredDrawer.hxx | 54 +- opencascade/AIS_ColoredShape.hxx | 113 +- opencascade/AIS_ConnectedInteractive.hxx | 66 +- ...AIS_DataMapIteratorOfDataMapOfIOStatus.hxx | 1 - opencascade/AIS_DataMapOfIOStatus.hxx | 7 +- opencascade/AIS_DataMapOfShapeDrawer.hxx | 3 +- opencascade/AIS_DisplayMode.hxx | 5 +- opencascade/AIS_ExclusionFilter.hxx | 62 +- opencascade/AIS_GlobalStatus.hxx | 38 +- opencascade/AIS_GraphicTool.hxx | 55 +- opencascade/AIS_InteractiveContext.hxx | 1419 +- opencascade/AIS_InteractiveObject.hxx | 84 +- opencascade/AIS_KindOfInteractive.hxx | 13 +- opencascade/AIS_LightSource.hxx | 158 +- opencascade/AIS_Line.hxx | 48 +- .../AIS_ListIteratorOfListOfInteractive.hxx | 1 - opencascade/AIS_ListOfInteractive.hxx | 4 +- opencascade/AIS_Manipulator.hxx | 493 +- opencascade/AIS_ManipulatorMode.hxx | 2 +- opencascade/AIS_ManipulatorOwner.hxx | 28 +- opencascade/AIS_MediaPlayer.hxx | 45 +- opencascade/AIS_MouseGesture.hxx | 32 +- .../AIS_MultipleConnectedInteractive.hxx | 105 +- opencascade/AIS_Plane.hxx | 121 +- opencascade/AIS_PlaneTrihedron.hxx | 55 +- opencascade/AIS_Point.hxx | 46 +- opencascade/AIS_PointCloud.hxx | 69 +- opencascade/AIS_RubberBand.hxx | 89 +- opencascade/AIS_SelectStatus.hxx | 7 +- opencascade/AIS_Selection.hxx | 50 +- opencascade/AIS_SelectionModesConcurrency.hxx | 13 +- opencascade/AIS_SelectionScheme.hxx | 9 +- opencascade/AIS_Shape.hxx | 220 +- opencascade/AIS_SignatureFilter.hxx | 30 +- opencascade/AIS_StatusOfDetection.hxx | 15 +- opencascade/AIS_StatusOfPick.hxx | 11 +- opencascade/AIS_TextLabel.hxx | 83 +- opencascade/AIS_TexturedShape.hxx | 104 +- opencascade/AIS_Triangulation.hxx | 51 +- opencascade/AIS_Trihedron.hxx | 127 +- opencascade/AIS_TrihedronOwner.hxx | 24 +- opencascade/AIS_TypeFilter.hxx | 26 +- opencascade/AIS_TypeOfAttribute.hxx | 33 +- opencascade/AIS_TypeOfAxis.hxx | 8 +- opencascade/AIS_TypeOfIso.hxx | 6 +- opencascade/AIS_TypeOfPlane.hxx | 8 +- opencascade/AIS_ViewController.hxx | 477 +- opencascade/AIS_ViewCube.hxx | 485 +- opencascade/AIS_ViewInputBuffer.hxx | 104 +- opencascade/AIS_WalkDelta.hxx | 59 +- opencascade/AIS_XRTrackedDevice.hxx | 39 +- opencascade/APIHeaderSection_EditHeader.hxx | 44 +- opencascade/APIHeaderSection_MakeHeader.hxx | 180 +- opencascade/Adaptor2d_Curve2d.hxx | 86 +- opencascade/Adaptor2d_Line2d.hxx | 111 +- opencascade/Adaptor2d_OffsetCurve.hxx | 119 +- opencascade/Adaptor3d_Curve.hxx | 79 +- opencascade/Adaptor3d_CurveOnSurface.hxx | 168 +- opencascade/Adaptor3d_HSurfaceTool.hxx | 265 +- opencascade/Adaptor3d_HVertex.hxx | 45 +- opencascade/Adaptor3d_InterFunc.hxx | 28 +- opencascade/Adaptor3d_IsoCurve.hxx | 122 +- opencascade/Adaptor3d_Surface.hxx | 150 +- opencascade/Adaptor3d_TopolTool.hxx | 159 +- opencascade/AdvApp2Var_ApproxAFunc2Var.hxx | 273 +- opencascade/AdvApp2Var_ApproxAFunc2Var.lxx | 21 +- opencascade/AdvApp2Var_ApproxF2var.hxx | 372 +- opencascade/AdvApp2Var_Context.hxx | 103 +- opencascade/AdvApp2Var_Criterion.hxx | 39 +- .../AdvApp2Var_CriterionRepartition.hxx | 4 +- opencascade/AdvApp2Var_CriterionType.hxx | 10 +- opencascade/AdvApp2Var_Data.hxx | 86 +- opencascade/AdvApp2Var_Data_f2c.hxx | 253 +- opencascade/AdvApp2Var_EvaluatorFunc2Var.hxx | 66 +- opencascade/AdvApp2Var_Framework.hxx | 81 +- opencascade/AdvApp2Var_Iso.hxx | 120 +- opencascade/AdvApp2Var_MathBase.hxx | 579 +- opencascade/AdvApp2Var_Network.hxx | 67 +- opencascade/AdvApp2Var_Node.hxx | 45 +- opencascade/AdvApp2Var_Patch.hxx | 139 +- opencascade/AdvApp2Var_SequenceOfPatch.hxx | 1 - opencascade/AdvApp2Var_SequenceOfStrip.hxx | 1 - opencascade/AdvApp2Var_SysBase.hxx | 173 +- opencascade/AdvApprox_ApproxAFunction.hxx | 197 +- opencascade/AdvApprox_ApproxAFunction.lxx | 115 +- opencascade/AdvApprox_Cutting.hxx | 15 +- opencascade/AdvApprox_DichoCutting.hxx | 30 +- opencascade/AdvApprox_EvaluatorFunction.hxx | 50 +- opencascade/AdvApprox_PrefAndRec.hxx | 37 +- opencascade/AdvApprox_PrefCutting.hxx | 29 +- opencascade/AdvApprox_SimpleApprox.hxx | 80 +- opencascade/AppBlend_AppSurf.gxx | 1015 - opencascade/AppBlend_AppSurf.lxx | 107 +- opencascade/AppBlend_Approx.hxx | 86 +- opencascade/AppCont_ContMatrices.hxx | 7 +- opencascade/AppCont_Function.hxx | 43 +- opencascade/AppCont_LeastSquare.hxx | 30 +- .../AppDef_Array1OfMultiPointConstraint.hxx | 1 - ...t_BFGSOfMyBSplGradientOfBSplineCompute.hxx | 36 +- ...nctionOfMyBSplGradientOfBSplineCompute.hxx | 137 +- ...SquareOfMyBSplGradientOfBSplineCompute.hxx | 242 +- opencascade/AppDef_BSplineCompute.hxx | 241 +- opencascade/AppDef_Compute.hxx | 233 +- ...Def_Gradient_BFGSOfMyGradientOfCompute.hxx | 36 +- ...nt_BFGSOfMyGradientbisOfBSplineCompute.hxx | 36 +- .../AppDef_Gradient_BFGSOfTheGradient.hxx | 35 +- .../AppDef_HArray1OfMultiPointConstraint.hxx | 1 - opencascade/AppDef_LinearCriteria.hxx | 120 +- opencascade/AppDef_MultiLine.hxx | 52 +- opencascade/AppDef_MultiPointConstraint.hxx | 100 +- .../AppDef_MyBSplGradientOfBSplineCompute.hxx | 97 +- opencascade/AppDef_MyGradientOfCompute.hxx | 60 +- .../AppDef_MyGradientbisOfBSplineCompute.hxx | 60 +- opencascade/AppDef_MyLineTool.hxx | 102 +- ...ppDef_ParFunctionOfMyGradientOfCompute.hxx | 118 +- ...unctionOfMyGradientbisOfBSplineCompute.hxx | 119 +- .../AppDef_ParFunctionOfTheGradient.hxx | 118 +- ...ef_ParLeastSquareOfMyGradientOfCompute.hxx | 242 +- ...tSquareOfMyGradientbisOfBSplineCompute.hxx | 242 +- .../AppDef_ParLeastSquareOfTheGradient.hxx | 238 +- ...Def_ResConstraintOfMyGradientOfCompute.hxx | 83 +- ...straintOfMyGradientbisOfBSplineCompute.hxx | 83 +- .../AppDef_ResConstraintOfTheGradient.hxx | 83 +- opencascade/AppDef_SmoothCriterion.hxx | 84 +- opencascade/AppDef_TheFunction.hxx | 118 +- opencascade/AppDef_TheGradient.hxx | 60 +- opencascade/AppDef_TheLeastSquares.hxx | 238 +- opencascade/AppDef_TheResol.hxx | 82 +- opencascade/AppDef_Variational.hxx | 293 +- opencascade/AppParCurves.hxx | 28 +- .../AppParCurves_Array1OfConstraintCouple.hxx | 1 - .../AppParCurves_Array1OfMultiBSpCurve.hxx | 1 - .../AppParCurves_Array1OfMultiCurve.hxx | 1 - .../AppParCurves_Array1OfMultiPoint.hxx | 1 - opencascade/AppParCurves_BSpFunction.gxx | 325 - opencascade/AppParCurves_BSpGradient.gxx | 383 - opencascade/AppParCurves_BSpGradient_BFGS.gxx | 48 - opencascade/AppParCurves_Constraint.hxx | 9 +- opencascade/AppParCurves_ConstraintCouple.hxx | 43 +- opencascade/AppParCurves_Function.gxx | 622 - opencascade/AppParCurves_Gradient.gxx | 243 - opencascade/AppParCurves_Gradient_BFGS.gxx | 48 - ...AppParCurves_HArray1OfConstraintCouple.hxx | 1 - .../AppParCurves_HArray1OfMultiBSpCurve.hxx | 1 - .../AppParCurves_HArray1OfMultiCurve.hxx | 1 - .../AppParCurves_HArray1OfMultiPoint.hxx | 1 - opencascade/AppParCurves_LeastSquare.gxx | 1695 - opencascade/AppParCurves_MultiBSpCurve.hxx | 102 +- opencascade/AppParCurves_MultiCurve.hxx | 132 +- opencascade/AppParCurves_MultiPoint.hxx | 90 +- opencascade/AppParCurves_MultiPoint.lxx | 25 +- opencascade/AppParCurves_ResolConstraint.gxx | 865 - .../AppParCurves_SequenceOfMultiBSpCurve.hxx | 1 - .../AppParCurves_SequenceOfMultiCurve.hxx | 1 - opencascade/AppStdL_Application.hxx | 6 +- opencascade/AppStd_Application.hxx | 7 +- opencascade/ApproxInt_Approx.gxx | 726 - opencascade/ApproxInt_ImpPrmSvSurfaces.gxx | 929 - opencascade/ApproxInt_KnotTools.hxx | 91 +- opencascade/ApproxInt_MultiLine.gxx | 755 - opencascade/ApproxInt_MultiLineTool.lxx | 229 +- opencascade/ApproxInt_PrmPrmSvSurfaces.gxx | 353 - opencascade/ApproxInt_SvSurfaces.hxx | 96 +- opencascade/Approx_Array1OfAdHSurface.hxx | 1 - opencascade/Approx_Array1OfGTrsf2d.hxx | 3 +- opencascade/Approx_BSplComputeLine.gxx | 1439 - opencascade/Approx_ComputeCLine.gxx | 495 - opencascade/Approx_ComputeLine.gxx | 1670 - opencascade/Approx_Curve2d.hxx | 35 +- opencascade/Approx_Curve3d.hxx | 30 +- opencascade/Approx_CurveOnSurface.hxx | 56 +- opencascade/Approx_CurvilinearParameter.hxx | 74 +- opencascade/Approx_CurvlinFunc.hxx | 152 +- opencascade/Approx_FitAndDivide.hxx | 139 +- opencascade/Approx_FitAndDivide2d.hxx | 140 +- opencascade/Approx_HArray1OfAdHSurface.hxx | 1 - opencascade/Approx_HArray1OfGTrsf2d.hxx | 1 - opencascade/Approx_MCurvesToBSpCurve.hxx | 45 +- opencascade/Approx_ParametrizationType.hxx | 6 +- opencascade/Approx_SameParameter.hxx | 131 +- .../Approx_SequenceOfHArray1OfReal.hxx | 3 +- opencascade/Approx_Status.hxx | 6 +- opencascade/Approx_SweepApproximation.hxx | 285 +- opencascade/Approx_SweepApproximation.lxx | 121 +- opencascade/Approx_SweepFunction.hxx | 125 +- .../Aspect_AspectFillAreaDefinitionError.hxx | 5 +- .../Aspect_AspectLineDefinitionError.hxx | 5 +- .../Aspect_AspectMarkerDefinitionError.hxx | 5 +- opencascade/Aspect_Background.hxx | 36 +- opencascade/Aspect_CircularGrid.hxx | 52 +- opencascade/Aspect_DisplayConnection.hxx | 78 +- ...spect_DisplayConnectionDefinitionError.hxx | 5 +- opencascade/Aspect_Drawable.hxx | 4 +- opencascade/Aspect_FBConfig.hxx | 2 +- opencascade/Aspect_FillMethod.hxx | 8 +- opencascade/Aspect_FrustumLRBT.hxx | 38 +- opencascade/Aspect_GenId.hxx | 50 +- opencascade/Aspect_GradientBackground.hxx | 25 +- opencascade/Aspect_GradientFillMethod.hxx | 23 +- .../Aspect_GraphicDeviceDefinitionError.hxx | 5 +- opencascade/Aspect_Grid.hxx | 98 +- opencascade/Aspect_GridDrawMode.hxx | 6 +- opencascade/Aspect_GridType.hxx | 4 +- opencascade/Aspect_Handle.hxx | 6 +- opencascade/Aspect_IdentDefinitionError.hxx | 5 +- opencascade/Aspect_InteriorStyle.hxx | 2 +- opencascade/Aspect_NeutralWindow.hxx | 60 +- opencascade/Aspect_OpenVRSession.hxx | 78 +- opencascade/Aspect_PolygonOffsetMode.hxx | 15 +- opencascade/Aspect_RectangularGrid.hxx | 57 +- opencascade/Aspect_RenderingContext.hxx | 17 +- opencascade/Aspect_ScrollDelta.hxx | 39 +- opencascade/Aspect_SequenceOfColor.hxx | 1 - opencascade/Aspect_SkydomeBackground.hxx | 43 +- opencascade/Aspect_Touch.hxx | 32 +- opencascade/Aspect_TrackedDevicePose.hxx | 6 +- opencascade/Aspect_TypeOfColorScaleData.hxx | 4 +- .../Aspect_TypeOfColorScaleOrientation.hxx | 8 +- .../Aspect_TypeOfColorScalePosition.hxx | 8 +- opencascade/Aspect_TypeOfDeflection.hxx | 4 +- opencascade/Aspect_TypeOfFacingModel.hxx | 7 +- opencascade/Aspect_TypeOfHighlightMethod.hxx | 4 +- opencascade/Aspect_TypeOfLine.hxx | 2 +- opencascade/Aspect_TypeOfMarker.hxx | 30 +- opencascade/Aspect_TypeOfResize.hxx | 20 +- opencascade/Aspect_TypeOfStyleText.hxx | 4 +- opencascade/Aspect_TypeOfTriedronPosition.hxx | 23 +- opencascade/Aspect_Units.hxx | 4 +- opencascade/Aspect_VKey.hxx | 80 +- opencascade/Aspect_VKeyFlags.hxx | 14 +- opencascade/Aspect_VKeySet.hxx | 63 +- opencascade/Aspect_WidthOfLine.hxx | 10 +- opencascade/Aspect_Window.hxx | 48 +- opencascade/Aspect_WindowDefinitionError.hxx | 5 +- opencascade/Aspect_WindowError.hxx | 5 +- opencascade/Aspect_WindowInputListener.hxx | 126 +- opencascade/Aspect_XAtom.hxx | 2 +- opencascade/Aspect_XRAction.hxx | 15 +- opencascade/Aspect_XRActionSet.hxx | 17 +- opencascade/Aspect_XRAnalogActionData.hxx | 13 +- opencascade/Aspect_XRDigitalActionData.hxx | 11 +- opencascade/Aspect_XRGenericAction.hxx | 27 +- opencascade/Aspect_XRHapticActionData.hxx | 13 +- opencascade/Aspect_XRPoseActionData.hxx | 8 +- opencascade/Aspect_XRSession.hxx | 139 +- opencascade/Aspect_XRTrackedDeviceRole.hxx | 6 +- opencascade/BOPAlgo_Algo.hxx | 24 +- opencascade/BOPAlgo_ArgumentAnalyzer.hxx | 126 +- opencascade/BOPAlgo_ArgumentAnalyzer.lxx | 27 +- opencascade/BOPAlgo_BOP.hxx | 44 +- opencascade/BOPAlgo_Builder.hxx | 232 +- opencascade/BOPAlgo_BuilderArea.hxx | 56 +- opencascade/BOPAlgo_BuilderFace.hxx | 46 +- opencascade/BOPAlgo_BuilderShape.hxx | 44 +- opencascade/BOPAlgo_BuilderSolid.hxx | 34 +- opencascade/BOPAlgo_CellsBuilder.hxx | 81 +- opencascade/BOPAlgo_CheckResult.hxx | 92 +- opencascade/BOPAlgo_CheckStatus.hxx | 25 +- opencascade/BOPAlgo_CheckerSI.hxx | 27 +- opencascade/BOPAlgo_GlueEnum.hxx | 5 +- opencascade/BOPAlgo_ListOfCheckResult.hxx | 6 +- opencascade/BOPAlgo_MakeConnected.hxx | 110 +- opencascade/BOPAlgo_MakePeriodic.hxx | 251 +- opencascade/BOPAlgo_MakerVolume.hxx | 43 +- opencascade/BOPAlgo_MakerVolume.lxx | 58 +- opencascade/BOPAlgo_Operation.hxx | 13 +- opencascade/BOPAlgo_Options.hxx | 81 +- opencascade/BOPAlgo_PaveFiller.hxx | 503 +- opencascade/BOPAlgo_RemoveFeatures.hxx | 78 +- opencascade/BOPAlgo_Section.hxx | 17 +- opencascade/BOPAlgo_SectionAttribute.hxx | 50 +- opencascade/BOPAlgo_ShellSplitter.hxx | 33 +- opencascade/BOPAlgo_Splitter.hxx | 8 +- opencascade/BOPAlgo_Tools.hxx | 125 +- opencascade/BOPAlgo_ToolsProvider.hxx | 9 +- opencascade/BOPAlgo_WireEdgeSet.hxx | 51 +- opencascade/BOPAlgo_WireEdgeSet.lxx | 81 +- opencascade/BOPAlgo_WireSplitter.hxx | 34 +- opencascade/BOPAlgo_WireSplitter.lxx | 100 +- opencascade/BOPDS_CommonBlock.hxx | 58 +- opencascade/BOPDS_CoupleOfPaveBlocks.hxx | 163 +- opencascade/BOPDS_Curve.hxx | 75 +- opencascade/BOPDS_Curve.lxx | 161 +- opencascade/BOPDS_DS.hxx | 291 +- opencascade/BOPDS_DS.lxx | 84 +- .../BOPDS_DataMapOfIntegerListOfPaveBlock.hxx | 5 +- .../BOPDS_DataMapOfPaveBlockCommonBlock.hxx | 10 +- .../BOPDS_DataMapOfPaveBlockListOfInteger.hxx | 6 +- ...OPDS_DataMapOfPaveBlockListOfPaveBlock.hxx | 10 +- ...BOPDS_DataMapOfShapeCoupleOfPaveBlocks.hxx | 6 +- opencascade/BOPDS_FaceInfo.hxx | 82 +- opencascade/BOPDS_FaceInfo.lxx | 161 +- opencascade/BOPDS_IndexRange.hxx | 48 +- opencascade/BOPDS_IndexRange.lxx | 76 +- ...IndexedDataMapOfPaveBlockListOfInteger.hxx | 3 +- ...dexedDataMapOfPaveBlockListOfPaveBlock.hxx | 5 +- ...ndexedDataMapOfShapeCoupleOfPaveBlocks.hxx | 3 +- opencascade/BOPDS_IndexedMapOfPaveBlock.hxx | 4 +- opencascade/BOPDS_Interf.hxx | 614 +- opencascade/BOPDS_Iterator.hxx | 43 +- opencascade/BOPDS_IteratorSI.hxx | 37 +- opencascade/BOPDS_ListOfPave.hxx | 9 +- opencascade/BOPDS_ListOfPaveBlock.hxx | 5 +- opencascade/BOPDS_MapOfCommonBlock.hxx | 8 +- opencascade/BOPDS_MapOfPair.hxx | 2 +- opencascade/BOPDS_MapOfPave.hxx | 6 +- opencascade/BOPDS_MapOfPaveBlock.hxx | 8 +- opencascade/BOPDS_Pair.hxx | 79 +- opencascade/BOPDS_Pave.hxx | 81 +- opencascade/BOPDS_Pave.lxx | 71 +- opencascade/BOPDS_PaveBlock.hxx | 115 +- opencascade/BOPDS_Point.hxx | 58 +- opencascade/BOPDS_Point.lxx | 87 +- opencascade/BOPDS_ShapeInfo.hxx | 91 +- opencascade/BOPDS_ShapeInfo.lxx | 182 +- opencascade/BOPDS_SubIterator.hxx | 57 +- opencascade/BOPDS_Tools.hxx | 35 +- opencascade/BOPDS_Tools.lxx | 83 +- opencascade/BOPDS_VectorOfPoint.hxx | 1 - opencascade/BOPTools_AlgoTools.hxx | 408 +- opencascade/BOPTools_AlgoTools2D.hxx | 152 +- opencascade/BOPTools_AlgoTools3D.hxx | 202 +- opencascade/BOPTools_BoxSelector.hxx | 55 +- opencascade/BOPTools_BoxTree.hxx | 22 +- opencascade/BOPTools_ConnexityBlock.hxx | 71 +- opencascade/BOPTools_CoupleOfShape.hxx | 39 +- opencascade/BOPTools_ListOfConnexityBlock.hxx | 7 +- opencascade/BOPTools_ListOfCoupleOfShape.hxx | 6 +- opencascade/BOPTools_MapOfSet.hxx | 8 +- opencascade/BOPTools_PairSelector.hxx | 86 +- opencascade/BOPTools_Parallel.hxx | 110 +- opencascade/BOPTools_Set.hxx | 65 +- opencascade/BRepAdaptor_Array1OfCurve.hxx | 1 - opencascade/BRepAdaptor_CompCurve.hxx | 161 +- opencascade/BRepAdaptor_Curve.hxx | 117 +- opencascade/BRepAdaptor_Curve2d.hxx | 16 +- opencascade/BRepAdaptor_HArray1OfCurve.hxx | 1 - opencascade/BRepAdaptor_Surface.hxx | 153 +- opencascade/BRepAlgo.hxx | 46 +- opencascade/BRepAlgoAPI_Algo.hxx | 24 +- opencascade/BRepAlgoAPI_BooleanOperation.hxx | 64 +- opencascade/BRepAlgoAPI_BuilderAlgo.hxx | 105 +- opencascade/BRepAlgoAPI_Check.hxx | 111 +- opencascade/BRepAlgoAPI_Common.hxx | 49 +- opencascade/BRepAlgoAPI_Cut.hxx | 42 +- opencascade/BRepAlgoAPI_Defeaturing.hxx | 77 +- opencascade/BRepAlgoAPI_Fuse.hxx | 40 +- opencascade/BRepAlgoAPI_Section.hxx | 101 +- opencascade/BRepAlgoAPI_Splitter.hxx | 27 +- opencascade/BRepAlgo_AsDes.hxx | 53 +- opencascade/BRepAlgo_FaceRestrictor.hxx | 70 +- opencascade/BRepAlgo_Image.hxx | 90 +- opencascade/BRepAlgo_Loop.hxx | 101 +- opencascade/BRepAlgo_NormalProjection.hxx | 110 +- opencascade/BRepApprox_Approx.hxx | 151 +- opencascade/BRepApprox_ApproxLine.hxx | 40 +- ...MyBSplGradientOfTheComputeLineOfApprox.hxx | 36 +- ...MyBSplGradientOfTheComputeLineOfApprox.hxx | 137 +- ...MyBSplGradientOfTheComputeLineOfApprox.hxx | 242 +- ...GradientOfTheComputeLineBezierOfApprox.hxx | 36 +- ...fMyGradientbisOfTheComputeLineOfApprox.hxx | 36 +- ...MyBSplGradientOfTheComputeLineOfApprox.hxx | 97 +- ...GradientOfTheComputeLineBezierOfApprox.hxx | 60 +- ..._MyGradientbisOfTheComputeLineOfApprox.hxx | 60 +- ...GradientOfTheComputeLineBezierOfApprox.hxx | 119 +- ...fMyGradientbisOfTheComputeLineOfApprox.hxx | 119 +- ...GradientOfTheComputeLineBezierOfApprox.hxx | 242 +- ...fMyGradientbisOfTheComputeLineOfApprox.hxx | 242 +- ...GradientOfTheComputeLineBezierOfApprox.hxx | 84 +- ...fMyGradientbisOfTheComputeLineOfApprox.hxx | 84 +- opencascade/BRepApprox_SurfaceTool.hxx | 194 +- opencascade/BRepApprox_SurfaceTool.lxx | 194 +- ...RepApprox_TheComputeLineBezierOfApprox.hxx | 233 +- .../BRepApprox_TheComputeLineOfApprox.hxx | 243 +- ...fTheInt2SOfThePrmPrmSvSurfacesOfApprox.hxx | 113 +- ...BRepApprox_TheImpPrmSvSurfacesOfApprox.hxx | 120 +- ..._TheInt2SOfThePrmPrmSvSurfacesOfApprox.hxx | 120 +- .../BRepApprox_TheMultiLineOfApprox.hxx | 134 +- .../BRepApprox_TheMultiLineToolOfApprox.hxx | 120 +- ...BRepApprox_ThePrmPrmSvSurfacesOfApprox.hxx | 108 +- ...erImpFuncOfTheImpPrmSvSurfacesOfApprox.hxx | 100 +- opencascade/BRepBlend_AppFunc.hxx | 34 +- opencascade/BRepBlend_AppFuncRoot.hxx | 158 +- opencascade/BRepBlend_AppFuncRst.hxx | 34 +- opencascade/BRepBlend_AppFuncRstRst.hxx | 34 +- opencascade/BRepBlend_AppSurf.hxx | 207 +- opencascade/BRepBlend_AppSurface.hxx | 120 +- opencascade/BRepBlend_AppSurface.lxx | 49 +- opencascade/BRepBlend_BlendTool.hxx | 80 +- opencascade/BRepBlend_BlendTool.lxx | 22 +- opencascade/BRepBlend_CSCircular.hxx | 1 - opencascade/BRepBlend_CSConstRad.hxx | 1 - opencascade/BRepBlend_CSWalking.hxx | 187 +- opencascade/BRepBlend_ChAsym.hxx | 1 - opencascade/BRepBlend_ChAsymInv.hxx | 1 - opencascade/BRepBlend_ChamfInv.hxx | 1 - opencascade/BRepBlend_Chamfer.hxx | 1 - opencascade/BRepBlend_ConstRad.hxx | 1 - opencascade/BRepBlend_ConstRadInv.hxx | 1 - opencascade/BRepBlend_ConstThroat.hxx | 1 - opencascade/BRepBlend_ConstThroatInv.hxx | 1 - .../BRepBlend_ConstThroatWithPenetration.hxx | 1 - ...RepBlend_ConstThroatWithPenetrationInv.hxx | 1 - opencascade/BRepBlend_CurvPointRadInv.hxx | 65 +- opencascade/BRepBlend_EvolRad.hxx | 1 - opencascade/BRepBlend_EvolRadInv.hxx | 1 - opencascade/BRepBlend_Extremity.hxx | 143 +- opencascade/BRepBlend_Extremity.lxx | 32 +- opencascade/BRepBlend_HCurve2dTool.hxx | 117 +- opencascade/BRepBlend_HCurve2dTool.lxx | 195 +- opencascade/BRepBlend_HCurveTool.hxx | 114 +- opencascade/BRepBlend_HCurveTool.lxx | 193 +- opencascade/BRepBlend_Line.hxx | 108 +- opencascade/BRepBlend_Line.lxx | 42 +- opencascade/BRepBlend_PointOnRst.hxx | 57 +- opencascade/BRepBlend_PointOnRst.lxx | 9 +- opencascade/BRepBlend_RstRstConstRad.hxx | 285 +- opencascade/BRepBlend_RstRstEvolRad.hxx | 292 +- opencascade/BRepBlend_RstRstLineBuilder.hxx | 213 +- opencascade/BRepBlend_RstRstLineBuilder.lxx | 53 +- opencascade/BRepBlend_Ruled.hxx | 1 - opencascade/BRepBlend_RuledInv.hxx | 1 - opencascade/BRepBlend_SequenceOfLine.hxx | 1 - .../BRepBlend_SequenceOfPointOnRst.hxx | 1 - opencascade/BRepBlend_SurfCurvConstRadInv.hxx | 70 +- opencascade/BRepBlend_SurfCurvEvolRadInv.hxx | 75 +- .../BRepBlend_SurfPointConstRadInv.hxx | 68 +- opencascade/BRepBlend_SurfPointEvolRadInv.hxx | 74 +- opencascade/BRepBlend_SurfRstConstRad.hxx | 259 +- opencascade/BRepBlend_SurfRstEvolRad.hxx | 268 +- opencascade/BRepBlend_SurfRstLineBuilder.hxx | 201 +- opencascade/BRepBlend_SurfRstLineBuilder.lxx | 23 +- opencascade/BRepBlend_Walking.hxx | 334 +- opencascade/BRepBndLib.hxx | 57 +- opencascade/BRepBuilderAPI.hxx | 20 +- .../BRepBuilderAPI_BndBoxTreeSelector.hxx | 39 +- opencascade/BRepBuilderAPI_Collect.hxx | 43 +- opencascade/BRepBuilderAPI_Command.hxx | 33 +- opencascade/BRepBuilderAPI_Copy.hxx | 26 +- opencascade/BRepBuilderAPI_EdgeError.hxx | 14 +- opencascade/BRepBuilderAPI_FaceError.hxx | 10 +- opencascade/BRepBuilderAPI_FastSewing.hxx | 139 +- opencascade/BRepBuilderAPI_FindPlane.hxx | 34 +- opencascade/BRepBuilderAPI_GTransform.hxx | 45 +- opencascade/BRepBuilderAPI_MakeEdge.hxx | 278 +- opencascade/BRepBuilderAPI_MakeEdge2d.hxx | 198 +- opencascade/BRepBuilderAPI_MakeFace.hxx | 164 +- opencascade/BRepBuilderAPI_MakePolygon.hxx | 81 +- opencascade/BRepBuilderAPI_MakeShape.hxx | 43 +- .../BRepBuilderAPI_MakeShapeOnMesh.hxx | 13 +- opencascade/BRepBuilderAPI_MakeShell.hxx | 55 +- opencascade/BRepBuilderAPI_MakeSolid.hxx | 52 +- opencascade/BRepBuilderAPI_MakeVertex.hxx | 28 +- opencascade/BRepBuilderAPI_MakeWire.hxx | 69 +- opencascade/BRepBuilderAPI_ModifyShape.hxx | 56 +- opencascade/BRepBuilderAPI_NurbsConvert.hxx | 41 +- opencascade/BRepBuilderAPI_PipeError.hxx | 8 +- opencascade/BRepBuilderAPI_Sewing.hxx | 395 +- opencascade/BRepBuilderAPI_Sewing.lxx | 127 +- .../BRepBuilderAPI_ShapeModification.hxx | 10 +- opencascade/BRepBuilderAPI_ShellError.hxx | 8 +- opencascade/BRepBuilderAPI_Transform.hxx | 47 +- opencascade/BRepBuilderAPI_TransitionMode.hxx | 6 +- .../BRepBuilderAPI_VertexInspector.hxx | 43 +- opencascade/BRepBuilderAPI_WireError.hxx | 8 +- opencascade/BRepCheck.hxx | 19 +- opencascade/BRepCheck_Analyzer.hxx | 71 +- .../BRepCheck_DataMapOfShapeListOfStatus.hxx | 8 +- opencascade/BRepCheck_Edge.hxx | 49 +- opencascade/BRepCheck_Face.hxx | 68 +- .../BRepCheck_IndexedDataMapOfShapeResult.hxx | 4 +- .../BRepCheck_ListIteratorOfListOfStatus.hxx | 1 - opencascade/BRepCheck_ListOfStatus.hxx | 5 +- opencascade/BRepCheck_Result.hxx | 45 +- opencascade/BRepCheck_Shell.hxx | 55 +- opencascade/BRepCheck_Solid.hxx | 28 +- opencascade/BRepCheck_Status.hxx | 75 +- opencascade/BRepCheck_Vertex.hxx | 33 +- opencascade/BRepCheck_Wire.hxx | 68 +- opencascade/BRepClass3d.hxx | 9 +- opencascade/BRepClass3d_BndBoxTree.hxx | 111 +- ...RepClass3d_DataMapIteratorOfMapOfInter.hxx | 1 - opencascade/BRepClass3d_Intersector3d.hxx | 83 +- opencascade/BRepClass3d_Intersector3d.lxx | 55 +- opencascade/BRepClass3d_MapOfInter.hxx | 7 +- opencascade/BRepClass3d_SClassifier.hxx | 52 +- opencascade/BRepClass3d_SolidClassifier.hxx | 54 +- opencascade/BRepClass3d_SolidExplorer.hxx | 188 +- .../BRepClass3d_SolidPassiveClassifier.hxx | 87 +- opencascade/BRepClass_Edge.hxx | 71 +- opencascade/BRepClass_Edge.lxx | 25 +- .../BRepClass_FClass2dOfFClassifier.hxx | 70 +- opencascade/BRepClass_FClassifier.hxx | 61 +- opencascade/BRepClass_FaceClassifier.hxx | 64 +- opencascade/BRepClass_FaceExplorer.hxx | 104 +- opencascade/BRepClass_FaceExplorer.lxx | 22 +- .../BRepClass_FacePassiveClassifier.hxx | 70 +- opencascade/BRepClass_Intersector.hxx | 37 +- opencascade/BRepExtrema_DistShapeShape.hxx | 152 +- opencascade/BRepExtrema_DistanceSS.hxx | 86 +- opencascade/BRepExtrema_ElementFilter.hxx | 4 +- opencascade/BRepExtrema_ExtCC.hxx | 51 +- opencascade/BRepExtrema_ExtCF.hxx | 63 +- opencascade/BRepExtrema_ExtFF.hxx | 71 +- opencascade/BRepExtrema_ExtPC.hxx | 64 +- opencascade/BRepExtrema_ExtPF.hxx | 63 +- ...Extrema_MapOfIntegerPackedMapOfInteger.hxx | 3 +- opencascade/BRepExtrema_OverlapTool.hxx | 56 +- opencascade/BRepExtrema_Poly.hxx | 9 +- opencascade/BRepExtrema_ProximityDistTool.hxx | 131 +- .../BRepExtrema_ProximityValueTool.hxx | 136 +- opencascade/BRepExtrema_SelfIntersection.hxx | 59 +- opencascade/BRepExtrema_ShapeProximity.hxx | 78 +- opencascade/BRepExtrema_SolutionElem.hxx | 141 +- opencascade/BRepExtrema_TriangleSet.hxx | 50 +- opencascade/BRepExtrema_UnCompatibleShape.hxx | 5 +- opencascade/BRepFeat.hxx | 52 +- opencascade/BRepFeat_Builder.hxx | 90 +- opencascade/BRepFeat_Form.hxx | 132 +- opencascade/BRepFeat_Form.lxx | 70 +- opencascade/BRepFeat_Gluer.hxx | 67 +- opencascade/BRepFeat_Gluer.lxx | 67 +- opencascade/BRepFeat_MakeCylindricalHole.hxx | 74 +- opencascade/BRepFeat_MakeCylindricalHole.lxx | 40 +- opencascade/BRepFeat_MakeDPrism.hxx | 98 +- opencascade/BRepFeat_MakeLinearForm.hxx | 75 +- opencascade/BRepFeat_MakeLinearForm.lxx | 37 +- opencascade/BRepFeat_MakePipe.hxx | 71 +- opencascade/BRepFeat_MakePipe.lxx | 28 +- opencascade/BRepFeat_MakePrism.hxx | 87 +- opencascade/BRepFeat_MakePrism.lxx | 39 +- opencascade/BRepFeat_MakeRevol.hxx | 79 +- opencascade/BRepFeat_MakeRevol.lxx | 30 +- opencascade/BRepFeat_MakeRevolutionForm.hxx | 79 +- opencascade/BRepFeat_MakeRevolutionForm.lxx | 47 +- opencascade/BRepFeat_PerfSelection.hxx | 10 +- opencascade/BRepFeat_RibSlot.hxx | 190 +- opencascade/BRepFeat_RibSlot.lxx | 12 +- opencascade/BRepFeat_SplitShape.hxx | 72 +- opencascade/BRepFeat_SplitShape.lxx | 84 +- opencascade/BRepFeat_Status.hxx | 7 +- opencascade/BRepFeat_StatusError.hxx | 56 +- opencascade/BRepFill.hxx | 38 +- opencascade/BRepFill_ACRLaw.hxx | 25 +- opencascade/BRepFill_AdvancedEvolved.hxx | 80 +- opencascade/BRepFill_ApproxSeewing.hxx | 24 +- opencascade/BRepFill_CompatibleWires.hxx | 76 +- opencascade/BRepFill_ComputeCLine.hxx | 130 +- opencascade/BRepFill_CurveConstraint.hxx | 33 +- ...atorOfDataMapOfNodeDataMapOfShapeShape.hxx | 1 - ...ll_DataMapIteratorOfDataMapOfNodeShape.hxx | 1 - ...torOfDataMapOfOrientedShapeListOfShape.hxx | 1 - ...ataMapOfShapeDataMapOfShapeListOfShape.hxx | 1 - ...IteratorOfDataMapOfShapeHArray2OfShape.hxx | 1 - ...pIteratorOfDataMapOfShapeSequenceOfPnt.hxx | 1 - ...IteratorOfDataMapOfShapeSequenceOfReal.hxx | 1 - ...pFill_DataMapOfNodeDataMapOfShapeShape.hxx | 7 +- opencascade/BRepFill_DataMapOfNodeShape.hxx | 6 +- ...Fill_DataMapOfOrientedShapeListOfShape.hxx | 7 +- ...ataMapOfShapeDataMapOfShapeListOfShape.hxx | 11 +- .../BRepFill_DataMapOfShapeHArray2OfShape.hxx | 9 +- .../BRepFill_DataMapOfShapeSequenceOfPnt.hxx | 7 +- .../BRepFill_DataMapOfShapeSequenceOfReal.hxx | 7 +- opencascade/BRepFill_Draft.hxx | 106 +- opencascade/BRepFill_DraftLaw.hxx | 27 +- opencascade/BRepFill_Edge3DLaw.hxx | 25 +- opencascade/BRepFill_EdgeFaceAndOrder.hxx | 34 +- opencascade/BRepFill_EdgeOnSurfLaw.hxx | 24 +- opencascade/BRepFill_Evolved.hxx | 170 +- opencascade/BRepFill_FaceAndOrder.hxx | 29 +- opencascade/BRepFill_Filling.hxx | 148 +- opencascade/BRepFill_Generator.hxx | 46 +- opencascade/BRepFill_Generator.lxx | 6 +- ...dexedDataMapOfOrientedShapeListOfShape.hxx | 4 +- ...RepFill_ListIteratorOfListOfOffsetWire.hxx | 1 - opencascade/BRepFill_ListOfOffsetWire.hxx | 3 +- opencascade/BRepFill_LocationLaw.hxx | 109 +- opencascade/BRepFill_MultiLine.hxx | 52 +- opencascade/BRepFill_NSections.hxx | 69 +- opencascade/BRepFill_OffsetAncestors.hxx | 42 +- opencascade/BRepFill_OffsetWire.hxx | 105 +- opencascade/BRepFill_Pipe.hxx | 151 +- opencascade/BRepFill_PipeShell.hxx | 198 +- opencascade/BRepFill_Section.hxx | 55 +- opencascade/BRepFill_Section.lxx | 15 +- opencascade/BRepFill_SectionLaw.hxx | 65 +- opencascade/BRepFill_SectionPlacement.hxx | 53 +- .../BRepFill_SequenceOfEdgeFaceAndOrder.hxx | 1 - .../BRepFill_SequenceOfFaceAndOrder.hxx | 1 - opencascade/BRepFill_SequenceOfSection.hxx | 1 - opencascade/BRepFill_ShapeLaw.hxx | 63 +- opencascade/BRepFill_ShapeLaw.lxx | 7 +- opencascade/BRepFill_Sweep.hxx | 153 +- .../BRepFill_ThruSectionErrorStatus.hxx | 15 +- opencascade/BRepFill_TransitionStyle.hxx | 7 +- opencascade/BRepFill_TrimEdgeTool.hxx | 62 +- opencascade/BRepFill_TrimShellCorner.hxx | 100 +- opencascade/BRepFill_TrimSurfaceTool.hxx | 65 +- opencascade/BRepFill_TypeOfContact.hxx | 6 +- opencascade/BRepFilletAPI_LocalOperation.hxx | 88 +- opencascade/BRepFilletAPI_MakeChamfer.hxx | 184 +- opencascade/BRepFilletAPI_MakeFillet.hxx | 264 +- opencascade/BRepFilletAPI_MakeFillet2d.hxx | 123 +- opencascade/BRepFilletAPI_MakeFillet2d.lxx | 51 +- opencascade/BRepGProp.hxx | 127 +- opencascade/BRepGProp_Cinert.hxx | 31 +- opencascade/BRepGProp_Domain.hxx | 45 +- opencascade/BRepGProp_Domain.lxx | 40 +- opencascade/BRepGProp_EdgeTool.hxx | 54 +- opencascade/BRepGProp_Face.hxx | 126 +- opencascade/BRepGProp_Face.lxx | 48 +- opencascade/BRepGProp_Gauss.hxx | 278 +- opencascade/BRepGProp_MeshCinert.hxx | 30 +- opencascade/BRepGProp_MeshProps.hxx | 47 +- opencascade/BRepGProp_Sinert.hxx | 58 +- opencascade/BRepGProp_TFunction.hxx | 82 +- opencascade/BRepGProp_TFunction.lxx | 27 +- opencascade/BRepGProp_UFunction.hxx | 59 +- opencascade/BRepGProp_UFunction.lxx | 8 +- opencascade/BRepGProp_Vinert.hxx | 137 +- opencascade/BRepGProp_VinertGK.hxx | 147 +- opencascade/BRepIntCurveSurface_Inter.hxx | 108 +- opencascade/BRepLProp.hxx | 20 +- opencascade/BRepLProp_CLProps.hxx | 90 +- opencascade/BRepLProp_CurveTool.hxx | 63 +- opencascade/BRepLProp_SLProps.hxx | 139 +- opencascade/BRepLProp_SurfaceTool.hxx | 71 +- opencascade/BRepLib.hxx | 203 +- opencascade/BRepLib_CheckCurveOnSurface.hxx | 59 +- opencascade/BRepLib_Command.hxx | 31 +- opencascade/BRepLib_EdgeError.hxx | 14 +- opencascade/BRepLib_FaceError.hxx | 10 +- opencascade/BRepLib_FindSurface.hxx | 58 +- opencascade/BRepLib_FuseEdges.hxx | 94 +- opencascade/BRepLib_MakeEdge.hxx | 254 +- opencascade/BRepLib_MakeEdge2d.hxx | 180 +- opencascade/BRepLib_MakeFace.hxx | 165 +- opencascade/BRepLib_MakePolygon.hxx | 84 +- opencascade/BRepLib_MakeShape.hxx | 51 +- opencascade/BRepLib_MakeShell.hxx | 53 +- opencascade/BRepLib_MakeSolid.hxx | 52 +- opencascade/BRepLib_MakeVertex.hxx | 28 +- opencascade/BRepLib_MakeWire.hxx | 132 +- opencascade/BRepLib_PointCloudShape.hxx | 50 +- opencascade/BRepLib_ShapeModification.hxx | 10 +- opencascade/BRepLib_ShellError.hxx | 8 +- opencascade/BRepLib_ToolTriangulatedShape.hxx | 13 +- opencascade/BRepLib_ValidateEdge.hxx | 64 +- opencascade/BRepLib_WireError.hxx | 8 +- opencascade/BRepMAT2d_BisectingLocus.hxx | 78 +- ...ataMapIteratorOfDataMapOfBasicEltShape.hxx | 1 - ...atorOfDataMapOfShapeSequenceOfBasicElt.hxx | 1 - .../BRepMAT2d_DataMapOfBasicEltShape.hxx | 6 +- ...MAT2d_DataMapOfShapeSequenceOfBasicElt.hxx | 7 +- opencascade/BRepMAT2d_Explorer.hxx | 83 +- opencascade/BRepMAT2d_LinkTopoBilo.hxx | 61 +- opencascade/BRepMeshData_Curve.hxx | 28 +- opencascade/BRepMeshData_Edge.hxx | 19 +- opencascade/BRepMeshData_Face.hxx | 19 +- opencascade/BRepMeshData_Model.hxx | 42 +- opencascade/BRepMeshData_PCurve.hxx | 36 +- opencascade/BRepMeshData_Wire.hxx | 29 +- opencascade/BRepMesh_BaseMeshAlgo.hxx | 46 +- .../BRepMesh_BoundaryParamsRangeSplitter.hxx | 15 +- opencascade/BRepMesh_Circle.hxx | 42 +- opencascade/BRepMesh_CircleInspector.hxx | 69 +- opencascade/BRepMesh_CircleTool.hxx | 55 +- opencascade/BRepMesh_Classifier.hxx | 19 +- opencascade/BRepMesh_ConeRangeSplitter.hxx | 13 +- .../BRepMesh_ConstrainedBaseMeshAlgo.hxx | 19 +- opencascade/BRepMesh_Context.hxx | 6 +- opencascade/BRepMesh_CurveTessellator.hxx | 58 +- opencascade/BRepMesh_CustomBaseMeshAlgo.hxx | 50 +- .../BRepMesh_CustomDelaunayBaseMeshAlgo.hxx | 24 +- .../BRepMesh_CylinderRangeSplitter.hxx | 14 +- .../BRepMesh_DataStructureOfDelaun.hxx | 121 +- opencascade/BRepMesh_DefaultRangeSplitter.hxx | 65 +- opencascade/BRepMesh_Deflection.hxx | 39 +- opencascade/BRepMesh_DegreeOfFreedom.hxx | 1 - .../BRepMesh_DelabellaBaseMeshAlgo.hxx | 7 +- .../BRepMesh_DelabellaMeshAlgoFactory.hxx | 5 +- opencascade/BRepMesh_Delaun.hxx | 320 +- opencascade/BRepMesh_DelaunayBaseMeshAlgo.hxx | 6 +- ...Mesh_DelaunayDeflectionControlMeshAlgo.hxx | 209 +- ...BRepMesh_DelaunayNodeInsertionMeshAlgo.hxx | 73 +- opencascade/BRepMesh_DiscretFactory.hxx | 53 +- opencascade/BRepMesh_DiscretRoot.hxx | 46 +- opencascade/BRepMesh_Edge.hxx | 76 +- opencascade/BRepMesh_EdgeDiscret.hxx | 32 +- .../BRepMesh_EdgeParameterProvider.hxx | 79 +- .../BRepMesh_EdgeTessellationExtractor.hxx | 27 +- .../BRepMesh_ExtrusionRangeSplitter.hxx | 10 +- opencascade/BRepMesh_FaceChecker.hxx | 58 +- opencascade/BRepMesh_FaceDiscret.hxx | 14 +- opencascade/BRepMesh_FactoryError.hxx | 1 - opencascade/BRepMesh_FastDiscret.hxx | 9 +- opencascade/BRepMesh_GeomTool.hxx | 183 +- opencascade/BRepMesh_IncrementalMesh.hxx | 74 +- opencascade/BRepMesh_MeshAlgoFactory.hxx | 3 +- opencascade/BRepMesh_MeshTool.hxx | 88 +- opencascade/BRepMesh_ModelBuilder.hxx | 10 +- opencascade/BRepMesh_ModelHealer.hxx | 94 +- opencascade/BRepMesh_ModelPostProcessor.hxx | 4 +- opencascade/BRepMesh_ModelPreProcessor.hxx | 4 +- opencascade/BRepMesh_NURBSRangeSplitter.hxx | 28 +- .../BRepMesh_NodeInsertionMeshAlgo.hxx | 100 +- opencascade/BRepMesh_OrientedEdge.hxx | 59 +- opencascade/BRepMesh_PairOfIndex.hxx | 38 +- opencascade/BRepMesh_PluginEntryType.hxx | 8 +- opencascade/BRepMesh_PluginMacro.hxx | 33 +- ...epMesh_SelectorOfDataStructureOfDelaun.hxx | 65 +- opencascade/BRepMesh_ShapeTool.hxx | 99 +- opencascade/BRepMesh_ShapeVisitor.hxx | 17 +- opencascade/BRepMesh_SphereRangeSplitter.hxx | 21 +- opencascade/BRepMesh_TorusRangeSplitter.hxx | 10 +- opencascade/BRepMesh_Triangle.hxx | 97 +- opencascade/BRepMesh_Triangulator.hxx | 48 +- opencascade/BRepMesh_UVParamRangeSplitter.hxx | 31 +- .../BRepMesh_UndefinedRangeSplitter.hxx | 12 +- opencascade/BRepMesh_Vertex.hxx | 92 +- opencascade/BRepMesh_VertexInspector.hxx | 71 +- opencascade/BRepMesh_VertexTool.hxx | 70 +- opencascade/BRepOffset.hxx | 27 +- opencascade/BRepOffsetAPI_DraftAngle.hxx | 74 +- .../BRepOffsetAPI_FindContigousEdges.hxx | 76 +- opencascade/BRepOffsetAPI_MakeDraft.hxx | 60 +- opencascade/BRepOffsetAPI_MakeEvolved.hxx | 69 +- opencascade/BRepOffsetAPI_MakeFilling.hxx | 116 +- opencascade/BRepOffsetAPI_MakeOffset.hxx | 87 +- opencascade/BRepOffsetAPI_MakeOffsetShape.hxx | 48 +- opencascade/BRepOffsetAPI_MakePipe.hxx | 49 +- opencascade/BRepOffsetAPI_MakePipeShell.hxx | 138 +- opencascade/BRepOffsetAPI_MakeThickSolid.hxx | 39 +- opencascade/BRepOffsetAPI_MiddlePath.hxx | 45 +- .../BRepOffsetAPI_NormalProjection.hxx | 80 +- ...BRepOffsetAPI_SequenceOfSequenceOfReal.hxx | 1 - ...RepOffsetAPI_SequenceOfSequenceOfShape.hxx | 1 - opencascade/BRepOffsetAPI_ThruSections.hxx | 168 +- opencascade/BRepOffset_Analyse.hxx | 126 +- ...IteratorOfDataMapOfShapeListOfInterval.hxx | 1 - ...aMapIteratorOfDataMapOfShapeMapOfShape.hxx | 1 - ..._DataMapIteratorOfDataMapOfShapeOffset.hxx | 1 - ...RepOffset_DataMapOfShapeListOfInterval.hxx | 7 +- .../BRepOffset_DataMapOfShapeMapOfShape.hxx | 7 +- .../BRepOffset_DataMapOfShapeOffset.hxx | 7 +- opencascade/BRepOffset_Error.hxx | 12 +- opencascade/BRepOffset_Inter2d.hxx | 84 +- opencascade/BRepOffset_Inter3d.hxx | 103 +- opencascade/BRepOffset_Interval.hxx | 48 +- opencascade/BRepOffset_Interval.lxx | 37 +- ...RepOffset_ListIteratorOfListOfInterval.hxx | 1 - opencascade/BRepOffset_ListOfInterval.hxx | 3 +- opencascade/BRepOffset_MakeLoops.hxx | 55 +- opencascade/BRepOffset_MakeOffset.hxx | 276 +- opencascade/BRepOffset_MakeSimpleOffset.hxx | 38 +- opencascade/BRepOffset_Mode.hxx | 7 +- opencascade/BRepOffset_Offset.hxx | 134 +- opencascade/BRepOffset_SimpleOffset.hxx | 86 +- opencascade/BRepOffset_Status.hxx | 8 +- opencascade/BRepOffset_Tool.hxx | 201 +- opencascade/BRepPreviewAPI_MakeBox.hxx | 18 +- opencascade/BRepPrimAPI_MakeBox.hxx | 98 +- opencascade/BRepPrimAPI_MakeCone.hxx | 72 +- opencascade/BRepPrimAPI_MakeCylinder.hxx | 56 +- opencascade/BRepPrimAPI_MakeHalfSpace.hxx | 30 +- opencascade/BRepPrimAPI_MakeOneAxis.hxx | 41 +- opencascade/BRepPrimAPI_MakePrism.hxx | 56 +- opencascade/BRepPrimAPI_MakeRevol.hxx | 60 +- opencascade/BRepPrimAPI_MakeRevolution.hxx | 72 +- opencascade/BRepPrimAPI_MakeSphere.hxx | 135 +- opencascade/BRepPrimAPI_MakeSweep.hxx | 26 +- opencascade/BRepPrimAPI_MakeTorus.hxx | 129 +- opencascade/BRepPrimAPI_MakeWedge.hxx | 73 +- opencascade/BRepPrim_Builder.hxx | 127 +- opencascade/BRepPrim_Builder.lxx | 4 +- opencascade/BRepPrim_Cone.hxx | 61 +- opencascade/BRepPrim_Cylinder.hxx | 44 +- opencascade/BRepPrim_Direction.hxx | 13 +- opencascade/BRepPrim_FaceBuilder.hxx | 64 +- opencascade/BRepPrim_GWedge.hxx | 196 +- opencascade/BRepPrim_OneAxis.hxx | 164 +- opencascade/BRepPrim_Revolution.hxx | 52 +- opencascade/BRepPrim_Sphere.hxx | 30 +- opencascade/BRepPrim_Torus.hxx | 38 +- opencascade/BRepPrim_Wedge.hxx | 50 +- opencascade/BRepProj_Projection.hxx | 67 +- opencascade/BRepProj_Projection.lxx | 16 +- opencascade/BRepSweep_Builder.hxx | 57 +- opencascade/BRepSweep_Builder.lxx | 8 +- opencascade/BRepSweep_Iterator.hxx | 41 +- opencascade/BRepSweep_Iterator.lxx | 22 +- .../BRepSweep_NumLinearRegularSweep.hxx | 186 +- opencascade/BRepSweep_Prism.hxx | 67 +- opencascade/BRepSweep_Revol.hxx | 59 +- opencascade/BRepSweep_Rotation.hxx | 139 +- opencascade/BRepSweep_Tool.hxx | 46 +- opencascade/BRepSweep_Translation.hxx | 144 +- opencascade/BRepSweep_Trsf.hxx | 144 +- opencascade/BRepToIGESBRep_Entity.hxx | 111 +- opencascade/BRepToIGES_BREntity.hxx | 88 +- opencascade/BRepToIGES_BRShell.hxx | 47 +- opencascade/BRepToIGES_BRSolid.hxx | 54 +- opencascade/BRepToIGES_BRWire.hxx | 99 +- opencascade/BRepTools.hxx | 344 +- opencascade/BRepTools_CopyModification.hxx | 37 +- ...ools_DataMapIteratorOfMapOfVertexPnt2d.hxx | 1 - opencascade/BRepTools_GTrsfModification.hxx | 83 +- opencascade/BRepTools_History.hxx | 66 +- opencascade/BRepTools_MapOfVertexPnt2d.hxx | 7 +- opencascade/BRepTools_Modification.hxx | 76 +- opencascade/BRepTools_Modifier.hxx | 95 +- opencascade/BRepTools_Modifier.lxx | 20 +- .../BRepTools_NurbsConvertModification.hxx | 87 +- opencascade/BRepTools_PurgeLocations.hxx | 23 +- opencascade/BRepTools_Quilt.hxx | 54 +- opencascade/BRepTools_ReShape.hxx | 109 +- opencascade/BRepTools_ShapeSet.hxx | 160 +- opencascade/BRepTools_Substitution.hxx | 43 +- opencascade/BRepTools_TrsfModification.hxx | 89 +- opencascade/BRepTools_WireExplorer.hxx | 72 +- ...daptor_DataMapIteratorOfMapOfShapeTool.hxx | 1 - opencascade/BRepTopAdaptor_FClass2d.hxx | 80 +- opencascade/BRepTopAdaptor_HVertex.hxx | 48 +- opencascade/BRepTopAdaptor_HVertex.lxx | 5 +- opencascade/BRepTopAdaptor_MapOfShapeTool.hxx | 7 +- opencascade/BRepTopAdaptor_SeqOfPtr.hxx | 1 - opencascade/BRepTopAdaptor_Tool.hxx | 50 +- opencascade/BRepTopAdaptor_TopolTool.hxx | 131 +- opencascade/BRep_Builder.hxx | 349 +- opencascade/BRep_Builder.lxx | 173 +- opencascade/BRep_Curve3D.hxx | 39 +- opencascade/BRep_CurveOn2Surfaces.hxx | 61 +- opencascade/BRep_CurveOnClosedSurface.hxx | 74 +- opencascade/BRep_CurveOnClosedSurface.lxx | 15 +- opencascade/BRep_CurveOnSurface.hxx | 57 +- opencascade/BRep_CurveOnSurface.lxx | 15 +- opencascade/BRep_CurveRepresentation.hxx | 138 +- opencascade/BRep_CurveRepresentation.lxx | 13 +- opencascade/BRep_GCurve.hxx | 54 +- opencascade/BRep_GCurve.lxx | 35 +- ...istIteratorOfListOfCurveRepresentation.hxx | 1 - ...istIteratorOfListOfPointRepresentation.hxx | 1 - .../BRep_ListOfCurveRepresentation.hxx | 4 +- .../BRep_ListOfPointRepresentation.hxx | 4 +- opencascade/BRep_PointOnCurve.hxx | 39 +- opencascade/BRep_PointOnCurveOnSurface.hxx | 41 +- opencascade/BRep_PointOnSurface.hxx | 35 +- opencascade/BRep_PointRepresentation.hxx | 84 +- opencascade/BRep_PointRepresentation.lxx | 29 +- opencascade/BRep_PointsOnSurface.hxx | 33 +- opencascade/BRep_Polygon3D.hxx | 35 +- opencascade/BRep_PolygonOnClosedSurface.hxx | 38 +- .../BRep_PolygonOnClosedTriangulation.hxx | 42 +- opencascade/BRep_PolygonOnSurface.hxx | 47 +- opencascade/BRep_PolygonOnTriangulation.hxx | 51 +- opencascade/BRep_TEdge.hxx | 66 +- opencascade/BRep_TEdge.lxx | 40 +- opencascade/BRep_TFace.hxx | 65 +- opencascade/BRep_TVertex.hxx | 56 +- opencascade/BRep_TVertex.lxx | 53 +- opencascade/BRep_Tool.hxx | 342 +- opencascade/BSplCLib.hxx | 1628 +- opencascade/BSplCLib.lxx | 167 +- opencascade/BSplCLib_Cache.hxx | 121 +- opencascade/BSplCLib_CacheParams.hxx | 71 +- opencascade/BSplCLib_CurveComputation.gxx | 1487 - opencascade/BSplCLib_EvaluatorFunction.hxx | 32 +- opencascade/BSplCLib_KnotDistribution.hxx | 4 +- opencascade/BSplCLib_MultDistribution.hxx | 6 +- opencascade/BSplSLib.hxx | 537 +- opencascade/BSplSLib.lxx | 128 +- opencascade/BSplSLib_Cache.hxx | 70 +- opencascade/BSplSLib_EvaluatorFunction.hxx | 36 +- opencascade/BVH_BinaryTree.hxx | 229 +- opencascade/BVH_BinnedBuilder.hxx | 281 +- opencascade/BVH_Box.hxx | 466 +- opencascade/BVH_BoxSet.hxx | 66 +- opencascade/BVH_BuildQueue.hxx | 18 +- opencascade/BVH_BuildThread.hxx | 29 +- opencascade/BVH_Builder.hxx | 48 +- ...ect_FileModifier.gxx => BVH_Builder3d.hxx} | 10 +- opencascade/BVH_Constants.hxx | 25 +- opencascade/BVH_Distance.hxx | 34 +- opencascade/BVH_DistanceField.hxx | 77 +- opencascade/BVH_DistanceField.lxx | 570 +- opencascade/BVH_Geometry.hxx | 41 +- opencascade/BVH_IndexedBoxSet.hxx | 46 +- opencascade/BVH_LinearBuilder.hxx | 356 +- opencascade/BVH_Object.hxx | 19 +- opencascade/BVH_ObjectSet.hxx | 29 +- opencascade/BVH_PairDistance.hxx | 44 +- opencascade/BVH_PrimitiveSet.hxx | 36 +- opencascade/BVH_Properties.hxx | 164 +- opencascade/BVH_QuadTree.hxx | 15 +- opencascade/BVH_QueueBuilder.hxx | 171 +- opencascade/BVH_QuickSorter.hxx | 30 +- opencascade/BVH_RadixSorter.hxx | 238 +- opencascade/BVH_Ray.hxx | 13 +- opencascade/BVH_Set.hxx | 18 +- opencascade/BVH_Sorter.hxx | 29 +- opencascade/BVH_SpatialMedianBuilder.hxx | 17 +- opencascade/BVH_SweepPlaneBuilder.hxx | 88 +- opencascade/BVH_Tools.hxx | 223 +- opencascade/BVH_Traverse.hxx | 104 +- opencascade/BVH_Traverse.lxx | 158 +- opencascade/BVH_Tree.hxx | 161 +- opencascade/BVH_Triangulation.hxx | 65 +- opencascade/BVH_Types.hxx | 339 +- opencascade/BiTgte_Blend.hxx | 182 +- opencascade/BiTgte_ContactType.hxx | 13 +- opencascade/BiTgte_CurveOnEdge.hxx | 103 +- opencascade/BiTgte_CurveOnVertex.hxx | 97 +- opencascade/BinDrivers.hxx | 11 +- .../BinDrivers_DocumentRetrievalDriver.hxx | 37 +- .../BinDrivers_DocumentStorageDriver.hxx | 30 +- opencascade/BinDrivers_Marker.hxx | 4 +- opencascade/BinLDrivers.hxx | 10 +- .../BinLDrivers_DocumentRetrievalDriver.hxx | 117 +- opencascade/BinLDrivers_DocumentSection.hxx | 71 +- .../BinLDrivers_DocumentStorageDriver.hxx | 102 +- opencascade/BinLDrivers_Marker.hxx | 4 +- .../BinLDrivers_VectorOfDocumentSection.hxx | 5 +- opencascade/BinMDF.hxx | 7 +- opencascade/BinMDF_ADriver.hxx | 35 +- opencascade/BinMDF_ADriver.lxx | 6 +- opencascade/BinMDF_ADriverTable.hxx | 48 +- opencascade/BinMDF_ADriverTable.lxx | 45 +- ...BinMDF_DataMapIteratorOfTypeADriverMap.hxx | 1 - opencascade/BinMDF_DerivedDriver.hxx | 35 +- .../BinMDF_DoubleMapIteratorOfTypeIdMap.hxx | 1 - opencascade/BinMDF_ReferenceDriver.hxx | 34 +- opencascade/BinMDF_StringIdMap.hxx | 1 - opencascade/BinMDF_TagSourceDriver.hxx | 33 +- opencascade/BinMDF_TypeADriverMap.hxx | 6 +- opencascade/BinMDF_TypeIdMap.hxx | 6 +- opencascade/BinMDataStd.hxx | 49 +- opencascade/BinMDataStd_AsciiStringDriver.hxx | 37 +- .../BinMDataStd_BooleanArrayDriver.hxx | 35 +- opencascade/BinMDataStd_BooleanListDriver.hxx | 35 +- opencascade/BinMDataStd_ByteArrayDriver.hxx | 35 +- opencascade/BinMDataStd_ExpressionDriver.hxx | 33 +- .../BinMDataStd_ExtStringArrayDriver.hxx | 35 +- .../BinMDataStd_ExtStringListDriver.hxx | 36 +- .../BinMDataStd_GenericEmptyDriver.hxx | 34 +- .../BinMDataStd_GenericExtStringDriver.hxx | 38 +- .../BinMDataStd_IntPackedMapDriver.hxx | 37 +- .../BinMDataStd_IntegerArrayDriver.hxx | 34 +- opencascade/BinMDataStd_IntegerDriver.hxx | 34 +- opencascade/BinMDataStd_IntegerListDriver.hxx | 35 +- opencascade/BinMDataStd_NamedDataDriver.hxx | 35 +- opencascade/BinMDataStd_RealArrayDriver.hxx | 34 +- opencascade/BinMDataStd_RealDriver.hxx | 34 +- opencascade/BinMDataStd_RealListDriver.hxx | 35 +- .../BinMDataStd_ReferenceArrayDriver.hxx | 36 +- .../BinMDataStd_ReferenceListDriver.hxx | 36 +- opencascade/BinMDataStd_TreeNodeDriver.hxx | 33 +- opencascade/BinMDataStd_UAttributeDriver.hxx | 33 +- opencascade/BinMDataStd_VariableDriver.hxx | 33 +- opencascade/BinMDataXtd.hxx | 14 +- opencascade/BinMDataXtd_ConstraintDriver.hxx | 33 +- opencascade/BinMDataXtd_GeometryDriver.hxx | 33 +- opencascade/BinMDataXtd_PatternStdDriver.hxx | 33 +- opencascade/BinMDataXtd_PositionDriver.hxx | 33 +- .../BinMDataXtd_PresentationDriver.hxx | 34 +- .../BinMDataXtd_TriangulationDriver.hxx | 16 +- opencascade/BinMDocStd.hxx | 9 +- opencascade/BinMDocStd_XLinkDriver.hxx | 34 +- opencascade/BinMFunction.hxx | 9 +- opencascade/BinMFunction_FunctionDriver.hxx | 34 +- opencascade/BinMFunction_GraphNodeDriver.hxx | 34 +- opencascade/BinMFunction_ScopeDriver.hxx | 34 +- opencascade/BinMNaming.hxx | 9 +- opencascade/BinMNaming_NamedShapeDriver.hxx | 70 +- opencascade/BinMNaming_NamedShapeDriver.lxx | 17 +- opencascade/BinMNaming_NamingDriver.hxx | 33 +- opencascade/BinMXCAFDoc.hxx | 10 +- .../BinMXCAFDoc_AssemblyItemRefDriver.hxx | 17 +- opencascade/BinMXCAFDoc_CentroidDriver.hxx | 35 +- opencascade/BinMXCAFDoc_ColorDriver.hxx | 35 +- opencascade/BinMXCAFDoc_DatumDriver.hxx | 35 +- opencascade/BinMXCAFDoc_DimTolDriver.hxx | 35 +- opencascade/BinMXCAFDoc_GraphNodeDriver.hxx | 35 +- opencascade/BinMXCAFDoc_LengthUnitDriver.hxx | 13 +- opencascade/BinMXCAFDoc_LocationDriver.hxx | 47 +- opencascade/BinMXCAFDoc_MaterialDriver.hxx | 35 +- opencascade/BinMXCAFDoc_NoteBinDataDriver.hxx | 21 +- opencascade/BinMXCAFDoc_NoteCommentDriver.hxx | 22 +- opencascade/BinMXCAFDoc_NoteDriver.hxx | 21 +- opencascade/BinMXCAFDoc_VisMaterialDriver.hxx | 19 +- .../BinMXCAFDoc_VisMaterialToolDriver.hxx | 18 +- opencascade/BinObjMgt_Persistent.hxx | 489 +- opencascade/BinObjMgt_Persistent.lxx | 152 +- opencascade/BinObjMgt_Position.hxx | 16 +- opencascade/BinObjMgt_RRelocationTable.hxx | 10 +- opencascade/BinObjMgt_SRelocationTable.hxx | 1 - opencascade/BinTObjDrivers.hxx | 15 +- ...BinTObjDrivers_DocumentRetrievalDriver.hxx | 20 +- .../BinTObjDrivers_DocumentStorageDriver.hxx | 17 +- .../BinTObjDrivers_IntSparseArrayDriver.hxx | 30 +- opencascade/BinTObjDrivers_ModelDriver.hxx | 32 +- opencascade/BinTObjDrivers_ObjectDriver.hxx | 31 +- .../BinTObjDrivers_ReferenceDriver.hxx | 36 +- opencascade/BinTObjDrivers_XYZDriver.hxx | 30 +- opencascade/BinTools.hxx | 139 +- opencascade/BinTools_Curve2dSet.hxx | 44 +- opencascade/BinTools_CurveSet.hxx | 41 +- opencascade/BinTools_FormatVersion.hxx | 9 +- opencascade/BinTools_IStream.hxx | 99 +- opencascade/BinTools_LocationSet.hxx | 46 +- opencascade/BinTools_OStream.hxx | 62 +- opencascade/BinTools_ObjectType.hxx | 10 +- opencascade/BinTools_ShapeReader.hxx | 39 +- opencascade/BinTools_ShapeSet.hxx | 153 +- opencascade/BinTools_ShapeSetBase.hxx | 50 +- opencascade/BinTools_ShapeWriter.hxx | 57 +- opencascade/BinTools_SurfaceSet.hxx | 42 +- opencascade/BinXCAFDrivers.hxx | 12 +- ...BinXCAFDrivers_DocumentRetrievalDriver.hxx | 27 +- .../BinXCAFDrivers_DocumentStorageDriver.hxx | 26 +- opencascade/Bisector.hxx | 9 +- opencascade/Bisector_Bisec.hxx | 73 +- opencascade/Bisector_BisecAna.hxx | 171 +- opencascade/Bisector_BisecCC.hxx | 245 +- opencascade/Bisector_BisecPC.hxx | 206 +- opencascade/Bisector_Curve.hxx | 37 +- opencascade/Bisector_FunctionH.hxx | 46 +- opencascade/Bisector_FunctionInter.hxx | 50 +- opencascade/Bisector_Inter.hxx | 74 +- opencascade/Bisector_PointOnBis.hxx | 75 +- opencascade/Bisector_PolyBis.hxx | 44 +- opencascade/BlendFunc.hxx | 47 +- opencascade/BlendFunc_CSCircular.hxx | 246 +- opencascade/BlendFunc_CSConstRad.hxx | 239 +- opencascade/BlendFunc_ChAsym.hxx | 238 +- opencascade/BlendFunc_ChAsymInv.hxx | 90 +- opencascade/BlendFunc_ChamfInv.hxx | 47 +- opencascade/BlendFunc_Chamfer.hxx | 78 +- opencascade/BlendFunc_ConstRad.hxx | 337 +- opencascade/BlendFunc_ConstRadInv.hxx | 76 +- opencascade/BlendFunc_ConstThroat.hxx | 105 +- opencascade/BlendFunc_ConstThroatInv.hxx | 52 +- .../BlendFunc_ConstThroatWithPenetration.hxx | 74 +- ...lendFunc_ConstThroatWithPenetrationInv.hxx | 32 +- opencascade/BlendFunc_Corde.hxx | 88 +- opencascade/BlendFunc_EvolRad.hxx | 352 +- opencascade/BlendFunc_EvolRadInv.hxx | 73 +- opencascade/BlendFunc_GenChamfInv.hxx | 58 +- opencascade/BlendFunc_GenChamfer.hxx | 190 +- opencascade/BlendFunc_Ruled.hxx | 215 +- opencascade/BlendFunc_RuledInv.hxx | 68 +- opencascade/BlendFunc_SectionShape.hxx | 9 +- opencascade/BlendFunc_Tensor.hxx | 73 +- opencascade/BlendFunc_Tensor.lxx | 16 +- opencascade/Blend_AppFunction.hxx | 185 +- opencascade/Blend_CSFunction.hxx | 153 +- opencascade/Blend_CSWalking.gxx | 77 - opencascade/Blend_CSWalking.lxx | 26 - opencascade/Blend_CSWalking_1.gxx | 172 - opencascade/Blend_CSWalking_2.gxx | 354 - opencascade/Blend_CSWalking_3.gxx | 250 - opencascade/Blend_CSWalking_4.gxx | 287 - opencascade/Blend_CurvPointFuncInv.hxx | 58 +- opencascade/Blend_DecrochStatus.hxx | 9 +- opencascade/Blend_FuncInv.hxx | 58 +- opencascade/Blend_Function.hxx | 97 +- opencascade/Blend_Point.hxx | 338 +- opencascade/Blend_Point.lxx | 132 +- opencascade/Blend_RstRstFunction.hxx | 171 +- opencascade/Blend_SequenceOfPoint.hxx | 1 - opencascade/Blend_Status.hxx | 17 +- opencascade/Blend_SurfCurvFuncInv.hxx | 57 +- opencascade/Blend_SurfPointFuncInv.hxx | 58 +- opencascade/Blend_SurfRstFunction.hxx | 167 +- opencascade/Blend_Walking.gxx | 108 - opencascade/Blend_Walking.lxx | 36 - opencascade/Blend_Walking_1.gxx | 596 - opencascade/Blend_Walking_2.gxx | 319 - opencascade/Blend_Walking_3.gxx | 529 - opencascade/Blend_Walking_4.gxx | 899 - opencascade/BndLib.hxx | 164 +- opencascade/BndLib_Add2dCurve.hxx | 61 +- opencascade/BndLib_Add3dCurve.hxx | 53 +- opencascade/BndLib_AddSurface.hxx | 60 +- opencascade/Bnd_Array1OfBox.hxx | 1 - opencascade/Bnd_Array1OfBox2d.hxx | 1 - opencascade/Bnd_Array1OfSphere.hxx | 1 - opencascade/Bnd_B2d.hxx | 115 +- opencascade/Bnd_B2f.hxx | 115 +- opencascade/Bnd_B2x.gxx | 350 - opencascade/Bnd_B2x.lxx | 63 +- opencascade/Bnd_B3d.hxx | 116 +- opencascade/Bnd_B3f.hxx | 116 +- opencascade/Bnd_B3x.gxx | 474 - opencascade/Bnd_B3x.lxx | 79 +- opencascade/Bnd_BoundSortBox.hxx | 85 +- opencascade/Bnd_Box.hxx | 176 +- opencascade/Bnd_Box2d.hxx | 106 +- opencascade/Bnd_HArray1OfBox.hxx | 1 - opencascade/Bnd_HArray1OfBox2d.hxx | 1 - opencascade/Bnd_HArray1OfSphere.hxx | 1 - opencascade/Bnd_OBB.hxx | 164 +- opencascade/Bnd_Range.hxx | 89 +- opencascade/Bnd_Sphere.hxx | 91 +- opencascade/Bnd_Sphere.lxx | 8 +- opencascade/Bnd_Tools.hxx | 16 +- opencascade/CDF_Application.hxx | 156 +- opencascade/CDF_Directory.hxx | 41 +- opencascade/CDF_DirectoryIterator.hxx | 33 +- opencascade/CDF_FWOSDriver.hxx | 54 +- opencascade/CDF_MetaDataDriver.hxx | 99 +- opencascade/CDF_MetaDataDriverFactory.hxx | 23 +- opencascade/CDF_Store.hxx | 107 +- opencascade/CDF_StoreList.hxx | 50 +- opencascade/CDF_StoreSetNameStatus.hxx | 7 +- opencascade/CDF_SubComponentStatus.hxx | 9 +- opencascade/CDF_TryStoreStatus.hxx | 9 +- opencascade/CDF_TypeOfActivation.hxx | 7 +- opencascade/CDM_Application.hxx | 67 +- opencascade/CDM_CanCloseStatus.hxx | 11 +- ...M_DataMapIteratorOfMetaDataLookUpTable.hxx | 1 - opencascade/CDM_Document.hxx | 298 +- .../CDM_ListIteratorOfListOfDocument.hxx | 1 - .../CDM_ListIteratorOfListOfReferences.hxx | 1 - opencascade/CDM_ListOfDocument.hxx | 3 +- opencascade/CDM_ListOfReferences.hxx | 3 +- .../CDM_MapIteratorOfMapOfDocument.hxx | 1 - opencascade/CDM_MapOfDocument.hxx | 3 +- opencascade/CDM_MetaData.hxx | 131 +- opencascade/CDM_MetaDataLookUpTable.hxx | 7 +- opencascade/CDM_NamesDirectory.hxx | 1 - opencascade/CDM_Reference.hxx | 85 +- opencascade/CDM_ReferenceIterator.hxx | 35 +- opencascade/CPnts_AbscissaPoint.hxx | 179 +- opencascade/CPnts_AbscissaPoint.lxx | 22 +- opencascade/CPnts_MyGaussFunction.hxx | 33 +- opencascade/CPnts_MyGaussFunction.lxx | 10 +- opencascade/CPnts_MyRootFunction.hxx | 59 +- opencascade/CPnts_MyRootFunction.lxx | 13 +- opencascade/CPnts_RealFunction.hxx | 3 +- opencascade/CPnts_UniformDeflection.hxx | 120 +- opencascade/CPnts_UniformDeflection.lxx | 38 +- opencascade/CSLib.hxx | 68 +- opencascade/CSLib_Class2d.hxx | 107 +- opencascade/CSLib_DerivativeStatus.hxx | 15 +- opencascade/CSLib_NormalPolyDef.hxx | 40 +- opencascade/CSLib_NormalStatus.hxx | 19 +- opencascade/ChFi2d.hxx | 14 +- opencascade/ChFi2d_AnaFilletAlgo.hxx | 62 +- opencascade/ChFi2d_Builder.hxx | 229 +- opencascade/ChFi2d_Builder.lxx | 62 +- opencascade/ChFi2d_ChamferAPI.hxx | 14 +- opencascade/ChFi2d_ConstructionError.hxx | 22 +- opencascade/ChFi2d_FilletAPI.hxx | 44 +- opencascade/ChFi2d_FilletAlgo.hxx | 78 +- opencascade/ChFi3d.hxx | 52 +- opencascade/ChFi3d_Builder.hxx | 1387 +- opencascade/ChFi3d_Builder_0.hxx | 863 +- opencascade/ChFi3d_ChBuilder.hxx | 603 +- opencascade/ChFi3d_FilBuilder.hxx | 372 +- opencascade/ChFi3d_FilletShape.hxx | 7 +- opencascade/ChFi3d_SearchSing.hxx | 38 +- opencascade/ChFiDS_ChamfMethod.hxx | 7 +- opencascade/ChFiDS_ChamfMode.hxx | 4 +- opencascade/ChFiDS_ChamfSpine.hxx | 53 +- opencascade/ChFiDS_CircSection.hxx | 38 +- opencascade/ChFiDS_CommonPoint.hxx | 88 +- opencascade/ChFiDS_ElSpine.hxx | 166 +- opencascade/ChFiDS_ErrorStatus.hxx | 10 +- opencascade/ChFiDS_FaceInterference.hxx | 76 +- opencascade/ChFiDS_FaceInterference.lxx | 101 +- opencascade/ChFiDS_FilSpine.hxx | 92 +- opencascade/ChFiDS_HData.hxx | 1 - ...iDS_IndexedDataMapOfVertexListOfStripe.hxx | 4 +- .../ChFiDS_ListIteratorOfListOfHElSpine.hxx | 1 - .../ChFiDS_ListIteratorOfListOfStripe.hxx | 1 - .../ChFiDS_ListIteratorOfRegularities.hxx | 1 - opencascade/ChFiDS_ListOfHElSpine.hxx | 3 +- opencascade/ChFiDS_ListOfStripe.hxx | 3 +- opencascade/ChFiDS_Map.hxx | 49 +- opencascade/ChFiDS_Regul.hxx | 44 +- opencascade/ChFiDS_Regularities.hxx | 3 +- opencascade/ChFiDS_SecArray1.hxx | 1 - opencascade/ChFiDS_SecHArray1.hxx | 1 - opencascade/ChFiDS_SequenceOfSpine.hxx | 1 - opencascade/ChFiDS_SequenceOfSurfData.hxx | 1 - opencascade/ChFiDS_Spine.hxx | 316 +- opencascade/ChFiDS_Spine.lxx | 156 +- opencascade/ChFiDS_State.hxx | 14 +- opencascade/ChFiDS_Stripe.hxx | 254 +- opencascade/ChFiDS_Stripe.lxx | 232 +- opencascade/ChFiDS_StripeArray1.hxx | 1 - opencascade/ChFiDS_StripeMap.hxx | 45 +- opencascade/ChFiDS_StripeMap.lxx | 20 +- opencascade/ChFiDS_SurfData.hxx | 261 +- opencascade/ChFiDS_SurfData.lxx | 190 +- opencascade/ChFiDS_TypeOfConcavity.hxx | 13 +- opencascade/ChFiKPart_ComputeData.hxx | 78 +- opencascade/ChFiKPart_ComputeData_CS.hxx | 23 +- .../ChFiKPart_ComputeData_ChAsymPlnCon.hxx | 30 +- .../ChFiKPart_ComputeData_ChAsymPlnCyl.hxx | 61 +- .../ChFiKPart_ComputeData_ChAsymPlnPln.hxx | 26 +- .../ChFiKPart_ComputeData_ChPlnCon.hxx | 30 +- .../ChFiKPart_ComputeData_ChPlnCyl.hxx | 60 +- .../ChFiKPart_ComputeData_ChPlnPln.hxx | 25 +- opencascade/ChFiKPart_ComputeData_Fcts.hxx | 36 +- .../ChFiKPart_ComputeData_FilPlnCon.hxx | 28 +- .../ChFiKPart_ComputeData_FilPlnCyl.hxx | 52 +- .../ChFiKPart_ComputeData_FilPlnPln.hxx | 21 +- opencascade/ChFiKPart_ComputeData_Rotule.hxx | 21 +- opencascade/ChFiKPart_ComputeData_Sphere.hxx | 26 +- .../ChFiKPart_DataMapIteratorOfRstMap.hxx | 1 - opencascade/ChFiKPart_RstMap.hxx | 6 +- opencascade/Cocoa_LocalPool.hxx | 21 +- opencascade/Cocoa_Window.hxx | 75 +- opencascade/Contap_ArcFunction.hxx | 85 +- opencascade/Contap_ArcFunction.lxx | 23 +- opencascade/Contap_ContAna.hxx | 84 +- opencascade/Contap_ContAna.lxx | 35 +- opencascade/Contap_Contour.hxx | 113 +- opencascade/Contap_Contour.lxx | 30 +- opencascade/Contap_HContTool.hxx | 119 +- opencascade/Contap_HCurve2dTool.hxx | 117 +- opencascade/Contap_HCurve2dTool.lxx | 180 +- opencascade/Contap_IType.hxx | 9 +- opencascade/Contap_Line.hxx | 100 +- opencascade/Contap_Line.lxx | 46 +- opencascade/Contap_Point.hxx | 122 +- opencascade/Contap_Point.lxx | 100 +- .../Contap_SequenceOfIWLineOfTheIWalking.hxx | 3 +- opencascade/Contap_SurfFunction.hxx | 138 +- opencascade/Contap_SurfFunction.lxx | 46 +- opencascade/Contap_SurfProps.hxx | 49 +- opencascade/Contap_TFunction.hxx | 9 +- opencascade/Contap_TheHSequenceOfPoint.hxx | 1 - opencascade/Contap_TheIWLineOfTheIWalking.hxx | 151 +- opencascade/Contap_TheIWalking.hxx | 224 +- .../Contap_ThePathPointOfTheSearch.hxx | 66 +- opencascade/Contap_TheSearch.hxx | 58 +- opencascade/Contap_TheSearchInside.hxx | 55 +- opencascade/Contap_TheSegmentOfTheSearch.hxx | 55 +- opencascade/Contap_TheSequenceOfLine.hxx | 1 - opencascade/Contap_TheSequenceOfPoint.hxx | 1 - opencascade/Convert_CircleToBSplineCurve.hxx | 37 +- ...ert_CompBezierCurves2dToBSplineCurve2d.hxx | 60 +- ...Convert_CompBezierCurvesToBSplineCurve.hxx | 59 +- opencascade/Convert_CompPolynomialToPoles.hxx | 98 +- opencascade/Convert_ConeToBSplineSurface.hxx | 37 +- opencascade/Convert_ConicToBSplineCurve.hxx | 85 +- opencascade/Convert_CosAndSinEvalFunction.hxx | 12 +- .../Convert_CylinderToBSplineSurface.hxx | 37 +- ...vert_ElementarySurfaceToBSplineSurface.hxx | 95 +- opencascade/Convert_EllipseToBSplineCurve.hxx | 36 +- opencascade/Convert_GridPolynomialToPoles.hxx | 110 +- .../Convert_HyperbolaToBSplineCurve.hxx | 30 +- .../Convert_ParabolaToBSplineCurve.hxx | 30 +- opencascade/Convert_ParameterisationType.hxx | 57 +- opencascade/Convert_PolynomialCosAndSin.hxx | 15 +- .../Convert_SequenceOfArray1OfPoles.hxx | 1 - .../Convert_SequenceOfArray1OfPoles2d.hxx | 1 - .../Convert_SphereToBSplineSurface.hxx | 39 +- opencascade/Convert_TorusToBSplineSurface.hxx | 39 +- opencascade/DEBREP_ConfigurationNode.hxx | 103 + opencascade/DEBREP_Provider.hxx | 141 + .../DEBRepCascade_ConfigurationNode.hxx | 86 +- opencascade/DEBRepCascade_Provider.hxx | 120 +- opencascade/DEGLTF_ConfigurationNode.hxx | 118 + opencascade/DEGLTF_Provider.hxx | 143 + opencascade/DEIGES_ConfigurationNode.hxx | 91 + opencascade/DEIGES_Parameters.hxx | 129 + opencascade/DEIGES_Provider.hxx | 160 + opencascade/DEOBJ_ConfigurationNode.hxx | 102 + opencascade/DEOBJ_Provider.hxx | 141 + opencascade/DEPLY_ConfigurationNode.hxx | 109 + opencascade/DEPLY_Provider.hxx | 97 + opencascade/DESTEP_ConfigurationNode.hxx | 93 + opencascade/DESTEP_Parameters.hxx | 206 + opencascade/DESTEP_Provider.hxx | 148 + opencascade/DESTL_ConfigurationNode.hxx | 98 + opencascade/DESTL_Provider.hxx | 141 + opencascade/DEVRML_ConfigurationNode.hxx | 111 + opencascade/DEVRML_Provider.hxx | 141 + .../DEXCAFCascade_ConfigurationNode.hxx | 83 +- opencascade/DEXCAFCascade_Provider.hxx | 120 +- opencascade/DEXCAF_ConfigurationNode.hxx | 100 + opencascade/DEXCAF_Provider.hxx | 141 + opencascade/DE_ConfigurationContext.hxx | 28 +- opencascade/DE_ConfigurationNode.hxx | 31 +- opencascade/DE_Provider.hxx | 94 +- opencascade/DE_ShapeFixConfigurationNode.hxx | 50 + opencascade/DE_ShapeFixParameters.hxx | 87 + opencascade/DE_Wrapper.hxx | 121 +- opencascade/Draft.hxx | 9 +- opencascade/Draft_EdgeInfo.hxx | 87 +- opencascade/Draft_ErrorStatus.hxx | 9 +- opencascade/Draft_FaceInfo.hxx | 62 +- .../Draft_IndexedDataMapOfEdgeEdgeInfo.hxx | 4 +- .../Draft_IndexedDataMapOfFaceFaceInfo.hxx | 4 +- ...Draft_IndexedDataMapOfVertexVertexInfo.hxx | 4 +- opencascade/Draft_Modification.hxx | 146 +- opencascade/Draft_VertexInfo.hxx | 53 +- opencascade/DsgPrs.hxx | 104 +- opencascade/DsgPrs_AnglePresentation.hxx | 117 +- opencascade/DsgPrs_ArrowSide.hxx | 18 +- opencascade/DsgPrs_Chamf2dPresentation.hxx | 38 +- opencascade/DsgPrs_ConcentricPresentation.hxx | 30 +- opencascade/DsgPrs_DatumPrs.hxx | 16 +- opencascade/DsgPrs_DiameterPresentation.hxx | 44 +- .../DsgPrs_EllipseRadiusPresentation.hxx | 63 +- .../DsgPrs_EqualDistancePresentation.hxx | 56 +- .../DsgPrs_EqualRadiusPresentation.hxx | 31 +- .../DsgPrs_FilletRadiusPresentation.hxx | 40 +- opencascade/DsgPrs_FixPresentation.hxx | 30 +- opencascade/DsgPrs_IdenticPresentation.hxx | 72 +- opencascade/DsgPrs_LengthPresentation.hxx | 74 +- opencascade/DsgPrs_MidPointPresentation.hxx | 67 +- opencascade/DsgPrs_OffsetPresentation.hxx | 43 +- opencascade/DsgPrs_ParalPresentation.hxx | 42 +- opencascade/DsgPrs_PerpenPresentation.hxx | 33 +- opencascade/DsgPrs_RadiusPresentation.hxx | 59 +- .../DsgPrs_ShadedPlanePresentation.hxx | 29 +- opencascade/DsgPrs_ShapeDirPresentation.hxx | 28 +- opencascade/DsgPrs_SymbPresentation.hxx | 28 +- opencascade/DsgPrs_SymmetricPresentation.hxx | 50 +- opencascade/DsgPrs_TangentPresentation.hxx | 29 +- opencascade/DsgPrs_XYZAxisPresentation.hxx | 43 +- opencascade/DsgPrs_XYZPlanePresentation.hxx | 29 +- opencascade/ElCLib.hxx | 706 +- opencascade/ElCLib.lxx | 501 +- opencascade/ElSLib.hxx | 673 +- opencascade/ElSLib.lxx | 433 +- opencascade/Expr.hxx | 21 +- opencascade/ExprIntrp.hxx | 10 +- opencascade/ExprIntrp.tab.h | 76 +- opencascade/ExprIntrp_Analysis.hxx | 83 +- opencascade/ExprIntrp_GenExp.hxx | 32 +- opencascade/ExprIntrp_GenFct.hxx | 26 +- opencascade/ExprIntrp_GenRel.hxx | 32 +- opencascade/ExprIntrp_Generator.hxx | 40 +- ...ListIteratorOfStackOfGeneralExpression.hxx | 1 - ...p_ListIteratorOfStackOfGeneralFunction.hxx | 1 - ...p_ListIteratorOfStackOfGeneralRelation.hxx | 1 - .../ExprIntrp_SequenceOfNamedExpression.hxx | 1 - .../ExprIntrp_SequenceOfNamedFunction.hxx | 1 - .../ExprIntrp_StackOfGeneralExpression.hxx | 4 +- .../ExprIntrp_StackOfGeneralFunction.hxx | 4 +- .../ExprIntrp_StackOfGeneralRelation.hxx | 4 +- opencascade/ExprIntrp_SyntaxError.hxx | 5 +- opencascade/ExprIntrp_yaccintrf.hxx | 25 +- opencascade/Expr_Absolute.hxx | 46 +- opencascade/Expr_ArcCosine.hxx | 46 +- opencascade/Expr_ArcSine.hxx | 46 +- opencascade/Expr_ArcTangent.hxx | 46 +- opencascade/Expr_ArgCosh.hxx | 46 +- opencascade/Expr_ArgSinh.hxx | 46 +- opencascade/Expr_ArgTanh.hxx | 46 +- .../Expr_Array1OfGeneralExpression.hxx | 1 - opencascade/Expr_Array1OfNamedUnknown.hxx | 1 - opencascade/Expr_Array1OfSingleRelation.hxx | 1 - opencascade/Expr_BinaryExpression.hxx | 60 +- opencascade/Expr_BinaryExpression.lxx | 5 +- opencascade/Expr_BinaryFunction.hxx | 51 +- opencascade/Expr_Cosh.hxx | 46 +- opencascade/Expr_Cosine.hxx | 46 +- opencascade/Expr_Difference.hxx | 55 +- opencascade/Expr_Different.hxx | 36 +- opencascade/Expr_Division.hxx | 49 +- opencascade/Expr_Equal.hxx | 36 +- opencascade/Expr_Exponential.hxx | 46 +- opencascade/Expr_Exponentiate.hxx | 49 +- opencascade/Expr_ExprFailure.hxx | 5 +- opencascade/Expr_FunctionDerivative.hxx | 82 +- opencascade/Expr_GeneralExpression.hxx | 74 +- opencascade/Expr_GeneralFunction.hxx | 57 +- opencascade/Expr_GeneralRelation.hxx | 51 +- opencascade/Expr_GreaterThan.hxx | 36 +- opencascade/Expr_GreaterThanOrEqual.hxx | 36 +- opencascade/Expr_InvalidAssignment.hxx | 5 +- opencascade/Expr_InvalidFunction.hxx | 5 +- opencascade/Expr_InvalidOperand.hxx | 5 +- opencascade/Expr_LessThan.hxx | 36 +- opencascade/Expr_LessThanOrEqual.hxx | 36 +- opencascade/Expr_LogOf10.hxx | 46 +- opencascade/Expr_LogOfe.hxx | 46 +- opencascade/Expr_MapOfNamedUnknown.hxx | 1 - opencascade/Expr_NamedConstant.hxx | 71 +- opencascade/Expr_NamedConstant.lxx | 4 +- opencascade/Expr_NamedExpression.hxx | 35 +- opencascade/Expr_NamedFunction.hxx | 81 +- opencascade/Expr_NamedUnknown.hxx | 72 +- opencascade/Expr_NamedUnknown.lxx | 4 +- opencascade/Expr_NotAssigned.hxx | 5 +- opencascade/Expr_NotEvaluable.hxx | 5 +- opencascade/Expr_NumericValue.hxx | 78 +- opencascade/Expr_Operators.hxx | 37 +- opencascade/Expr_PolyExpression.hxx | 60 +- opencascade/Expr_PolyExpression.lxx | 4 +- opencascade/Expr_PolyFunction.hxx | 50 +- opencascade/Expr_Product.hxx | 51 +- opencascade/Expr_RUIterator.hxx | 32 +- opencascade/Expr_RelationIterator.hxx | 32 +- .../Expr_SequenceOfGeneralExpression.hxx | 1 - .../Expr_SequenceOfGeneralRelation.hxx | 1 - opencascade/Expr_Sign.hxx | 46 +- opencascade/Expr_Sine.hxx | 46 +- opencascade/Expr_SingleRelation.hxx | 54 +- opencascade/Expr_Sinh.hxx | 46 +- opencascade/Expr_Square.hxx | 46 +- opencascade/Expr_SquareRoot.hxx | 46 +- opencascade/Expr_Sum.hxx | 57 +- opencascade/Expr_SystemRelation.hxx | 62 +- opencascade/Expr_Tangent.hxx | 46 +- opencascade/Expr_Tanh.hxx | 46 +- opencascade/Expr_UnaryExpression.hxx | 51 +- opencascade/Expr_UnaryExpression.lxx | 3 +- opencascade/Expr_UnaryFunction.hxx | 50 +- opencascade/Expr_UnaryMinus.hxx | 52 +- opencascade/Expr_UnknownIterator.hxx | 34 +- opencascade/Express.hxx | 10 +- opencascade/Express_Alias.hxx | 7 +- opencascade/Express_Boolean.hxx | 3 - opencascade/Express_ComplexType.hxx | 18 +- .../Express_DataMapOfAsciiStringItem.hxx | 3 +- opencascade/Express_Entity.hxx | 51 +- opencascade/Express_Enum.hxx | 7 +- opencascade/Express_Field.hxx | 20 +- opencascade/Express_Integer.hxx | 3 - opencascade/Express_Item.hxx | 47 +- opencascade/Express_Logical.hxx | 3 - opencascade/Express_NamedType.hxx | 16 +- opencascade/Express_PredefinedType.hxx | 3 - opencascade/Express_Real.hxx | 3 - opencascade/Express_Reference.hxx | 20 +- opencascade/Express_Schema.hxx | 28 +- opencascade/Express_Select.hxx | 13 +- opencascade/Express_String.hxx | 3 - opencascade/Express_Type.hxx | 6 +- opencascade/Extrema_Array1OfPOnCurv.hxx | 1 - opencascade/Extrema_Array1OfPOnCurv2d.hxx | 1 - opencascade/Extrema_Array1OfPOnSurf.hxx | 1 - opencascade/Extrema_Array2OfPOnCurv.hxx | 1 - opencascade/Extrema_Array2OfPOnCurv2d.hxx | 1 - opencascade/Extrema_Array2OfPOnSurf.hxx | 1 - opencascade/Extrema_Array2OfPOnSurfParams.hxx | 1 - opencascade/Extrema_CCLocFOfLocECC.hxx | 129 +- opencascade/Extrema_CCLocFOfLocECC2d.hxx | 129 +- opencascade/Extrema_Curve2dTool.hxx | 121 +- opencascade/Extrema_Curve2dTool.lxx | 199 +- opencascade/Extrema_CurveLocator.gxx | 99 - opencascade/Extrema_CurveTool.hxx | 109 +- opencascade/Extrema_CurveTool.lxx | 164 +- opencascade/Extrema_ECC.hxx | 81 +- opencascade/Extrema_ECC2d.hxx | 81 +- opencascade/Extrema_ELPCOfLocateExtPC.hxx | 116 +- opencascade/Extrema_ELPCOfLocateExtPC2d.hxx | 116 +- .../Extrema_EPCOfELPCOfLocateExtPC.hxx | 103 +- .../Extrema_EPCOfELPCOfLocateExtPC2d.hxx | 103 +- opencascade/Extrema_EPCOfExtPC.hxx | 103 +- opencascade/Extrema_EPCOfExtPC2d.hxx | 103 +- opencascade/Extrema_ElementType.hxx | 9 +- opencascade/Extrema_ExtAlgo.hxx | 5 +- opencascade/Extrema_ExtCC.hxx | 183 +- opencascade/Extrema_ExtCC2d.hxx | 140 +- opencascade/Extrema_ExtCS.hxx | 105 +- opencascade/Extrema_ExtElC.hxx | 58 +- opencascade/Extrema_ExtElC2d.hxx | 74 +- opencascade/Extrema_ExtElCS.hxx | 114 +- opencascade/Extrema_ExtElSS.hxx | 84 +- opencascade/Extrema_ExtFlag.hxx | 7 +- opencascade/Extrema_ExtPC.hxx | 114 +- opencascade/Extrema_ExtPC2d.hxx | 116 +- opencascade/Extrema_ExtPElC.hxx | 124 +- opencascade/Extrema_ExtPElC2d.hxx | 128 +- opencascade/Extrema_ExtPElS.hxx | 70 +- opencascade/Extrema_ExtPExtS.hxx | 104 +- opencascade/Extrema_ExtPRevS.hxx | 85 +- opencascade/Extrema_ExtPS.hxx | 123 +- opencascade/Extrema_ExtSS.hxx | 97 +- opencascade/Extrema_FuncExtCC.gxx | 723 - opencascade/Extrema_FuncExtCC.lxx | 25 +- opencascade/Extrema_FuncExtCS.hxx | 85 +- opencascade/Extrema_FuncExtPC.gxx | 426 - opencascade/Extrema_FuncExtSS.hxx | 70 +- opencascade/Extrema_FuncPSDist.hxx | 23 +- opencascade/Extrema_FuncPSNorm.hxx | 64 +- opencascade/Extrema_GExtPC.gxx | 693 - opencascade/Extrema_GLocateExtPC.gxx | 403 - opencascade/Extrema_GenExtCC.gxx | 731 - opencascade/Extrema_GenExtCS.hxx | 136 +- opencascade/Extrema_GenExtPC.gxx | 255 - opencascade/Extrema_GenExtPS.hxx | 126 +- opencascade/Extrema_GenExtSS.hxx | 113 +- opencascade/Extrema_GenLocateExtCC.gxx | 120 - opencascade/Extrema_GenLocateExtCS.hxx | 58 +- opencascade/Extrema_GenLocateExtPC.gxx | 181 - opencascade/Extrema_GenLocateExtPS.hxx | 39 +- opencascade/Extrema_GenLocateExtSS.hxx | 60 +- opencascade/Extrema_GlobOptFuncCC.hxx | 72 +- opencascade/Extrema_GlobOptFuncCQuadric.hxx | 60 +- opencascade/Extrema_GlobOptFuncCS.hxx | 55 +- opencascade/Extrema_GlobOptFuncConicS.hxx | 61 +- opencascade/Extrema_HArray1OfPOnCurv.hxx | 1 - opencascade/Extrema_HArray1OfPOnCurv2d.hxx | 1 - opencascade/Extrema_HArray1OfPOnSurf.hxx | 1 - opencascade/Extrema_HArray2OfPOnCurv.hxx | 1 - opencascade/Extrema_HArray2OfPOnCurv2d.hxx | 1 - opencascade/Extrema_HArray2OfPOnSurf.hxx | 1 - opencascade/Extrema_HUBTreeOfSphere.hxx | 6 +- opencascade/Extrema_LocECC.hxx | 44 +- opencascade/Extrema_LocECC2d.hxx | 42 +- opencascade/Extrema_LocEPCOfLocateExtPC.hxx | 66 +- opencascade/Extrema_LocEPCOfLocateExtPC2d.hxx | 66 +- opencascade/Extrema_LocateExtCC.hxx | 43 +- opencascade/Extrema_LocateExtCC2d.hxx | 41 +- opencascade/Extrema_LocateExtPC.hxx | 82 +- opencascade/Extrema_LocateExtPC2d.hxx | 82 +- .../Extrema_PCFOfEPCOfELPCOfLocateExtPC.hxx | 97 +- .../Extrema_PCFOfEPCOfELPCOfLocateExtPC2d.hxx | 102 +- opencascade/Extrema_PCFOfEPCOfExtPC.hxx | 97 +- opencascade/Extrema_PCFOfEPCOfExtPC2d.hxx | 99 +- .../Extrema_PCLocFOfLocEPCOfLocateExtPC.hxx | 97 +- .../Extrema_PCLocFOfLocEPCOfLocateExtPC2d.hxx | 102 +- opencascade/Extrema_POnCurv.hxx | 38 +- opencascade/Extrema_POnCurv2d.hxx | 38 +- opencascade/Extrema_POnSurf.hxx | 43 +- opencascade/Extrema_POnSurf.lxx | 34 +- opencascade/Extrema_POnSurfParams.hxx | 59 +- opencascade/Extrema_POnSurfParams.lxx | 43 +- opencascade/Extrema_Point.gxx | 30 - opencascade/Extrema_Point.lxx | 11 +- opencascade/Extrema_SequenceOfPOnCurv.hxx | 1 - opencascade/Extrema_SequenceOfPOnCurv2d.hxx | 1 - opencascade/Extrema_SequenceOfPOnSurf.hxx | 1 - opencascade/FEmTool_Assembly.hxx | 78 +- opencascade/FEmTool_AssemblyTable.hxx | 1 - opencascade/FEmTool_Curve.hxx | 109 +- opencascade/FEmTool_ElementaryCriterion.hxx | 45 +- opencascade/FEmTool_ElementsOfRefMatrix.hxx | 39 +- opencascade/FEmTool_HAssemblyTable.hxx | 1 - opencascade/FEmTool_LinearFlexion.hxx | 39 +- opencascade/FEmTool_LinearJerk.hxx | 39 +- opencascade/FEmTool_LinearTension.hxx | 39 +- .../FEmTool_ListIteratorOfListOfVectors.hxx | 1 - opencascade/FEmTool_ListOfVectors.hxx | 4 +- opencascade/FEmTool_ProfileMatrix.hxx | 71 +- opencascade/FEmTool_SparseMatrix.hxx | 52 +- opencascade/FSD_Base64.hxx | 29 +- opencascade/FSD_BinaryFile.hxx | 453 +- opencascade/FSD_CmpFile.hxx | 24 +- opencascade/FSD_File.hxx | 315 +- opencascade/FSD_FileHeader.hxx | 5 +- opencascade/FairCurve_AnalysisCode.hxx | 9 +- opencascade/FairCurve_Batten.hxx | 198 +- opencascade/FairCurve_Batten.lxx | 28 +- opencascade/FairCurve_BattenLaw.hxx | 43 +- opencascade/FairCurve_BattenLaw.lxx | 11 +- .../FairCurve_DistributionOfEnergy.hxx | 43 +- opencascade/FairCurve_DistributionOfJerk.hxx | 36 +- .../FairCurve_DistributionOfSagging.hxx | 36 +- .../FairCurve_DistributionOfTension.hxx | 45 +- .../FairCurve_DistributionOfTension.lxx | 1 - opencascade/FairCurve_Energy.hxx | 119 +- opencascade/FairCurve_Energy.lxx | 10 +- opencascade/FairCurve_EnergyOfBatten.hxx | 62 +- opencascade/FairCurve_EnergyOfBatten.lxx | 4 +- opencascade/FairCurve_EnergyOfMVC.hxx | 71 +- opencascade/FairCurve_EnergyOfMVC.lxx | 5 +- opencascade/FairCurve_MinimalVariation.hxx | 74 +- opencascade/FairCurve_MinimalVariation.lxx | 18 +- opencascade/FairCurve_Newton.hxx | 33 +- opencascade/FilletSurf_Builder.hxx | 97 +- opencascade/FilletSurf_ErrorTypeStatus.hxx | 13 +- opencascade/FilletSurf_InternalBuilder.hxx | 207 +- opencascade/FilletSurf_StatusDone.hxx | 7 +- opencascade/FilletSurf_StatusType.hxx | 7 +- opencascade/FlexLexer.h | 241 +- opencascade/Font_FTFont.hxx | 250 +- opencascade/Font_FTLibrary.hxx | 23 +- opencascade/Font_FontAspect.hxx | 8 +- opencascade/Font_FontMgr.hxx | 181 +- opencascade/Font_Hinting.hxx | 11 +- opencascade/Font_NListOfSystemFont.hxx | 6 +- opencascade/Font_NameOfFont.hxx | 46 +- opencascade/Font_Rect.hxx | 35 +- opencascade/Font_StrictLevel.hxx | 3 +- opencascade/Font_SystemFont.hxx | 81 +- opencascade/Font_TextFormatter.hxx | 188 +- opencascade/Font_UnicodeSubset.hxx | 5 +- opencascade/GCE2d_MakeArcOfCircle.hxx | 32 +- opencascade/GCE2d_MakeArcOfEllipse.hxx | 28 +- opencascade/GCE2d_MakeArcOfHyperbola.hxx | 28 +- opencascade/GCE2d_MakeArcOfParabola.hxx | 28 +- opencascade/GCE2d_MakeCircle.hxx | 33 +- opencascade/GCE2d_MakeEllipse.hxx | 23 +- opencascade/GCE2d_MakeHyperbola.hxx | 27 +- opencascade/GCE2d_MakeLine.hxx | 18 +- opencascade/GCE2d_MakeMirror.hxx | 33 +- opencascade/GCE2d_MakeParabola.hxx | 25 +- opencascade/GCE2d_MakeRotation.hxx | 27 +- opencascade/GCE2d_MakeScale.hxx | 27 +- opencascade/GCE2d_MakeSegment.hxx | 25 +- opencascade/GCE2d_MakeTranslation.hxx | 29 +- opencascade/GCE2d_Root.hxx | 27 +- opencascade/GCE2d_Root.lxx | 16 +- opencascade/GCPnts_AbscissaPoint.hxx | 148 +- opencascade/GCPnts_AbscissaType.hxx | 7 +- opencascade/GCPnts_DeflectionType.hxx | 9 +- opencascade/GCPnts_DistFunction.hxx | 29 +- opencascade/GCPnts_DistFunction2d.hxx | 33 +- opencascade/GCPnts_QuasiUniformAbscissa.hxx | 123 +- opencascade/GCPnts_QuasiUniformDeflection.hxx | 112 +- opencascade/GCPnts_TCurveTypes.hxx | 11 +- opencascade/GCPnts_TangentialDeflection.hxx | 309 +- opencascade/GCPnts_UniformAbscissa.hxx | 308 +- opencascade/GCPnts_UniformDeflection.hxx | 147 +- opencascade/GC_MakeArcOfCircle.hxx | 32 +- opencascade/GC_MakeArcOfEllipse.hxx | 28 +- opencascade/GC_MakeArcOfHyperbola.hxx | 29 +- opencascade/GC_MakeArcOfParabola.hxx | 28 +- opencascade/GC_MakeCircle.hxx | 29 +- opencascade/GC_MakeConicalSurface.hxx | 30 +- opencascade/GC_MakeCylindricalSurface.hxx | 21 +- opencascade/GC_MakeEllipse.hxx | 18 +- opencascade/GC_MakeHyperbola.hxx | 18 +- opencascade/GC_MakeLine.hxx | 16 +- opencascade/GC_MakeMirror.hxx | 37 +- opencascade/GC_MakePlane.hxx | 23 +- opencascade/GC_MakeRotation.hxx | 35 +- opencascade/GC_MakeScale.hxx | 27 +- opencascade/GC_MakeSegment.hxx | 23 +- opencascade/GC_MakeTranslation.hxx | 29 +- opencascade/GC_MakeTrimmedCone.hxx | 21 +- opencascade/GC_MakeTrimmedCylinder.hxx | 17 +- opencascade/GC_Root.hxx | 26 +- opencascade/GC_Root.lxx | 16 +- opencascade/GProp.hxx | 12 +- opencascade/GProp_CelGProps.hxx | 45 +- opencascade/GProp_EquaType.hxx | 11 +- opencascade/GProp_GProps.hxx | 53 +- opencascade/GProp_PEquation.hxx | 50 +- opencascade/GProp_PGProps.hxx | 59 +- opencascade/GProp_PrincipalProps.hxx | 104 +- opencascade/GProp_SelGProps.hxx | 95 +- opencascade/GProp_UndefinedAxis.hxx | 5 +- opencascade/GProp_ValueType.hxx | 24 +- opencascade/GProp_VelGProps.hxx | 95 +- opencascade/GccAna_Circ2d2TanOn.hxx | 172 +- opencascade/GccAna_Circ2d2TanRad.hxx | 118 +- opencascade/GccAna_Circ2d3Tan.hxx | 164 +- opencascade/GccAna_Circ2dBisec.hxx | 36 +- opencascade/GccAna_Circ2dTanCen.hxx | 67 +- opencascade/GccAna_Circ2dTanOnRad.hxx | 109 +- opencascade/GccAna_CircLin2dBisec.hxx | 35 +- opencascade/GccAna_CircPnt2dBisec.hxx | 44 +- opencascade/GccAna_Lin2d2Tan.hxx | 86 +- opencascade/GccAna_Lin2dBisec.hxx | 50 +- opencascade/GccAna_Lin2dTanObl.hxx | 78 +- opencascade/GccAna_Lin2dTanPar.hxx | 57 +- opencascade/GccAna_Lin2dTanPer.hxx | 80 +- opencascade/GccAna_LinPnt2dBisec.hxx | 30 +- opencascade/GccAna_NoSolution.hxx | 5 +- opencascade/GccAna_Pnt2dBisec.hxx | 32 +- opencascade/GccEnt.hxx | 47 +- opencascade/GccEnt_Array1OfPosition.hxx | 1 - opencascade/GccEnt_BadQualifier.hxx | 5 +- opencascade/GccEnt_Position.hxx | 11 +- opencascade/GccEnt_QualifiedCirc.hxx | 38 +- opencascade/GccEnt_QualifiedLin.hxx | 36 +- opencascade/GccInt_BCirc.hxx | 26 +- opencascade/GccInt_BElips.hxx | 27 +- opencascade/GccInt_BHyper.hxx | 27 +- opencascade/GccInt_BLine.hxx | 26 +- opencascade/GccInt_BParab.hxx | 26 +- opencascade/GccInt_BPoint.hxx | 26 +- opencascade/GccInt_Bisec.hxx | 34 +- opencascade/GccInt_IType.hxx | 13 +- opencascade/Geom2dAPI_ExtremaCurveCurve.hxx | 68 +- opencascade/Geom2dAPI_ExtremaCurveCurve.lxx | 5 +- opencascade/Geom2dAPI_InterCurveCurve.hxx | 65 +- opencascade/Geom2dAPI_InterCurveCurve.lxx | 4 +- opencascade/Geom2dAPI_Interpolate.hxx | 82 +- opencascade/Geom2dAPI_PointsToBSpline.hxx | 124 +- opencascade/Geom2dAPI_ProjectPointOnCurve.hxx | 77 +- opencascade/Geom2dAPI_ProjectPointOnCurve.lxx | 4 +- opencascade/Geom2dAdaptor.hxx | 7 +- opencascade/Geom2dAdaptor_Curve.hxx | 143 +- opencascade/Geom2dConvert.hxx | 106 +- .../Geom2dConvert_ApproxArcsSegments.hxx | 96 +- opencascade/Geom2dConvert_ApproxCurve.hxx | 63 +- ...eom2dConvert_BSplineCurveKnotSplitting.hxx | 38 +- ...eom2dConvert_BSplineCurveToBezierCurve.hxx | 48 +- .../Geom2dConvert_CompCurveToBSplineCurve.hxx | 53 +- opencascade/Geom2dConvert_PPoint.hxx | 85 +- .../Geom2dConvert_SequenceOfPPoint.hxx | 26 +- opencascade/Geom2dEvaluator.hxx | 63 +- opencascade/Geom2dEvaluator_Curve.hxx | 21 +- opencascade/Geom2dEvaluator_OffsetCurve.hxx | 65 +- opencascade/Geom2dGcc.hxx | 20 +- opencascade/Geom2dGcc_Circ2d2TanOn.hxx | 122 +- opencascade/Geom2dGcc_Circ2d2TanOnGeo.hxx | 128 +- opencascade/Geom2dGcc_Circ2d2TanOnIter.hxx | 189 +- opencascade/Geom2dGcc_Circ2d2TanRad.hxx | 107 +- opencascade/Geom2dGcc_Circ2d2TanRadGeo.hxx | 104 +- opencascade/Geom2dGcc_Circ2d3Tan.hxx | 135 +- opencascade/Geom2dGcc_Circ2d3TanIter.hxx | 177 +- opencascade/Geom2dGcc_Circ2dTanCen.hxx | 63 +- opencascade/Geom2dGcc_Circ2dTanCenGeo.hxx | 59 +- opencascade/Geom2dGcc_Circ2dTanOnRad.hxx | 89 +- opencascade/Geom2dGcc_Circ2dTanOnRadGeo.hxx | 109 +- opencascade/Geom2dGcc_CurveTool.hxx | 55 +- opencascade/Geom2dGcc_FunctionTanCirCu.hxx | 45 +- opencascade/Geom2dGcc_FunctionTanCuCu.hxx | 62 +- opencascade/Geom2dGcc_FunctionTanCuCuCu.hxx | 115 +- opencascade/Geom2dGcc_FunctionTanCuCuOnCu.hxx | 149 +- opencascade/Geom2dGcc_FunctionTanCuPnt.hxx | 40 +- opencascade/Geom2dGcc_FunctionTanObl.hxx | 40 +- opencascade/Geom2dGcc_IsParallel.hxx | 5 +- opencascade/Geom2dGcc_Lin2d2Tan.hxx | 103 +- opencascade/Geom2dGcc_Lin2d2TanIter.hxx | 80 +- opencascade/Geom2dGcc_Lin2dTanObl.hxx | 92 +- opencascade/Geom2dGcc_Lin2dTanOblIter.hxx | 64 +- opencascade/Geom2dGcc_QCurve.hxx | 41 +- opencascade/Geom2dGcc_QualifiedCurve.hxx | 41 +- opencascade/Geom2dGcc_Type1.hxx | 13 +- opencascade/Geom2dGcc_Type2.hxx | 25 +- opencascade/Geom2dGcc_Type3.hxx | 5 +- opencascade/Geom2dHatch_Classifier.hxx | 59 +- ...Geom2dHatch_DataMapIteratorOfHatchings.hxx | 1 - ...2dHatch_DataMapIteratorOfMapOfElements.hxx | 1 - opencascade/Geom2dHatch_Element.hxx | 40 +- opencascade/Geom2dHatch_Elements.hxx | 99 +- .../Geom2dHatch_FClass2dOfClassifier.hxx | 70 +- opencascade/Geom2dHatch_Hatcher.hxx | 197 +- opencascade/Geom2dHatch_Hatcher.lxx | 145 +- opencascade/Geom2dHatch_Hatching.hxx | 104 +- opencascade/Geom2dHatch_Hatchings.hxx | 6 +- opencascade/Geom2dHatch_Intersector.hxx | 63 +- opencascade/Geom2dHatch_Intersector.lxx | 41 +- opencascade/Geom2dHatch_MapOfElements.hxx | 6 +- ...ctionPointOfTheIntPCurvePCurveOfGInter.hxx | 72 +- opencascade/Geom2dInt_GInter.hxx | 220 +- opencascade/Geom2dInt_Geom2dCurveTool.hxx | 114 +- opencascade/Geom2dInt_Geom2dCurveTool.lxx | 172 +- .../Geom2dInt_IntConicCurveOfGInter.hxx | 175 +- ...eIntersectorOfTheIntConicCurveOfGInter.hxx | 48 +- ...FOfTheLocateExtPCOfTheProjPCurOfGInter.hxx | 102 +- ...t_TheCurveLocatorOfTheProjPCurOfGInter.hxx | 48 +- ...eenPCurvesOfTheIntPCurvePCurveOfGInter.hxx | 46 +- .../Geom2dInt_TheIntConicCurveOfGInter.hxx | 134 +- .../Geom2dInt_TheIntPCurvePCurveOfGInter.hxx | 71 +- ...eIntersectorOfTheIntConicCurveOfGInter.hxx | 75 +- ...nt_TheLocateExtPCOfTheProjPCurOfGInter.hxx | 66 +- ...ePolygon2dOfTheIntPCurvePCurveOfGInter.hxx | 97 +- opencascade/Geom2dInt_TheProjPCurOfGInter.hxx | 37 +- opencascade/Geom2dLProp_CLProps2d.hxx | 90 +- opencascade/Geom2dLProp_CurAndInf2d.hxx | 38 +- opencascade/Geom2dLProp_Curve2dTool.hxx | 65 +- opencascade/Geom2dLProp_FuncCurExt.hxx | 44 +- opencascade/Geom2dLProp_FuncCurNul.hxx | 38 +- opencascade/Geom2dLProp_NumericCurInf2d.hxx | 48 +- opencascade/Geom2dToIGES_Geom2dCurve.hxx | 32 +- opencascade/Geom2dToIGES_Geom2dEntity.hxx | 40 +- opencascade/Geom2dToIGES_Geom2dPoint.hxx | 35 +- opencascade/Geom2dToIGES_Geom2dVector.hxx | 36 +- opencascade/Geom2d_AxisPlacement.hxx | 52 +- opencascade/Geom2d_BSplineCurve.hxx | 344 +- opencascade/Geom2d_BezierCurve.hxx | 156 +- opencascade/Geom2d_BoundedCurve.hxx | 27 +- opencascade/Geom2d_CartesianPoint.hxx | 58 +- opencascade/Geom2d_Circle.hxx | 88 +- opencascade/Geom2d_Conic.hxx | 36 +- opencascade/Geom2d_Curve.hxx | 83 +- opencascade/Geom2d_Direction.hxx | 62 +- opencascade/Geom2d_Ellipse.hxx | 109 +- opencascade/Geom2d_Geometry.hxx | 79 +- opencascade/Geom2d_Hyperbola.hxx | 112 +- opencascade/Geom2d_Line.hxx | 114 +- opencascade/Geom2d_OffsetCurve.hxx | 113 +- opencascade/Geom2d_Parabola.hxx | 104 +- opencascade/Geom2d_Point.hxx | 41 +- opencascade/Geom2d_Transformation.hxx | 106 +- opencascade/Geom2d_TrimmedCurve.hxx | 108 +- opencascade/Geom2d_UndefinedDerivative.hxx | 5 +- opencascade/Geom2d_UndefinedValue.hxx | 5 +- opencascade/Geom2d_Vector.hxx | 49 +- opencascade/Geom2d_VectorWithMagnitude.hxx | 150 +- opencascade/GeomAPI.hxx | 12 +- opencascade/GeomAPI_ExtremaCurveCurve.hxx | 107 +- opencascade/GeomAPI_ExtremaCurveCurve.lxx | 5 +- opencascade/GeomAPI_ExtremaCurveSurface.hxx | 87 +- opencascade/GeomAPI_ExtremaCurveSurface.lxx | 4 +- opencascade/GeomAPI_ExtremaSurfaceSurface.hxx | 93 +- opencascade/GeomAPI_ExtremaSurfaceSurface.lxx | 4 +- opencascade/GeomAPI_IntCS.hxx | 61 +- opencascade/GeomAPI_IntSS.hxx | 49 +- opencascade/GeomAPI_IntSS.lxx | 55 +- opencascade/GeomAPI_Interpolate.hxx | 75 +- opencascade/GeomAPI_PointsToBSpline.hxx | 104 +- .../GeomAPI_PointsToBSplineSurface.hxx | 174 +- opencascade/GeomAPI_ProjectPointOnCurve.hxx | 83 +- opencascade/GeomAPI_ProjectPointOnCurve.lxx | 4 +- opencascade/GeomAPI_ProjectPointOnSurf.hxx | 157 +- opencascade/GeomAPI_ProjectPointOnSurf.lxx | 4 +- opencascade/GeomAbs_BSplKnotDistribution.hxx | 9 +- opencascade/GeomAbs_CurveType.hxx | 19 +- opencascade/GeomAbs_IsoType.hxx | 6 +- opencascade/GeomAbs_JoinType.hxx | 6 +- opencascade/GeomAbs_Shape.hxx | 15 +- opencascade/GeomAbs_SurfaceType.hxx | 23 +- opencascade/GeomAdaptor.hxx | 14 +- opencascade/GeomAdaptor_Curve.hxx | 153 +- opencascade/GeomAdaptor_Surface.hxx | 267 +- .../GeomAdaptor_SurfaceOfLinearExtrusion.hxx | 110 +- .../GeomAdaptor_SurfaceOfRevolution.hxx | 112 +- opencascade/GeomConvert.hxx | 171 +- opencascade/GeomConvert_ApproxCurve.hxx | 63 +- opencascade/GeomConvert_ApproxSurface.hxx | 72 +- .../GeomConvert_BSplineCurveKnotSplitting.hxx | 37 +- .../GeomConvert_BSplineCurveToBezierCurve.hxx | 47 +- ...eomConvert_BSplineSurfaceKnotSplitting.hxx | 46 +- ...mConvert_BSplineSurfaceToBezierSurface.hxx | 57 +- ...ert_CompBezierSurfacesToBSplineSurface.hxx | 104 +- ...ert_CompBezierSurfacesToBSplineSurface.lxx | 59 +- .../GeomConvert_CompCurveToBSplineCurve.hxx | 57 +- opencascade/GeomConvert_ConvType.hxx | 1 + opencascade/GeomConvert_CurveToAnaCurve.hxx | 166 +- opencascade/GeomConvert_FuncConeLSDist.hxx | 26 +- .../GeomConvert_FuncCylinderLSDist.hxx | 46 +- opencascade/GeomConvert_FuncSphereLSDist.hxx | 28 +- opencascade/GeomConvert_SurfToAnaSurf.hxx | 166 +- opencascade/GeomConvert_Units.hxx | 16 +- opencascade/GeomEvaluator_Curve.hxx | 21 +- opencascade/GeomEvaluator_OffsetCurve.hxx | 95 +- opencascade/GeomEvaluator_OffsetSurface.hxx | 173 +- opencascade/GeomEvaluator_Surface.hxx | 48 +- .../GeomEvaluator_SurfaceOfExtrusion.hxx | 56 +- .../GeomEvaluator_SurfaceOfRevolution.hxx | 68 +- opencascade/GeomFill.hxx | 109 +- opencascade/GeomFill_AppSurf.hxx | 205 +- opencascade/GeomFill_AppSweep.hxx | 206 +- opencascade/GeomFill_ApproxStyle.hxx | 5 +- opencascade/GeomFill_Array1OfLocationLaw.hxx | 1 - opencascade/GeomFill_Array1OfSectionLaw.hxx | 1 - opencascade/GeomFill_BSplineCurves.hxx | 69 +- opencascade/GeomFill_BSplineCurves.lxx | 7 +- opencascade/GeomFill_BezierCurves.hxx | 69 +- opencascade/GeomFill_BezierCurves.lxx | 11 +- opencascade/GeomFill_BoundWithSurf.hxx | 57 +- opencascade/GeomFill_Boundary.hxx | 64 +- opencascade/GeomFill_CircularBlendFunc.hxx | 153 +- opencascade/GeomFill_ConstantBiNormal.hxx | 81 +- opencascade/GeomFill_ConstrainedFilling.hxx | 145 +- opencascade/GeomFill_Coons.hxx | 59 +- opencascade/GeomFill_CoonsAlgPatch.hxx | 61 +- opencascade/GeomFill_CornerState.hxx | 56 +- opencascade/GeomFill_CorrectedFrenet.hxx | 134 +- opencascade/GeomFill_CurveAndTrihedron.hxx | 129 +- opencascade/GeomFill_Curved.hxx | 69 +- opencascade/GeomFill_Darboux.hxx | 74 +- opencascade/GeomFill_DegeneratedBound.hxx | 48 +- opencascade/GeomFill_DiscreteTrihedron.hxx | 87 +- opencascade/GeomFill_DraftTrihedron.hxx | 81 +- opencascade/GeomFill_EvolvedSection.hxx | 130 +- opencascade/GeomFill_Filling.hxx | 37 +- opencascade/GeomFill_FillingStyle.hxx | 6 +- opencascade/GeomFill_Fixed.hxx | 72 +- opencascade/GeomFill_Frenet.hxx | 140 +- opencascade/GeomFill_FunctionDraft.hxx | 78 +- opencascade/GeomFill_FunctionGuide.hxx | 96 +- opencascade/GeomFill_Generator.hxx | 29 +- opencascade/GeomFill_GuideTrihedronAC.hxx | 103 +- opencascade/GeomFill_GuideTrihedronPlan.hxx | 113 +- opencascade/GeomFill_HArray1OfLocationLaw.hxx | 1 - opencascade/GeomFill_HArray1OfSectionLaw.hxx | 1 - opencascade/GeomFill_HSequenceOfAx2.hxx | 1 - opencascade/GeomFill_Line.hxx | 27 +- opencascade/GeomFill_Line.lxx | 12 +- opencascade/GeomFill_LocFunction.hxx | 62 +- opencascade/GeomFill_LocationDraft.hxx | 159 +- opencascade/GeomFill_LocationGuide.hxx | 201 +- opencascade/GeomFill_LocationLaw.hxx | 120 +- opencascade/GeomFill_NSections.hxx | 179 +- opencascade/GeomFill_Pipe.hxx | 185 +- opencascade/GeomFill_Pipe.lxx | 29 +- opencascade/GeomFill_PipeError.hxx | 9 +- opencascade/GeomFill_PlanFunc.hxx | 78 +- opencascade/GeomFill_PolynomialConvertor.hxx | 67 +- opencascade/GeomFill_Profiler.hxx | 59 +- opencascade/GeomFill_Profiler.lxx | 14 +- .../GeomFill_QuasiAngularConvertor.hxx | 85 +- opencascade/GeomFill_SectionGenerator.hxx | 63 +- opencascade/GeomFill_SectionLaw.hxx | 121 +- opencascade/GeomFill_SectionPlacement.hxx | 97 +- opencascade/GeomFill_SequenceOfAx2.hxx | 1 - opencascade/GeomFill_SequenceOfTrsf.hxx | 1 - opencascade/GeomFill_SimpleBound.hxx | 47 +- opencascade/GeomFill_SnglrFunc.hxx | 82 +- opencascade/GeomFill_Stretch.hxx | 59 +- opencascade/GeomFill_Sweep.hxx | 135 +- opencascade/GeomFill_SweepFunction.hxx | 121 +- .../GeomFill_SweepSectionGenerator.hxx | 143 +- .../GeomFill_SweepSectionGenerator.lxx | 6 +- opencascade/GeomFill_Tensor.hxx | 73 +- opencascade/GeomFill_Tensor.lxx | 16 +- opencascade/GeomFill_TgtField.hxx | 38 +- opencascade/GeomFill_TgtOnCoons.hxx | 37 +- opencascade/GeomFill_Trihedron.hxx | 21 +- opencascade/GeomFill_TrihedronLaw.hxx | 82 +- opencascade/GeomFill_TrihedronWithGuide.hxx | 30 +- opencascade/GeomFill_UniformSection.hxx | 127 +- opencascade/GeomInt.hxx | 14 +- ...BSplGradientOfTheComputeLineOfWLApprox.hxx | 36 +- ...BSplGradientOfTheComputeLineOfWLApprox.hxx | 137 +- ...BSplGradientOfTheComputeLineOfWLApprox.hxx | 242 +- ...adientOfTheComputeLineBezierOfWLApprox.hxx | 36 +- ...yGradientbisOfTheComputeLineOfWLApprox.hxx | 36 +- opencascade/GeomInt_IntSS.hxx | 230 +- opencascade/GeomInt_IntSS.lxx | 140 +- opencascade/GeomInt_LineConstructor.hxx | 49 +- opencascade/GeomInt_LineConstructor.lxx | 60 +- opencascade/GeomInt_LineTool.hxx | 46 +- ...BSplGradientOfTheComputeLineOfWLApprox.hxx | 97 +- ...adientOfTheComputeLineBezierOfWLApprox.hxx | 60 +- ...yGradientbisOfTheComputeLineOfWLApprox.hxx | 60 +- ...adientOfTheComputeLineBezierOfWLApprox.hxx | 119 +- ...yGradientbisOfTheComputeLineOfWLApprox.hxx | 119 +- ...adientOfTheComputeLineBezierOfWLApprox.hxx | 242 +- ...yGradientbisOfTheComputeLineOfWLApprox.hxx | 242 +- .../GeomInt_ParameterAndOrientation.hxx | 43 +- ...adientOfTheComputeLineBezierOfWLApprox.hxx | 83 +- ...yGradientbisOfTheComputeLineOfWLApprox.hxx | 83 +- ...mInt_SequenceOfParameterAndOrientation.hxx | 4 +- ...GeomInt_TheComputeLineBezierOfWLApprox.hxx | 234 +- .../GeomInt_TheComputeLineOfWLApprox.hxx | 239 +- ...heInt2SOfThePrmPrmSvSurfacesOfWLApprox.hxx | 111 +- .../GeomInt_TheImpPrmSvSurfacesOfWLApprox.hxx | 117 +- ...heInt2SOfThePrmPrmSvSurfacesOfWLApprox.hxx | 119 +- .../GeomInt_TheMultiLineOfWLApprox.hxx | 171 +- .../GeomInt_TheMultiLineToolOfWLApprox.hxx | 120 +- .../GeomInt_ThePrmPrmSvSurfacesOfWLApprox.hxx | 106 +- ...ImpFuncOfTheImpPrmSvSurfacesOfWLApprox.hxx | 98 +- opencascade/GeomInt_WLApprox.hxx | 151 +- opencascade/GeomLProp.hxx | 24 +- opencascade/GeomLProp_CLProps.hxx | 90 +- opencascade/GeomLProp_CurveTool.hxx | 63 +- opencascade/GeomLProp_SLProps.hxx | 139 +- opencascade/GeomLProp_SurfaceTool.hxx | 71 +- opencascade/GeomLib.hxx | 203 +- opencascade/GeomLib_Array1OfMat.hxx | 1 - opencascade/GeomLib_Check2dBSplineCurve.hxx | 57 +- opencascade/GeomLib_Check2dBSplineCurve.lxx | 4 +- opencascade/GeomLib_CheckBSplineCurve.hxx | 57 +- opencascade/GeomLib_CheckBSplineCurve.lxx | 4 +- opencascade/GeomLib_CheckCurveOnSurface.hxx | 65 +- opencascade/GeomLib_DenominatorMultiplier.hxx | 34 +- opencascade/GeomLib_Interpolate.hxx | 41 +- opencascade/GeomLib_Interpolate.lxx | 21 +- opencascade/GeomLib_InterpolationErrors.hxx | 8 +- opencascade/GeomLib_IsPlanarSurface.hxx | 33 +- opencascade/GeomLib_LogSample.hxx | 33 +- opencascade/GeomLib_MakeCurvefromApprox.hxx | 57 +- opencascade/GeomLib_MakeCurvefromApprox.lxx | 8 +- opencascade/GeomLib_PolyFunc.hxx | 40 +- opencascade/GeomLib_Tool.hxx | 64 +- opencascade/GeomPlate_Aij.hxx | 31 +- opencascade/GeomPlate_Array1OfHCurve.hxx | 1 - .../GeomPlate_Array1OfSequenceOfReal.hxx | 1 - opencascade/GeomPlate_BuildAveragePlane.hxx | 86 +- opencascade/GeomPlate_BuildPlateSurface.hxx | 243 +- opencascade/GeomPlate_CurveConstraint.hxx | 134 +- opencascade/GeomPlate_HArray1OfHCurve.hxx | 1 - .../GeomPlate_HArray1OfSequenceOfReal.hxx | 1 - .../GeomPlate_HSequenceOfCurveConstraint.hxx | 1 - .../GeomPlate_HSequenceOfPointConstraint.hxx | 1 - opencascade/GeomPlate_MakeApprox.hxx | 56 +- opencascade/GeomPlate_PlateG0Criterion.hxx | 40 +- opencascade/GeomPlate_PlateG1Criterion.hxx | 40 +- opencascade/GeomPlate_PointConstraint.hxx | 102 +- opencascade/GeomPlate_SequenceOfAij.hxx | 1 - .../GeomPlate_SequenceOfCurveConstraint.hxx | 1 - .../GeomPlate_SequenceOfPointConstraint.hxx | 1 - opencascade/GeomPlate_Surface.hxx | 151 +- opencascade/GeomProjLib.hxx | 86 +- opencascade/GeomToIGES_GeomCurve.hxx | 80 +- opencascade/GeomToIGES_GeomEntity.hxx | 40 +- opencascade/GeomToIGES_GeomPoint.hxx | 34 +- opencascade/GeomToIGES_GeomSurface.hxx | 219 +- opencascade/GeomToIGES_GeomVector.hxx | 35 +- opencascade/GeomToStep_MakeAxis1Placement.hxx | 50 +- .../GeomToStep_MakeAxis2Placement2d.hxx | 37 +- .../GeomToStep_MakeAxis2Placement3d.hxx | 52 +- .../GeomToStep_MakeBSplineCurveWithKnots.hxx | 37 +- ...eCurveWithKnotsAndRationalBSplineCurve.hxx | 41 +- ...GeomToStep_MakeBSplineSurfaceWithKnots.hxx | 32 +- ...faceWithKnotsAndRationalBSplineSurface.hxx | 36 +- opencascade/GeomToStep_MakeBoundedCurve.hxx | 37 +- opencascade/GeomToStep_MakeBoundedSurface.hxx | 32 +- opencascade/GeomToStep_MakeCartesianPoint.hxx | 40 +- opencascade/GeomToStep_MakeCircle.hxx | 42 +- opencascade/GeomToStep_MakeConic.hxx | 37 +- opencascade/GeomToStep_MakeConicalSurface.hxx | 32 +- opencascade/GeomToStep_MakeCurve.hxx | 37 +- .../GeomToStep_MakeCylindricalSurface.hxx | 32 +- opencascade/GeomToStep_MakeDirection.hxx | 32 +- .../GeomToStep_MakeElementarySurface.hxx | 32 +- opencascade/GeomToStep_MakeEllipse.hxx | 42 +- opencascade/GeomToStep_MakeHyperbola.hxx | 36 +- opencascade/GeomToStep_MakeLine.hxx | 45 +- opencascade/GeomToStep_MakeParabola.hxx | 37 +- opencascade/GeomToStep_MakePlane.hxx | 37 +- opencascade/GeomToStep_MakePolyline.hxx | 37 +- ...omToStep_MakeRectangularTrimmedSurface.hxx | 32 +- .../GeomToStep_MakeSphericalSurface.hxx | 32 +- opencascade/GeomToStep_MakeSurface.hxx | 32 +- ...eomToStep_MakeSurfaceOfLinearExtrusion.hxx | 32 +- .../GeomToStep_MakeSurfaceOfRevolution.hxx | 32 +- opencascade/GeomToStep_MakeSweptSurface.hxx | 32 +- .../GeomToStep_MakeToroidalSurface.hxx | 32 +- opencascade/GeomToStep_MakeVector.hxx | 49 +- opencascade/GeomToStep_Root.hxx | 24 +- opencascade/GeomTools.hxx | 51 +- opencascade/GeomTools_Curve2dSet.hxx | 50 +- opencascade/GeomTools_CurveSet.hxx | 50 +- opencascade/GeomTools_SurfaceSet.hxx | 50 +- .../GeomTools_UndefinedTypeHandler.hxx | 49 +- opencascade/Geom_Axis1Placement.hxx | 39 +- opencascade/Geom_Axis2Placement.hxx | 52 +- opencascade/Geom_AxisPlacement.hxx | 37 +- opencascade/Geom_BSplineCurve.hxx | 339 +- opencascade/Geom_BSplineSurface.hxx | 572 +- opencascade/Geom_BezierCurve.hxx | 165 +- opencascade/Geom_BezierSurface.hxx | 288 +- opencascade/Geom_BoundedCurve.hxx | 27 +- opencascade/Geom_BoundedSurface.hxx | 22 +- opencascade/Geom_CartesianPoint.hxx | 69 +- opencascade/Geom_Circle.hxx | 81 +- opencascade/Geom_Conic.hxx | 37 +- opencascade/Geom_ConicalSurface.hxx | 95 +- opencascade/Geom_Curve.hxx | 84 +- opencascade/Geom_CylindricalSurface.hxx | 88 +- opencascade/Geom_Direction.hxx | 78 +- opencascade/Geom_ElementarySurface.hxx | 36 +- opencascade/Geom_Ellipse.hxx | 99 +- opencascade/Geom_Geometry.hxx | 80 +- .../Geom_HSequenceOfBSplineSurface.hxx | 1 - opencascade/Geom_Hyperbola.hxx | 103 +- opencascade/Geom_Line.hxx | 105 +- opencascade/Geom_OffsetCurve.hxx | 122 +- opencascade/Geom_OffsetSurface.hxx | 120 +- opencascade/Geom_OsculatingSurface.hxx | 83 +- opencascade/Geom_Parabola.hxx | 98 +- opencascade/Geom_Plane.hxx | 83 +- opencascade/Geom_Point.hxx | 42 +- .../Geom_RectangularTrimmedSurface.hxx | 119 +- opencascade/Geom_SequenceOfBSplineSurface.hxx | 1 - opencascade/Geom_SphericalSurface.hxx | 135 +- opencascade/Geom_Surface.hxx | 84 +- opencascade/Geom_SurfaceOfLinearExtrusion.hxx | 134 +- opencascade/Geom_SurfaceOfRevolution.hxx | 129 +- opencascade/Geom_SweptSurface.hxx | 31 +- opencascade/Geom_ToroidalSurface.hxx | 134 +- opencascade/Geom_Transformation.hxx | 64 +- opencascade/Geom_TrimmedCurve.hxx | 109 +- opencascade/Geom_UndefinedDerivative.hxx | 5 +- opencascade/Geom_UndefinedValue.hxx | 5 +- opencascade/Geom_Vector.hxx | 69 +- opencascade/Geom_VectorWithMagnitude.hxx | 113 +- opencascade/Graphic3d_AlphaMode.hxx | 18 +- opencascade/Graphic3d_ArrayFlags.hxx | 19 +- opencascade/Graphic3d_ArrayOfPoints.hxx | 33 +- opencascade/Graphic3d_ArrayOfPolygons.hxx | 54 +- opencascade/Graphic3d_ArrayOfPolylines.hxx | 52 +- opencascade/Graphic3d_ArrayOfPrimitives.hxx | 728 +- .../Graphic3d_ArrayOfQuadrangleStrips.hxx | 53 +- opencascade/Graphic3d_ArrayOfQuadrangles.hxx | 46 +- opencascade/Graphic3d_ArrayOfSegments.hxx | 35 +- opencascade/Graphic3d_ArrayOfTriangleFans.hxx | 47 +- .../Graphic3d_ArrayOfTriangleStrips.hxx | 72 +- opencascade/Graphic3d_ArrayOfTriangles.hxx | 52 +- opencascade/Graphic3d_AspectFillArea3d.hxx | 23 +- opencascade/Graphic3d_AspectLine3d.hxx | 23 +- opencascade/Graphic3d_AspectMarker3d.hxx | 35 +- opencascade/Graphic3d_AspectText3d.hxx | 54 +- opencascade/Graphic3d_Aspects.hxx | 344 +- opencascade/Graphic3d_AttribBuffer.hxx | 42 +- opencascade/Graphic3d_BSDF.hxx | 85 +- opencascade/Graphic3d_BoundBuffer.hxx | 53 +- opencascade/Graphic3d_Buffer.hxx | 167 +- opencascade/Graphic3d_BufferRange.hxx | 22 +- opencascade/Graphic3d_BufferType.hxx | 9 +- opencascade/Graphic3d_BvhCStructureSet.hxx | 29 +- .../Graphic3d_BvhCStructureSetTrsfPers.hxx | 59 +- opencascade/Graphic3d_CLight.hxx | 172 +- opencascade/Graphic3d_CStructure.hxx | 165 +- opencascade/Graphic3d_CView.hxx | 420 +- opencascade/Graphic3d_Camera.hxx | 639 +- opencascade/Graphic3d_CameraTile.hxx | 45 +- opencascade/Graphic3d_CappingFlags.hxx | 3 +- opencascade/Graphic3d_ClipPlane.hxx | 270 +- opencascade/Graphic3d_CubeMap.hxx | 46 +- opencascade/Graphic3d_CubeMapOrder.hxx | 86 +- opencascade/Graphic3d_CubeMapPacked.hxx | 38 +- opencascade/Graphic3d_CubeMapSeparate.hxx | 22 +- opencascade/Graphic3d_CullingTool.hxx | 209 +- .../Graphic3d_DataStructureManager.hxx | 7 +- opencascade/Graphic3d_DiagnosticInfo.hxx | 25 +- opencascade/Graphic3d_DisplayPriority.hxx | 30 +- opencascade/Graphic3d_FrameStats.hxx | 108 +- opencascade/Graphic3d_FrameStatsCounter.hxx | 66 +- opencascade/Graphic3d_FrameStatsData.hxx | 76 +- opencascade/Graphic3d_FrameStatsTimer.hxx | 6 +- opencascade/Graphic3d_GraduatedTrihedron.hxx | 204 +- opencascade/Graphic3d_GraphicDriver.hxx | 117 +- .../Graphic3d_GraphicDriverFactory.hxx | 22 +- opencascade/Graphic3d_Group.hxx | 222 +- opencascade/Graphic3d_GroupAspect.hxx | 8 +- .../Graphic3d_GroupDefinitionError.hxx | 5 +- opencascade/Graphic3d_HatchStyle.hxx | 21 +- .../Graphic3d_HorizontalTextAlignment.hxx | 6 +- opencascade/Graphic3d_IndexBuffer.hxx | 44 +- opencascade/Graphic3d_Layer.hxx | 89 +- .../Graphic3d_LevelOfTextureAnisotropy.hxx | 8 +- opencascade/Graphic3d_LightSet.hxx | 87 +- .../Graphic3d_MapOfAspectsToAspects.hxx | 3 +- opencascade/Graphic3d_MapOfObject.hxx | 3 +- opencascade/Graphic3d_MarkerImage.hxx | 69 +- opencascade/Graphic3d_MaterialAspect.hxx | 181 +- .../Graphic3d_MaterialDefinitionError.hxx | 5 +- opencascade/Graphic3d_MediaTexture.hxx | 12 +- opencascade/Graphic3d_MediaTextureSet.hxx | 44 +- opencascade/Graphic3d_MutableIndexBuffer.hxx | 25 +- opencascade/Graphic3d_NMapOfTransient.hxx | 2 +- opencascade/Graphic3d_NameOfMaterial.hxx | 10 +- opencascade/Graphic3d_NameOfTexture1D.hxx | 4 +- opencascade/Graphic3d_NameOfTexture2D.hxx | 46 +- opencascade/Graphic3d_NameOfTextureEnv.hxx | 18 +- opencascade/Graphic3d_NameOfTexturePlane.hxx | 8 +- opencascade/Graphic3d_PBRMaterial.hxx | 114 +- opencascade/Graphic3d_PolygonOffset.hxx | 16 +- .../Graphic3d_PresentationAttributes.hxx | 44 +- .../Graphic3d_PriorityDefinitionError.hxx | 5 +- .../Graphic3d_RenderTransparentMethod.hxx | 6 +- opencascade/Graphic3d_RenderingMode.hxx | 4 +- opencascade/Graphic3d_RenderingParams.hxx | 223 +- .../Graphic3d_SequenceOfHClipPlane.hxx | 63 +- opencascade/Graphic3d_SequenceOfStructure.hxx | 1 - opencascade/Graphic3d_ShaderAttribute.hxx | 22 +- opencascade/Graphic3d_ShaderFlags.hxx | 47 +- opencascade/Graphic3d_ShaderManager.hxx | 200 +- opencascade/Graphic3d_ShaderObject.hxx | 66 +- opencascade/Graphic3d_ShaderProgram.hxx | 122 +- opencascade/Graphic3d_ShaderVariable.hxx | 74 +- opencascade/Graphic3d_ShaderVariable.lxx | 27 +- opencascade/Graphic3d_StereoMode.hxx | 14 +- opencascade/Graphic3d_Structure.hxx | 384 +- .../Graphic3d_StructureDefinitionError.hxx | 5 +- opencascade/Graphic3d_StructureManager.hxx | 91 +- opencascade/Graphic3d_Text.hxx | 45 +- opencascade/Graphic3d_TextPath.hxx | 8 +- opencascade/Graphic3d_Texture1D.hxx | 36 +- opencascade/Graphic3d_Texture1Dmanual.hxx | 2 - opencascade/Graphic3d_Texture1Dsegment.hxx | 46 +- opencascade/Graphic3d_Texture2D.hxx | 31 +- opencascade/Graphic3d_Texture2Dmanual.hxx | 2 +- opencascade/Graphic3d_Texture2Dplane.hxx | 100 +- opencascade/Graphic3d_Texture3D.hxx | 17 +- opencascade/Graphic3d_TextureEnv.hxx | 31 +- opencascade/Graphic3d_TextureMap.hxx | 17 +- opencascade/Graphic3d_TextureParams.hxx | 63 +- opencascade/Graphic3d_TextureRoot.hxx | 64 +- opencascade/Graphic3d_TextureSet.hxx | 34 +- opencascade/Graphic3d_TextureSetBits.hxx | 13 +- opencascade/Graphic3d_TextureUnit.hxx | 32 +- opencascade/Graphic3d_ToneMappingMethod.hxx | 4 +- opencascade/Graphic3d_TransModeFlags.hxx | 34 +- opencascade/Graphic3d_TransformPers.hxx | 763 +- .../Graphic3d_TransformPersScaledAbove.hxx | 23 +- opencascade/Graphic3d_TransformUtils.hxx | 553 +- .../Graphic3d_TypeOfBackfacingModel.hxx | 5 +- opencascade/Graphic3d_TypeOfBackground.hxx | 8 +- opencascade/Graphic3d_TypeOfConnection.hxx | 4 +- opencascade/Graphic3d_TypeOfLightSource.hxx | 3 +- opencascade/Graphic3d_TypeOfLimit.hxx | 52 +- opencascade/Graphic3d_TypeOfMaterial.hxx | 3 +- .../Graphic3d_TypeOfPrimitiveArray.hxx | 51 +- opencascade/Graphic3d_TypeOfShaderObject.hxx | 3 +- opencascade/Graphic3d_TypeOfShadingModel.hxx | 30 +- opencascade/Graphic3d_TypeOfStructure.hxx | 8 +- opencascade/Graphic3d_TypeOfTexture.hxx | 3 +- opencascade/Graphic3d_TypeOfTextureFilter.hxx | 9 +- opencascade/Graphic3d_TypeOfTextureMode.hxx | 10 +- opencascade/Graphic3d_Vertex.hxx | 51 +- .../Graphic3d_VerticalTextAlignment.hxx | 8 +- opencascade/Graphic3d_ViewAffinity.hxx | 24 +- opencascade/Graphic3d_WorldViewProjState.hxx | 89 +- opencascade/Graphic3d_ZLayerId.hxx | 11 +- opencascade/Graphic3d_ZLayerSettings.hxx | 133 +- opencascade/HLRAlgo.hxx | 51 +- opencascade/HLRAlgo_Array1OfPHDat.hxx | 1 - opencascade/HLRAlgo_Array1OfPINod.hxx | 1 - opencascade/HLRAlgo_Array1OfPISeg.hxx | 1 - opencascade/HLRAlgo_Array1OfTData.hxx | 1 - opencascade/HLRAlgo_BiPoint.hxx | 241 +- opencascade/HLRAlgo_Coincidence.hxx | 38 +- opencascade/HLRAlgo_EdgeIterator.hxx | 72 +- opencascade/HLRAlgo_EdgeIterator.lxx | 68 +- opencascade/HLRAlgo_EdgeStatus.hxx | 63 +- opencascade/HLRAlgo_EdgesBlock.hxx | 73 +- opencascade/HLRAlgo_HArray1OfPHDat.hxx | 1 - opencascade/HLRAlgo_HArray1OfPINod.hxx | 1 - opencascade/HLRAlgo_HArray1OfPISeg.hxx | 1 - opencascade/HLRAlgo_HArray1OfTData.hxx | 1 - opencascade/HLRAlgo_Interference.hxx | 66 +- opencascade/HLRAlgo_InterferenceList.hxx | 3 +- opencascade/HLRAlgo_Intersection.hxx | 81 +- opencascade/HLRAlgo_Intersection.lxx | 136 +- ...HLRAlgo_ListIteratorOfInterferenceList.hxx | 1 - .../HLRAlgo_ListIteratorOfListOfBPoint.hxx | 1 - opencascade/HLRAlgo_ListOfBPoint.hxx | 3 +- opencascade/HLRAlgo_PolyAlgo.hxx | 39 +- opencascade/HLRAlgo_PolyData.hxx | 114 +- opencascade/HLRAlgo_PolyData.lxx | 57 +- opencascade/HLRAlgo_PolyHidingData.hxx | 48 +- opencascade/HLRAlgo_PolyInternalData.hxx | 147 +- opencascade/HLRAlgo_PolyInternalData.lxx | 140 +- opencascade/HLRAlgo_PolyInternalNode.hxx | 26 +- opencascade/HLRAlgo_PolyMask.hxx | 20 +- opencascade/HLRAlgo_PolyShellData.hxx | 21 +- opencascade/HLRAlgo_Projector.hxx | 118 +- opencascade/HLRAlgo_Projector.lxx | 67 +- opencascade/HLRAlgo_WiresBlock.hxx | 38 +- opencascade/HLRAppli_ReflectLines.hxx | 45 +- opencascade/HLRBRep.hxx | 20 +- opencascade/HLRBRep_Algo.hxx | 44 +- opencascade/HLRBRep_AreaLimit.hxx | 86 +- opencascade/HLRBRep_Array1OfEData.hxx | 1 - opencascade/HLRBRep_Array1OfFData.hxx | 1 - opencascade/HLRBRep_BCurveTool.hxx | 130 +- opencascade/HLRBRep_BCurveTool.lxx | 310 +- opencascade/HLRBRep_BSurfaceTool.hxx | 239 +- opencascade/HLRBRep_BSurfaceTool.lxx | 592 +- opencascade/HLRBRep_BiPnt2D.hxx | 81 +- opencascade/HLRBRep_BiPoint.hxx | 67 +- opencascade/HLRBRep_CInter.hxx | 212 +- opencascade/HLRBRep_CLProps.hxx | 90 +- opencascade/HLRBRep_CLPropsATool.hxx | 59 +- opencascade/HLRBRep_CLPropsATool.lxx | 103 +- opencascade/HLRBRep_Curve.hxx | 193 +- opencascade/HLRBRep_Curve.lxx | 192 +- opencascade/HLRBRep_CurveTool.hxx | 132 +- opencascade/HLRBRep_CurveTool.lxx | 346 +- opencascade/HLRBRep_Data.hxx | 297 +- opencascade/HLRBRep_Data.lxx | 159 +- opencascade/HLRBRep_EdgeBuilder.hxx | 71 +- opencascade/HLRBRep_EdgeData.hxx | 202 +- opencascade/HLRBRep_EdgeData.lxx | 383 +- opencascade/HLRBRep_EdgeFaceTool.hxx | 37 +- opencascade/HLRBRep_EdgeIList.hxx | 34 +- opencascade/HLRBRep_EdgeInterferenceTool.hxx | 82 +- opencascade/HLRBRep_EdgeInterferenceTool.lxx | 88 +- ...ctionPointOfTheIntPCurvePCurveOfCInter.hxx | 72 +- opencascade/HLRBRep_FaceData.hxx | 171 +- opencascade/HLRBRep_FaceData.lxx | 288 +- opencascade/HLRBRep_FaceIterator.hxx | 72 +- opencascade/HLRBRep_FaceIterator.lxx | 96 +- opencascade/HLRBRep_HLRToShape.hxx | 145 +- opencascade/HLRBRep_HLRToShape.lxx | 230 +- opencascade/HLRBRep_Hider.hxx | 33 +- opencascade/HLRBRep_IntConicCurveOfCInter.hxx | 175 +- opencascade/HLRBRep_InterCSurf.hxx | 195 +- opencascade/HLRBRep_InternalAlgo.hxx | 120 +- opencascade/HLRBRep_Intersector.hxx | 79 +- opencascade/HLRBRep_LineTool.hxx | 148 +- opencascade/HLRBRep_LineTool.lxx | 226 +- .../HLRBRep_ListIteratorOfListOfBPnt2D.hxx | 1 - .../HLRBRep_ListIteratorOfListOfBPoint.hxx | 1 - opencascade/HLRBRep_ListOfBPnt2D.hxx | 3 +- opencascade/HLRBRep_ListOfBPoint.hxx | 3 +- ...eIntersectorOfTheIntConicCurveOfCInter.hxx | 48 +- ...FOfTheLocateExtPCOfTheProjPCurOfCInter.hxx | 102 +- opencascade/HLRBRep_PolyAlgo.hxx | 623 +- opencascade/HLRBRep_PolyHLRToShape.hxx | 101 +- opencascade/HLRBRep_PolyHLRToShape.lxx | 168 +- opencascade/HLRBRep_SLProps.hxx | 131 +- opencascade/HLRBRep_SLPropsATool.hxx | 70 +- opencascade/HLRBRep_SLPropsATool.lxx | 110 +- opencascade/HLRBRep_SeqOfShapeBounds.hxx | 1 - opencascade/HLRBRep_ShapeBounds.hxx | 108 +- opencascade/HLRBRep_ShapeBounds.lxx | 83 +- opencascade/HLRBRep_ShapeToHLR.hxx | 45 +- opencascade/HLRBRep_Surface.hxx | 204 +- opencascade/HLRBRep_Surface.lxx | 371 +- opencascade/HLRBRep_SurfaceTool.hxx | 195 +- opencascade/HLRBRep_SurfaceTool.lxx | 230 +- .../HLRBRep_TheCSFunctionOfInterCSurf.hxx | 51 +- ...p_TheCurveLocatorOfTheProjPCurOfCInter.hxx | 48 +- ...eenPCurvesOfTheIntPCurvePCurveOfCInter.hxx | 46 +- opencascade/HLRBRep_TheExactInterCSurf.hxx | 76 +- .../HLRBRep_TheIntConicCurveOfCInter.hxx | 134 +- .../HLRBRep_TheIntPCurvePCurveOfCInter.hxx | 76 +- .../HLRBRep_TheInterferenceOfInterCSurf.hxx | 126 +- ...eIntersectorOfTheIntConicCurveOfCInter.hxx | 74 +- ...ep_TheLocateExtPCOfTheProjPCurOfCInter.hxx | 46 +- ...ePolygon2dOfTheIntPCurvePCurveOfCInter.hxx | 97 +- .../HLRBRep_ThePolygonOfInterCSurf.hxx | 59 +- .../HLRBRep_ThePolygonToolOfInterCSurf.hxx | 44 +- .../HLRBRep_ThePolyhedronOfInterCSurf.hxx | 186 +- .../HLRBRep_ThePolyhedronToolOfInterCSurf.hxx | 40 +- opencascade/HLRBRep_TheProjPCurOfCInter.hxx | 16 +- .../HLRBRep_TheQuadCurvExactInterCSurf.hxx | 45 +- ...adCurvFuncOfTheQuadCurvExactInterCSurf.hxx | 46 +- opencascade/HLRBRep_TypeOfResultingEdge.hxx | 23 +- opencascade/HLRBRep_VertexList.hxx | 52 +- opencascade/HLRTopoBRep_DSFiller.hxx | 54 +- opencascade/HLRTopoBRep_Data.hxx | 154 +- opencascade/HLRTopoBRep_Data.lxx | 79 +- ...ataMapIteratorOfDataMapOfShapeFaceData.hxx | 1 - ...DataMapIteratorOfMapOfShapeListOfVData.hxx | 1 - .../HLRTopoBRep_DataMapOfShapeFaceData.hxx | 7 +- opencascade/HLRTopoBRep_FaceData.hxx | 37 +- opencascade/HLRTopoBRep_FaceData.lxx | 64 +- opencascade/HLRTopoBRep_FaceIsoLiner.hxx | 49 +- .../HLRTopoBRep_ListIteratorOfListOfVData.hxx | 1 - opencascade/HLRTopoBRep_ListOfVData.hxx | 3 +- .../HLRTopoBRep_MapOfShapeListOfVData.hxx | 7 +- opencascade/HLRTopoBRep_OutLiner.hxx | 54 +- opencascade/HLRTopoBRep_OutLiner.lxx | 47 +- opencascade/HLRTopoBRep_VData.hxx | 34 +- opencascade/HLRTopoBRep_VData.lxx | 19 +- opencascade/HatchGen_Domain.hxx | 78 +- opencascade/HatchGen_Domain.lxx | 58 +- opencascade/HatchGen_Domains.hxx | 1 - opencascade/HatchGen_ErrorStatus.hxx | 10 +- opencascade/HatchGen_IntersectionPoint.hxx | 64 +- opencascade/HatchGen_IntersectionType.hxx | 8 +- opencascade/HatchGen_PointOnElement.hxx | 47 +- opencascade/HatchGen_PointOnElement.lxx | 8 +- opencascade/HatchGen_PointOnHatching.hxx | 60 +- opencascade/HatchGen_PointsOnElement.hxx | 1 - opencascade/HatchGen_PointsOnHatching.hxx | 1 - opencascade/Hatch_Hatcher.hxx | 121 +- opencascade/Hatch_Hatcher.lxx | 11 +- opencascade/Hatch_Line.hxx | 39 +- opencascade/Hatch_LineForm.hxx | 6 +- opencascade/Hatch_Parameter.hxx | 36 +- opencascade/Hatch_SequenceOfLine.hxx | 1 - opencascade/Hatch_SequenceOfParameter.hxx | 1 - opencascade/HeaderSection.hxx | 7 +- opencascade/HeaderSection_FileDescription.hxx | 44 +- opencascade/HeaderSection_FileName.hxx | 95 +- opencascade/HeaderSection_FileSchema.hxx | 37 +- opencascade/HeaderSection_Protocol.hxx | 30 +- opencascade/Hermit.hxx | 25 +- opencascade/IFGraph_AllConnected.hxx | 37 +- opencascade/IFGraph_AllShared.hxx | 41 +- opencascade/IFGraph_Articulations.hxx | 27 +- opencascade/IFGraph_Compare.hxx | 50 +- opencascade/IFGraph_ConnectedComponants.hxx | 11 +- opencascade/IFGraph_Cumulate.hxx | 50 +- opencascade/IFGraph_Cycles.hxx | 28 +- opencascade/IFGraph_ExternalSources.hxx | 38 +- opencascade/IFGraph_SCRoots.hxx | 28 +- opencascade/IFGraph_StrongComponants.hxx | 29 +- opencascade/IFGraph_SubPartsIterator.hxx | 90 +- opencascade/IFSelect.hxx | 14 +- opencascade/IFSelect_Act.hxx | 54 +- opencascade/IFSelect_ActFunc.hxx | 2 +- opencascade/IFSelect_Activator.hxx | 72 +- opencascade/IFSelect_AppliedModifiers.hxx | 38 +- opencascade/IFSelect_BasicDumper.hxx | 35 +- opencascade/IFSelect_CheckCounter.hxx | 35 +- opencascade/IFSelect_ContextModif.hxx | 118 +- opencascade/IFSelect_ContextWrite.hxx | 112 +- opencascade/IFSelect_DispGlobal.hxx | 33 +- opencascade/IFSelect_DispPerCount.hxx | 41 +- opencascade/IFSelect_DispPerFiles.hxx | 41 +- opencascade/IFSelect_DispPerOne.hxx | 33 +- opencascade/IFSelect_DispPerSignature.hxx | 43 +- opencascade/IFSelect_Dispatch.hxx | 62 +- opencascade/IFSelect_EditForm.hxx | 203 +- opencascade/IFSelect_EditValue.hxx | 12 +- opencascade/IFSelect_Editor.hxx | 149 +- opencascade/IFSelect_Functions.hxx | 29 +- opencascade/IFSelect_GeneralModifier.hxx | 34 +- opencascade/IFSelect_GraphCounter.hxx | 36 +- opencascade/IFSelect_HSeqOfSelection.hxx | 1 - opencascade/IFSelect_IntParam.hxx | 22 +- opencascade/IFSelect_ListEditor.hxx | 76 +- opencascade/IFSelect_ModelCopier.hxx | 141 +- opencascade/IFSelect_ModelModifier.gxx | 41 - opencascade/IFSelect_ModifEditForm.hxx | 33 +- opencascade/IFSelect_ModifReorder.hxx | 31 +- opencascade/IFSelect_Modifier.hxx | 29 +- opencascade/IFSelect_PacketList.hxx | 74 +- opencascade/IFSelect_ParamEditor.hxx | 49 +- opencascade/IFSelect_PrintCount.hxx | 19 +- opencascade/IFSelect_PrintFail.hxx | 4 +- opencascade/IFSelect_RemainMode.hxx | 9 +- opencascade/IFSelect_ReturnStatus.hxx | 10 +- opencascade/IFSelect_SelectAnyList.hxx | 73 +- opencascade/IFSelect_SelectAnyType.hxx | 9 +- opencascade/IFSelect_SelectBase.hxx | 24 +- opencascade/IFSelect_SelectCombine.hxx | 48 +- opencascade/IFSelect_SelectControl.hxx | 38 +- opencascade/IFSelect_SelectDeduct.hxx | 42 +- opencascade/IFSelect_SelectDiff.hxx | 29 +- opencascade/IFSelect_SelectEntityNumber.hxx | 18 +- opencascade/IFSelect_SelectErrorEntities.hxx | 31 +- opencascade/IFSelect_SelectExplore.hxx | 38 +- opencascade/IFSelect_SelectExtract.hxx | 48 +- opencascade/IFSelect_SelectFlag.hxx | 38 +- opencascade/IFSelect_SelectInList.hxx | 33 +- .../IFSelect_SelectIncorrectEntities.hxx | 22 +- opencascade/IFSelect_SelectIntersection.hxx | 29 +- opencascade/IFSelect_SelectModelEntities.hxx | 34 +- opencascade/IFSelect_SelectModelRoots.hxx | 29 +- opencascade/IFSelect_SelectPointed.hxx | 85 +- opencascade/IFSelect_SelectRange.hxx | 40 +- opencascade/IFSelect_SelectRootComps.hxx | 15 +- opencascade/IFSelect_SelectRoots.hxx | 15 +- opencascade/IFSelect_SelectSent.hxx | 43 +- opencascade/IFSelect_SelectShared.hxx | 29 +- opencascade/IFSelect_SelectSharing.hxx | 29 +- opencascade/IFSelect_SelectSignature.hxx | 74 +- opencascade/IFSelect_SelectSignedShared.hxx | 47 +- opencascade/IFSelect_SelectSignedSharing.hxx | 47 +- opencascade/IFSelect_SelectSuite.hxx | 53 +- opencascade/IFSelect_SelectType.hxx | 32 +- opencascade/IFSelect_SelectUnion.hxx | 29 +- .../IFSelect_SelectUnknownEntities.hxx | 31 +- opencascade/IFSelect_Selection.hxx | 17 +- opencascade/IFSelect_SelectionIterator.hxx | 25 +- .../IFSelect_SequenceOfAppliedModifiers.hxx | 1 - .../IFSelect_SequenceOfGeneralModifier.hxx | 1 - .../IFSelect_SequenceOfInterfaceModel.hxx | 1 - opencascade/IFSelect_SessionDumper.hxx | 36 +- opencascade/IFSelect_SessionFile.hxx | 140 +- opencascade/IFSelect_SessionPilot.hxx | 114 +- opencascade/IFSelect_ShareOut.hxx | 139 +- opencascade/IFSelect_ShareOutResult.hxx | 70 +- opencascade/IFSelect_SignAncestor.hxx | 29 +- opencascade/IFSelect_SignCategory.hxx | 28 +- opencascade/IFSelect_SignCounter.hxx | 81 +- opencascade/IFSelect_SignMultiple.hxx | 44 +- opencascade/IFSelect_SignType.hxx | 28 +- opencascade/IFSelect_SignValidity.hxx | 33 +- opencascade/IFSelect_Signature.hxx | 62 +- opencascade/IFSelect_SignatureList.hxx | 95 +- opencascade/IFSelect_TSeqOfDispatch.hxx | 1 - opencascade/IFSelect_TSeqOfSelection.hxx | 1 - opencascade/IFSelect_TransformStandard.hxx | 84 +- opencascade/IFSelect_Transformer.hxx | 22 +- opencascade/IFSelect_WorkLibrary.hxx | 83 +- opencascade/IFSelect_WorkSession.hxx | 761 +- opencascade/IGESAppli.hxx | 8 +- .../IGESAppli_Array1OfFiniteElement.hxx | 1 - opencascade/IGESAppli_Array1OfFlow.hxx | 1 - opencascade/IGESAppli_Array1OfNode.hxx | 1 - opencascade/IGESAppli_DrilledHole.hxx | 47 +- opencascade/IGESAppli_ElementResults.hxx | 134 +- opencascade/IGESAppli_FiniteElement.hxx | 42 +- opencascade/IGESAppli_Flow.hxx | 96 +- opencascade/IGESAppli_FlowLineSpec.hxx | 34 +- opencascade/IGESAppli_GeneralModule.hxx | 60 +- .../IGESAppli_HArray1OfFiniteElement.hxx | 1 - opencascade/IGESAppli_HArray1OfFlow.hxx | 1 - opencascade/IGESAppli_HArray1OfNode.hxx | 1 - opencascade/IGESAppli_LevelFunction.hxx | 38 +- opencascade/IGESAppli_LevelToPWBLayerMap.hxx | 55 +- opencascade/IGESAppli_LineWidening.hxx | 47 +- opencascade/IGESAppli_NodalConstraint.hxx | 42 +- opencascade/IGESAppli_NodalDisplAndRot.hxx | 62 +- opencascade/IGESAppli_NodalResults.hxx | 68 +- opencascade/IGESAppli_Node.hxx | 37 +- opencascade/IGESAppli_PWBArtworkStackup.hxx | 40 +- opencascade/IGESAppli_PWBDrilledHole.hxx | 41 +- opencascade/IGESAppli_PartNumber.hxx | 42 +- opencascade/IGESAppli_PinNumber.hxx | 33 +- opencascade/IGESAppli_PipingFlow.hxx | 91 +- opencascade/IGESAppli_Protocol.hxx | 34 +- opencascade/IGESAppli_ReadWriteModule.hxx | 40 +- opencascade/IGESAppli_ReferenceDesignator.hxx | 33 +- opencascade/IGESAppli_RegionRestriction.hxx | 37 +- opencascade/IGESAppli_SpecificModule.hxx | 35 +- opencascade/IGESAppli_ToolDrilledHole.hxx | 67 +- opencascade/IGESAppli_ToolElementResults.hxx | 62 +- opencascade/IGESAppli_ToolFiniteElement.hxx | 62 +- opencascade/IGESAppli_ToolFlow.hxx | 66 +- opencascade/IGESAppli_ToolFlowLineSpec.hxx | 62 +- opencascade/IGESAppli_ToolLevelFunction.hxx | 66 +- .../IGESAppli_ToolLevelToPWBLayerMap.hxx | 63 +- opencascade/IGESAppli_ToolLineWidening.hxx | 66 +- opencascade/IGESAppli_ToolNodalConstraint.hxx | 63 +- .../IGESAppli_ToolNodalDisplAndRot.hxx | 63 +- opencascade/IGESAppli_ToolNodalResults.hxx | 62 +- opencascade/IGESAppli_ToolNode.hxx | 62 +- .../IGESAppli_ToolPWBArtworkStackup.hxx | 63 +- opencascade/IGESAppli_ToolPWBDrilledHole.hxx | 66 +- opencascade/IGESAppli_ToolPartNumber.hxx | 66 +- opencascade/IGESAppli_ToolPinNumber.hxx | 66 +- opencascade/IGESAppli_ToolPipingFlow.hxx | 66 +- .../IGESAppli_ToolReferenceDesignator.hxx | 68 +- .../IGESAppli_ToolRegionRestriction.hxx | 67 +- opencascade/IGESBasic.hxx | 8 +- .../IGESBasic_Array1OfLineFontEntity.hxx | 1 - .../IGESBasic_Array2OfHArray1OfReal.hxx | 1 - opencascade/IGESBasic_AssocGroupType.hxx | 38 +- opencascade/IGESBasic_ExternalRefFile.hxx | 28 +- .../IGESBasic_ExternalRefFileIndex.hxx | 39 +- opencascade/IGESBasic_ExternalRefFileName.hxx | 35 +- opencascade/IGESBasic_ExternalRefLibName.hxx | 31 +- opencascade/IGESBasic_ExternalRefName.hxx | 28 +- .../IGESBasic_ExternalReferenceFile.hxx | 32 +- opencascade/IGESBasic_GeneralModule.hxx | 60 +- opencascade/IGESBasic_Group.hxx | 63 +- opencascade/IGESBasic_GroupWithoutBackP.hxx | 22 +- ...IGESBasic_HArray1OfHArray1OfIGESEntity.hxx | 35 +- .../IGESBasic_HArray1OfHArray1OfInteger.hxx | 35 +- .../IGESBasic_HArray1OfHArray1OfReal.hxx | 35 +- .../IGESBasic_HArray1OfHArray1OfXY.hxx | 34 +- .../IGESBasic_HArray1OfHArray1OfXYZ.hxx | 34 +- .../IGESBasic_HArray1OfLineFontEntity.hxx | 1 - .../IGESBasic_HArray2OfHArray1OfReal.hxx | 1 - opencascade/IGESBasic_Hierarchy.hxx | 46 +- opencascade/IGESBasic_Name.hxx | 33 +- opencascade/IGESBasic_OrderedGroup.hxx | 22 +- .../IGESBasic_OrderedGroupWithoutBackP.hxx | 22 +- opencascade/IGESBasic_Protocol.hxx | 34 +- opencascade/IGESBasic_ReadWriteModule.hxx | 40 +- opencascade/IGESBasic_SingleParent.hxx | 43 +- opencascade/IGESBasic_SingularSubfigure.hxx | 45 +- opencascade/IGESBasic_SpecificModule.hxx | 35 +- opencascade/IGESBasic_SubfigureDef.hxx | 46 +- opencascade/IGESBasic_ToolAssocGroupType.hxx | 66 +- opencascade/IGESBasic_ToolExternalRefFile.hxx | 63 +- .../IGESBasic_ToolExternalRefFileIndex.hxx | 63 +- .../IGESBasic_ToolExternalRefFileName.hxx | 63 +- .../IGESBasic_ToolExternalRefLibName.hxx | 63 +- opencascade/IGESBasic_ToolExternalRefName.hxx | 63 +- .../IGESBasic_ToolExternalReferenceFile.hxx | 63 +- opencascade/IGESBasic_ToolGroup.hxx | 67 +- .../IGESBasic_ToolGroupWithoutBackP.hxx | 67 +- opencascade/IGESBasic_ToolHierarchy.hxx | 66 +- opencascade/IGESBasic_ToolName.hxx | 66 +- opencascade/IGESBasic_ToolOrderedGroup.hxx | 66 +- ...IGESBasic_ToolOrderedGroupWithoutBackP.hxx | 68 +- opencascade/IGESBasic_ToolSingleParent.hxx | 66 +- .../IGESBasic_ToolSingularSubfigure.hxx | 63 +- opencascade/IGESBasic_ToolSubfigureDef.hxx | 62 +- opencascade/IGESCAFControl.hxx | 12 +- .../IGESCAFControl_ConfigurationNode.hxx | 162 +- opencascade/IGESCAFControl_Provider.hxx | 141 +- opencascade/IGESCAFControl_Reader.hxx | 85 +- opencascade/IGESCAFControl_Writer.hxx | 99 +- opencascade/IGESControl_ActorWrite.hxx | 44 +- opencascade/IGESControl_AlgoContainer.hxx | 23 +- opencascade/IGESControl_Controller.hxx | 49 +- opencascade/IGESControl_IGESBoundary.hxx | 23 +- opencascade/IGESControl_Reader.hxx | 55 +- opencascade/IGESControl_Reader.lxx | 17 +- opencascade/IGESControl_ToolContainer.hxx | 25 +- opencascade/IGESControl_Writer.hxx | 123 +- opencascade/IGESConvGeom.hxx | 41 +- opencascade/IGESConvGeom_GeomBuilder.hxx | 88 +- opencascade/IGESData.hxx | 8 +- opencascade/IGESData_Array1OfDirPart.hxx | 1 - opencascade/IGESData_Array1OfIGESEntity.hxx | 1 - opencascade/IGESData_BasicEditor.hxx | 100 +- opencascade/IGESData_ColorEntity.hxx | 22 +- opencascade/IGESData_DefList.hxx | 10 +- opencascade/IGESData_DefSwitch.hxx | 17 +- opencascade/IGESData_DefType.hxx | 12 +- opencascade/IGESData_DefaultGeneral.hxx | 53 +- opencascade/IGESData_DefaultSpecific.hxx | 29 +- opencascade/IGESData_DirChecker.hxx | 96 +- opencascade/IGESData_DirPart.hxx | 53 +- opencascade/IGESData_Dump.hxx | 485 +- opencascade/IGESData_FileProtocol.hxx | 18 +- opencascade/IGESData_FileRecognizer.hxx | 46 +- opencascade/IGESData_FreeFormatEntity.hxx | 90 +- opencascade/IGESData_GeneralModule.hxx | 125 +- .../IGESData_GlobalNodeOfSpecificLib.hxx | 16 +- .../IGESData_GlobalNodeOfWriterLib.hxx | 16 +- opencascade/IGESData_GlobalSection.hxx | 239 +- opencascade/IGESData_HArray1OfIGESEntity.hxx | 1 - opencascade/IGESData_IGESDumper.hxx | 33 +- opencascade/IGESData_IGESEntity.hxx | 279 +- opencascade/IGESData_IGESModel.hxx | 107 +- opencascade/IGESData_IGESReaderData.hxx | 127 +- opencascade/IGESData_IGESReaderTool.hxx | 97 +- opencascade/IGESData_IGESType.hxx | 42 +- opencascade/IGESData_IGESWriter.hxx | 144 +- opencascade/IGESData_LabelDisplayEntity.hxx | 22 +- opencascade/IGESData_LevelListEntity.hxx | 30 +- opencascade/IGESData_LineFontEntity.hxx | 22 +- opencascade/IGESData_NameEntity.hxx | 22 +- opencascade/IGESData_NodeOfSpecificLib.hxx | 35 +- opencascade/IGESData_NodeOfWriterLib.hxx | 35 +- opencascade/IGESData_ParamCursor.hxx | 78 +- opencascade/IGESData_ParamCursor.lxx | 54 +- opencascade/IGESData_ParamReader.hxx | 423 +- opencascade/IGESData_Protocol.hxx | 48 +- opencascade/IGESData_ReadStage.hxx | 10 +- opencascade/IGESData_ReadWriteModule.hxx | 51 +- opencascade/IGESData_SingleParentEntity.hxx | 28 +- opencascade/IGESData_SpecificLib.hxx | 56 +- opencascade/IGESData_SpecificModule.hxx | 33 +- opencascade/IGESData_Status.hxx | 9 +- opencascade/IGESData_ToolLocation.hxx | 109 +- opencascade/IGESData_TransfEntity.hxx | 22 +- opencascade/IGESData_UndefinedEntity.hxx | 63 +- opencascade/IGESData_ViewKindEntity.hxx | 29 +- opencascade/IGESData_WriterLib.hxx | 56 +- opencascade/IGESDefs.hxx | 8 +- opencascade/IGESDefs_Array1OfTabularData.hxx | 1 - opencascade/IGESDefs_AssociativityDef.hxx | 66 +- opencascade/IGESDefs_AttributeDef.hxx | 106 +- opencascade/IGESDefs_AttributeTable.hxx | 81 +- opencascade/IGESDefs_GeneralModule.hxx | 60 +- opencascade/IGESDefs_GenericData.hxx | 70 +- ..._HArray1OfHArray1OfTextDisplayTemplate.hxx | 36 +- opencascade/IGESDefs_HArray1OfTabularData.hxx | 1 - opencascade/IGESDefs_MacroDef.hxx | 48 +- opencascade/IGESDefs_Protocol.hxx | 34 +- opencascade/IGESDefs_ReadWriteModule.hxx | 40 +- opencascade/IGESDefs_SpecificModule.hxx | 29 +- opencascade/IGESDefs_TabularData.hxx | 67 +- opencascade/IGESDefs_ToolAssociativityDef.hxx | 63 +- opencascade/IGESDefs_ToolAttributeDef.hxx | 62 +- opencascade/IGESDefs_ToolAttributeTable.hxx | 62 +- opencascade/IGESDefs_ToolGenericData.hxx | 62 +- opencascade/IGESDefs_ToolMacroDef.hxx | 62 +- opencascade/IGESDefs_ToolTabularData.hxx | 62 +- opencascade/IGESDefs_ToolUnitsData.hxx | 62 +- opencascade/IGESDefs_UnitsData.hxx | 44 +- opencascade/IGESDimen.hxx | 8 +- opencascade/IGESDimen_AngularDimension.hxx | 56 +- opencascade/IGESDimen_Array1OfGeneralNote.hxx | 1 - opencascade/IGESDimen_Array1OfLeaderArrow.hxx | 1 - opencascade/IGESDimen_BasicDimension.hxx | 48 +- opencascade/IGESDimen_CenterLine.hxx | 52 +- opencascade/IGESDimen_CurveDimension.hxx | 56 +- opencascade/IGESDimen_DiameterDimension.hxx | 43 +- .../IGESDimen_DimensionDisplayData.hxx | 100 +- opencascade/IGESDimen_DimensionTolerance.hxx | 56 +- opencascade/IGESDimen_DimensionUnits.hxx | 58 +- opencascade/IGESDimen_DimensionedGeometry.hxx | 42 +- opencascade/IGESDimen_FlagNote.hxx | 59 +- opencascade/IGESDimen_GeneralLabel.hxx | 37 +- opencascade/IGESDimen_GeneralModule.hxx | 60 +- opencascade/IGESDimen_GeneralNote.hxx | 118 +- opencascade/IGESDimen_GeneralSymbol.hxx | 54 +- .../IGESDimen_HArray1OfGeneralNote.hxx | 1 - .../IGESDimen_HArray1OfLeaderArrow.hxx | 1 - opencascade/IGESDimen_LeaderArrow.hxx | 62 +- opencascade/IGESDimen_LinearDimension.hxx | 48 +- .../IGESDimen_NewDimensionedGeometry.hxx | 70 +- opencascade/IGESDimen_NewGeneralNote.hxx | 220 +- opencascade/IGESDimen_OrdinateDimension.hxx | 41 +- opencascade/IGESDimen_PointDimension.hxx | 42 +- opencascade/IGESDimen_Protocol.hxx | 34 +- opencascade/IGESDimen_RadiusDimension.hxx | 47 +- opencascade/IGESDimen_ReadWriteModule.hxx | 40 +- opencascade/IGESDimen_Section.hxx | 50 +- opencascade/IGESDimen_SectionedArea.hxx | 67 +- opencascade/IGESDimen_SpecificModule.hxx | 35 +- .../IGESDimen_ToolAngularDimension.hxx | 63 +- opencascade/IGESDimen_ToolBasicDimension.hxx | 66 +- opencascade/IGESDimen_ToolCenterLine.hxx | 66 +- opencascade/IGESDimen_ToolCurveDimension.hxx | 62 +- .../IGESDimen_ToolDiameterDimension.hxx | 63 +- .../IGESDimen_ToolDimensionDisplayData.hxx | 68 +- .../IGESDimen_ToolDimensionTolerance.hxx | 68 +- opencascade/IGESDimen_ToolDimensionUnits.hxx | 66 +- .../IGESDimen_ToolDimensionedGeometry.hxx | 68 +- opencascade/IGESDimen_ToolFlagNote.hxx | 62 +- opencascade/IGESDimen_ToolGeneralLabel.hxx | 62 +- opencascade/IGESDimen_ToolGeneralNote.hxx | 62 +- opencascade/IGESDimen_ToolGeneralSymbol.hxx | 62 +- opencascade/IGESDimen_ToolLeaderArrow.hxx | 62 +- opencascade/IGESDimen_ToolLinearDimension.hxx | 63 +- .../IGESDimen_ToolNewDimensionedGeometry.hxx | 68 +- opencascade/IGESDimen_ToolNewGeneralNote.hxx | 62 +- .../IGESDimen_ToolOrdinateDimension.hxx | 63 +- opencascade/IGESDimen_ToolPointDimension.hxx | 62 +- opencascade/IGESDimen_ToolRadiusDimension.hxx | 63 +- opencascade/IGESDimen_ToolSection.hxx | 66 +- opencascade/IGESDimen_ToolSectionedArea.hxx | 62 +- opencascade/IGESDimen_ToolWitnessLine.hxx | 66 +- opencascade/IGESDimen_WitnessLine.hxx | 46 +- opencascade/IGESDraw.hxx | 8 +- opencascade/IGESDraw_Array1OfConnectPoint.hxx | 1 - .../IGESDraw_Array1OfViewKindEntity.hxx | 1 - opencascade/IGESDraw_CircArraySubfigure.hxx | 75 +- opencascade/IGESDraw_ConnectPoint.hxx | 91 +- opencascade/IGESDraw_Drawing.hxx | 62 +- opencascade/IGESDraw_DrawingWithRotation.hxx | 68 +- opencascade/IGESDraw_GeneralModule.hxx | 80 +- .../IGESDraw_HArray1OfConnectPoint.hxx | 1 - .../IGESDraw_HArray1OfViewKindEntity.hxx | 1 - opencascade/IGESDraw_LabelDisplay.hxx | 66 +- opencascade/IGESDraw_NetworkSubfigure.hxx | 66 +- opencascade/IGESDraw_NetworkSubfigureDef.hxx | 72 +- opencascade/IGESDraw_PerspectiveView.hxx | 96 +- opencascade/IGESDraw_Planar.hxx | 44 +- opencascade/IGESDraw_Protocol.hxx | 34 +- opencascade/IGESDraw_ReadWriteModule.hxx | 40 +- opencascade/IGESDraw_RectArraySubfigure.hxx | 85 +- .../IGESDraw_SegmentedViewsVisible.hxx | 95 +- opencascade/IGESDraw_SpecificModule.hxx | 35 +- .../IGESDraw_ToolCircArraySubfigure.hxx | 63 +- opencascade/IGESDraw_ToolConnectPoint.hxx | 62 +- opencascade/IGESDraw_ToolDrawing.hxx | 66 +- .../IGESDraw_ToolDrawingWithRotation.hxx | 68 +- opencascade/IGESDraw_ToolLabelDisplay.hxx | 62 +- opencascade/IGESDraw_ToolNetworkSubfigure.hxx | 63 +- .../IGESDraw_ToolNetworkSubfigureDef.hxx | 63 +- opencascade/IGESDraw_ToolPerspectiveView.hxx | 62 +- opencascade/IGESDraw_ToolPlanar.hxx | 66 +- .../IGESDraw_ToolRectArraySubfigure.hxx | 63 +- .../IGESDraw_ToolSegmentedViewsVisible.hxx | 63 +- opencascade/IGESDraw_ToolView.hxx | 62 +- opencascade/IGESDraw_ToolViewsVisible.hxx | 81 +- .../IGESDraw_ToolViewsVisibleWithAttr.hxx | 83 +- opencascade/IGESDraw_View.hxx | 80 +- opencascade/IGESDraw_ViewsVisible.hxx | 48 +- opencascade/IGESDraw_ViewsVisibleWithAttr.hxx | 92 +- opencascade/IGESFile_Read.hxx | 27 +- opencascade/IGESGeom.hxx | 10 +- opencascade/IGESGeom_Array1OfBoundary.hxx | 1 - .../IGESGeom_Array1OfCurveOnSurface.hxx | 1 - .../IGESGeom_Array1OfTransformationMatrix.hxx | 4 +- opencascade/IGESGeom_BSplineCurve.hxx | 101 +- opencascade/IGESGeom_BSplineSurface.hxx | 133 +- opencascade/IGESGeom_Boundary.hxx | 72 +- opencascade/IGESGeom_BoundedSurface.hxx | 42 +- opencascade/IGESGeom_CircularArc.hxx | 59 +- opencascade/IGESGeom_CompositeCurve.hxx | 32 +- opencascade/IGESGeom_ConicArc.hxx | 96 +- opencascade/IGESGeom_CopiousData.hxx | 71 +- opencascade/IGESGeom_CurveOnSurface.hxx | 44 +- opencascade/IGESGeom_Direction.hxx | 30 +- opencascade/IGESGeom_Flash.hxx | 56 +- opencascade/IGESGeom_GeneralModule.hxx | 60 +- opencascade/IGESGeom_HArray1OfBoundary.hxx | 1 - .../IGESGeom_HArray1OfCurveOnSurface.hxx | 1 - ...IGESGeom_HArray1OfTransformationMatrix.hxx | 1 - opencascade/IGESGeom_Line.hxx | 42 +- opencascade/IGESGeom_OffsetCurve.hxx | 89 +- opencascade/IGESGeom_OffsetSurface.hxx | 40 +- opencascade/IGESGeom_Plane.hxx | 76 +- opencascade/IGESGeom_Point.hxx | 36 +- opencascade/IGESGeom_Protocol.hxx | 34 +- opencascade/IGESGeom_ReadWriteModule.hxx | 40 +- opencascade/IGESGeom_RuledSurface.hxx | 47 +- opencascade/IGESGeom_SpecificModule.hxx | 35 +- opencascade/IGESGeom_SplineCurve.hxx | 98 +- opencascade/IGESGeom_SplineSurface.hxx | 77 +- opencascade/IGESGeom_SurfaceOfRevolution.hxx | 43 +- opencascade/IGESGeom_TabulatedCylinder.hxx | 34 +- opencascade/IGESGeom_ToolBSplineCurve.hxx | 62 +- opencascade/IGESGeom_ToolBSplineSurface.hxx | 62 +- opencascade/IGESGeom_ToolBoundary.hxx | 66 +- opencascade/IGESGeom_ToolBoundedSurface.hxx | 62 +- opencascade/IGESGeom_ToolCircularArc.hxx | 62 +- opencascade/IGESGeom_ToolCompositeCurve.hxx | 62 +- opencascade/IGESGeom_ToolConicArc.hxx | 66 +- opencascade/IGESGeom_ToolCopiousData.hxx | 62 +- opencascade/IGESGeom_ToolCurveOnSurface.hxx | 66 +- opencascade/IGESGeom_ToolDirection.hxx | 62 +- opencascade/IGESGeom_ToolFlash.hxx | 66 +- opencascade/IGESGeom_ToolLine.hxx | 62 +- opencascade/IGESGeom_ToolOffsetCurve.hxx | 66 +- opencascade/IGESGeom_ToolOffsetSurface.hxx | 62 +- opencascade/IGESGeom_ToolPlane.hxx | 62 +- opencascade/IGESGeom_ToolPoint.hxx | 62 +- opencascade/IGESGeom_ToolRuledSurface.hxx | 62 +- opencascade/IGESGeom_ToolSplineCurve.hxx | 62 +- opencascade/IGESGeom_ToolSplineSurface.hxx | 62 +- .../IGESGeom_ToolSurfaceOfRevolution.hxx | 63 +- .../IGESGeom_ToolTabulatedCylinder.hxx | 63 +- .../IGESGeom_ToolTransformationMatrix.hxx | 68 +- opencascade/IGESGeom_ToolTrimmedSurface.hxx | 62 +- opencascade/IGESGeom_TransformationMatrix.hxx | 36 +- opencascade/IGESGeom_TrimmedSurface.hxx | 49 +- opencascade/IGESGraph.hxx | 8 +- opencascade/IGESGraph_Array1OfColor.hxx | 1 - .../IGESGraph_Array1OfTextDisplayTemplate.hxx | 4 +- opencascade/IGESGraph_Array1OfTextFontDef.hxx | 1 - opencascade/IGESGraph_Color.hxx | 57 +- opencascade/IGESGraph_DefinitionLevel.hxx | 35 +- opencascade/IGESGraph_DrawingSize.hxx | 38 +- opencascade/IGESGraph_DrawingUnits.hxx | 40 +- opencascade/IGESGraph_GeneralModule.hxx | 60 +- opencascade/IGESGraph_HArray1OfColor.hxx | 1 - ...IGESGraph_HArray1OfTextDisplayTemplate.hxx | 1 - .../IGESGraph_HArray1OfTextFontDef.hxx | 1 - opencascade/IGESGraph_HighLight.hxx | 33 +- .../IGESGraph_IntercharacterSpacing.hxx | 32 +- opencascade/IGESGraph_LineFontDefPattern.hxx | 41 +- opencascade/IGESGraph_LineFontDefTemplate.hxx | 43 +- opencascade/IGESGraph_LineFontPredefined.hxx | 31 +- opencascade/IGESGraph_NominalSize.hxx | 43 +- opencascade/IGESGraph_Pick.hxx | 32 +- opencascade/IGESGraph_Protocol.hxx | 34 +- opencascade/IGESGraph_ReadWriteModule.hxx | 40 +- opencascade/IGESGraph_SpecificModule.hxx | 35 +- opencascade/IGESGraph_TextDisplayTemplate.hxx | 78 +- opencascade/IGESGraph_TextFontDef.hxx | 93 +- opencascade/IGESGraph_ToolColor.hxx | 62 +- opencascade/IGESGraph_ToolDefinitionLevel.hxx | 63 +- opencascade/IGESGraph_ToolDrawingSize.hxx | 66 +- opencascade/IGESGraph_ToolDrawingUnits.hxx | 66 +- opencascade/IGESGraph_ToolHighLight.hxx | 66 +- .../IGESGraph_ToolIntercharacterSpacing.hxx | 68 +- .../IGESGraph_ToolLineFontDefPattern.hxx | 63 +- .../IGESGraph_ToolLineFontDefTemplate.hxx | 63 +- .../IGESGraph_ToolLineFontPredefined.hxx | 68 +- opencascade/IGESGraph_ToolNominalSize.hxx | 66 +- opencascade/IGESGraph_ToolPick.hxx | 66 +- .../IGESGraph_ToolTextDisplayTemplate.hxx | 63 +- opencascade/IGESGraph_ToolTextFontDef.hxx | 62 +- opencascade/IGESGraph_ToolUniformRectGrid.hxx | 67 +- opencascade/IGESGraph_UniformRectGrid.hxx | 53 +- opencascade/IGESSelect.hxx | 13 +- opencascade/IGESSelect_Activator.hxx | 31 +- opencascade/IGESSelect_AddFileComment.hxx | 47 +- opencascade/IGESSelect_AddGroup.hxx | 30 +- opencascade/IGESSelect_AutoCorrect.hxx | 30 +- opencascade/IGESSelect_ChangeLevelList.hxx | 46 +- opencascade/IGESSelect_ChangeLevelNumber.hxx | 44 +- opencascade/IGESSelect_ComputeStatus.hxx | 30 +- .../IGESSelect_CounterOfLevelNumber.hxx | 59 +- opencascade/IGESSelect_DispPerDrawing.hxx | 36 +- opencascade/IGESSelect_DispPerSingleView.hxx | 36 +- opencascade/IGESSelect_Dumper.hxx | 35 +- opencascade/IGESSelect_EditDirPart.hxx | 49 +- opencascade/IGESSelect_EditHeader.hxx | 49 +- opencascade/IGESSelect_FileModifier.hxx | 26 +- opencascade/IGESSelect_FloatFormat.hxx | 62 +- opencascade/IGESSelect_IGESName.hxx | 28 +- opencascade/IGESSelect_IGESTypeForm.hxx | 33 +- opencascade/IGESSelect_ModelModifier.hxx | 41 +- opencascade/IGESSelect_RebuildDrawings.hxx | 30 +- opencascade/IGESSelect_RebuildGroups.hxx | 30 +- opencascade/IGESSelect_RemoveCurves.hxx | 30 +- opencascade/IGESSelect_SelectBasicGeom.hxx | 39 +- opencascade/IGESSelect_SelectBypassGroup.hxx | 32 +- .../IGESSelect_SelectBypassSubfigure.hxx | 32 +- opencascade/IGESSelect_SelectDrawingFrom.hxx | 29 +- opencascade/IGESSelect_SelectFaces.hxx | 32 +- opencascade/IGESSelect_SelectFromDrawing.hxx | 29 +- .../IGESSelect_SelectFromSingleView.hxx | 29 +- opencascade/IGESSelect_SelectLevelNumber.hxx | 37 +- opencascade/IGESSelect_SelectName.hxx | 37 +- opencascade/IGESSelect_SelectPCurves.hxx | 32 +- .../IGESSelect_SelectSingleViewFrom.hxx | 29 +- opencascade/IGESSelect_SelectSubordinate.hxx | 32 +- .../IGESSelect_SelectVisibleStatus.hxx | 31 +- opencascade/IGESSelect_SetGlobalParameter.hxx | 40 +- opencascade/IGESSelect_SetLabel.hxx | 30 +- opencascade/IGESSelect_SetVersion5.hxx | 30 +- opencascade/IGESSelect_SignColor.hxx | 28 +- opencascade/IGESSelect_SignLevelNumber.hxx | 28 +- opencascade/IGESSelect_SignStatus.hxx | 36 +- opencascade/IGESSelect_SplineToBSpline.hxx | 44 +- opencascade/IGESSelect_UpdateCreationDate.hxx | 30 +- opencascade/IGESSelect_UpdateFileName.hxx | 30 +- opencascade/IGESSelect_UpdateLastChange.hxx | 30 +- opencascade/IGESSelect_ViewSorter.hxx | 73 +- opencascade/IGESSelect_WorkLibrary.hxx | 42 +- opencascade/IGESSolid.hxx | 8 +- opencascade/IGESSolid_Array1OfFace.hxx | 1 - opencascade/IGESSolid_Array1OfLoop.hxx | 1 - opencascade/IGESSolid_Array1OfShell.hxx | 1 - opencascade/IGESSolid_Array1OfVertexList.hxx | 1 - opencascade/IGESSolid_Block.hxx | 53 +- opencascade/IGESSolid_BooleanTree.hxx | 43 +- opencascade/IGESSolid_ConeFrustum.hxx | 48 +- opencascade/IGESSolid_ConicalSurface.hxx | 48 +- opencascade/IGESSolid_Cylinder.hxx | 45 +- opencascade/IGESSolid_CylindricalSurface.hxx | 43 +- opencascade/IGESSolid_EdgeList.hxx | 58 +- opencascade/IGESSolid_Ellipsoid.hxx | 53 +- opencascade/IGESSolid_Face.hxx | 42 +- opencascade/IGESSolid_GeneralModule.hxx | 60 +- opencascade/IGESSolid_HArray1OfFace.hxx | 1 - opencascade/IGESSolid_HArray1OfLoop.hxx | 1 - opencascade/IGESSolid_HArray1OfShell.hxx | 1 - opencascade/IGESSolid_HArray1OfVertexList.hxx | 1 - opencascade/IGESSolid_Loop.hxx | 83 +- opencascade/IGESSolid_ManifoldSolid.hxx | 47 +- opencascade/IGESSolid_PlaneSurface.hxx | 38 +- opencascade/IGESSolid_Protocol.hxx | 34 +- opencascade/IGESSolid_ReadWriteModule.hxx | 40 +- opencascade/IGESSolid_RightAngularWedge.hxx | 64 +- opencascade/IGESSolid_SelectedComponent.hxx | 34 +- opencascade/IGESSolid_Shell.hxx | 45 +- opencascade/IGESSolid_SolidAssembly.hxx | 46 +- opencascade/IGESSolid_SolidInstance.hxx | 34 +- .../IGESSolid_SolidOfLinearExtrusion.hxx | 42 +- opencascade/IGESSolid_SolidOfRevolution.hxx | 53 +- opencascade/IGESSolid_SpecificModule.hxx | 29 +- opencascade/IGESSolid_Sphere.hxx | 34 +- opencascade/IGESSolid_SphericalSurface.hxx | 45 +- opencascade/IGESSolid_ToolBlock.hxx | 62 +- opencascade/IGESSolid_ToolBooleanTree.hxx | 62 +- opencascade/IGESSolid_ToolConeFrustum.hxx | 62 +- opencascade/IGESSolid_ToolConicalSurface.hxx | 62 +- opencascade/IGESSolid_ToolCylinder.hxx | 62 +- .../IGESSolid_ToolCylindricalSurface.hxx | 63 +- opencascade/IGESSolid_ToolEdgeList.hxx | 62 +- opencascade/IGESSolid_ToolEllipsoid.hxx | 62 +- opencascade/IGESSolid_ToolFace.hxx | 62 +- opencascade/IGESSolid_ToolLoop.hxx | 62 +- opencascade/IGESSolid_ToolManifoldSolid.hxx | 62 +- opencascade/IGESSolid_ToolPlaneSurface.hxx | 62 +- .../IGESSolid_ToolRightAngularWedge.hxx | 63 +- .../IGESSolid_ToolSelectedComponent.hxx | 63 +- opencascade/IGESSolid_ToolShell.hxx | 62 +- opencascade/IGESSolid_ToolSolidAssembly.hxx | 62 +- opencascade/IGESSolid_ToolSolidInstance.hxx | 62 +- .../IGESSolid_ToolSolidOfLinearExtrusion.hxx | 63 +- .../IGESSolid_ToolSolidOfRevolution.hxx | 63 +- opencascade/IGESSolid_ToolSphere.hxx | 62 +- .../IGESSolid_ToolSphericalSurface.hxx | 63 +- opencascade/IGESSolid_ToolToroidalSurface.hxx | 63 +- opencascade/IGESSolid_ToolTorus.hxx | 62 +- opencascade/IGESSolid_ToolVertexList.hxx | 62 +- opencascade/IGESSolid_TopoBuilder.hxx | 142 +- opencascade/IGESSolid_ToroidalSurface.hxx | 50 +- opencascade/IGESSolid_Torus.hxx | 45 +- opencascade/IGESSolid_VertexList.hxx | 32 +- opencascade/IGESToBRep.hxx | 47 +- opencascade/IGESToBRep_Actor.hxx | 55 +- opencascade/IGESToBRep_AlgoContainer.hxx | 30 +- opencascade/IGESToBRep_AlgoContainer.lxx | 15 +- opencascade/IGESToBRep_BRepEntity.hxx | 77 +- opencascade/IGESToBRep_BasicCurve.hxx | 82 +- opencascade/IGESToBRep_BasicSurface.hxx | 39 +- opencascade/IGESToBRep_CurveAndSurface.hxx | 230 +- opencascade/IGESToBRep_CurveAndSurface.lxx | 198 +- opencascade/IGESToBRep_IGESBoundary.hxx | 107 +- opencascade/IGESToBRep_IGESBoundary.lxx | 8 +- opencascade/IGESToBRep_Reader.hxx | 133 +- opencascade/IGESToBRep_ToolContainer.hxx | 25 +- opencascade/IGESToBRep_TopoCurve.hxx | 150 +- opencascade/IGESToBRep_TopoSurface.hxx | 74 +- opencascade/IMeshData_Curve.hxx | 26 +- opencascade/IMeshData_Edge.hxx | 88 +- opencascade/IMeshData_Face.hxx | 36 +- opencascade/IMeshData_Model.hxx | 28 +- opencascade/IMeshData_PCurve.hxx | 51 +- opencascade/IMeshData_ParametersList.hxx | 14 +- .../IMeshData_ParametersListArrayAdaptor.hxx | 27 +- opencascade/IMeshData_Shape.hxx | 27 +- opencascade/IMeshData_Status.hxx | 27 +- opencascade/IMeshData_StatusOwner.hxx | 29 +- opencascade/IMeshData_TessellatedShape.hxx | 27 +- opencascade/IMeshData_Types.hxx | 170 +- opencascade/IMeshData_Wire.hxx | 25 +- opencascade/IMeshTools_Context.hxx | 101 +- opencascade/IMeshTools_CurveTessellator.hxx | 19 +- opencascade/IMeshTools_MeshAlgo.hxx | 17 +- opencascade/IMeshTools_MeshAlgoFactory.hxx | 10 +- opencascade/IMeshTools_MeshAlgoType.hxx | 12 +- opencascade/IMeshTools_MeshBuilder.hxx | 20 +- opencascade/IMeshTools_ModelAlgo.hxx | 27 +- opencascade/IMeshTools_ModelBuilder.hxx | 25 +- opencascade/IMeshTools_Parameters.hxx | 87 +- opencascade/IMeshTools_ShapeExplorer.hxx | 5 +- opencascade/IMeshTools_ShapeVisitor.hxx | 14 +- opencascade/IVtkOCC_SelectableObject.hxx | 41 +- opencascade/IVtkOCC_Shape.hxx | 53 +- opencascade/IVtkOCC_ShapeMesher.hxx | 58 +- opencascade/IVtkOCC_ShapePickerAlgo.hxx | 82 +- opencascade/IVtkOCC_ViewerSelector.hxx | 44 +- opencascade/IVtkTools.hxx | 101 +- opencascade/IVtkTools_DisplayModeFilter.hxx | 36 +- opencascade/IVtkTools_ShapeDataSource.hxx | 53 +- opencascade/IVtkTools_ShapeObject.hxx | 38 +- opencascade/IVtkTools_ShapePicker.hxx | 135 +- opencascade/IVtkTools_SubPolyDataFilter.hxx | 24 +- opencascade/IVtkVTK_ShapeData.hxx | 118 +- opencascade/IVtkVTK_View.hxx | 76 +- opencascade/IVtk_IShape.hxx | 20 +- opencascade/IVtk_IShapeData.hxx | 98 +- opencascade/IVtk_IShapeMesher.hxx | 28 +- opencascade/IVtk_IShapePickerAlgo.hxx | 75 +- opencascade/IVtk_IView.hxx | 66 +- opencascade/IVtk_Interface.hxx | 18 +- opencascade/IVtk_Types.hxx | 67 +- opencascade/Image_AlienPixMap.hxx | 77 +- opencascade/Image_Color.hxx | 71 +- opencascade/Image_CompressedFormat.hxx | 12 +- opencascade/Image_CompressedPixMap.hxx | 46 +- opencascade/Image_DDSParser.hxx | 38 +- opencascade/Image_Diff.hxx | 58 +- opencascade/Image_Format.hxx | 37 +- opencascade/Image_PixMap.hxx | 306 +- opencascade/Image_PixMapData.hxx | 150 +- opencascade/Image_PixMapTypedData.hxx | 44 +- opencascade/Image_SupportedFormats.hxx | 17 +- opencascade/Image_Texture.hxx | 105 +- opencascade/Image_VideoRecorder.hxx | 68 +- opencascade/IntAna2d_AnaIntersection.hxx | 105 +- opencascade/IntAna2d_AnaIntersection.lxx | 63 +- opencascade/IntAna2d_Conic.hxx | 66 +- opencascade/IntAna2d_IntPoint.hxx | 71 +- opencascade/IntAna2d_IntPoint.lxx | 18 +- opencascade/IntAna2d_Outils.hxx | 54 +- opencascade/IntAna_Curve.hxx | 162 +- opencascade/IntAna_Int3Pln.hxx | 43 +- opencascade/IntAna_Int3Pln.lxx | 28 +- opencascade/IntAna_IntConicQuad.hxx | 145 +- opencascade/IntAna_IntConicQuad.lxx | 87 +- opencascade/IntAna_IntLinTorus.hxx | 57 +- opencascade/IntAna_IntLinTorus.lxx | 65 +- opencascade/IntAna_IntQuadQuad.hxx | 85 +- opencascade/IntAna_IntQuadQuad.lxx | 44 +- .../IntAna_ListIteratorOfListOfCurve.hxx | 1 - opencascade/IntAna_ListOfCurve.hxx | 3 +- opencascade/IntAna_QuadQuadGeo.hxx | 278 +- opencascade/IntAna_QuadQuadGeo.lxx | 27 +- opencascade/IntAna_Quadric.hxx | 96 +- opencascade/IntAna_ResultType.hxx | 21 +- opencascade/IntCurveSurface_HCurveTool.gxx | 244 - opencascade/IntCurveSurface_HCurveTool.lxx | 164 - opencascade/IntCurveSurface_HInter.hxx | 194 +- opencascade/IntCurveSurface_Inter.gxx | 2100 -- opencascade/IntCurveSurface_Intersection.hxx | 62 +- .../IntCurveSurface_IntersectionPoint.hxx | 77 +- .../IntCurveSurface_IntersectionPoint.lxx | 26 +- .../IntCurveSurface_IntersectionSegment.hxx | 45 +- opencascade/IntCurveSurface_Polygon.gxx | 260 - opencascade/IntCurveSurface_PolygonTool.gxx | 33 - opencascade/IntCurveSurface_PolygonTool.lxx | 32 +- opencascade/IntCurveSurface_Polyhedron.gxx | 858 - opencascade/IntCurveSurface_Polyhedron.lxx | 6 +- .../IntCurveSurface_PolyhedronTool.gxx | 17 - .../IntCurveSurface_PolyhedronTool.lxx | 68 +- ...IntCurveSurface_QuadricCurveExactInter.gxx | 121 - .../IntCurveSurface_QuadricCurveFunc.gxx | 54 - opencascade/IntCurveSurface_SequenceOfPnt.hxx | 1 - opencascade/IntCurveSurface_SequenceOfSeg.hxx | 1 - .../IntCurveSurface_TheCSFunctionOfHInter.hxx | 52 +- .../IntCurveSurface_TheExactHInter.hxx | 74 +- opencascade/IntCurveSurface_TheHCurveTool.hxx | 186 +- ...ntCurveSurface_TheInterferenceOfHInter.hxx | 126 +- .../IntCurveSurface_ThePolygonOfHInter.hxx | 63 +- ...IntCurveSurface_ThePolygonToolOfHInter.hxx | 45 +- .../IntCurveSurface_ThePolyhedronOfHInter.hxx | 200 +- ...CurveSurface_ThePolyhedronToolOfHInter.hxx | 72 +- ...IntCurveSurface_TheQuadCurvExactHInter.hxx | 29 +- ...heQuadCurvFuncOfTheQuadCurvExactHInter.hxx | 45 +- .../IntCurveSurface_TransitionOnCurve.hxx | 7 +- .../IntCurve_DistBetweenPCurvesGen.gxx | 101 - .../IntCurve_ExactIntersectionPoint.gxx | 226 - opencascade/IntCurve_IConicTool.hxx | 53 +- opencascade/IntCurve_IntConicConic.hxx | 295 +- opencascade/IntCurve_IntConicConic.lxx | 270 +- opencascade/IntCurve_IntConicConic_Tool.hxx | 181 +- opencascade/IntCurve_IntConicCurveGen.gxx | 78 - opencascade/IntCurve_IntConicCurveGen.lxx | 143 +- opencascade/IntCurve_IntCurveCurveGen.gxx | 1140 - opencascade/IntCurve_IntCurveCurveGen.lxx | 196 +- opencascade/IntCurve_IntImpConicParConic.hxx | 74 +- opencascade/IntCurve_IntPolyPolyGen.gxx | 1357 - ...urve_MyImpParToolOfIntImpConicParConic.hxx | 46 +- opencascade/IntCurve_PConic.hxx | 69 +- opencascade/IntCurve_PConic.lxx | 36 +- opencascade/IntCurve_PConicTool.hxx | 47 +- opencascade/IntCurve_Polygon2dGen.gxx | 341 - opencascade/IntCurve_Polygon2dGen.lxx | 78 +- opencascade/IntCurve_ProjPCurGen.gxx | 69 - opencascade/IntCurve_ProjectOnPConicTool.hxx | 36 +- opencascade/IntCurve_UserIntConicCurveGen.gxx | 778 - opencascade/IntCurvesFace_Intersector.hxx | 122 +- opencascade/IntCurvesFace_Intersector.lxx | 62 +- .../IntCurvesFace_ShapeIntersector.hxx | 80 +- opencascade/IntImpParGen.hxx | 36 +- opencascade/IntImpParGen_ImpParTool.gxx | 56 - opencascade/IntImpParGen_ImpTool.hxx | 46 +- opencascade/IntImpParGen_Intersector.gxx | 696 - opencascade/IntImpParGen_Tool.hxx | 27 +- opencascade/IntImp_ComputeTangence.hxx | 10 +- opencascade/IntImp_ConstIsoparametric.hxx | 9 +- opencascade/IntImp_Int2S.gxx | 253 - opencascade/IntImp_Int2S.lxx | 70 +- opencascade/IntImp_IntCS.gxx | 163 - opencascade/IntImp_ZerCSParFunc.gxx | 102 - opencascade/IntImp_ZerImpFunc.gxx | 160 - opencascade/IntImp_ZerImpFunc.lxx | 37 +- opencascade/IntImp_ZerParFunc.gxx | 406 - opencascade/IntImp_ZerParFunc.lxx | 46 +- opencascade/IntPatch_ALine.hxx | 111 +- opencascade/IntPatch_ALine.lxx | 50 +- opencascade/IntPatch_ALineToWLine.hxx | 69 +- opencascade/IntPatch_ArcFunction.hxx | 68 +- opencascade/IntPatch_ArcFunction.lxx | 8 +- opencascade/IntPatch_CSFunction.hxx | 51 +- opencascade/IntPatch_CurvIntSurf.hxx | 74 +- opencascade/IntPatch_GLine.hxx | 177 +- opencascade/IntPatch_GLine.lxx | 82 +- opencascade/IntPatch_HCurve2dTool.hxx | 119 +- opencascade/IntPatch_HCurve2dTool.lxx | 175 +- opencascade/IntPatch_HInterTool.hxx | 135 +- opencascade/IntPatch_HInterTool.lxx | 8 +- opencascade/IntPatch_IType.hxx | 17 +- opencascade/IntPatch_ImpImpIntersection.hxx | 93 +- opencascade/IntPatch_ImpImpIntersection.lxx | 60 +- opencascade/IntPatch_ImpImpIntersection_0.gxx | 2075 -- opencascade/IntPatch_ImpImpIntersection_1.gxx | 164 - opencascade/IntPatch_ImpImpIntersection_2.gxx | 582 - opencascade/IntPatch_ImpImpIntersection_3.gxx | 803 - opencascade/IntPatch_ImpImpIntersection_4.gxx | 4438 --- opencascade/IntPatch_ImpImpIntersection_5.gxx | 832 - opencascade/IntPatch_ImpImpIntersection_6.gxx | 181 - opencascade/IntPatch_ImpPrmIntersection.hxx | 86 +- opencascade/IntPatch_ImpPrmIntersection.lxx | 38 +- .../IntPatch_InterferencePolyhedron.hxx | 74 +- opencascade/IntPatch_Intersection.hxx | 218 +- opencascade/IntPatch_Intersection.lxx | 56 +- opencascade/IntPatch_Line.hxx | 87 +- opencascade/IntPatch_Line.lxx | 60 +- opencascade/IntPatch_LineConstructor.hxx | 35 +- opencascade/IntPatch_Point.hxx | 190 +- opencascade/IntPatch_Point.lxx | 166 +- opencascade/IntPatch_PointLine.hxx | 50 +- opencascade/IntPatch_PolyArc.hxx | 47 +- opencascade/IntPatch_PolyLine.hxx | 45 +- opencascade/IntPatch_Polygo.hxx | 47 +- opencascade/IntPatch_Polygo.lxx | 31 +- opencascade/IntPatch_Polyhedron.hxx | 168 +- opencascade/IntPatch_PolyhedronTool.hxx | 58 +- opencascade/IntPatch_PolyhedronTool.lxx | 39 +- opencascade/IntPatch_PrmPrmIntersection.hxx | 219 +- opencascade/IntPatch_PrmPrmIntersection.lxx | 124 +- .../IntPatch_PrmPrmIntersection_T3Bits.hxx | 26 +- opencascade/IntPatch_RLine.hxx | 170 +- opencascade/IntPatch_RLine.lxx | 62 +- opencascade/IntPatch_RstInt.hxx | 18 +- opencascade/IntPatch_SearchPnt.hxx | 1 - ...IntPatch_SequenceOfIWLineOfTheIWalking.hxx | 3 +- opencascade/IntPatch_SequenceOfLine.hxx | 1 - ...atch_SequenceOfPathPointOfTheSOnBounds.hxx | 3 +- opencascade/IntPatch_SequenceOfPoint.hxx | 1 - ...tPatch_SequenceOfSegmentOfTheSOnBounds.hxx | 3 +- opencascade/IntPatch_SpecialPoints.hxx | 122 +- .../IntPatch_TheIWLineOfTheIWalking.hxx | 151 +- opencascade/IntPatch_TheIWalking.hxx | 223 +- .../IntPatch_ThePathPointOfTheSOnBounds.hxx | 66 +- opencascade/IntPatch_TheSOnBounds.hxx | 58 +- opencascade/IntPatch_TheSearchInside.hxx | 55 +- .../IntPatch_TheSegmentOfTheSOnBounds.hxx | 57 +- opencascade/IntPatch_TheSurfFunction.hxx | 97 +- opencascade/IntPatch_WLine.hxx | 194 +- opencascade/IntPatch_WLine.lxx | 66 +- opencascade/IntPatch_WLineTool.hxx | 39 +- opencascade/IntPolyh_Array.hxx | 154 +- opencascade/IntPolyh_ArrayOfEdges.hxx | 2 +- opencascade/IntPolyh_ArrayOfPointNormal.hxx | 2 +- opencascade/IntPolyh_ArrayOfPoints.hxx | 2 +- opencascade/IntPolyh_ArrayOfSectionLines.hxx | 2 +- opencascade/IntPolyh_ArrayOfTangentZones.hxx | 2 +- opencascade/IntPolyh_ArrayOfTriangles.hxx | 4 +- opencascade/IntPolyh_Couple.hxx | 108 +- opencascade/IntPolyh_Edge.hxx | 77 +- opencascade/IntPolyh_Intersection.hxx | 97 +- opencascade/IntPolyh_ListOfCouples.hxx | 4 +- opencascade/IntPolyh_MaillageAffinage.hxx | 169 +- opencascade/IntPolyh_Point.hxx | 196 +- opencascade/IntPolyh_SectionLine.hxx | 76 +- opencascade/IntPolyh_SeqOfStartPoints.hxx | 1 - opencascade/IntPolyh_StartPoint.hxx | 130 +- opencascade/IntPolyh_Tools.hxx | 29 +- opencascade/IntPolyh_Triangle.hxx | 253 +- opencascade/IntRes2d_Domain.hxx | 117 +- opencascade/IntRes2d_Domain.lxx | 101 +- opencascade/IntRes2d_Intersection.hxx | 101 +- opencascade/IntRes2d_Intersection.lxx | 101 +- opencascade/IntRes2d_IntersectionPoint.hxx | 67 +- opencascade/IntRes2d_IntersectionPoint.lxx | 78 +- opencascade/IntRes2d_IntersectionSegment.hxx | 67 +- opencascade/IntRes2d_IntersectionSegment.lxx | 148 +- opencascade/IntRes2d_Position.hxx | 7 +- .../IntRes2d_SequenceOfIntersectionPoint.hxx | 1 - ...IntRes2d_SequenceOfIntersectionSegment.hxx | 1 - opencascade/IntRes2d_Situation.hxx | 7 +- opencascade/IntRes2d_Transition.hxx | 87 +- opencascade/IntRes2d_Transition.lxx | 111 +- opencascade/IntRes2d_TypeTrans.hxx | 9 +- opencascade/IntStart_PathPoint.gxx | 38 - opencascade/IntStart_PathPoint.lxx | 49 +- opencascade/IntStart_SITopolTool.hxx | 24 +- opencascade/IntStart_SearchInside.gxx | 262 - opencascade/IntStart_SearchInside.lxx | 23 +- opencascade/IntStart_SearchOnBoundaries.gxx | 1188 - opencascade/IntStart_SearchOnBoundaries.lxx | 53 +- opencascade/IntStart_Segment.gxx | 37 - opencascade/IntStart_Segment.lxx | 37 +- opencascade/IntSurf.hxx | 13 +- opencascade/IntSurf_Couple.hxx | 35 +- opencascade/IntSurf_Couple.lxx | 24 +- opencascade/IntSurf_InteriorPoint.hxx | 69 +- opencascade/IntSurf_InteriorPoint.lxx | 25 +- opencascade/IntSurf_InteriorPointTool.hxx | 41 +- opencascade/IntSurf_InteriorPointTool.lxx | 21 +- opencascade/IntSurf_LineOn2S.hxx | 65 +- opencascade/IntSurf_LineOn2S.lxx | 23 +- .../IntSurf_ListIteratorOfListOfPntOn2S.hxx | 1 - opencascade/IntSurf_ListOfPntOn2S.hxx | 3 +- opencascade/IntSurf_PathPoint.hxx | 68 +- opencascade/IntSurf_PathPoint.lxx | 61 +- opencascade/IntSurf_PathPointTool.hxx | 57 +- opencascade/IntSurf_PathPointTool.lxx | 44 +- opencascade/IntSurf_PntOn2S.hxx | 89 +- opencascade/IntSurf_PntOn2S.lxx | 47 +- opencascade/IntSurf_Quadric.hxx | 109 +- opencascade/IntSurf_Quadric.lxx | 30 +- opencascade/IntSurf_QuadricTool.hxx | 49 +- opencascade/IntSurf_QuadricTool.lxx | 41 +- opencascade/IntSurf_SequenceOfCouple.hxx | 1 - .../IntSurf_SequenceOfInteriorPoint.hxx | 1 - opencascade/IntSurf_SequenceOfPathPoint.hxx | 1 - opencascade/IntSurf_Situation.hxx | 7 +- opencascade/IntSurf_Transition.hxx | 65 +- opencascade/IntSurf_Transition.lxx | 56 +- opencascade/IntSurf_TypeTrans.hxx | 9 +- opencascade/IntTools.hxx | 33 +- opencascade/IntTools_Array1OfRange.hxx | 1 - opencascade/IntTools_Array1OfRoots.hxx | 1 - opencascade/IntTools_BaseRangeSample.hxx | 7 +- opencascade/IntTools_BeanFaceIntersector.hxx | 174 +- opencascade/IntTools_CommonPrt.hxx | 105 +- opencascade/IntTools_Context.hxx | 179 +- opencascade/IntTools_Curve.hxx | 74 +- .../IntTools_CurveRangeLocalizeData.hxx | 28 +- opencascade/IntTools_CurveRangeSample.hxx | 47 +- ...MapIteratorOfDataMapOfSurfaceSampleBox.hxx | 1 - .../IntTools_DataMapOfCurveSampleBox.hxx | 6 +- .../IntTools_DataMapOfSurfaceSampleBox.hxx | 7 +- opencascade/IntTools_EdgeEdge.hxx | 163 +- opencascade/IntTools_EdgeEdge.lxx | 220 +- opencascade/IntTools_EdgeFace.hxx | 134 +- opencascade/IntTools_FClass2d.hxx | 39 +- opencascade/IntTools_FaceFace.hxx | 88 +- .../IntTools_ListIteratorOfListOfBox.hxx | 1 - ...s_ListIteratorOfListOfCurveRangeSample.hxx | 1 - ...ListIteratorOfListOfSurfaceRangeSample.hxx | 1 - opencascade/IntTools_ListOfBox.hxx | 3 +- .../IntTools_ListOfCurveRangeSample.hxx | 4 +- .../IntTools_ListOfSurfaceRangeSample.hxx | 4 +- ...IntTools_MapIteratorOfMapOfCurveSample.hxx | 1 - ...tTools_MapIteratorOfMapOfSurfaceSample.hxx | 1 - opencascade/IntTools_MapOfCurveSample.hxx | 3 +- opencascade/IntTools_MapOfSurfaceSample.hxx | 4 +- opencascade/IntTools_MarkedRangeSet.hxx | 66 +- opencascade/IntTools_PntOn2Faces.hxx | 43 +- opencascade/IntTools_PntOnFace.hxx | 58 +- opencascade/IntTools_Range.hxx | 37 +- opencascade/IntTools_Root.hxx | 75 +- opencascade/IntTools_SequenceOfCommonPrts.hxx | 1 - opencascade/IntTools_SequenceOfCurves.hxx | 1 - .../IntTools_SequenceOfPntOn2Faces.hxx | 1 - opencascade/IntTools_SequenceOfRanges.hxx | 1 - opencascade/IntTools_SequenceOfRoots.hxx | 1 - opencascade/IntTools_ShrunkRange.hxx | 72 +- .../IntTools_SurfaceRangeLocalizeData.hxx | 193 +- .../IntTools_SurfaceRangeLocalizeData.lxx | 57 +- opencascade/IntTools_SurfaceRangeSample.hxx | 127 +- opencascade/IntTools_SurfaceRangeSample.lxx | 76 +- opencascade/IntTools_Tools.hxx | 156 +- opencascade/IntTools_TopolTool.hxx | 53 +- opencascade/IntTools_WLineTool.hxx | 36 +- opencascade/IntWalk_IWLine.gxx | 37 - opencascade/IntWalk_IWLine.lxx | 111 +- opencascade/IntWalk_IWalking.gxx | 26 - opencascade/IntWalk_IWalking.lxx | 43 +- opencascade/IntWalk_IWalking_1.gxx | 362 - opencascade/IntWalk_IWalking_2.gxx | 935 - opencascade/IntWalk_IWalking_3.gxx | 531 - opencascade/IntWalk_IWalking_4.gxx | 572 - opencascade/IntWalk_IWalking_5.gxx | 310 - opencascade/IntWalk_IWalking_6.gxx | 272 - opencascade/IntWalk_PWalking.hxx | 276 +- opencascade/IntWalk_PWalking.lxx | 65 +- opencascade/IntWalk_StatusDeflection.hxx | 13 +- opencascade/IntWalk_TheFunctionOfTheInt2S.hxx | 110 +- opencascade/IntWalk_TheInt2S.hxx | 119 +- opencascade/IntWalk_VectorOfInteger.hxx | 4 +- opencascade/IntWalk_VectorOfWalkingData.hxx | 10 +- .../Interface_Array1OfFileParameter.hxx | 1 - .../Interface_Array1OfHAsciiString.hxx | 1 - opencascade/Interface_BitMap.hxx | 124 +- opencascade/Interface_Category.hxx | 51 +- opencascade/Interface_Check.hxx | 192 +- opencascade/Interface_CheckFailure.hxx | 5 +- opencascade/Interface_CheckIterator.hxx | 130 +- opencascade/Interface_CheckStatus.hxx | 12 +- opencascade/Interface_CheckTool.hxx | 71 +- opencascade/Interface_CopyControl.hxx | 32 +- opencascade/Interface_CopyMap.hxx | 38 +- opencascade/Interface_CopyTool.hxx | 118 +- ...MapIteratorOfDataMapOfTransientInteger.hxx | 1 - .../Interface_DataMapOfTransientInteger.hxx | 7 +- opencascade/Interface_DataState.hxx | 14 +- opencascade/Interface_EntityCluster.hxx | 67 +- opencascade/Interface_EntityIterator.hxx | 63 +- opencascade/Interface_EntityList.hxx | 67 +- opencascade/Interface_FileParameter.hxx | 52 +- opencascade/Interface_FileReaderData.hxx | 147 +- opencascade/Interface_FileReaderTool.hxx | 117 +- opencascade/Interface_FloatWriter.hxx | 75 +- opencascade/Interface_GTool.hxx | 71 +- opencascade/Interface_GeneralLib.hxx | 56 +- opencascade/Interface_GeneralModule.hxx | 115 +- .../Interface_GlobalNodeOfGeneralLib.hxx | 38 +- .../Interface_GlobalNodeOfReaderLib.hxx | 38 +- opencascade/Interface_Graph.hxx | 180 +- opencascade/Interface_GraphContent.hxx | 50 +- .../Interface_HArray1OfHAsciiString.hxx | 1 - opencascade/Interface_HGraph.hxx | 49 +- opencascade/Interface_HSequenceOfCheck.hxx | 1 - .../Interface_IndexedMapOfAsciiString.hxx | 1 - opencascade/Interface_IntList.hxx | 77 +- opencascade/Interface_IntVal.hxx | 26 +- opencascade/Interface_InterfaceError.hxx | 5 +- opencascade/Interface_InterfaceMismatch.hxx | 5 +- opencascade/Interface_InterfaceModel.hxx | 289 +- opencascade/Interface_JaggedArray.gxx | 39 - opencascade/Interface_LineBuffer.hxx | 71 +- opencascade/Interface_MSG.hxx | 152 +- opencascade/Interface_NodeOfGeneralLib.hxx | 35 +- opencascade/Interface_NodeOfReaderLib.hxx | 35 +- opencascade/Interface_ParamList.hxx | 61 +- opencascade/Interface_ParamList.lxx | 5 +- opencascade/Interface_ParamSet.hxx | 69 +- opencascade/Interface_ParamType.hxx | 23 +- opencascade/Interface_Protocol.hxx | 75 +- opencascade/Interface_ReaderLib.hxx | 56 +- opencascade/Interface_ReaderModule.hxx | 41 +- opencascade/Interface_Recognizer.gxx | 60 - opencascade/Interface_ReportEntity.hxx | 49 +- opencascade/Interface_STAT.hxx | 115 +- opencascade/Interface_SequenceOfCheck.hxx | 1 - opencascade/Interface_ShareFlags.hxx | 62 +- opencascade/Interface_ShareTool.hxx | 80 +- opencascade/Interface_SignLabel.hxx | 30 +- opencascade/Interface_SignType.hxx | 36 +- opencascade/Interface_Static.hxx | 166 +- opencascade/Interface_StaticSatisfies.hxx | 2 +- opencascade/Interface_Statics.hxx | 51 +- opencascade/Interface_Translates.hxx | 66 +- opencascade/Interface_TypedValue.hxx | 54 +- opencascade/Interface_UndefinedContent.hxx | 98 +- opencascade/Interface_ValueInterpret.hxx | 5 +- opencascade/Interface_ValueSatisfies.hxx | 2 +- .../Interface_VectorOfFileParameter.hxx | 1 - opencascade/Interface_Version.hxx | 7 +- opencascade/Intf.hxx | 19 +- opencascade/Intf_Array1OfLin.hxx | 1 - opencascade/Intf_Interference.hxx | 75 +- opencascade/Intf_Interference.lxx | 18 +- opencascade/Intf_InterferencePolygon2d.hxx | 58 +- .../Intf_InterferencePolygonPolyhedron.gxx | 1316 - opencascade/Intf_PIType.hxx | 8 +- opencascade/Intf_Polygon2d.hxx | 37 +- opencascade/Intf_Polygon2d.lxx | 6 +- opencascade/Intf_SectionLine.hxx | 81 +- opencascade/Intf_SectionLine.lxx | 6 +- opencascade/Intf_SectionPoint.hxx | 102 +- opencascade/Intf_SectionPoint.lxx | 27 +- opencascade/Intf_SeqOfSectionLine.hxx | 1 - opencascade/Intf_SeqOfSectionPoint.hxx | 1 - opencascade/Intf_SeqOfTangentZone.hxx | 1 - opencascade/Intf_TangentZone.hxx | 107 +- opencascade/Intf_TangentZone.lxx | 21 +- opencascade/Intf_Tool.hxx | 76 +- opencascade/Intrv_Interval.hxx | 140 +- opencascade/Intrv_Interval.lxx | 277 +- opencascade/Intrv_Intervals.hxx | 49 +- opencascade/Intrv_Intervals.lxx | 23 +- opencascade/Intrv_Position.hxx | 27 +- opencascade/Intrv_SequenceOfInterval.hxx | 1 - opencascade/LDOMBasicString.hxx | 130 +- opencascade/LDOMParser.hxx | 62 +- opencascade/LDOMString.hxx | 72 +- opencascade/LDOM_Attr.hxx | 39 +- opencascade/LDOM_BasicAttribute.hxx | 51 +- opencascade/LDOM_BasicElement.hxx | 99 +- opencascade/LDOM_BasicNode.hxx | 53 +- opencascade/LDOM_BasicText.hxx | 45 +- opencascade/LDOM_CDATASection.hxx | 34 +- opencascade/LDOM_CharReference.hxx | 15 +- opencascade/LDOM_CharacterData.hxx | 42 +- opencascade/LDOM_Comment.hxx | 35 +- opencascade/LDOM_DeclareSequence.hxx | 484 +- opencascade/LDOM_Document.hxx | 70 +- opencascade/LDOM_DocumentType.hxx | 8 +- opencascade/LDOM_Element.hxx | 66 +- opencascade/LDOM_LDOMImplementation.hxx | 12 +- opencascade/LDOM_MemManager.hxx | 126 +- opencascade/LDOM_Node.hxx | 135 +- opencascade/LDOM_NodeList.hxx | 36 +- opencascade/LDOM_OSStream.hxx | 47 +- opencascade/LDOM_Text.hxx | 35 +- opencascade/LDOM_XmlReader.hxx | 66 +- opencascade/LDOM_XmlWriter.hxx | 27 +- opencascade/LProp3d_CLProps.hxx | 90 +- opencascade/LProp3d_CurveTool.hxx | 65 +- opencascade/LProp3d_SLProps.hxx | 120 +- opencascade/LProp3d_SurfaceTool.hxx | 69 +- opencascade/LProp_AnalyticCurInf.hxx | 29 +- opencascade/LProp_BadContinuity.hxx | 5 +- opencascade/LProp_CIType.hxx | 7 +- opencascade/LProp_CLProps.gxx | 282 - opencascade/LProp_CurAndInf.hxx | 46 +- opencascade/LProp_NotDefined.hxx | 5 +- opencascade/LProp_SLProps.gxx | 538 - opencascade/LProp_SequenceOfCIType.hxx | 1 - opencascade/LProp_Status.hxx | 9 +- opencascade/Law.hxx | 56 +- opencascade/Law_BSpFunc.hxx | 61 +- opencascade/Law_BSpline.hxx | 296 +- opencascade/Law_BSplineKnotSplitting.hxx | 36 +- opencascade/Law_Composite.hxx | 51 +- opencascade/Law_Constant.hxx | 64 +- opencascade/Law_Function.hxx | 55 +- opencascade/Law_Interpol.hxx | 46 +- opencascade/Law_Interpolate.hxx | 70 +- opencascade/Law_Laws.hxx | 3 +- opencascade/Law_Linear.hxx | 65 +- opencascade/Law_ListIteratorOfLaws.hxx | 1 - opencascade/Law_S.hxx | 37 +- opencascade/LibCtl_GlobalNode.gxx | 48 - opencascade/LibCtl_Library.gxx | 157 - opencascade/LibCtl_Node.gxx | 45 - opencascade/LocOpe.hxx | 20 +- opencascade/LocOpe_BuildShape.hxx | 36 +- opencascade/LocOpe_BuildShape.lxx | 21 +- opencascade/LocOpe_BuildWires.hxx | 39 +- opencascade/LocOpe_CSIntersector.hxx | 104 +- opencascade/LocOpe_CSIntersector.lxx | 37 +- opencascade/LocOpe_CurveShapeIntersector.hxx | 87 +- opencascade/LocOpe_CurveShapeIntersector.lxx | 67 +- opencascade/LocOpe_DPrism.hxx | 75 +- ...Ope_DataMapIteratorOfDataMapOfShapePnt.hxx | 1 - opencascade/LocOpe_DataMapOfShapePnt.hxx | 6 +- opencascade/LocOpe_FindEdges.hxx | 50 +- opencascade/LocOpe_FindEdges.lxx | 43 +- opencascade/LocOpe_FindEdgesInFace.hxx | 46 +- opencascade/LocOpe_FindEdgesInFace.lxx | 37 +- opencascade/LocOpe_GeneratedShape.hxx | 32 +- opencascade/LocOpe_Generator.hxx | 62 +- opencascade/LocOpe_Generator.lxx | 44 +- opencascade/LocOpe_GluedShape.hxx | 49 +- opencascade/LocOpe_Gluer.hxx | 82 +- opencascade/LocOpe_Gluer.lxx | 72 +- opencascade/LocOpe_LinearForm.hxx | 77 +- opencascade/LocOpe_LinearForm.lxx | 40 +- opencascade/LocOpe_Operation.hxx | 7 +- opencascade/LocOpe_Pipe.hxx | 53 +- opencascade/LocOpe_Pipe.lxx | 25 +- opencascade/LocOpe_PntFace.hxx | 64 +- opencascade/LocOpe_Prism.hxx | 62 +- opencascade/LocOpe_Revol.hxx | 78 +- opencascade/LocOpe_RevolutionForm.hxx | 68 +- opencascade/LocOpe_SequenceOfCirc.hxx | 1 - opencascade/LocOpe_SequenceOfLin.hxx | 1 - opencascade/LocOpe_SequenceOfPntFace.hxx | 1 - opencascade/LocOpe_SplitDrafts.hxx | 43 +- opencascade/LocOpe_SplitShape.hxx | 79 +- opencascade/LocOpe_SplitShape.lxx | 22 +- opencascade/LocOpe_Spliter.hxx | 68 +- opencascade/LocOpe_Spliter.lxx | 44 +- opencascade/LocOpe_WiresOnShape.hxx | 97 +- opencascade/LocOpe_WiresOnShape.lxx | 12 +- opencascade/LocalAnalysis.hxx | 11 +- opencascade/LocalAnalysis_CurveContinuity.hxx | 132 +- opencascade/LocalAnalysis_StatusErrorType.hxx | 11 +- .../LocalAnalysis_SurfaceContinuity.hxx | 184 +- opencascade/MAT2d_Array2OfConnexion.hxx | 1 - opencascade/MAT2d_BiInt.hxx | 58 +- opencascade/MAT2d_Circuit.hxx | 99 +- opencascade/MAT2d_Connexion.hxx | 110 +- opencascade/MAT2d_CutCurve.hxx | 46 +- ...DataMapIteratorOfDataMapOfBiIntInteger.hxx | 1 - ...ratorOfDataMapOfBiIntSequenceOfInteger.hxx | 1 - ...DataMapIteratorOfDataMapOfIntegerBisec.hxx | 1 - ...MapIteratorOfDataMapOfIntegerConnexion.hxx | 1 - ...DataMapIteratorOfDataMapOfIntegerPnt2d.hxx | 1 - ...rOfDataMapOfIntegerSequenceOfConnexion.hxx | 1 - ...DataMapIteratorOfDataMapOfIntegerVec2d.hxx | 1 - opencascade/MAT2d_DataMapOfBiIntInteger.hxx | 6 +- .../MAT2d_DataMapOfBiIntSequenceOfInteger.hxx | 7 +- opencascade/MAT2d_DataMapOfIntegerBisec.hxx | 6 +- .../MAT2d_DataMapOfIntegerConnexion.hxx | 7 +- opencascade/MAT2d_DataMapOfIntegerPnt2d.hxx | 6 +- ...2d_DataMapOfIntegerSequenceOfConnexion.hxx | 7 +- opencascade/MAT2d_DataMapOfIntegerVec2d.hxx | 6 +- opencascade/MAT2d_Mat2d.hxx | 88 +- opencascade/MAT2d_MiniPath.hxx | 72 +- opencascade/MAT2d_SequenceOfConnexion.hxx | 1 - .../MAT2d_SequenceOfSequenceOfCurve.hxx | 1 - .../MAT2d_SequenceOfSequenceOfGeometry.hxx | 1 - opencascade/MAT2d_Tool2d.hxx | 147 +- opencascade/MAT_Arc.hxx | 103 +- opencascade/MAT_BasicElt.hxx | 40 +- opencascade/MAT_Bisector.hxx | 131 +- ...T_DataMapIteratorOfDataMapOfIntegerArc.hxx | 1 - ...aMapIteratorOfDataMapOfIntegerBasicElt.hxx | 1 - ...aMapIteratorOfDataMapOfIntegerBisector.hxx | 1 - ..._DataMapIteratorOfDataMapOfIntegerNode.hxx | 1 - opencascade/MAT_DataMapOfIntegerArc.hxx | 6 +- opencascade/MAT_DataMapOfIntegerBasicElt.hxx | 6 +- opencascade/MAT_DataMapOfIntegerBisector.hxx | 6 +- opencascade/MAT_DataMapOfIntegerNode.hxx | 6 +- opencascade/MAT_Edge.hxx | 59 +- opencascade/MAT_Graph.hxx | 86 +- opencascade/MAT_ListOfBisector.hxx | 93 +- opencascade/MAT_ListOfEdge.hxx | 91 +- opencascade/MAT_Node.hxx | 52 +- opencascade/MAT_SequenceOfArc.hxx | 1 - opencascade/MAT_SequenceOfBasicElt.hxx | 1 - opencascade/MAT_Side.hxx | 4 +- opencascade/MAT_TList.gxx | 413 - opencascade/MAT_TList.lxx | 12 +- opencascade/MAT_TListNode.gxx | 22 - opencascade/MAT_TListNode.lxx | 44 +- opencascade/MAT_TListNodeOfListOfBisector.hxx | 42 +- opencascade/MAT_TListNodeOfListOfEdge.hxx | 42 +- opencascade/MAT_Zone.hxx | 45 +- opencascade/Media_BufferPool.hxx | 8 +- opencascade/Media_CodecContext.hxx | 29 +- opencascade/Media_FormatContext.hxx | 47 +- opencascade/Media_Frame.hxx | 27 +- opencascade/Media_IFrameQueue.hxx | 6 +- opencascade/Media_Packet.hxx | 5 +- opencascade/Media_PlayerContext.hxx | 95 +- opencascade/Media_Scaler.hxx | 15 +- opencascade/Media_Timer.hxx | 28 +- .../MeshVS_Array1OfSequenceOfInteger.hxx | 1 - opencascade/MeshVS_Buffer.hxx | 34 +- opencascade/MeshVS_BuilderPriority.hxx | 3 +- opencascade/MeshVS_CommonSensitiveEntity.hxx | 70 +- ...apIteratorOfDataMapOfColorMapOfInteger.hxx | 1 - ...rOfDataMapOfHArray1OfSequenceOfInteger.hxx | 1 - ...pIteratorOfDataMapOfIntegerAsciiString.hxx | 1 - ...taMapIteratorOfDataMapOfIntegerBoolean.hxx | 1 - ...DataMapIteratorOfDataMapOfIntegerColor.hxx | 1 - ...aMapIteratorOfDataMapOfIntegerMaterial.hxx | 1 - ...ratorOfDataMapOfIntegerMeshEntityOwner.hxx | 1 - ...DataMapIteratorOfDataMapOfIntegerOwner.hxx | 1 - ...MapIteratorOfDataMapOfIntegerTwoColors.hxx | 1 - ...ataMapIteratorOfDataMapOfIntegerVector.hxx | 1 - ...eratorOfDataMapOfTwoColorsMapOfInteger.hxx | 1 - .../MeshVS_DataMapOfColorMapOfInteger.hxx | 5 +- ...VS_DataMapOfHArray1OfSequenceOfInteger.hxx | 7 +- .../MeshVS_DataMapOfIntegerAsciiString.hxx | 7 +- .../MeshVS_DataMapOfIntegerBoolean.hxx | 6 +- opencascade/MeshVS_DataMapOfIntegerColor.hxx | 6 +- .../MeshVS_DataMapOfIntegerMaterial.hxx | 7 +- ...MeshVS_DataMapOfIntegerMeshEntityOwner.hxx | 7 +- opencascade/MeshVS_DataMapOfIntegerOwner.hxx | 7 +- .../MeshVS_DataMapOfIntegerTwoColors.hxx | 6 +- opencascade/MeshVS_DataMapOfIntegerVector.hxx | 6 +- .../MeshVS_DataMapOfTwoColorsMapOfInteger.hxx | 7 +- opencascade/MeshVS_DataSource.hxx | 166 +- opencascade/MeshVS_DataSource3D.hxx | 35 +- opencascade/MeshVS_DeformedDataSource.hxx | 99 +- opencascade/MeshVS_DisplayModeFlags.hxx | 18 +- opencascade/MeshVS_Drawer.hxx | 96 +- opencascade/MeshVS_DrawerAttribute.hxx | 94 +- opencascade/MeshVS_DummySensitiveEntity.hxx | 8 +- .../MeshVS_ElementalColorPrsBuilder.hxx | 85 +- opencascade/MeshVS_EntityType.hxx | 1 - .../MeshVS_HArray1OfSequenceOfInteger.hxx | 1 - .../MeshVS_MapIteratorOfMapOfTwoNodes.hxx | 1 - opencascade/MeshVS_MapOfTwoNodes.hxx | 3 +- opencascade/MeshVS_Mesh.hxx | 205 +- opencascade/MeshVS_MeshEntityOwner.hxx | 63 +- opencascade/MeshVS_MeshOwner.hxx | 52 +- opencascade/MeshVS_MeshPrsBuilder.hxx | 107 +- opencascade/MeshVS_MeshPrsBuilder.lxx | 12 - opencascade/MeshVS_MeshSelectionMethod.hxx | 6 +- opencascade/MeshVS_NodalColorPrsBuilder.hxx | 100 +- opencascade/MeshVS_PrsBuilder.hxx | 82 +- opencascade/MeshVS_SelectionModeFlags.hxx | 15 +- opencascade/MeshVS_SensitiveFace.hxx | 11 +- opencascade/MeshVS_SensitiveMesh.hxx | 23 +- opencascade/MeshVS_SensitivePolyhedron.hxx | 27 +- opencascade/MeshVS_SensitiveQuad.hxx | 31 +- opencascade/MeshVS_SensitiveSegment.hxx | 9 +- opencascade/MeshVS_SequenceOfPrsBuilder.hxx | 1 - opencascade/MeshVS_SymmetricPairHasher.hxx | 4 +- opencascade/MeshVS_TextPrsBuilder.hxx | 62 +- opencascade/MeshVS_Tool.hxx | 63 +- opencascade/MeshVS_TwoColors.hxx | 58 +- opencascade/MeshVS_TwoNodes.hxx | 35 +- opencascade/MeshVS_VectorPrsBuilder.hxx | 103 +- opencascade/Message.hxx | 79 +- opencascade/Message_Alert.hxx | 32 +- opencascade/Message_AlertExtended.hxx | 30 +- opencascade/Message_Algorithm.hxx | 127 +- opencascade/Message_Algorithm.lxx | 61 +- opencascade/Message_Attribute.hxx | 9 +- opencascade/Message_AttributeMeter.hxx | 59 +- opencascade/Message_AttributeObject.hxx | 12 +- opencascade/Message_AttributeStream.hxx | 12 +- opencascade/Message_CompositeAlerts.hxx | 24 +- opencascade/Message_ExecStatus.hxx | 210 +- opencascade/Message_Gravity.hxx | 10 +- opencascade/Message_HArrayOfMsg.hxx | 4 +- opencascade/Message_LazyProgressScope.hxx | 47 +- opencascade/Message_Level.hxx | 37 +- .../Message_ListIteratorOfListOfMsg.hxx | 1 - opencascade/Message_ListOfMsg.hxx | 3 +- opencascade/Message_Messenger.hxx | 99 +- opencascade/Message_Msg.hxx | 137 +- opencascade/Message_Msg.lxx | 46 +- opencascade/Message_MsgFile.hxx | 44 +- opencascade/Message_Printer.hxx | 33 +- opencascade/Message_PrinterOStream.hxx | 33 +- opencascade/Message_PrinterSystemLog.hxx | 12 +- opencascade/Message_PrinterToReport.hxx | 26 +- opencascade/Message_ProgressIndicator.hxx | 54 +- opencascade/Message_ProgressRange.hxx | 78 +- opencascade/Message_ProgressScope.hxx | 415 +- opencascade/Message_ProgressSentry.hxx | 44 +- opencascade/Message_Report.hxx | 94 +- opencascade/Message_SequenceOfPrinters.hxx | 1 - opencascade/Message_Status.hxx | 166 +- opencascade/Message_StatusType.hxx | 10 +- opencascade/MoniTool_AttrList.hxx | 102 +- opencascade/MoniTool_CaseData.hxx | 218 +- opencascade/MoniTool_DataInfo.hxx | 30 +- ...taMapIteratorOfDataMapOfShapeTransient.hxx | 1 - ...niTool_DataMapIteratorOfDataMapOfTimer.hxx | 1 - .../MoniTool_DataMapOfShapeTransient.hxx | 7 +- opencascade/MoniTool_DataMapOfTimer.hxx | 7 +- opencascade/MoniTool_Element.hxx | 40 +- opencascade/MoniTool_HSequenceOfElement.hxx | 1 - ...oniTool_IndexedDataMapOfShapeTransient.hxx | 6 +- opencascade/MoniTool_IntVal.hxx | 26 +- opencascade/MoniTool_Macros.hxx | 11 +- opencascade/MoniTool_RealVal.hxx | 26 +- opencascade/MoniTool_SequenceOfElement.hxx | 1 - opencascade/MoniTool_SignShape.hxx | 30 +- opencascade/MoniTool_SignText.hxx | 33 +- opencascade/MoniTool_Stat.hxx | 54 +- opencascade/MoniTool_Timer.hxx | 104 +- opencascade/MoniTool_Timer.lxx | 75 +- opencascade/MoniTool_TimerSentry.hxx | 39 +- opencascade/MoniTool_TimerSentry.lxx | 38 +- opencascade/MoniTool_TransientElem.hxx | 33 +- opencascade/MoniTool_TypedValue.hxx | 259 +- opencascade/MoniTool_ValueInterpret.hxx | 7 +- opencascade/MoniTool_ValueSatisfies.hxx | 2 +- opencascade/MoniTool_ValueType.hxx | 23 +- opencascade/NCollection_AccAllocator.hxx | 143 +- opencascade/NCollection_AliasedArray.hxx | 243 +- opencascade/NCollection_AlignedAllocator.hxx | 24 +- opencascade/NCollection_Allocator.hxx | 52 +- opencascade/NCollection_Array1.hxx | 245 +- opencascade/NCollection_Array2.hxx | 284 +- opencascade/NCollection_BaseAllocator.hxx | 35 +- opencascade/NCollection_BaseList.hxx | 138 +- opencascade/NCollection_BaseMap.hxx | 190 +- opencascade/NCollection_BasePointerVector.hxx | 28 +- opencascade/NCollection_BaseSequence.hxx | 150 +- opencascade/NCollection_Buffer.hxx | 69 +- opencascade/NCollection_CellFilter.hxx | 344 +- opencascade/NCollection_DataMap.hxx | 372 +- opencascade/NCollection_DefaultHasher.hxx | 55 +- opencascade/NCollection_DefineAlloc.hxx | 41 +- opencascade/NCollection_DefineHArray1.hxx | 67 +- opencascade/NCollection_DefineHArray2.hxx | 64 +- opencascade/NCollection_DefineHSequence.hxx | 64 +- opencascade/NCollection_DefineHasher.hxx | 27 +- opencascade/NCollection_DoubleMap.hxx | 409 +- opencascade/NCollection_DynamicArray.hxx | 253 +- opencascade/NCollection_EBTree.hxx | 180 +- opencascade/NCollection_HArray1.hxx | 3 +- opencascade/NCollection_HArray2.hxx | 3 +- opencascade/NCollection_HSequence.hxx | 4 +- opencascade/NCollection_Haft.h | 46 +- opencascade/NCollection_Handle.hxx | 69 +- opencascade/NCollection_HeapAllocator.hxx | 26 +- opencascade/NCollection_IncAllocator.hxx | 51 +- opencascade/NCollection_IndexedDataMap.hxx | 413 +- opencascade/NCollection_IndexedIterator.hxx | 129 +- opencascade/NCollection_IndexedMap.hxx | 308 +- opencascade/NCollection_Iterator.hxx | 100 +- opencascade/NCollection_Lerp.hxx | 30 +- opencascade/NCollection_List.hxx | 260 +- opencascade/NCollection_ListNode.hxx | 28 +- opencascade/NCollection_LocalArray.hxx | 46 +- opencascade/NCollection_Map.hxx | 591 +- opencascade/NCollection_MapAlgo.hxx | 334 + opencascade/NCollection_Mat3.hxx | 355 +- opencascade/NCollection_Mat4.hxx | 563 +- opencascade/NCollection_OccAllocator.hxx | 109 +- opencascade/NCollection_Primes.hxx | 37 + opencascade/NCollection_Sequence.hxx | 351 +- opencascade/NCollection_Shared.hxx | 58 +- opencascade/NCollection_SparseArray.hxx | 216 +- opencascade/NCollection_SparseArrayBase.hxx | 204 +- opencascade/NCollection_StlIterator.hxx | 135 +- opencascade/NCollection_TListIterator.hxx | 48 +- opencascade/NCollection_TListNode.hxx | 42 +- opencascade/NCollection_TypeDef.hxx | 6 +- opencascade/NCollection_UBTree.hxx | 405 +- opencascade/NCollection_UBTreeFiller.hxx | 134 +- opencascade/NCollection_UtfIterator.hxx | 105 +- opencascade/NCollection_UtfIterator.lxx | 189 +- opencascade/NCollection_UtfString.hxx | 206 +- opencascade/NCollection_UtfString.lxx | 270 +- opencascade/NCollection_Vec2.hxx | 182 +- opencascade/NCollection_Vec3.hxx | 225 +- opencascade/NCollection_Vec4.hxx | 180 +- opencascade/NCollection_WinHeapAllocator.hxx | 22 +- opencascade/NLPlate_HGPPConstraint.hxx | 90 +- opencascade/NLPlate_HPG0Constraint.hxx | 41 +- opencascade/NLPlate_HPG0G1Constraint.hxx | 36 +- opencascade/NLPlate_HPG0G2Constraint.hxx | 29 +- opencascade/NLPlate_HPG0G3Constraint.hxx | 30 +- opencascade/NLPlate_HPG1Constraint.hxx | 41 +- opencascade/NLPlate_HPG2Constraint.hxx | 26 +- opencascade/NLPlate_HPG3Constraint.hxx | 29 +- .../NLPlate_ListIteratorOfStackOfPlate.hxx | 1 - opencascade/NLPlate_NLPlate.hxx | 82 +- .../NLPlate_SequenceOfHGPPConstraint.hxx | 1 - opencascade/NLPlate_StackOfPlate.hxx | 3 +- opencascade/OSD.hxx | 38 +- opencascade/OSD_CachedFileSystem.hxx | 66 +- opencascade/OSD_Chronometer.hxx | 36 +- opencascade/OSD_Directory.hxx | 7 +- opencascade/OSD_DirectoryIterator.hxx | 39 +- opencascade/OSD_Disk.hxx | 23 +- opencascade/OSD_Environment.hxx | 57 +- opencascade/OSD_Error.hxx | 44 +- opencascade/OSD_ErrorList.hxx | 85 +- opencascade/OSD_Exception.hxx | 5 +- .../OSD_Exception_ACCESS_VIOLATION.hxx | 5 +- .../OSD_Exception_ARRAY_BOUNDS_EXCEEDED.hxx | 5 +- opencascade/OSD_Exception_CTRL_BREAK.hxx | 5 +- .../OSD_Exception_ILLEGAL_INSTRUCTION.hxx | 5 +- opencascade/OSD_Exception_INT_OVERFLOW.hxx | 5 +- .../OSD_Exception_INVALID_DISPOSITION.hxx | 5 +- opencascade/OSD_Exception_IN_PAGE_ERROR.hxx | 5 +- ...OSD_Exception_NONCONTINUABLE_EXCEPTION.hxx | 5 +- .../OSD_Exception_PRIV_INSTRUCTION.hxx | 5 +- opencascade/OSD_Exception_STACK_OVERFLOW.hxx | 5 +- .../OSD_Exception_STATUS_NO_MEMORY.hxx | 5 +- opencascade/OSD_File.hxx | 90 +- opencascade/OSD_FileIterator.hxx | 39 +- opencascade/OSD_FileNode.hxx | 46 +- opencascade/OSD_FileSystem.hxx | 85 +- opencascade/OSD_FileSystemSelector.hxx | 49 +- opencascade/OSD_FromWhere.hxx | 6 +- opencascade/OSD_Function.hxx | 2 +- opencascade/OSD_Host.hxx | 46 +- opencascade/OSD_KindFile.hxx | 10 +- opencascade/OSD_LoadMode.hxx | 4 +- opencascade/OSD_LocalFileSystem.hxx | 20 +- opencascade/OSD_LockType.hxx | 8 +- opencascade/OSD_MAllocHook.hxx | 48 +- opencascade/OSD_MemInfo.hxx | 36 +- opencascade/OSD_OEMType.hxx | 24 +- opencascade/OSD_OSDError.hxx | 5 +- opencascade/OSD_OpenFile.hxx | 118 +- opencascade/OSD_OpenMode.hxx | 6 +- opencascade/OSD_PThread.hxx | 4 +- opencascade/OSD_Parallel.hxx | 170 +- opencascade/OSD_Path.hxx | 225 +- opencascade/OSD_PerfMeter.h | 149 +- opencascade/OSD_PerfMeter.hxx | 43 +- opencascade/OSD_Process.hxx | 34 +- opencascade/OSD_Protection.hxx | 82 +- opencascade/OSD_SIGBUS.hxx | 5 +- opencascade/OSD_SIGHUP.hxx | 5 +- opencascade/OSD_SIGILL.hxx | 5 +- opencascade/OSD_SIGINT.hxx | 5 +- opencascade/OSD_SIGKILL.hxx | 5 +- opencascade/OSD_SIGQUIT.hxx | 5 +- opencascade/OSD_SIGSEGV.hxx | 5 +- opencascade/OSD_SIGSYS.hxx | 5 +- opencascade/OSD_SharedLibrary.hxx | 54 +- opencascade/OSD_Signal.hxx | 5 +- opencascade/OSD_SignalMode.hxx | 9 +- opencascade/OSD_SingleProtection.hxx | 32 +- opencascade/OSD_StreamBuffer.hxx | 11 +- opencascade/OSD_SysType.hxx | 24 +- opencascade/OSD_Thread.hxx | 31 +- opencascade/OSD_ThreadFunction.hxx | 9 +- opencascade/OSD_ThreadPool.hxx | 185 +- opencascade/OSD_Timer.hxx | 41 +- opencascade/OSD_WNT.hxx | 148 +- opencascade/OSD_WhoAmI.hxx | 30 +- opencascade/OpenGl_ArbDbg.hxx | 2 +- opencascade/OpenGl_ArbFBO.hxx | 22 +- opencascade/OpenGl_ArbSamplerObject.hxx | 21 +- opencascade/OpenGl_ArbTexBindless.hxx | 18 +- opencascade/OpenGl_Aspects.hxx | 46 +- opencascade/OpenGl_AspectsProgram.hxx | 22 +- opencascade/OpenGl_AspectsSprite.hxx | 56 +- opencascade/OpenGl_AspectsTextureSet.hxx | 36 +- opencascade/OpenGl_BackgroundArray.hxx | 41 +- opencascade/OpenGl_Buffer.hxx | 293 +- opencascade/OpenGl_BufferCompatT.hxx | 156 +- opencascade/OpenGl_CappingAlgo.hxx | 10 +- opencascade/OpenGl_CappingPlaneResource.hxx | 45 +- opencascade/OpenGl_Caps.hxx | 37 +- opencascade/OpenGl_Clipping.hxx | 69 +- opencascade/OpenGl_ClippingIterator.hxx | 28 +- opencascade/OpenGl_Context.hxx | 641 +- opencascade/OpenGl_DepthPeeling.hxx | 19 +- opencascade/OpenGl_Element.hxx | 34 +- opencascade/OpenGl_Flipper.hxx | 20 +- opencascade/OpenGl_Font.hxx | 74 +- opencascade/OpenGl_FrameBuffer.hxx | 315 +- opencascade/OpenGl_FrameStats.hxx | 24 +- opencascade/OpenGl_FrameStatsPrs.hxx | 35 +- opencascade/OpenGl_GLESExtensions.hxx | 1042 +- opencascade/OpenGl_GlCore11.hxx | 370 +- opencascade/OpenGl_GlCore11Fwd.hxx | 63 +- opencascade/OpenGl_GlCore12.hxx | 4 +- opencascade/OpenGl_GlCore13.hxx | 8 +- opencascade/OpenGl_GlCore14.hxx | 4 +- opencascade/OpenGl_GlCore15.hxx | 18 +- opencascade/OpenGl_GlCore20.hxx | 56 +- opencascade/OpenGl_GlCore21.hxx | 6 +- opencascade/OpenGl_GlCore30.hxx | 104 +- opencascade/OpenGl_GlCore31.hxx | 12 +- opencascade/OpenGl_GlCore32.hxx | 24 +- opencascade/OpenGl_GlCore33.hxx | 24 +- opencascade/OpenGl_GlCore40.hxx | 38 +- opencascade/OpenGl_GlCore41.hxx | 98 +- opencascade/OpenGl_GlCore42.hxx | 7 - opencascade/OpenGl_GlCore43.hxx | 46 +- opencascade/OpenGl_GlCore44.hxx | 12 +- opencascade/OpenGl_GlCore45.hxx | 172 +- opencascade/OpenGl_GlCore46.hxx | 4 +- opencascade/OpenGl_GlFunctions.hxx | 1503 +- opencascade/OpenGl_GlNative.hxx | 5 +- opencascade/OpenGl_GlTypes.hxx | 570 +- opencascade/OpenGl_GraduatedTrihedron.hxx | 179 +- opencascade/OpenGl_GraphicDriver.hxx | 129 +- opencascade/OpenGl_GraphicDriverFactory.hxx | 8 +- opencascade/OpenGl_Group.hxx | 74 +- opencascade/OpenGl_HaltonSampler.hxx | 67 +- opencascade/OpenGl_IndexBuffer.hxx | 6 +- opencascade/OpenGl_LayerFilter.hxx | 1 + opencascade/OpenGl_LayerList.hxx | 135 +- opencascade/OpenGl_LineAttributes.hxx | 16 +- opencascade/OpenGl_Material.hxx | 93 +- opencascade/OpenGl_MaterialState.hxx | 20 +- opencascade/OpenGl_MatrixState.hxx | 76 +- opencascade/OpenGl_NamedResource.hxx | 9 +- opencascade/OpenGl_PBREnvironment.hxx | 135 +- opencascade/OpenGl_PointSprite.hxx | 23 +- opencascade/OpenGl_PrimitiveArray.hxx | 82 +- opencascade/OpenGl_RenderFilter.hxx | 13 +- opencascade/OpenGl_Resource.hxx | 25 +- opencascade/OpenGl_Sampler.hxx | 119 +- opencascade/OpenGl_SceneGeometry.hxx | 124 +- opencascade/OpenGl_SetOfShaderPrograms.hxx | 20 +- opencascade/OpenGl_ShaderManager.hxx | 501 +- opencascade/OpenGl_ShaderObject.hxx | 56 +- opencascade/OpenGl_ShaderProgram.hxx | 507 +- opencascade/OpenGl_ShaderProgramDumpLevel.hxx | 7 +- opencascade/OpenGl_ShaderStates.hxx | 68 +- opencascade/OpenGl_ShadowMap.hxx | 36 +- opencascade/OpenGl_StencilTest.hxx | 17 +- opencascade/OpenGl_Structure.hxx | 89 +- opencascade/OpenGl_StructureShadow.hxx | 15 +- opencascade/OpenGl_Text.hxx | 141 +- opencascade/OpenGl_TextBuilder.hxx | 31 +- opencascade/OpenGl_Texture.hxx | 296 +- opencascade/OpenGl_TextureBuffer.hxx | 54 +- opencascade/OpenGl_TextureFormat.hxx | 257 +- opencascade/OpenGl_TextureSet.hxx | 69 +- opencascade/OpenGl_TextureSetPairIterator.hxx | 57 +- opencascade/OpenGl_TileSampler.hxx | 88 +- opencascade/OpenGl_UniformBuffer.hxx | 4 +- opencascade/OpenGl_Vec.hxx | 116 +- opencascade/OpenGl_VertexBuffer.hxx | 77 +- opencascade/OpenGl_VertexBufferEditor.hxx | 65 +- opencascade/OpenGl_View.hxx | 707 +- opencascade/OpenGl_Window.hxx | 45 +- opencascade/OpenGl_Workspace.hxx | 112 +- opencascade/OpenGl_glext.h | 30972 ++++++++++------ opencascade/OpenGl_khrplatform.h | 176 +- opencascade/PCDM.hxx | 14 +- opencascade/PCDM_BaseDriverPointer.hxx | 4 +- opencascade/PCDM_DOMHeaderParser.hxx | 22 +- opencascade/PCDM_Document.hxx | 23 +- opencascade/PCDM_DriverError.hxx | 5 +- opencascade/PCDM_ReadWriter.hxx | 95 +- opencascade/PCDM_ReadWriter_1.hxx | 70 +- opencascade/PCDM_Reader.hxx | 45 +- opencascade/PCDM_Reader.lxx | 7 +- opencascade/PCDM_ReaderFilter.hxx | 72 +- opencascade/PCDM_ReaderStatus.hxx | 52 +- opencascade/PCDM_Reference.hxx | 41 +- opencascade/PCDM_ReferenceIterator.hxx | 44 +- opencascade/PCDM_RetrievalDriver.hxx | 17 +- opencascade/PCDM_SequenceOfDocument.hxx | 1 - opencascade/PCDM_SequenceOfReference.hxx | 1 - opencascade/PCDM_StorageDriver.hxx | 63 +- opencascade/PCDM_StoreStatus.hxx | 18 +- opencascade/PCDM_TypeOfFileDriver.hxx | 9 +- opencascade/PCDM_Writer.hxx | 20 +- opencascade/PLib.hxx | 264 +- opencascade/PLib_Base.hxx | 63 +- opencascade/PLib_DoubleJacobiPolynomial.hxx | 102 +- opencascade/PLib_DoubleJacobiPolynomial.lxx | 10 +- opencascade/PLib_HermitJacobi.hxx | 95 +- opencascade/PLib_HermitJacobi.lxx | 4 +- opencascade/PLib_JacobiPolynomial.hxx | 110 +- opencascade/PLib_JacobiPolynomial.lxx | 4 +- .../Plate_Array1OfPinpointConstraint.hxx | 1 - opencascade/Plate_D1.hxx | 32 +- opencascade/Plate_D1.lxx | 1 - opencascade/Plate_D2.hxx | 29 +- opencascade/Plate_D3.hxx | 34 +- opencascade/Plate_FreeGtoCConstraint.hxx | 65 +- opencascade/Plate_FreeGtoCConstraint.lxx | 9 +- .../Plate_GlobalTranslationConstraint.hxx | 25 +- opencascade/Plate_GtoCConstraint.hxx | 90 +- opencascade/Plate_GtoCConstraint.lxx | 4 +- .../Plate_HArray1OfPinpointConstraint.hxx | 1 - opencascade/Plate_LineConstraint.hxx | 30 +- opencascade/Plate_LinearScalarConstraint.hxx | 61 +- opencascade/Plate_LinearScalarConstraint.lxx | 2 - opencascade/Plate_LinearXYZConstraint.hxx | 58 +- opencascade/Plate_LinearXYZConstraint.lxx | 2 - opencascade/Plate_PinpointConstraint.hxx | 42 +- opencascade/Plate_PinpointConstraint.lxx | 11 +- opencascade/Plate_PlaneConstraint.hxx | 30 +- opencascade/Plate_Plate.hxx | 198 +- opencascade/Plate_Plate.lxx | 57 +- opencascade/Plate_SampledCurveConstraint.hxx | 28 +- ...Plate_SequenceOfLinearScalarConstraint.hxx | 1 - .../Plate_SequenceOfLinearXYZConstraint.hxx | 1 - .../Plate_SequenceOfPinpointConstraint.hxx | 1 - opencascade/Plugin.hxx | 7 +- ...Plugin_DataMapIteratorOfMapOfFunctions.hxx | 1 - opencascade/Plugin_Failure.hxx | 5 +- opencascade/Plugin_Macro.hxx | 12 +- opencascade/Plugin_MapOfFunctions.hxx | 6 +- opencascade/Poly.hxx | 123 +- opencascade/Poly_Array1OfTriangle.hxx | 1 - opencascade/Poly_ArrayOfNodes.hxx | 79 +- opencascade/Poly_ArrayOfUVNodes.hxx | 79 +- opencascade/Poly_CoherentLink.hxx | 63 +- opencascade/Poly_CoherentNode.hxx | 113 +- opencascade/Poly_CoherentTriPtr.hxx | 138 +- opencascade/Poly_CoherentTriangle.hxx | 91 +- opencascade/Poly_CoherentTriangulation.hxx | 240 +- opencascade/Poly_Connect.hxx | 60 +- opencascade/Poly_HArray1OfTriangle.hxx | 1 - opencascade/Poly_MakeLoops.hxx | 250 +- opencascade/Poly_MergeNodesTool.hxx | 225 +- opencascade/Poly_MeshPurpose.hxx | 19 +- opencascade/Poly_Polygon2D.hxx | 16 +- opencascade/Poly_Polygon3D.hxx | 39 +- opencascade/Poly_PolygonOnTriangulation.hxx | 52 +- opencascade/Poly_Triangle.hxx | 37 +- opencascade/Poly_Triangulation.hxx | 193 +- opencascade/Poly_TriangulationParameters.hxx | 52 +- opencascade/Precision.hxx | 138 +- opencascade/ProjLib.hxx | 49 +- opencascade/ProjLib_CompProjectedCurve.hxx | 165 +- opencascade/ProjLib_ComputeApprox.hxx | 67 +- .../ProjLib_ComputeApproxOnPolarSurface.hxx | 123 +- opencascade/ProjLib_Cone.hxx | 44 +- opencascade/ProjLib_Cylinder.hxx | 46 +- .../ProjLib_HSequenceOfHSequenceOfPnt.hxx | 1 - opencascade/ProjLib_Plane.hxx | 50 +- opencascade/ProjLib_PrjFunc.hxx | 41 +- opencascade/ProjLib_PrjResolve.hxx | 34 +- opencascade/ProjLib_ProjectOnPlane.hxx | 139 +- opencascade/ProjLib_ProjectOnSurface.hxx | 15 +- opencascade/ProjLib_ProjectedCurve.hxx | 172 +- opencascade/ProjLib_Projector.hxx | 111 +- .../ProjLib_SequenceOfHSequenceOfPnt.hxx | 1 - opencascade/ProjLib_Sphere.hxx | 48 +- opencascade/ProjLib_Torus.hxx | 42 +- opencascade/Prs3d.hxx | 79 +- opencascade/Prs3d_Arrow.hxx | 38 +- opencascade/Prs3d_ArrowAspect.hxx | 34 +- opencascade/Prs3d_BasicAspect.hxx | 3 +- opencascade/Prs3d_BndBox.hxx | 120 +- opencascade/Prs3d_DatumAspect.hxx | 67 +- opencascade/Prs3d_DatumAttribute.hxx | 20 +- opencascade/Prs3d_DatumAxes.hxx | 20 +- opencascade/Prs3d_DatumParts.hxx | 6 +- .../Prs3d_DimensionArrowOrientation.hxx | 6 +- opencascade/Prs3d_DimensionAspect.hxx | 79 +- .../Prs3d_DimensionTextHorizontalPosition.hxx | 8 +- .../Prs3d_DimensionTextVerticalPosition.hxx | 6 +- opencascade/Prs3d_DimensionUnits.hxx | 27 +- opencascade/Prs3d_Drawer.hxx | 524 +- opencascade/Prs3d_InvalidAngle.hxx | 5 +- opencascade/Prs3d_IsoAspect.hxx | 19 +- opencascade/Prs3d_LineAspect.hxx | 29 +- ...s3d_NListIteratorOfListOfSequenceOfPnt.hxx | 2 - opencascade/Prs3d_NListOfSequenceOfPnt.hxx | 2 +- opencascade/Prs3d_PlaneAspect.hxx | 84 +- opencascade/Prs3d_Point.hxx | 39 +- opencascade/Prs3d_PointAspect.hxx | 44 +- opencascade/Prs3d_PresentationShadow.hxx | 10 +- opencascade/Prs3d_Root.hxx | 16 +- opencascade/Prs3d_ShadingAspect.hxx | 42 +- opencascade/Prs3d_Text.hxx | 23 +- opencascade/Prs3d_TextAspect.hxx | 61 +- opencascade/Prs3d_ToolCylinder.hxx | 57 +- opencascade/Prs3d_ToolDisk.hxx | 57 +- opencascade/Prs3d_ToolQuadric.hxx | 61 +- opencascade/Prs3d_ToolSector.hxx | 43 +- opencascade/Prs3d_ToolSphere.hxx | 41 +- opencascade/Prs3d_ToolTorus.hxx | 270 +- opencascade/Prs3d_TypeOfHLR.hxx | 12 +- opencascade/Prs3d_TypeOfHighlight.hxx | 12 +- opencascade/Prs3d_TypeOfLinePicking.hxx | 5 +- opencascade/Prs3d_VertexDrawMode.hxx | 6 +- opencascade/PrsDim.hxx | 213 +- opencascade/PrsDim_AngleDimension.hxx | 289 +- opencascade/PrsDim_Chamf2dDimension.hxx | 34 +- opencascade/PrsDim_Chamf3dDimension.hxx | 32 +- opencascade/PrsDim_ConcentricRelation.hxx | 30 +- opencascade/PrsDim_DiameterDimension.hxx | 90 +- opencascade/PrsDim_Dimension.hxx | 491 +- opencascade/PrsDim_DimensionOwner.hxx | 28 +- opencascade/PrsDim_EllipseRadiusDimension.hxx | 37 +- opencascade/PrsDim_EqualDistanceRelation.hxx | 96 +- opencascade/PrsDim_EqualRadiusRelation.hxx | 18 +- opencascade/PrsDim_FixRelation.hxx | 87 +- opencascade/PrsDim_IdenticRelation.hxx | 124 +- opencascade/PrsDim_LengthDimension.hxx | 194 +- opencascade/PrsDim_MaxRadiusDimension.hxx | 31 +- opencascade/PrsDim_MidPointRelation.hxx | 62 +- opencascade/PrsDim_MinRadiusDimension.hxx | 31 +- opencascade/PrsDim_OffsetDimension.hxx | 43 +- opencascade/PrsDim_ParallelRelation.hxx | 34 +- opencascade/PrsDim_PerpendicularRelation.hxx | 29 +- opencascade/PrsDim_RadiusDimension.hxx | 86 +- opencascade/PrsDim_Relation.hxx | 115 +- opencascade/PrsDim_SymmetricRelation.hxx | 37 +- opencascade/PrsDim_TangentRelation.hxx | 33 +- .../PrsMgr_ListOfPresentableObjects.hxx | 5 +- opencascade/PrsMgr_PresentableObject.hxx | 364 +- opencascade/PrsMgr_Presentation.hxx | 53 +- opencascade/PrsMgr_Presentation3d.hxx | 2 + opencascade/PrsMgr_PresentationManager.hxx | 182 +- opencascade/PrsMgr_PresentationManager3d.hxx | 5 +- opencascade/PrsMgr_TypeOfPresentation3d.hxx | 3 +- opencascade/Quantity_Array1OfColor.hxx | 1 - opencascade/Quantity_Color.hxx | 360 +- opencascade/Quantity_ColorRGBA.hxx | 162 +- opencascade/Quantity_Date.hxx | 126 +- opencascade/Quantity_DateDefinitionError.hxx | 5 +- opencascade/Quantity_HArray1OfColor.hxx | 1 - opencascade/Quantity_NameOfColor.hxx | 1042 +- opencascade/Quantity_Period.hxx | 104 +- .../Quantity_PeriodDefinitionError.hxx | 5 +- opencascade/Quantity_TypeOfColor.hxx | 7 +- opencascade/RWGltf_CafReader.hxx | 64 +- opencascade/RWGltf_CafWriter.hxx | 439 +- opencascade/RWGltf_ConfigurationNode.hxx | 101 +- opencascade/RWGltf_DracoParameters.hxx | 21 +- opencascade/RWGltf_GltfAccessor.hxx | 19 +- opencascade/RWGltf_GltfAccessorCompType.hxx | 2 +- opencascade/RWGltf_GltfAccessorLayout.hxx | 16 +- opencascade/RWGltf_GltfAlphaMode.hxx | 13 +- opencascade/RWGltf_GltfArrayType.hxx | 16 +- opencascade/RWGltf_GltfBufferView.hxx | 11 +- opencascade/RWGltf_GltfFace.hxx | 7 +- opencascade/RWGltf_GltfJsonParser.hxx | 339 +- opencascade/RWGltf_GltfLatePrimitiveArray.hxx | 32 +- opencascade/RWGltf_GltfMaterialMap.hxx | 84 +- opencascade/RWGltf_GltfOStreamWriter.hxx | 8 +- opencascade/RWGltf_GltfPrimArrayData.hxx | 18 +- opencascade/RWGltf_GltfPrimitiveMode.hxx | 14 +- opencascade/RWGltf_GltfRootElement.hxx | 63 +- opencascade/RWGltf_GltfSceneNodeMap.hxx | 4 +- opencascade/RWGltf_MaterialCommon.hxx | 16 +- .../RWGltf_MaterialMetallicRoughness.hxx | 22 +- opencascade/RWGltf_Provider.hxx | 123 +- opencascade/RWGltf_TriangulationReader.hxx | 71 +- opencascade/RWGltf_WriterTrsfFormat.hxx | 12 +- opencascade/RWHeaderSection.hxx | 8 +- opencascade/RWHeaderSection_GeneralModule.hxx | 45 +- .../RWHeaderSection_RWFileDescription.hxx | 32 +- opencascade/RWHeaderSection_RWFileName.hxx | 32 +- opencascade/RWHeaderSection_RWFileSchema.hxx | 32 +- .../RWHeaderSection_ReadWriteModule.hxx | 52 +- opencascade/RWMesh.hxx | 9 +- opencascade/RWMesh_CafReader.hxx | 250 +- opencascade/RWMesh_CoordinateSystem.hxx | 20 +- .../RWMesh_CoordinateSystemConverter.hxx | 87 +- opencascade/RWMesh_EdgeIterator.hxx | 118 + opencascade/RWMesh_FaceIterator.hxx | 149 +- opencascade/RWMesh_MaterialMap.hxx | 55 +- opencascade/RWMesh_NameFormat.hxx | 20 +- opencascade/RWMesh_NodeAttributes.hxx | 4 +- opencascade/RWMesh_ShapeIterator.hxx | 133 + opencascade/RWMesh_TriangulationReader.hxx | 210 +- opencascade/RWMesh_TriangulationSource.hxx | 77 +- opencascade/RWMesh_VertexIterator.hxx | 108 + opencascade/RWObj.hxx | 7 +- opencascade/RWObj_CafReader.hxx | 32 +- opencascade/RWObj_CafWriter.hxx | 157 +- opencascade/RWObj_ConfigurationNode.hxx | 85 +- opencascade/RWObj_Material.hxx | 19 +- opencascade/RWObj_MtlReader.hxx | 23 +- opencascade/RWObj_ObjMaterialMap.hxx | 17 +- opencascade/RWObj_ObjWriterContext.hxx | 46 +- opencascade/RWObj_Provider.hxx | 120 +- opencascade/RWObj_Reader.hxx | 233 +- opencascade/RWObj_SubMeshReason.hxx | 7 +- opencascade/RWObj_Tools.hxx | 98 +- opencascade/RWObj_TriangulationReader.hxx | 77 +- opencascade/RWPly_CafWriter.hxx | 99 +- opencascade/RWPly_ConfigurationNode.hxx | 91 +- opencascade/RWPly_PlyWriterContext.hxx | 75 +- opencascade/RWPly_Provider.hxx | 80 +- .../RWStepAP203_RWCcDesignApproval.hxx | 75 - .../RWStepAP203_RWCcDesignCertification.hxx | 75 - .../RWStepAP203_RWCcDesignContract.hxx | 75 - ...pAP203_RWCcDesignDateAndTimeAssignment.hxx | 75 - ...cDesignPersonAndOrganizationAssignment.hxx | 75 - ...AP203_RWCcDesignSecurityClassification.hxx | 75 - ...AP203_RWCcDesignSpecificationReference.hxx | 75 - opencascade/RWStepAP203_RWChange.hxx | 75 - opencascade/RWStepAP203_RWChangeRequest.hxx | 75 - opencascade/RWStepAP203_RWStartRequest.hxx | 75 - opencascade/RWStepAP203_RWStartWork.hxx | 75 - opencascade/RWStepAP214.hxx | 39 - opencascade/RWStepAP214_GeneralModule.hxx | 91 - ...WStepAP214_RWAppliedApprovalAssignment.hxx | 71 - ...epAP214_RWAppliedDateAndTimeAssignment.hxx | 71 - .../RWStepAP214_RWAppliedDateAssignment.hxx | 71 - ...RWStepAP214_RWAppliedDocumentReference.hxx | 71 - ...ppliedExternalIdentificationAssignment.hxx | 74 - .../RWStepAP214_RWAppliedGroupAssignment.hxx | 74 - ...pAP214_RWAppliedOrganizationAssignment.hxx | 71 - ...AppliedPersonAndOrganizationAssignment.hxx | 71 - .../RWStepAP214_RWAppliedPresentedItem.hxx | 71 - ...ppliedSecurityClassificationAssignment.hxx | 71 - ...WAutoDesignActualDateAndTimeAssignment.hxx | 71 - ...AP214_RWAutoDesignActualDateAssignment.hxx | 71 - ...epAP214_RWAutoDesignApprovalAssignment.hxx | 71 - ...14_RWAutoDesignDateAndPersonAssignment.hxx | 71 - ...tepAP214_RWAutoDesignDocumentReference.hxx | 71 - ...WStepAP214_RWAutoDesignGroupAssignment.hxx | 71 - ...AutoDesignNominalDateAndTimeAssignment.hxx | 71 - ...P214_RWAutoDesignNominalDateAssignment.hxx | 71 - ...214_RWAutoDesignOrganizationAssignment.hxx | 71 - ...oDesignPersonAndOrganizationAssignment.hxx | 71 - .../RWStepAP214_RWAutoDesignPresentedItem.hxx | 71 - ...DesignSecurityClassificationAssignment.hxx | 71 - opencascade/RWStepAP214_RWClass.hxx | 74 - .../RWStepAP214_RWExternallyDefinedClass.hxx | 74 - ...214_RWExternallyDefinedGeneralProperty.hxx | 74 - opencascade/RWStepAP214_RWRepItemGroup.hxx | 74 - opencascade/RWStepAP214_ReadWriteModule.hxx | 88 - ...AP242_RWDraughtingModelItemAssociation.hxx | 46 - ...StepAP242_RWGeometricItemSpecificUsage.hxx | 48 - opencascade/RWStepAP242_RWIdAttribute.hxx | 48 - ...42_RWItemIdentifiedRepresentationUsage.hxx | 48 - opencascade/RWStepBasic_RWAction.hxx | 75 - .../RWStepBasic_RWActionAssignment.hxx | 75 - opencascade/RWStepBasic_RWActionMethod.hxx | 75 - .../RWStepBasic_RWActionRequestAssignment.hxx | 75 - .../RWStepBasic_RWActionRequestSolution.hxx | 75 - opencascade/RWStepBasic_RWAddress.hxx | 68 - .../RWStepBasic_RWApplicationContext.hxx | 68 - ...WStepBasic_RWApplicationContextElement.hxx | 71 - ...pBasic_RWApplicationProtocolDefinition.hxx | 71 - opencascade/RWStepBasic_RWApproval.hxx | 71 - .../RWStepBasic_RWApprovalDateTime.hxx | 71 - ...StepBasic_RWApprovalPersonOrganization.hxx | 71 - .../RWStepBasic_RWApprovalRelationship.hxx | 71 - opencascade/RWStepBasic_RWApprovalRole.hxx | 68 - opencascade/RWStepBasic_RWApprovalStatus.hxx | 68 - opencascade/RWStepBasic_RWCalendarDate.hxx | 68 - opencascade/RWStepBasic_RWCertification.hxx | 75 - .../RWStepBasic_RWCertificationAssignment.hxx | 75 - .../RWStepBasic_RWCertificationType.hxx | 75 - .../RWStepBasic_RWCharacterizedObject.hxx | 74 - opencascade/RWStepBasic_RWContract.hxx | 75 - .../RWStepBasic_RWContractAssignment.hxx | 75 - opencascade/RWStepBasic_RWContractType.hxx | 75 - .../RWStepBasic_RWConversionBasedUnit.hxx | 71 - ...Basic_RWConversionBasedUnitAndAreaUnit.hxx | 71 - ...sic_RWConversionBasedUnitAndLengthUnit.hxx | 71 - ...Basic_RWConversionBasedUnitAndMassUnit.hxx | 70 - ...RWConversionBasedUnitAndPlaneAngleUnit.hxx | 71 - ...asic_RWConversionBasedUnitAndRatioUnit.hxx | 71 - ...RWConversionBasedUnitAndSolidAngleUnit.hxx | 71 - ...Basic_RWConversionBasedUnitAndTimeUnit.hxx | 71 - ...sic_RWConversionBasedUnitAndVolumeUnit.hxx | 71 - ...Basic_RWCoordinatedUniversalTimeOffset.hxx | 68 - opencascade/RWStepBasic_RWDate.hxx | 68 - opencascade/RWStepBasic_RWDateAndTime.hxx | 71 - opencascade/RWStepBasic_RWDateRole.hxx | 68 - opencascade/RWStepBasic_RWDateTimeRole.hxx | 68 - opencascade/RWStepBasic_RWDerivedUnit.hxx | 71 - .../RWStepBasic_RWDerivedUnitElement.hxx | 71 - .../RWStepBasic_RWDimensionalExponents.hxx | 68 - opencascade/RWStepBasic_RWDocument.hxx | 74 - opencascade/RWStepBasic_RWDocumentFile.hxx | 74 - ...StepBasic_RWDocumentProductAssociation.hxx | 74 - ...StepBasic_RWDocumentProductEquivalence.hxx | 74 - .../RWStepBasic_RWDocumentRelationship.hxx | 71 - ...StepBasic_RWDocumentRepresentationType.hxx | 74 - opencascade/RWStepBasic_RWDocumentType.hxx | 71 - .../RWStepBasic_RWDocumentUsageConstraint.hxx | 71 - opencascade/RWStepBasic_RWEffectivity.hxx | 71 - .../RWStepBasic_RWEffectivityAssignment.hxx | 74 - opencascade/RWStepBasic_RWEulerAngles.hxx | 74 - ...sic_RWExternalIdentificationAssignment.hxx | 74 - opencascade/RWStepBasic_RWExternalSource.hxx | 74 - .../RWStepBasic_RWExternallyDefinedItem.hxx | 74 - opencascade/RWStepBasic_RWGeneralProperty.hxx | 74 - opencascade/RWStepBasic_RWGroup.hxx | 74 - opencascade/RWStepBasic_RWGroupAssignment.hxx | 74 - .../RWStepBasic_RWGroupRelationship.hxx | 74 - ...RWStepBasic_RWIdentificationAssignment.hxx | 74 - .../RWStepBasic_RWIdentificationRole.hxx | 74 - .../RWStepBasic_RWLengthMeasureWithUnit.hxx | 71 - opencascade/RWStepBasic_RWLengthUnit.hxx | 71 - opencascade/RWStepBasic_RWLocalTime.hxx | 71 - .../RWStepBasic_RWMassMeasureWithUnit.hxx | 70 - opencascade/RWStepBasic_RWMassUnit.hxx | 74 - opencascade/RWStepBasic_RWMeasureWithUnit.hxx | 71 - .../RWStepBasic_RWMechanicalContext.hxx | 71 - opencascade/RWStepBasic_RWNameAssignment.hxx | 74 - opencascade/RWStepBasic_RWNamedUnit.hxx | 71 - opencascade/RWStepBasic_RWObjectRole.hxx | 74 - opencascade/RWStepBasic_RWOrdinalDate.hxx | 68 - opencascade/RWStepBasic_RWOrganization.hxx | 68 - .../RWStepBasic_RWOrganizationRole.hxx | 68 - .../RWStepBasic_RWOrganizationalAddress.hxx | 71 - opencascade/RWStepBasic_RWPerson.hxx | 68 - .../RWStepBasic_RWPersonAndOrganization.hxx | 71 - ...WStepBasic_RWPersonAndOrganizationRole.hxx | 68 - opencascade/RWStepBasic_RWPersonalAddress.hxx | 71 - ...WStepBasic_RWPlaneAngleMeasureWithUnit.hxx | 71 - opencascade/RWStepBasic_RWPlaneAngleUnit.hxx | 71 - opencascade/RWStepBasic_RWProduct.hxx | 71 - opencascade/RWStepBasic_RWProductCategory.hxx | 68 - ...tepBasic_RWProductCategoryRelationship.hxx | 75 - .../RWStepBasic_RWProductConceptContext.hxx | 75 - opencascade/RWStepBasic_RWProductContext.hxx | 71 - .../RWStepBasic_RWProductDefinition.hxx | 71 - ...RWStepBasic_RWProductDefinitionContext.hxx | 71 - ...epBasic_RWProductDefinitionEffectivity.hxx | 71 - ...StepBasic_RWProductDefinitionFormation.hxx | 71 - ...ProductDefinitionFormationRelationship.hxx | 74 - ...DefinitionFormationWithSpecifiedSource.hxx | 71 - ...StepBasic_RWProductDefinitionReference.hxx | 47 - ...nitionReferenceWithLocalRepresentation.hxx | 47 - ...pBasic_RWProductDefinitionRelationship.hxx | 74 - ...oductDefinitionWithAssociatedDocuments.hxx | 71 - ...pBasic_RWProductRelatedProductCategory.hxx | 71 - opencascade/RWStepBasic_RWProductType.hxx | 71 - .../RWStepBasic_RWRatioMeasureWithUnit.hxx | 71 - opencascade/RWStepBasic_RWRoleAssociation.hxx | 74 - .../RWStepBasic_RWSecurityClassification.hxx | 71 - ...tepBasic_RWSecurityClassificationLevel.hxx | 68 - opencascade/RWStepBasic_RWSiUnit.hxx | 80 - .../RWStepBasic_RWSiUnitAndAreaUnit.hxx | 68 - .../RWStepBasic_RWSiUnitAndLengthUnit.hxx | 68 - .../RWStepBasic_RWSiUnitAndMassUnit.hxx | 67 - .../RWStepBasic_RWSiUnitAndPlaneAngleUnit.hxx | 68 - .../RWStepBasic_RWSiUnitAndRatioUnit.hxx | 68 - .../RWStepBasic_RWSiUnitAndSolidAngleUnit.hxx | 68 - ...WSiUnitAndThermodynamicTemperatureUnit.hxx | 67 - .../RWStepBasic_RWSiUnitAndTimeUnit.hxx | 68 - .../RWStepBasic_RWSiUnitAndVolumeUnit.hxx | 68 - ...WStepBasic_RWSolidAngleMeasureWithUnit.hxx | 71 - opencascade/RWStepBasic_RWSolidAngleUnit.hxx | 71 - ...epBasic_RWThermodynamicTemperatureUnit.hxx | 74 - ...StepBasic_RWUncertaintyMeasureWithUnit.hxx | 71 - .../RWStepBasic_RWVersionedActionRequest.hxx | 75 - .../RWStepBasic_RWWeekOfYearAndDayDate.hxx | 68 - .../RWStepDimTol_RWAngularityTolerance.hxx | 74 - ...RWStepDimTol_RWCircularRunoutTolerance.hxx | 74 - .../RWStepDimTol_RWCoaxialityTolerance.hxx | 74 - opencascade/RWStepDimTol_RWCommonDatum.hxx | 74 - .../RWStepDimTol_RWConcentricityTolerance.hxx | 74 - .../RWStepDimTol_RWCylindricityTolerance.hxx | 74 - opencascade/RWStepDimTol_RWDatum.hxx | 74 - opencascade/RWStepDimTol_RWDatumFeature.hxx | 74 - opencascade/RWStepDimTol_RWDatumReference.hxx | 74 - ...StepDimTol_RWDatumReferenceCompartment.hxx | 52 - .../RWStepDimTol_RWDatumReferenceElement.hxx | 52 - ...mTol_RWDatumReferenceModifierWithValue.hxx | 48 - opencascade/RWStepDimTol_RWDatumSystem.hxx | 52 - opencascade/RWStepDimTol_RWDatumTarget.hxx | 74 - .../RWStepDimTol_RWFlatnessTolerance.hxx | 74 - .../RWStepDimTol_RWGeneralDatumReference.hxx | 52 - ...WStepDimTol_RWGeoTolAndGeoTolWthDatRef.hxx | 47 - ...olAndGeoTolWthDatRefAndGeoTolWthMaxTol.hxx | 47 - ...eoTolAndGeoTolWthDatRefAndGeoTolWthMod.hxx | 47 - ...ndGeoTolWthDatRefAndModGeoTolAndPosTol.hxx | 70 - ...oTolAndGeoTolWthDatRefAndUneqDisGeoTol.hxx | 47 - ...WStepDimTol_RWGeoTolAndGeoTolWthMaxTol.hxx | 47 - .../RWStepDimTol_RWGeoTolAndGeoTolWthMod.hxx | 47 - .../RWStepDimTol_RWGeometricTolerance.hxx | 74 - ...imTol_RWGeometricToleranceRelationship.hxx | 74 - ...RWGeometricToleranceWithDatumReference.hxx | 74 - ...WGeometricToleranceWithDefinedAreaUnit.hxx | 52 - ...ol_RWGeometricToleranceWithDefinedUnit.hxx | 52 - ...GeometricToleranceWithMaximumTolerance.hxx | 52 - ...mTol_RWGeometricToleranceWithModifiers.hxx | 52 - .../RWStepDimTol_RWLineProfileTolerance.hxx | 74 - ...tepDimTol_RWModifiedGeometricTolerance.hxx | 74 - ...WStepDimTol_RWNonUniformZoneDefinition.hxx | 52 - .../RWStepDimTol_RWParallelismTolerance.hxx | 74 - ...StepDimTol_RWPerpendicularityTolerance.hxx | 74 - ...WStepDimTol_RWPlacedDatumTargetFeature.hxx | 74 - .../RWStepDimTol_RWPositionTolerance.hxx | 74 - ...RWStepDimTol_RWProjectedZoneDefinition.hxx | 52 - .../RWStepDimTol_RWRoundnessTolerance.hxx | 74 - .../RWStepDimTol_RWRunoutZoneDefinition.hxx | 52 - .../RWStepDimTol_RWRunoutZoneOrientation.hxx | 49 - .../RWStepDimTol_RWStraightnessTolerance.hxx | 74 - ...RWStepDimTol_RWSurfaceProfileTolerance.hxx | 74 - .../RWStepDimTol_RWSymmetryTolerance.hxx | 74 - opencascade/RWStepDimTol_RWToleranceZone.hxx | 52 - ...RWStepDimTol_RWToleranceZoneDefinition.hxx | 52 - .../RWStepDimTol_RWToleranceZoneForm.hxx | 49 - .../RWStepDimTol_RWTotalRunoutTolerance.hxx | 74 - ..._RWUnequallyDisposedGeometricTolerance.hxx | 52 - ...ent_RWAnalysisItemWithinRepresentation.hxx | 74 - ...StepElement_RWCurve3dElementDescriptor.hxx | 74 - ...Element_RWCurveElementEndReleasePacket.hxx | 74 - ...lement_RWCurveElementSectionDefinition.hxx | 74 - ...WCurveElementSectionDerivedDefinitions.hxx | 74 - .../RWStepElement_RWElementDescriptor.hxx | 74 - .../RWStepElement_RWElementMaterial.hxx | 74 - ...epElement_RWSurface3dElementDescriptor.hxx | 74 - ...RWStepElement_RWSurfaceElementProperty.hxx | 74 - .../RWStepElement_RWSurfaceSection.hxx | 74 - .../RWStepElement_RWSurfaceSectionField.hxx | 74 - ...pElement_RWSurfaceSectionFieldConstant.hxx | 74 - ...epElement_RWSurfaceSectionFieldVarying.hxx | 74 - .../RWStepElement_RWUniformSurfaceSection.hxx | 74 - ...tepElement_RWVolume3dElementDescriptor.hxx | 74 - ...WAlignedCurve3dElementCoordinateSystem.hxx | 74 - ...lignedSurface3dElementCoordinateSystem.hxx | 74 - ...bitraryVolume3dElementCoordinateSystem.hxx | 74 - ...nstantSurface3dElementCoordinateSystem.hxx | 74 - .../RWStepFEA_RWCurve3dElementProperty.hxx | 74 - ...StepFEA_RWCurve3dElementRepresentation.hxx | 74 - .../RWStepFEA_RWCurveElementEndOffset.hxx | 74 - .../RWStepFEA_RWCurveElementEndRelease.hxx | 74 - .../RWStepFEA_RWCurveElementInterval.hxx | 74 - ...StepFEA_RWCurveElementIntervalConstant.hxx | 74 - ..._RWCurveElementIntervalLinearlyVarying.hxx | 74 - .../RWStepFEA_RWCurveElementLocation.hxx | 74 - opencascade/RWStepFEA_RWDummyNode.hxx | 74 - ...StepFEA_RWElementGeometricRelationship.hxx | 74 - opencascade/RWStepFEA_RWElementGroup.hxx | 74 - .../RWStepFEA_RWElementRepresentation.hxx | 74 - opencascade/RWStepFEA_RWFeaAreaDensity.hxx | 74 - .../RWStepFEA_RWFeaAxis2Placement3d.hxx | 74 - ...RWFeaCurveSectionGeometricRelationship.hxx | 74 - opencascade/RWStepFEA_RWFeaGroup.hxx | 74 - .../RWStepFEA_RWFeaLinearElasticity.hxx | 74 - opencascade/RWStepFEA_RWFeaMassDensity.hxx | 74 - ...EA_RWFeaMaterialPropertyRepresentation.hxx | 74 - ...WFeaMaterialPropertyRepresentationItem.hxx | 74 - opencascade/RWStepFEA_RWFeaModel.hxx | 74 - opencascade/RWStepFEA_RWFeaModel3d.hxx | 74 - .../RWStepFEA_RWFeaModelDefinition.hxx | 74 - .../RWStepFEA_RWFeaMoistureAbsorption.hxx | 74 - .../RWStepFEA_RWFeaParametricPoint.hxx | 74 - .../RWStepFEA_RWFeaRepresentationItem.hxx | 74 - ...antCoefficientOfLinearThermalExpansion.hxx | 74 - .../RWStepFEA_RWFeaShellBendingStiffness.hxx | 74 - ...aShellMembraneBendingCouplingStiffness.hxx | 74 - .../RWStepFEA_RWFeaShellMembraneStiffness.hxx | 74 - .../RWStepFEA_RWFeaShellShearStiffness.hxx | 74 - ...FeaSurfaceSectionGeometricRelationship.hxx | 74 - ...ialCoefficientOfLinearThermalExpansion.hxx | 74 - .../RWStepFEA_RWFreedomAndCoefficient.hxx | 74 - opencascade/RWStepFEA_RWFreedomsList.hxx | 74 - opencascade/RWStepFEA_RWGeometricNode.hxx | 74 - opencascade/RWStepFEA_RWNode.hxx | 74 - opencascade/RWStepFEA_RWNodeDefinition.hxx | 74 - opencascade/RWStepFEA_RWNodeGroup.hxx | 74 - .../RWStepFEA_RWNodeRepresentation.hxx | 74 - opencascade/RWStepFEA_RWNodeSet.hxx | 74 - ...FEA_RWNodeWithSolutionCoordinateSystem.hxx | 74 - opencascade/RWStepFEA_RWNodeWithVector.hxx | 74 - ...etricCurve3dElementCoordinateDirection.hxx | 74 - ...rametricCurve3dElementCoordinateSystem.hxx | 74 - ...metricSurface3dElementCoordinateSystem.hxx | 74 - ...epFEA_RWSurface3dElementRepresentation.hxx | 74 - ...tepFEA_RWVolume3dElementRepresentation.hxx | 74 - opencascade/RWStepGeom_RWAxis1Placement.hxx | 71 - opencascade/RWStepGeom_RWAxis2Placement2d.hxx | 71 - opencascade/RWStepGeom_RWAxis2Placement3d.hxx | 71 - opencascade/RWStepGeom_RWBSplineCurve.hxx | 71 - .../RWStepGeom_RWBSplineCurveWithKnots.hxx | 75 - ...eCurveWithKnotsAndRationalBSplineCurve.hxx | 75 - opencascade/RWStepGeom_RWBSplineSurface.hxx | 71 - .../RWStepGeom_RWBSplineSurfaceWithKnots.hxx | 75 - ...faceWithKnotsAndRationalBSplineSurface.hxx | 75 - opencascade/RWStepGeom_RWBezierCurve.hxx | 71 - ...m_RWBezierCurveAndRationalBSplineCurve.hxx | 71 - opencascade/RWStepGeom_RWBezierSurface.hxx | 71 - ...BezierSurfaceAndRationalBSplineSurface.hxx | 71 - opencascade/RWStepGeom_RWBoundaryCurve.hxx | 71 - opencascade/RWStepGeom_RWBoundedCurve.hxx | 68 - opencascade/RWStepGeom_RWBoundedSurface.hxx | 68 - opencascade/RWStepGeom_RWCartesianPoint.hxx | 68 - ...Geom_RWCartesianTransformationOperator.hxx | 71 - ...om_RWCartesianTransformationOperator3d.hxx | 71 - opencascade/RWStepGeom_RWCircle.hxx | 71 - opencascade/RWStepGeom_RWCompositeCurve.hxx | 71 - .../RWStepGeom_RWCompositeCurveOnSurface.hxx | 71 - .../RWStepGeom_RWCompositeCurveSegment.hxx | 71 - opencascade/RWStepGeom_RWConic.hxx | 71 - opencascade/RWStepGeom_RWConicalSurface.hxx | 71 - opencascade/RWStepGeom_RWCurve.hxx | 68 - .../RWStepGeom_RWCurveBoundedSurface.hxx | 75 - opencascade/RWStepGeom_RWCurveReplica.hxx | 71 - .../RWStepGeom_RWCylindricalSurface.hxx | 71 - opencascade/RWStepGeom_RWDegeneratePcurve.hxx | 71 - ...RWStepGeom_RWDegenerateToroidalSurface.hxx | 71 - opencascade/RWStepGeom_RWDirection.hxx | 72 - .../RWStepGeom_RWElementarySurface.hxx | 71 - opencascade/RWStepGeom_RWEllipse.hxx | 75 - ...RWStepGeom_RWEvaluatedDegeneratePcurve.hxx | 71 - ...GlobUnitAssCtxAndGlobUncertaintyAssCtx.hxx | 72 - ...pGeom_RWGeometricRepresentationContext.hxx | 68 - ...ionContextAndGlobalUnitAssignedContext.hxx | 71 - ...textAndParametricRepresentationContext.hxx | 71 - ...StepGeom_RWGeometricRepresentationItem.hxx | 68 - opencascade/RWStepGeom_RWHyperbola.hxx | 71 - .../RWStepGeom_RWIntersectionCurve.hxx | 71 - opencascade/RWStepGeom_RWLine.hxx | 71 - opencascade/RWStepGeom_RWOffsetCurve3d.hxx | 71 - opencascade/RWStepGeom_RWOffsetSurface.hxx | 71 - opencascade/RWStepGeom_RWOrientedSurface.hxx | 74 - .../RWStepGeom_RWOuterBoundaryCurve.hxx | 71 - opencascade/RWStepGeom_RWParabola.hxx | 71 - opencascade/RWStepGeom_RWPcurve.hxx | 71 - opencascade/RWStepGeom_RWPlacement.hxx | 71 - opencascade/RWStepGeom_RWPlane.hxx | 71 - opencascade/RWStepGeom_RWPoint.hxx | 68 - opencascade/RWStepGeom_RWPointOnCurve.hxx | 71 - opencascade/RWStepGeom_RWPointOnSurface.hxx | 71 - opencascade/RWStepGeom_RWPointReplica.hxx | 71 - opencascade/RWStepGeom_RWPolyline.hxx | 71 - .../RWStepGeom_RWQuasiUniformCurve.hxx | 71 - ...asiUniformCurveAndRationalBSplineCurve.hxx | 71 - .../RWStepGeom_RWQuasiUniformSurface.hxx | 71 - ...niformSurfaceAndRationalBSplineSurface.hxx | 71 - .../RWStepGeom_RWRationalBSplineCurve.hxx | 75 - .../RWStepGeom_RWRationalBSplineSurface.hxx | 75 - ...StepGeom_RWRectangularCompositeSurface.hxx | 71 - ...RWStepGeom_RWRectangularTrimmedSurface.hxx | 71 - ..._RWReparametrisedCompositeCurveSegment.hxx | 71 - opencascade/RWStepGeom_RWSeamCurve.hxx | 71 - opencascade/RWStepGeom_RWSphericalSurface.hxx | 71 - opencascade/RWStepGeom_RWSuParameters.hxx | 46 - opencascade/RWStepGeom_RWSurface.hxx | 68 - opencascade/RWStepGeom_RWSurfaceCurve.hxx | 71 - ...StepGeom_RWSurfaceCurveAndBoundedCurve.hxx | 71 - .../RWStepGeom_RWSurfaceOfLinearExtrusion.hxx | 71 - .../RWStepGeom_RWSurfaceOfRevolution.hxx | 71 - opencascade/RWStepGeom_RWSurfacePatch.hxx | 71 - opencascade/RWStepGeom_RWSurfaceReplica.hxx | 71 - opencascade/RWStepGeom_RWSweptSurface.hxx | 71 - opencascade/RWStepGeom_RWToroidalSurface.hxx | 75 - opencascade/RWStepGeom_RWTrimmedCurve.hxx | 71 - opencascade/RWStepGeom_RWUniformCurve.hxx | 71 - ..._RWUniformCurveAndRationalBSplineCurve.hxx | 71 - opencascade/RWStepGeom_RWUniformSurface.hxx | 71 - ...niformSurfaceAndRationalBSplineSurface.hxx | 71 - opencascade/RWStepGeom_RWVector.hxx | 75 - ...atics_RWActuatedKinPairAndOrderKinPair.hxx | 47 - ...StepKinematics_RWActuatedKinematicPair.hxx | 46 - ...xtDependentKinematicLinkRepresentation.hxx | 46 - .../RWStepKinematics_RWCylindricalPair.hxx | 46 - ...WStepKinematics_RWCylindricalPairValue.hxx | 46 - ...pKinematics_RWCylindricalPairWithRange.hxx | 46 - ...WStepKinematics_RWFullyConstrainedPair.hxx | 46 - opencascade/RWStepKinematics_RWGearPair.hxx | 46 - .../RWStepKinematics_RWGearPairValue.hxx | 46 - .../RWStepKinematics_RWGearPairWithRange.hxx | 46 - .../RWStepKinematics_RWHomokineticPair.hxx | 46 - .../RWStepKinematics_RWKinematicJoint.hxx | 46 - .../RWStepKinematics_RWKinematicLink.hxx | 46 - ...KinematicLinkRepresentationAssociation.hxx | 46 - ...nematicPropertyMechanismRepresentation.hxx | 46 - ...s_RWKinematicTopologyDirectedStructure.hxx | 46 - ...cs_RWKinematicTopologyNetworkStructure.hxx | 46 - ...inematics_RWKinematicTopologyStructure.hxx | 46 - ...nematics_RWLinearFlexibleAndPinionPair.hxx | 46 - ...ics_RWLinearFlexibleAndPlanarCurvePair.hxx | 46 - ...ics_RWLinearFlexibleLinkRepresentation.hxx | 46 - ...StepKinematics_RWLowOrderKinematicPair.hxx | 46 - ...inematics_RWLowOrderKinematicPairValue.hxx | 46 - ...atics_RWLowOrderKinematicPairWithRange.hxx | 46 - ...epKinematics_RWMechanismRepresentation.hxx | 46 - ...ematics_RWMechanismStateRepresentation.hxx | 47 - .../RWStepKinematics_RWOrientedJoint.hxx | 46 - ...atics_RWPairRepresentationRelationship.hxx | 46 - .../RWStepKinematics_RWPlanarCurvePair.hxx | 46 - ...WStepKinematics_RWPlanarCurvePairRange.hxx | 46 - opencascade/RWStepKinematics_RWPlanarPair.hxx | 46 - .../RWStepKinematics_RWPlanarPairValue.hxx | 46 - ...RWStepKinematics_RWPlanarPairWithRange.hxx | 46 - ...tepKinematics_RWPointOnPlanarCurvePair.hxx | 46 - ...nematics_RWPointOnPlanarCurvePairValue.hxx | 46 - ...tics_RWPointOnPlanarCurvePairWithRange.hxx | 46 - .../RWStepKinematics_RWPointOnSurfacePair.hxx | 46 - ...epKinematics_RWPointOnSurfacePairValue.hxx | 46 - ...nematics_RWPointOnSurfacePairWithRange.hxx | 46 - .../RWStepKinematics_RWPrismaticPair.hxx | 46 - .../RWStepKinematics_RWPrismaticPairValue.hxx | 46 - ...tepKinematics_RWPrismaticPairWithRange.hxx | 46 - ...nematics_RWProductDefinitionKinematics.hxx | 46 - ...roductDefinitionRelationshipKinematics.hxx | 46 - .../RWStepKinematics_RWRackAndPinionPair.hxx | 46 - ...tepKinematics_RWRackAndPinionPairValue.hxx | 46 - ...inematics_RWRackAndPinionPairWithRange.hxx | 46 - .../RWStepKinematics_RWRevolutePair.hxx | 46 - .../RWStepKinematics_RWRevolutePairValue.hxx | 46 - ...StepKinematics_RWRevolutePairWithRange.hxx | 46 - ...epKinematics_RWRigidLinkRepresentation.hxx | 46 - .../RWStepKinematics_RWRollingCurvePair.hxx | 46 - ...StepKinematics_RWRollingCurvePairValue.hxx | 46 - .../RWStepKinematics_RWRollingSurfacePair.hxx | 46 - ...epKinematics_RWRollingSurfacePairValue.hxx | 46 - ...tepKinematics_RWRotationAboutDirection.hxx | 46 - opencascade/RWStepKinematics_RWScrewPair.hxx | 46 - .../RWStepKinematics_RWScrewPairValue.hxx | 46 - .../RWStepKinematics_RWScrewPairWithRange.hxx | 46 - .../RWStepKinematics_RWSlidingCurvePair.hxx | 46 - ...StepKinematics_RWSlidingCurvePairValue.hxx | 46 - .../RWStepKinematics_RWSlidingSurfacePair.hxx | 46 - ...epKinematics_RWSlidingSurfacePairValue.hxx | 46 - .../RWStepKinematics_RWSphericalPair.hxx | 46 - .../RWStepKinematics_RWSphericalPairValue.hxx | 46 - ...WStepKinematics_RWSphericalPairWithPin.hxx | 46 - ...ematics_RWSphericalPairWithPinAndRange.hxx | 46 - ...tepKinematics_RWSphericalPairWithRange.hxx | 46 - ...WStepKinematics_RWSurfacePairWithRange.hxx | 46 - .../RWStepKinematics_RWUnconstrainedPair.hxx | 46 - ...tepKinematics_RWUnconstrainedPairValue.hxx | 46 - .../RWStepKinematics_RWUniversalPair.hxx | 46 - .../RWStepKinematics_RWUniversalPairValue.hxx | 46 - ...tepKinematics_RWUniversalPairWithRange.hxx | 46 - .../RWStepRepr_RWAllAroundShapeAspect.hxx | 52 - opencascade/RWStepRepr_RWApex.hxx | 52 - .../RWStepRepr_RWAssemblyComponentUsage.hxx | 74 - ...epr_RWAssemblyComponentUsageSubstitute.hxx | 71 - .../RWStepRepr_RWBetweenShapeAspect.hxx | 52 - opencascade/RWStepRepr_RWCentreOfSymmetry.hxx | 52 - ...StepRepr_RWCharacterizedRepresentation.hxx | 48 - ...pShAspAndCompShAspAndDatumFeatAndShAsp.hxx | 47 - ...epRepr_RWCompShAspAndDatumFeatAndShAsp.hxx | 47 - ...RWStepRepr_RWCompositeGroupShapeAspect.hxx | 52 - .../RWStepRepr_RWCompositeShapeAspect.hxx | 74 - ...WStepRepr_RWCompoundRepresentationItem.hxx | 72 - .../RWStepRepr_RWConfigurationDesign.hxx | 75 - .../RWStepRepr_RWConfigurationEffectivity.hxx | 75 - .../RWStepRepr_RWConfigurationItem.hxx | 75 - ...r_RWConstructiveGeometryRepresentation.hxx | 48 - ...tiveGeometryRepresentationRelationship.hxx | 47 - .../RWStepRepr_RWContinuosShapeAspect.hxx | 52 - opencascade/RWStepRepr_RWDataEnvironment.hxx | 74 - ...WStepRepr_RWDefinitionalRepresentation.hxx | 71 - .../RWStepRepr_RWDerivedShapeAspect.hxx | 74 - ...epRepr_RWDescriptiveRepresentationItem.hxx | 68 - opencascade/RWStepRepr_RWExtension.hxx | 74 - ...pr_RWFeatureForDatumTargetRelationship.hxx | 74 - ...pr_RWFunctionallyDefinedTransformation.hxx | 68 - .../RWStepRepr_RWGeometricAlignment.hxx | 52 - ...epr_RWGlobalUncertaintyAssignedContext.hxx | 71 - ...RWStepRepr_RWGlobalUnitAssignedContext.hxx | 71 - ...RWStepRepr_RWIntegerRepresentationItem.hxx | 44 - ...RWStepRepr_RWItemDefinedTransformation.hxx | 71 - .../RWStepRepr_RWMakeFromUsageOption.hxx | 74 - opencascade/RWStepRepr_RWMappedItem.hxx | 71 - .../RWStepRepr_RWMaterialDesignation.hxx | 71 - opencascade/RWStepRepr_RWMaterialProperty.hxx | 74 - ...pRepr_RWMaterialPropertyRepresentation.hxx | 74 - ...RWStepRepr_RWMeasureRepresentationItem.hxx | 71 - opencascade/RWStepRepr_RWParallelOffset.hxx | 52 - ...Repr_RWParametricRepresentationContext.hxx | 68 - opencascade/RWStepRepr_RWPerpendicularTo.hxx | 52 - opencascade/RWStepRepr_RWProductConcept.hxx | 75 - .../RWStepRepr_RWProductDefinitionShape.hxx | 74 - .../RWStepRepr_RWPropertyDefinition.hxx | 74 - ...pRepr_RWPropertyDefinitionRelationship.hxx | 74 - ...epr_RWPropertyDefinitionRepresentation.hxx | 74 - ...epr_RWQuantifiedAssemblyComponentUsage.hxx | 74 - ...epr_RWReprItemAndLengthMeasureWithUnit.hxx | 67 - ...ReprItemAndLengthMeasureWithUnitAndQRI.hxx | 44 - ...RWReprItemAndPlaneAngleMeasureWithUnit.hxx | 44 - ...ItemAndPlaneAngleMeasureWithUnitAndQRI.hxx | 44 - opencascade/RWStepRepr_RWRepresentation.hxx | 71 - .../RWStepRepr_RWRepresentationContext.hxx | 68 - ...pRepr_RWRepresentationContextReference.hxx | 46 - .../RWStepRepr_RWRepresentationItem.hxx | 68 - .../RWStepRepr_RWRepresentationMap.hxx | 71 - .../RWStepRepr_RWRepresentationReference.hxx | 46 - ...WStepRepr_RWRepresentationRelationship.hxx | 71 - ...entationRelationshipWithTransformation.hxx | 71 - opencascade/RWStepRepr_RWShapeAspect.hxx | 71 - ...Repr_RWShapeAspectDerivingRelationship.hxx | 74 - .../RWStepRepr_RWShapeAspectRelationship.hxx | 74 - .../RWStepRepr_RWShapeAspectTransition.hxx | 74 - ...entationRelationshipWithTransformation.hxx | 71 - ...pRepr_RWSpecifiedHigherUsageOccurrence.hxx | 74 - ...WStepRepr_RWStructuralResponseProperty.hxx | 74 - ...sponsePropertyDefinitionRepresentation.hxx | 74 - opencascade/RWStepRepr_RWTangent.hxx | 52 - .../RWStepRepr_RWValueRepresentationItem.hxx | 44 - ...hape_RWAdvancedBrepShapeRepresentation.hxx | 71 - opencascade/RWStepShape_RWAdvancedFace.hxx | 71 - opencascade/RWStepShape_RWAngularLocation.hxx | 74 - opencascade/RWStepShape_RWAngularSize.hxx | 74 - opencascade/RWStepShape_RWBlock.hxx | 71 - opencascade/RWStepShape_RWBooleanResult.hxx | 71 - opencascade/RWStepShape_RWBoxDomain.hxx | 71 - opencascade/RWStepShape_RWBoxedHalfSpace.hxx | 71 - opencascade/RWStepShape_RWBrepWithVoids.hxx | 74 - opencascade/RWStepShape_RWClosedShell.hxx | 71 - ...tepShape_RWCompoundShapeRepresentation.hxx | 74 - .../RWStepShape_RWConnectedEdgeSet.hxx | 74 - .../RWStepShape_RWConnectedFaceSet.hxx | 71 - ...ape_RWConnectedFaceShapeRepresentation.hxx | 74 - .../RWStepShape_RWConnectedFaceSubSet.hxx | 74 - ..._RWContextDependentShapeRepresentation.hxx | 71 - .../RWStepShape_RWCsgShapeRepresentation.hxx | 71 - opencascade/RWStepShape_RWCsgSolid.hxx | 71 - ...alRepresentationAndShapeRepresentation.hxx | 70 - ...imensionalCharacteristicRepresentation.hxx | 74 - .../RWStepShape_RWDimensionalLocation.hxx | 74 - ...tepShape_RWDimensionalLocationWithPath.hxx | 74 - opencascade/RWStepShape_RWDimensionalSize.hxx | 74 - .../RWStepShape_RWDimensionalSizeWithPath.hxx | 74 - opencascade/RWStepShape_RWEdge.hxx | 71 - .../RWStepShape_RWEdgeBasedWireframeModel.hxx | 74 - ...WEdgeBasedWireframeShapeRepresentation.hxx | 74 - opencascade/RWStepShape_RWEdgeCurve.hxx | 75 - opencascade/RWStepShape_RWEdgeLoop.hxx | 75 - .../RWStepShape_RWExtrudedAreaSolid.hxx | 71 - .../RWStepShape_RWExtrudedFaceSolid.hxx | 71 - opencascade/RWStepShape_RWFace.hxx | 71 - .../RWStepShape_RWFaceBasedSurfaceModel.hxx | 74 - opencascade/RWStepShape_RWFaceBound.hxx | 75 - opencascade/RWStepShape_RWFaceOuterBound.hxx | 71 - opencascade/RWStepShape_RWFaceSurface.hxx | 71 - opencascade/RWStepShape_RWFacetedBrep.hxx | 71 - ...tepShape_RWFacetedBrepAndBrepWithVoids.hxx | 71 - ...Shape_RWFacetedBrepShapeRepresentation.hxx | 71 - .../RWStepShape_RWGeometricCurveSet.hxx | 71 - opencascade/RWStepShape_RWGeometricSet.hxx | 71 - ...callyBoundedSurfaceShapeRepresentation.hxx | 71 - ...llyBoundedWireframeShapeRepresentation.hxx | 71 - opencascade/RWStepShape_RWHalfSpaceSolid.hxx | 71 - opencascade/RWStepShape_RWLimitsAndFits.hxx | 68 - opencascade/RWStepShape_RWLoop.hxx | 68 - opencascade/RWStepShape_RWLoopAndPath.hxx | 71 - .../RWStepShape_RWManifoldSolidBrep.hxx | 71 - ...e_RWManifoldSurfaceShapeRepresentation.hxx | 71 - .../RWStepShape_RWMeasureQualification.hxx | 71 - ...tionItemAndQualifiedRepresentationItem.hxx | 71 - ...WNonManifoldSurfaceShapeRepresentation.hxx | 74 - opencascade/RWStepShape_RWOpenShell.hxx | 71 - .../RWStepShape_RWOrientedClosedShell.hxx | 71 - opencascade/RWStepShape_RWOrientedEdge.hxx | 71 - opencascade/RWStepShape_RWOrientedFace.hxx | 71 - .../RWStepShape_RWOrientedOpenShell.hxx | 71 - opencascade/RWStepShape_RWOrientedPath.hxx | 71 - opencascade/RWStepShape_RWPath.hxx | 71 - .../RWStepShape_RWPlusMinusTolerance.hxx | 71 - .../RWStepShape_RWPointRepresentation.hxx | 74 - opencascade/RWStepShape_RWPolyLoop.hxx | 71 - .../RWStepShape_RWPrecisionQualifier.hxx | 68 - ...tepShape_RWQualifiedRepresentationItem.hxx | 71 - .../RWStepShape_RWRevolvedAreaSolid.hxx | 71 - .../RWStepShape_RWRevolvedFaceSolid.hxx | 71 - .../RWStepShape_RWRightAngularWedge.hxx | 71 - .../RWStepShape_RWRightCircularCone.hxx | 71 - .../RWStepShape_RWRightCircularCylinder.hxx | 71 - opencascade/RWStepShape_RWSeamEdge.hxx | 74 - ...pShape_RWShapeDefinitionRepresentation.hxx | 75 - ...epShape_RWShapeDimensionRepresentation.hxx | 74 - .../RWStepShape_RWShapeRepresentation.hxx | 71 - ...pe_RWShapeRepresentationWithParameters.hxx | 74 - .../RWStepShape_RWShellBasedSurfaceModel.hxx | 71 - opencascade/RWStepShape_RWSolidModel.hxx | 68 - opencascade/RWStepShape_RWSolidReplica.hxx | 71 - opencascade/RWStepShape_RWSphere.hxx | 71 - opencascade/RWStepShape_RWSubedge.hxx | 74 - opencascade/RWStepShape_RWSubface.hxx | 74 - opencascade/RWStepShape_RWSweptAreaSolid.hxx | 71 - opencascade/RWStepShape_RWSweptFaceSolid.hxx | 71 - opencascade/RWStepShape_RWToleranceValue.hxx | 71 - ...pShape_RWTopologicalRepresentationItem.hxx | 68 - opencascade/RWStepShape_RWTorus.hxx | 71 - ...hape_RWTransitionalShapeRepresentation.hxx | 71 - opencascade/RWStepShape_RWTypeQualifier.hxx | 68 - ...RWStepShape_RWValueFormatTypeQualifier.hxx | 48 - opencascade/RWStepShape_RWVertex.hxx | 68 - opencascade/RWStepShape_RWVertexLoop.hxx | 71 - opencascade/RWStepShape_RWVertexPoint.hxx | 71 - ...StepVisual_RWAnnotationCurveOccurrence.hxx | 45 - ...notationCurveOccurrenceAndGeomReprItem.hxx | 45 - .../RWStepVisual_RWAnnotationFillArea.hxx | 49 - ...pVisual_RWAnnotationFillAreaOccurrence.hxx | 45 - .../RWStepVisual_RWAnnotationOccurrence.hxx | 45 - .../RWStepVisual_RWAnnotationPlane.hxx | 45 - opencascade/RWStepVisual_RWAreaInSet.hxx | 71 - .../RWStepVisual_RWBackgroundColour.hxx | 71 - opencascade/RWStepVisual_RWCameraImage.hxx | 71 - opencascade/RWStepVisual_RWCameraModel.hxx | 68 - opencascade/RWStepVisual_RWCameraModelD2.hxx | 71 - opencascade/RWStepVisual_RWCameraModelD3.hxx | 71 - ...tepVisual_RWCameraModelD3MultiClipping.hxx | 48 - ...CameraModelD3MultiClippingIntersection.hxx | 48 - ...sual_RWCameraModelD3MultiClippingUnion.hxx | 48 - opencascade/RWStepVisual_RWCameraUsage.hxx | 71 - ...ObjAndRepresentationAndDraughtingModel.hxx | 51 - opencascade/RWStepVisual_RWColour.hxx | 68 - opencascade/RWStepVisual_RWColourRgb.hxx | 68 - .../RWStepVisual_RWColourSpecification.hxx | 68 - ...RWStepVisual_RWComplexTriangulatedFace.hxx | 53 - ...Visual_RWComplexTriangulatedSurfaceSet.hxx | 53 - opencascade/RWStepVisual_RWCompositeText.hxx | 71 - ...RWStepVisual_RWCompositeTextWithExtent.hxx | 71 - ...pVisual_RWContextDependentInvisibility.hxx | 71 - ...RWContextDependentOverRidingStyledItem.hxx | 71 - .../RWStepVisual_RWCoordinatesList.hxx | 45 - ...tepVisual_RWCubicBezierTessellatedEdge.hxx | 53 - ...epVisual_RWCubicBezierTriangulatedFace.hxx | 53 - opencascade/RWStepVisual_RWCurveStyle.hxx | 71 - opencascade/RWStepVisual_RWCurveStyleFont.hxx | 71 - .../RWStepVisual_RWCurveStyleFontPattern.hxx | 68 - .../RWStepVisual_RWDraughtingCallout.hxx | 45 - .../RWStepVisual_RWDraughtingModel.hxx | 74 - ...tepVisual_RWDraughtingPreDefinedColour.hxx | 68 - ...Visual_RWDraughtingPreDefinedCurveFont.hxx | 68 - ...tepVisual_RWExternallyDefinedCurveFont.hxx | 74 - opencascade/RWStepVisual_RWFillAreaStyle.hxx | 71 - .../RWStepVisual_RWFillAreaStyleColour.hxx | 71 - opencascade/RWStepVisual_RWInvisibility.hxx | 71 - ...hanicalDesignGeometricPresentationArea.hxx | 71 - ...ignGeometricPresentationRepresentation.hxx | 71 - .../RWStepVisual_RWOverRidingStyledItem.hxx | 71 - opencascade/RWStepVisual_RWPlanarBox.hxx | 71 - opencascade/RWStepVisual_RWPlanarExtent.hxx | 68 - opencascade/RWStepVisual_RWPointStyle.hxx | 71 - .../RWStepVisual_RWPreDefinedColour.hxx | 68 - .../RWStepVisual_RWPreDefinedCurveFont.hxx | 68 - opencascade/RWStepVisual_RWPreDefinedItem.hxx | 68 - .../RWStepVisual_RWPresentationArea.hxx | 71 - ...epVisual_RWPresentationLayerAssignment.hxx | 71 - .../RWStepVisual_RWPresentationLayerUsage.hxx | 71 - ...tepVisual_RWPresentationRepresentation.hxx | 71 - .../RWStepVisual_RWPresentationSet.hxx | 68 - .../RWStepVisual_RWPresentationSize.hxx | 71 - ...epVisual_RWPresentationStyleAssignment.hxx | 71 - ...tepVisual_RWPresentationStyleByContext.hxx | 71 - .../RWStepVisual_RWPresentationView.hxx | 71 - ...epVisual_RWPresentedItemRepresentation.hxx | 71 - ..._RWRepositionedTessellatedGeometricSet.hxx | 50 - ...epVisual_RWRepositionedTessellatedItem.hxx | 46 - opencascade/RWStepVisual_RWStyledItem.hxx | 71 - .../RWStepVisual_RWSurfaceSideStyle.hxx | 71 - .../RWStepVisual_RWSurfaceStyleBoundary.hxx | 71 - ...RWStepVisual_RWSurfaceStyleControlGrid.hxx | 71 - .../RWStepVisual_RWSurfaceStyleFillArea.hxx | 71 - ...StepVisual_RWSurfaceStyleParameterLine.hxx | 71 - ...isual_RWSurfaceStyleReflectanceAmbient.hxx | 46 - .../RWStepVisual_RWSurfaceStyleRendering.hxx | 46 - ..._RWSurfaceStyleRenderingWithProperties.hxx | 46 - ...Visual_RWSurfaceStyleSegmentationCurve.hxx | 71 - .../RWStepVisual_RWSurfaceStyleSilhouette.hxx | 71 - ...RWStepVisual_RWSurfaceStyleTransparent.hxx | 47 - .../RWStepVisual_RWSurfaceStyleUsage.hxx | 71 - opencascade/RWStepVisual_RWTemplate.hxx | 71 - .../RWStepVisual_RWTemplateInstance.hxx | 71 - ...sual_RWTessellatedAnnotationOccurrence.hxx | 45 - ...StepVisual_RWTessellatedConnectingEdge.hxx | 53 - .../RWStepVisual_RWTessellatedCurveSet.hxx | 49 - .../RWStepVisual_RWTessellatedEdge.hxx | 53 - ...RWStepVisual_RWTessellatedGeometricSet.hxx | 48 - .../RWStepVisual_RWTessellatedItem.hxx | 45 - .../RWStepVisual_RWTessellatedPointSet.hxx | 53 - ...isual_RWTessellatedShapeRepresentation.hxx | 53 - ...peRepresentationWithAccuracyParameters.hxx | 53 - .../RWStepVisual_RWTessellatedShell.hxx | 53 - .../RWStepVisual_RWTessellatedSolid.hxx | 53 - ...StepVisual_RWTessellatedStructuredItem.hxx | 53 - .../RWStepVisual_RWTessellatedVertex.hxx | 53 - .../RWStepVisual_RWTessellatedWire.hxx | 53 - opencascade/RWStepVisual_RWTextLiteral.hxx | 71 - opencascade/RWStepVisual_RWTextStyle.hxx | 71 - ...RWStepVisual_RWTextStyleForDefinedFont.hxx | 71 - ...sual_RWTextStyleWithBoxCharacteristics.hxx | 71 - .../RWStepVisual_RWTriangulatedFace.hxx | 53 - .../RWStepVisual_RWTriangulatedSurfaceSet.hxx | 48 - opencascade/RWStepVisual_RWViewVolume.hxx | 71 - opencascade/RWStl.hxx | 82 +- opencascade/RWStl_ConfigurationNode.hxx | 83 +- opencascade/RWStl_Provider.hxx | 120 +- opencascade/RWStl_Reader.hxx | 60 +- opencascade/Resource_ConvertUnicode.hxx | 16 +- ...source_DataMapOfAsciiStringAsciiString.hxx | 7 +- ...rce_DataMapOfAsciiStringExtendedString.hxx | 7 +- opencascade/Resource_FormatType.hxx | 58 +- opencascade/Resource_LexicalCompare.hxx | 30 +- opencascade/Resource_Manager.hxx | 97 +- opencascade/Resource_NoSuchResource.hxx | 5 +- opencascade/Resource_Unicode.hxx | 136 +- opencascade/STEPCAFControl_ActorWrite.hxx | 40 +- .../STEPCAFControl_ConfigurationNode.hxx | 79 +- opencascade/STEPCAFControl_Controller.hxx | 24 +- ...aMapIteratorOfDataMapOfLabelExternFile.hxx | 1 - ...l_DataMapIteratorOfDataMapOfLabelShape.hxx | 1 - ...DataMapIteratorOfDataMapOfPDExternFile.hxx | 1 - ...ataMapIteratorOfDataMapOfSDRExternFile.hxx | 1 - ...trol_DataMapIteratorOfDataMapOfShapePD.hxx | 1 - ...rol_DataMapIteratorOfDataMapOfShapeSDR.hxx | 1 - ...TEPCAFControl_DataMapOfLabelExternFile.hxx | 7 +- .../STEPCAFControl_DataMapOfLabelShape.hxx | 6 +- .../STEPCAFControl_DataMapOfPDExternFile.hxx | 8 +- .../STEPCAFControl_DataMapOfSDRExternFile.hxx | 9 +- .../STEPCAFControl_DataMapOfShapePD.hxx | 11 +- .../STEPCAFControl_DataMapOfShapeSDR.hxx | 11 +- opencascade/STEPCAFControl_ExternFile.hxx | 65 +- opencascade/STEPCAFControl_ExternFile.lxx | 76 +- opencascade/STEPCAFControl_GDTProperty.hxx | 83 +- opencascade/STEPCAFControl_Provider.hxx | 129 +- opencascade/STEPCAFControl_Reader.hxx | 494 +- opencascade/STEPCAFControl_Writer.hxx | 295 +- opencascade/STEPConstruct.hxx | 32 +- opencascade/STEPConstruct_AP203Context.hxx | 162 +- opencascade/STEPConstruct_Assembly.hxx | 55 +- opencascade/STEPConstruct_ContextTool.hxx | 111 +- ...teratorOfDataMapOfAsciiStringTransient.hxx | 1 - ...taMapIteratorOfDataMapOfPointTransient.hxx | 1 - ...onstruct_DataMapOfAsciiStringTransient.hxx | 7 +- .../STEPConstruct_DataMapOfPointTransient.hxx | 7 +- opencascade/STEPConstruct_ExternRefs.hxx | 98 +- opencascade/STEPConstruct_Part.hxx | 146 +- opencascade/STEPConstruct_Styles.hxx | 138 +- opencascade/STEPConstruct_Tool.hxx | 53 +- opencascade/STEPConstruct_Tool.lxx | 28 +- opencascade/STEPConstruct_UnitContext.hxx | 121 +- opencascade/STEPConstruct_ValidationProps.hxx | 121 +- opencascade/STEPControl_ActorRead.hxx | 248 +- opencascade/STEPControl_ActorWrite.hxx | 132 +- opencascade/STEPControl_Controller.hxx | 45 +- opencascade/STEPControl_Reader.hxx | 75 +- opencascade/STEPControl_StepModelType.hxx | 16 +- opencascade/STEPControl_Writer.hxx | 126 +- opencascade/STEPEdit.hxx | 16 +- opencascade/STEPEdit_EditContext.hxx | 43 +- opencascade/STEPEdit_EditSDR.hxx | 43 +- .../STEPSelections_AssemblyComponent.hxx | 38 +- .../STEPSelections_AssemblyComponent.lxx | 24 +- .../STEPSelections_AssemblyExplorer.hxx | 48 +- .../STEPSelections_AssemblyExplorer.lxx | 11 +- opencascade/STEPSelections_AssemblyLink.hxx | 45 +- opencascade/STEPSelections_AssemblyLink.lxx | 30 +- opencascade/STEPSelections_Counter.hxx | 78 +- opencascade/STEPSelections_Counter.lxx | 1 - ...STEPSelections_HSequenceOfAssemblyLink.hxx | 1 - opencascade/STEPSelections_SelectAssembly.hxx | 33 +- opencascade/STEPSelections_SelectDerived.hxx | 29 +- opencascade/STEPSelections_SelectFaces.hxx | 32 +- .../STEPSelections_SelectForTransfer.hxx | 28 +- opencascade/STEPSelections_SelectGSCurves.hxx | 32 +- .../STEPSelections_SelectInstances.hxx | 36 +- ...Selections_SequenceOfAssemblyComponent.hxx | 4 +- .../STEPSelections_SequenceOfAssemblyLink.hxx | 4 +- opencascade/Select3D_BVHIndexBuffer.hxx | 51 +- opencascade/Select3D_BndBox3d.hxx | 2 +- opencascade/Select3D_EntitySequence.hxx | 3 +- .../Select3D_InteriorSensitivePointSet.hxx | 54 +- opencascade/Select3D_Pnt.hxx | 8 +- opencascade/Select3D_PointData.hxx | 30 +- opencascade/Select3D_SensitiveBox.hxx | 39 +- opencascade/Select3D_SensitiveCircle.hxx | 29 +- opencascade/Select3D_SensitiveCurve.hxx | 30 +- opencascade/Select3D_SensitiveCylinder.hxx | 21 +- opencascade/Select3D_SensitiveEntity.hxx | 62 +- opencascade/Select3D_SensitiveFace.hxx | 34 +- opencascade/Select3D_SensitiveGroup.hxx | 105 +- opencascade/Select3D_SensitivePoint.hxx | 15 +- opencascade/Select3D_SensitivePoly.hxx | 93 +- .../Select3D_SensitivePrimitiveArray.hxx | 235 +- opencascade/Select3D_SensitiveSegment.hxx | 29 +- opencascade/Select3D_SensitiveSet.hxx | 153 +- opencascade/Select3D_SensitiveSphere.hxx | 15 +- opencascade/Select3D_SensitiveTriangle.hxx | 30 +- .../Select3D_SensitiveTriangulation.hxx | 96 +- opencascade/Select3D_SensitiveWire.hxx | 51 +- opencascade/Select3D_TypeOfSensitivity.hxx | 4 +- opencascade/SelectBasics.hxx | 6 +- opencascade/SelectBasics_PickResult.hxx | 58 +- .../SelectBasics_SelectingVolumeManager.hxx | 211 +- opencascade/SelectMgr.hxx | 11 +- opencascade/SelectMgr_AndFilter.hxx | 25 +- opencascade/SelectMgr_AndOrFilter.hxx | 18 +- opencascade/SelectMgr_AxisIntersector.hxx | 199 +- opencascade/SelectMgr_BVHThreadPool.hxx | 82 +- opencascade/SelectMgr_BaseFrustum.hxx | 43 +- opencascade/SelectMgr_BaseIntersector.hxx | 258 +- opencascade/SelectMgr_CompositionFilter.hxx | 14 +- opencascade/SelectMgr_EntityOwner.hxx | 164 +- opencascade/SelectMgr_Filter.hxx | 29 +- opencascade/SelectMgr_Frustum.hxx | 134 +- opencascade/SelectMgr_Frustum.lxx | 635 +- opencascade/SelectMgr_FrustumBuilder.hxx | 40 +- ...lectMgr_IndexedDataMapOfOwnerCriterion.hxx | 3 +- opencascade/SelectMgr_IndexedMapOfOwner.hxx | 3 +- .../SelectMgr_ListIteratorOfListOfFilter.hxx | 1 - opencascade/SelectMgr_ListOfFilter.hxx | 3 +- opencascade/SelectMgr_OrFilter.hxx | 17 +- opencascade/SelectMgr_PickingStrategy.hxx | 9 +- opencascade/SelectMgr_RectangularFrustum.hxx | 245 +- opencascade/SelectMgr_SelectableObject.hxx | 157 +- opencascade/SelectMgr_SelectableObjectSet.hxx | 146 +- .../SelectMgr_SelectingVolumeManager.hxx | 232 +- opencascade/SelectMgr_Selection.hxx | 27 +- .../SelectMgr_SelectionImageFiller.hxx | 46 +- opencascade/SelectMgr_SelectionManager.hxx | 128 +- opencascade/SelectMgr_SelectionType.hxx | 6 +- opencascade/SelectMgr_SensitiveEntity.hxx | 13 +- opencascade/SelectMgr_SensitiveEntitySet.hxx | 40 +- opencascade/SelectMgr_SequenceOfOwner.hxx | 1 - opencascade/SelectMgr_SequenceOfSelection.hxx | 1 - opencascade/SelectMgr_SortCriterion.hxx | 86 +- opencascade/SelectMgr_StateOfSelection.hxx | 10 +- opencascade/SelectMgr_ToleranceMap.hxx | 19 +- opencascade/SelectMgr_TriangularFrustum.hxx | 177 +- .../SelectMgr_TriangularFrustumSet.hxx | 244 +- opencascade/SelectMgr_TypeOfBVHUpdate.hxx | 18 +- .../SelectMgr_TypeOfDepthTolerance.hxx | 12 +- opencascade/SelectMgr_TypeOfUpdate.hxx | 6 +- opencascade/SelectMgr_VectorTypes.hxx | 27 +- opencascade/SelectMgr_ViewClipRange.hxx | 50 +- opencascade/SelectMgr_ViewerSelector.hxx | 295 +- opencascade/ShapeAlgo.hxx | 13 +- opencascade/ShapeAlgo_AlgoContainer.hxx | 112 +- opencascade/ShapeAlgo_AlgoContainer.lxx | 14 +- opencascade/ShapeAlgo_ToolContainer.hxx | 26 +- opencascade/ShapeAnalysis.hxx | 47 +- opencascade/ShapeAnalysis_BoxBndTree.hxx | 149 +- .../ShapeAnalysis_CanonicalRecognition.hxx | 145 +- opencascade/ShapeAnalysis_CheckSmallFace.hxx | 134 +- opencascade/ShapeAnalysis_CheckSmallFace.lxx | 65 +- opencascade/ShapeAnalysis_Curve.hxx | 141 +- ...aMapIteratorOfDataMapOfShapeListOfReal.hxx | 1 - ...ShapeAnalysis_DataMapOfShapeListOfReal.hxx | 7 +- opencascade/ShapeAnalysis_Edge.hxx | 206 +- opencascade/ShapeAnalysis_FreeBoundData.hxx | 101 +- opencascade/ShapeAnalysis_FreeBoundData.lxx | 58 +- opencascade/ShapeAnalysis_FreeBounds.hxx | 92 +- opencascade/ShapeAnalysis_FreeBounds.lxx | 12 +- .../ShapeAnalysis_FreeBoundsProperties.hxx | 121 +- .../ShapeAnalysis_FreeBoundsProperties.lxx | 72 +- opencascade/ShapeAnalysis_Geom.hxx | 35 +- .../ShapeAnalysis_HSequenceOfFreeBounds.hxx | 1 - .../ShapeAnalysis_SequenceOfFreeBounds.hxx | 4 +- opencascade/ShapeAnalysis_ShapeContents.hxx | 97 +- opencascade/ShapeAnalysis_ShapeTolerance.hxx | 58 +- opencascade/ShapeAnalysis_Shell.hxx | 59 +- opencascade/ShapeAnalysis_Surface.hxx | 276 +- opencascade/ShapeAnalysis_Surface.lxx | 54 +- .../ShapeAnalysis_TransferParameters.hxx | 55 +- .../ShapeAnalysis_TransferParametersProj.hxx | 79 +- opencascade/ShapeAnalysis_Wire.hxx | 390 +- opencascade/ShapeAnalysis_Wire.lxx | 175 +- opencascade/ShapeAnalysis_WireOrder.hxx | 100 +- opencascade/ShapeAnalysis_WireVertex.hxx | 133 +- opencascade/ShapeBuild.hxx | 6 +- opencascade/ShapeBuild_Edge.hxx | 137 +- opencascade/ShapeBuild_ReShape.hxx | 42 +- opencascade/ShapeBuild_Vertex.hxx | 36 +- opencascade/ShapeConstruct.hxx | 81 +- opencascade/ShapeConstruct_Curve.hxx | 69 +- .../ShapeConstruct_MakeTriangulation.hxx | 41 +- .../ShapeConstruct_ProjectCurveOnSurface.hxx | 223 +- opencascade/ShapeCustom.hxx | 57 +- .../ShapeCustom_BSplineRestriction.hxx | 229 +- .../ShapeCustom_BSplineRestriction.lxx | 115 +- opencascade/ShapeCustom_ConvertToBSpline.hxx | 88 +- .../ShapeCustom_ConvertToRevolution.hxx | 69 +- opencascade/ShapeCustom_Curve.hxx | 35 +- opencascade/ShapeCustom_Curve2d.hxx | 46 +- .../ShapeCustom_DirectModification.hxx | 69 +- opencascade/ShapeCustom_Modification.hxx | 33 +- .../ShapeCustom_RestrictionParameters.hxx | 85 +- .../ShapeCustom_RestrictionParameters.lxx | 64 +- opencascade/ShapeCustom_Surface.hxx | 45 +- opencascade/ShapeCustom_SweptToElementary.hxx | 69 +- opencascade/ShapeCustom_TrsfModification.hxx | 60 +- opencascade/ShapeExtend.hxx | 15 +- .../ShapeExtend_BasicMsgRegistrator.hxx | 38 +- opencascade/ShapeExtend_ComplexCurve.hxx | 112 +- opencascade/ShapeExtend_ComplexCurve.lxx | 51 +- opencascade/ShapeExtend_CompositeSurface.hxx | 274 +- ...taMapIteratorOfDataMapOfShapeListOfMsg.hxx | 1 - ...pIteratorOfDataMapOfTransientListOfMsg.hxx | 1 - .../ShapeExtend_DataMapOfShapeListOfMsg.hxx | 7 +- ...hapeExtend_DataMapOfTransientListOfMsg.hxx | 7 +- opencascade/ShapeExtend_Explorer.hxx | 70 +- opencascade/ShapeExtend_MsgRegistrator.hxx | 43 +- opencascade/ShapeExtend_MsgRegistrator.lxx | 15 +- opencascade/ShapeExtend_Parametrisation.hxx | 6 +- opencascade/ShapeExtend_Status.hxx | 38 +- opencascade/ShapeExtend_WireData.hxx | 75 +- opencascade/ShapeFix.hxx | 39 +- opencascade/ShapeFix_ComposeShell.hxx | 137 +- ...x_DataMapIteratorOfDataMapOfShapeBox2d.hxx | 1 - opencascade/ShapeFix_DataMapOfShapeBox2d.hxx | 7 +- opencascade/ShapeFix_Edge.hxx | 109 +- opencascade/ShapeFix_EdgeConnect.hxx | 38 +- opencascade/ShapeFix_EdgeProjAux.hxx | 57 +- opencascade/ShapeFix_Face.hxx | 179 +- opencascade/ShapeFix_Face.lxx | 72 +- opencascade/ShapeFix_FaceConnect.hxx | 34 +- opencascade/ShapeFix_FixSmallFace.hxx | 83 +- opencascade/ShapeFix_FixSmallSolid.hxx | 56 +- opencascade/ShapeFix_FreeBounds.hxx | 60 +- opencascade/ShapeFix_FreeBounds.lxx | 16 +- opencascade/ShapeFix_IntersectionTool.hxx | 102 +- opencascade/ShapeFix_IntersectionTool.lxx | 5 +- opencascade/ShapeFix_Root.hxx | 106 +- opencascade/ShapeFix_Root.lxx | 87 +- .../ShapeFix_SequenceOfWireSegment.hxx | 1 - opencascade/ShapeFix_Shape.hxx | 85 +- opencascade/ShapeFix_Shape.lxx | 70 +- opencascade/ShapeFix_ShapeTolerance.hxx | 37 +- opencascade/ShapeFix_Shell.hxx | 94 +- opencascade/ShapeFix_Shell.lxx | 18 +- opencascade/ShapeFix_Solid.hxx | 82 +- opencascade/ShapeFix_SplitCommonVertex.hxx | 32 +- opencascade/ShapeFix_SplitTool.hxx | 69 +- opencascade/ShapeFix_Wire.hxx | 457 +- opencascade/ShapeFix_Wire.lxx | 401 +- opencascade/ShapeFix_WireSegment.hxx | 129 +- opencascade/ShapeFix_WireVertex.hxx | 46 +- opencascade/ShapeFix_Wireframe.hxx | 76 +- opencascade/ShapeFix_Wireframe.lxx | 47 +- opencascade/ShapePersistent.hxx | 3 +- opencascade/ShapePersistent_BRep.hxx | 335 +- opencascade/ShapePersistent_Geom.hxx | 266 +- opencascade/ShapePersistent_Geom2d.hxx | 137 +- opencascade/ShapePersistent_Geom2d_Curve.hxx | 251 +- opencascade/ShapePersistent_Geom_Curve.hxx | 235 +- opencascade/ShapePersistent_Geom_Surface.hxx | 324 +- opencascade/ShapePersistent_HArray1.hxx | 15 +- opencascade/ShapePersistent_HArray2.hxx | 2 - opencascade/ShapePersistent_HSequence.hxx | 73 +- opencascade/ShapePersistent_Poly.hxx | 100 +- opencascade/ShapePersistent_TopoDS.hxx | 106 +- opencascade/ShapePersistent_TriangleMode.hxx | 2 - opencascade/ShapeProcess.hxx | 90 +- opencascade/ShapeProcessAPI_ApplySequence.hxx | 49 +- opencascade/ShapeProcess_Context.hxx | 105 +- opencascade/ShapeProcess_OperFunc.hxx | 4 +- opencascade/ShapeProcess_OperLibrary.hxx | 39 +- opencascade/ShapeProcess_Operator.hxx | 27 +- opencascade/ShapeProcess_ShapeContext.hxx | 108 +- opencascade/ShapeProcess_UOperator.hxx | 30 +- opencascade/ShapeUpgrade.hxx | 15 +- opencascade/ShapeUpgrade_ClosedEdgeDivide.hxx | 25 +- opencascade/ShapeUpgrade_ClosedFaceDivide.hxx | 20 +- .../ShapeUpgrade_ConvertCurve2dToBezier.hxx | 10 +- .../ShapeUpgrade_ConvertCurve3dToBezier.hxx | 46 +- .../ShapeUpgrade_ConvertCurve3dToBezier.lxx | 24 +- ...apeUpgrade_ConvertSurfaceToBezierBasis.hxx | 71 +- ...apeUpgrade_ConvertSurfaceToBezierBasis.lxx | 32 +- opencascade/ShapeUpgrade_EdgeDivide.hxx | 67 +- opencascade/ShapeUpgrade_EdgeDivide.lxx | 20 +- opencascade/ShapeUpgrade_FaceDivide.hxx | 61 +- opencascade/ShapeUpgrade_FaceDivideArea.hxx | 40 +- opencascade/ShapeUpgrade_FaceDivideArea.lxx | 10 +- .../ShapeUpgrade_FixSmallBezierCurves.hxx | 29 +- opencascade/ShapeUpgrade_FixSmallCurves.hxx | 55 +- .../ShapeUpgrade_RemoveInternalWires.hxx | 76 +- .../ShapeUpgrade_RemoveInternalWires.lxx | 34 +- opencascade/ShapeUpgrade_RemoveLocations.hxx | 53 +- opencascade/ShapeUpgrade_RemoveLocations.lxx | 35 +- .../ShapeUpgrade_ShapeConvertToBezier.hxx | 121 +- .../ShapeUpgrade_ShapeConvertToBezier.lxx | 80 +- opencascade/ShapeUpgrade_ShapeDivide.hxx | 110 +- opencascade/ShapeUpgrade_ShapeDivideAngle.hxx | 39 +- opencascade/ShapeUpgrade_ShapeDivideArea.hxx | 38 +- opencascade/ShapeUpgrade_ShapeDivideArea.lxx | 17 +- .../ShapeUpgrade_ShapeDivideClosed.hxx | 28 +- .../ShapeUpgrade_ShapeDivideClosedEdges.hxx | 29 +- .../ShapeUpgrade_ShapeDivideContinuity.hxx | 46 +- opencascade/ShapeUpgrade_ShellSewing.hxx | 35 +- opencascade/ShapeUpgrade_SplitCurve.hxx | 48 +- opencascade/ShapeUpgrade_SplitCurve2d.hxx | 39 +- .../ShapeUpgrade_SplitCurve2dContinuity.hxx | 36 +- opencascade/ShapeUpgrade_SplitCurve3d.hxx | 39 +- .../ShapeUpgrade_SplitCurve3dContinuity.hxx | 38 +- opencascade/ShapeUpgrade_SplitSurface.hxx | 84 +- .../ShapeUpgrade_SplitSurfaceAngle.hxx | 32 +- opencascade/ShapeUpgrade_SplitSurfaceArea.hxx | 35 +- opencascade/ShapeUpgrade_SplitSurfaceArea.lxx | 11 +- .../ShapeUpgrade_SplitSurfaceContinuity.hxx | 36 +- opencascade/ShapeUpgrade_Tool.hxx | 67 +- opencascade/ShapeUpgrade_Tool.lxx | 61 +- opencascade/ShapeUpgrade_UnifySameDomain.hxx | 134 +- opencascade/ShapeUpgrade_WireDivide.hxx | 104 +- opencascade/Standard.hxx | 76 +- opencascade/Standard_AbortiveTransaction.hxx | 5 +- opencascade/Standard_ArrayStreamBuffer.hxx | 54 +- opencascade/Standard_Assert.hxx | 125 +- opencascade/Standard_Atomic.hxx | 111 +- opencascade/Standard_Boolean.hxx | 3 +- opencascade/Standard_Byte.hxx | 5 +- opencascade/Standard_CLocaleSentry.hxx | 44 +- opencascade/Standard_CString.hxx | 45 +- opencascade/Standard_CStringHasher.hxx | 2 - opencascade/Standard_Character.hxx | 102 +- opencascade/Standard_Condition.hxx | 13 +- opencascade/Standard_ConstructionError.hxx | 5 +- opencascade/Standard_DefineAlloc.hxx | 97 +- opencascade/Standard_DefineException.hxx | 71 +- opencascade/Standard_DefineHandle.hxx | 6 +- opencascade/Standard_DimensionError.hxx | 5 +- opencascade/Standard_DimensionMismatch.hxx | 5 +- opencascade/Standard_DivideByZero.hxx | 5 +- opencascade/Standard_DomainError.hxx | 5 +- opencascade/Standard_Dump.hxx | 527 +- opencascade/Standard_ErrorHandler.hxx | 142 +- opencascade/Standard_ExtCharacter.hxx | 21 +- opencascade/Standard_Failure.hxx | 78 +- opencascade/Standard_GUID.hxx | 162 +- opencascade/Standard_Handle.hxx | 791 +- opencascade/Standard_HandlerStatus.hxx | 7 +- opencascade/Standard_HashUtils.hxx | 162 +- opencascade/Standard_HashUtils.lxx | 109 +- opencascade/Standard_ImmutableObject.hxx | 5 +- opencascade/Standard_Integer.hxx | 52 +- opencascade/Standard_JmpBuf.hxx | 10 +- opencascade/Standard_LicenseError.hxx | 5 +- opencascade/Standard_LicenseNotFound.hxx | 5 +- opencascade/Standard_MMgrOpt.hxx | 173 +- opencascade/Standard_MMgrRoot.hxx | 47 +- opencascade/Standard_Macro.hxx | 289 +- opencascade/Standard_MemoryUtils.hxx | 73 +- opencascade/Standard_MultiplyDefined.hxx | 5 +- opencascade/Standard_Mutex.hxx | 137 +- opencascade/Standard_NegativeValue.hxx | 5 +- opencascade/Standard_NoMoreObject.hxx | 5 +- opencascade/Standard_NoSuchObject.hxx | 5 +- opencascade/Standard_NotImplemented.hxx | 5 +- opencascade/Standard_NullObject.hxx | 5 +- opencascade/Standard_NullValue.hxx | 5 +- opencascade/Standard_NumericError.hxx | 5 +- opencascade/Standard_OStream.hxx | 2 - opencascade/Standard_OutOfMemory.hxx | 28 +- opencascade/Standard_OutOfRange.hxx | 17 +- opencascade/Standard_Overflow.hxx | 5 +- opencascade/Standard_Persistent.hxx | 11 +- opencascade/Standard_ProgramError.hxx | 5 +- opencascade/Standard_RangeError.hxx | 22 +- opencascade/Standard_ReadBuffer.hxx | 85 +- opencascade/Standard_ReadLineBuffer.hxx | 145 +- opencascade/Standard_Real.hxx | 282 +- opencascade/Standard_ShortReal.hxx | 109 +- opencascade/Standard_Std.hxx | 84 +- opencascade/Standard_ThreadId.hxx | 1 - opencascade/Standard_Time.hxx | 13 +- opencascade/Standard_Transient.hxx | 52 +- opencascade/Standard_Type.hxx | 260 +- opencascade/Standard_TypeDef.hxx | 26 +- opencascade/Standard_TypeMismatch.hxx | 5 +- opencascade/Standard_Underflow.hxx | 5 +- opencascade/Standard_Version.hxx | 51 +- opencascade/Standard_VersionInfo.hxx | 48 + .../Standard_WarningDisableFunctionCast.hxx | 10 +- opencascade/Standard_WarningsDisable.hxx | 5 +- opencascade/Standard_WarningsRestore.hxx | 3 +- opencascade/StdDrivers.hxx | 6 +- .../StdDrivers_DocumentRetrievalDriver.hxx | 4 +- opencascade/StdFail_InfiniteSolutions.hxx | 5 +- opencascade/StdFail_NotDone.hxx | 5 +- opencascade/StdFail_Undefined.hxx | 5 +- opencascade/StdFail_UndefinedDerivative.hxx | 5 +- opencascade/StdFail_UndefinedValue.hxx | 5 +- opencascade/StdLDrivers.hxx | 6 +- .../StdLDrivers_DocumentRetrievalDriver.hxx | 42 +- opencascade/StdLPersistent.hxx | 3 +- opencascade/StdLPersistent_Collection.hxx | 120 +- opencascade/StdLPersistent_Data.hxx | 14 +- opencascade/StdLPersistent_Dependency.hxx | 28 +- opencascade/StdLPersistent_Document.hxx | 13 +- opencascade/StdLPersistent_Function.hxx | 23 +- opencascade/StdLPersistent_HArray1.hxx | 139 +- opencascade/StdLPersistent_HArray2.hxx | 136 +- opencascade/StdLPersistent_HString.hxx | 19 +- opencascade/StdLPersistent_NamedData.hxx | 48 +- opencascade/StdLPersistent_Real.hxx | 30 +- opencascade/StdLPersistent_TreeNode.hxx | 14 +- opencascade/StdLPersistent_Value.hxx | 57 +- opencascade/StdLPersistent_Variable.hxx | 29 +- opencascade/StdLPersistent_Void.hxx | 27 +- opencascade/StdLPersistent_XLink.hxx | 20 +- opencascade/StdObjMgt_Attribute.hxx | 54 +- opencascade/StdObjMgt_MapOfInstantiators.hxx | 12 +- opencascade/StdObjMgt_Persistent.hxx | 17 +- opencascade/StdObjMgt_ReadData.hxx | 78 +- opencascade/StdObjMgt_SharedObject.hxx | 77 +- .../StdObjMgt_TransientPersistentMap.hxx | 4 +- opencascade/StdObjMgt_WriteData.hxx | 65 +- opencascade/StdObject_Location.hxx | 24 +- opencascade/StdObject_Shape.hxx | 40 +- opencascade/StdObject_gp_Axes.hxx | 100 +- opencascade/StdObject_gp_Curves.hxx | 158 +- opencascade/StdObject_gp_Surfaces.hxx | 66 +- opencascade/StdObject_gp_Trsfs.hxx | 87 +- opencascade/StdObject_gp_Vectors.hxx | 96 +- opencascade/StdPersistent.hxx | 3 +- opencascade/StdPersistent_DataXtd.hxx | 55 +- .../StdPersistent_DataXtd_Constraint.hxx | 36 +- .../StdPersistent_DataXtd_PatternStd.hxx | 20 +- opencascade/StdPersistent_HArray1.hxx | 6 +- opencascade/StdPersistent_Naming.hxx | 65 +- opencascade/StdPersistent_PPrsStd.hxx | 30 +- opencascade/StdPersistent_TopLoc.hxx | 29 +- opencascade/StdPersistent_TopoDS.hxx | 27 +- opencascade/StdPrs_BRepFont.hxx | 152 +- opencascade/StdPrs_BRepTextBuilder.hxx | 17 +- opencascade/StdPrs_Curve.hxx | 80 +- opencascade/StdPrs_DeflectionCurve.hxx | 98 +- opencascade/StdPrs_HLRPolyShape.hxx | 17 +- opencascade/StdPrs_HLRShape.hxx | 15 +- opencascade/StdPrs_HLRShapeI.hxx | 13 +- opencascade/StdPrs_HLRToolShape.hxx | 50 +- opencascade/StdPrs_Isolines.hxx | 294 +- opencascade/StdPrs_Plane.hxx | 18 +- opencascade/StdPrs_Point.hxx | 2 +- opencascade/StdPrs_PoleCurve.hxx | 27 +- opencascade/StdPrs_ShadedShape.hxx | 79 +- opencascade/StdPrs_ShadedSurface.hxx | 27 +- opencascade/StdPrs_ShapeTool.hxx | 51 +- opencascade/StdPrs_ToolPoint.hxx | 9 +- opencascade/StdPrs_ToolRFace.hxx | 21 +- opencascade/StdPrs_ToolTriangulatedShape.hxx | 60 +- opencascade/StdPrs_ToolVertex.hxx | 9 +- opencascade/StdPrs_Volume.hxx | 6 +- .../StdPrs_WFDeflectionRestrictedFace.hxx | 73 +- opencascade/StdPrs_WFDeflectionSurface.hxx | 27 +- opencascade/StdPrs_WFPoleSurface.hxx | 27 +- opencascade/StdPrs_WFRestrictedFace.hxx | 101 +- opencascade/StdPrs_WFShape.hxx | 101 +- opencascade/StdPrs_WFSurface.hxx | 27 +- opencascade/StdSelect.hxx | 7 +- opencascade/StdSelect_BRepOwner.hxx | 66 +- opencascade/StdSelect_BRepSelectionTool.hxx | 132 +- opencascade/StdSelect_EdgeFilter.hxx | 34 +- opencascade/StdSelect_FaceFilter.hxx | 34 +- opencascade/StdSelect_Shape.hxx | 18 +- opencascade/StdSelect_ShapeTypeFilter.hxx | 11 +- opencascade/StdSelect_TypeOfEdge.hxx | 6 +- opencascade/StdSelect_TypeOfFace.hxx | 14 +- opencascade/StdStorage.hxx | 26 +- opencascade/StdStorage_BacketOfPersistent.hxx | 48 +- opencascade/StdStorage_Data.hxx | 24 +- opencascade/StdStorage_HSequenceOfRoots.hxx | 1 - opencascade/StdStorage_HeaderData.hxx | 14 +- opencascade/StdStorage_MapOfRoots.hxx | 7 +- opencascade/StdStorage_MapOfTypes.hxx | 1 - opencascade/StdStorage_Root.hxx | 14 +- opencascade/StdStorage_RootData.hxx | 18 +- opencascade/StdStorage_SequenceOfRoots.hxx | 1 - opencascade/StdStorage_TypeData.hxx | 44 +- opencascade/StepAP203_ApprovedItem.hxx | 50 +- .../StepAP203_Array1OfApprovedItem.hxx | 1 - .../StepAP203_Array1OfCertifiedItem.hxx | 1 - .../StepAP203_Array1OfChangeRequestItem.hxx | 1 - .../StepAP203_Array1OfClassifiedItem.hxx | 1 - .../StepAP203_Array1OfContractedItem.hxx | 1 - .../StepAP203_Array1OfDateTimeItem.hxx | 1 - ...epAP203_Array1OfPersonOrganizationItem.hxx | 4 +- .../StepAP203_Array1OfSpecifiedItem.hxx | 1 - .../StepAP203_Array1OfStartRequestItem.hxx | 1 - opencascade/StepAP203_Array1OfWorkItem.hxx | 1 - opencascade/StepAP203_CcDesignApproval.hxx | 33 +- .../StepAP203_CcDesignCertification.hxx | 34 +- opencascade/StepAP203_CcDesignContract.hxx | 33 +- ...tepAP203_CcDesignDateAndTimeAssignment.hxx | 35 +- ...cDesignPersonAndOrganizationAssignment.hxx | 43 +- ...epAP203_CcDesignSecurityClassification.hxx | 38 +- ...epAP203_CcDesignSpecificationReference.hxx | 34 +- opencascade/StepAP203_CertifiedItem.hxx | 30 +- opencascade/StepAP203_Change.hxx | 33 +- opencascade/StepAP203_ChangeRequest.hxx | 34 +- opencascade/StepAP203_ChangeRequestItem.hxx | 30 +- opencascade/StepAP203_ClassifiedItem.hxx | 32 +- opencascade/StepAP203_ContractedItem.hxx | 30 +- opencascade/StepAP203_DateTimeItem.hxx | 46 +- .../StepAP203_HArray1OfApprovedItem.hxx | 1 - .../StepAP203_HArray1OfCertifiedItem.hxx | 1 - .../StepAP203_HArray1OfChangeRequestItem.hxx | 1 - .../StepAP203_HArray1OfClassifiedItem.hxx | 1 - .../StepAP203_HArray1OfContractedItem.hxx | 1 - .../StepAP203_HArray1OfDateTimeItem.hxx | 1 - ...pAP203_HArray1OfPersonOrganizationItem.hxx | 1 - .../StepAP203_HArray1OfSpecifiedItem.hxx | 1 - .../StepAP203_HArray1OfStartRequestItem.hxx | 1 - opencascade/StepAP203_HArray1OfWorkItem.hxx | 1 - .../StepAP203_PersonOrganizationItem.hxx | 48 +- opencascade/StepAP203_SpecifiedItem.hxx | 32 +- opencascade/StepAP203_StartRequest.hxx | 34 +- opencascade/StepAP203_StartRequestItem.hxx | 30 +- opencascade/StepAP203_StartWork.hxx | 33 +- opencascade/StepAP203_WorkItem.hxx | 30 +- opencascade/StepAP209_Construct.hxx | 145 +- opencascade/StepAP214.hxx | 6 +- .../StepAP214_AppliedApprovalAssignment.hxx | 36 +- ...StepAP214_AppliedDateAndTimeAssignment.hxx | 37 +- .../StepAP214_AppliedDateAssignment.hxx | 37 +- .../StepAP214_AppliedDocumentReference.hxx | 37 +- ...ppliedExternalIdentificationAssignment.hxx | 43 +- .../StepAP214_AppliedGroupAssignment.hxx | 33 +- ...tepAP214_AppliedOrganizationAssignment.hxx | 37 +- ...AppliedPersonAndOrganizationAssignment.hxx | 45 +- .../StepAP214_AppliedPresentedItem.hxx | 35 +- ...ppliedSecurityClassificationAssignment.hxx | 46 +- opencascade/StepAP214_ApprovalItem.hxx | 63 +- .../StepAP214_Array1OfApprovalItem.hxx | 1 - ...14_Array1OfAutoDesignDateAndPersonItem.hxx | 4 +- ...P214_Array1OfAutoDesignDateAndTimeItem.hxx | 4 +- .../StepAP214_Array1OfAutoDesignDatedItem.hxx | 1 - ...AP214_Array1OfAutoDesignGeneralOrgItem.hxx | 4 +- ...tepAP214_Array1OfAutoDesignGroupedItem.hxx | 1 - ..._Array1OfAutoDesignPresentedItemSelect.hxx | 4 +- ...P214_Array1OfAutoDesignReferencingItem.hxx | 4 +- .../StepAP214_Array1OfDateAndTimeItem.hxx | 1 - opencascade/StepAP214_Array1OfDateItem.hxx | 1 - ...tepAP214_Array1OfDocumentReferenceItem.hxx | 1 - ...214_Array1OfExternalIdentificationItem.hxx | 4 +- opencascade/StepAP214_Array1OfGroupItem.hxx | 1 - .../StepAP214_Array1OfOrganizationItem.hxx | 1 - ...P214_Array1OfPersonAndOrganizationItem.hxx | 4 +- .../StepAP214_Array1OfPresentedItemSelect.hxx | 1 - ...214_Array1OfSecurityClassificationItem.hxx | 4 +- ..._AutoDesignActualDateAndTimeAssignment.hxx | 41 +- ...epAP214_AutoDesignActualDateAssignment.hxx | 37 +- ...StepAP214_AutoDesignApprovalAssignment.hxx | 36 +- ...P214_AutoDesignDateAndPersonAssignment.hxx | 44 +- .../StepAP214_AutoDesignDateAndPersonItem.hxx | 53 +- .../StepAP214_AutoDesignDateAndTimeItem.hxx | 39 +- opencascade/StepAP214_AutoDesignDatedItem.hxx | 41 +- .../StepAP214_AutoDesignDocumentReference.hxx | 37 +- .../StepAP214_AutoDesignGeneralOrgItem.hxx | 54 +- .../StepAP214_AutoDesignGroupAssignment.hxx | 36 +- .../StepAP214_AutoDesignGroupedItem.hxx | 66 +- ...AutoDesignNominalDateAndTimeAssignment.hxx | 41 +- ...pAP214_AutoDesignNominalDateAssignment.hxx | 37 +- ...AP214_AutoDesignOrganizationAssignment.hxx | 38 +- .../StepAP214_AutoDesignOrganizationItem.hxx | 33 +- ...oDesignPersonAndOrganizationAssignment.hxx | 45 +- .../StepAP214_AutoDesignPresentedItem.hxx | 37 +- ...tepAP214_AutoDesignPresentedItemSelect.hxx | 44 +- .../StepAP214_AutoDesignReferencingItem.hxx | 63 +- ...DesignSecurityClassificationAssignment.hxx | 44 +- opencascade/StepAP214_Class.hxx | 22 +- opencascade/StepAP214_DateAndTimeItem.hxx | 38 +- opencascade/StepAP214_DateItem.hxx | 40 +- .../StepAP214_DocumentReferenceItem.hxx | 51 +- .../StepAP214_ExternalIdentificationItem.hxx | 41 +- .../StepAP214_ExternallyDefinedClass.hxx | 37 +- ...AP214_ExternallyDefinedGeneralProperty.hxx | 38 +- opencascade/StepAP214_GroupItem.hxx | 46 +- .../StepAP214_HArray1OfApprovalItem.hxx | 1 - ...4_HArray1OfAutoDesignDateAndPersonItem.hxx | 4 +- ...214_HArray1OfAutoDesignDateAndTimeItem.hxx | 4 +- ...StepAP214_HArray1OfAutoDesignDatedItem.hxx | 1 - ...P214_HArray1OfAutoDesignGeneralOrgItem.hxx | 4 +- ...epAP214_HArray1OfAutoDesignGroupedItem.hxx | 1 - ...HArray1OfAutoDesignPresentedItemSelect.hxx | 4 +- ...214_HArray1OfAutoDesignReferencingItem.hxx | 4 +- .../StepAP214_HArray1OfDateAndTimeItem.hxx | 1 - opencascade/StepAP214_HArray1OfDateItem.hxx | 1 - ...epAP214_HArray1OfDocumentReferenceItem.hxx | 1 - ...14_HArray1OfExternalIdentificationItem.hxx | 4 +- opencascade/StepAP214_HArray1OfGroupItem.hxx | 1 - .../StepAP214_HArray1OfOrganizationItem.hxx | 1 - ...214_HArray1OfPersonAndOrganizationItem.hxx | 4 +- ...StepAP214_HArray1OfPresentedItemSelect.hxx | 1 - ...14_HArray1OfSecurityClassificationItem.hxx | 4 +- opencascade/StepAP214_OrganizationItem.hxx | 38 +- .../StepAP214_PersonAndOrganizationItem.hxx | 35 +- opencascade/StepAP214_PresentedItemSelect.hxx | 36 +- opencascade/StepAP214_Protocol.hxx | 39 +- opencascade/StepAP214_RepItemGroup.hxx | 36 +- .../StepAP214_SecurityClassificationItem.hxx | 25 +- ...epAP242_DraughtingModelItemAssociation.hxx | 9 +- .../StepAP242_GeometricItemSpecificUsage.hxx | 10 +- opencascade/StepAP242_IdAttribute.hxx | 32 +- opencascade/StepAP242_IdAttributeSelect.hxx | 53 +- ...P242_ItemIdentifiedRepresentationUsage.hxx | 103 +- ...dentifiedRepresentationUsageDefinition.hxx | 85 +- opencascade/StepBasic_Action.hxx | 53 +- opencascade/StepBasic_ActionAssignment.hxx | 32 +- opencascade/StepBasic_ActionMethod.hxx | 58 +- .../StepBasic_ActionRequestAssignment.hxx | 33 +- .../StepBasic_ActionRequestSolution.hxx | 41 +- opencascade/StepBasic_Address.hxx | 196 +- opencascade/StepBasic_AheadOrBehind.hxx | 7 +- opencascade/StepBasic_ApplicationContext.hxx | 29 +- .../StepBasic_ApplicationContextElement.hxx | 39 +- ...tepBasic_ApplicationProtocolDefinition.hxx | 55 +- opencascade/StepBasic_Approval.hxx | 35 +- opencascade/StepBasic_ApprovalAssignment.hxx | 29 +- opencascade/StepBasic_ApprovalDateTime.hxx | 37 +- .../StepBasic_ApprovalPersonOrganization.hxx | 46 +- .../StepBasic_ApprovalRelationship.hxx | 52 +- opencascade/StepBasic_ApprovalRole.hxx | 29 +- opencascade/StepBasic_ApprovalStatus.hxx | 29 +- opencascade/StepBasic_AreaUnit.hxx | 23 +- opencascade/StepBasic_Array1OfApproval.hxx | 1 - .../StepBasic_Array1OfDerivedUnitElement.hxx | 4 +- opencascade/StepBasic_Array1OfDocument.hxx | 1 - opencascade/StepBasic_Array1OfNamedUnit.hxx | 1 - .../StepBasic_Array1OfOrganization.hxx | 1 - opencascade/StepBasic_Array1OfPerson.hxx | 1 - opencascade/StepBasic_Array1OfProduct.hxx | 1 - .../StepBasic_Array1OfProductContext.hxx | 1 - .../StepBasic_Array1OfProductDefinition.hxx | 1 - ...sic_Array1OfUncertaintyMeasureWithUnit.hxx | 4 +- opencascade/StepBasic_CalendarDate.hxx | 37 +- opencascade/StepBasic_Certification.hxx | 50 +- .../StepBasic_CertificationAssignment.hxx | 33 +- opencascade/StepBasic_CertificationType.hxx | 32 +- opencascade/StepBasic_CharacterizedObject.hxx | 44 +- opencascade/StepBasic_Contract.hxx | 48 +- opencascade/StepBasic_ContractAssignment.hxx | 32 +- opencascade/StepBasic_ContractType.hxx | 32 +- opencascade/StepBasic_ConversionBasedUnit.hxx | 40 +- ...epBasic_ConversionBasedUnitAndAreaUnit.hxx | 27 +- ...Basic_ConversionBasedUnitAndLengthUnit.hxx | 31 +- ...epBasic_ConversionBasedUnitAndMassUnit.hxx | 31 +- ...c_ConversionBasedUnitAndPlaneAngleUnit.hxx | 35 +- ...pBasic_ConversionBasedUnitAndRatioUnit.hxx | 31 +- ...c_ConversionBasedUnitAndSolidAngleUnit.hxx | 35 +- ...epBasic_ConversionBasedUnitAndTimeUnit.hxx | 31 +- ...Basic_ConversionBasedUnitAndVolumeUnit.hxx | 27 +- ...epBasic_CoordinatedUniversalTimeOffset.hxx | 54 +- opencascade/StepBasic_Date.hxx | 29 +- opencascade/StepBasic_DateAndTime.hxx | 38 +- .../StepBasic_DateAndTimeAssignment.hxx | 37 +- opencascade/StepBasic_DateAssignment.hxx | 36 +- opencascade/StepBasic_DateRole.hxx | 29 +- opencascade/StepBasic_DateTimeRole.hxx | 29 +- opencascade/StepBasic_DateTimeSelect.hxx | 35 +- opencascade/StepBasic_DerivedUnit.hxx | 35 +- opencascade/StepBasic_DerivedUnitElement.hxx | 37 +- opencascade/StepBasic_DesignContext.hxx | 22 +- opencascade/StepBasic_DigitalDocument.hxx | 23 +- .../StepBasic_DimensionalExponents.hxx | 72 +- opencascade/StepBasic_Document.hxx | 60 +- opencascade/StepBasic_DocumentFile.hxx | 41 +- .../StepBasic_DocumentProductAssociation.hxx | 65 +- .../StepBasic_DocumentProductEquivalence.hxx | 23 +- opencascade/StepBasic_DocumentReference.hxx | 34 +- .../StepBasic_DocumentRelationship.hxx | 52 +- .../StepBasic_DocumentRepresentationType.hxx | 42 +- opencascade/StepBasic_DocumentType.hxx | 29 +- .../StepBasic_DocumentUsageConstraint.hxx | 43 +- opencascade/StepBasic_Effectivity.hxx | 29 +- .../StepBasic_EffectivityAssignment.hxx | 33 +- opencascade/StepBasic_EulerAngles.hxx | 32 +- ...Basic_ExternalIdentificationAssignment.hxx | 39 +- opencascade/StepBasic_ExternalSource.hxx | 32 +- .../StepBasic_ExternallyDefinedItem.hxx | 41 +- opencascade/StepBasic_GeneralProperty.hxx | 51 +- .../StepBasic_GeneralPropertyAssociation.hxx | 77 + .../StepBasic_GeneralPropertyRelationship.hxx | 82 + opencascade/StepBasic_Group.hxx | 44 +- opencascade/StepBasic_GroupAssignment.hxx | 32 +- opencascade/StepBasic_GroupRelationship.hxx | 62 +- opencascade/StepBasic_HArray1OfApproval.hxx | 1 - .../StepBasic_HArray1OfDerivedUnitElement.hxx | 1 - opencascade/StepBasic_HArray1OfDocument.hxx | 1 - opencascade/StepBasic_HArray1OfNamedUnit.hxx | 1 - .../StepBasic_HArray1OfOrganization.hxx | 1 - opencascade/StepBasic_HArray1OfPerson.hxx | 1 - opencascade/StepBasic_HArray1OfProduct.hxx | 1 - .../StepBasic_HArray1OfProductContext.hxx | 1 - .../StepBasic_HArray1OfProductDefinition.hxx | 1 - ...ic_HArray1OfUncertaintyMeasureWithUnit.hxx | 4 +- .../StepBasic_IdentificationAssignment.hxx | 41 +- opencascade/StepBasic_IdentificationRole.hxx | 44 +- .../StepBasic_LengthMeasureWithUnit.hxx | 23 +- opencascade/StepBasic_LengthUnit.hxx | 23 +- opencascade/StepBasic_LocalTime.hxx | 72 +- opencascade/StepBasic_MassMeasureWithUnit.hxx | 23 +- opencascade/StepBasic_MassUnit.hxx | 22 +- opencascade/StepBasic_MeasureValueMember.hxx | 28 +- opencascade/StepBasic_MeasureWithUnit.hxx | 42 +- opencascade/StepBasic_MechanicalContext.hxx | 23 +- opencascade/StepBasic_NameAssignment.hxx | 32 +- opencascade/StepBasic_NamedUnit.hxx | 30 +- opencascade/StepBasic_ObjectRole.hxx | 44 +- opencascade/StepBasic_OrdinalDate.hxx | 30 +- opencascade/StepBasic_Organization.hxx | 50 +- .../StepBasic_OrganizationAssignment.hxx | 37 +- opencascade/StepBasic_OrganizationRole.hxx | 29 +- .../StepBasic_OrganizationalAddress.hxx | 70 +- opencascade/StepBasic_Person.hxx | 130 +- .../StepBasic_PersonAndOrganization.hxx | 38 +- ...pBasic_PersonAndOrganizationAssignment.hxx | 38 +- .../StepBasic_PersonAndOrganizationRole.hxx | 29 +- .../StepBasic_PersonOrganizationSelect.hxx | 35 +- opencascade/StepBasic_PersonalAddress.hxx | 68 +- ...sic_PhysicallyModeledProductDefinition.hxx | 23 +- .../StepBasic_PlaneAngleMeasureWithUnit.hxx | 23 +- opencascade/StepBasic_PlaneAngleUnit.hxx | 23 +- opencascade/StepBasic_Product.hxx | 62 +- opencascade/StepBasic_ProductCategory.hxx | 43 +- .../StepBasic_ProductCategoryRelationship.hxx | 62 +- .../StepBasic_ProductConceptContext.hxx | 36 +- opencascade/StepBasic_ProductContext.hxx | 31 +- opencascade/StepBasic_ProductDefinition.hxx | 55 +- .../StepBasic_ProductDefinitionContext.hxx | 31 +- ...StepBasic_ProductDefinitionEffectivity.hxx | 30 +- .../StepBasic_ProductDefinitionFormation.hxx | 43 +- ...ProductDefinitionFormationRelationship.hxx | 75 +- ...DefinitionFormationWithSpecifiedSource.hxx | 39 +- ...StepBasic_ProductDefinitionOrReference.hxx | 18 +- .../StepBasic_ProductDefinitionReference.hxx | 74 +- ...nitionReferenceWithLocalRepresentation.hxx | 37 +- ...tepBasic_ProductDefinitionRelationship.hxx | 85 +- ...oductDefinitionWithAssociatedDocuments.hxx | 46 +- ...epBasic_ProductOrFormationOrDefinition.hxx | 34 +- ...tepBasic_ProductRelatedProductCategory.hxx | 38 +- opencascade/StepBasic_ProductType.hxx | 23 +- .../StepBasic_RatioMeasureWithUnit.hxx | 23 +- opencascade/StepBasic_RatioUnit.hxx | 23 +- opencascade/StepBasic_RoleAssociation.hxx | 41 +- opencascade/StepBasic_RoleSelect.hxx | 53 +- .../StepBasic_SecurityClassification.hxx | 46 +- ...Basic_SecurityClassificationAssignment.hxx | 31 +- .../StepBasic_SecurityClassificationLevel.hxx | 29 +- opencascade/StepBasic_SiPrefix.hxx | 33 +- opencascade/StepBasic_SiUnit.hxx | 53 +- opencascade/StepBasic_SiUnitAndAreaUnit.hxx | 26 +- opencascade/StepBasic_SiUnitAndLengthUnit.hxx | 31 +- opencascade/StepBasic_SiUnitAndMassUnit.hxx | 31 +- .../StepBasic_SiUnitAndPlaneAngleUnit.hxx | 31 +- opencascade/StepBasic_SiUnitAndRatioUnit.hxx | 31 +- .../StepBasic_SiUnitAndSolidAngleUnit.hxx | 31 +- ..._SiUnitAndThermodynamicTemperatureUnit.hxx | 33 +- opencascade/StepBasic_SiUnitAndTimeUnit.hxx | 31 +- opencascade/StepBasic_SiUnitAndVolumeUnit.hxx | 26 +- opencascade/StepBasic_SiUnitName.hxx | 57 +- opencascade/StepBasic_SizeMember.hxx | 28 +- opencascade/StepBasic_SizeSelect.hxx | 43 +- .../StepBasic_SolidAngleMeasureWithUnit.hxx | 23 +- opencascade/StepBasic_SolidAngleUnit.hxx | 23 +- opencascade/StepBasic_Source.hxx | 7 +- opencascade/StepBasic_SourceItem.hxx | 33 +- ...StepBasic_ThermodynamicTemperatureUnit.hxx | 22 +- opencascade/StepBasic_TimeMeasureWithUnit.hxx | 23 +- opencascade/StepBasic_TimeUnit.hxx | 23 +- .../StepBasic_UncertaintyMeasureWithUnit.hxx | 38 +- opencascade/StepBasic_Unit.hxx | 32 +- .../StepBasic_VersionedActionRequest.hxx | 58 +- opencascade/StepBasic_VolumeUnit.hxx | 23 +- .../StepBasic_WeekOfYearAndDayDate.hxx | 42 +- opencascade/StepData.hxx | 14 +- opencascade/StepData_Array1OfField.hxx | 1 - opencascade/StepData_ConfParameters.hxx | 175 +- opencascade/StepData_DefaultGeneral.hxx | 47 +- opencascade/StepData_Described.hxx | 52 +- opencascade/StepData_ECDescr.hxx | 42 +- opencascade/StepData_EDescr.hxx | 28 +- opencascade/StepData_ESDescr.hxx | 86 +- opencascade/StepData_EnumTool.hxx | 95 +- opencascade/StepData_Factors.hxx | 11 +- opencascade/StepData_Field.hxx | 124 +- opencascade/StepData_FieldList.hxx | 20 +- opencascade/StepData_FieldList1.hxx | 29 +- opencascade/StepData_FieldListD.hxx | 31 +- opencascade/StepData_FieldListN.hxx | 27 +- opencascade/StepData_FileProtocol.hxx | 49 +- opencascade/StepData_FileRecognizer.hxx | 46 +- opencascade/StepData_FreeFormEntity.hxx | 63 +- opencascade/StepData_GeneralModule.hxx | 41 +- .../StepData_GlobalNodeOfWriterLib.hxx | 38 +- opencascade/StepData_HArray1OfField.hxx | 1 - opencascade/StepData_Logical.hxx | 6 +- opencascade/StepData_NodeOfWriterLib.hxx | 35 +- opencascade/StepData_PDescr.hxx | 163 +- opencascade/StepData_Plex.hxx | 67 +- opencascade/StepData_Protocol.hxx | 112 +- opencascade/StepData_ReadWriteModule.hxx | 76 +- opencascade/StepData_SelectArrReal.hxx | 29 +- opencascade/StepData_SelectInt.hxx | 30 +- opencascade/StepData_SelectMember.hxx | 82 +- opencascade/StepData_SelectNamed.hxx | 56 +- opencascade/StepData_SelectReal.hxx | 28 +- opencascade/StepData_SelectType.hxx | 82 +- opencascade/StepData_Simple.hxx | 71 +- opencascade/StepData_StepDumper.hxx | 47 +- opencascade/StepData_StepModel.hxx | 93 +- opencascade/StepData_StepReaderData.hxx | 331 +- opencascade/StepData_StepReaderTool.hxx | 65 +- opencascade/StepData_StepWriter.hxx | 228 +- opencascade/StepData_UndefinedEntity.hxx | 61 +- opencascade/StepData_WriterLib.hxx | 56 +- .../StepDimTol_AngularityTolerance.hxx | 26 +- opencascade/StepDimTol_AreaUnitType.hxx | 3 +- .../StepDimTol_Array1OfDatumReference.hxx | 1 - ...mTol_Array1OfDatumReferenceCompartment.hxx | 3 +- ...epDimTol_Array1OfDatumReferenceElement.hxx | 3 +- ...pDimTol_Array1OfDatumReferenceModifier.hxx | 3 +- ...pDimTol_Array1OfDatumSystemOrReference.hxx | 3 +- ...Tol_Array1OfGeometricToleranceModifier.hxx | 3 +- .../StepDimTol_CircularRunoutTolerance.hxx | 26 +- .../StepDimTol_CoaxialityTolerance.hxx | 26 +- opencascade/StepDimTol_CommonDatum.hxx | 36 +- .../StepDimTol_ConcentricityTolerance.hxx | 26 +- .../StepDimTol_CylindricityTolerance.hxx | 22 +- opencascade/StepDimTol_Datum.hxx | 30 +- opencascade/StepDimTol_DatumFeature.hxx | 22 +- opencascade/StepDimTol_DatumOrCommonDatum.hxx | 18 +- opencascade/StepDimTol_DatumReference.hxx | 41 +- .../StepDimTol_DatumReferenceCompartment.hxx | 4 +- .../StepDimTol_DatumReferenceElement.hxx | 4 +- .../StepDimTol_DatumReferenceModifier.hxx | 20 +- .../StepDimTol_DatumReferenceModifierType.hxx | 3 +- ...DimTol_DatumReferenceModifierWithValue.hxx | 36 +- opencascade/StepDimTol_DatumSystem.hxx | 50 +- .../StepDimTol_DatumSystemOrReference.hxx | 17 +- opencascade/StepDimTol_DatumTarget.hxx | 38 +- opencascade/StepDimTol_FlatnessTolerance.hxx | 22 +- .../StepDimTol_GeneralDatumReference.hxx | 70 +- .../StepDimTol_GeoTolAndGeoTolWthDatRef.hxx | 55 +- ...olAndGeoTolWthDatRefAndGeoTolWthMaxTol.hxx | 58 +- ...eoTolAndGeoTolWthDatRefAndGeoTolWthMod.hxx | 81 +- ...ndGeoTolWthDatRefAndModGeoTolAndPosTol.hxx | 68 +- ...oTolAndGeoTolWthDatRefAndUneqDisGeoTol.hxx | 55 +- .../StepDimTol_GeoTolAndGeoTolWthMaxTol.hxx | 47 +- .../StepDimTol_GeoTolAndGeoTolWthMod.hxx | 55 +- opencascade/StepDimTol_GeometricTolerance.hxx | 76 +- .../StepDimTol_GeometricToleranceModifier.hxx | 3 +- ...pDimTol_GeometricToleranceRelationship.hxx | 61 +- .../StepDimTol_GeometricToleranceTarget.hxx | 25 +- .../StepDimTol_GeometricToleranceType.hxx | 3 +- ...l_GeometricToleranceWithDatumReference.hxx | 58 +- ..._GeometricToleranceWithDefinedAreaUnit.hxx | 57 +- ...mTol_GeometricToleranceWithDefinedUnit.hxx | 36 +- ...GeometricToleranceWithMaximumTolerance.hxx | 30 +- ...DimTol_GeometricToleranceWithModifiers.hxx | 47 +- .../StepDimTol_HArray1OfDatumReference.hxx | 1 - ...Tol_HArray1OfDatumReferenceCompartment.hxx | 3 +- ...DimTol_HArray1OfDatumReferenceModifier.hxx | 3 +- ...DimTol_HArray1OfDatumSystemOrReference.hxx | 3 +- ...ol_HArray1OfGeometricToleranceModifier.hxx | 3 +- opencascade/StepDimTol_LimitCondition.hxx | 7 +- .../StepDimTol_LineProfileTolerance.hxx | 22 +- .../StepDimTol_ModifiedGeometricTolerance.hxx | 50 +- .../StepDimTol_NonUniformZoneDefinition.hxx | 4 +- .../StepDimTol_ParallelismTolerance.hxx | 26 +- .../StepDimTol_PerpendicularityTolerance.hxx | 26 +- .../StepDimTol_PlacedDatumTargetFeature.hxx | 22 +- opencascade/StepDimTol_PositionTolerance.hxx | 22 +- .../StepDimTol_ProjectedZoneDefinition.hxx | 43 +- opencascade/StepDimTol_RoundnessTolerance.hxx | 22 +- .../StepDimTol_RunoutZoneDefinition.hxx | 26 +- .../StepDimTol_RunoutZoneOrientation.hxx | 22 +- .../StepDimTol_ShapeToleranceSelect.hxx | 32 +- ...tepDimTol_SimpleDatumReferenceModifier.hxx | 3 +- ...Tol_SimpleDatumReferenceModifierMember.hxx | 41 +- .../StepDimTol_StraightnessTolerance.hxx | 22 +- .../StepDimTol_SurfaceProfileTolerance.hxx | 22 +- opencascade/StepDimTol_SymmetryTolerance.hxx | 26 +- opencascade/StepDimTol_ToleranceZone.hxx | 69 +- .../StepDimTol_ToleranceZoneDefinition.hxx | 61 +- opencascade/StepDimTol_ToleranceZoneForm.hxx | 23 +- .../StepDimTol_ToleranceZoneTarget.hxx | 25 +- .../StepDimTol_TotalRunoutTolerance.hxx | 26 +- ...ol_UnequallyDisposedGeometricTolerance.hxx | 27 +- ...ement_AnalysisItemWithinRepresentation.hxx | 59 +- ...t_Array1OfCurveElementEndReleasePacket.hxx | 4 +- ..._Array1OfCurveElementSectionDefinition.hxx | 4 +- ...OfHSequenceOfCurveElementPurposeMember.hxx | 4 +- ...HSequenceOfSurfaceElementPurposeMember.hxx | 4 +- ...ment_Array1OfMeasureOrUnspecifiedValue.hxx | 4 +- .../StepElement_Array1OfSurfaceSection.hxx | 1 - ...epElement_Array1OfVolumeElementPurpose.hxx | 4 +- ...ent_Array1OfVolumeElementPurposeMember.hxx | 4 +- ...ment_Array2OfCurveElementPurposeMember.hxx | 4 +- ...pElement_Array2OfSurfaceElementPurpose.hxx | 4 +- ...nt_Array2OfSurfaceElementPurposeMember.hxx | 4 +- .../StepElement_Curve3dElementDescriptor.hxx | 36 +- opencascade/StepElement_CurveEdge.hxx | 3 +- ...epElement_CurveElementEndReleasePacket.hxx | 41 +- .../StepElement_CurveElementFreedom.hxx | 50 +- .../StepElement_CurveElementFreedomMember.hxx | 35 +- .../StepElement_CurveElementPurpose.hxx | 50 +- .../StepElement_CurveElementPurposeMember.hxx | 35 +- ...pElement_CurveElementSectionDefinition.hxx | 41 +- ..._CurveElementSectionDerivedDefinitions.hxx | 130 +- opencascade/StepElement_Element2dShape.hxx | 5 +- opencascade/StepElement_ElementAspect.hxx | 96 +- .../StepElement_ElementAspectMember.hxx | 35 +- opencascade/StepElement_ElementDescriptor.hxx | 41 +- opencascade/StepElement_ElementMaterial.hxx | 52 +- opencascade/StepElement_ElementOrder.hxx | 7 +- opencascade/StepElement_ElementVolume.hxx | 3 +- ...pElement_EnumeratedCurveElementFreedom.hxx | 17 +- ...pElement_EnumeratedCurveElementPurpose.hxx | 15 +- ...lement_EnumeratedSurfaceElementPurpose.hxx | 11 +- ...Element_EnumeratedVolumeElementPurpose.hxx | 3 +- ..._HArray1OfCurveElementEndReleasePacket.hxx | 4 +- ...HArray1OfCurveElementSectionDefinition.hxx | 4 +- ...OfHSequenceOfCurveElementPurposeMember.hxx | 4 +- ...HSequenceOfSurfaceElementPurposeMember.hxx | 4 +- ...ent_HArray1OfMeasureOrUnspecifiedValue.hxx | 4 +- .../StepElement_HArray1OfSurfaceSection.hxx | 1 - ...pElement_HArray1OfVolumeElementPurpose.hxx | 1 - ...nt_HArray1OfVolumeElementPurposeMember.hxx | 4 +- ...ent_HArray2OfCurveElementPurposeMember.hxx | 4 +- ...Element_HArray2OfSurfaceElementPurpose.hxx | 4 +- ...t_HArray2OfSurfaceElementPurposeMember.hxx | 4 +- ...t_HSequenceOfCurveElementPurposeMember.hxx | 4 +- ...equenceOfCurveElementSectionDefinition.hxx | 4 +- ...StepElement_HSequenceOfElementMaterial.hxx | 1 - ...HSequenceOfSurfaceElementPurposeMember.hxx | 4 +- .../StepElement_MeasureOrUnspecifiedValue.hxx | 48 +- ...lement_MeasureOrUnspecifiedValueMember.hxx | 35 +- ...nt_SequenceOfCurveElementPurposeMember.hxx | 4 +- ...equenceOfCurveElementSectionDefinition.hxx | 4 +- .../StepElement_SequenceOfElementMaterial.hxx | 4 +- ..._SequenceOfSurfaceElementPurposeMember.hxx | 4 +- ...StepElement_Surface3dElementDescriptor.hxx | 48 +- .../StepElement_SurfaceElementProperty.hxx | 50 +- .../StepElement_SurfaceElementPurpose.hxx | 53 +- ...tepElement_SurfaceElementPurposeMember.hxx | 35 +- opencascade/StepElement_SurfaceSection.hxx | 48 +- .../StepElement_SurfaceSectionField.hxx | 22 +- ...tepElement_SurfaceSectionFieldConstant.hxx | 32 +- ...StepElement_SurfaceSectionFieldVarying.hxx | 42 +- .../StepElement_UniformSurfaceSection.hxx | 54 +- opencascade/StepElement_UnspecifiedValue.hxx | 3 +- .../StepElement_Volume3dElementDescriptor.hxx | 44 +- .../StepElement_Volume3dElementShape.hxx | 9 +- .../StepElement_VolumeElementPurpose.hxx | 50 +- ...StepElement_VolumeElementPurposeMember.hxx | 35 +- ..._AlignedCurve3dElementCoordinateSystem.hxx | 35 +- ...lignedSurface3dElementCoordinateSystem.hxx | 38 +- ...bitraryVolume3dElementCoordinateSystem.hxx | 38 +- .../StepFEA_Array1OfCurveElementEndOffset.hxx | 4 +- ...StepFEA_Array1OfCurveElementEndRelease.hxx | 4 +- .../StepFEA_Array1OfCurveElementInterval.hxx | 4 +- .../StepFEA_Array1OfDegreeOfFreedom.hxx | 1 - .../StepFEA_Array1OfElementRepresentation.hxx | 4 +- .../StepFEA_Array1OfNodeRepresentation.hxx | 1 - ...nstantSurface3dElementCoordinateSystem.hxx | 46 +- opencascade/StepFEA_CoordinateSystemType.hxx | 7 +- .../StepFEA_Curve3dElementProperty.hxx | 72 +- .../StepFEA_Curve3dElementRepresentation.hxx | 65 +- opencascade/StepFEA_CurveEdge.hxx | 3 +- ...tepFEA_CurveElementEndCoordinateSystem.hxx | 40 +- opencascade/StepFEA_CurveElementEndOffset.hxx | 42 +- .../StepFEA_CurveElementEndRelease.hxx | 44 +- opencascade/StepFEA_CurveElementInterval.hxx | 42 +- .../StepFEA_CurveElementIntervalConstant.hxx | 35 +- ...EA_CurveElementIntervalLinearlyVarying.hxx | 36 +- opencascade/StepFEA_CurveElementLocation.hxx | 32 +- opencascade/StepFEA_DegreeOfFreedom.hxx | 49 +- opencascade/StepFEA_DegreeOfFreedomMember.hxx | 35 +- opencascade/StepFEA_DummyNode.hxx | 22 +- .../StepFEA_ElementGeometricRelationship.hxx | 50 +- opencascade/StepFEA_ElementGroup.hxx | 35 +- opencascade/StepFEA_ElementOrElementGroup.hxx | 32 +- opencascade/StepFEA_ElementRepresentation.hxx | 36 +- opencascade/StepFEA_ElementVolume.hxx | 3 +- .../StepFEA_EnumeratedDegreeOfFreedom.hxx | 15 +- opencascade/StepFEA_FeaAreaDensity.hxx | 33 +- opencascade/StepFEA_FeaAxis2Placement3d.hxx | 47 +- ...A_FeaCurveSectionGeometricRelationship.hxx | 42 +- opencascade/StepFEA_FeaGroup.hxx | 34 +- opencascade/StepFEA_FeaLinearElasticity.hxx | 34 +- opencascade/StepFEA_FeaMassDensity.hxx | 33 +- ...pFEA_FeaMaterialPropertyRepresentation.hxx | 26 +- ..._FeaMaterialPropertyRepresentationItem.hxx | 23 +- opencascade/StepFEA_FeaModel.hxx | 65 +- opencascade/StepFEA_FeaModel3d.hxx | 22 +- opencascade/StepFEA_FeaModelDefinition.hxx | 22 +- opencascade/StepFEA_FeaMoistureAbsorption.hxx | 34 +- opencascade/StepFEA_FeaParametricPoint.hxx | 33 +- opencascade/StepFEA_FeaRepresentationItem.hxx | 22 +- ...antCoefficientOfLinearThermalExpansion.hxx | 49 +- .../StepFEA_FeaShellBendingStiffness.hxx | 37 +- ...aShellMembraneBendingCouplingStiffness.hxx | 40 +- .../StepFEA_FeaShellMembraneStiffness.hxx | 37 +- .../StepFEA_FeaShellShearStiffness.hxx | 37 +- ...FeaSurfaceSectionGeometricRelationship.hxx | 41 +- ...ialCoefficientOfLinearThermalExpansion.hxx | 40 +- opencascade/StepFEA_FreedomAndCoefficient.hxx | 41 +- opencascade/StepFEA_FreedomsList.hxx | 32 +- opencascade/StepFEA_GeometricNode.hxx | 22 +- ...StepFEA_HArray1OfCurveElementEndOffset.hxx | 1 - ...tepFEA_HArray1OfCurveElementEndRelease.hxx | 1 - .../StepFEA_HArray1OfCurveElementInterval.hxx | 1 - .../StepFEA_HArray1OfDegreeOfFreedom.hxx | 1 - ...StepFEA_HArray1OfElementRepresentation.hxx | 1 - .../StepFEA_HArray1OfNodeRepresentation.hxx | 1 - ...pFEA_HSequenceOfCurve3dElementProperty.hxx | 4 +- ...SequenceOfElementGeometricRelationship.hxx | 4 +- ...epFEA_HSequenceOfElementRepresentation.hxx | 1 - .../StepFEA_HSequenceOfNodeRepresentation.hxx | 1 - opencascade/StepFEA_Node.hxx | 22 +- opencascade/StepFEA_NodeDefinition.hxx | 22 +- opencascade/StepFEA_NodeGroup.hxx | 35 +- opencascade/StepFEA_NodeRepresentation.hxx | 36 +- opencascade/StepFEA_NodeSet.hxx | 33 +- ...epFEA_NodeWithSolutionCoordinateSystem.hxx | 22 +- opencascade/StepFEA_NodeWithVector.hxx | 22 +- ...etricCurve3dElementCoordinateDirection.hxx | 37 +- ...rametricCurve3dElementCoordinateSystem.hxx | 39 +- ...metricSurface3dElementCoordinateSystem.hxx | 46 +- ...epFEA_SequenceOfCurve3dElementProperty.hxx | 4 +- ...SequenceOfElementGeometricRelationship.hxx | 4 +- ...tepFEA_SequenceOfElementRepresentation.hxx | 4 +- .../StepFEA_SequenceOfNodeRepresentation.hxx | 4 +- ...StepFEA_Surface3dElementRepresentation.hxx | 65 +- opencascade/StepFEA_SymmetricTensor22d.hxx | 30 +- opencascade/StepFEA_SymmetricTensor23d.hxx | 54 +- .../StepFEA_SymmetricTensor23dMember.hxx | 35 +- opencascade/StepFEA_SymmetricTensor42d.hxx | 30 +- opencascade/StepFEA_SymmetricTensor43d.hxx | 58 +- .../StepFEA_SymmetricTensor43dMember.hxx | 35 +- opencascade/StepFEA_UnspecifiedValue.hxx | 3 +- .../StepFEA_Volume3dElementRepresentation.hxx | 56 +- opencascade/StepFile_Read.hxx | 10 +- opencascade/StepFile_ReadData.hxx | 65 +- .../StepGeom_Array1OfBoundaryCurve.hxx | 1 - .../StepGeom_Array1OfCartesianPoint.hxx | 1 - ...StepGeom_Array1OfCompositeCurveSegment.hxx | 4 +- opencascade/StepGeom_Array1OfCurve.hxx | 1 - .../StepGeom_Array1OfPcurveOrSurface.hxx | 1 - .../StepGeom_Array1OfSurfaceBoundary.hxx | 1 - .../StepGeom_Array1OfTrimmingSelect.hxx | 1 - .../StepGeom_Array2OfCartesianPoint.hxx | 1 - opencascade/StepGeom_Array2OfSurfacePatch.hxx | 1 - opencascade/StepGeom_Axis1Placement.hxx | 40 +- opencascade/StepGeom_Axis2Placement.hxx | 33 +- opencascade/StepGeom_Axis2Placement2d.hxx | 40 +- opencascade/StepGeom_Axis2Placement3d.hxx | 54 +- opencascade/StepGeom_BSplineCurve.hxx | 72 +- opencascade/StepGeom_BSplineCurveForm.hxx | 13 +- .../StepGeom_BSplineCurveWithKnots.hxx | 64 +- ...eCurveWithKnotsAndRationalBSplineCurve.hxx | 99 +- opencascade/StepGeom_BSplineSurface.hxx | 91 +- opencascade/StepGeom_BSplineSurfaceForm.hxx | 23 +- .../StepGeom_BSplineSurfaceWithKnots.hxx | 93 +- ...faceWithKnotsAndRationalBSplineSurface.hxx | 135 +- opencascade/StepGeom_BezierCurve.hxx | 23 +- ...eom_BezierCurveAndRationalBSplineCurve.hxx | 67 +- opencascade/StepGeom_BezierSurface.hxx | 23 +- ...BezierSurfaceAndRationalBSplineSurface.hxx | 74 +- opencascade/StepGeom_BoundaryCurve.hxx | 23 +- opencascade/StepGeom_BoundedCurve.hxx | 23 +- opencascade/StepGeom_BoundedSurface.hxx | 23 +- opencascade/StepGeom_CartesianPoint.hxx | 47 +- ...epGeom_CartesianTransformationOperator.hxx | 84 +- ...Geom_CartesianTransformationOperator2d.hxx | 26 +- ...Geom_CartesianTransformationOperator3d.hxx | 50 +- opencascade/StepGeom_Circle.hxx | 31 +- opencascade/StepGeom_CompositeCurve.hxx | 45 +- .../StepGeom_CompositeCurveOnSurface.hxx | 23 +- .../StepGeom_CompositeCurveSegment.hxx | 45 +- opencascade/StepGeom_Conic.hxx | 30 +- opencascade/StepGeom_ConicalSurface.hxx | 38 +- opencascade/StepGeom_Curve.hxx | 23 +- opencascade/StepGeom_CurveBoundedSurface.hxx | 51 +- opencascade/StepGeom_CurveOnSurface.hxx | 35 +- opencascade/StepGeom_CurveReplica.hxx | 41 +- opencascade/StepGeom_CylindricalSurface.hxx | 31 +- opencascade/StepGeom_DegeneratePcurve.hxx | 40 +- .../StepGeom_DegenerateToroidalSurface.hxx | 33 +- opencascade/StepGeom_Direction.hxx | 36 +- opencascade/StepGeom_ElementarySurface.hxx | 30 +- opencascade/StepGeom_Ellipse.hxx | 38 +- .../StepGeom_EvaluatedDegeneratePcurve.hxx | 32 +- ...GlobUnitAssCtxAndGlobUncertaintyAssCtx.hxx | 98 +- ...tepGeom_GeometricRepresentationContext.hxx | 32 +- ...ionContextAndGlobalUnitAssignedContext.hxx | 75 +- ...textAndParametricRepresentationContext.hxx | 63 +- .../StepGeom_GeometricRepresentationItem.hxx | 23 +- .../StepGeom_HArray1OfBoundaryCurve.hxx | 1 - .../StepGeom_HArray1OfCartesianPoint.hxx | 1 - ...tepGeom_HArray1OfCompositeCurveSegment.hxx | 1 - opencascade/StepGeom_HArray1OfCurve.hxx | 1 - .../StepGeom_HArray1OfPcurveOrSurface.hxx | 1 - .../StepGeom_HArray1OfSurfaceBoundary.hxx | 1 - .../StepGeom_HArray1OfTrimmingSelect.hxx | 1 - .../StepGeom_HArray2OfCartesianPoint.hxx | 1 - .../StepGeom_HArray2OfSurfacePatch.hxx | 1 - opencascade/StepGeom_Hyperbola.hxx | 38 +- opencascade/StepGeom_IntersectionCurve.hxx | 23 +- opencascade/StepGeom_KnotType.hxx | 9 +- opencascade/StepGeom_Line.hxx | 39 +- opencascade/StepGeom_OffsetCurve3d.hxx | 55 +- opencascade/StepGeom_OffsetSurface.hxx | 46 +- opencascade/StepGeom_OrientedSurface.hxx | 33 +- opencascade/StepGeom_OuterBoundaryCurve.hxx | 23 +- opencascade/StepGeom_Parabola.hxx | 31 +- opencascade/StepGeom_Pcurve.hxx | 40 +- opencascade/StepGeom_PcurveOrSurface.hxx | 33 +- opencascade/StepGeom_Placement.hxx | 30 +- opencascade/StepGeom_Plane.hxx | 23 +- opencascade/StepGeom_Point.hxx | 23 +- opencascade/StepGeom_PointOnCurve.hxx | 39 +- opencascade/StepGeom_PointOnSurface.hxx | 46 +- opencascade/StepGeom_PointReplica.hxx | 41 +- opencascade/StepGeom_Polyline.hxx | 36 +- ...om_PreferredSurfaceCurveRepresentation.hxx | 7 +- opencascade/StepGeom_QuasiUniformCurve.hxx | 23 +- ...asiUniformCurveAndRationalBSplineCurve.hxx | 68 +- opencascade/StepGeom_QuasiUniformSurface.hxx | 23 +- ...niformSurfaceAndRationalBSplineSurface.hxx | 79 +- opencascade/StepGeom_RationalBSplineCurve.hxx | 41 +- .../StepGeom_RationalBSplineSurface.hxx | 46 +- .../StepGeom_RectangularCompositeSurface.hxx | 39 +- .../StepGeom_RectangularTrimmedSurface.hxx | 80 +- ...om_ReparametrisedCompositeCurveSegment.hxx | 33 +- opencascade/StepGeom_SeamCurve.hxx | 23 +- opencascade/StepGeom_SphericalSurface.hxx | 31 +- opencascade/StepGeom_SuParameters.hxx | 34 +- opencascade/StepGeom_Surface.hxx | 23 +- opencascade/StepGeom_SurfaceBoundary.hxx | 32 +- opencascade/StepGeom_SurfaceCurve.hxx | 56 +- .../StepGeom_SurfaceCurveAndBoundedCurve.hxx | 24 +- .../StepGeom_SurfaceOfLinearExtrusion.hxx | 31 +- opencascade/StepGeom_SurfaceOfRevolution.hxx | 31 +- opencascade/StepGeom_SurfacePatch.hxx | 63 +- opencascade/StepGeom_SurfaceReplica.hxx | 41 +- opencascade/StepGeom_SweptSurface.hxx | 30 +- opencascade/StepGeom_ToroidalSurface.hxx | 38 +- opencascade/StepGeom_TransitionCode.hxx | 9 +- opencascade/StepGeom_TrimmedCurve.hxx | 75 +- opencascade/StepGeom_TrimmingMember.hxx | 28 +- opencascade/StepGeom_TrimmingPreference.hxx | 7 +- opencascade/StepGeom_TrimmingSelect.hxx | 45 +- opencascade/StepGeom_UniformCurve.hxx | 23 +- ...om_UniformCurveAndRationalBSplineCurve.hxx | 67 +- opencascade/StepGeom_UniformSurface.hxx | 23 +- ...niformSurfaceAndRationalBSplineSurface.hxx | 74 +- opencascade/StepGeom_Vector.hxx | 39 +- opencascade/StepGeom_VectorOrDirection.hxx | 33 +- .../StepKinematics_ActuatedDirection.hxx | 2 +- ...ematics_ActuatedKinPairAndOrderKinPair.hxx | 42 +- .../StepKinematics_ActuatedKinematicPair.hxx | 83 +- ...xtDependentKinematicLinkRepresentation.hxx | 33 +- .../StepKinematics_CylindricalPair.hxx | 8 +- .../StepKinematics_CylindricalPairValue.hxx | 20 +- ...tepKinematics_CylindricalPairWithRange.hxx | 75 +- .../StepKinematics_FullyConstrainedPair.hxx | 8 +- opencascade/StepKinematics_GearPair.hxx | 47 +- opencascade/StepKinematics_GearPairValue.hxx | 16 +- .../StepKinematics_GearPairWithRange.hxx | 51 +- .../StepKinematics_HighOrderKinematicPair.hxx | 8 +- .../StepKinematics_HomokineticPair.hxx | 8 +- opencascade/StepKinematics_KinematicJoint.hxx | 8 +- opencascade/StepKinematics_KinematicLink.hxx | 8 +- ...Kinematics_KinematicLinkRepresentation.hxx | 20 +- ...KinematicLinkRepresentationAssociation.hxx | 15 +- opencascade/StepKinematics_KinematicPair.hxx | 30 +- ...ematicPropertyDefinitionRepresentation.hxx | 15 +- ...nematicPropertyMechanismRepresentation.hxx | 24 +- ...ics_KinematicTopologyDirectedStructure.hxx | 21 +- ...tics_KinematicTopologyNetworkStructure.hxx | 20 +- ..._KinematicTopologyRepresentationSelect.hxx | 16 +- ...pKinematics_KinematicTopologyStructure.hxx | 8 +- ...Kinematics_LinearFlexibleAndPinionPair.hxx | 34 +- ...atics_LinearFlexibleAndPlanarCurvePair.hxx | 37 +- ...atics_LinearFlexibleLinkRepresentation.hxx | 15 +- .../StepKinematics_LowOrderKinematicPair.hxx | 47 +- ...pKinematics_LowOrderKinematicPairValue.hxx | 36 +- ...owOrderKinematicPairWithMotionCoupling.hxx | 12 +- ...ematics_LowOrderKinematicPairWithRange.hxx | 161 +- ...StepKinematics_MechanismRepresentation.hxx | 20 +- ...inematics_MechanismStateRepresentation.hxx | 12 +- opencascade/StepKinematics_OrientedJoint.hxx | 8 +- ...ematics_PairRepresentationRelationship.hxx | 37 +- opencascade/StepKinematics_PairValue.hxx | 15 +- .../StepKinematics_PlanarCurvePair.hxx | 37 +- .../StepKinematics_PlanarCurvePairRange.hxx | 37 +- opencascade/StepKinematics_PlanarPair.hxx | 8 +- .../StepKinematics_PlanarPairValue.hxx | 24 +- .../StepKinematics_PlanarPairWithRange.hxx | 93 +- .../StepKinematics_PointOnPlanarCurvePair.hxx | 34 +- ...Kinematics_PointOnPlanarCurvePairValue.hxx | 24 +- ...matics_PointOnPlanarCurvePairWithRange.hxx | 96 +- .../StepKinematics_PointOnSurfacePair.hxx | 27 +- ...StepKinematics_PointOnSurfacePairValue.hxx | 24 +- ...Kinematics_PointOnSurfacePairWithRange.hxx | 90 +- opencascade/StepKinematics_PrismaticPair.hxx | 8 +- .../StepKinematics_PrismaticPairValue.hxx | 16 +- .../StepKinematics_PrismaticPairWithRange.hxx | 51 +- ...Kinematics_ProductDefinitionKinematics.hxx | 8 +- ...roductDefinitionRelationshipKinematics.hxx | 12 +- .../StepKinematics_RackAndPinionPair.hxx | 34 +- .../StepKinematics_RackAndPinionPairValue.hxx | 16 +- ...pKinematics_RackAndPinionPairWithRange.hxx | 42 +- opencascade/StepKinematics_RevolutePair.hxx | 8 +- .../StepKinematics_RevolutePairValue.hxx | 16 +- .../StepKinematics_RevolutePairWithRange.hxx | 51 +- ...StepKinematics_RigidLinkRepresentation.hxx | 12 +- opencascade/StepKinematics_RigidPlacement.hxx | 7 +- .../StepKinematics_RollingCurvePair.hxx | 8 +- .../StepKinematics_RollingCurvePairValue.hxx | 17 +- .../StepKinematics_RollingSurfacePair.hxx | 8 +- ...StepKinematics_RollingSurfacePairValue.hxx | 23 +- .../StepKinematics_RotationAboutDirection.hxx | 21 +- opencascade/StepKinematics_ScrewPair.hxx | 31 +- opencascade/StepKinematics_ScrewPairValue.hxx | 16 +- .../StepKinematics_ScrewPairWithRange.hxx | 41 +- .../StepKinematics_SlidingCurvePair.hxx | 8 +- .../StepKinematics_SlidingCurvePairValue.hxx | 22 +- .../StepKinematics_SlidingSurfacePair.hxx | 8 +- ...StepKinematics_SlidingSurfacePairValue.hxx | 28 +- .../StepKinematics_SpatialRotation.hxx | 7 +- opencascade/StepKinematics_SphericalPair.hxx | 8 +- .../StepKinematics_SphericalPairSelect.hxx | 7 +- .../StepKinematics_SphericalPairValue.hxx | 17 +- .../StepKinematics_SphericalPairWithPin.hxx | 8 +- ...inematics_SphericalPairWithPinAndRange.hxx | 75 +- .../StepKinematics_SphericalPairWithRange.hxx | 91 +- opencascade/StepKinematics_SurfacePair.hxx | 37 +- .../StepKinematics_SurfacePairWithRange.hxx | 55 +- .../StepKinematics_UnconstrainedPair.hxx | 8 +- .../StepKinematics_UnconstrainedPairValue.hxx | 17 +- opencascade/StepKinematics_UniversalPair.hxx | 43 +- .../StepKinematics_UniversalPairValue.hxx | 20 +- .../StepKinematics_UniversalPairWithRange.hxx | 75 +- opencascade/StepRepr_AllAroundShapeAspect.hxx | 6 +- opencascade/StepRepr_Apex.hxx | 5 +- ...Array1OfMaterialPropertyRepresentation.hxx | 4 +- ...ray1OfPropertyDefinitionRepresentation.hxx | 4 +- .../StepRepr_Array1OfRepresentationItem.hxx | 1 - .../StepRepr_AssemblyComponentUsage.hxx | 59 +- ...pRepr_AssemblyComponentUsageSubstitute.hxx | 52 +- opencascade/StepRepr_BetweenShapeAspect.hxx | 5 +- .../StepRepr_BooleanRepresentationItem.hxx | 45 + opencascade/StepRepr_CentreOfSymmetry.hxx | 5 +- .../StepRepr_CharacterizedDefinition.hxx | 45 +- .../StepRepr_CharacterizedRepresentation.hxx | 26 +- ...pShAspAndCompShAspAndDatumFeatAndShAsp.hxx | 13 +- ...StepRepr_CompShAspAndDatumFeatAndShAsp.hxx | 6 +- .../StepRepr_CompositeGroupShapeAspect.hxx | 5 +- opencascade/StepRepr_CompositeShapeAspect.hxx | 22 +- .../StepRepr_CompoundRepresentationItem.hxx | 40 +- opencascade/StepRepr_ConfigurationDesign.hxx | 41 +- .../StepRepr_ConfigurationDesignItem.hxx | 32 +- .../StepRepr_ConfigurationEffectivity.hxx | 35 +- opencascade/StepRepr_ConfigurationItem.hxx | 72 +- ...epr_ConstructiveGeometryRepresentation.hxx | 5 +- ...tiveGeometryRepresentationRelationship.hxx | 11 +- opencascade/StepRepr_ContinuosShapeAspect.hxx | 4 +- opencascade/StepRepr_DataEnvironment.hxx | 52 +- .../StepRepr_DefinitionalRepresentation.hxx | 23 +- opencascade/StepRepr_DerivedShapeAspect.hxx | 22 +- ...StepRepr_DescriptiveRepresentationItem.hxx | 30 +- opencascade/StepRepr_Extension.hxx | 22 +- ...epRepr_ExternallyDefinedRepresentation.hxx | 23 +- ...Repr_FeatureForDatumTargetRelationship.hxx | 21 +- ...Repr_FunctionallyDefinedTransformation.hxx | 36 +- opencascade/StepRepr_GeometricAlignment.hxx | 6 +- ...pRepr_GlobalUncertaintyAssignedContext.hxx | 40 +- .../StepRepr_GlobalUnitAssignedContext.hxx | 37 +- ...Array1OfMaterialPropertyRepresentation.hxx | 4 +- ...ray1OfPropertyDefinitionRepresentation.hxx | 4 +- .../StepRepr_HArray1OfRepresentationItem.hxx | 1 - ...quenceOfMaterialPropertyRepresentation.hxx | 4 +- ...StepRepr_HSequenceOfRepresentationItem.hxx | 1 - .../StepRepr_IntegerRepresentationItem.hxx | 27 +- .../StepRepr_ItemDefinedTransformation.hxx | 53 +- opencascade/StepRepr_MakeFromUsageOption.hxx | 73 +- opencascade/StepRepr_MappedItem.hxx | 39 +- opencascade/StepRepr_MaterialDesignation.hxx | 36 +- opencascade/StepRepr_MaterialProperty.hxx | 22 +- ...tepRepr_MaterialPropertyRepresentation.hxx | 40 +- .../StepRepr_MeasureRepresentationItem.hxx | 32 +- ...hanicalDesignAndDraughtingRelationship.hxx | 37 + .../StepRepr_NextAssemblyUsageOccurrence.hxx | 22 +- opencascade/StepRepr_ParallelOffset.hxx | 32 +- ...epRepr_ParametricRepresentationContext.hxx | 23 +- opencascade/StepRepr_PerpendicularTo.hxx | 4 +- opencascade/StepRepr_ProductConcept.hxx | 65 +- .../StepRepr_ProductDefinitionShape.hxx | 22 +- .../StepRepr_ProductDefinitionUsage.hxx | 22 +- .../StepRepr_PromissoryUsageOccurrence.hxx | 23 +- opencascade/StepRepr_PropertyDefinition.hxx | 51 +- ...tepRepr_PropertyDefinitionRelationship.hxx | 59 +- ...pRepr_PropertyDefinitionRepresentation.hxx | 42 +- ...pRepr_QuantifiedAssemblyComponentUsage.hxx | 57 +- .../StepRepr_RealRepresentationItem.hxx | 46 + ...pRepr_ReprItemAndLengthMeasureWithUnit.hxx | 17 +- ...ReprItemAndLengthMeasureWithUnitAndQRI.hxx | 20 +- .../StepRepr_ReprItemAndMeasureWithUnit.hxx | 25 +- ...pRepr_ReprItemAndMeasureWithUnitAndQRI.hxx | 27 +- ...r_ReprItemAndPlaneAngleMeasureWithUnit.hxx | 16 +- ...ItemAndPlaneAngleMeasureWithUnitAndQRI.hxx | 19 +- opencascade/StepRepr_Representation.hxx | 52 +- .../StepRepr_RepresentationContext.hxx | 37 +- ...tepRepr_RepresentationContextReference.hxx | 13 +- opencascade/StepRepr_RepresentationItem.hxx | 29 +- opencascade/StepRepr_RepresentationMap.hxx | 39 +- ...epresentationOrRepresentationReference.hxx | 7 +- .../StepRepr_RepresentationReference.hxx | 20 +- .../StepRepr_RepresentationRelationship.hxx | 54 +- ...entationRelationshipWithTransformation.hxx | 40 +- .../StepRepr_RepresentedDefinition.hxx | 41 +- ...quenceOfMaterialPropertyRepresentation.hxx | 4 +- .../StepRepr_SequenceOfRepresentationItem.hxx | 4 +- opencascade/StepRepr_ShapeAspect.hxx | 54 +- ...epRepr_ShapeAspectDerivingRelationship.hxx | 23 +- .../StepRepr_ShapeAspectRelationship.hxx | 64 +- .../StepRepr_ShapeAspectTransition.hxx | 22 +- opencascade/StepRepr_ShapeDefinition.hxx | 35 +- ...epRepr_ShapeRepresentationRelationship.hxx | 27 +- ...entationRelationshipWithTransformation.hxx | 30 +- ...tepRepr_SpecifiedHigherUsageOccurrence.hxx | 66 +- .../StepRepr_StructuralResponseProperty.hxx | 22 +- ...sponsePropertyDefinitionRepresentation.hxx | 29 +- .../StepRepr_SuppliedPartRelationship.hxx | 24 +- opencascade/StepRepr_Tangent.hxx | 5 +- opencascade/StepRepr_Transformation.hxx | 34 +- opencascade/StepRepr_ValueRange.hxx | 22 +- .../StepRepr_ValueRepresentationItem.hxx | 21 +- opencascade/StepSelect_Activator.hxx | 31 +- opencascade/StepSelect_FileModifier.hxx | 26 +- opencascade/StepSelect_FloatFormat.hxx | 62 +- opencascade/StepSelect_ModelModifier.hxx | 41 +- opencascade/StepSelect_StepType.hxx | 31 +- opencascade/StepSelect_WorkLibrary.hxx | 59 +- ...pShape_AdvancedBrepShapeRepresentation.hxx | 23 +- opencascade/StepShape_AdvancedFace.hxx | 23 +- opencascade/StepShape_AngleRelator.hxx | 7 +- opencascade/StepShape_AngularLocation.hxx | 38 +- opencascade/StepShape_AngularSize.hxx | 34 +- .../StepShape_Array1OfConnectedEdgeSet.hxx | 1 - .../StepShape_Array1OfConnectedFaceSet.hxx | 1 - opencascade/StepShape_Array1OfEdge.hxx | 1 - opencascade/StepShape_Array1OfFace.hxx | 1 - opencascade/StepShape_Array1OfFaceBound.hxx | 1 - .../StepShape_Array1OfGeometricSetSelect.hxx | 1 - .../StepShape_Array1OfOrientedClosedShell.hxx | 4 +- .../StepShape_Array1OfOrientedEdge.hxx | 1 - ...ray1OfShapeDimensionRepresentationItem.hxx | 3 +- opencascade/StepShape_Array1OfShell.hxx | 1 - .../StepShape_Array1OfValueQualifier.hxx | 1 - opencascade/StepShape_Block.hxx | 55 +- opencascade/StepShape_BooleanOperand.hxx | 61 +- opencascade/StepShape_BooleanOperator.hxx | 7 +- opencascade/StepShape_BooleanResult.hxx | 46 +- opencascade/StepShape_BoxDomain.hxx | 54 +- opencascade/StepShape_BoxedHalfSpace.hxx | 32 +- opencascade/StepShape_BrepWithVoids.hxx | 38 +- opencascade/StepShape_ClosedShell.hxx | 23 +- .../StepShape_CompoundShapeRepresentation.hxx | 22 +- opencascade/StepShape_ConnectedEdgeSet.hxx | 33 +- opencascade/StepShape_ConnectedFaceSet.hxx | 36 +- ...Shape_ConnectedFaceShapeRepresentation.hxx | 22 +- opencascade/StepShape_ConnectedFaceSubSet.hxx | 34 +- ...pe_ContextDependentShapeRepresentation.hxx | 40 +- opencascade/StepShape_CsgPrimitive.hxx | 41 +- opencascade/StepShape_CsgSelect.hxx | 45 +- .../StepShape_CsgShapeRepresentation.hxx | 23 +- opencascade/StepShape_CsgSolid.hxx | 30 +- ...alRepresentationAndShapeRepresentation.hxx | 29 +- .../StepShape_DimensionalCharacteristic.hxx | 32 +- ...imensionalCharacteristicRepresentation.hxx | 42 +- opencascade/StepShape_DimensionalLocation.hxx | 22 +- .../StepShape_DimensionalLocationWithPath.hxx | 38 +- opencascade/StepShape_DimensionalSize.hxx | 41 +- .../StepShape_DimensionalSizeWithPath.hxx | 34 +- .../StepShape_DirectedDimensionalLocation.hxx | 22 +- opencascade/StepShape_Edge.hxx | 36 +- .../StepShape_EdgeBasedWireframeModel.hxx | 34 +- ..._EdgeBasedWireframeShapeRepresentation.hxx | 26 +- opencascade/StepShape_EdgeCurve.hxx | 41 +- opencascade/StepShape_EdgeLoop.hxx | 36 +- opencascade/StepShape_ExtrudedAreaSolid.hxx | 40 +- opencascade/StepShape_ExtrudedFaceSolid.hxx | 40 +- opencascade/StepShape_Face.hxx | 36 +- .../StepShape_FaceBasedSurfaceModel.hxx | 33 +- opencascade/StepShape_FaceBound.hxx | 39 +- opencascade/StepShape_FaceOuterBound.hxx | 23 +- opencascade/StepShape_FaceSurface.hxx | 40 +- opencascade/StepShape_FacetedBrep.hxx | 23 +- .../StepShape_FacetedBrepAndBrepWithVoids.hxx | 57 +- ...epShape_FacetedBrepShapeRepresentation.hxx | 23 +- opencascade/StepShape_GeometricCurveSet.hxx | 23 +- opencascade/StepShape_GeometricSet.hxx | 36 +- opencascade/StepShape_GeometricSetSelect.hxx | 35 +- ...callyBoundedSurfaceShapeRepresentation.hxx | 30 +- ...llyBoundedWireframeShapeRepresentation.hxx | 30 +- .../StepShape_HArray1OfConnectedEdgeSet.hxx | 1 - .../StepShape_HArray1OfConnectedFaceSet.hxx | 1 - opencascade/StepShape_HArray1OfEdge.hxx | 1 - opencascade/StepShape_HArray1OfFace.hxx | 1 - opencascade/StepShape_HArray1OfFaceBound.hxx | 1 - .../StepShape_HArray1OfGeometricSetSelect.hxx | 1 - ...StepShape_HArray1OfOrientedClosedShell.hxx | 1 - .../StepShape_HArray1OfOrientedEdge.hxx | 1 - ...ray1OfShapeDimensionRepresentationItem.hxx | 3 +- opencascade/StepShape_HArray1OfShell.hxx | 1 - .../StepShape_HArray1OfValueQualifier.hxx | 1 - opencascade/StepShape_HalfSpaceSolid.hxx | 39 +- opencascade/StepShape_LimitsAndFits.hxx | 47 +- opencascade/StepShape_Loop.hxx | 23 +- opencascade/StepShape_LoopAndPath.hxx | 52 +- opencascade/StepShape_ManifoldSolidBrep.hxx | 35 +- ...ape_ManifoldSurfaceShapeRepresentation.hxx | 24 +- .../StepShape_MeasureQualification.hxx | 65 +- ...tionItemAndQualifiedRepresentationItem.hxx | 55 +- ..._NonManifoldSurfaceShapeRepresentation.hxx | 26 +- opencascade/StepShape_OpenShell.hxx | 23 +- opencascade/StepShape_OrientedClosedShell.hxx | 52 +- opencascade/StepShape_OrientedEdge.hxx | 51 +- opencascade/StepShape_OrientedFace.hxx | 51 +- opencascade/StepShape_OrientedOpenShell.hxx | 51 +- opencascade/StepShape_OrientedPath.hxx | 52 +- opencascade/StepShape_Path.hxx | 38 +- opencascade/StepShape_PlusMinusTolerance.hxx | 36 +- opencascade/StepShape_PointRepresentation.hxx | 22 +- opencascade/StepShape_PolyLoop.hxx | 36 +- opencascade/StepShape_PrecisionQualifier.hxx | 28 +- .../StepShape_QualifiedRepresentationItem.hxx | 38 +- .../StepShape_ReversibleTopologyItem.hxx | 41 +- opencascade/StepShape_RevolvedAreaSolid.hxx | 40 +- opencascade/StepShape_RevolvedFaceSolid.hxx | 43 +- opencascade/StepShape_RightAngularWedge.hxx | 64 +- opencascade/StepShape_RightCircularCone.hxx | 55 +- .../StepShape_RightCircularCylinder.hxx | 46 +- opencascade/StepShape_SeamEdge.hxx | 35 +- ...tepShape_ShapeDefinitionRepresentation.hxx | 26 +- ...StepShape_ShapeDimensionRepresentation.hxx | 24 +- ...Shape_ShapeDimensionRepresentationItem.hxx | 26 +- opencascade/StepShape_ShapeRepresentation.hxx | 23 +- ...hape_ShapeRepresentationWithParameters.hxx | 23 +- opencascade/StepShape_Shell.hxx | 33 +- .../StepShape_ShellBasedSurfaceModel.hxx | 36 +- opencascade/StepShape_SolidModel.hxx | 23 +- opencascade/StepShape_SolidReplica.hxx | 41 +- opencascade/StepShape_Sphere.hxx | 39 +- opencascade/StepShape_Subedge.hxx | 35 +- opencascade/StepShape_Subface.hxx | 34 +- opencascade/StepShape_SurfaceModel.hxx | 31 +- opencascade/StepShape_SweptAreaSolid.hxx | 30 +- opencascade/StepShape_SweptFaceSolid.hxx | 30 +- .../StepShape_ToleranceMethodDefinition.hxx | 32 +- opencascade/StepShape_ToleranceValue.hxx | 35 +- ...tepShape_TopologicalRepresentationItem.hxx | 23 +- opencascade/StepShape_Torus.hxx | 46 +- ...pShape_TransitionalShapeRepresentation.hxx | 23 +- opencascade/StepShape_TypeQualifier.hxx | 28 +- .../StepShape_ValueFormatTypeQualifier.hxx | 22 +- opencascade/StepShape_ValueQualifier.hxx | 32 +- opencascade/StepShape_Vertex.hxx | 23 +- opencascade/StepShape_VertexLoop.hxx | 30 +- opencascade/StepShape_VertexPoint.hxx | 30 +- opencascade/StepToGeom.hxx | 235 +- opencascade/StepToTopoDS.hxx | 42 +- opencascade/StepToTopoDS_Builder.hxx | 161 +- opencascade/StepToTopoDS_BuilderError.hxx | 5 +- ...pToTopoDS_DataMapIteratorOfDataMapOfRI.hxx | 1 - ...poDS_DataMapIteratorOfDataMapOfRINames.hxx | 1 - ...ToTopoDS_DataMapIteratorOfDataMapOfTRI.hxx | 1 - ...ToTopoDS_DataMapIteratorOfPointEdgeMap.hxx | 1 - ...TopoDS_DataMapIteratorOfPointVertexMap.hxx | 1 - opencascade/StepToTopoDS_DataMapOfRI.hxx | 7 +- opencascade/StepToTopoDS_DataMapOfRINames.hxx | 6 +- opencascade/StepToTopoDS_DataMapOfTRI.hxx | 7 +- opencascade/StepToTopoDS_GeometricTool.hxx | 44 +- .../StepToTopoDS_GeometricToolError.hxx | 13 +- opencascade/StepToTopoDS_MakeTransformed.hxx | 57 +- opencascade/StepToTopoDS_NMTool.hxx | 80 +- opencascade/StepToTopoDS_PointEdgeMap.hxx | 6 +- opencascade/StepToTopoDS_PointPair.hxx | 64 +- opencascade/StepToTopoDS_PointVertexMap.hxx | 7 +- opencascade/StepToTopoDS_Root.hxx | 40 +- opencascade/StepToTopoDS_Root.lxx | 34 +- opencascade/StepToTopoDS_Tool.hxx | 135 +- .../StepToTopoDS_TranslateCompositeCurve.hxx | 75 +- .../StepToTopoDS_TranslateCompositeCurve.lxx | 4 +- ...pToTopoDS_TranslateCurveBoundedSurface.hxx | 44 +- opencascade/StepToTopoDS_TranslateEdge.hxx | 83 +- .../StepToTopoDS_TranslateEdgeError.hxx | 5 +- .../StepToTopoDS_TranslateEdgeLoop.hxx | 66 +- .../StepToTopoDS_TranslateEdgeLoopError.hxx | 5 +- opencascade/StepToTopoDS_TranslateFace.hxx | 87 +- .../StepToTopoDS_TranslateFaceError.hxx | 5 +- .../StepToTopoDS_TranslatePolyLoop.hxx | 55 +- .../StepToTopoDS_TranslatePolyLoopError.hxx | 5 +- opencascade/StepToTopoDS_TranslateShell.hxx | 56 +- .../StepToTopoDS_TranslateShellError.hxx | 5 +- opencascade/StepToTopoDS_TranslateSolid.hxx | 21 +- opencascade/StepToTopoDS_TranslateVertex.hxx | 51 +- .../StepToTopoDS_TranslateVertexError.hxx | 5 +- .../StepToTopoDS_TranslateVertexLoop.hxx | 51 +- .../StepToTopoDS_TranslateVertexLoopError.hxx | 5 +- .../StepVisual_AnnotationCurveOccurrence.hxx | 3 +- ...notationCurveOccurrenceAndGeomReprItem.hxx | 15 +- opencascade/StepVisual_AnnotationFillArea.hxx | 3 +- ...tepVisual_AnnotationFillAreaOccurrence.hxx | 25 +- .../StepVisual_AnnotationOccurrence.hxx | 22 +- opencascade/StepVisual_AnnotationPlane.hxx | 49 +- .../StepVisual_AnnotationPlaneElement.hxx | 17 +- opencascade/StepVisual_AnnotationText.hxx | 23 +- .../StepVisual_AnnotationTextOccurrence.hxx | 23 +- opencascade/StepVisual_AreaInSet.hxx | 38 +- opencascade/StepVisual_AreaOrView.hxx | 33 +- ...pVisual_Array1OfAnnotationPlaneElement.hxx | 3 +- ...Visual_Array1OfBoxCharacteristicSelect.hxx | 4 +- ...aModelD3MultiClippingInterectionSelect.hxx | 3 +- ...fCameraModelD3MultiClippingUnionSelect.hxx | 3 +- ...epVisual_Array1OfCurveStyleFontPattern.hxx | 4 +- ...tepVisual_Array1OfDirectionCountSelect.hxx | 1 - ...isual_Array1OfDraughtingCalloutElement.hxx | 3 +- .../StepVisual_Array1OfFillStyleSelect.hxx | 1 - .../StepVisual_Array1OfInvisibleItem.hxx | 1 - .../StepVisual_Array1OfLayeredItem.hxx | 1 - ...al_Array1OfPresentationStyleAssignment.hxx | 4 +- ...Visual_Array1OfPresentationStyleSelect.hxx | 4 +- ...sual_Array1OfRenderingPropertiesSelect.hxx | 4 +- .../StepVisual_Array1OfStyleContextSelect.hxx | 1 - ...sual_Array1OfSurfaceStyleElementSelect.hxx | 4 +- ...Visual_Array1OfTessellatedEdgeOrVertex.hxx | 6 +- ...sual_Array1OfTessellatedStructuredItem.hxx | 6 +- .../StepVisual_Array1OfTextOrCharacter.hxx | 1 - opencascade/StepVisual_BackgroundColour.hxx | 29 +- .../StepVisual_BoxCharacteristicSelect.hxx | 34 +- opencascade/StepVisual_CameraImage.hxx | 23 +- .../StepVisual_CameraImage2dWithScale.hxx | 23 +- .../StepVisual_CameraImage3dWithScale.hxx | 23 +- opencascade/StepVisual_CameraModel.hxx | 23 +- opencascade/StepVisual_CameraModelD2.hxx | 39 +- opencascade/StepVisual_CameraModelD3.hxx | 41 +- .../StepVisual_CameraModelD3MultiClipping.hxx | 24 +- ...aModelD3MultiClippingInterectionSelect.hxx | 17 +- ...CameraModelD3MultiClippingIntersection.hxx | 29 +- ...Visual_CameraModelD3MultiClippingUnion.hxx | 25 +- ..._CameraModelD3MultiClippingUnionSelect.hxx | 17 +- opencascade/StepVisual_CameraUsage.hxx | 23 +- opencascade/StepVisual_CentralOrParallel.hxx | 5 +- ...ObjAndRepresentationAndDraughtingModel.hxx | 15 +- opencascade/StepVisual_Colour.hxx | 23 +- opencascade/StepVisual_ColourRgb.hxx | 42 +- .../StepVisual_ColourSpecification.hxx | 29 +- .../StepVisual_ComplexTriangulatedFace.hxx | 35 +- ...epVisual_ComplexTriangulatedSurfaceSet.hxx | 34 +- opencascade/StepVisual_CompositeText.hxx | 37 +- .../StepVisual_CompositeTextWithExtent.hxx | 31 +- ...tepVisual_ContextDependentInvisibility.hxx | 31 +- ...l_ContextDependentOverRidingStyledItem.hxx | 44 +- opencascade/StepVisual_CoordinatesList.hxx | 16 +- .../StepVisual_CubicBezierTessellatedEdge.hxx | 7 +- ...StepVisual_CubicBezierTriangulatedFace.hxx | 24 +- opencascade/StepVisual_CurveStyle.hxx | 54 +- opencascade/StepVisual_CurveStyleFont.hxx | 44 +- .../StepVisual_CurveStyleFontPattern.hxx | 36 +- .../StepVisual_CurveStyleFontSelect.hxx | 35 +- .../StepVisual_DirectionCountSelect.hxx | 38 +- ...pVisual_DraughtingAnnotationOccurrence.hxx | 24 +- opencascade/StepVisual_DraughtingCallout.hxx | 38 +- .../StepVisual_DraughtingCalloutElement.hxx | 21 +- opencascade/StepVisual_DraughtingModel.hxx | 22 +- .../StepVisual_DraughtingPreDefinedColour.hxx | 23 +- ...epVisual_DraughtingPreDefinedCurveFont.hxx | 23 +- opencascade/StepVisual_EdgeOrCurve.hxx | 7 +- .../StepVisual_ExternallyDefinedCurveFont.hxx | 22 +- .../StepVisual_ExternallyDefinedTextFont.hxx | 22 +- opencascade/StepVisual_FaceOrSurface.hxx | 7 +- opencascade/StepVisual_FillAreaStyle.hxx | 43 +- .../StepVisual_FillAreaStyleColour.hxx | 38 +- opencascade/StepVisual_FillStyleSelect.hxx | 31 +- opencascade/StepVisual_FontSelect.hxx | 33 +- ...Visual_HArray1OfAnnotationPlaneElement.hxx | 3 +- ...isual_HArray1OfBoxCharacteristicSelect.hxx | 4 +- ...aModelD3MultiClippingInterectionSelect.hxx | 3 +- ...fCameraModelD3MultiClippingUnionSelect.hxx | 3 +- ...pVisual_HArray1OfCurveStyleFontPattern.hxx | 1 - ...epVisual_HArray1OfDirectionCountSelect.hxx | 1 - ...sual_HArray1OfDraughtingCalloutElement.hxx | 3 +- .../StepVisual_HArray1OfFillStyleSelect.hxx | 1 - .../StepVisual_HArray1OfInvisibleItem.hxx | 1 - .../StepVisual_HArray1OfLayeredItem.hxx | 1 - ...l_HArray1OfPresentationStyleAssignment.hxx | 4 +- ...isual_HArray1OfPresentationStyleSelect.hxx | 4 +- ...ual_HArray1OfRenderingPropertiesSelect.hxx | 4 +- ...StepVisual_HArray1OfStyleContextSelect.hxx | 1 - ...ual_HArray1OfSurfaceStyleElementSelect.hxx | 4 +- ...isual_HArray1OfTessellatedEdgeOrVertex.hxx | 6 +- ...ual_HArray1OfTessellatedStructuredItem.hxx | 6 +- .../StepVisual_HArray1OfTextOrCharacter.hxx | 1 - opencascade/StepVisual_Invisibility.hxx | 36 +- .../StepVisual_InvisibilityContext.hxx | 32 +- opencascade/StepVisual_InvisibleItem.hxx | 38 +- opencascade/StepVisual_LayeredItem.hxx | 33 +- opencascade/StepVisual_MarkerMember.hxx | 39 +- opencascade/StepVisual_MarkerSelect.hxx | 39 +- opencascade/StepVisual_MarkerType.hxx | 15 +- ...hanicalDesignGeometricPresentationArea.hxx | 27 +- ...ignGeometricPresentationRepresentation.hxx | 30 +- opencascade/StepVisual_NullStyle.hxx | 3 +- opencascade/StepVisual_NullStyleMember.hxx | 40 +- .../StepVisual_OverRidingStyledItem.hxx | 32 +- .../StepVisual_PathOrCompositeCurve.hxx | 7 +- opencascade/StepVisual_PlanarBox.hxx | 32 +- opencascade/StepVisual_PlanarExtent.hxx | 37 +- opencascade/StepVisual_PointStyle.hxx | 54 +- opencascade/StepVisual_PreDefinedColour.hxx | 29 +- .../StepVisual_PreDefinedCurveFont.hxx | 23 +- opencascade/StepVisual_PreDefinedItem.hxx | 29 +- opencascade/StepVisual_PreDefinedTextFont.hxx | 23 +- opencascade/StepVisual_PresentationArea.hxx | 23 +- ...StepVisual_PresentationLayerAssignment.hxx | 52 +- .../StepVisual_PresentationLayerUsage.hxx | 39 +- .../StepVisual_PresentationRepresentation.hxx | 23 +- ...isual_PresentationRepresentationSelect.hxx | 33 +- opencascade/StepVisual_PresentationSet.hxx | 23 +- opencascade/StepVisual_PresentationSize.hxx | 38 +- ...isual_PresentationSizeAssignmentSelect.hxx | 35 +- ...StepVisual_PresentationStyleAssignment.hxx | 36 +- .../StepVisual_PresentationStyleByContext.hxx | 34 +- .../StepVisual_PresentationStyleSelect.hxx | 35 +- opencascade/StepVisual_PresentationView.hxx | 23 +- opencascade/StepVisual_PresentedItem.hxx | 23 +- ...StepVisual_PresentedItemRepresentation.hxx | 38 +- .../StepVisual_RenderingPropertiesSelect.hxx | 8 +- ...al_RepositionedTessellatedGeometricSet.hxx | 15 +- ...StepVisual_RepositionedTessellatedItem.hxx | 9 +- opencascade/StepVisual_StyleContextSelect.hxx | 35 +- opencascade/StepVisual_StyledItem.hxx | 64 +- opencascade/StepVisual_StyledItemTarget.hxx | 26 +- opencascade/StepVisual_SurfaceSide.hxx | 7 +- opencascade/StepVisual_SurfaceSideStyle.hxx | 44 +- .../StepVisual_SurfaceStyleBoundary.hxx | 29 +- .../StepVisual_SurfaceStyleControlGrid.hxx | 30 +- .../StepVisual_SurfaceStyleElementSelect.hxx | 33 +- .../StepVisual_SurfaceStyleFillArea.hxx | 29 +- .../StepVisual_SurfaceStyleParameterLine.hxx | 46 +- ...pVisual_SurfaceStyleReflectanceAmbient.hxx | 10 +- .../StepVisual_SurfaceStyleRendering.hxx | 16 +- ...al_SurfaceStyleRenderingWithProperties.hxx | 20 +- ...epVisual_SurfaceStyleSegmentationCurve.hxx | 30 +- .../StepVisual_SurfaceStyleSilhouette.hxx | 30 +- .../StepVisual_SurfaceStyleTransparent.hxx | 10 +- opencascade/StepVisual_SurfaceStyleUsage.hxx | 38 +- opencascade/StepVisual_Template.hxx | 23 +- opencascade/StepVisual_TemplateInstance.hxx | 23 +- ...Visual_TessellatedAnnotationOccurrence.hxx | 3 +- .../StepVisual_TessellatedConnectingEdge.hxx | 44 +- .../StepVisual_TessellatedCurveSet.hxx | 22 +- opencascade/StepVisual_TessellatedEdge.hxx | 27 +- .../StepVisual_TessellatedEdgeOrVertex.hxx | 7 +- opencascade/StepVisual_TessellatedFace.hxx | 33 +- .../StepVisual_TessellatedGeometricSet.hxx | 21 +- opencascade/StepVisual_TessellatedItem.hxx | 10 +- .../StepVisual_TessellatedPointSet.hxx | 17 +- ...pVisual_TessellatedShapeRepresentation.hxx | 7 +- ...peRepresentationWithAccuracyParameters.hxx | 31 +- opencascade/StepVisual_TessellatedShell.hxx | 20 +- opencascade/StepVisual_TessellatedSolid.hxx | 20 +- .../StepVisual_TessellatedStructuredItem.hxx | 7 +- .../StepVisual_TessellatedSurfaceSet.hxx | 23 +- opencascade/StepVisual_TessellatedVertex.hxx | 27 +- opencascade/StepVisual_TessellatedWire.hxx | 20 +- opencascade/StepVisual_TextLiteral.hxx | 64 +- opencascade/StepVisual_TextOrCharacter.hxx | 35 +- opencascade/StepVisual_TextPath.hxx | 9 +- opencascade/StepVisual_TextStyle.hxx | 39 +- .../StepVisual_TextStyleForDefinedFont.hxx | 29 +- ...Visual_TextStyleWithBoxCharacteristics.hxx | 40 +- opencascade/StepVisual_TriangulatedFace.hxx | 28 +- .../StepVisual_TriangulatedSurfaceSet.hxx | 13 +- opencascade/StepVisual_ViewVolume.hxx | 97 +- opencascade/StlAPI.hxx | 16 +- opencascade/StlAPI_Reader.hxx | 8 +- opencascade/StlAPI_Writer.hxx | 11 +- opencascade/Storage.hxx | 6 +- opencascade/Storage_ArrayOfCallBack.hxx | 1 - opencascade/Storage_ArrayOfSchema.hxx | 1 - opencascade/Storage_BaseDriver.hxx | 272 +- opencascade/Storage_BucketOfPersistent.hxx | 77 +- opencascade/Storage_CallBack.hxx | 26 +- opencascade/Storage_Data.hxx | 121 +- ...Storage_DataMapIteratorOfMapOfCallBack.hxx | 1 - .../Storage_DataMapIteratorOfMapOfPers.hxx | 1 - opencascade/Storage_DefaultCallBack.hxx | 29 +- opencascade/Storage_Error.hxx | 28 +- opencascade/Storage_HArrayOfCallBack.hxx | 1 - opencascade/Storage_HArrayOfSchema.hxx | 1 - opencascade/Storage_HPArray.hxx | 1 - opencascade/Storage_HSeqOfRoot.hxx | 1 - opencascade/Storage_HeaderData.hxx | 118 +- opencascade/Storage_InternalData.hxx | 35 +- opencascade/Storage_Macros.hxx | 115 +- opencascade/Storage_MapOfCallBack.hxx | 7 +- opencascade/Storage_MapOfPers.hxx | 6 +- opencascade/Storage_OpenMode.hxx | 9 +- opencascade/Storage_PArray.hxx | 1 - opencascade/Storage_PType.hxx | 3 +- opencascade/Storage_Root.hxx | 59 +- opencascade/Storage_RootData.hxx | 63 +- opencascade/Storage_Schema.hxx | 99 +- opencascade/Storage_SeqOfRoot.hxx | 1 - opencascade/Storage_SolveMode.hxx | 7 +- .../Storage_StreamExtCharParityError.hxx | 5 +- opencascade/Storage_StreamFormatError.hxx | 5 +- opencascade/Storage_StreamModeError.hxx | 5 +- opencascade/Storage_StreamReadError.hxx | 5 +- .../Storage_StreamTypeMismatchError.hxx | 5 +- .../Storage_StreamUnknownTypeError.hxx | 5 +- opencascade/Storage_StreamWriteError.hxx | 5 +- opencascade/Storage_TypeData.hxx | 59 +- opencascade/Storage_TypedCallBack.hxx | 44 +- opencascade/Sweep_NumShape.hxx | 53 +- opencascade/Sweep_NumShape.lxx | 36 +- opencascade/Sweep_NumShapeIterator.hxx | 49 +- opencascade/Sweep_NumShapeIterator.lxx | 24 +- opencascade/Sweep_NumShapeTool.hxx | 50 +- .../TColGeom2d_Array1OfBSplineCurve.hxx | 1 - .../TColGeom2d_Array1OfBezierCurve.hxx | 1 - opencascade/TColGeom2d_Array1OfCurve.hxx | 1 - .../TColGeom2d_HArray1OfBSplineCurve.hxx | 1 - .../TColGeom2d_HArray1OfBezierCurve.hxx | 1 - opencascade/TColGeom2d_HArray1OfCurve.hxx | 1 - .../TColGeom2d_HSequenceOfBoundedCurve.hxx | 1 - opencascade/TColGeom2d_HSequenceOfCurve.hxx | 1 - .../TColGeom2d_SequenceOfBoundedCurve.hxx | 1 - opencascade/TColGeom2d_SequenceOfCurve.hxx | 1 - opencascade/TColGeom2d_SequenceOfGeometry.hxx | 1 - opencascade/TColGeom_Array1OfBSplineCurve.hxx | 1 - opencascade/TColGeom_Array1OfBezierCurve.hxx | 1 - opencascade/TColGeom_Array1OfCurve.hxx | 1 - opencascade/TColGeom_Array1OfSurface.hxx | 1 - .../TColGeom_Array2OfBezierSurface.hxx | 1 - opencascade/TColGeom_Array2OfSurface.hxx | 1 - .../TColGeom_HArray1OfBSplineCurve.hxx | 1 - opencascade/TColGeom_HArray1OfBezierCurve.hxx | 1 - opencascade/TColGeom_HArray1OfCurve.hxx | 1 - opencascade/TColGeom_HArray1OfSurface.hxx | 1 - opencascade/TColGeom_HArray2OfSurface.hxx | 1 - .../TColGeom_HSequenceOfBoundedCurve.hxx | 1 - opencascade/TColGeom_HSequenceOfCurve.hxx | 1 - .../TColGeom_SequenceOfBoundedCurve.hxx | 1 - opencascade/TColGeom_SequenceOfCurve.hxx | 1 - opencascade/TColGeom_SequenceOfSurface.hxx | 1 - opencascade/TColStd_Array1OfAsciiString.hxx | 1 - opencascade/TColStd_Array1OfBoolean.hxx | 1 - opencascade/TColStd_Array1OfByte.hxx | 1 - opencascade/TColStd_Array1OfCharacter.hxx | 1 - .../TColStd_Array1OfExtendedString.hxx | 1 - opencascade/TColStd_Array1OfInteger.hxx | 1 - opencascade/TColStd_Array1OfListOfInteger.hxx | 1 - opencascade/TColStd_Array1OfReal.hxx | 1 - opencascade/TColStd_Array1OfTransient.hxx | 1 - opencascade/TColStd_Array2OfBoolean.hxx | 1 - opencascade/TColStd_Array2OfCharacter.hxx | 1 - opencascade/TColStd_Array2OfInteger.hxx | 1 - opencascade/TColStd_Array2OfReal.hxx | 1 - opencascade/TColStd_Array2OfTransient.hxx | 1 - ...pIteratorOfDataMapOfAsciiStringInteger.hxx | 1 - ...taMapIteratorOfDataMapOfIntegerInteger.hxx | 1 - ...teratorOfDataMapOfIntegerListOfInteger.hxx | 1 - ..._DataMapIteratorOfDataMapOfIntegerReal.hxx | 1 - ...MapIteratorOfDataMapOfIntegerTransient.hxx | 1 - ...ataMapIteratorOfDataMapOfStringInteger.hxx | 1 - ...pIteratorOfDataMapOfTransientTransient.hxx | 1 - .../TColStd_DataMapOfAsciiStringInteger.hxx | 7 +- .../TColStd_DataMapOfIntegerInteger.hxx | 6 +- .../TColStd_DataMapOfIntegerListOfInteger.hxx | 7 +- opencascade/TColStd_DataMapOfIntegerReal.hxx | 6 +- .../TColStd_DataMapOfIntegerTransient.hxx | 7 +- .../TColStd_DataMapOfStringInteger.hxx | 7 +- .../TColStd_DataMapOfTransientTransient.hxx | 7 +- opencascade/TColStd_HArray1OfAsciiString.hxx | 1 - opencascade/TColStd_HArray1OfBoolean.hxx | 1 - opencascade/TColStd_HArray1OfByte.hxx | 1 - opencascade/TColStd_HArray1OfCharacter.hxx | 1 - .../TColStd_HArray1OfExtendedString.hxx | 1 - opencascade/TColStd_HArray1OfInteger.hxx | 1 - .../TColStd_HArray1OfListOfInteger.hxx | 1 - opencascade/TColStd_HArray1OfReal.hxx | 1 - opencascade/TColStd_HArray1OfTransient.hxx | 1 - opencascade/TColStd_HArray2OfBoolean.hxx | 1 - opencascade/TColStd_HArray2OfCharacter.hxx | 1 - opencascade/TColStd_HArray2OfInteger.hxx | 1 - opencascade/TColStd_HArray2OfReal.hxx | 1 - opencascade/TColStd_HArray2OfTransient.hxx | 1 - opencascade/TColStd_HPackedMapOfInteger.hxx | 27 +- opencascade/TColStd_HPackedMapOfInteger.lxx | 12 +- .../TColStd_HSequenceOfAsciiString.hxx | 1 - .../TColStd_HSequenceOfExtendedString.hxx | 1 - .../TColStd_HSequenceOfHAsciiString.hxx | 1 - .../TColStd_HSequenceOfHExtendedString.hxx | 1 - opencascade/TColStd_HSequenceOfInteger.hxx | 1 - opencascade/TColStd_HSequenceOfReal.hxx | 1 - opencascade/TColStd_HSequenceOfTransient.hxx | 1 - .../TColStd_IndexedDataMapOfStringString.hxx | 3 +- ...Std_IndexedDataMapOfTransientTransient.hxx | 4 +- opencascade/TColStd_IndexedMapOfInteger.hxx | 1 - opencascade/TColStd_IndexedMapOfReal.hxx | 1 - opencascade/TColStd_IndexedMapOfTransient.hxx | 1 - ...ColStd_ListIteratorOfListOfAsciiString.hxx | 1 - .../TColStd_ListIteratorOfListOfInteger.hxx | 1 - .../TColStd_ListIteratorOfListOfReal.hxx | 1 - .../TColStd_ListIteratorOfListOfTransient.hxx | 1 - opencascade/TColStd_ListOfAsciiString.hxx | 3 +- opencascade/TColStd_ListOfInteger.hxx | 3 +- opencascade/TColStd_ListOfReal.hxx | 3 +- opencascade/TColStd_ListOfTransient.hxx | 4 +- .../TColStd_MapIteratorOfMapOfAsciiString.hxx | 1 - .../TColStd_MapIteratorOfMapOfInteger.hxx | 1 - .../TColStd_MapIteratorOfMapOfReal.hxx | 1 - .../TColStd_MapIteratorOfMapOfTransient.hxx | 1 - opencascade/TColStd_MapOfAsciiString.hxx | 3 +- opencascade/TColStd_MapOfInteger.hxx | 3 +- opencascade/TColStd_MapOfReal.hxx | 3 +- opencascade/TColStd_MapOfTransient.hxx | 3 +- opencascade/TColStd_PackedMapOfInteger.hxx | 333 +- opencascade/TColStd_SequenceOfAddress.hxx | 1 - opencascade/TColStd_SequenceOfAsciiString.hxx | 1 - opencascade/TColStd_SequenceOfBoolean.hxx | 1 - .../TColStd_SequenceOfExtendedString.hxx | 1 - .../TColStd_SequenceOfHAsciiString.hxx | 1 - .../TColStd_SequenceOfHExtendedString.hxx | 1 - opencascade/TColStd_SequenceOfInteger.hxx | 1 - opencascade/TColStd_SequenceOfReal.hxx | 1 - opencascade/TColStd_SequenceOfTransient.hxx | 1 - opencascade/TColgp_Array1OfCirc2d.hxx | 1 - opencascade/TColgp_Array1OfDir.hxx | 1 - opencascade/TColgp_Array1OfDir2d.hxx | 1 - opencascade/TColgp_Array1OfLin2d.hxx | 1 - opencascade/TColgp_Array1OfPnt.hxx | 1 - opencascade/TColgp_Array1OfPnt2d.hxx | 1 - opencascade/TColgp_Array1OfVec.hxx | 1 - opencascade/TColgp_Array1OfVec2d.hxx | 1 - opencascade/TColgp_Array1OfXY.hxx | 1 - opencascade/TColgp_Array1OfXYZ.hxx | 1 - opencascade/TColgp_Array2OfCirc2d.hxx | 1 - opencascade/TColgp_Array2OfDir.hxx | 1 - opencascade/TColgp_Array2OfDir2d.hxx | 1 - opencascade/TColgp_Array2OfLin2d.hxx | 1 - opencascade/TColgp_Array2OfPnt.hxx | 1 - opencascade/TColgp_Array2OfPnt2d.hxx | 1 - opencascade/TColgp_Array2OfVec.hxx | 1 - opencascade/TColgp_Array2OfVec2d.hxx | 1 - opencascade/TColgp_Array2OfXY.hxx | 1 - opencascade/TColgp_Array2OfXYZ.hxx | 1 - opencascade/TColgp_HArray1OfCirc2d.hxx | 1 - opencascade/TColgp_HArray1OfDir.hxx | 1 - opencascade/TColgp_HArray1OfDir2d.hxx | 1 - opencascade/TColgp_HArray1OfLin2d.hxx | 1 - opencascade/TColgp_HArray1OfPnt.hxx | 1 - opencascade/TColgp_HArray1OfPnt2d.hxx | 1 - opencascade/TColgp_HArray1OfVec.hxx | 1 - opencascade/TColgp_HArray1OfVec2d.hxx | 1 - opencascade/TColgp_HArray1OfXY.hxx | 1 - opencascade/TColgp_HArray1OfXYZ.hxx | 1 - opencascade/TColgp_HArray2OfCirc2d.hxx | 1 - opencascade/TColgp_HArray2OfDir.hxx | 1 - opencascade/TColgp_HArray2OfDir2d.hxx | 1 - opencascade/TColgp_HArray2OfLin2d.hxx | 1 - opencascade/TColgp_HArray2OfPnt.hxx | 1 - opencascade/TColgp_HArray2OfPnt2d.hxx | 1 - opencascade/TColgp_HArray2OfVec.hxx | 1 - opencascade/TColgp_HArray2OfVec2d.hxx | 1 - opencascade/TColgp_HArray2OfXY.hxx | 1 - opencascade/TColgp_HArray2OfXYZ.hxx | 1 - opencascade/TColgp_HSequenceOfDir.hxx | 1 - opencascade/TColgp_HSequenceOfDir2d.hxx | 1 - opencascade/TColgp_HSequenceOfPnt.hxx | 1 - opencascade/TColgp_HSequenceOfPnt2d.hxx | 1 - opencascade/TColgp_HSequenceOfVec.hxx | 1 - opencascade/TColgp_HSequenceOfVec2d.hxx | 1 - opencascade/TColgp_HSequenceOfXY.hxx | 1 - opencascade/TColgp_HSequenceOfXYZ.hxx | 1 - .../TColgp_SequenceOfArray1OfPnt2d.hxx | 1 - opencascade/TColgp_SequenceOfAx1.hxx | 1 - opencascade/TColgp_SequenceOfDir.hxx | 1 - opencascade/TColgp_SequenceOfDir2d.hxx | 1 - opencascade/TColgp_SequenceOfPnt.hxx | 1 - opencascade/TColgp_SequenceOfPnt2d.hxx | 1 - opencascade/TColgp_SequenceOfVec.hxx | 1 - opencascade/TColgp_SequenceOfVec2d.hxx | 1 - opencascade/TColgp_SequenceOfXY.hxx | 1 - opencascade/TColgp_SequenceOfXYZ.hxx | 1 - opencascade/TCollection.hxx | 30 +- opencascade/TCollection_AsciiString.hxx | 486 +- opencascade/TCollection_AsciiString.lxx | 66 +- opencascade/TCollection_ExtendedString.hxx | 280 +- opencascade/TCollection_HAsciiString.hxx | 267 +- opencascade/TCollection_HAsciiString.lxx | 64 +- opencascade/TCollection_HExtendedString.hxx | 181 +- opencascade/TDF.hxx | 23 +- opencascade/TDF_Attribute.hxx | 190 +- opencascade/TDF_Attribute.lxx | 40 +- opencascade/TDF_AttributeArray1.hxx | 1 - opencascade/TDF_AttributeDataMap.hxx | 6 +- opencascade/TDF_AttributeDelta.hxx | 43 +- opencascade/TDF_AttributeDeltaList.hxx | 3 +- opencascade/TDF_AttributeDoubleMap.hxx | 6 +- opencascade/TDF_AttributeIndexedMap.hxx | 1 - opencascade/TDF_AttributeIterator.hxx | 67 +- opencascade/TDF_AttributeList.hxx | 3 +- opencascade/TDF_AttributeMap.hxx | 3 +- opencascade/TDF_AttributeSequence.hxx | 1 - opencascade/TDF_ChildIDIterator.hxx | 51 +- opencascade/TDF_ChildIDIterator.lxx | 11 +- opencascade/TDF_ChildIterator.hxx | 45 +- opencascade/TDF_ChildIterator.lxx | 13 +- opencascade/TDF_ClosureMode.hxx | 39 +- opencascade/TDF_ClosureMode.lxx | 27 +- opencascade/TDF_ClosureTool.hxx | 47 +- opencascade/TDF_ComparisonTool.hxx | 76 +- opencascade/TDF_CopyLabel.hxx | 65 +- opencascade/TDF_CopyLabel.lxx | 4 +- opencascade/TDF_CopyTool.hxx | 56 +- opencascade/TDF_Data.hxx | 133 +- opencascade/TDF_Data.lxx | 38 +- .../TDF_DataMapIteratorOfAttributeDataMap.hxx | 1 - .../TDF_DataMapIteratorOfLabelDataMap.hxx | 1 - .../TDF_DataMapIteratorOfLabelIntegerMap.hxx | 1 - opencascade/TDF_DataSet.hxx | 71 +- opencascade/TDF_DataSet.lxx | 48 +- .../TDF_DefaultDeltaOnModification.hxx | 24 +- opencascade/TDF_DefaultDeltaOnRemoval.hxx | 24 +- opencascade/TDF_Delta.hxx | 72 +- opencascade/TDF_Delta.lxx | 60 +- opencascade/TDF_DeltaList.hxx | 3 +- opencascade/TDF_DeltaOnAddition.hxx | 24 +- opencascade/TDF_DeltaOnForget.hxx | 24 +- opencascade/TDF_DeltaOnModification.hxx | 22 +- opencascade/TDF_DeltaOnRemoval.hxx | 22 +- opencascade/TDF_DeltaOnResume.hxx | 29 +- opencascade/TDF_DerivedAttribute.hxx | 61 +- ..._DoubleMapIteratorOfAttributeDoubleMap.hxx | 1 - .../TDF_DoubleMapIteratorOfGUIDProgIDMap.hxx | 1 - .../TDF_DoubleMapIteratorOfLabelDoubleMap.hxx | 1 - opencascade/TDF_GUIDProgIDMap.hxx | 6 +- opencascade/TDF_HAttributeArray1.hxx | 1 - opencascade/TDF_IDFilter.hxx | 71 +- opencascade/TDF_IDFilter.lxx | 37 +- opencascade/TDF_IDList.hxx | 3 +- opencascade/TDF_IDMap.hxx | 3 +- opencascade/TDF_Label.hxx | 225 +- opencascade/TDF_Label.lxx | 90 +- opencascade/TDF_LabelDataMap.hxx | 5 +- opencascade/TDF_LabelDoubleMap.hxx | 5 +- opencascade/TDF_LabelIndexedMap.hxx | 1 - opencascade/TDF_LabelIntegerMap.hxx | 6 +- opencascade/TDF_LabelList.hxx | 3 +- opencascade/TDF_LabelMap.hxx | 3 +- opencascade/TDF_LabelNode.hxx | 113 +- opencascade/TDF_LabelSequence.hxx | 1 - .../TDF_ListIteratorOfAttributeDeltaList.hxx | 1 - .../TDF_ListIteratorOfAttributeList.hxx | 1 - opencascade/TDF_ListIteratorOfDeltaList.hxx | 1 - opencascade/TDF_ListIteratorOfIDList.hxx | 1 - opencascade/TDF_ListIteratorOfLabelList.hxx | 1 - opencascade/TDF_MapIteratorOfAttributeMap.hxx | 1 - opencascade/TDF_MapIteratorOfIDMap.hxx | 1 - opencascade/TDF_MapIteratorOfLabelMap.hxx | 1 - opencascade/TDF_Reference.hxx | 54 +- opencascade/TDF_RelocationTable.hxx | 101 +- opencascade/TDF_TagSource.hxx | 56 +- opencascade/TDF_Tool.hxx | 138 +- opencascade/TDF_Transaction.hxx | 58 +- opencascade/TDF_Transaction.lxx | 20 +- opencascade/TDataStd.hxx | 12 +- opencascade/TDataStd_AsciiString.hxx | 67 +- opencascade/TDataStd_BooleanArray.hxx | 87 +- opencascade/TDataStd_BooleanList.hxx | 84 +- opencascade/TDataStd_ByteArray.hxx | 94 +- opencascade/TDataStd_ChildNodeIterator.hxx | 23 +- opencascade/TDataStd_Comment.hxx | 22 +- opencascade/TDataStd_Current.hxx | 60 +- ...d_DataMapIteratorOfDataMapOfStringByte.hxx | 1 - ...ratorOfDataMapOfStringHArray1OfInteger.hxx | 1 - ...IteratorOfDataMapOfStringHArray1OfReal.hxx | 1 - ...d_DataMapIteratorOfDataMapOfStringReal.hxx | 1 - ...DataMapIteratorOfDataMapOfStringString.hxx | 1 - opencascade/TDataStd_DataMapOfStringByte.hxx | 6 +- ...ataStd_DataMapOfStringHArray1OfInteger.hxx | 7 +- .../TDataStd_DataMapOfStringHArray1OfReal.hxx | 7 +- opencascade/TDataStd_DataMapOfStringReal.hxx | 6 +- .../TDataStd_DataMapOfStringString.hxx | 7 +- ...DataStd_DeltaOnModificationOfByteArray.hxx | 30 +- ...td_DeltaOnModificationOfExtStringArray.hxx | 33 +- ...TDataStd_DeltaOnModificationOfIntArray.hxx | 28 +- ...aStd_DeltaOnModificationOfIntPackedMap.hxx | 27 +- ...DataStd_DeltaOnModificationOfRealArray.hxx | 30 +- opencascade/TDataStd_Directory.hxx | 46 +- opencascade/TDataStd_Expression.hxx | 53 +- opencascade/TDataStd_ExtStringArray.hxx | 86 +- opencascade/TDataStd_ExtStringList.hxx | 100 +- opencascade/TDataStd_GenericEmpty.hxx | 15 +- opencascade/TDataStd_GenericExtString.hxx | 23 +- opencascade/TDataStd_HDataMapOfStringByte.hxx | 3 - ...taStd_HDataMapOfStringHArray1OfInteger.hxx | 6 +- ...TDataStd_HDataMapOfStringHArray1OfReal.hxx | 6 +- .../TDataStd_HDataMapOfStringInteger.hxx | 3 - opencascade/TDataStd_HDataMapOfStringReal.hxx | 3 - .../TDataStd_HDataMapOfStringString.hxx | 3 - opencascade/TDataStd_HLabelArray1.hxx | 1 - opencascade/TDataStd_IntPackedMap.hxx | 61 +- opencascade/TDataStd_Integer.hxx | 65 +- opencascade/TDataStd_IntegerArray.hxx | 91 +- opencascade/TDataStd_IntegerList.hxx | 96 +- opencascade/TDataStd_LabelArray1.hxx | 1 - .../TDataStd_ListIteratorOfListOfByte.hxx | 1 - ...Std_ListIteratorOfListOfExtendedString.hxx | 1 - opencascade/TDataStd_ListOfByte.hxx | 3 +- opencascade/TDataStd_ListOfExtendedString.hxx | 4 +- opencascade/TDataStd_Name.hxx | 32 +- opencascade/TDataStd_NamedData.hxx | 160 +- opencascade/TDataStd_NoteBook.hxx | 45 +- opencascade/TDataStd_Real.hxx | 70 +- opencascade/TDataStd_RealArray.hxx | 88 +- opencascade/TDataStd_RealEnum.hxx | 7 +- opencascade/TDataStd_RealList.hxx | 98 +- opencascade/TDataStd_ReferenceArray.hxx | 93 +- opencascade/TDataStd_ReferenceList.hxx | 101 +- opencascade/TDataStd_Relation.hxx | 27 +- opencascade/TDataStd_Tick.hxx | 21 +- opencascade/TDataStd_TreeNode.hxx | 179 +- opencascade/TDataStd_UAttribute.hxx | 50 +- opencascade/TDataStd_Variable.hxx | 93 +- opencascade/TDataXtd.hxx | 57 +- opencascade/TDataXtd_Array1OfTrsf.hxx | 1 - opencascade/TDataXtd_Axis.hxx | 31 +- opencascade/TDataXtd_Constraint.hxx | 121 +- opencascade/TDataXtd_ConstraintEnum.hxx | 52 +- opencascade/TDataXtd_Geometry.hxx | 97 +- opencascade/TDataXtd_GeometryEnum.hxx | 17 +- opencascade/TDataXtd_HArray1OfTrsf.hxx | 1 - opencascade/TDataXtd_Pattern.hxx | 32 +- opencascade/TDataXtd_PatternStd.hxx | 137 +- opencascade/TDataXtd_PatternStd.lxx | 41 +- opencascade/TDataXtd_Placement.hxx | 28 +- opencascade/TDataXtd_Plane.hxx | 32 +- opencascade/TDataXtd_Point.hxx | 31 +- opencascade/TDataXtd_Position.hxx | 54 +- opencascade/TDataXtd_Presentation.hxx | 76 +- opencascade/TDataXtd_Shape.hxx | 45 +- opencascade/TDataXtd_Triangulation.hxx | 40 +- opencascade/TDocStd.hxx | 8 +- opencascade/TDocStd_Application.hxx | 164 +- opencascade/TDocStd_ApplicationDelta.hxx | 32 +- opencascade/TDocStd_ApplicationDelta.lxx | 13 +- opencascade/TDocStd_CompoundDelta.hxx | 23 +- opencascade/TDocStd_Context.hxx | 29 +- ...Std_DataMapIteratorOfLabelIDMapDataMap.hxx | 1 - opencascade/TDocStd_Document.hxx | 170 +- opencascade/TDocStd_Document.lxx | 69 +- opencascade/TDocStd_FormatVersion.hxx | 89 +- opencascade/TDocStd_LabelIDMapDataMap.hxx | 6 +- opencascade/TDocStd_Modified.hxx | 75 +- .../TDocStd_MultiTransactionManager.hxx | 103 +- .../TDocStd_MultiTransactionManager.lxx | 48 +- opencascade/TDocStd_Owner.hxx | 56 +- opencascade/TDocStd_PathParser.hxx | 36 +- .../TDocStd_SequenceOfApplicationDelta.hxx | 1 - opencascade/TDocStd_SequenceOfDocument.hxx | 1 - opencascade/TDocStd_XLink.hxx | 92 +- opencascade/TDocStd_XLink.lxx | 12 +- opencascade/TDocStd_XLinkIterator.hxx | 41 +- opencascade/TDocStd_XLinkIterator.lxx | 14 +- opencascade/TDocStd_XLinkRoot.hxx | 62 +- opencascade/TDocStd_XLinkRoot.lxx | 11 +- opencascade/TDocStd_XLinkTool.hxx | 43 +- .../TFunction_Array1OfDataMapOfGUIDDriver.hxx | 1 - ...n_DataMapIteratorOfDataMapOfGUIDDriver.hxx | 1 - ...MapIteratorOfDataMapOfLabelListOfLabel.hxx | 1 - opencascade/TFunction_DataMapOfGUIDDriver.hxx | 6 +- .../TFunction_DataMapOfLabelListOfLabel.hxx | 6 +- ...leMapIteratorOfDoubleMapOfIntegerLabel.hxx | 1 - .../TFunction_DoubleMapOfIntegerLabel.hxx | 6 +- opencascade/TFunction_Driver.hxx | 47 +- opencascade/TFunction_Driver.lxx | 5 +- opencascade/TFunction_DriverTable.hxx | 60 +- opencascade/TFunction_ExecutionStatus.hxx | 11 +- opencascade/TFunction_Function.hxx | 47 +- opencascade/TFunction_GraphNode.hxx | 94 +- ...TFunction_HArray1OfDataMapOfGUIDDriver.hxx | 1 - opencascade/TFunction_IFunction.hxx | 78 +- opencascade/TFunction_Iterator.hxx | 61 +- opencascade/TFunction_Logbook.hxx | 64 +- opencascade/TFunction_Scope.hxx | 87 +- opencascade/TNaming.hxx | 88 +- opencascade/TNaming_Builder.hxx | 46 +- opencascade/TNaming_CopyShape.hxx | 42 +- ...MapIteratorOfDataMapOfShapePtrRefShape.hxx | 1 - ...taMapIteratorOfDataMapOfShapeShapesSet.hxx | 1 - .../TNaming_DataMapOfShapePtrRefShape.hxx | 7 +- .../TNaming_DataMapOfShapeShapesSet.hxx | 7 +- opencascade/TNaming_DeltaOnModification.hxx | 24 +- opencascade/TNaming_DeltaOnRemoval.hxx | 25 +- opencascade/TNaming_Evolution.hxx | 12 +- opencascade/TNaming_Identifier.hxx | 91 +- opencascade/TNaming_Iterator.hxx | 46 +- opencascade/TNaming_Iterator.lxx | 2 +- opencascade/TNaming_IteratorOnShapesSet.hxx | 44 +- opencascade/TNaming_IteratorOnShapesSet.lxx | 33 +- ...ListOfIndexedDataMapOfShapeListOfShape.hxx | 1 - ...TNaming_ListIteratorOfListOfMapOfShape.hxx | 1 - ...TNaming_ListIteratorOfListOfNamedShape.hxx | 1 - ...ListOfIndexedDataMapOfShapeListOfShape.hxx | 7 +- opencascade/TNaming_ListOfMapOfShape.hxx | 3 +- opencascade/TNaming_ListOfNamedShape.hxx | 4 +- opencascade/TNaming_Localizer.hxx | 80 +- .../TNaming_MapIteratorOfMapOfNamedShape.hxx | 1 - opencascade/TNaming_MapOfNamedShape.hxx | 3 +- opencascade/TNaming_NCollections.hxx | 11 +- opencascade/TNaming_Name.hxx | 84 +- opencascade/TNaming_NameType.hxx | 24 +- opencascade/TNaming_NamedShape.hxx | 117 +- opencascade/TNaming_NamedShape.lxx | 26 +- opencascade/TNaming_Naming.hxx | 77 +- opencascade/TNaming_NamingTool.hxx | 39 +- opencascade/TNaming_NewShapeIterator.hxx | 61 +- opencascade/TNaming_NewShapeIterator.lxx | 4 +- opencascade/TNaming_OldShapeIterator.hxx | 61 +- opencascade/TNaming_OldShapeIterator.lxx | 4 +- opencascade/TNaming_RefShape.hxx | 48 +- opencascade/TNaming_RefShape.lxx | 42 +- opencascade/TNaming_SameShapeIterator.hxx | 37 +- opencascade/TNaming_SameShapeIterator.lxx | 4 +- opencascade/TNaming_Scope.hxx | 62 +- opencascade/TNaming_Selector.hxx | 54 +- opencascade/TNaming_ShapesSet.hxx | 69 +- opencascade/TNaming_ShapesSet.lxx | 50 +- opencascade/TNaming_Tool.hxx | 122 +- opencascade/TNaming_TranslateTool.hxx | 60 +- opencascade/TNaming_Translator.hxx | 44 +- opencascade/TNaming_UsedShapes.hxx | 77 +- opencascade/TNaming_UsedShapes.lxx | 12 +- opencascade/TObj_Application.hxx | 103 +- opencascade/TObj_Assistant.hxx | 52 +- opencascade/TObj_CheckModel.hxx | 32 +- opencascade/TObj_Container.hxx | 3 +- opencascade/TObj_DeletingMode.hxx | 8 +- opencascade/TObj_HiddenPartition.hxx | 19 +- opencascade/TObj_LabelIterator.hxx | 104 +- opencascade/TObj_Model.hxx | 261 +- opencascade/TObj_ModelIterator.hxx | 53 +- opencascade/TObj_Object.hxx | 429 +- opencascade/TObj_ObjectIterator.hxx | 32 +- opencascade/TObj_OcafObjectIterator.hxx | 27 +- opencascade/TObj_Partition.hxx | 108 +- opencascade/TObj_Persistence.hxx | 95 +- opencascade/TObj_ReferenceIterator.hxx | 41 +- opencascade/TObj_SequenceIterator.hxx | 59 +- opencascade/TObj_SequenceOfObject.hxx | 2 +- opencascade/TObj_TIntSparseArray.hxx | 56 +- opencascade/TObj_TModel.hxx | 60 +- opencascade/TObj_TNameContainer.hxx | 70 +- opencascade/TObj_TObject.hxx | 71 +- opencascade/TObj_TReference.hxx | 67 +- opencascade/TObj_TXYZ.hxx | 54 +- opencascade/TPrsStd_AISPresentation.hxx | 156 +- opencascade/TPrsStd_AISViewer.hxx | 79 +- opencascade/TPrsStd_AxisDriver.hxx | 28 +- opencascade/TPrsStd_ConstraintDriver.hxx | 28 +- opencascade/TPrsStd_ConstraintTools.hxx | 147 +- ...d_DataMapIteratorOfDataMapOfGUIDDriver.hxx | 1 - opencascade/TPrsStd_DataMapOfGUIDDriver.hxx | 6 +- opencascade/TPrsStd_Driver.hxx | 26 +- opencascade/TPrsStd_DriverTable.hxx | 41 +- opencascade/TPrsStd_GeometryDriver.hxx | 29 +- opencascade/TPrsStd_NamedShapeDriver.hxx | 28 +- opencascade/TPrsStd_PlaneDriver.hxx | 28 +- opencascade/TPrsStd_PointDriver.hxx | 28 +- opencascade/TShort_Array1OfShortReal.hxx | 1 - opencascade/TShort_Array2OfShortReal.hxx | 1 - opencascade/TShort_HArray1OfShortReal.hxx | 1 - opencascade/TShort_HArray2OfShortReal.hxx | 1 - opencascade/TShort_HSequenceOfShortReal.hxx | 1 - opencascade/TShort_SequenceOfShortReal.hxx | 1 - opencascade/TopAbs.hxx | 67 +- opencascade/TopAbs_Orientation.hxx | 8 +- opencascade/TopAbs_ShapeEnum.hxx | 18 +- opencascade/TopAbs_State.hxx | 8 +- opencascade/TopBas_Interference.gxx | 42 - opencascade/TopBas_Interference.lxx | 55 +- ...s_ListIteratorOfListOfTestInterference.hxx | 1 - opencascade/TopBas_ListOfTestInterference.hxx | 4 +- opencascade/TopBas_TestInterference.hxx | 64 +- opencascade/TopClass_Classifier2d.gxx | 230 - opencascade/TopClass_Classifier2d.lxx | 24 +- opencascade/TopClass_Classifier3d.gxx | 92 - opencascade/TopClass_Classifier3d.lxx | 37 - opencascade/TopClass_FaceClassifier.gxx | 191 - opencascade/TopClass_FaceClassifier.lxx | 13 +- opencascade/TopClass_SolidClassifier.gxx | 196 - opencascade/TopClass_SolidExplorer.hxx | 118 - opencascade/TopCnx_EdgeFaceTransition.hxx | 50 +- opencascade/TopExp.hxx | 66 +- opencascade/TopExp_Explorer.hxx | 24 +- opencascade/TopLoc_Datum3D.hxx | 18 +- opencascade/TopLoc_IndexedMapOfLocation.hxx | 1 - opencascade/TopLoc_ItemLocation.hxx | 33 +- opencascade/TopLoc_Location.hxx | 121 +- opencascade/TopLoc_Location.lxx | 50 +- .../TopLoc_MapIteratorOfMapOfLocation.hxx | 1 - opencascade/TopLoc_MapOfLocation.hxx | 3 +- .../TopLoc_SListNodeOfItemLocation.hxx | 31 +- .../TopLoc_SListNodeOfItemLocation.lxx | 8 +- opencascade/TopLoc_SListOfItemLocation.hxx | 75 +- opencascade/TopOpeBRep.hxx | 9 +- opencascade/TopOpeBRepBuild_Area1dBuilder.hxx | 65 +- opencascade/TopOpeBRepBuild_Area2dBuilder.hxx | 38 +- opencascade/TopOpeBRepBuild_Area3dBuilder.hxx | 38 +- opencascade/TopOpeBRepBuild_AreaBuilder.hxx | 80 +- opencascade/TopOpeBRepBuild_BlockBuilder.hxx | 72 +- opencascade/TopOpeBRepBuild_BlockIterator.hxx | 38 +- opencascade/TopOpeBRepBuild_BlockIterator.lxx | 25 +- opencascade/TopOpeBRepBuild_Builder.hxx | 1137 +- opencascade/TopOpeBRepBuild_Builder1.hxx | 209 +- opencascade/TopOpeBRepBuild_BuilderON.hxx | 65 +- .../TopOpeBRepBuild_CompositeClassifier.hxx | 52 +- opencascade/TopOpeBRepBuild_CorrectFace2d.hxx | 139 +- ...OfDataMapOfShapeListOfShapeListOfShape.hxx | 1 - ...d_DataMapOfShapeListOfShapeListOfShape.hxx | 11 +- opencascade/TopOpeBRepBuild_EdgeBuilder.hxx | 53 +- .../TopOpeBRepBuild_FaceAreaBuilder.hxx | 36 +- opencascade/TopOpeBRepBuild_FaceBuilder.hxx | 95 +- opencascade/TopOpeBRepBuild_FuseFace.hxx | 72 +- opencascade/TopOpeBRepBuild_FuseFace.lxx | 64 +- opencascade/TopOpeBRepBuild_GIter.hxx | 41 +- opencascade/TopOpeBRepBuild_GTool.hxx | 58 +- opencascade/TopOpeBRepBuild_GTopo.hxx | 138 +- opencascade/TopOpeBRepBuild_HBuilder.hxx | 162 +- ...pBuild_IndexedDataMapOfShapeVertexInfo.hxx | 6 +- ...epBuild_ListIteratorOfListOfListOfLoop.hxx | 1 - ...pOpeBRepBuild_ListIteratorOfListOfLoop.hxx | 1 - ...pOpeBRepBuild_ListIteratorOfListOfPave.hxx | 1 - ...d_ListIteratorOfListOfShapeListOfShape.hxx | 1 - .../TopOpeBRepBuild_ListOfListOfLoop.hxx | 4 +- opencascade/TopOpeBRepBuild_ListOfLoop.hxx | 4 +- opencascade/TopOpeBRepBuild_ListOfPave.hxx | 4 +- ...TopOpeBRepBuild_ListOfShapeListOfShape.hxx | 4 +- opencascade/TopOpeBRepBuild_Loop.hxx | 36 +- .../TopOpeBRepBuild_LoopClassifier.hxx | 28 +- opencascade/TopOpeBRepBuild_LoopEnum.hxx | 7 +- opencascade/TopOpeBRepBuild_LoopSet.hxx | 43 +- opencascade/TopOpeBRepBuild_Pave.hxx | 67 +- .../TopOpeBRepBuild_PaveClassifier.hxx | 67 +- opencascade/TopOpeBRepBuild_PaveSet.hxx | 66 +- .../TopOpeBRepBuild_ShapeListOfShape.hxx | 41 +- opencascade/TopOpeBRepBuild_ShapeSet.hxx | 174 +- .../TopOpeBRepBuild_ShellFaceClassifier.hxx | 61 +- opencascade/TopOpeBRepBuild_ShellFaceSet.hxx | 61 +- opencascade/TopOpeBRepBuild_ShellToSolid.hxx | 31 +- .../TopOpeBRepBuild_SolidAreaBuilder.hxx | 36 +- opencascade/TopOpeBRepBuild_SolidBuilder.hxx | 67 +- opencascade/TopOpeBRepBuild_Tools.hxx | 175 +- opencascade/TopOpeBRepBuild_Tools2d.hxx | 34 +- opencascade/TopOpeBRepBuild_VertexInfo.hxx | 83 +- .../TopOpeBRepBuild_WireEdgeClassifier.hxx | 70 +- opencascade/TopOpeBRepBuild_WireEdgeSet.hxx | 122 +- opencascade/TopOpeBRepBuild_WireToFace.hxx | 31 +- opencascade/TopOpeBRepBuild_define.hxx | 2 +- opencascade/TopOpeBRepBuild_kpresu.hxx | 40 +- opencascade/TopOpeBRepDS.hxx | 76 +- ...y1OfDataMapOfIntegerListOfInterference.hxx | 4 +- opencascade/TopOpeBRepDS_Association.hxx | 39 +- opencascade/TopOpeBRepDS_BuildTool.hxx | 235 +- opencascade/TopOpeBRepDS_Check.hxx | 81 +- opencascade/TopOpeBRepDS_CheckStatus.hxx | 5 +- opencascade/TopOpeBRepDS_Config.hxx | 7 +- opencascade/TopOpeBRepDS_Curve.hxx | 138 +- opencascade/TopOpeBRepDS_CurveData.hxx | 28 +- opencascade/TopOpeBRepDS_CurveExplorer.hxx | 53 +- opencascade/TopOpeBRepDS_CurveIterator.hxx | 36 +- .../TopOpeBRepDS_CurvePointInterference.hxx | 31 +- opencascade/TopOpeBRepDS_DRAW.hxx | 52 +- ..._DataMapIteratorOfDataMapOfCheckStatus.hxx | 1 - ...orOfDataMapOfIntegerListOfInterference.hxx | 1 - ...ataMapOfInterferenceListOfInterference.hxx | 1 - ...apIteratorOfDataMapOfInterferenceShape.hxx | 1 - ...torOfDataMapOfShapeListOfShapeOn1State.hxx | 1 - ...S_DataMapIteratorOfDataMapOfShapeState.hxx | 1 - ...pOpeBRepDS_DataMapIteratorOfMapOfCurve.hxx | 1 - ...DataMapIteratorOfMapOfIntegerShapeData.hxx | 1 - ...pOpeBRepDS_DataMapIteratorOfMapOfPoint.hxx | 1 - ...peBRepDS_DataMapIteratorOfMapOfSurface.hxx | 1 - ...peBRepDS_DataMapIteratorOfShapeSurface.hxx | 1 - .../TopOpeBRepDS_DataMapOfCheckStatus.hxx | 7 +- ...pDS_DataMapOfIntegerListOfInterference.hxx | 7 +- ...ataMapOfInterferenceListOfInterference.hxx | 8 +- ...opOpeBRepDS_DataMapOfInterferenceShape.hxx | 7 +- ...epDS_DataMapOfShapeListOfShapeOn1State.hxx | 9 +- .../TopOpeBRepDS_DataMapOfShapeState.hxx | 7 +- opencascade/TopOpeBRepDS_DataStructure.hxx | 462 +- ...leMapIteratorOfDoubleMapOfIntegerShape.hxx | 1 - .../TopOpeBRepDS_DoubleMapOfIntegerShape.hxx | 10 +- opencascade/TopOpeBRepDS_Dumper.hxx | 42 +- opencascade/TopOpeBRepDS_EIR.hxx | 28 +- opencascade/TopOpeBRepDS_EXPORT.hxx | 215 +- .../TopOpeBRepDS_Edge3dInterferenceTool.hxx | 54 +- .../TopOpeBRepDS_EdgeInterferenceTool.hxx | 42 +- .../TopOpeBRepDS_EdgeVertexInterference.hxx | 44 +- opencascade/TopOpeBRepDS_Explorer.hxx | 63 +- opencascade/TopOpeBRepDS_FIR.hxx | 31 +- .../TopOpeBRepDS_FaceEdgeInterference.hxx | 27 +- .../TopOpeBRepDS_FaceInterferenceTool.hxx | 71 +- opencascade/TopOpeBRepDS_Filter.hxx | 49 +- opencascade/TopOpeBRepDS_GapFiller.hxx | 78 +- opencascade/TopOpeBRepDS_GapTool.hxx | 71 +- opencascade/TopOpeBRepDS_GeometryData.hxx | 40 +- ...y1OfDataMapOfIntegerListOfInterference.hxx | 4 +- opencascade/TopOpeBRepDS_HDataStructure.hxx | 204 +- ...eBRepDS_IndexedDataMapOfShapeWithState.hxx | 6 +- ...pOpeBRepDS_IndexedDataMapOfVertexPoint.hxx | 4 +- opencascade/TopOpeBRepDS_Interference.hxx | 82 +- .../TopOpeBRepDS_InterferenceIterator.hxx | 77 +- opencascade/TopOpeBRepDS_InterferenceTool.hxx | 91 +- opencascade/TopOpeBRepDS_Kind.hxx | 24 +- ...RepDS_ListIteratorOfListOfInterference.hxx | 1 - .../TopOpeBRepDS_ListOfInterference.hxx | 4 +- .../TopOpeBRepDS_ListOfShapeOn1State.hxx | 36 +- opencascade/TopOpeBRepDS_MapOfCurve.hxx | 6 +- .../TopOpeBRepDS_MapOfIntegerShapeData.hxx | 7 +- opencascade/TopOpeBRepDS_MapOfPoint.hxx | 6 +- opencascade/TopOpeBRepDS_MapOfShapeData.hxx | 4 +- opencascade/TopOpeBRepDS_MapOfSurface.hxx | 6 +- opencascade/TopOpeBRepDS_Marker.hxx | 39 +- opencascade/TopOpeBRepDS_Point.hxx | 48 +- opencascade/TopOpeBRepDS_PointData.hxx | 42 +- opencascade/TopOpeBRepDS_PointExplorer.hxx | 63 +- opencascade/TopOpeBRepDS_PointIterator.hxx | 48 +- .../TopOpeBRepDS_ProcessInterferencesTool.hxx | 129 +- opencascade/TopOpeBRepDS_Reducer.hxx | 29 +- opencascade/TopOpeBRepDS_ShapeData.hxx | 49 +- .../TopOpeBRepDS_ShapeShapeInterference.hxx | 40 +- opencascade/TopOpeBRepDS_ShapeSurface.hxx | 7 +- opencascade/TopOpeBRepDS_ShapeWithState.hxx | 46 +- .../TopOpeBRepDS_SolidSurfaceInterference.hxx | 28 +- opencascade/TopOpeBRepDS_Surface.hxx | 27 +- .../TopOpeBRepDS_SurfaceCurveInterference.hxx | 36 +- opencascade/TopOpeBRepDS_SurfaceData.hxx | 28 +- opencascade/TopOpeBRepDS_SurfaceExplorer.hxx | 63 +- opencascade/TopOpeBRepDS_SurfaceIterator.hxx | 29 +- opencascade/TopOpeBRepDS_TKI.hxx | 122 +- opencascade/TopOpeBRepDS_TOOL.hxx | 60 +- opencascade/TopOpeBRepDS_Transition.hxx | 116 +- opencascade/TopOpeBRepDS_connex.hxx | 27 +- opencascade/TopOpeBRepDS_repvg.hxx | 14 +- opencascade/TopOpeBRepDS_samdom.hxx | 30 +- opencascade/TopOpeBRepTool.hxx | 64 +- opencascade/TopOpeBRepTool_2d.hxx | 68 +- opencascade/TopOpeBRepTool_AncestorsTool.hxx | 29 +- opencascade/TopOpeBRepTool_BoxSort.hxx | 78 +- opencascade/TopOpeBRepTool_C2DF.hxx | 58 +- opencascade/TopOpeBRepTool_CLASSI.hxx | 53 +- opencascade/TopOpeBRepTool_CORRISO.hxx | 118 +- opencascade/TopOpeBRepTool_CurveTool.hxx | 72 +- opencascade/TopOpeBRepTool_DRAW.hxx | 93 +- ...apIteratorOfDataMapOfOrientedShapeC2DF.hxx | 1 - ...aMapIteratorOfDataMapOfShapeListOfC2DF.hxx | 1 - ...ol_DataMapIteratorOfDataMapOfShapeface.hxx | 1 - ...OpeBRepTool_DataMapOfOrientedShapeC2DF.hxx | 7 +- ...opOpeBRepTool_DataMapOfShapeListOfC2DF.hxx | 7 +- .../TopOpeBRepTool_DataMapOfShapeface.hxx | 7 +- opencascade/TopOpeBRepTool_FuseEdges.hxx | 88 +- opencascade/TopOpeBRepTool_GEOMETRY.hxx | 20 +- opencascade/TopOpeBRepTool_GeomTool.hxx | 81 +- opencascade/TopOpeBRepTool_HBoxTool.hxx | 61 +- ...opOpeBRepTool_IndexedDataMapOfShapeBox.hxx | 3 +- ...OpeBRepTool_IndexedDataMapOfShapeBox2d.hxx | 4 +- ...RepTool_IndexedDataMapOfShapeconnexity.hxx | 4 +- ...epTool_IndexedDataMapOfSolidClassifier.hxx | 6 +- opencascade/TopOpeBRepTool_KRO.hxx | 52 +- ...opOpeBRepTool_ListIteratorOfListOfC2DF.hxx | 1 - opencascade/TopOpeBRepTool_ListOfC2DF.hxx | 3 +- opencascade/TopOpeBRepTool_OutCurveType.hxx | 7 +- opencascade/TopOpeBRepTool_PROJECT.hxx | 78 +- opencascade/TopOpeBRepTool_PURGE.hxx | 32 +- .../TopOpeBRepTool_PurgeInternalEdges.hxx | 37 +- opencascade/TopOpeBRepTool_REGUS.hxx | 80 +- opencascade/TopOpeBRepTool_REGUW.hxx | 117 +- opencascade/TopOpeBRepTool_SC.hxx | 9 +- opencascade/TopOpeBRepTool_STATE.hxx | 27 +- .../TopOpeBRepTool_ShapeClassifier.hxx | 123 +- opencascade/TopOpeBRepTool_ShapeExplorer.hxx | 29 +- opencascade/TopOpeBRepTool_ShapeTool.hxx | 131 +- .../TopOpeBRepTool_SolidClassifier.hxx | 61 +- opencascade/TopOpeBRepTool_TOOL.hxx | 321 +- opencascade/TopOpeBRepTool_TOPOLOGY.hxx | 281 +- opencascade/TopOpeBRepTool_box.hxx | 4 +- opencascade/TopOpeBRepTool_connexity.hxx | 61 +- opencascade/TopOpeBRepTool_defineG.hxx | 4 +- opencascade/TopOpeBRepTool_face.hxx | 43 +- opencascade/TopOpeBRepTool_makeTransition.hxx | 73 +- opencascade/TopOpeBRepTool_mkTondgE.hxx | 69 +- opencascade/TopOpeBRepTool_tol.hxx | 50 +- opencascade/TopOpeBRep_Array1OfLineInter.hxx | 1 - .../TopOpeBRep_Array1OfVPointInter.hxx | 1 - opencascade/TopOpeBRep_Bipoint.hxx | 31 +- opencascade/TopOpeBRep_DRAW.hxx | 2 +- opencascade/TopOpeBRep_DSFiller.hxx | 135 +- ...ep_DataMapIteratorOfDataMapOfTopolTool.hxx | 1 - opencascade/TopOpeBRep_DataMapOfTopolTool.hxx | 9 +- opencascade/TopOpeBRep_EdgesFiller.hxx | 106 +- opencascade/TopOpeBRep_EdgesIntersector.hxx | 233 +- opencascade/TopOpeBRep_FFDumper.hxx | 59 +- opencascade/TopOpeBRep_FFTransitionTool.hxx | 59 +- opencascade/TopOpeBRep_FaceEdgeFiller.hxx | 58 +- .../TopOpeBRep_FaceEdgeIntersector.hxx | 105 +- opencascade/TopOpeBRep_FacesFiller.hxx | 306 +- opencascade/TopOpeBRep_FacesIntersector.hxx | 128 +- opencascade/TopOpeBRep_GeomTool.hxx | 52 +- opencascade/TopOpeBRep_HArray1OfLineInter.hxx | 1 - .../TopOpeBRep_HArray1OfVPointInter.hxx | 1 - opencascade/TopOpeBRep_Hctxee2d.hxx | 44 +- opencascade/TopOpeBRep_Hctxff2d.hxx | 70 +- opencascade/TopOpeBRep_LineInter.hxx | 223 +- opencascade/TopOpeBRep_LineInter.lxx | 97 +- ...TopOpeBRep_ListIteratorOfListOfBipoint.hxx | 1 - opencascade/TopOpeBRep_ListOfBipoint.hxx | 3 +- opencascade/TopOpeBRep_P2Dstatus.hxx | 11 +- opencascade/TopOpeBRep_Point2d.hxx | 187 +- opencascade/TopOpeBRep_Point2d.lxx | 212 +- opencascade/TopOpeBRep_PointClassifier.hxx | 41 +- opencascade/TopOpeBRep_PointGeomTool.hxx | 37 +- opencascade/TopOpeBRep_SequenceOfPoint2d.hxx | 1 - opencascade/TopOpeBRep_ShapeIntersector.hxx | 161 +- opencascade/TopOpeBRep_ShapeIntersector2d.hxx | 92 +- opencascade/TopOpeBRep_ShapeScanner.hxx | 58 +- opencascade/TopOpeBRep_TypeLineCurve.hxx | 19 +- opencascade/TopOpeBRep_VPointInter.hxx | 221 +- opencascade/TopOpeBRep_VPointInter.lxx | 167 +- .../TopOpeBRep_VPointInterClassifier.hxx | 42 +- .../TopOpeBRep_VPointInterIterator.hxx | 52 +- opencascade/TopOpeBRep_WPointInter.hxx | 46 +- .../TopOpeBRep_WPointInterIterator.hxx | 45 +- opencascade/TopOpeBRep_traceSIFF.hxx | 42 +- opencascade/TopTools.hxx | 12 +- opencascade/TopTools_Array1OfListOfShape.hxx | 1 - opencascade/TopTools_Array1OfShape.hxx | 1 - opencascade/TopTools_Array2OfShape.hxx | 1 - ...pIteratorOfDataMapOfIntegerListOfShape.hxx | 1 - ...DataMapIteratorOfDataMapOfIntegerShape.hxx | 1 - ...teratorOfDataMapOfOrientedShapeInteger.hxx | 1 - ...pIteratorOfDataMapOfOrientedShapeShape.hxx | 1 - ...DataMapIteratorOfDataMapOfShapeInteger.hxx | 1 - ...pIteratorOfDataMapOfShapeListOfInteger.hxx | 1 - ...MapIteratorOfDataMapOfShapeListOfShape.hxx | 1 - ...ls_DataMapIteratorOfDataMapOfShapeReal.hxx | 1 - ...teratorOfDataMapOfShapeSequenceOfShape.hxx | 1 - ...s_DataMapIteratorOfDataMapOfShapeShape.hxx | 1 - .../TopTools_DataMapOfIntegerListOfShape.hxx | 7 +- .../TopTools_DataMapOfIntegerShape.hxx | 6 +- ...TopTools_DataMapOfOrientedShapeInteger.hxx | 6 +- .../TopTools_DataMapOfOrientedShapeShape.hxx | 6 +- opencascade/TopTools_DataMapOfShapeBox.hxx | 9 +- .../TopTools_DataMapOfShapeInteger.hxx | 7 +- .../TopTools_DataMapOfShapeListOfInteger.hxx | 7 +- .../TopTools_DataMapOfShapeListOfShape.hxx | 7 +- opencascade/TopTools_DataMapOfShapeReal.hxx | 7 +- ...TopTools_DataMapOfShapeSequenceOfShape.hxx | 7 +- opencascade/TopTools_DataMapOfShapeShape.hxx | 7 +- opencascade/TopTools_FormatVersion.hxx | 10 +- opencascade/TopTools_HArray1OfListOfShape.hxx | 1 - opencascade/TopTools_HArray1OfShape.hxx | 1 - opencascade/TopTools_HArray2OfShape.hxx | 1 - opencascade/TopTools_HSequenceOfShape.hxx | 1 - .../TopTools_IndexedDataMapOfShapeAddress.hxx | 4 +- ...Tools_IndexedDataMapOfShapeListOfShape.hxx | 4 +- .../TopTools_IndexedDataMapOfShapeReal.hxx | 3 +- .../TopTools_IndexedDataMapOfShapeShape.hxx | 4 +- .../TopTools_IndexedMapOfOrientedShape.hxx | 1 - opencascade/TopTools_IndexedMapOfShape.hxx | 3 +- .../TopTools_ListIteratorOfListOfShape.hxx | 1 - opencascade/TopTools_ListOfListOfShape.hxx | 3 +- opencascade/TopTools_ListOfShape.hxx | 3 +- opencascade/TopTools_LocationSet.hxx | 37 +- ...pTools_MapIteratorOfMapOfOrientedShape.hxx | 1 - .../TopTools_MapIteratorOfMapOfShape.hxx | 1 - opencascade/TopTools_MapOfOrientedShape.hxx | 3 +- opencascade/TopTools_MapOfShape.hxx | 6 +- .../TopTools_MutexForShapeProvider.hxx | 13 +- opencascade/TopTools_SequenceOfShape.hxx | 1 - opencascade/TopTools_ShapeMapHasher.hxx | 1 - opencascade/TopTools_ShapeSet.hxx | 127 +- opencascade/TopTrans_Array2OfOrientation.hxx | 1 - opencascade/TopTrans_CurveTransition.hxx | 80 +- opencascade/TopTrans_SurfaceTransition.hxx | 93 +- opencascade/TopoDS.hxx | 285 +- opencascade/TopoDS.lxx | 219 - opencascade/TopoDSToStep.hxx | 40 +- opencascade/TopoDSToStep_Builder.hxx | 65 +- opencascade/TopoDSToStep_BuilderError.hxx | 7 +- opencascade/TopoDSToStep_FacetedError.hxx | 7 +- opencascade/TopoDSToStep_FacetedTool.hxx | 26 +- .../TopoDSToStep_MakeBrepWithVoids.hxx | 37 +- opencascade/TopoDSToStep_MakeEdgeError.hxx | 7 +- opencascade/TopoDSToStep_MakeFaceError.hxx | 11 +- opencascade/TopoDSToStep_MakeFacetedBrep.hxx | 48 +- ...ToStep_MakeFacetedBrepAndBrepWithVoids.hxx | 37 +- .../TopoDSToStep_MakeGeometricCurveSet.hxx | 33 +- .../TopoDSToStep_MakeManifoldSolidBrep.hxx | 48 +- ...opoDSToStep_MakeShellBasedSurfaceModel.hxx | 58 +- opencascade/TopoDSToStep_MakeStepEdge.hxx | 50 +- opencascade/TopoDSToStep_MakeStepFace.hxx | 50 +- opencascade/TopoDSToStep_MakeStepVertex.hxx | 49 +- opencascade/TopoDSToStep_MakeStepWire.hxx | 49 +- .../TopoDSToStep_MakeTessellatedItem.hxx | 42 +- opencascade/TopoDSToStep_MakeVertexError.hxx | 5 +- opencascade/TopoDSToStep_MakeWireError.hxx | 7 +- opencascade/TopoDSToStep_Root.hxx | 27 +- opencascade/TopoDSToStep_Tool.hxx | 107 +- opencascade/TopoDSToStep_WireframeBuilder.hxx | 83 +- opencascade/TopoDS_AlertAttribute.hxx | 20 +- opencascade/TopoDS_AlertWithShape.hxx | 24 +- opencascade/TopoDS_Builder.hxx | 51 +- opencascade/TopoDS_Builder.lxx | 43 +- opencascade/TopoDS_CompSolid.hxx | 19 +- opencascade/TopoDS_Compound.hxx | 19 +- opencascade/TopoDS_Edge.hxx | 19 +- opencascade/TopoDS_Face.hxx | 19 +- opencascade/TopoDS_FrozenShape.hxx | 5 +- opencascade/TopoDS_HShape.hxx | 38 +- opencascade/TopoDS_HShape.lxx | 30 +- opencascade/TopoDS_Iterator.hxx | 34 +- .../TopoDS_ListIteratorOfListOfShape.hxx | 1 - opencascade/TopoDS_ListOfShape.hxx | 3 +- opencascade/TopoDS_LockedShape.hxx | 5 +- opencascade/TopoDS_Shape.hxx | 203 +- opencascade/TopoDS_Shell.hxx | 19 +- opencascade/TopoDS_Solid.hxx | 19 +- opencascade/TopoDS_TCompSolid.hxx | 39 +- opencascade/TopoDS_TCompSolid.lxx | 24 - opencascade/TopoDS_TCompound.hxx | 40 +- opencascade/TopoDS_TCompound.lxx | 25 - opencascade/TopoDS_TEdge.hxx | 33 +- opencascade/TopoDS_TEdge.lxx | 24 - opencascade/TopoDS_TFace.hxx | 39 +- opencascade/TopoDS_TFace.lxx | 24 - opencascade/TopoDS_TShape.hxx | 62 +- opencascade/TopoDS_TShell.hxx | 39 +- opencascade/TopoDS_TShell.lxx | 24 - opencascade/TopoDS_TSolid.hxx | 40 +- opencascade/TopoDS_TSolid.lxx | 25 - opencascade/TopoDS_TVertex.hxx | 39 +- opencascade/TopoDS_TVertex.lxx | 26 - opencascade/TopoDS_TWire.hxx | 39 +- opencascade/TopoDS_TWire.lxx | 24 - opencascade/TopoDS_UnCompatibleShapes.hxx | 5 +- opencascade/TopoDS_Vertex.hxx | 19 +- opencascade/TopoDS_Wire.hxx | 19 +- opencascade/TransferBRep.hxx | 110 +- opencascade/TransferBRep_BinderOfShape.hxx | 36 +- ...sferBRep_HSequenceOfTransferResultInfo.hxx | 4 +- opencascade/TransferBRep_Reader.hxx | 130 +- ...nsferBRep_SequenceOfTransferResultInfo.hxx | 4 +- opencascade/TransferBRep_ShapeBinder.hxx | 42 +- opencascade/TransferBRep_ShapeInfo.hxx | 30 +- opencascade/TransferBRep_ShapeListBinder.hxx | 70 +- opencascade/TransferBRep_ShapeMapper.hxx | 34 +- .../TransferBRep_TransferResultInfo.hxx | 43 +- .../TransferBRep_TransferResultInfo.lxx | 33 +- opencascade/Transfer_ActorDispatch.hxx | 48 +- opencascade/Transfer_ActorOfFinderProcess.hxx | 102 +- .../Transfer_ActorOfProcessForFinder.hxx | 59 +- .../Transfer_ActorOfProcessForTransient.hxx | 59 +- .../Transfer_ActorOfTransientProcess.hxx | 102 +- opencascade/Transfer_Binder.hxx | 64 +- .../Transfer_BinderOfTransientInteger.hxx | 28 +- opencascade/Transfer_DataInfo.hxx | 30 +- opencascade/Transfer_DispatchControl.hxx | 43 +- opencascade/Transfer_FindHasher.hxx | 7 +- opencascade/Transfer_Finder.hxx | 112 +- opencascade/Transfer_FinderProcess.hxx | 29 +- opencascade/Transfer_HSequenceOfBinder.hxx | 1 - opencascade/Transfer_HSequenceOfFinder.hxx | 1 - .../Transfer_IteratorOfProcessForFinder.hxx | 41 +- ...Transfer_IteratorOfProcessForTransient.hxx | 41 +- opencascade/Transfer_MapContainer.hxx | 29 +- opencascade/Transfer_MultipleBinder.hxx | 44 +- opencascade/Transfer_ProcessForFinder.hxx | 335 +- opencascade/Transfer_ProcessForTransient.hxx | 319 +- opencascade/Transfer_ResultFromModel.hxx | 100 +- opencascade/Transfer_ResultFromTransient.hxx | 75 +- opencascade/Transfer_SequenceOfBinder.hxx | 1 - opencascade/Transfer_SequenceOfFinder.hxx | 1 - .../Transfer_SimpleBinderOfTransient.hxx | 38 +- opencascade/Transfer_StatusExec.hxx | 10 +- opencascade/Transfer_StatusResult.hxx | 6 +- opencascade/Transfer_TransferDeadLoop.hxx | 5 +- opencascade/Transfer_TransferDispatch.hxx | 43 +- opencascade/Transfer_TransferFailure.hxx | 5 +- opencascade/Transfer_TransferInput.hxx | 52 +- opencascade/Transfer_TransferIterator.hxx | 74 +- ...Transfer_TransferMapOfProcessForFinder.hxx | 5 +- ...nsfer_TransferMapOfProcessForTransient.hxx | 3 +- opencascade/Transfer_TransferOutput.hxx | 75 +- opencascade/Transfer_TransientListBinder.hxx | 44 +- opencascade/Transfer_TransientMapper.hxx | 34 +- opencascade/Transfer_TransientProcess.hxx | 92 +- opencascade/Transfer_UndefMode.hxx | 8 +- opencascade/Transfer_VoidBinder.hxx | 26 +- opencascade/UTL.hxx | 80 +- opencascade/Units.hxx | 66 +- opencascade/UnitsAPI.hxx | 153 +- opencascade/UnitsAPI_SystemUnits.hxx | 6 +- opencascade/UnitsMethods.hxx | 20 +- opencascade/UnitsMethods_LengthUnit.hxx | 18 +- opencascade/Units_Dimensions.hxx | 115 +- opencascade/Units_Dimensions.lxx | 68 +- opencascade/Units_Explorer.hxx | 78 +- opencascade/Units_Lexicon.hxx | 36 +- opencascade/Units_Lexicon.lxx | 14 +- opencascade/Units_MathSentence.hxx | 24 +- opencascade/Units_Measurement.hxx | 124 +- opencascade/Units_NoSuchType.hxx | 5 +- opencascade/Units_NoSuchUnit.hxx | 5 +- opencascade/Units_Operators.hxx | 52 +- opencascade/Units_QtsSequence.hxx | 1 - opencascade/Units_QuantitiesSequence.hxx | 1 - opencascade/Units_Quantity.hxx | 49 +- opencascade/Units_Quantity.lxx | 28 +- opencascade/Units_Sentence.hxx | 46 +- opencascade/Units_Sentence.lxx | 31 +- opencascade/Units_ShiftedToken.hxx | 43 +- opencascade/Units_ShiftedUnit.hxx | 43 +- opencascade/Units_TksSequence.hxx | 1 - opencascade/Units_Token.hxx | 160 +- opencascade/Units_Token.lxx | 113 +- opencascade/Units_TokensSequence.hxx | 1 - opencascade/Units_Unit.hxx | 72 +- opencascade/Units_Unit.lxx | 24 +- opencascade/Units_UnitSentence.hxx | 35 +- opencascade/Units_UnitsDictionary.hxx | 37 +- opencascade/Units_UnitsDictionary.lxx | 58 +- opencascade/Units_UnitsLexicon.hxx | 23 +- opencascade/Units_UnitsLexicon.lxx | 6 +- opencascade/Units_UnitsSequence.hxx | 1 - opencascade/Units_UnitsSystem.hxx | 71 +- opencascade/Units_UtsSequence.hxx | 1 - opencascade/V3d.hxx | 132 +- opencascade/V3d_AmbientLight.hxx | 34 +- opencascade/V3d_BadValue.hxx | 5 +- opencascade/V3d_CircularGrid.hxx | 60 +- opencascade/V3d_DirectionalLight.hxx | 31 +- opencascade/V3d_ImageDumpOptions.hxx | 37 +- opencascade/V3d_Light.hxx | 6 +- opencascade/V3d_ListOfLight.hxx | 2 +- opencascade/V3d_ListOfView.hxx | 2 +- opencascade/V3d_Plane.hxx | 42 +- opencascade/V3d_PositionLight.hxx | 7 +- opencascade/V3d_PositionalLight.hxx | 20 +- opencascade/V3d_RectangularGrid.hxx | 68 +- opencascade/V3d_SpotLight.hxx | 33 +- opencascade/V3d_StereoDumpOptions.hxx | 3 +- opencascade/V3d_Trihedron.hxx | 101 +- opencascade/V3d_TypeOfAxe.hxx | 6 +- opencascade/V3d_TypeOfBackfacingModel.hxx | 3 +- opencascade/V3d_TypeOfLight.hxx | 3 +- opencascade/V3d_TypeOfOrientation.hxx | 49 +- opencascade/V3d_TypeOfShadingModel.hxx | 3 +- opencascade/V3d_TypeOfView.hxx | 4 +- opencascade/V3d_TypeOfVisualization.hxx | 4 +- opencascade/V3d_UnMapped.hxx | 5 +- opencascade/V3d_View.hxx | 788 +- opencascade/V3d_Viewer.hxx | 406 +- opencascade/Vrml.hxx | 11 +- opencascade/VrmlAPI.hxx | 10 +- opencascade/VrmlAPI_CafReader.hxx | 11 +- opencascade/VrmlAPI_RepresentationOfShape.hxx | 6 +- opencascade/VrmlAPI_Writer.hxx | 130 +- opencascade/VrmlConverter_Curve.hxx | 44 +- opencascade/VrmlConverter_DeflectionCurve.hxx | 66 +- opencascade/VrmlConverter_Drawer.hxx | 160 +- opencascade/VrmlConverter_HLRShape.hxx | 29 +- opencascade/VrmlConverter_IsoAspect.hxx | 34 +- opencascade/VrmlConverter_LineAspect.hxx | 41 +- opencascade/VrmlConverter_PointAspect.hxx | 41 +- opencascade/VrmlConverter_Projector.hxx | 53 +- opencascade/VrmlConverter_ShadedShape.hxx | 32 +- opencascade/VrmlConverter_ShadingAspect.hxx | 52 +- opencascade/VrmlConverter_TypeOfCamera.hxx | 7 +- opencascade/VrmlConverter_TypeOfLight.hxx | 9 +- ...mlConverter_WFDeflectionRestrictedFace.hxx | 32 +- .../VrmlConverter_WFDeflectionShape.hxx | 28 +- .../VrmlConverter_WFRestrictedFace.hxx | 43 +- opencascade/VrmlConverter_WFShape.hxx | 28 +- opencascade/VrmlData_Appearance.hxx | 66 +- opencascade/VrmlData_ArrayVec3d.hxx | 82 +- opencascade/VrmlData_Box.hxx | 65 +- opencascade/VrmlData_Color.hxx | 56 +- opencascade/VrmlData_Cone.hxx | 106 +- opencascade/VrmlData_Coordinate.hxx | 41 +- opencascade/VrmlData_Cylinder.hxx | 118 +- .../VrmlData_DataMapOfShapeAppearance.hxx | 3 +- opencascade/VrmlData_ErrorStatus.hxx | 45 +- opencascade/VrmlData_Faceted.hxx | 84 +- opencascade/VrmlData_Geometry.hxx | 44 +- opencascade/VrmlData_Group.hxx | 89 +- opencascade/VrmlData_ImageTexture.hxx | 45 +- opencascade/VrmlData_InBuffer.hxx | 21 +- opencascade/VrmlData_IndexedFaceSet.hxx | 270 +- opencascade/VrmlData_IndexedLineSet.hxx | 149 +- opencascade/VrmlData_ListOfNode.hxx | 2 +- opencascade/VrmlData_MapOfNode.hxx | 2 +- opencascade/VrmlData_Material.hxx | 116 +- opencascade/VrmlData_Node.hxx | 144 +- opencascade/VrmlData_Normal.hxx | 43 +- opencascade/VrmlData_Scene.hxx | 223 +- opencascade/VrmlData_ShapeConvert.hxx | 107 +- opencascade/VrmlData_ShapeNode.hxx | 61 +- opencascade/VrmlData_Sphere.hxx | 58 +- opencascade/VrmlData_Texture.hxx | 59 +- opencascade/VrmlData_TextureCoordinate.hxx | 65 +- opencascade/VrmlData_TextureTransform.hxx | 52 +- opencascade/VrmlData_UnknownNode.hxx | 38 +- opencascade/VrmlData_WorldInfo.hxx | 52 +- opencascade/Vrml_AsciiText.hxx | 57 +- opencascade/Vrml_AsciiTextJustification.hxx | 7 +- opencascade/Vrml_Cone.hxx | 48 +- opencascade/Vrml_ConeParts.hxx | 7 +- opencascade/Vrml_ConfigurationNode.hxx | 94 +- opencascade/Vrml_Coordinate3.hxx | 30 +- opencascade/Vrml_Cube.hxx | 44 +- opencascade/Vrml_Cylinder.hxx | 48 +- opencascade/Vrml_CylinderParts.hxx | 9 +- opencascade/Vrml_DirectionalLight.hxx | 57 +- opencascade/Vrml_FaceType.hxx | 5 +- opencascade/Vrml_FontStyle.hxx | 48 +- opencascade/Vrml_FontStyleFamily.hxx | 7 +- opencascade/Vrml_FontStyleStyle.hxx | 7 +- opencascade/Vrml_Group.hxx | 26 +- opencascade/Vrml_IndexedFaceSet.hxx | 50 +- opencascade/Vrml_IndexedLineSet.hxx | 50 +- opencascade/Vrml_Info.hxx | 30 +- opencascade/Vrml_Instancing.hxx | 30 +- opencascade/Vrml_LOD.hxx | 42 +- opencascade/Vrml_Material.hxx | 67 +- opencascade/Vrml_MaterialBinding.hxx | 32 +- .../Vrml_MaterialBindingAndNormalBinding.hxx | 17 +- opencascade/Vrml_MatrixTransform.hxx | 32 +- opencascade/Vrml_Normal.hxx | 30 +- opencascade/Vrml_NormalBinding.hxx | 32 +- opencascade/Vrml_OrthographicCamera.hxx | 57 +- opencascade/Vrml_PerspectiveCamera.hxx | 57 +- opencascade/Vrml_PointLight.hxx | 57 +- opencascade/Vrml_PointSet.hxx | 39 +- opencascade/Vrml_Provider.hxx | 120 +- opencascade/Vrml_Rotation.hxx | 32 +- opencascade/Vrml_SFImage.hxx | 59 +- opencascade/Vrml_SFImageNumber.hxx | 10 +- opencascade/Vrml_SFRotation.hxx | 49 +- opencascade/Vrml_Scale.hxx | 32 +- opencascade/Vrml_Separator.hxx | 34 +- opencascade/Vrml_SeparatorRenderCulling.hxx | 7 +- opencascade/Vrml_ShapeHints.hxx | 57 +- opencascade/Vrml_ShapeType.hxx | 5 +- opencascade/Vrml_Sphere.hxx | 30 +- opencascade/Vrml_SpotLight.hxx | 82 +- opencascade/Vrml_Switch.hxx | 30 +- opencascade/Vrml_Texture2.hxx | 57 +- opencascade/Vrml_Texture2Transform.hxx | 57 +- opencascade/Vrml_Texture2Wrap.hxx | 5 +- opencascade/Vrml_TextureCoordinate2.hxx | 30 +- opencascade/Vrml_Transform.hxx | 64 +- opencascade/Vrml_TransformSeparator.hxx | 26 +- opencascade/Vrml_Translation.hxx | 32 +- opencascade/Vrml_VertexOrdering.hxx | 7 +- opencascade/Vrml_WWWAnchor.hxx | 46 +- opencascade/Vrml_WWWAnchorMap.hxx | 5 +- opencascade/Vrml_WWWInline.hxx | 48 +- opencascade/WNT_ClassDefinitionError.hxx | 5 +- opencascade/WNT_Dword.hxx | 30 +- opencascade/WNT_HIDSpaceMouse.hxx | 77 +- opencascade/WNT_OrientationType.hxx | 4 +- opencascade/WNT_WClass.hxx | 30 +- opencascade/WNT_Window.hxx | 132 +- opencascade/Wasm_Window.hxx | 92 +- opencascade/XBRepMesh.hxx | 12 +- opencascade/XCAFApp_Application.hxx | 14 +- .../XCAFDimTolObjects_AngularQualifier.hxx | 9 +- ...FDimTolObjects_DataMapOfToleranceDatum.hxx | 4 +- .../XCAFDimTolObjects_DatumModifWithValue.hxx | 11 +- ...AFDimTolObjects_DatumModifiersSequence.hxx | 4 +- opencascade/XCAFDimTolObjects_DatumObject.hxx | 161 +- .../XCAFDimTolObjects_DatumObjectSequence.hxx | 5 +- .../XCAFDimTolObjects_DatumSingleModif.hxx | 45 +- .../XCAFDimTolObjects_DatumTargetType.hxx | 11 +- ...CAFDimTolObjects_DimensionFormVariance.hxx | 59 +- .../XCAFDimTolObjects_DimensionGrade.hxx | 40 +- .../XCAFDimTolObjects_DimensionModif.hxx | 49 +- ...mTolObjects_DimensionModifiersSequence.hxx | 5 +- .../XCAFDimTolObjects_DimensionObject.hxx | 232 +- ...FDimTolObjects_DimensionObjectSequence.hxx | 4 +- .../XCAFDimTolObjects_DimensionQualifier.hxx | 9 +- .../XCAFDimTolObjects_DimensionType.hxx | 65 +- ...DimTolObjects_GeomToleranceMatReqModif.hxx | 7 +- .../XCAFDimTolObjects_GeomToleranceModif.hxx | 34 +- ...Objects_GeomToleranceModifiersSequence.hxx | 3 +- .../XCAFDimTolObjects_GeomToleranceObject.hxx | 174 +- ...TolObjects_GeomToleranceObjectSequence.hxx | 4 +- .../XCAFDimTolObjects_GeomToleranceType.hxx | 32 +- ...AFDimTolObjects_GeomToleranceTypeValue.hxx | 6 +- ...AFDimTolObjects_GeomToleranceZoneModif.hxx | 8 +- opencascade/XCAFDimTolObjects_Tool.hxx | 47 +- opencascade/XCAFDoc.hxx | 36 +- opencascade/XCAFDoc_Area.hxx | 38 +- opencascade/XCAFDoc_AssemblyGraph.hxx | 100 +- opencascade/XCAFDoc_AssemblyItemId.hxx | 51 +- opencascade/XCAFDoc_AssemblyItemRef.hxx | 52 +- opencascade/XCAFDoc_AssemblyIterator.hxx | 16 +- opencascade/XCAFDoc_AssemblyTool.hxx | 19 +- opencascade/XCAFDoc_Centroid.hxx | 56 +- opencascade/XCAFDoc_ClippingPlaneTool.hxx | 63 +- opencascade/XCAFDoc_Color.hxx | 85 +- opencascade/XCAFDoc_ColorTool.hxx | 184 +- opencascade/XCAFDoc_ColorType.hxx | 6 +- ...c_DataMapIteratorOfDataMapOfShapeLabel.hxx | 1 - opencascade/XCAFDoc_DataMapOfShapeLabel.hxx | 7 +- opencascade/XCAFDoc_Datum.hxx | 53 +- opencascade/XCAFDoc_DimTol.hxx | 68 +- opencascade/XCAFDoc_DimTolTool.hxx | 257 +- opencascade/XCAFDoc_Dimension.hxx | 26 +- opencascade/XCAFDoc_DocumentTool.hxx | 86 +- opencascade/XCAFDoc_Editor.hxx | 97 +- opencascade/XCAFDoc_GeomTolerance.hxx | 26 +- opencascade/XCAFDoc_GraphNode.hxx | 124 +- opencascade/XCAFDoc_GraphNodeSequence.hxx | 1 - opencascade/XCAFDoc_LayerTool.hxx | 179 +- opencascade/XCAFDoc_LengthUnit.hxx | 35 +- opencascade/XCAFDoc_Location.hxx | 51 +- opencascade/XCAFDoc_Material.hxx | 70 +- opencascade/XCAFDoc_MaterialTool.hxx | 75 +- opencascade/XCAFDoc_Note.hxx | 13 +- opencascade/XCAFDoc_NoteBalloon.hxx | 19 +- opencascade/XCAFDoc_NoteBinData.hxx | 70 +- opencascade/XCAFDoc_NoteComment.hxx | 23 +- opencascade/XCAFDoc_NotesTool.hxx | 291 +- opencascade/XCAFDoc_ShapeMapTool.hxx | 54 +- opencascade/XCAFDoc_ShapeTool.hxx | 352 +- opencascade/XCAFDoc_View.hxx | 15 +- opencascade/XCAFDoc_ViewTool.hxx | 73 +- opencascade/XCAFDoc_VisMaterial.hxx | 118 +- opencascade/XCAFDoc_VisMaterialCommon.hxx | 67 +- opencascade/XCAFDoc_VisMaterialPBR.hxx | 65 +- opencascade/XCAFDoc_VisMaterialTool.hxx | 87 +- opencascade/XCAFDoc_Volume.hxx | 41 +- opencascade/XCAFNoteObjects_NoteObject.hxx | 23 +- opencascade/XCAFPrs.hxx | 18 +- opencascade/XCAFPrs_AISObject.hxx | 41 +- ...s_DataMapIteratorOfDataMapOfStyleShape.hxx | 1 - ...taMapIteratorOfDataMapOfStyleTransient.hxx | 1 - ...apIteratorOfIndexedDataMapOfShapeStyle.hxx | 1 - opencascade/XCAFPrs_DataMapOfStyleShape.hxx | 6 +- .../XCAFPrs_DataMapOfStyleTransient.hxx | 7 +- opencascade/XCAFPrs_DocumentExplorer.hxx | 112 +- opencascade/XCAFPrs_DocumentIdIterator.hxx | 14 +- opencascade/XCAFPrs_DocumentNode.hxx | 27 +- opencascade/XCAFPrs_Driver.hxx | 26 +- .../XCAFPrs_IndexedDataMapOfShapeStyle.hxx | 7 +- opencascade/XCAFPrs_Style.hxx | 107 +- opencascade/XCAFPrs_Texture.hxx | 12 +- opencascade/XCAFView_Object.hxx | 162 +- opencascade/XCAFView_ProjectionType.hxx | 7 +- opencascade/XSAlgo.hxx | 13 +- opencascade/XSAlgo_AlgoContainer.hxx | 102 +- opencascade/XSAlgo_AlgoContainer.lxx | 36 - opencascade/XSAlgo_Caller.hxx | 27 - opencascade/XSAlgo_ShapeProcessor.hxx | 206 + opencascade/XSAlgo_ToolContainer.hxx | 61 - opencascade/XSControl.hxx | 13 +- opencascade/XSControl_ConnectedShapes.hxx | 45 +- opencascade/XSControl_Controller.hxx | 179 +- opencascade/XSControl_FuncShape.hxx | 39 +- opencascade/XSControl_Functions.hxx | 5 +- opencascade/XSControl_Reader.hxx | 222 +- opencascade/XSControl_SelectForTransfer.hxx | 47 +- opencascade/XSControl_SignTransferStatus.hxx | 44 +- opencascade/XSControl_TransferReader.hxx | 251 +- opencascade/XSControl_TransferWriter.hxx | 87 +- opencascade/XSControl_Utils.hxx | 194 +- opencascade/XSControl_Vars.hxx | 55 +- opencascade/XSControl_WorkSession.hxx | 133 +- opencascade/XSControl_Writer.hxx | 64 +- opencascade/XmlDrivers.hxx | 11 +- .../XmlDrivers_DocumentRetrievalDriver.hxx | 28 +- .../XmlDrivers_DocumentStorageDriver.hxx | 21 +- opencascade/XmlLDrivers.hxx | 14 +- .../XmlLDrivers_DocumentRetrievalDriver.hxx | 79 +- .../XmlLDrivers_DocumentStorageDriver.hxx | 74 +- opencascade/XmlLDrivers_NamespaceDef.hxx | 32 +- .../XmlLDrivers_SequenceOfNamespaceDef.hxx | 1 - opencascade/XmlMDF.hxx | 72 +- opencascade/XmlMDF_ADriver.hxx | 40 +- opencascade/XmlMDF_ADriverTable.hxx | 34 +- .../XmlMDF_DataMapIteratorOfMapOfDriver.hxx | 1 - ...XmlMDF_DataMapIteratorOfTypeADriverMap.hxx | 1 - opencascade/XmlMDF_DerivedDriver.hxx | 41 +- opencascade/XmlMDF_MapOfDriver.hxx | 6 +- opencascade/XmlMDF_ReferenceDriver.hxx | 33 +- opencascade/XmlMDF_TagSourceDriver.hxx | 33 +- opencascade/XmlMDF_TypeADriverMap.hxx | 6 +- opencascade/XmlMDataStd.hxx | 8 +- opencascade/XmlMDataStd_AsciiStringDriver.hxx | 37 +- .../XmlMDataStd_BooleanArrayDriver.hxx | 34 +- opencascade/XmlMDataStd_BooleanListDriver.hxx | 34 +- opencascade/XmlMDataStd_ByteArrayDriver.hxx | 34 +- opencascade/XmlMDataStd_ExpressionDriver.hxx | 33 +- .../XmlMDataStd_ExtStringArrayDriver.hxx | 34 +- .../XmlMDataStd_ExtStringListDriver.hxx | 35 +- .../XmlMDataStd_GenericEmptyDriver.hxx | 34 +- .../XmlMDataStd_GenericExtStringDriver.hxx | 34 +- .../XmlMDataStd_IntPackedMapDriver.hxx | 37 +- .../XmlMDataStd_IntegerArrayDriver.hxx | 33 +- opencascade/XmlMDataStd_IntegerDriver.hxx | 33 +- opencascade/XmlMDataStd_IntegerListDriver.hxx | 34 +- opencascade/XmlMDataStd_NamedDataDriver.hxx | 34 +- opencascade/XmlMDataStd_RealArrayDriver.hxx | 33 +- opencascade/XmlMDataStd_RealDriver.hxx | 33 +- opencascade/XmlMDataStd_RealListDriver.hxx | 34 +- .../XmlMDataStd_ReferenceArrayDriver.hxx | 35 +- .../XmlMDataStd_ReferenceListDriver.hxx | 35 +- opencascade/XmlMDataStd_TreeNodeDriver.hxx | 33 +- opencascade/XmlMDataStd_UAttributeDriver.hxx | 33 +- opencascade/XmlMDataStd_VariableDriver.hxx | 33 +- opencascade/XmlMDataXtd.hxx | 14 +- opencascade/XmlMDataXtd_ConstraintDriver.hxx | 33 +- opencascade/XmlMDataXtd_GeometryDriver.hxx | 33 +- opencascade/XmlMDataXtd_PatternStdDriver.hxx | 33 +- opencascade/XmlMDataXtd_PositionDriver.hxx | 28 +- .../XmlMDataXtd_PresentationDriver.hxx | 27 +- .../XmlMDataXtd_TriangulationDriver.hxx | 16 +- opencascade/XmlMDocStd.hxx | 9 +- opencascade/XmlMDocStd_XLinkDriver.hxx | 33 +- opencascade/XmlMFunction.hxx | 9 +- opencascade/XmlMFunction_FunctionDriver.hxx | 33 +- opencascade/XmlMFunction_GraphNodeDriver.hxx | 33 +- opencascade/XmlMFunction_ScopeDriver.hxx | 33 +- opencascade/XmlMNaming.hxx | 9 +- opencascade/XmlMNaming_NamedShapeDriver.hxx | 52 +- opencascade/XmlMNaming_NamedShapeDriver.lxx | 5 +- opencascade/XmlMNaming_NamingDriver.hxx | 34 +- opencascade/XmlMNaming_Shape1.hxx | 48 +- opencascade/XmlMXCAFDoc.hxx | 8 +- .../XmlMXCAFDoc_AssemblyItemRefDriver.hxx | 12 +- opencascade/XmlMXCAFDoc_CentroidDriver.hxx | 33 +- opencascade/XmlMXCAFDoc_ColorDriver.hxx | 33 +- opencascade/XmlMXCAFDoc_DatumDriver.hxx | 33 +- opencascade/XmlMXCAFDoc_DimTolDriver.hxx | 33 +- opencascade/XmlMXCAFDoc_GraphNodeDriver.hxx | 33 +- opencascade/XmlMXCAFDoc_LengthUnitDriver.hxx | 23 +- opencascade/XmlMXCAFDoc_LocationDriver.hxx | 48 +- opencascade/XmlMXCAFDoc_LocationDriver.lxx | 11 +- opencascade/XmlMXCAFDoc_MaterialDriver.hxx | 33 +- opencascade/XmlMXCAFDoc_NoteBinDataDriver.hxx | 9 +- opencascade/XmlMXCAFDoc_NoteCommentDriver.hxx | 10 +- opencascade/XmlMXCAFDoc_NoteDriver.hxx | 17 +- opencascade/XmlMXCAFDoc_VisMaterialDriver.hxx | 17 +- .../XmlMXCAFDoc_VisMaterialToolDriver.hxx | 18 +- opencascade/XmlObjMgt.hxx | 65 +- opencascade/XmlObjMgt_Array1.hxx | 61 +- opencascade/XmlObjMgt_Array1.lxx | 24 +- opencascade/XmlObjMgt_DOMString.hxx | 11 +- opencascade/XmlObjMgt_GP.hxx | 38 +- opencascade/XmlObjMgt_Persistent.hxx | 56 +- opencascade/XmlObjMgt_Persistent.lxx | 20 +- opencascade/XmlObjMgt_RRelocationTable.hxx | 10 +- opencascade/XmlObjMgt_SRelocationTable.hxx | 9 +- opencascade/XmlTObjDrivers.hxx | 16 +- ...XmlTObjDrivers_DocumentRetrievalDriver.hxx | 20 +- .../XmlTObjDrivers_DocumentStorageDriver.hxx | 21 +- .../XmlTObjDrivers_IntSparseArrayDriver.hxx | 30 +- opencascade/XmlTObjDrivers_ModelDriver.hxx | 32 +- opencascade/XmlTObjDrivers_ObjectDriver.hxx | 31 +- .../XmlTObjDrivers_ReferenceDriver.hxx | 34 +- opencascade/XmlTObjDrivers_XYZDriver.hxx | 34 +- opencascade/XmlXCAFDrivers.hxx | 7 +- ...XmlXCAFDrivers_DocumentRetrievalDriver.hxx | 26 +- .../XmlXCAFDrivers_DocumentStorageDriver.hxx | 28 +- opencascade/Xw_Window.hxx | 75 +- opencascade/gce_ErrorType.hxx | 28 +- opencascade/gce_MakeCirc.hxx | 57 +- opencascade/gce_MakeCirc2d.hxx | 54 +- opencascade/gce_MakeCone.hxx | 57 +- opencascade/gce_MakeCylinder.hxx | 40 +- opencascade/gce_MakeDir.hxx | 40 +- opencascade/gce_MakeDir2d.hxx | 36 +- opencascade/gce_MakeElips.hxx | 36 +- opencascade/gce_MakeElips2d.hxx | 43 +- opencascade/gce_MakeHypr.hxx | 37 +- opencascade/gce_MakeHypr2d.hxx | 43 +- opencascade/gce_MakeLin.hxx | 35 +- opencascade/gce_MakeLin2d.hxx | 42 +- opencascade/gce_MakeMirror.hxx | 40 +- opencascade/gce_MakeMirror2d.hxx | 36 +- opencascade/gce_MakeParab.hxx | 31 +- opencascade/gce_MakeParab2d.hxx | 46 +- opencascade/gce_MakePln.hxx | 48 +- opencascade/gce_MakeRotation.hxx | 37 +- opencascade/gce_MakeRotation2d.hxx | 30 +- opencascade/gce_MakeScale.hxx | 30 +- opencascade/gce_MakeScale2d.hxx | 31 +- opencascade/gce_MakeTranslation.hxx | 31 +- opencascade/gce_MakeTranslation2d.hxx | 32 +- opencascade/gce_Root.hxx | 26 +- opencascade/gce_Root.lxx | 16 +- opencascade/gp.hxx | 4 +- opencascade/gp_Ax1.hxx | 109 +- opencascade/gp_Ax2.hxx | 186 +- opencascade/gp_Ax22d.hxx | 161 +- opencascade/gp_Ax2d.hxx | 100 +- opencascade/gp_Ax3.hxx | 192 +- opencascade/gp_Circ.hxx | 113 +- opencascade/gp_Circ2d.hxx | 173 +- opencascade/gp_Cone.hxx | 135 +- opencascade/gp_Cylinder.hxx | 106 +- opencascade/gp_Dir.hxx | 310 +- opencascade/gp_Dir2d.hxx | 226 +- opencascade/gp_Elips.hxx | 147 +- opencascade/gp_Elips2d.hxx | 177 +- opencascade/gp_GTrsf.hxx | 252 +- opencascade/gp_GTrsf2d.hxx | 146 +- opencascade/gp_Hypr.hxx | 229 +- opencascade/gp_Hypr2d.hxx | 255 +- opencascade/gp_Lin.hxx | 114 +- opencascade/gp_Lin2d.hxx | 126 +- opencascade/gp_Mat.hxx | 295 +- opencascade/gp_Mat2d.hxx | 209 +- opencascade/gp_Parab.hxx | 146 +- opencascade/gp_Parab2d.hxx | 149 +- opencascade/gp_Pln.hxx | 159 +- opencascade/gp_Pnt.hxx | 234 +- opencascade/gp_Pnt2d.hxx | 137 +- opencascade/gp_Quaternion.hxx | 227 +- opencascade/gp_QuaternionNLerp.hxx | 34 +- opencascade/gp_QuaternionSLerp.hxx | 46 +- opencascade/gp_Sphere.hxx | 122 +- opencascade/gp_Torus.hxx | 127 +- opencascade/gp_Trsf.hxx | 203 +- opencascade/gp_Trsf2d.hxx | 162 +- opencascade/gp_TrsfNLerp.hxx | 42 +- opencascade/gp_Vec.hxx | 297 +- opencascade/gp_Vec2d.hxx | 240 +- opencascade/gp_VectorWithNullMagnitude.hxx | 5 +- opencascade/gp_XY.hxx | 191 +- opencascade/gp_XYZ.hxx | 283 +- opencascade/igesread.h | 64 +- opencascade/math.hxx | 28 +- opencascade/math_Array1OfValueAndWeight.hxx | 1 - opencascade/math_BFGS.hxx | 88 +- opencascade/math_BFGS.lxx | 36 +- opencascade/math_BissecNewton.hxx | 58 +- opencascade/math_BissecNewton.lxx | 26 +- opencascade/math_BracketMinimum.hxx | 67 +- opencascade/math_BracketMinimum.lxx | 42 +- opencascade/math_BracketedRoot.hxx | 55 +- opencascade/math_BracketedRoot.lxx | 22 +- opencascade/math_BrentMinimum.hxx | 65 +- opencascade/math_BrentMinimum.lxx | 17 +- opencascade/math_BullardGenerator.hxx | 16 +- .../math_ComputeGaussPointsAndWeights.hxx | 33 +- .../math_ComputeKronrodPointsAndWeights.hxx | 33 +- opencascade/math_Crout.hxx | 51 +- opencascade/math_Crout.lxx | 21 +- opencascade/math_DirectPolynomialRoots.hxx | 81 +- opencascade/math_DirectPolynomialRoots.lxx | 27 +- opencascade/math_DoubleTab.hxx | 67 +- opencascade/math_DoubleTab.lxx | 12 +- opencascade/math_EigenValuesSearcher.hxx | 43 +- opencascade/math_FRPR.hxx | 76 +- opencascade/math_FRPR.lxx | 41 +- opencascade/math_Function.hxx | 12 +- opencascade/math_FunctionAllRoots.hxx | 71 +- opencascade/math_FunctionAllRoots.lxx | 45 +- opencascade/math_FunctionRoot.hxx | 68 +- opencascade/math_FunctionRoot.lxx | 24 +- opencascade/math_FunctionRoots.hxx | 61 +- opencascade/math_FunctionRoots.lxx | 25 +- opencascade/math_FunctionSample.hxx | 42 +- opencascade/math_FunctionSet.hxx | 33 +- opencascade/math_FunctionSetRoot.hxx | 98 +- .../math_FunctionSetWithDerivatives.hxx | 40 +- opencascade/math_FunctionWithDerivative.hxx | 37 +- opencascade/math_Gauss.hxx | 28 +- opencascade/math_GaussLeastSquare.hxx | 46 +- opencascade/math_GaussLeastSquare.lxx | 9 +- opencascade/math_GaussMultipleIntegration.hxx | 44 +- opencascade/math_GaussMultipleIntegration.lxx | 12 +- opencascade/math_GaussSetIntegration.hxx | 43 +- opencascade/math_GaussSetIntegration.lxx | 5 +- opencascade/math_GaussSingleIntegration.hxx | 58 +- opencascade/math_GaussSingleIntegration.lxx | 12 +- opencascade/math_GlobOptMin.hxx | 179 +- opencascade/math_Householder.hxx | 65 +- opencascade/math_Householder.lxx | 25 +- opencascade/math_IntegerVector.hxx | 1 - opencascade/math_Jacobi.hxx | 55 +- opencascade/math_Jacobi.lxx | 24 +- opencascade/math_KronrodSingleIntegration.hxx | 97 +- opencascade/math_KronrodSingleIntegration.lxx | 18 +- opencascade/math_Matrix.hxx | 219 +- opencascade/math_Matrix.lxx | 69 +- opencascade/math_MultipleVarFunction.hxx | 31 +- .../math_MultipleVarFunctionWithGradient.hxx | 38 +- .../math_MultipleVarFunctionWithHessian.hxx | 46 +- opencascade/math_NewtonFunctionRoot.hxx | 90 +- opencascade/math_NewtonFunctionRoot.lxx | 23 +- opencascade/math_NewtonFunctionSetRoot.hxx | 107 +- opencascade/math_NewtonFunctionSetRoot.lxx | 38 +- opencascade/math_NewtonMinimum.hxx | 106 +- opencascade/math_NewtonMinimum.lxx | 46 +- opencascade/math_NotSquare.hxx | 5 +- opencascade/math_PSO.hxx | 53 +- opencascade/math_PSOParticlesPool.hxx | 23 +- opencascade/math_Powell.hxx | 68 +- opencascade/math_Powell.lxx | 25 +- opencascade/math_Recipes.hxx | 134 +- opencascade/math_SVD.hxx | 47 +- opencascade/math_SVD.lxx | 8 +- opencascade/math_SingularMatrix.hxx | 5 +- opencascade/math_Status.hxx | 11 +- .../math_TrigonometricEquationFunction.hxx | 40 +- .../math_TrigonometricFunctionRoots.hxx | 80 +- .../math_TrigonometricFunctionRoots.lxx | 22 +- opencascade/math_Uzawa.hxx | 92 +- opencascade/math_Uzawa.lxx | 25 +- opencascade/math_ValueAndWeight.hxx | 29 +- opencascade/math_VectorBase.hxx | 118 +- opencascade/math_VectorBase.lxx | 272 +- opencascade/step.tab.hxx | 1179 +- 7971 files changed, 209403 insertions(+), 324629 deletions(-) delete mode 100644 opencascade/AppBlend_AppSurf.gxx delete mode 100644 opencascade/AppParCurves_BSpFunction.gxx delete mode 100644 opencascade/AppParCurves_BSpGradient.gxx delete mode 100644 opencascade/AppParCurves_BSpGradient_BFGS.gxx delete mode 100644 opencascade/AppParCurves_Function.gxx delete mode 100644 opencascade/AppParCurves_Gradient.gxx delete mode 100644 opencascade/AppParCurves_Gradient_BFGS.gxx delete mode 100644 opencascade/AppParCurves_LeastSquare.gxx delete mode 100644 opencascade/AppParCurves_ResolConstraint.gxx delete mode 100644 opencascade/ApproxInt_Approx.gxx delete mode 100644 opencascade/ApproxInt_ImpPrmSvSurfaces.gxx delete mode 100644 opencascade/ApproxInt_MultiLine.gxx delete mode 100644 opencascade/ApproxInt_PrmPrmSvSurfaces.gxx delete mode 100644 opencascade/Approx_BSplComputeLine.gxx delete mode 100644 opencascade/Approx_ComputeCLine.gxx delete mode 100644 opencascade/Approx_ComputeLine.gxx delete mode 100644 opencascade/BSplCLib_CurveComputation.gxx rename opencascade/{IFSelect_FileModifier.gxx => BVH_Builder3d.hxx} (74%) delete mode 100644 opencascade/Blend_CSWalking.gxx delete mode 100644 opencascade/Blend_CSWalking.lxx delete mode 100644 opencascade/Blend_CSWalking_1.gxx delete mode 100644 opencascade/Blend_CSWalking_2.gxx delete mode 100644 opencascade/Blend_CSWalking_3.gxx delete mode 100644 opencascade/Blend_CSWalking_4.gxx delete mode 100644 opencascade/Blend_Walking.gxx delete mode 100644 opencascade/Blend_Walking.lxx delete mode 100644 opencascade/Blend_Walking_1.gxx delete mode 100644 opencascade/Blend_Walking_2.gxx delete mode 100644 opencascade/Blend_Walking_3.gxx delete mode 100644 opencascade/Blend_Walking_4.gxx delete mode 100644 opencascade/Bnd_B2x.gxx delete mode 100644 opencascade/Bnd_B3x.gxx create mode 100644 opencascade/DEBREP_ConfigurationNode.hxx create mode 100644 opencascade/DEBREP_Provider.hxx create mode 100644 opencascade/DEGLTF_ConfigurationNode.hxx create mode 100644 opencascade/DEGLTF_Provider.hxx create mode 100644 opencascade/DEIGES_ConfigurationNode.hxx create mode 100644 opencascade/DEIGES_Parameters.hxx create mode 100644 opencascade/DEIGES_Provider.hxx create mode 100644 opencascade/DEOBJ_ConfigurationNode.hxx create mode 100644 opencascade/DEOBJ_Provider.hxx create mode 100644 opencascade/DEPLY_ConfigurationNode.hxx create mode 100644 opencascade/DEPLY_Provider.hxx create mode 100644 opencascade/DESTEP_ConfigurationNode.hxx create mode 100644 opencascade/DESTEP_Parameters.hxx create mode 100644 opencascade/DESTEP_Provider.hxx create mode 100644 opencascade/DESTL_ConfigurationNode.hxx create mode 100644 opencascade/DESTL_Provider.hxx create mode 100644 opencascade/DEVRML_ConfigurationNode.hxx create mode 100644 opencascade/DEVRML_Provider.hxx create mode 100644 opencascade/DEXCAF_ConfigurationNode.hxx create mode 100644 opencascade/DEXCAF_Provider.hxx create mode 100644 opencascade/DE_ShapeFixConfigurationNode.hxx create mode 100644 opencascade/DE_ShapeFixParameters.hxx delete mode 100644 opencascade/Extrema_CurveLocator.gxx delete mode 100644 opencascade/Extrema_FuncExtCC.gxx delete mode 100644 opencascade/Extrema_FuncExtPC.gxx delete mode 100644 opencascade/Extrema_GExtPC.gxx delete mode 100644 opencascade/Extrema_GLocateExtPC.gxx delete mode 100644 opencascade/Extrema_GenExtCC.gxx delete mode 100644 opencascade/Extrema_GenExtPC.gxx delete mode 100644 opencascade/Extrema_GenLocateExtCC.gxx delete mode 100644 opencascade/Extrema_GenLocateExtPC.gxx delete mode 100644 opencascade/Extrema_Point.gxx delete mode 100644 opencascade/IFSelect_ModelModifier.gxx delete mode 100644 opencascade/IntCurveSurface_HCurveTool.gxx delete mode 100644 opencascade/IntCurveSurface_HCurveTool.lxx delete mode 100644 opencascade/IntCurveSurface_Inter.gxx delete mode 100644 opencascade/IntCurveSurface_Polygon.gxx delete mode 100644 opencascade/IntCurveSurface_PolygonTool.gxx delete mode 100644 opencascade/IntCurveSurface_Polyhedron.gxx delete mode 100644 opencascade/IntCurveSurface_PolyhedronTool.gxx delete mode 100644 opencascade/IntCurveSurface_QuadricCurveExactInter.gxx delete mode 100644 opencascade/IntCurveSurface_QuadricCurveFunc.gxx delete mode 100644 opencascade/IntCurve_DistBetweenPCurvesGen.gxx delete mode 100644 opencascade/IntCurve_ExactIntersectionPoint.gxx delete mode 100644 opencascade/IntCurve_IntConicCurveGen.gxx delete mode 100644 opencascade/IntCurve_IntCurveCurveGen.gxx delete mode 100644 opencascade/IntCurve_IntPolyPolyGen.gxx delete mode 100644 opencascade/IntCurve_Polygon2dGen.gxx delete mode 100644 opencascade/IntCurve_ProjPCurGen.gxx delete mode 100644 opencascade/IntCurve_UserIntConicCurveGen.gxx delete mode 100644 opencascade/IntImpParGen_ImpParTool.gxx delete mode 100644 opencascade/IntImpParGen_Intersector.gxx delete mode 100644 opencascade/IntImp_Int2S.gxx delete mode 100644 opencascade/IntImp_IntCS.gxx delete mode 100644 opencascade/IntImp_ZerCSParFunc.gxx delete mode 100644 opencascade/IntImp_ZerImpFunc.gxx delete mode 100644 opencascade/IntImp_ZerParFunc.gxx delete mode 100644 opencascade/IntPatch_ImpImpIntersection_0.gxx delete mode 100644 opencascade/IntPatch_ImpImpIntersection_1.gxx delete mode 100644 opencascade/IntPatch_ImpImpIntersection_2.gxx delete mode 100644 opencascade/IntPatch_ImpImpIntersection_3.gxx delete mode 100644 opencascade/IntPatch_ImpImpIntersection_4.gxx delete mode 100644 opencascade/IntPatch_ImpImpIntersection_5.gxx delete mode 100644 opencascade/IntPatch_ImpImpIntersection_6.gxx delete mode 100644 opencascade/IntStart_PathPoint.gxx delete mode 100644 opencascade/IntStart_SearchInside.gxx delete mode 100644 opencascade/IntStart_SearchOnBoundaries.gxx delete mode 100644 opencascade/IntStart_Segment.gxx delete mode 100644 opencascade/IntWalk_IWLine.gxx delete mode 100644 opencascade/IntWalk_IWalking.gxx delete mode 100644 opencascade/IntWalk_IWalking_1.gxx delete mode 100644 opencascade/IntWalk_IWalking_2.gxx delete mode 100644 opencascade/IntWalk_IWalking_3.gxx delete mode 100644 opencascade/IntWalk_IWalking_4.gxx delete mode 100644 opencascade/IntWalk_IWalking_5.gxx delete mode 100644 opencascade/IntWalk_IWalking_6.gxx delete mode 100644 opencascade/Interface_JaggedArray.gxx delete mode 100644 opencascade/Interface_Recognizer.gxx delete mode 100644 opencascade/Intf_InterferencePolygonPolyhedron.gxx delete mode 100644 opencascade/LProp_CLProps.gxx delete mode 100644 opencascade/LProp_SLProps.gxx delete mode 100644 opencascade/LibCtl_GlobalNode.gxx delete mode 100644 opencascade/LibCtl_Library.gxx delete mode 100644 opencascade/LibCtl_Node.gxx delete mode 100644 opencascade/MAT_TList.gxx delete mode 100644 opencascade/MAT_TListNode.gxx delete mode 100644 opencascade/MeshVS_MeshPrsBuilder.lxx create mode 100644 opencascade/NCollection_MapAlgo.hxx create mode 100644 opencascade/NCollection_Primes.hxx create mode 100644 opencascade/RWMesh_EdgeIterator.hxx create mode 100644 opencascade/RWMesh_ShapeIterator.hxx create mode 100644 opencascade/RWMesh_VertexIterator.hxx delete mode 100644 opencascade/RWStepAP203_RWCcDesignApproval.hxx delete mode 100644 opencascade/RWStepAP203_RWCcDesignCertification.hxx delete mode 100644 opencascade/RWStepAP203_RWCcDesignContract.hxx delete mode 100644 opencascade/RWStepAP203_RWCcDesignDateAndTimeAssignment.hxx delete mode 100644 opencascade/RWStepAP203_RWCcDesignPersonAndOrganizationAssignment.hxx delete mode 100644 opencascade/RWStepAP203_RWCcDesignSecurityClassification.hxx delete mode 100644 opencascade/RWStepAP203_RWCcDesignSpecificationReference.hxx delete mode 100644 opencascade/RWStepAP203_RWChange.hxx delete mode 100644 opencascade/RWStepAP203_RWChangeRequest.hxx delete mode 100644 opencascade/RWStepAP203_RWStartRequest.hxx delete mode 100644 opencascade/RWStepAP203_RWStartWork.hxx delete mode 100644 opencascade/RWStepAP214.hxx delete mode 100644 opencascade/RWStepAP214_GeneralModule.hxx delete mode 100644 opencascade/RWStepAP214_RWAppliedApprovalAssignment.hxx delete mode 100644 opencascade/RWStepAP214_RWAppliedDateAndTimeAssignment.hxx delete mode 100644 opencascade/RWStepAP214_RWAppliedDateAssignment.hxx delete mode 100644 opencascade/RWStepAP214_RWAppliedDocumentReference.hxx delete mode 100644 opencascade/RWStepAP214_RWAppliedExternalIdentificationAssignment.hxx delete mode 100644 opencascade/RWStepAP214_RWAppliedGroupAssignment.hxx delete mode 100644 opencascade/RWStepAP214_RWAppliedOrganizationAssignment.hxx delete mode 100644 opencascade/RWStepAP214_RWAppliedPersonAndOrganizationAssignment.hxx delete mode 100644 opencascade/RWStepAP214_RWAppliedPresentedItem.hxx delete mode 100644 opencascade/RWStepAP214_RWAppliedSecurityClassificationAssignment.hxx delete mode 100644 opencascade/RWStepAP214_RWAutoDesignActualDateAndTimeAssignment.hxx delete mode 100644 opencascade/RWStepAP214_RWAutoDesignActualDateAssignment.hxx delete mode 100644 opencascade/RWStepAP214_RWAutoDesignApprovalAssignment.hxx delete mode 100644 opencascade/RWStepAP214_RWAutoDesignDateAndPersonAssignment.hxx delete mode 100644 opencascade/RWStepAP214_RWAutoDesignDocumentReference.hxx delete mode 100644 opencascade/RWStepAP214_RWAutoDesignGroupAssignment.hxx delete mode 100644 opencascade/RWStepAP214_RWAutoDesignNominalDateAndTimeAssignment.hxx delete mode 100644 opencascade/RWStepAP214_RWAutoDesignNominalDateAssignment.hxx delete mode 100644 opencascade/RWStepAP214_RWAutoDesignOrganizationAssignment.hxx delete mode 100644 opencascade/RWStepAP214_RWAutoDesignPersonAndOrganizationAssignment.hxx delete mode 100644 opencascade/RWStepAP214_RWAutoDesignPresentedItem.hxx delete mode 100644 opencascade/RWStepAP214_RWAutoDesignSecurityClassificationAssignment.hxx delete mode 100644 opencascade/RWStepAP214_RWClass.hxx delete mode 100644 opencascade/RWStepAP214_RWExternallyDefinedClass.hxx delete mode 100644 opencascade/RWStepAP214_RWExternallyDefinedGeneralProperty.hxx delete mode 100644 opencascade/RWStepAP214_RWRepItemGroup.hxx delete mode 100644 opencascade/RWStepAP214_ReadWriteModule.hxx delete mode 100644 opencascade/RWStepAP242_RWDraughtingModelItemAssociation.hxx delete mode 100644 opencascade/RWStepAP242_RWGeometricItemSpecificUsage.hxx delete mode 100644 opencascade/RWStepAP242_RWIdAttribute.hxx delete mode 100644 opencascade/RWStepAP242_RWItemIdentifiedRepresentationUsage.hxx delete mode 100644 opencascade/RWStepBasic_RWAction.hxx delete mode 100644 opencascade/RWStepBasic_RWActionAssignment.hxx delete mode 100644 opencascade/RWStepBasic_RWActionMethod.hxx delete mode 100644 opencascade/RWStepBasic_RWActionRequestAssignment.hxx delete mode 100644 opencascade/RWStepBasic_RWActionRequestSolution.hxx delete mode 100644 opencascade/RWStepBasic_RWAddress.hxx delete mode 100644 opencascade/RWStepBasic_RWApplicationContext.hxx delete mode 100644 opencascade/RWStepBasic_RWApplicationContextElement.hxx delete mode 100644 opencascade/RWStepBasic_RWApplicationProtocolDefinition.hxx delete mode 100644 opencascade/RWStepBasic_RWApproval.hxx delete mode 100644 opencascade/RWStepBasic_RWApprovalDateTime.hxx delete mode 100644 opencascade/RWStepBasic_RWApprovalPersonOrganization.hxx delete mode 100644 opencascade/RWStepBasic_RWApprovalRelationship.hxx delete mode 100644 opencascade/RWStepBasic_RWApprovalRole.hxx delete mode 100644 opencascade/RWStepBasic_RWApprovalStatus.hxx delete mode 100644 opencascade/RWStepBasic_RWCalendarDate.hxx delete mode 100644 opencascade/RWStepBasic_RWCertification.hxx delete mode 100644 opencascade/RWStepBasic_RWCertificationAssignment.hxx delete mode 100644 opencascade/RWStepBasic_RWCertificationType.hxx delete mode 100644 opencascade/RWStepBasic_RWCharacterizedObject.hxx delete mode 100644 opencascade/RWStepBasic_RWContract.hxx delete mode 100644 opencascade/RWStepBasic_RWContractAssignment.hxx delete mode 100644 opencascade/RWStepBasic_RWContractType.hxx delete mode 100644 opencascade/RWStepBasic_RWConversionBasedUnit.hxx delete mode 100644 opencascade/RWStepBasic_RWConversionBasedUnitAndAreaUnit.hxx delete mode 100644 opencascade/RWStepBasic_RWConversionBasedUnitAndLengthUnit.hxx delete mode 100644 opencascade/RWStepBasic_RWConversionBasedUnitAndMassUnit.hxx delete mode 100644 opencascade/RWStepBasic_RWConversionBasedUnitAndPlaneAngleUnit.hxx delete mode 100644 opencascade/RWStepBasic_RWConversionBasedUnitAndRatioUnit.hxx delete mode 100644 opencascade/RWStepBasic_RWConversionBasedUnitAndSolidAngleUnit.hxx delete mode 100644 opencascade/RWStepBasic_RWConversionBasedUnitAndTimeUnit.hxx delete mode 100644 opencascade/RWStepBasic_RWConversionBasedUnitAndVolumeUnit.hxx delete mode 100644 opencascade/RWStepBasic_RWCoordinatedUniversalTimeOffset.hxx delete mode 100644 opencascade/RWStepBasic_RWDate.hxx delete mode 100644 opencascade/RWStepBasic_RWDateAndTime.hxx delete mode 100644 opencascade/RWStepBasic_RWDateRole.hxx delete mode 100644 opencascade/RWStepBasic_RWDateTimeRole.hxx delete mode 100644 opencascade/RWStepBasic_RWDerivedUnit.hxx delete mode 100644 opencascade/RWStepBasic_RWDerivedUnitElement.hxx delete mode 100644 opencascade/RWStepBasic_RWDimensionalExponents.hxx delete mode 100644 opencascade/RWStepBasic_RWDocument.hxx delete mode 100644 opencascade/RWStepBasic_RWDocumentFile.hxx delete mode 100644 opencascade/RWStepBasic_RWDocumentProductAssociation.hxx delete mode 100644 opencascade/RWStepBasic_RWDocumentProductEquivalence.hxx delete mode 100644 opencascade/RWStepBasic_RWDocumentRelationship.hxx delete mode 100644 opencascade/RWStepBasic_RWDocumentRepresentationType.hxx delete mode 100644 opencascade/RWStepBasic_RWDocumentType.hxx delete mode 100644 opencascade/RWStepBasic_RWDocumentUsageConstraint.hxx delete mode 100644 opencascade/RWStepBasic_RWEffectivity.hxx delete mode 100644 opencascade/RWStepBasic_RWEffectivityAssignment.hxx delete mode 100644 opencascade/RWStepBasic_RWEulerAngles.hxx delete mode 100644 opencascade/RWStepBasic_RWExternalIdentificationAssignment.hxx delete mode 100644 opencascade/RWStepBasic_RWExternalSource.hxx delete mode 100644 opencascade/RWStepBasic_RWExternallyDefinedItem.hxx delete mode 100644 opencascade/RWStepBasic_RWGeneralProperty.hxx delete mode 100644 opencascade/RWStepBasic_RWGroup.hxx delete mode 100644 opencascade/RWStepBasic_RWGroupAssignment.hxx delete mode 100644 opencascade/RWStepBasic_RWGroupRelationship.hxx delete mode 100644 opencascade/RWStepBasic_RWIdentificationAssignment.hxx delete mode 100644 opencascade/RWStepBasic_RWIdentificationRole.hxx delete mode 100644 opencascade/RWStepBasic_RWLengthMeasureWithUnit.hxx delete mode 100644 opencascade/RWStepBasic_RWLengthUnit.hxx delete mode 100644 opencascade/RWStepBasic_RWLocalTime.hxx delete mode 100644 opencascade/RWStepBasic_RWMassMeasureWithUnit.hxx delete mode 100644 opencascade/RWStepBasic_RWMassUnit.hxx delete mode 100644 opencascade/RWStepBasic_RWMeasureWithUnit.hxx delete mode 100644 opencascade/RWStepBasic_RWMechanicalContext.hxx delete mode 100644 opencascade/RWStepBasic_RWNameAssignment.hxx delete mode 100644 opencascade/RWStepBasic_RWNamedUnit.hxx delete mode 100644 opencascade/RWStepBasic_RWObjectRole.hxx delete mode 100644 opencascade/RWStepBasic_RWOrdinalDate.hxx delete mode 100644 opencascade/RWStepBasic_RWOrganization.hxx delete mode 100644 opencascade/RWStepBasic_RWOrganizationRole.hxx delete mode 100644 opencascade/RWStepBasic_RWOrganizationalAddress.hxx delete mode 100644 opencascade/RWStepBasic_RWPerson.hxx delete mode 100644 opencascade/RWStepBasic_RWPersonAndOrganization.hxx delete mode 100644 opencascade/RWStepBasic_RWPersonAndOrganizationRole.hxx delete mode 100644 opencascade/RWStepBasic_RWPersonalAddress.hxx delete mode 100644 opencascade/RWStepBasic_RWPlaneAngleMeasureWithUnit.hxx delete mode 100644 opencascade/RWStepBasic_RWPlaneAngleUnit.hxx delete mode 100644 opencascade/RWStepBasic_RWProduct.hxx delete mode 100644 opencascade/RWStepBasic_RWProductCategory.hxx delete mode 100644 opencascade/RWStepBasic_RWProductCategoryRelationship.hxx delete mode 100644 opencascade/RWStepBasic_RWProductConceptContext.hxx delete mode 100644 opencascade/RWStepBasic_RWProductContext.hxx delete mode 100644 opencascade/RWStepBasic_RWProductDefinition.hxx delete mode 100644 opencascade/RWStepBasic_RWProductDefinitionContext.hxx delete mode 100644 opencascade/RWStepBasic_RWProductDefinitionEffectivity.hxx delete mode 100644 opencascade/RWStepBasic_RWProductDefinitionFormation.hxx delete mode 100644 opencascade/RWStepBasic_RWProductDefinitionFormationRelationship.hxx delete mode 100644 opencascade/RWStepBasic_RWProductDefinitionFormationWithSpecifiedSource.hxx delete mode 100644 opencascade/RWStepBasic_RWProductDefinitionReference.hxx delete mode 100644 opencascade/RWStepBasic_RWProductDefinitionReferenceWithLocalRepresentation.hxx delete mode 100644 opencascade/RWStepBasic_RWProductDefinitionRelationship.hxx delete mode 100644 opencascade/RWStepBasic_RWProductDefinitionWithAssociatedDocuments.hxx delete mode 100644 opencascade/RWStepBasic_RWProductRelatedProductCategory.hxx delete mode 100644 opencascade/RWStepBasic_RWProductType.hxx delete mode 100644 opencascade/RWStepBasic_RWRatioMeasureWithUnit.hxx delete mode 100644 opencascade/RWStepBasic_RWRoleAssociation.hxx delete mode 100644 opencascade/RWStepBasic_RWSecurityClassification.hxx delete mode 100644 opencascade/RWStepBasic_RWSecurityClassificationLevel.hxx delete mode 100644 opencascade/RWStepBasic_RWSiUnit.hxx delete mode 100644 opencascade/RWStepBasic_RWSiUnitAndAreaUnit.hxx delete mode 100644 opencascade/RWStepBasic_RWSiUnitAndLengthUnit.hxx delete mode 100644 opencascade/RWStepBasic_RWSiUnitAndMassUnit.hxx delete mode 100644 opencascade/RWStepBasic_RWSiUnitAndPlaneAngleUnit.hxx delete mode 100644 opencascade/RWStepBasic_RWSiUnitAndRatioUnit.hxx delete mode 100644 opencascade/RWStepBasic_RWSiUnitAndSolidAngleUnit.hxx delete mode 100644 opencascade/RWStepBasic_RWSiUnitAndThermodynamicTemperatureUnit.hxx delete mode 100644 opencascade/RWStepBasic_RWSiUnitAndTimeUnit.hxx delete mode 100644 opencascade/RWStepBasic_RWSiUnitAndVolumeUnit.hxx delete mode 100644 opencascade/RWStepBasic_RWSolidAngleMeasureWithUnit.hxx delete mode 100644 opencascade/RWStepBasic_RWSolidAngleUnit.hxx delete mode 100644 opencascade/RWStepBasic_RWThermodynamicTemperatureUnit.hxx delete mode 100644 opencascade/RWStepBasic_RWUncertaintyMeasureWithUnit.hxx delete mode 100644 opencascade/RWStepBasic_RWVersionedActionRequest.hxx delete mode 100644 opencascade/RWStepBasic_RWWeekOfYearAndDayDate.hxx delete mode 100644 opencascade/RWStepDimTol_RWAngularityTolerance.hxx delete mode 100644 opencascade/RWStepDimTol_RWCircularRunoutTolerance.hxx delete mode 100644 opencascade/RWStepDimTol_RWCoaxialityTolerance.hxx delete mode 100644 opencascade/RWStepDimTol_RWCommonDatum.hxx delete mode 100644 opencascade/RWStepDimTol_RWConcentricityTolerance.hxx delete mode 100644 opencascade/RWStepDimTol_RWCylindricityTolerance.hxx delete mode 100644 opencascade/RWStepDimTol_RWDatum.hxx delete mode 100644 opencascade/RWStepDimTol_RWDatumFeature.hxx delete mode 100644 opencascade/RWStepDimTol_RWDatumReference.hxx delete mode 100644 opencascade/RWStepDimTol_RWDatumReferenceCompartment.hxx delete mode 100644 opencascade/RWStepDimTol_RWDatumReferenceElement.hxx delete mode 100644 opencascade/RWStepDimTol_RWDatumReferenceModifierWithValue.hxx delete mode 100644 opencascade/RWStepDimTol_RWDatumSystem.hxx delete mode 100644 opencascade/RWStepDimTol_RWDatumTarget.hxx delete mode 100644 opencascade/RWStepDimTol_RWFlatnessTolerance.hxx delete mode 100644 opencascade/RWStepDimTol_RWGeneralDatumReference.hxx delete mode 100644 opencascade/RWStepDimTol_RWGeoTolAndGeoTolWthDatRef.hxx delete mode 100644 opencascade/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol.hxx delete mode 100644 opencascade/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndGeoTolWthMod.hxx delete mode 100644 opencascade/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol.hxx delete mode 100644 opencascade/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndUneqDisGeoTol.hxx delete mode 100644 opencascade/RWStepDimTol_RWGeoTolAndGeoTolWthMaxTol.hxx delete mode 100644 opencascade/RWStepDimTol_RWGeoTolAndGeoTolWthMod.hxx delete mode 100644 opencascade/RWStepDimTol_RWGeometricTolerance.hxx delete mode 100644 opencascade/RWStepDimTol_RWGeometricToleranceRelationship.hxx delete mode 100644 opencascade/RWStepDimTol_RWGeometricToleranceWithDatumReference.hxx delete mode 100644 opencascade/RWStepDimTol_RWGeometricToleranceWithDefinedAreaUnit.hxx delete mode 100644 opencascade/RWStepDimTol_RWGeometricToleranceWithDefinedUnit.hxx delete mode 100644 opencascade/RWStepDimTol_RWGeometricToleranceWithMaximumTolerance.hxx delete mode 100644 opencascade/RWStepDimTol_RWGeometricToleranceWithModifiers.hxx delete mode 100644 opencascade/RWStepDimTol_RWLineProfileTolerance.hxx delete mode 100644 opencascade/RWStepDimTol_RWModifiedGeometricTolerance.hxx delete mode 100644 opencascade/RWStepDimTol_RWNonUniformZoneDefinition.hxx delete mode 100644 opencascade/RWStepDimTol_RWParallelismTolerance.hxx delete mode 100644 opencascade/RWStepDimTol_RWPerpendicularityTolerance.hxx delete mode 100644 opencascade/RWStepDimTol_RWPlacedDatumTargetFeature.hxx delete mode 100644 opencascade/RWStepDimTol_RWPositionTolerance.hxx delete mode 100644 opencascade/RWStepDimTol_RWProjectedZoneDefinition.hxx delete mode 100644 opencascade/RWStepDimTol_RWRoundnessTolerance.hxx delete mode 100644 opencascade/RWStepDimTol_RWRunoutZoneDefinition.hxx delete mode 100644 opencascade/RWStepDimTol_RWRunoutZoneOrientation.hxx delete mode 100644 opencascade/RWStepDimTol_RWStraightnessTolerance.hxx delete mode 100644 opencascade/RWStepDimTol_RWSurfaceProfileTolerance.hxx delete mode 100644 opencascade/RWStepDimTol_RWSymmetryTolerance.hxx delete mode 100644 opencascade/RWStepDimTol_RWToleranceZone.hxx delete mode 100644 opencascade/RWStepDimTol_RWToleranceZoneDefinition.hxx delete mode 100644 opencascade/RWStepDimTol_RWToleranceZoneForm.hxx delete mode 100644 opencascade/RWStepDimTol_RWTotalRunoutTolerance.hxx delete mode 100644 opencascade/RWStepDimTol_RWUnequallyDisposedGeometricTolerance.hxx delete mode 100644 opencascade/RWStepElement_RWAnalysisItemWithinRepresentation.hxx delete mode 100644 opencascade/RWStepElement_RWCurve3dElementDescriptor.hxx delete mode 100644 opencascade/RWStepElement_RWCurveElementEndReleasePacket.hxx delete mode 100644 opencascade/RWStepElement_RWCurveElementSectionDefinition.hxx delete mode 100644 opencascade/RWStepElement_RWCurveElementSectionDerivedDefinitions.hxx delete mode 100644 opencascade/RWStepElement_RWElementDescriptor.hxx delete mode 100644 opencascade/RWStepElement_RWElementMaterial.hxx delete mode 100644 opencascade/RWStepElement_RWSurface3dElementDescriptor.hxx delete mode 100644 opencascade/RWStepElement_RWSurfaceElementProperty.hxx delete mode 100644 opencascade/RWStepElement_RWSurfaceSection.hxx delete mode 100644 opencascade/RWStepElement_RWSurfaceSectionField.hxx delete mode 100644 opencascade/RWStepElement_RWSurfaceSectionFieldConstant.hxx delete mode 100644 opencascade/RWStepElement_RWSurfaceSectionFieldVarying.hxx delete mode 100644 opencascade/RWStepElement_RWUniformSurfaceSection.hxx delete mode 100644 opencascade/RWStepElement_RWVolume3dElementDescriptor.hxx delete mode 100644 opencascade/RWStepFEA_RWAlignedCurve3dElementCoordinateSystem.hxx delete mode 100644 opencascade/RWStepFEA_RWAlignedSurface3dElementCoordinateSystem.hxx delete mode 100644 opencascade/RWStepFEA_RWArbitraryVolume3dElementCoordinateSystem.hxx delete mode 100644 opencascade/RWStepFEA_RWConstantSurface3dElementCoordinateSystem.hxx delete mode 100644 opencascade/RWStepFEA_RWCurve3dElementProperty.hxx delete mode 100644 opencascade/RWStepFEA_RWCurve3dElementRepresentation.hxx delete mode 100644 opencascade/RWStepFEA_RWCurveElementEndOffset.hxx delete mode 100644 opencascade/RWStepFEA_RWCurveElementEndRelease.hxx delete mode 100644 opencascade/RWStepFEA_RWCurveElementInterval.hxx delete mode 100644 opencascade/RWStepFEA_RWCurveElementIntervalConstant.hxx delete mode 100644 opencascade/RWStepFEA_RWCurveElementIntervalLinearlyVarying.hxx delete mode 100644 opencascade/RWStepFEA_RWCurveElementLocation.hxx delete mode 100644 opencascade/RWStepFEA_RWDummyNode.hxx delete mode 100644 opencascade/RWStepFEA_RWElementGeometricRelationship.hxx delete mode 100644 opencascade/RWStepFEA_RWElementGroup.hxx delete mode 100644 opencascade/RWStepFEA_RWElementRepresentation.hxx delete mode 100644 opencascade/RWStepFEA_RWFeaAreaDensity.hxx delete mode 100644 opencascade/RWStepFEA_RWFeaAxis2Placement3d.hxx delete mode 100644 opencascade/RWStepFEA_RWFeaCurveSectionGeometricRelationship.hxx delete mode 100644 opencascade/RWStepFEA_RWFeaGroup.hxx delete mode 100644 opencascade/RWStepFEA_RWFeaLinearElasticity.hxx delete mode 100644 opencascade/RWStepFEA_RWFeaMassDensity.hxx delete mode 100644 opencascade/RWStepFEA_RWFeaMaterialPropertyRepresentation.hxx delete mode 100644 opencascade/RWStepFEA_RWFeaMaterialPropertyRepresentationItem.hxx delete mode 100644 opencascade/RWStepFEA_RWFeaModel.hxx delete mode 100644 opencascade/RWStepFEA_RWFeaModel3d.hxx delete mode 100644 opencascade/RWStepFEA_RWFeaModelDefinition.hxx delete mode 100644 opencascade/RWStepFEA_RWFeaMoistureAbsorption.hxx delete mode 100644 opencascade/RWStepFEA_RWFeaParametricPoint.hxx delete mode 100644 opencascade/RWStepFEA_RWFeaRepresentationItem.hxx delete mode 100644 opencascade/RWStepFEA_RWFeaSecantCoefficientOfLinearThermalExpansion.hxx delete mode 100644 opencascade/RWStepFEA_RWFeaShellBendingStiffness.hxx delete mode 100644 opencascade/RWStepFEA_RWFeaShellMembraneBendingCouplingStiffness.hxx delete mode 100644 opencascade/RWStepFEA_RWFeaShellMembraneStiffness.hxx delete mode 100644 opencascade/RWStepFEA_RWFeaShellShearStiffness.hxx delete mode 100644 opencascade/RWStepFEA_RWFeaSurfaceSectionGeometricRelationship.hxx delete mode 100644 opencascade/RWStepFEA_RWFeaTangentialCoefficientOfLinearThermalExpansion.hxx delete mode 100644 opencascade/RWStepFEA_RWFreedomAndCoefficient.hxx delete mode 100644 opencascade/RWStepFEA_RWFreedomsList.hxx delete mode 100644 opencascade/RWStepFEA_RWGeometricNode.hxx delete mode 100644 opencascade/RWStepFEA_RWNode.hxx delete mode 100644 opencascade/RWStepFEA_RWNodeDefinition.hxx delete mode 100644 opencascade/RWStepFEA_RWNodeGroup.hxx delete mode 100644 opencascade/RWStepFEA_RWNodeRepresentation.hxx delete mode 100644 opencascade/RWStepFEA_RWNodeSet.hxx delete mode 100644 opencascade/RWStepFEA_RWNodeWithSolutionCoordinateSystem.hxx delete mode 100644 opencascade/RWStepFEA_RWNodeWithVector.hxx delete mode 100644 opencascade/RWStepFEA_RWParametricCurve3dElementCoordinateDirection.hxx delete mode 100644 opencascade/RWStepFEA_RWParametricCurve3dElementCoordinateSystem.hxx delete mode 100644 opencascade/RWStepFEA_RWParametricSurface3dElementCoordinateSystem.hxx delete mode 100644 opencascade/RWStepFEA_RWSurface3dElementRepresentation.hxx delete mode 100644 opencascade/RWStepFEA_RWVolume3dElementRepresentation.hxx delete mode 100644 opencascade/RWStepGeom_RWAxis1Placement.hxx delete mode 100644 opencascade/RWStepGeom_RWAxis2Placement2d.hxx delete mode 100644 opencascade/RWStepGeom_RWAxis2Placement3d.hxx delete mode 100644 opencascade/RWStepGeom_RWBSplineCurve.hxx delete mode 100644 opencascade/RWStepGeom_RWBSplineCurveWithKnots.hxx delete mode 100644 opencascade/RWStepGeom_RWBSplineCurveWithKnotsAndRationalBSplineCurve.hxx delete mode 100644 opencascade/RWStepGeom_RWBSplineSurface.hxx delete mode 100644 opencascade/RWStepGeom_RWBSplineSurfaceWithKnots.hxx delete mode 100644 opencascade/RWStepGeom_RWBSplineSurfaceWithKnotsAndRationalBSplineSurface.hxx delete mode 100644 opencascade/RWStepGeom_RWBezierCurve.hxx delete mode 100644 opencascade/RWStepGeom_RWBezierCurveAndRationalBSplineCurve.hxx delete mode 100644 opencascade/RWStepGeom_RWBezierSurface.hxx delete mode 100644 opencascade/RWStepGeom_RWBezierSurfaceAndRationalBSplineSurface.hxx delete mode 100644 opencascade/RWStepGeom_RWBoundaryCurve.hxx delete mode 100644 opencascade/RWStepGeom_RWBoundedCurve.hxx delete mode 100644 opencascade/RWStepGeom_RWBoundedSurface.hxx delete mode 100644 opencascade/RWStepGeom_RWCartesianPoint.hxx delete mode 100644 opencascade/RWStepGeom_RWCartesianTransformationOperator.hxx delete mode 100644 opencascade/RWStepGeom_RWCartesianTransformationOperator3d.hxx delete mode 100644 opencascade/RWStepGeom_RWCircle.hxx delete mode 100644 opencascade/RWStepGeom_RWCompositeCurve.hxx delete mode 100644 opencascade/RWStepGeom_RWCompositeCurveOnSurface.hxx delete mode 100644 opencascade/RWStepGeom_RWCompositeCurveSegment.hxx delete mode 100644 opencascade/RWStepGeom_RWConic.hxx delete mode 100644 opencascade/RWStepGeom_RWConicalSurface.hxx delete mode 100644 opencascade/RWStepGeom_RWCurve.hxx delete mode 100644 opencascade/RWStepGeom_RWCurveBoundedSurface.hxx delete mode 100644 opencascade/RWStepGeom_RWCurveReplica.hxx delete mode 100644 opencascade/RWStepGeom_RWCylindricalSurface.hxx delete mode 100644 opencascade/RWStepGeom_RWDegeneratePcurve.hxx delete mode 100644 opencascade/RWStepGeom_RWDegenerateToroidalSurface.hxx delete mode 100644 opencascade/RWStepGeom_RWDirection.hxx delete mode 100644 opencascade/RWStepGeom_RWElementarySurface.hxx delete mode 100644 opencascade/RWStepGeom_RWEllipse.hxx delete mode 100644 opencascade/RWStepGeom_RWEvaluatedDegeneratePcurve.hxx delete mode 100644 opencascade/RWStepGeom_RWGeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx.hxx delete mode 100644 opencascade/RWStepGeom_RWGeometricRepresentationContext.hxx delete mode 100644 opencascade/RWStepGeom_RWGeometricRepresentationContextAndGlobalUnitAssignedContext.hxx delete mode 100644 opencascade/RWStepGeom_RWGeometricRepresentationContextAndParametricRepresentationContext.hxx delete mode 100644 opencascade/RWStepGeom_RWGeometricRepresentationItem.hxx delete mode 100644 opencascade/RWStepGeom_RWHyperbola.hxx delete mode 100644 opencascade/RWStepGeom_RWIntersectionCurve.hxx delete mode 100644 opencascade/RWStepGeom_RWLine.hxx delete mode 100644 opencascade/RWStepGeom_RWOffsetCurve3d.hxx delete mode 100644 opencascade/RWStepGeom_RWOffsetSurface.hxx delete mode 100644 opencascade/RWStepGeom_RWOrientedSurface.hxx delete mode 100644 opencascade/RWStepGeom_RWOuterBoundaryCurve.hxx delete mode 100644 opencascade/RWStepGeom_RWParabola.hxx delete mode 100644 opencascade/RWStepGeom_RWPcurve.hxx delete mode 100644 opencascade/RWStepGeom_RWPlacement.hxx delete mode 100644 opencascade/RWStepGeom_RWPlane.hxx delete mode 100644 opencascade/RWStepGeom_RWPoint.hxx delete mode 100644 opencascade/RWStepGeom_RWPointOnCurve.hxx delete mode 100644 opencascade/RWStepGeom_RWPointOnSurface.hxx delete mode 100644 opencascade/RWStepGeom_RWPointReplica.hxx delete mode 100644 opencascade/RWStepGeom_RWPolyline.hxx delete mode 100644 opencascade/RWStepGeom_RWQuasiUniformCurve.hxx delete mode 100644 opencascade/RWStepGeom_RWQuasiUniformCurveAndRationalBSplineCurve.hxx delete mode 100644 opencascade/RWStepGeom_RWQuasiUniformSurface.hxx delete mode 100644 opencascade/RWStepGeom_RWQuasiUniformSurfaceAndRationalBSplineSurface.hxx delete mode 100644 opencascade/RWStepGeom_RWRationalBSplineCurve.hxx delete mode 100644 opencascade/RWStepGeom_RWRationalBSplineSurface.hxx delete mode 100644 opencascade/RWStepGeom_RWRectangularCompositeSurface.hxx delete mode 100644 opencascade/RWStepGeom_RWRectangularTrimmedSurface.hxx delete mode 100644 opencascade/RWStepGeom_RWReparametrisedCompositeCurveSegment.hxx delete mode 100644 opencascade/RWStepGeom_RWSeamCurve.hxx delete mode 100644 opencascade/RWStepGeom_RWSphericalSurface.hxx delete mode 100644 opencascade/RWStepGeom_RWSuParameters.hxx delete mode 100644 opencascade/RWStepGeom_RWSurface.hxx delete mode 100644 opencascade/RWStepGeom_RWSurfaceCurve.hxx delete mode 100644 opencascade/RWStepGeom_RWSurfaceCurveAndBoundedCurve.hxx delete mode 100644 opencascade/RWStepGeom_RWSurfaceOfLinearExtrusion.hxx delete mode 100644 opencascade/RWStepGeom_RWSurfaceOfRevolution.hxx delete mode 100644 opencascade/RWStepGeom_RWSurfacePatch.hxx delete mode 100644 opencascade/RWStepGeom_RWSurfaceReplica.hxx delete mode 100644 opencascade/RWStepGeom_RWSweptSurface.hxx delete mode 100644 opencascade/RWStepGeom_RWToroidalSurface.hxx delete mode 100644 opencascade/RWStepGeom_RWTrimmedCurve.hxx delete mode 100644 opencascade/RWStepGeom_RWUniformCurve.hxx delete mode 100644 opencascade/RWStepGeom_RWUniformCurveAndRationalBSplineCurve.hxx delete mode 100644 opencascade/RWStepGeom_RWUniformSurface.hxx delete mode 100644 opencascade/RWStepGeom_RWUniformSurfaceAndRationalBSplineSurface.hxx delete mode 100644 opencascade/RWStepGeom_RWVector.hxx delete mode 100644 opencascade/RWStepKinematics_RWActuatedKinPairAndOrderKinPair.hxx delete mode 100644 opencascade/RWStepKinematics_RWActuatedKinematicPair.hxx delete mode 100644 opencascade/RWStepKinematics_RWContextDependentKinematicLinkRepresentation.hxx delete mode 100644 opencascade/RWStepKinematics_RWCylindricalPair.hxx delete mode 100644 opencascade/RWStepKinematics_RWCylindricalPairValue.hxx delete mode 100644 opencascade/RWStepKinematics_RWCylindricalPairWithRange.hxx delete mode 100644 opencascade/RWStepKinematics_RWFullyConstrainedPair.hxx delete mode 100644 opencascade/RWStepKinematics_RWGearPair.hxx delete mode 100644 opencascade/RWStepKinematics_RWGearPairValue.hxx delete mode 100644 opencascade/RWStepKinematics_RWGearPairWithRange.hxx delete mode 100644 opencascade/RWStepKinematics_RWHomokineticPair.hxx delete mode 100644 opencascade/RWStepKinematics_RWKinematicJoint.hxx delete mode 100644 opencascade/RWStepKinematics_RWKinematicLink.hxx delete mode 100644 opencascade/RWStepKinematics_RWKinematicLinkRepresentationAssociation.hxx delete mode 100644 opencascade/RWStepKinematics_RWKinematicPropertyMechanismRepresentation.hxx delete mode 100644 opencascade/RWStepKinematics_RWKinematicTopologyDirectedStructure.hxx delete mode 100644 opencascade/RWStepKinematics_RWKinematicTopologyNetworkStructure.hxx delete mode 100644 opencascade/RWStepKinematics_RWKinematicTopologyStructure.hxx delete mode 100644 opencascade/RWStepKinematics_RWLinearFlexibleAndPinionPair.hxx delete mode 100644 opencascade/RWStepKinematics_RWLinearFlexibleAndPlanarCurvePair.hxx delete mode 100644 opencascade/RWStepKinematics_RWLinearFlexibleLinkRepresentation.hxx delete mode 100644 opencascade/RWStepKinematics_RWLowOrderKinematicPair.hxx delete mode 100644 opencascade/RWStepKinematics_RWLowOrderKinematicPairValue.hxx delete mode 100644 opencascade/RWStepKinematics_RWLowOrderKinematicPairWithRange.hxx delete mode 100644 opencascade/RWStepKinematics_RWMechanismRepresentation.hxx delete mode 100644 opencascade/RWStepKinematics_RWMechanismStateRepresentation.hxx delete mode 100644 opencascade/RWStepKinematics_RWOrientedJoint.hxx delete mode 100644 opencascade/RWStepKinematics_RWPairRepresentationRelationship.hxx delete mode 100644 opencascade/RWStepKinematics_RWPlanarCurvePair.hxx delete mode 100644 opencascade/RWStepKinematics_RWPlanarCurvePairRange.hxx delete mode 100644 opencascade/RWStepKinematics_RWPlanarPair.hxx delete mode 100644 opencascade/RWStepKinematics_RWPlanarPairValue.hxx delete mode 100644 opencascade/RWStepKinematics_RWPlanarPairWithRange.hxx delete mode 100644 opencascade/RWStepKinematics_RWPointOnPlanarCurvePair.hxx delete mode 100644 opencascade/RWStepKinematics_RWPointOnPlanarCurvePairValue.hxx delete mode 100644 opencascade/RWStepKinematics_RWPointOnPlanarCurvePairWithRange.hxx delete mode 100644 opencascade/RWStepKinematics_RWPointOnSurfacePair.hxx delete mode 100644 opencascade/RWStepKinematics_RWPointOnSurfacePairValue.hxx delete mode 100644 opencascade/RWStepKinematics_RWPointOnSurfacePairWithRange.hxx delete mode 100644 opencascade/RWStepKinematics_RWPrismaticPair.hxx delete mode 100644 opencascade/RWStepKinematics_RWPrismaticPairValue.hxx delete mode 100644 opencascade/RWStepKinematics_RWPrismaticPairWithRange.hxx delete mode 100644 opencascade/RWStepKinematics_RWProductDefinitionKinematics.hxx delete mode 100644 opencascade/RWStepKinematics_RWProductDefinitionRelationshipKinematics.hxx delete mode 100644 opencascade/RWStepKinematics_RWRackAndPinionPair.hxx delete mode 100644 opencascade/RWStepKinematics_RWRackAndPinionPairValue.hxx delete mode 100644 opencascade/RWStepKinematics_RWRackAndPinionPairWithRange.hxx delete mode 100644 opencascade/RWStepKinematics_RWRevolutePair.hxx delete mode 100644 opencascade/RWStepKinematics_RWRevolutePairValue.hxx delete mode 100644 opencascade/RWStepKinematics_RWRevolutePairWithRange.hxx delete mode 100644 opencascade/RWStepKinematics_RWRigidLinkRepresentation.hxx delete mode 100644 opencascade/RWStepKinematics_RWRollingCurvePair.hxx delete mode 100644 opencascade/RWStepKinematics_RWRollingCurvePairValue.hxx delete mode 100644 opencascade/RWStepKinematics_RWRollingSurfacePair.hxx delete mode 100644 opencascade/RWStepKinematics_RWRollingSurfacePairValue.hxx delete mode 100644 opencascade/RWStepKinematics_RWRotationAboutDirection.hxx delete mode 100644 opencascade/RWStepKinematics_RWScrewPair.hxx delete mode 100644 opencascade/RWStepKinematics_RWScrewPairValue.hxx delete mode 100644 opencascade/RWStepKinematics_RWScrewPairWithRange.hxx delete mode 100644 opencascade/RWStepKinematics_RWSlidingCurvePair.hxx delete mode 100644 opencascade/RWStepKinematics_RWSlidingCurvePairValue.hxx delete mode 100644 opencascade/RWStepKinematics_RWSlidingSurfacePair.hxx delete mode 100644 opencascade/RWStepKinematics_RWSlidingSurfacePairValue.hxx delete mode 100644 opencascade/RWStepKinematics_RWSphericalPair.hxx delete mode 100644 opencascade/RWStepKinematics_RWSphericalPairValue.hxx delete mode 100644 opencascade/RWStepKinematics_RWSphericalPairWithPin.hxx delete mode 100644 opencascade/RWStepKinematics_RWSphericalPairWithPinAndRange.hxx delete mode 100644 opencascade/RWStepKinematics_RWSphericalPairWithRange.hxx delete mode 100644 opencascade/RWStepKinematics_RWSurfacePairWithRange.hxx delete mode 100644 opencascade/RWStepKinematics_RWUnconstrainedPair.hxx delete mode 100644 opencascade/RWStepKinematics_RWUnconstrainedPairValue.hxx delete mode 100644 opencascade/RWStepKinematics_RWUniversalPair.hxx delete mode 100644 opencascade/RWStepKinematics_RWUniversalPairValue.hxx delete mode 100644 opencascade/RWStepKinematics_RWUniversalPairWithRange.hxx delete mode 100644 opencascade/RWStepRepr_RWAllAroundShapeAspect.hxx delete mode 100644 opencascade/RWStepRepr_RWApex.hxx delete mode 100644 opencascade/RWStepRepr_RWAssemblyComponentUsage.hxx delete mode 100644 opencascade/RWStepRepr_RWAssemblyComponentUsageSubstitute.hxx delete mode 100644 opencascade/RWStepRepr_RWBetweenShapeAspect.hxx delete mode 100644 opencascade/RWStepRepr_RWCentreOfSymmetry.hxx delete mode 100644 opencascade/RWStepRepr_RWCharacterizedRepresentation.hxx delete mode 100644 opencascade/RWStepRepr_RWCompGroupShAspAndCompShAspAndDatumFeatAndShAsp.hxx delete mode 100644 opencascade/RWStepRepr_RWCompShAspAndDatumFeatAndShAsp.hxx delete mode 100644 opencascade/RWStepRepr_RWCompositeGroupShapeAspect.hxx delete mode 100644 opencascade/RWStepRepr_RWCompositeShapeAspect.hxx delete mode 100644 opencascade/RWStepRepr_RWCompoundRepresentationItem.hxx delete mode 100644 opencascade/RWStepRepr_RWConfigurationDesign.hxx delete mode 100644 opencascade/RWStepRepr_RWConfigurationEffectivity.hxx delete mode 100644 opencascade/RWStepRepr_RWConfigurationItem.hxx delete mode 100644 opencascade/RWStepRepr_RWConstructiveGeometryRepresentation.hxx delete mode 100644 opencascade/RWStepRepr_RWConstructiveGeometryRepresentationRelationship.hxx delete mode 100644 opencascade/RWStepRepr_RWContinuosShapeAspect.hxx delete mode 100644 opencascade/RWStepRepr_RWDataEnvironment.hxx delete mode 100644 opencascade/RWStepRepr_RWDefinitionalRepresentation.hxx delete mode 100644 opencascade/RWStepRepr_RWDerivedShapeAspect.hxx delete mode 100644 opencascade/RWStepRepr_RWDescriptiveRepresentationItem.hxx delete mode 100644 opencascade/RWStepRepr_RWExtension.hxx delete mode 100644 opencascade/RWStepRepr_RWFeatureForDatumTargetRelationship.hxx delete mode 100644 opencascade/RWStepRepr_RWFunctionallyDefinedTransformation.hxx delete mode 100644 opencascade/RWStepRepr_RWGeometricAlignment.hxx delete mode 100644 opencascade/RWStepRepr_RWGlobalUncertaintyAssignedContext.hxx delete mode 100644 opencascade/RWStepRepr_RWGlobalUnitAssignedContext.hxx delete mode 100644 opencascade/RWStepRepr_RWIntegerRepresentationItem.hxx delete mode 100644 opencascade/RWStepRepr_RWItemDefinedTransformation.hxx delete mode 100644 opencascade/RWStepRepr_RWMakeFromUsageOption.hxx delete mode 100644 opencascade/RWStepRepr_RWMappedItem.hxx delete mode 100644 opencascade/RWStepRepr_RWMaterialDesignation.hxx delete mode 100644 opencascade/RWStepRepr_RWMaterialProperty.hxx delete mode 100644 opencascade/RWStepRepr_RWMaterialPropertyRepresentation.hxx delete mode 100644 opencascade/RWStepRepr_RWMeasureRepresentationItem.hxx delete mode 100644 opencascade/RWStepRepr_RWParallelOffset.hxx delete mode 100644 opencascade/RWStepRepr_RWParametricRepresentationContext.hxx delete mode 100644 opencascade/RWStepRepr_RWPerpendicularTo.hxx delete mode 100644 opencascade/RWStepRepr_RWProductConcept.hxx delete mode 100644 opencascade/RWStepRepr_RWProductDefinitionShape.hxx delete mode 100644 opencascade/RWStepRepr_RWPropertyDefinition.hxx delete mode 100644 opencascade/RWStepRepr_RWPropertyDefinitionRelationship.hxx delete mode 100644 opencascade/RWStepRepr_RWPropertyDefinitionRepresentation.hxx delete mode 100644 opencascade/RWStepRepr_RWQuantifiedAssemblyComponentUsage.hxx delete mode 100644 opencascade/RWStepRepr_RWReprItemAndLengthMeasureWithUnit.hxx delete mode 100644 opencascade/RWStepRepr_RWReprItemAndLengthMeasureWithUnitAndQRI.hxx delete mode 100644 opencascade/RWStepRepr_RWReprItemAndPlaneAngleMeasureWithUnit.hxx delete mode 100644 opencascade/RWStepRepr_RWReprItemAndPlaneAngleMeasureWithUnitAndQRI.hxx delete mode 100644 opencascade/RWStepRepr_RWRepresentation.hxx delete mode 100644 opencascade/RWStepRepr_RWRepresentationContext.hxx delete mode 100644 opencascade/RWStepRepr_RWRepresentationContextReference.hxx delete mode 100644 opencascade/RWStepRepr_RWRepresentationItem.hxx delete mode 100644 opencascade/RWStepRepr_RWRepresentationMap.hxx delete mode 100644 opencascade/RWStepRepr_RWRepresentationReference.hxx delete mode 100644 opencascade/RWStepRepr_RWRepresentationRelationship.hxx delete mode 100644 opencascade/RWStepRepr_RWRepresentationRelationshipWithTransformation.hxx delete mode 100644 opencascade/RWStepRepr_RWShapeAspect.hxx delete mode 100644 opencascade/RWStepRepr_RWShapeAspectDerivingRelationship.hxx delete mode 100644 opencascade/RWStepRepr_RWShapeAspectRelationship.hxx delete mode 100644 opencascade/RWStepRepr_RWShapeAspectTransition.hxx delete mode 100644 opencascade/RWStepRepr_RWShapeRepresentationRelationshipWithTransformation.hxx delete mode 100644 opencascade/RWStepRepr_RWSpecifiedHigherUsageOccurrence.hxx delete mode 100644 opencascade/RWStepRepr_RWStructuralResponseProperty.hxx delete mode 100644 opencascade/RWStepRepr_RWStructuralResponsePropertyDefinitionRepresentation.hxx delete mode 100644 opencascade/RWStepRepr_RWTangent.hxx delete mode 100644 opencascade/RWStepRepr_RWValueRepresentationItem.hxx delete mode 100644 opencascade/RWStepShape_RWAdvancedBrepShapeRepresentation.hxx delete mode 100644 opencascade/RWStepShape_RWAdvancedFace.hxx delete mode 100644 opencascade/RWStepShape_RWAngularLocation.hxx delete mode 100644 opencascade/RWStepShape_RWAngularSize.hxx delete mode 100644 opencascade/RWStepShape_RWBlock.hxx delete mode 100644 opencascade/RWStepShape_RWBooleanResult.hxx delete mode 100644 opencascade/RWStepShape_RWBoxDomain.hxx delete mode 100644 opencascade/RWStepShape_RWBoxedHalfSpace.hxx delete mode 100644 opencascade/RWStepShape_RWBrepWithVoids.hxx delete mode 100644 opencascade/RWStepShape_RWClosedShell.hxx delete mode 100644 opencascade/RWStepShape_RWCompoundShapeRepresentation.hxx delete mode 100644 opencascade/RWStepShape_RWConnectedEdgeSet.hxx delete mode 100644 opencascade/RWStepShape_RWConnectedFaceSet.hxx delete mode 100644 opencascade/RWStepShape_RWConnectedFaceShapeRepresentation.hxx delete mode 100644 opencascade/RWStepShape_RWConnectedFaceSubSet.hxx delete mode 100644 opencascade/RWStepShape_RWContextDependentShapeRepresentation.hxx delete mode 100644 opencascade/RWStepShape_RWCsgShapeRepresentation.hxx delete mode 100644 opencascade/RWStepShape_RWCsgSolid.hxx delete mode 100644 opencascade/RWStepShape_RWDefinitionalRepresentationAndShapeRepresentation.hxx delete mode 100644 opencascade/RWStepShape_RWDimensionalCharacteristicRepresentation.hxx delete mode 100644 opencascade/RWStepShape_RWDimensionalLocation.hxx delete mode 100644 opencascade/RWStepShape_RWDimensionalLocationWithPath.hxx delete mode 100644 opencascade/RWStepShape_RWDimensionalSize.hxx delete mode 100644 opencascade/RWStepShape_RWDimensionalSizeWithPath.hxx delete mode 100644 opencascade/RWStepShape_RWEdge.hxx delete mode 100644 opencascade/RWStepShape_RWEdgeBasedWireframeModel.hxx delete mode 100644 opencascade/RWStepShape_RWEdgeBasedWireframeShapeRepresentation.hxx delete mode 100644 opencascade/RWStepShape_RWEdgeCurve.hxx delete mode 100644 opencascade/RWStepShape_RWEdgeLoop.hxx delete mode 100644 opencascade/RWStepShape_RWExtrudedAreaSolid.hxx delete mode 100644 opencascade/RWStepShape_RWExtrudedFaceSolid.hxx delete mode 100644 opencascade/RWStepShape_RWFace.hxx delete mode 100644 opencascade/RWStepShape_RWFaceBasedSurfaceModel.hxx delete mode 100644 opencascade/RWStepShape_RWFaceBound.hxx delete mode 100644 opencascade/RWStepShape_RWFaceOuterBound.hxx delete mode 100644 opencascade/RWStepShape_RWFaceSurface.hxx delete mode 100644 opencascade/RWStepShape_RWFacetedBrep.hxx delete mode 100644 opencascade/RWStepShape_RWFacetedBrepAndBrepWithVoids.hxx delete mode 100644 opencascade/RWStepShape_RWFacetedBrepShapeRepresentation.hxx delete mode 100644 opencascade/RWStepShape_RWGeometricCurveSet.hxx delete mode 100644 opencascade/RWStepShape_RWGeometricSet.hxx delete mode 100644 opencascade/RWStepShape_RWGeometricallyBoundedSurfaceShapeRepresentation.hxx delete mode 100644 opencascade/RWStepShape_RWGeometricallyBoundedWireframeShapeRepresentation.hxx delete mode 100644 opencascade/RWStepShape_RWHalfSpaceSolid.hxx delete mode 100644 opencascade/RWStepShape_RWLimitsAndFits.hxx delete mode 100644 opencascade/RWStepShape_RWLoop.hxx delete mode 100644 opencascade/RWStepShape_RWLoopAndPath.hxx delete mode 100644 opencascade/RWStepShape_RWManifoldSolidBrep.hxx delete mode 100644 opencascade/RWStepShape_RWManifoldSurfaceShapeRepresentation.hxx delete mode 100644 opencascade/RWStepShape_RWMeasureQualification.hxx delete mode 100644 opencascade/RWStepShape_RWMeasureRepresentationItemAndQualifiedRepresentationItem.hxx delete mode 100644 opencascade/RWStepShape_RWNonManifoldSurfaceShapeRepresentation.hxx delete mode 100644 opencascade/RWStepShape_RWOpenShell.hxx delete mode 100644 opencascade/RWStepShape_RWOrientedClosedShell.hxx delete mode 100644 opencascade/RWStepShape_RWOrientedEdge.hxx delete mode 100644 opencascade/RWStepShape_RWOrientedFace.hxx delete mode 100644 opencascade/RWStepShape_RWOrientedOpenShell.hxx delete mode 100644 opencascade/RWStepShape_RWOrientedPath.hxx delete mode 100644 opencascade/RWStepShape_RWPath.hxx delete mode 100644 opencascade/RWStepShape_RWPlusMinusTolerance.hxx delete mode 100644 opencascade/RWStepShape_RWPointRepresentation.hxx delete mode 100644 opencascade/RWStepShape_RWPolyLoop.hxx delete mode 100644 opencascade/RWStepShape_RWPrecisionQualifier.hxx delete mode 100644 opencascade/RWStepShape_RWQualifiedRepresentationItem.hxx delete mode 100644 opencascade/RWStepShape_RWRevolvedAreaSolid.hxx delete mode 100644 opencascade/RWStepShape_RWRevolvedFaceSolid.hxx delete mode 100644 opencascade/RWStepShape_RWRightAngularWedge.hxx delete mode 100644 opencascade/RWStepShape_RWRightCircularCone.hxx delete mode 100644 opencascade/RWStepShape_RWRightCircularCylinder.hxx delete mode 100644 opencascade/RWStepShape_RWSeamEdge.hxx delete mode 100644 opencascade/RWStepShape_RWShapeDefinitionRepresentation.hxx delete mode 100644 opencascade/RWStepShape_RWShapeDimensionRepresentation.hxx delete mode 100644 opencascade/RWStepShape_RWShapeRepresentation.hxx delete mode 100644 opencascade/RWStepShape_RWShapeRepresentationWithParameters.hxx delete mode 100644 opencascade/RWStepShape_RWShellBasedSurfaceModel.hxx delete mode 100644 opencascade/RWStepShape_RWSolidModel.hxx delete mode 100644 opencascade/RWStepShape_RWSolidReplica.hxx delete mode 100644 opencascade/RWStepShape_RWSphere.hxx delete mode 100644 opencascade/RWStepShape_RWSubedge.hxx delete mode 100644 opencascade/RWStepShape_RWSubface.hxx delete mode 100644 opencascade/RWStepShape_RWSweptAreaSolid.hxx delete mode 100644 opencascade/RWStepShape_RWSweptFaceSolid.hxx delete mode 100644 opencascade/RWStepShape_RWToleranceValue.hxx delete mode 100644 opencascade/RWStepShape_RWTopologicalRepresentationItem.hxx delete mode 100644 opencascade/RWStepShape_RWTorus.hxx delete mode 100644 opencascade/RWStepShape_RWTransitionalShapeRepresentation.hxx delete mode 100644 opencascade/RWStepShape_RWTypeQualifier.hxx delete mode 100644 opencascade/RWStepShape_RWValueFormatTypeQualifier.hxx delete mode 100644 opencascade/RWStepShape_RWVertex.hxx delete mode 100644 opencascade/RWStepShape_RWVertexLoop.hxx delete mode 100644 opencascade/RWStepShape_RWVertexPoint.hxx delete mode 100644 opencascade/RWStepVisual_RWAnnotationCurveOccurrence.hxx delete mode 100644 opencascade/RWStepVisual_RWAnnotationCurveOccurrenceAndGeomReprItem.hxx delete mode 100644 opencascade/RWStepVisual_RWAnnotationFillArea.hxx delete mode 100644 opencascade/RWStepVisual_RWAnnotationFillAreaOccurrence.hxx delete mode 100644 opencascade/RWStepVisual_RWAnnotationOccurrence.hxx delete mode 100644 opencascade/RWStepVisual_RWAnnotationPlane.hxx delete mode 100644 opencascade/RWStepVisual_RWAreaInSet.hxx delete mode 100644 opencascade/RWStepVisual_RWBackgroundColour.hxx delete mode 100644 opencascade/RWStepVisual_RWCameraImage.hxx delete mode 100644 opencascade/RWStepVisual_RWCameraModel.hxx delete mode 100644 opencascade/RWStepVisual_RWCameraModelD2.hxx delete mode 100644 opencascade/RWStepVisual_RWCameraModelD3.hxx delete mode 100644 opencascade/RWStepVisual_RWCameraModelD3MultiClipping.hxx delete mode 100644 opencascade/RWStepVisual_RWCameraModelD3MultiClippingIntersection.hxx delete mode 100644 opencascade/RWStepVisual_RWCameraModelD3MultiClippingUnion.hxx delete mode 100644 opencascade/RWStepVisual_RWCameraUsage.hxx delete mode 100644 opencascade/RWStepVisual_RWCharacterizedObjAndRepresentationAndDraughtingModel.hxx delete mode 100644 opencascade/RWStepVisual_RWColour.hxx delete mode 100644 opencascade/RWStepVisual_RWColourRgb.hxx delete mode 100644 opencascade/RWStepVisual_RWColourSpecification.hxx delete mode 100644 opencascade/RWStepVisual_RWComplexTriangulatedFace.hxx delete mode 100644 opencascade/RWStepVisual_RWComplexTriangulatedSurfaceSet.hxx delete mode 100644 opencascade/RWStepVisual_RWCompositeText.hxx delete mode 100644 opencascade/RWStepVisual_RWCompositeTextWithExtent.hxx delete mode 100644 opencascade/RWStepVisual_RWContextDependentInvisibility.hxx delete mode 100644 opencascade/RWStepVisual_RWContextDependentOverRidingStyledItem.hxx delete mode 100644 opencascade/RWStepVisual_RWCoordinatesList.hxx delete mode 100644 opencascade/RWStepVisual_RWCubicBezierTessellatedEdge.hxx delete mode 100644 opencascade/RWStepVisual_RWCubicBezierTriangulatedFace.hxx delete mode 100644 opencascade/RWStepVisual_RWCurveStyle.hxx delete mode 100644 opencascade/RWStepVisual_RWCurveStyleFont.hxx delete mode 100644 opencascade/RWStepVisual_RWCurveStyleFontPattern.hxx delete mode 100644 opencascade/RWStepVisual_RWDraughtingCallout.hxx delete mode 100644 opencascade/RWStepVisual_RWDraughtingModel.hxx delete mode 100644 opencascade/RWStepVisual_RWDraughtingPreDefinedColour.hxx delete mode 100644 opencascade/RWStepVisual_RWDraughtingPreDefinedCurveFont.hxx delete mode 100644 opencascade/RWStepVisual_RWExternallyDefinedCurveFont.hxx delete mode 100644 opencascade/RWStepVisual_RWFillAreaStyle.hxx delete mode 100644 opencascade/RWStepVisual_RWFillAreaStyleColour.hxx delete mode 100644 opencascade/RWStepVisual_RWInvisibility.hxx delete mode 100644 opencascade/RWStepVisual_RWMechanicalDesignGeometricPresentationArea.hxx delete mode 100644 opencascade/RWStepVisual_RWMechanicalDesignGeometricPresentationRepresentation.hxx delete mode 100644 opencascade/RWStepVisual_RWOverRidingStyledItem.hxx delete mode 100644 opencascade/RWStepVisual_RWPlanarBox.hxx delete mode 100644 opencascade/RWStepVisual_RWPlanarExtent.hxx delete mode 100644 opencascade/RWStepVisual_RWPointStyle.hxx delete mode 100644 opencascade/RWStepVisual_RWPreDefinedColour.hxx delete mode 100644 opencascade/RWStepVisual_RWPreDefinedCurveFont.hxx delete mode 100644 opencascade/RWStepVisual_RWPreDefinedItem.hxx delete mode 100644 opencascade/RWStepVisual_RWPresentationArea.hxx delete mode 100644 opencascade/RWStepVisual_RWPresentationLayerAssignment.hxx delete mode 100644 opencascade/RWStepVisual_RWPresentationLayerUsage.hxx delete mode 100644 opencascade/RWStepVisual_RWPresentationRepresentation.hxx delete mode 100644 opencascade/RWStepVisual_RWPresentationSet.hxx delete mode 100644 opencascade/RWStepVisual_RWPresentationSize.hxx delete mode 100644 opencascade/RWStepVisual_RWPresentationStyleAssignment.hxx delete mode 100644 opencascade/RWStepVisual_RWPresentationStyleByContext.hxx delete mode 100644 opencascade/RWStepVisual_RWPresentationView.hxx delete mode 100644 opencascade/RWStepVisual_RWPresentedItemRepresentation.hxx delete mode 100644 opencascade/RWStepVisual_RWRepositionedTessellatedGeometricSet.hxx delete mode 100644 opencascade/RWStepVisual_RWRepositionedTessellatedItem.hxx delete mode 100644 opencascade/RWStepVisual_RWStyledItem.hxx delete mode 100644 opencascade/RWStepVisual_RWSurfaceSideStyle.hxx delete mode 100644 opencascade/RWStepVisual_RWSurfaceStyleBoundary.hxx delete mode 100644 opencascade/RWStepVisual_RWSurfaceStyleControlGrid.hxx delete mode 100644 opencascade/RWStepVisual_RWSurfaceStyleFillArea.hxx delete mode 100644 opencascade/RWStepVisual_RWSurfaceStyleParameterLine.hxx delete mode 100644 opencascade/RWStepVisual_RWSurfaceStyleReflectanceAmbient.hxx delete mode 100644 opencascade/RWStepVisual_RWSurfaceStyleRendering.hxx delete mode 100644 opencascade/RWStepVisual_RWSurfaceStyleRenderingWithProperties.hxx delete mode 100644 opencascade/RWStepVisual_RWSurfaceStyleSegmentationCurve.hxx delete mode 100644 opencascade/RWStepVisual_RWSurfaceStyleSilhouette.hxx delete mode 100644 opencascade/RWStepVisual_RWSurfaceStyleTransparent.hxx delete mode 100644 opencascade/RWStepVisual_RWSurfaceStyleUsage.hxx delete mode 100644 opencascade/RWStepVisual_RWTemplate.hxx delete mode 100644 opencascade/RWStepVisual_RWTemplateInstance.hxx delete mode 100644 opencascade/RWStepVisual_RWTessellatedAnnotationOccurrence.hxx delete mode 100644 opencascade/RWStepVisual_RWTessellatedConnectingEdge.hxx delete mode 100644 opencascade/RWStepVisual_RWTessellatedCurveSet.hxx delete mode 100644 opencascade/RWStepVisual_RWTessellatedEdge.hxx delete mode 100644 opencascade/RWStepVisual_RWTessellatedGeometricSet.hxx delete mode 100644 opencascade/RWStepVisual_RWTessellatedItem.hxx delete mode 100644 opencascade/RWStepVisual_RWTessellatedPointSet.hxx delete mode 100644 opencascade/RWStepVisual_RWTessellatedShapeRepresentation.hxx delete mode 100644 opencascade/RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters.hxx delete mode 100644 opencascade/RWStepVisual_RWTessellatedShell.hxx delete mode 100644 opencascade/RWStepVisual_RWTessellatedSolid.hxx delete mode 100644 opencascade/RWStepVisual_RWTessellatedStructuredItem.hxx delete mode 100644 opencascade/RWStepVisual_RWTessellatedVertex.hxx delete mode 100644 opencascade/RWStepVisual_RWTessellatedWire.hxx delete mode 100644 opencascade/RWStepVisual_RWTextLiteral.hxx delete mode 100644 opencascade/RWStepVisual_RWTextStyle.hxx delete mode 100644 opencascade/RWStepVisual_RWTextStyleForDefinedFont.hxx delete mode 100644 opencascade/RWStepVisual_RWTextStyleWithBoxCharacteristics.hxx delete mode 100644 opencascade/RWStepVisual_RWTriangulatedFace.hxx delete mode 100644 opencascade/RWStepVisual_RWTriangulatedSurfaceSet.hxx delete mode 100644 opencascade/RWStepVisual_RWViewVolume.hxx create mode 100644 opencascade/Standard_VersionInfo.hxx create mode 100644 opencascade/StepBasic_GeneralPropertyAssociation.hxx create mode 100644 opencascade/StepBasic_GeneralPropertyRelationship.hxx create mode 100644 opencascade/StepRepr_BooleanRepresentationItem.hxx create mode 100644 opencascade/StepRepr_MechanicalDesignAndDraughtingRelationship.hxx create mode 100644 opencascade/StepRepr_RealRepresentationItem.hxx delete mode 100644 opencascade/TopBas_Interference.gxx delete mode 100644 opencascade/TopClass_Classifier2d.gxx delete mode 100644 opencascade/TopClass_Classifier3d.gxx delete mode 100644 opencascade/TopClass_Classifier3d.lxx delete mode 100644 opencascade/TopClass_FaceClassifier.gxx delete mode 100644 opencascade/TopClass_SolidClassifier.gxx delete mode 100644 opencascade/TopClass_SolidExplorer.hxx delete mode 100644 opencascade/TopoDS.lxx delete mode 100644 opencascade/TopoDS_TCompSolid.lxx delete mode 100644 opencascade/TopoDS_TCompound.lxx delete mode 100644 opencascade/TopoDS_TEdge.lxx delete mode 100644 opencascade/TopoDS_TFace.lxx delete mode 100644 opencascade/TopoDS_TShell.lxx delete mode 100644 opencascade/TopoDS_TSolid.lxx delete mode 100644 opencascade/TopoDS_TVertex.lxx delete mode 100644 opencascade/TopoDS_TWire.lxx delete mode 100644 opencascade/XSAlgo_AlgoContainer.lxx delete mode 100644 opencascade/XSAlgo_Caller.hxx create mode 100644 opencascade/XSAlgo_ShapeProcessor.hxx delete mode 100644 opencascade/XSAlgo_ToolContainer.hxx diff --git a/opencascade/AIS.hxx b/opencascade/AIS.hxx index 171631361..7a69ed3b0 100644 --- a/opencascade/AIS.hxx +++ b/opencascade/AIS.hxx @@ -21,58 +21,64 @@ #include #include -//! Application Interactive Services provide the means to create links between an application GUI viewer and -//! the packages which are used to manage selection and presentation. -//! The tools AIS defined in order to do this include different sorts of entities: -//! both the selectable viewable objects themselves and the context and attribute managers to define their selection and display. -//! To orient the user as he works in a modeling environment, views and selections must be comprehensible. -//! There must be several different sorts of selectable and viewable object defined. -//! These must also be interactive, that is, connecting graphic representation and the underlying reference geometry. -//! These entities are called Interactive Objects, and are divided into four types: +//! Application Interactive Services provide the means to create links between an application GUI +//! viewer and the packages which are used to manage selection and presentation. The tools AIS +//! defined in order to do this include different sorts of entities: both the selectable viewable +//! objects themselves and the context and attribute managers to define their selection and display. +//! To orient the user as he works in a modeling environment, views and selections must be +//! comprehensible. There must be several different sorts of selectable and viewable object defined. +//! These must also be interactive, that is, connecting graphic representation and the underlying +//! reference geometry. These entities are called Interactive Objects, and are divided into four +//! types: //! - the Datum //! - the Relation //! - the Object //! - None. -//! The Datum groups together the construction elements such as lines, circles, points, trihedra, plane trihedra, planes and axes. -//! The Relation is made up of constraints on one or more interactive shapes and the corresponding reference geometry. -//! For example, you might want to constrain two edges in a parallel relation. -//! This contraint is considered as an object in its own right, and is shown as a sensitive primitive. -//! This takes the graphic form of a perpendicular arrow marked with the || symbol and lying between the two edges. -//! The Object type includes topological shapes, and connections between shapes. -//! None, in order not to eliminate the object, tells the application to look further until it finds an object definition in its generation which is accepted. -//! Inside these categories, you have the possibility of an additional characterization by means of a signature. -//! The signature provides an index to the further characterization. -//! By default, the Interactive Object has a None type and a signature of 0 (equivalent to None.) -//! If you want to give a particular type and signature to your interactive object, you must redefine the two virtual methods: Type and Signature. -//! In the C++ inheritance structure of the package, each class representing a specific Interactive Object inherits AIS_InteractiveObject. -//! Among these inheriting classes, AIS_Relation functions as the abstract mother class for tinheriting classes defining display of specific relational constraints and types of dimension. -//! Some of these include: -//! - display of constraints based on relations of symmetry, tangency, parallelism and concentricity +//! The Datum groups together the construction elements such as lines, circles, points, trihedra, +//! plane trihedra, planes and axes. The Relation is made up of constraints on one or more +//! interactive shapes and the corresponding reference geometry. For example, you might want to +//! constrain two edges in a parallel relation. This constraint is considered as an object in its +//! own right, and is shown as a sensitive primitive. This takes the graphic form of a perpendicular +//! arrow marked with the || symbol and lying between the two edges. The Object type includes +//! topological shapes, and connections between shapes. None, in order not to eliminate the object, +//! tells the application to look further until it finds an object definition in its generation +//! which is accepted. Inside these categories, you have the possibility of an additional +//! characterization by means of a signature. The signature provides an index to the further +//! characterization. By default, the Interactive Object has a None type and a signature of 0 +//! (equivalent to None.) If you want to give a particular type and signature to your interactive +//! object, you must redefine the two virtual methods: Type and Signature. In the C++ inheritance +//! structure of the package, each class representing a specific Interactive Object inherits +//! AIS_InteractiveObject. Among these inheriting classes, AIS_Relation functions as the abstract +//! mother class for tinheriting classes defining display of specific relational constraints and +//! types of dimension. Some of these include: +//! - display of constraints based on relations of symmetry, tangency, parallelism and +//! concentricity //! - display of dimensions for angles, offsets, diameters, radii and chamfers. //! No viewer can show everything at once with any coherence or clarity. //! Views must be managed carefully both sequentially and at any given instant. //! Another function of the view is that of a context to carry out design in. -//! The design changes are applied to the objects in the view and then extended to the underlying reference geometry by a solver. -//! To make sense of this complicated visual data, several display and selection tools are required. -//! To facilitate management, each object and each construction element has a selection priority. -//! There are also means to modify the default priority. -//! To define an environment of dynamic detection, you can use standard filter classes or create your own. -//! A filter questions the owner of the sensitive primitive to determine if it has the desired qualities. -//! If it answers positively, it is kept. If not, it is rejected. -//! The standard filters supplied in AIS include: +//! The design changes are applied to the objects in the view and then extended to the underlying +//! reference geometry by a solver. To make sense of this complicated visual data, several display +//! and selection tools are required. To facilitate management, each object and each construction +//! element has a selection priority. There are also means to modify the default priority. To define +//! an environment of dynamic detection, you can use standard filter classes or create your own. A +//! filter questions the owner of the sensitive primitive to determine if it has the desired +//! qualities. If it answers positively, it is kept. If not, it is rejected. The standard filters +//! supplied in AIS include: //! - AIS_AttributeFilter //! - AIS_SignatureFilter //! - AIS_TypeFilter. -//! A set of functions allows you to choose the interactive objects which you want to act on, the selection modes which you want to activate. -//! An interactive object can have a certain number of graphic attributes which are specific to it, such as visualization mode, color, and material. -//! By the same token, the interactive context has a set of graphic attributes, the Drawer which is valid by default for the objects it controls. -//! When an interactive object is visualized, the required graphic attributes are first taken from the object's own Drawer if one exists, or from the context drawer for the others. -class AIS +//! A set of functions allows you to choose the interactive objects which you want to act on, the +//! selection modes which you want to activate. An interactive object can have a certain number of +//! graphic attributes which are specific to it, such as visualization mode, color, and material. By +//! the same token, the interactive context has a set of graphic attributes, the Drawer which is +//! valid by default for the objects it controls. When an interactive object is visualized, the +//! required graphic attributes are first taken from the object's own Drawer if one exists, or from +//! the context drawer for the others. +class AIS { public: - DEFINE_STANDARD_ALLOC - }; #endif // _AIS_HeaderFile diff --git a/opencascade/AIS_Animation.hxx b/opencascade/AIS_Animation.hxx index ed31d0262..485542dea 100644 --- a/opencascade/AIS_Animation.hxx +++ b/opencascade/AIS_Animation.hxx @@ -22,11 +22,18 @@ //! Structure defining current animation progress. struct AIS_AnimationProgress { - Standard_Real Pts; //!< global presentation timestamp - Standard_Real LocalPts; //!< presentation within current animation + Standard_Real Pts; //!< global presentation timestamp + Standard_Real LocalPts; //!< presentation within current animation + // clang-format off Standard_Real LocalNormalized; //!< normalized position within current animation within 0..1 range + // clang-format on - AIS_AnimationProgress() : Pts (-1.0), LocalPts (-1.0), LocalNormalized (-1.0) {} + AIS_AnimationProgress() + : Pts(-1.0), + LocalPts(-1.0), + LocalNormalized(-1.0) + { + } }; DEFINE_STANDARD_HANDLE(AIS_Animation, Standard_Transient) @@ -36,38 +43,43 @@ DEFINE_STANDARD_HANDLE(AIS_Animation, Standard_Transient) //! //! - Animation Implementor //! Sub-classes should override method AIS_Animation::update() to perform specific animation. -//! AIS package provides limited number of such animation atoms - classes AIS_AnimationObject and AIS_AnimationCamera, which could be enough for defining a simple animation. -//! In general case, application is expected defining own AIS_Animation sub-classes implementing application-specific animation logic -//! (e.g. another interpolation or another kind of transformations - like color transition and others). -//! The basic conception of AIS_Animation::update() is defining an exact scene state for the current presentation timestamp, -//! providing a smooth and continuous animation well defined at any time step and in any direction. -//! So that a time difference between two sequential drawn Viewer frames can vary from frame to frame without visual artifacts, -//! increasing rendering framerate would not lead to animation being executed too fast -//! and low framerate (on slow hardware) would not lead to animation played longer than defined duration. -//! Hence, implementation should avoid usage of incremental step logic or should apply it very carefully. +//! AIS package provides limited number of such animation atoms - classes AIS_AnimationObject and +//! AIS_AnimationCamera, which could be enough for defining a simple animation. In general case, +//! application is expected defining own AIS_Animation sub-classes implementing +//! application-specific animation logic (e.g. another interpolation or another kind of +//! transformations - like color transition and others). The basic conception of +//! AIS_Animation::update() is defining an exact scene state for the current presentation +//! timestamp, providing a smooth and continuous animation well defined at any time step and in +//! any direction. So that a time difference between two sequential drawn Viewer frames can vary +//! from frame to frame without visual artifacts, increasing rendering framerate would not lead to +//! animation being executed too fast and low framerate (on slow hardware) would not lead to +//! animation played longer than defined duration. Hence, implementation should avoid usage of +//! incremental step logic or should apply it very carefully. //! //! - Animation Container -//! AIS_Animation (no sub-classing) can be used to aggregate a sequence of Animation items (children). -//! Each children should be defined with its own duration and start time (presentation timestamp). -//! It is possible defining collection of nested AIS_Animation items, so that within each container level -//! children define start playback time relative to its holder. +//! AIS_Animation (no sub-classing) can be used to aggregate a sequence of Animation items +//! (children). Each children should be defined with its own duration and start time (presentation +//! timestamp). It is possible defining collection of nested AIS_Animation items, so that within +//! each container level children define start playback time relative to its holder. //! //! - Animation playback Controller -//! It is suggested that application would define a single AIS_Animation instance (optional sub-classing) for controlling animation playback as whole. -//! Such controller should be filled in by other AIS_Animation as children objects, -//! and will be managed by application by calling StartTimer(), UpdateTimer() and IsStopped() methods. +//! It is suggested that application would define a single AIS_Animation instance (optional +//! sub-classing) for controlling animation playback as whole. Such controller should be filled in +//! by other AIS_Animation as children objects, and will be managed by application by calling +//! StartTimer(), UpdateTimer() and IsStopped() methods. //! -//! Note, that AIS_Animation::StartTimer() defines a timer calculating an elapsed time, not a multimedia timer executing Viewer updates at specific intervals! -//! Application should avoid using implicit and immediate Viewer updates to ensure that AIS_Animation::UpdateTimer() is called before each redrawing of a Viewer content. -//! Redrawing logic should be also managed at application level for managing a smooth animation -//! (by defining a multimedia timer provided by used GUI framework executing updates at desired framerate, or as continuous redraws in loop). +//! Note, that AIS_Animation::StartTimer() defines a timer calculating an elapsed time, not a +//! multimedia timer executing Viewer updates at specific intervals! Application should avoid using +//! implicit and immediate Viewer updates to ensure that AIS_Animation::UpdateTimer() is called +//! before each redrawing of a Viewer content. Redrawing logic should be also managed at application +//! level for managing a smooth animation (by defining a multimedia timer provided by used GUI +//! framework executing updates at desired framerate, or as continuous redraws in loop). class AIS_Animation : public Standard_Transient { DEFINE_STANDARD_RTTIEXT(AIS_Animation, Standard_Transient) public: - //! Creates empty animation. - Standard_EXPORT AIS_Animation (const TCollection_AsciiString& theAnimationName); + Standard_EXPORT AIS_Animation(const TCollection_AsciiString& theAnimationName); //! Destruct object, clear arguments Standard_EXPORT virtual ~AIS_Animation(); @@ -76,15 +88,14 @@ public: const TCollection_AsciiString& Name() const { return myName; } public: - //! @return start time of the animation in the timeline Standard_Real StartPts() const { return myPtsStart; } //! Sets time limits for animation in the animation timeline - void SetStartPts (const Standard_Real thePtsStart) { myPtsStart = thePtsStart; } + void SetStartPts(const Standard_Real thePtsStart) { myPtsStart = thePtsStart; } //! @return duration of the animation in the timeline - Standard_Real Duration() const { return Max (myOwnDuration, myChildrenDuration); } + Standard_Real Duration() const { return Max(myOwnDuration, myChildrenDuration); } //! Update total duration considering all animations on timeline. Standard_EXPORT void UpdateTotalDuration(); @@ -96,49 +107,50 @@ public: Standard_Real OwnDuration() const { return myOwnDuration; } //! Defines duration of the animation. - void SetOwnDuration (const Standard_Real theDuration) { myOwnDuration = theDuration; } + void SetOwnDuration(const Standard_Real theDuration) { myOwnDuration = theDuration; } //! Add single animation to the timeline. //! @param theAnimation input animation - Standard_EXPORT void Add (const Handle(AIS_Animation)& theAnimation); + Standard_EXPORT void Add(const Handle(AIS_Animation)& theAnimation); //! Clear animation timeline - remove all animations from it. Standard_EXPORT void Clear(); //! Return the child animation with the given name. - Standard_EXPORT Handle(AIS_Animation) Find (const TCollection_AsciiString& theAnimationName) const; + Standard_EXPORT Handle(AIS_Animation) Find(const TCollection_AsciiString& theAnimationName) const; //! Remove the child animation. - Standard_EXPORT Standard_Boolean Remove (const Handle(AIS_Animation)& theAnimation); + Standard_EXPORT Standard_Boolean Remove(const Handle(AIS_Animation)& theAnimation); //! Replace the child animation. - Standard_EXPORT Standard_Boolean Replace (const Handle(AIS_Animation)& theAnimationOld, - const Handle(AIS_Animation)& theAnimationNew); + Standard_EXPORT Standard_Boolean Replace(const Handle(AIS_Animation)& theAnimationOld, + const Handle(AIS_Animation)& theAnimationNew); //! Clears own children and then copy child animations from another object. //! Copy also Start Time and Duration values. - Standard_EXPORT void CopyFrom (const Handle(AIS_Animation)& theOther); + Standard_EXPORT void CopyFrom(const Handle(AIS_Animation)& theOther); //! Return sequence of child animations. const NCollection_Sequence& Children() const { return myAnimations; } public: - //! Start animation with internally defined timer instance. //! Calls ::Start() internally. //! - //! Note, that this method initializes a timer calculating an elapsed time (presentation timestamps within AIS_Animation::UpdateTimer()), - //! not a multimedia timer executing Viewer updates at specific intervals! - //! Viewer redrawing should be managed at application level, so that AIS_Animation::UpdateTimer() is called once right before each redrawing of a Viewer content. + //! Note, that this method initializes a timer calculating an elapsed time (presentation + //! timestamps within AIS_Animation::UpdateTimer()), not a multimedia timer executing Viewer + //! updates at specific intervals! Viewer redrawing should be managed at application level, so + //! that AIS_Animation::UpdateTimer() is called once right before each redrawing of a Viewer + //! content. //! //! @param theStartPts starting timer position (presentation timestamp) //! @param thePlaySpeed playback speed (1.0 means normal speed) //! @param theToUpdate flag to update defined animations to specified start position //! @param theToStopTimer flag to pause timer at the starting position - Standard_EXPORT virtual void StartTimer (const Standard_Real theStartPts, - const Standard_Real thePlaySpeed, - const Standard_Boolean theToUpdate, - const Standard_Boolean theToStopTimer = Standard_False); + Standard_EXPORT virtual void StartTimer(const Standard_Real theStartPts, + const Standard_Real thePlaySpeed, + const Standard_Boolean theToUpdate, + const Standard_Boolean theToStopTimer = Standard_False); //! Update single frame of animation, update timer state //! @return current time of timeline progress. @@ -151,14 +163,13 @@ public: const Handle(Media_Timer)& Timer() const { return myTimer; } //! Set playback timer. - void SetTimer (const Handle(Media_Timer)& theTimer) { myTimer = theTimer; } + void SetTimer(const Handle(Media_Timer)& theTimer) { myTimer = theTimer; } public: - //! Start animation. This method changes status of the animation to Started. //! This status defines whether animation is to be performed in the timeline or not. //! @param theToUpdate call Update() method - Standard_EXPORT virtual void Start (const Standard_Boolean theToUpdate); + Standard_EXPORT virtual void Start(const Standard_Boolean theToUpdate); //! Pause the process timeline. Standard_EXPORT virtual void Pause(); @@ -172,21 +183,19 @@ public: bool IsStopped() { return myState != AnimationState_Started; } //! Update single frame of animation, update timer state - //! @param thePts [in] the time moment within [0; Duration()] + //! @param[in] thePts the time moment within [0; Duration()] //! @return True if timeline is in progress - Standard_EXPORT virtual Standard_Boolean Update (const Standard_Real thePts); + Standard_EXPORT virtual Standard_Boolean Update(const Standard_Real thePts); protected: - - //! Process one step of the animation according to the input time progress, including all children. - //! Calls also ::update() to update own animation. - Standard_EXPORT virtual void updateWithChildren (const AIS_AnimationProgress& thePosition); + //! Process one step of the animation according to the input time progress, including all + //! children. Calls also ::update() to update own animation. + Standard_EXPORT virtual void updateWithChildren(const AIS_AnimationProgress& thePosition); //! Update the own animation to specified position - should be overridden by sub-class. - virtual void update (const AIS_AnimationProgress& theProgress) { (void )theProgress; } + virtual void update(const AIS_AnimationProgress& theProgress) { (void)theProgress; } protected: - //! Defines animation state. enum AnimationState { @@ -196,18 +205,15 @@ protected: }; protected: - Handle(Media_Timer) myTimer; - TCollection_AsciiString myName; //!< animation name - NCollection_Sequence - myAnimations; //!< sequence of child animations - - AnimationState myState; //!< animation state - started, stopped of paused - Standard_Real myPtsStart; //!< time of start in the timeline - Standard_Real myOwnDuration; //!< duration of animation excluding children - Standard_Real myChildrenDuration; //!< duration of animation including children + TCollection_AsciiString myName; //!< animation name + NCollection_Sequence myAnimations; //!< sequence of child animations + AnimationState myState; //!< animation state - started, stopped of paused + Standard_Real myPtsStart; //!< time of start in the timeline + Standard_Real myOwnDuration; //!< duration of animation excluding children + Standard_Real myChildrenDuration; //!< duration of animation including children }; #endif // _AIS_Animation_HeaderFile diff --git a/opencascade/AIS_AnimationAxisRotation.hxx b/opencascade/AIS_AnimationAxisRotation.hxx index 599f3ac6f..5e5fc66a2 100644 --- a/opencascade/AIS_AnimationAxisRotation.hxx +++ b/opencascade/AIS_AnimationAxisRotation.hxx @@ -22,7 +22,6 @@ class AIS_AnimationAxisRotation : public AIS_BaseAnimationObject { DEFINE_STANDARD_RTTIEXT(AIS_AnimationAxisRotation, AIS_BaseAnimationObject) public: - //! Constructor with initialization. //! @param[in] theAnimationName animation identifier //! @param[in] theContext interactive context where object have been displayed @@ -30,24 +29,21 @@ public: //! @param[in] theAxis rotation axis //! @param[in] theAngleStart rotation angle at the start of animation //! @param[in] theAngleEnd rotation angle at the end of animation - Standard_EXPORT AIS_AnimationAxisRotation (const TCollection_AsciiString& theAnimationName, - const Handle(AIS_InteractiveContext)& theContext, - const Handle(AIS_InteractiveObject)& theObject, - const gp_Ax1& theAxis, - const Standard_Real theAngleStart, - const Standard_Real theAngleEnd); + Standard_EXPORT AIS_AnimationAxisRotation(const TCollection_AsciiString& theAnimationName, + const Handle(AIS_InteractiveContext)& theContext, + const Handle(AIS_InteractiveObject)& theObject, + const gp_Ax1& theAxis, + const Standard_Real theAngleStart, + const Standard_Real theAngleEnd); protected: - //! Update the progress. - Standard_EXPORT virtual void update (const AIS_AnimationProgress& theProgress) Standard_OVERRIDE; + Standard_EXPORT virtual void update(const AIS_AnimationProgress& theProgress) Standard_OVERRIDE; private: - - gp_Ax1 myRotAxis; //!< rotation axis - Standard_Real myAngleStart; //!< start angle for rotation - Standard_Real myAngleEnd; //!< end angle for rotation - + gp_Ax1 myRotAxis; //!< rotation axis + Standard_Real myAngleStart; //!< start angle for rotation + Standard_Real myAngleEnd; //!< end angle for rotation }; #endif // _AIS_AnimationAxisRotation_HeaderFile diff --git a/opencascade/AIS_AnimationCamera.hxx b/opencascade/AIS_AnimationCamera.hxx index 328ce15b7..0d0c1b62f 100644 --- a/opencascade/AIS_AnimationCamera.hxx +++ b/opencascade/AIS_AnimationCamera.hxx @@ -25,40 +25,39 @@ class AIS_AnimationCamera : public AIS_Animation { DEFINE_STANDARD_RTTIEXT(AIS_AnimationCamera, AIS_Animation) public: - //! Main constructor. - Standard_EXPORT AIS_AnimationCamera (const TCollection_AsciiString& theAnimationName, - const Handle(V3d_View)& theView); + Standard_EXPORT AIS_AnimationCamera(const TCollection_AsciiString& theAnimationName, + const Handle(V3d_View)& theView); //! Return the target view. const Handle(V3d_View)& View() const { return myView; } //! Set target view. - void SetView (const Handle(V3d_View)& theView) { myView = theView; } + void SetView(const Handle(V3d_View)& theView) { myView = theView; } //! Return camera start position. const Handle(Graphic3d_Camera)& CameraStart() const { return myCamStart; } //! Define camera start position. - void SetCameraStart (const Handle(Graphic3d_Camera)& theCameraStart) { myCamStart = theCameraStart; } + void SetCameraStart(const Handle(Graphic3d_Camera)& theCameraStart) + { + myCamStart = theCameraStart; + } //! Return camera end position. const Handle(Graphic3d_Camera)& CameraEnd() const { return myCamEnd; } //! Define camera end position. - void SetCameraEnd (const Handle(Graphic3d_Camera)& theCameraEnd) { myCamEnd = theCameraEnd; } + void SetCameraEnd(const Handle(Graphic3d_Camera)& theCameraEnd) { myCamEnd = theCameraEnd; } protected: - //! Update the progress. - Standard_EXPORT virtual void update (const AIS_AnimationProgress& theProgress) Standard_OVERRIDE; + Standard_EXPORT virtual void update(const AIS_AnimationProgress& theProgress) Standard_OVERRIDE; protected: - - Handle(V3d_View) myView; //!< view to setup camera - Handle(Graphic3d_Camera) myCamStart; //!< starting camera position - Handle(Graphic3d_Camera) myCamEnd; //!< end camera position - + Handle(V3d_View) myView; //!< view to setup camera + Handle(Graphic3d_Camera) myCamStart; //!< starting camera position + Handle(Graphic3d_Camera) myCamEnd; //!< end camera position }; DEFINE_STANDARD_HANDLE(AIS_AnimationCamera, AIS_Animation) diff --git a/opencascade/AIS_AnimationObject.hxx b/opencascade/AIS_AnimationObject.hxx index f3892896f..3b95b19af 100644 --- a/opencascade/AIS_AnimationObject.hxx +++ b/opencascade/AIS_AnimationObject.hxx @@ -23,30 +23,27 @@ class AIS_AnimationObject : public AIS_BaseAnimationObject { DEFINE_STANDARD_RTTIEXT(AIS_AnimationObject, AIS_BaseAnimationObject) public: - //! Constructor with initialization. //! Note that start/end transformations specify exactly local transformation of the object, //! not the transformation to be applied to existing local transformation. //! @param[in] theAnimationName animation identifier //! @param[in] theContext interactive context where object have been displayed //! @param[in] theObject object to apply local transformation - //! @param[in] theTrsfStart local transformation at the start of animation (e.g. theObject->LocalTransformation()) + //! @param[in] theTrsfStart local transformation at the start of animation (e.g. + //! theObject->LocalTransformation()) //! @param[in] theTrsfEnd local transformation at the end of animation - Standard_EXPORT AIS_AnimationObject (const TCollection_AsciiString& theAnimationName, - const Handle(AIS_InteractiveContext)& theContext, - const Handle(AIS_InteractiveObject)& theObject, - const gp_Trsf& theTrsfStart, - const gp_Trsf& theTrsfEnd); + Standard_EXPORT AIS_AnimationObject(const TCollection_AsciiString& theAnimationName, + const Handle(AIS_InteractiveContext)& theContext, + const Handle(AIS_InteractiveObject)& theObject, + const gp_Trsf& theTrsfStart, + const gp_Trsf& theTrsfEnd); protected: - //! Update the progress. - Standard_EXPORT virtual void update (const AIS_AnimationProgress& theProgress) Standard_OVERRIDE; + Standard_EXPORT virtual void update(const AIS_AnimationProgress& theProgress) Standard_OVERRIDE; private: - - gp_TrsfNLerp myTrsfLerp; //!< interpolation tool - + gp_TrsfNLerp myTrsfLerp; //!< interpolation tool }; #endif // _AIS_AnimationObject_HeaderFile diff --git a/opencascade/AIS_AttributeFilter.hxx b/opencascade/AIS_AttributeFilter.hxx index 0d910bed4..264727476 100644 --- a/opencascade/AIS_AttributeFilter.hxx +++ b/opencascade/AIS_AttributeFilter.hxx @@ -25,7 +25,6 @@ #include class SelectMgr_EntityOwner; - class AIS_AttributeFilter; DEFINE_STANDARD_HANDLE(AIS_AttributeFilter, SelectMgr_Filter) @@ -42,22 +41,18 @@ DEFINE_STANDARD_HANDLE(AIS_AttributeFilter, SelectMgr_Filter) class AIS_AttributeFilter : public SelectMgr_Filter { public: - //! Constructs an empty attribute filter object. //! This filter object determines whether selectable //! interactive objects have a non-null owner. Standard_EXPORT AIS_AttributeFilter(); - //! Constructs an attribute filter object defined by the //! color attribute aCol. Standard_EXPORT AIS_AttributeFilter(const Quantity_NameOfColor aCol); - //! Constructs an attribute filter object defined by the line //! width attribute aWidth. Standard_EXPORT AIS_AttributeFilter(const Standard_Real aWidth); - //! Indicates that the Interactive Object has the color //! setting specified by the argument aCol at construction time. @@ -69,17 +64,17 @@ public: Standard_Boolean HasWidth() const { return hasW; } //! Sets the color. - void SetColor (const Quantity_NameOfColor theCol) + void SetColor(const Quantity_NameOfColor theCol) { myCol = theCol; - hasC = Standard_True; + hasC = Standard_True; } //! Sets the line width. - void SetWidth (const Standard_Real theWidth) + void SetWidth(const Standard_Real theWidth) { myWid = theWidth; - hasW = Standard_True; + hasW = Standard_True; } //! Removes the setting for color from the filter. @@ -96,17 +91,16 @@ public: //! If the Interactive Object returns Standard_True //! when detected by the Local Context selector through //! the mouse, the object is kept; if not, it is rejected. - Standard_EXPORT virtual Standard_Boolean IsOk (const Handle(SelectMgr_EntityOwner)& anObj) const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean IsOk(const Handle(SelectMgr_EntityOwner)& anObj) const + Standard_OVERRIDE; - DEFINE_STANDARD_RTTIEXT(AIS_AttributeFilter,SelectMgr_Filter) + DEFINE_STANDARD_RTTIEXT(AIS_AttributeFilter, SelectMgr_Filter) private: - Quantity_NameOfColor myCol; - Standard_Real myWid; - Standard_Boolean hasC; - Standard_Boolean hasW; - + Standard_Real myWid; + Standard_Boolean hasC; + Standard_Boolean hasW; }; #endif // _AIS_AttributeFilter_HeaderFile diff --git a/opencascade/AIS_Axis.hxx b/opencascade/AIS_Axis.hxx index 23a928c2f..c41ea6d3a 100644 --- a/opencascade/AIS_Axis.hxx +++ b/opencascade/AIS_Axis.hxx @@ -38,13 +38,13 @@ class AIS_Axis : public AIS_InteractiveObject { DEFINE_STANDARD_RTTIEXT(AIS_Axis, AIS_InteractiveObject) public: - //! Initializes the line aComponent Standard_EXPORT AIS_Axis(const Handle(Geom_Line)& aComponent); //! initializes the axis2 position //! aComponent. The coordinate system used is right-handed. - Standard_EXPORT AIS_Axis(const Handle(Geom_Axis2Placement)& aComponent, const AIS_TypeOfAxis anAxisType); + Standard_EXPORT AIS_Axis(const Handle(Geom_Axis2Placement)& aComponent, + const AIS_TypeOfAxis anAxisType); //! Initializes the axis1 position anAxis. Standard_EXPORT AIS_Axis(const Handle(Geom_Axis1Placement)& anAxis); @@ -52,14 +52,14 @@ public: //! Initializes the ray as axis with start point and direction //! @param[in] theAxis Start point and direction of the ray //! @param[in] theLength Optional length of the ray (ray is infinite by default). - Standard_EXPORT AIS_Axis (const gp_Ax1& theAxis, const Standard_Real theLength = -1); + Standard_EXPORT AIS_Axis(const gp_Ax1& theAxis, const Standard_Real theLength = -1); //! Returns the axis entity aComponent and identifies it //! as a component of a shape. const Handle(Geom_Line)& Component() const { return myComponent; } //! Sets the coordinates of the lin aComponent. - Standard_EXPORT void SetComponent (const Handle(Geom_Line)& aComponent); + Standard_EXPORT void SetComponent(const Handle(Geom_Line)& aComponent); //! Returns the position of axis2 and positions it by //! identifying it as the x, y, or z axis and giving its @@ -69,17 +69,18 @@ public: //! Allows you to provide settings for aComponent:the //! position and direction of an axis in 3D space. The //! coordinate system used is right-handed. - Standard_EXPORT void SetAxis2Placement (const Handle(Geom_Axis2Placement)& aComponent, const AIS_TypeOfAxis anAxisType); - + Standard_EXPORT void SetAxis2Placement(const Handle(Geom_Axis2Placement)& aComponent, + const AIS_TypeOfAxis anAxisType); + //! Constructs a new line to serve as the axis anAxis in 3D space. - Standard_EXPORT void SetAxis1Placement (const Handle(Geom_Axis1Placement)& anAxis); - + Standard_EXPORT void SetAxis1Placement(const Handle(Geom_Axis1Placement)& anAxis); + //! Returns the type of axis. AIS_TypeOfAxis TypeOfAxis() const { return myTypeOfAxis; } //! Constructs the entity theTypeAxis to stock information //! concerning type of axis. - void SetTypeOfAxis (const AIS_TypeOfAxis theTypeAxis) { myTypeOfAxis = theTypeAxis; } + void SetTypeOfAxis(const AIS_TypeOfAxis theTypeAxis) { myTypeOfAxis = theTypeAxis; } //! Returns a signature of 2 for axis datums. When you //! activate mode 2 by a signature, you pick AIS objects @@ -87,47 +88,48 @@ public: Standard_Boolean IsXYZAxis() const { return myIsXYZAxis; } //! Returns true if the interactive object accepts the display mode aMode. - Standard_EXPORT Standard_Boolean AcceptDisplayMode (const Standard_Integer aMode) const Standard_OVERRIDE; + Standard_EXPORT Standard_Boolean + AcceptDisplayMode(const Standard_Integer aMode) const Standard_OVERRIDE; virtual Standard_Integer Signature() const Standard_OVERRIDE { return 2; } - virtual AIS_KindOfInteractive Type() const Standard_OVERRIDE { return AIS_KindOfInteractive_Datum; } + virtual AIS_KindOfInteractive Type() const Standard_OVERRIDE + { + return AIS_KindOfInteractive_Datum; + } - Standard_EXPORT void SetColor (const Quantity_Color& aColor) Standard_OVERRIDE; + Standard_EXPORT void SetColor(const Quantity_Color& aColor) Standard_OVERRIDE; - Standard_EXPORT void SetWidth (const Standard_Real aValue) Standard_OVERRIDE; + Standard_EXPORT void SetWidth(const Standard_Real aValue) Standard_OVERRIDE; //! Set required visualization parameters. - Standard_EXPORT void SetDisplayAspect (const Handle(Prs3d_LineAspect)& theNewDatumAspect); + Standard_EXPORT void SetDisplayAspect(const Handle(Prs3d_LineAspect)& theNewDatumAspect); Standard_EXPORT void UnsetColor() Standard_OVERRIDE; Standard_EXPORT void UnsetWidth() Standard_OVERRIDE; private: + Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager)& thePrsMgr, + const Handle(Prs3d_Presentation)& thePrs, + const Standard_Integer theMode) Standard_OVERRIDE; - Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr, - const Handle(Prs3d_Presentation)& thePrs, - const Standard_Integer theMode) Standard_OVERRIDE; - - Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSel, - const Standard_Integer theMode) Standard_OVERRIDE; + Standard_EXPORT virtual void ComputeSelection(const Handle(SelectMgr_Selection)& theSel, + const Standard_Integer theMode) Standard_OVERRIDE; Standard_EXPORT void ComputeFields(); private: - - Handle(Geom_Line) myComponent; + Handle(Geom_Line) myComponent; Handle(Geom_Axis2Placement) myAx2; - gp_Pnt myPfirst; - gp_Pnt myPlast; - AIS_TypeOfAxis myTypeOfAxis; - Standard_Boolean myIsXYZAxis; - gp_Dir myDir; - Standard_Real myVal; - Standard_CString myText; - Handle(Prs3d_LineAspect) myLineAspect; - + gp_Pnt myPfirst; + gp_Pnt myPlast; + AIS_TypeOfAxis myTypeOfAxis; + Standard_Boolean myIsXYZAxis; + gp_Dir myDir; + Standard_Real myVal; + Standard_CString myText; + Handle(Prs3d_LineAspect) myLineAspect; }; DEFINE_STANDARD_HANDLE(AIS_Axis, AIS_InteractiveObject) diff --git a/opencascade/AIS_BadEdgeFilter.hxx b/opencascade/AIS_BadEdgeFilter.hxx index a9f1ab19a..8548449d6 100644 --- a/opencascade/AIS_BadEdgeFilter.hxx +++ b/opencascade/AIS_BadEdgeFilter.hxx @@ -26,7 +26,6 @@ class SelectMgr_EntityOwner; class TopoDS_Edge; - class AIS_BadEdgeFilter; DEFINE_STANDARD_HANDLE(AIS_BadEdgeFilter, SelectMgr_Filter) @@ -35,50 +34,33 @@ class AIS_BadEdgeFilter : public SelectMgr_Filter { public: - - //! Constructs an empty filter object for bad edges. Standard_EXPORT AIS_BadEdgeFilter(); - - Standard_EXPORT virtual Standard_Boolean ActsOn (const TopAbs_ShapeEnum aType) const Standard_OVERRIDE; - - Standard_EXPORT virtual Standard_Boolean IsOk (const Handle(SelectMgr_EntityOwner)& EO) const Standard_OVERRIDE; - + + Standard_EXPORT virtual Standard_Boolean ActsOn(const TopAbs_ShapeEnum aType) const + Standard_OVERRIDE; + + Standard_EXPORT virtual Standard_Boolean IsOk(const Handle(SelectMgr_EntityOwner)& EO) const + Standard_OVERRIDE; + //! sets with current contour. used by //! IsOk. - Standard_EXPORT void SetContour (const Standard_Integer Index); - + Standard_EXPORT void SetContour(const Standard_Integer Index); + //! Adds an edge to the list of non-selectionnable //! edges. - Standard_EXPORT void AddEdge (const TopoDS_Edge& anEdge, const Standard_Integer Index); - + Standard_EXPORT void AddEdge(const TopoDS_Edge& anEdge, const Standard_Integer Index); + //! removes from the list of non-selectionnable edges //! all edges in the contour . - Standard_EXPORT void RemoveEdges (const Standard_Integer Index); - - + Standard_EXPORT void RemoveEdges(const Standard_Integer Index); - - DEFINE_STANDARD_RTTIEXT(AIS_BadEdgeFilter,SelectMgr_Filter) + DEFINE_STANDARD_RTTIEXT(AIS_BadEdgeFilter, SelectMgr_Filter) protected: - - - - private: - - TopTools_DataMapOfIntegerListOfShape myBadEdges; - Standard_Integer myContour; - - + Standard_Integer myContour; }; - - - - - - #endif // _AIS_BadEdgeFilter_HeaderFile diff --git a/opencascade/AIS_BaseAnimationObject.hxx b/opencascade/AIS_BaseAnimationObject.hxx index 8df788dc3..ecfdde37c 100644 --- a/opencascade/AIS_BaseAnimationObject.hxx +++ b/opencascade/AIS_BaseAnimationObject.hxx @@ -22,28 +22,24 @@ class AIS_BaseAnimationObject : public AIS_Animation { DEFINE_STANDARD_RTTIEXT(AIS_BaseAnimationObject, AIS_Animation) protected: - //! Constructor with initialization. //! @param[in] theAnimationName animation identifier //! @param[in] theContext interactive context where object have been displayed //! @param[in] theObject object to apply local transformation - Standard_EXPORT AIS_BaseAnimationObject (const TCollection_AsciiString& theAnimationName, - const Handle(AIS_InteractiveContext)& theContext, - const Handle(AIS_InteractiveObject)& theObject); + Standard_EXPORT AIS_BaseAnimationObject(const TCollection_AsciiString& theAnimationName, + const Handle(AIS_InteractiveContext)& theContext, + const Handle(AIS_InteractiveObject)& theObject); //! Update the transformation. - Standard_EXPORT void updateTrsf (const gp_Trsf& theTrsf); + Standard_EXPORT void updateTrsf(const gp_Trsf& theTrsf); private: - //! Invalidate the viewer for proper update. Standard_EXPORT void invalidateViewer(); protected: - - Handle(AIS_InteractiveContext) myContext; //!< context where object is displayed - Handle(AIS_InteractiveObject) myObject; //!< presentation object to set location - + Handle(AIS_InteractiveContext) myContext; //!< context where object is displayed + Handle(AIS_InteractiveObject) myObject; //!< presentation object to set location }; #endif // _AIS_BaseAnimationObject_HeaderFile diff --git a/opencascade/AIS_C0RegularityFilter.hxx b/opencascade/AIS_C0RegularityFilter.hxx index 6da54fe2f..54403456d 100644 --- a/opencascade/AIS_C0RegularityFilter.hxx +++ b/opencascade/AIS_C0RegularityFilter.hxx @@ -25,45 +25,26 @@ class TopoDS_Shape; class SelectMgr_EntityOwner; - class AIS_C0RegularityFilter; DEFINE_STANDARD_HANDLE(AIS_C0RegularityFilter, SelectMgr_Filter) - class AIS_C0RegularityFilter : public SelectMgr_Filter { public: - - Standard_EXPORT AIS_C0RegularityFilter(const TopoDS_Shape& aShape); - - Standard_EXPORT virtual Standard_Boolean ActsOn (const TopAbs_ShapeEnum aType) const Standard_OVERRIDE; - - Standard_EXPORT virtual Standard_Boolean IsOk (const Handle(SelectMgr_EntityOwner)& EO) const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean ActsOn(const TopAbs_ShapeEnum aType) const + Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean IsOk(const Handle(SelectMgr_EntityOwner)& EO) const + Standard_OVERRIDE; - - DEFINE_STANDARD_RTTIEXT(AIS_C0RegularityFilter,SelectMgr_Filter) + DEFINE_STANDARD_RTTIEXT(AIS_C0RegularityFilter, SelectMgr_Filter) protected: - - - - private: - - TopTools_MapOfShape myMapOfEdges; - - }; - - - - - - #endif // _AIS_C0RegularityFilter_HeaderFile diff --git a/opencascade/AIS_CameraFrustum.hxx b/opencascade/AIS_CameraFrustum.hxx index 4e8dcaa4e..8c6bda289 100644 --- a/opencascade/AIS_CameraFrustum.hxx +++ b/opencascade/AIS_CameraFrustum.hxx @@ -27,7 +27,6 @@ class AIS_CameraFrustum : public AIS_InteractiveObject { DEFINE_STANDARD_RTTIEXT(AIS_CameraFrustum, AIS_InteractiveObject) public: - //! Selection modes supported by this object enum SelectionMode { @@ -36,15 +35,14 @@ public: }; public: - //! Constructs camera frustum with default configuration. Standard_EXPORT AIS_CameraFrustum(); //! Sets camera frustum. - Standard_EXPORT void SetCameraFrustum (const Handle(Graphic3d_Camera)& theCamera); + Standard_EXPORT void SetCameraFrustum(const Handle(Graphic3d_Camera)& theCamera); //! Setup custom color. - Standard_EXPORT virtual void SetColor (const Quantity_Color& theColor) Standard_OVERRIDE; + Standard_EXPORT virtual void SetColor(const Quantity_Color& theColor) Standard_OVERRIDE; //! Restore default color. Standard_EXPORT virtual void UnsetColor() Standard_OVERRIDE; @@ -53,21 +51,20 @@ public: Standard_EXPORT virtual void UnsetTransparency() Standard_OVERRIDE; //! Return true if specified display mode is supported. - Standard_EXPORT virtual Standard_Boolean AcceptDisplayMode (const Standard_Integer theMode) const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean AcceptDisplayMode(const Standard_Integer theMode) const + Standard_OVERRIDE; protected: - //! Computes presentation of camera frustum. - Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr, - const Handle(Prs3d_Presentation)& thePrs, - const Standard_Integer theMode) Standard_OVERRIDE; + Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager)& thePrsMgr, + const Handle(Prs3d_Presentation)& thePrs, + const Standard_Integer theMode) Standard_OVERRIDE; //! Compute selection. - Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSelection, - const Standard_Integer theMode) Standard_OVERRIDE; + Standard_EXPORT virtual void ComputeSelection(const Handle(SelectMgr_Selection)& theSelection, + const Standard_Integer theMode) Standard_OVERRIDE; private: - //! Fills triangles primitive array for camera frustum filling. void fillTriangles(); @@ -75,11 +72,9 @@ private: void fillBorders(); protected: - NCollection_Array1 myPoints; //!< Array of points Handle(Graphic3d_ArrayOfTriangles) myTriangles; //!< Triangles for camera frustum filling Handle(Graphic3d_ArrayOfSegments) myBorders; //!< Segments for camera frustum borders - }; #endif // _AIS_CameraFrustum_HeaderFile diff --git a/opencascade/AIS_Circle.hxx b/opencascade/AIS_Circle.hxx index fb6b7cabf..a17fd569c 100644 --- a/opencascade/AIS_Circle.hxx +++ b/opencascade/AIS_Circle.hxx @@ -27,97 +27,102 @@ class AIS_Circle : public AIS_InteractiveObject { DEFINE_STANDARD_RTTIEXT(AIS_Circle, AIS_InteractiveObject) public: - //! Initializes this algorithm for constructing AIS circle //! datums initializes the circle aCircle Standard_EXPORT AIS_Circle(const Handle(Geom_Circle)& aCircle); - + //! Initializes this algorithm for constructing AIS circle datums. //! Initializes the circle theCircle, the arc //! starting point theUStart, the arc ending point theUEnd, //! and the type of sensitivity theIsFilledCircleSens. - Standard_EXPORT AIS_Circle(const Handle(Geom_Circle)& theCircle, const Standard_Real theUStart, const Standard_Real theUEnd, const Standard_Boolean theIsFilledCircleSens = Standard_False); + Standard_EXPORT AIS_Circle(const Handle(Geom_Circle)& theCircle, + const Standard_Real theUStart, + const Standard_Real theUEnd, + const Standard_Boolean theIsFilledCircleSens = Standard_False); //! Returns index 6 by default. virtual Standard_Integer Signature() const Standard_OVERRIDE { return 6; } //! Indicates that the type of Interactive Object is a datum. - virtual AIS_KindOfInteractive Type() const Standard_OVERRIDE { return AIS_KindOfInteractive_Datum; } + virtual AIS_KindOfInteractive Type() const Standard_OVERRIDE + { + return AIS_KindOfInteractive_Datum; + } //! Returns the circle component defined in SetCircle. const Handle(Geom_Circle)& Circle() const { return myComponent; } //! Constructs instances of the starting point and the end //! point parameters, theU1 and theU2. - void Parameters (Standard_Real& theU1, Standard_Real& theU2) const + void Parameters(Standard_Real& theU1, Standard_Real& theU2) const { theU1 = myUStart; theU2 = myUEnd; } //! Allows you to provide settings for the circle datum aCircle. - void SetCircle (const Handle(Geom_Circle)& theCircle) { myComponent = theCircle; } + void SetCircle(const Handle(Geom_Circle)& theCircle) { myComponent = theCircle; } //! Allows you to set the parameter theU for the starting point of an arc. - void SetFirstParam (const Standard_Real theU) + void SetFirstParam(const Standard_Real theU) { - myUStart = theU; + myUStart = theU; myCircleIsArc = Standard_True; } //! Allows you to provide the parameter theU for the end point of an arc. - void SetLastParam (const Standard_Real theU) + void SetLastParam(const Standard_Real theU) { - myUEnd = theU; + myUEnd = theU; myCircleIsArc = Standard_True; } - Standard_EXPORT void SetColor (const Quantity_Color& aColor) Standard_OVERRIDE; - + Standard_EXPORT void SetColor(const Quantity_Color& aColor) Standard_OVERRIDE; + //! Assigns the width aValue to the solid line boundary of the circle datum. - Standard_EXPORT void SetWidth (const Standard_Real aValue) Standard_OVERRIDE; - + Standard_EXPORT void SetWidth(const Standard_Real aValue) Standard_OVERRIDE; + //! Removes color from the solid line boundary of the circle datum. Standard_EXPORT void UnsetColor() Standard_OVERRIDE; - + //! Removes width settings from the solid line boundary of the circle datum. Standard_EXPORT void UnsetWidth() Standard_OVERRIDE; - + //! Returns the type of sensitivity for the circle; Standard_Boolean IsFilledCircleSens() const { return myIsFilledCircleSens; } //! Sets the type of sensitivity for the circle. If theIsFilledCircleSens set to Standard_True //! then the whole circle will be detectable, otherwise only the boundary of the circle. - void SetFilledCircleSens (const Standard_Boolean theIsFilledCircleSens) { myIsFilledCircleSens = theIsFilledCircleSens; } + void SetFilledCircleSens(const Standard_Boolean theIsFilledCircleSens) + { + myIsFilledCircleSens = theIsFilledCircleSens; + } private: + Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager)& thePrsMgr, + const Handle(Prs3d_Presentation)& theprs, + const Standard_Integer theMode) Standard_OVERRIDE; - Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr, - const Handle(Prs3d_Presentation)& theprs, - const Standard_Integer theMode) Standard_OVERRIDE; + Standard_EXPORT virtual void ComputeSelection(const Handle(SelectMgr_Selection)& theSel, + const Standard_Integer theMode) Standard_OVERRIDE; - Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSel, - const Standard_Integer theMode) Standard_OVERRIDE; + Standard_EXPORT void ComputeCircle(const Handle(Prs3d_Presentation)& aPresentation); - Standard_EXPORT void ComputeCircle (const Handle(Prs3d_Presentation)& aPresentation); + Standard_EXPORT void ComputeArc(const Handle(Prs3d_Presentation)& aPresentation); - Standard_EXPORT void ComputeArc (const Handle(Prs3d_Presentation)& aPresentation); + Standard_EXPORT void ComputeCircleSelection(const Handle(SelectMgr_Selection)& aSelection); - Standard_EXPORT void ComputeCircleSelection (const Handle(SelectMgr_Selection)& aSelection); - - Standard_EXPORT void ComputeArcSelection (const Handle(SelectMgr_Selection)& aSelection); + Standard_EXPORT void ComputeArcSelection(const Handle(SelectMgr_Selection)& aSelection); //! Replace aspects of already computed groups with the new value. - void replaceWithNewLineAspect (const Handle(Prs3d_LineAspect)& theAspect); + void replaceWithNewLineAspect(const Handle(Prs3d_LineAspect)& theAspect); private: - Handle(Geom_Circle) myComponent; - Standard_Real myUStart; - Standard_Real myUEnd; - Standard_Boolean myCircleIsArc; - Standard_Boolean myIsFilledCircleSens; - + Standard_Real myUStart; + Standard_Real myUEnd; + Standard_Boolean myCircleIsArc; + Standard_Boolean myIsFilledCircleSens; }; DEFINE_STANDARD_HANDLE(AIS_Circle, AIS_InteractiveObject) diff --git a/opencascade/AIS_ColorScale.hxx b/opencascade/AIS_ColorScale.hxx index a24dd88b9..8a8fbfb30 100644 --- a/opencascade/AIS_ColorScale.hxx +++ b/opencascade/AIS_ColorScale.hxx @@ -26,6 +26,7 @@ class AIS_ColorScale; DEFINE_STANDARD_HANDLE(AIS_ColorScale, AIS_InteractiveObject) + //! Class for drawing a custom color scale. //! //! The color scale consists of rectangular color bar (composed of fixed @@ -39,71 +40,81 @@ class AIS_ColorScale : public AIS_InteractiveObject { DEFINE_STANDARD_RTTIEXT(AIS_ColorScale, AIS_InteractiveObject) public: - //! Calculate color according passed value; returns true if value is in range or false, if isn't - Standard_EXPORT static Standard_Boolean FindColor (const Standard_Real theValue, - const Standard_Real theMin, - const Standard_Real theMax, - const Standard_Integer theColorsCount, - const Graphic3d_Vec3d& theColorHlsMin, - const Graphic3d_Vec3d& theColorHlsMax, - Quantity_Color& theColor); + Standard_EXPORT static Standard_Boolean FindColor(const Standard_Real theValue, + const Standard_Real theMin, + const Standard_Real theMax, + const Standard_Integer theColorsCount, + const Graphic3d_Vec3d& theColorHlsMin, + const Graphic3d_Vec3d& theColorHlsMax, + Quantity_Color& theColor); //! Calculate color according passed value; returns true if value is in range or false, if isn't - static Standard_Boolean FindColor (const Standard_Real theValue, - const Standard_Real theMin, - const Standard_Real theMax, - const Standard_Integer theColorsCount, - Quantity_Color& theColor) + static Standard_Boolean FindColor(const Standard_Real theValue, + const Standard_Real theMin, + const Standard_Real theMax, + const Standard_Integer theColorsCount, + Quantity_Color& theColor) { - return FindColor (theValue, theMin, theMax, theColorsCount, - Graphic3d_Vec3d (230.0, 1.0, 1.0), - Graphic3d_Vec3d (0.0, 1.0, 1.0), - theColor); + return FindColor(theValue, + theMin, + theMax, + theColorsCount, + Graphic3d_Vec3d(230.0, 1.0, 1.0), + Graphic3d_Vec3d(0.0, 1.0, 1.0), + theColor); } //! Shift hue into valid range. //! Lightness and Saturation should be specified in valid range [0.0, 1.0], - //! however Hue might be given out of Quantity_Color range to specify desired range for interpolation. - static Standard_Real hueToValidRange (const Standard_Real theHue) + //! however Hue might be given out of Quantity_Color range to specify desired range for + //! interpolation. + static Standard_Real hueToValidRange(const Standard_Real theHue) { Standard_Real aHue = theHue; - while (aHue < 0.0) { aHue += 360.0; } - while (aHue > 360.0) { aHue -= 360.0; } + while (aHue < 0.0) + { + aHue += 360.0; + } + while (aHue > 360.0) + { + aHue -= 360.0; + } return aHue; } public: - //! Default constructor. Standard_EXPORT AIS_ColorScale(); //! Calculate color according passed value; returns true if value is in range or false, if isn't - Standard_EXPORT Standard_Boolean FindColor (const Standard_Real theValue, Quantity_Color& theColor) const; + Standard_EXPORT Standard_Boolean FindColor(const Standard_Real theValue, + Quantity_Color& theColor) const; //! Returns minimal value of color scale, 0.0 by default. Standard_Real GetMin() const { return myMin; } //! Sets the minimal value of color scale. - void SetMin (const Standard_Real theMin) { SetRange (theMin, GetMax()); } + void SetMin(const Standard_Real theMin) { SetRange(theMin, GetMax()); } //! Returns maximal value of color scale, 1.0 by default. Standard_Real GetMax() const { return myMax; } //! Sets the maximal value of color scale. - void SetMax (const Standard_Real theMax) { SetRange (GetMin(), theMax); } + void SetMax(const Standard_Real theMax) { SetRange(GetMin(), theMax); } //! Returns minimal and maximal values of color scale, 0.0 to 1.0 by default. - void GetRange (Standard_Real& theMin, Standard_Real& theMax) const + void GetRange(Standard_Real& theMin, Standard_Real& theMax) const { theMin = myMin; theMax = myMax; } //! Sets the minimal and maximal value of color scale. - //! Note that values order will be ignored - the minimum and maximum values will be swapped if needed. + //! Note that values order will be ignored - the minimum and maximum values will be swapped if + //! needed. //! ::SetReversed() should be called to swap displaying order. - Standard_EXPORT void SetRange (const Standard_Real theMin, const Standard_Real theMax); + Standard_EXPORT void SetRange(const Standard_Real theMin, const Standard_Real theMax); //! Returns the hue angle corresponding to minimum value, 230 by default (blue). Standard_Real HueMin() const { return myColorHlsMin[0]; } @@ -111,9 +122,9 @@ public: //! Returns the hue angle corresponding to maximum value, 0 by default (red). Standard_Real HueMax() const { return myColorHlsMax[0]; } - //! Returns the hue angle range corresponding to minimum and maximum values, 230 to 0 by default (blue to red). - void HueRange (Standard_Real& theMinAngle, - Standard_Real& theMaxAngle) const + //! Returns the hue angle range corresponding to minimum and maximum values, 230 to 0 by default + //! (blue to red). + void HueRange(Standard_Real& theMinAngle, Standard_Real& theMaxAngle) const { theMinAngle = myColorHlsMin[0]; theMaxAngle = myColorHlsMax[0]; @@ -121,27 +132,30 @@ public: //! Sets hue angle range corresponding to minimum and maximum values. //! The valid angle range is [0, 360], see Quantity_Color and Quantity_TOC_HLS for more details. - void SetHueRange (const Standard_Real theMinAngle, - const Standard_Real theMaxAngle) + void SetHueRange(const Standard_Real theMinAngle, const Standard_Real theMaxAngle) { myColorHlsMin[0] = theMinAngle; myColorHlsMax[0] = theMaxAngle; } //! Returns color range corresponding to minimum and maximum values, blue to red by default. - void ColorRange (Quantity_Color& theMinColor, - Quantity_Color& theMaxColor) const + void ColorRange(Quantity_Color& theMinColor, Quantity_Color& theMaxColor) const { - theMinColor.SetValues (hueToValidRange (myColorHlsMin[0]), myColorHlsMin[1], myColorHlsMin[2], Quantity_TOC_HLS); - theMaxColor.SetValues (hueToValidRange (myColorHlsMax[0]), myColorHlsMax[1], myColorHlsMax[2], Quantity_TOC_HLS); + theMinColor.SetValues(hueToValidRange(myColorHlsMin[0]), + myColorHlsMin[1], + myColorHlsMin[2], + Quantity_TOC_HLS); + theMaxColor.SetValues(hueToValidRange(myColorHlsMax[0]), + myColorHlsMax[1], + myColorHlsMax[2], + Quantity_TOC_HLS); } //! Sets color range corresponding to minimum and maximum values. - void SetColorRange (const Quantity_Color& theMinColor, - const Quantity_Color& theMaxColor) + void SetColorRange(const Quantity_Color& theMinColor, const Quantity_Color& theMaxColor) { - theMinColor.Values (myColorHlsMin[0], myColorHlsMin[1], myColorHlsMin[2], Quantity_TOC_HLS); - theMaxColor.Values (myColorHlsMax[0], myColorHlsMax[1], myColorHlsMax[2], Quantity_TOC_HLS); + theMinColor.Values(myColorHlsMin[0], myColorHlsMin[1], myColorHlsMin[2], Quantity_TOC_HLS); + theMaxColor.Values(myColorHlsMax[0], myColorHlsMax[1], myColorHlsMax[2], Quantity_TOC_HLS); } //! Returns the type of labels, Aspect_TOCSD_AUTO by default. @@ -152,7 +166,7 @@ public: //! Sets the type of labels. //! Aspect_TOCSD_AUTO - labels as boundary values for intervals //! Aspect_TOCSD_USER - user specified label is used - void SetLabelType (const Aspect_TypeOfColorScaleData theType) { myLabelType = theType; } + void SetLabelType(const Aspect_TypeOfColorScaleData theType) { myLabelType = theType; } //! Returns the type of colors, Aspect_TOCSD_AUTO by default. //! Aspect_TOCSD_AUTO - value between Red and Blue @@ -162,19 +176,19 @@ public: //! Sets the type of colors. //! Aspect_TOCSD_AUTO - value between Red and Blue //! Aspect_TOCSD_USER - user specified color from color map - void SetColorType (const Aspect_TypeOfColorScaleData theType) { myColorType = theType; } + void SetColorType(const Aspect_TypeOfColorScaleData theType) { myColorType = theType; } //! Returns the number of color scale intervals, 10 by default. Standard_Integer GetNumberOfIntervals() const { return myNbIntervals; } //! Sets the number of color scale intervals. - Standard_EXPORT void SetNumberOfIntervals (const Standard_Integer theNum); + Standard_EXPORT void SetNumberOfIntervals(const Standard_Integer theNum); //! Returns the color scale title string, empty string by default. const TCollection_ExtendedString& GetTitle() const { return myTitle; } //! Sets the color scale title string. - void SetTitle (const TCollection_ExtendedString& theTitle) { myTitle = theTitle; } + void SetTitle(const TCollection_ExtendedString& theTitle) { myTitle = theTitle; } //! Returns the format for numbers, "%.4g" by default. //! The same like format for function printf(). @@ -185,58 +199,60 @@ public: const TCollection_AsciiString& Format() const { return myFormat; } //! Sets the color scale auto label format specification. - void SetFormat (const TCollection_AsciiString& theFormat) { myFormat = theFormat; } + void SetFormat(const TCollection_AsciiString& theFormat) { myFormat = theFormat; } //! Returns the user specified label with index theIndex. //! Index is in range from 1 to GetNumberOfIntervals() or to //! GetNumberOfIntervals() + 1 if IsLabelAtBorder() is true. //! Returns empty string if label not defined. - Standard_EXPORT TCollection_ExtendedString GetLabel (const Standard_Integer theIndex) const; + Standard_EXPORT TCollection_ExtendedString GetLabel(const Standard_Integer theIndex) const; //! Returns the user specified color from color map with index (starts at 1). //! Returns default color if index is out of range in color map. - Standard_EXPORT Quantity_Color GetIntervalColor (const Standard_Integer theIndex) const; + Standard_EXPORT Quantity_Color GetIntervalColor(const Standard_Integer theIndex) const; - //! Sets the color of the specified interval. + //! Sets the color of the specified interval. //! Note that list is automatically resized to include specified index. //! @param theColor color value to set //! @param theIndex index in range [1, GetNumberOfIntervals()]; //! appended to the end of list if -1 is specified - Standard_EXPORT void SetIntervalColor (const Quantity_Color& theColor, const Standard_Integer theIndex); + Standard_EXPORT void SetIntervalColor(const Quantity_Color& theColor, + const Standard_Integer theIndex); //! Returns the user specified labels. - Standard_EXPORT void GetLabels (TColStd_SequenceOfExtendedString& theLabels) const; + Standard_EXPORT void GetLabels(TColStd_SequenceOfExtendedString& theLabels) const; //! Returns the user specified labels. const TColStd_SequenceOfExtendedString& Labels() const { return myLabels; } //! Sets the color scale labels. - //! The length of the sequence should be equal to GetNumberOfIntervals() or to GetNumberOfIntervals() + 1 if IsLabelAtBorder() is true. - //! If length of the sequence does not much the number of intervals, - //! then these labels will be considered as "free" and will be located - //! at the virtual intervals corresponding to the number of labels - //! (with flag IsLabelAtBorder() having the same effect as in normal case). - Standard_EXPORT void SetLabels (const TColStd_SequenceOfExtendedString& theSeq); + //! The length of the sequence should be equal to GetNumberOfIntervals() or to + //! GetNumberOfIntervals() + 1 if IsLabelAtBorder() is true. If length of the sequence does not + //! much the number of intervals, then these labels will be considered as "free" and will be + //! located at the virtual intervals corresponding to the number of labels (with flag + //! IsLabelAtBorder() having the same effect as in normal case). + Standard_EXPORT void SetLabels(const TColStd_SequenceOfExtendedString& theSeq); //! Returns the user specified colors. - Standard_EXPORT void GetColors (Aspect_SequenceOfColor& theColors) const; + Standard_EXPORT void GetColors(Aspect_SequenceOfColor& theColors) const; //! Returns the user specified colors. const Aspect_SequenceOfColor& GetColors() const { return myColors; } //! Sets the color scale colors. //! The length of the sequence should be equal to GetNumberOfIntervals(). - Standard_EXPORT void SetColors (const Aspect_SequenceOfColor& theSeq); + Standard_EXPORT void SetColors(const Aspect_SequenceOfColor& theSeq); //! Populates colors scale by colors of the same lightness value in CIE Lch //! color space, distributed by hue, with perceptually uniform differences //! between consequent colors. //! See MakeUniformColors() for description of parameters. - void SetUniformColors (Standard_Real theLightness, - Standard_Real theHueFrom, Standard_Real theHueTo) + void SetUniformColors(Standard_Real theLightness, + Standard_Real theHueFrom, + Standard_Real theHueTo) { - SetColors (MakeUniformColors (myNbIntervals, theLightness, theHueFrom, theHueTo)); - SetColorType (Aspect_TOCSD_USER); + SetColors(MakeUniformColors(myNbIntervals, theLightness, theHueFrom, theHueTo)); + SetColorType(Aspect_TOCSD_USER); } //! Generates sequence of colors of the same lightness value in CIE Lch @@ -250,26 +266,29 @@ public: //! lightness of pure blue) //! @param theHueFrom - hue value at the start of the scale //! @param theHueTo - hue value defining the end of the scale - //! + //! //! Hue value can be out of the range [0, 360], interpreted as modulo 360. //! The colors of the scale will be in the order of increasing hue if //! theHueTo > theHueFrom, and decreasing otherwise. - Standard_EXPORT static Aspect_SequenceOfColor - MakeUniformColors (Standard_Integer theNbColors, Standard_Real theLightness, - Standard_Real theHueFrom, Standard_Real theHueTo); + Standard_EXPORT static Aspect_SequenceOfColor MakeUniformColors(Standard_Integer theNbColors, + Standard_Real theLightness, + Standard_Real theHueFrom, + Standard_Real theHueTo); - //! Returns the position of labels concerning color filled rectangles, Aspect_TOCSP_RIGHT by default. + //! Returns the position of labels concerning color filled rectangles, Aspect_TOCSP_RIGHT by + //! default. Aspect_TypeOfColorScalePosition GetLabelPosition() const { return myLabelPos; } //! Sets the color scale labels position relative to color bar. - void SetLabelPosition (const Aspect_TypeOfColorScalePosition thePos) { myLabelPos = thePos; } + void SetLabelPosition(const Aspect_TypeOfColorScalePosition thePos) { myLabelPos = thePos; } //! Returns the position of color scale title, Aspect_TOCSP_LEFT by default. Aspect_TypeOfColorScalePosition GetTitlePosition() const { return myTitlePos; } //! Sets the color scale title position. Standard_DEPRECATED("AIS_ColorScale::SetTitlePosition() has no effect!") - void SetTitlePosition (const Aspect_TypeOfColorScalePosition thePos) { myTitlePos = thePos; } + + void SetTitlePosition(const Aspect_TypeOfColorScalePosition thePos) { myTitlePos = thePos; } //! Returns TRUE if the labels and colors used in reversed order, FALSE by default. //! - Normal, bottom-up order with Minimal value on the Bottom and Maximum value on Top. @@ -277,14 +296,14 @@ public: Standard_Boolean IsReversed() const { return myIsReversed; } //! Sets true if the labels and colors used in reversed order. - void SetReversed (const Standard_Boolean theReverse) { myIsReversed = theReverse; } + void SetReversed(const Standard_Boolean theReverse) { myIsReversed = theReverse; } //! Return TRUE if color transition between neighbor intervals //! should be linearly interpolated, FALSE by default. Standard_Boolean IsSmoothTransition() const { return myIsSmooth; } //! Setup smooth color transition. - void SetSmoothTransition (const Standard_Boolean theIsSmooth) { myIsSmooth = theIsSmooth; } + void SetSmoothTransition(const Standard_Boolean theIsSmooth) { myIsSmooth = theIsSmooth; } //! Returns TRUE if the labels are placed at border of color intervals, TRUE by default. //! The automatically generated label will show value exactly on the current position: @@ -294,31 +313,33 @@ public: //! Sets true if the labels are placed at border of color intervals (TRUE by default). //! If set to False, labels will be drawn at color intervals rather than at borders. - void SetLabelAtBorder (const Standard_Boolean theOn) { myIsLabelAtBorder = theOn; } + void SetLabelAtBorder(const Standard_Boolean theOn) { myIsLabelAtBorder = theOn; } //! Returns TRUE if the color scale has logarithmic intervals, FALSE by default. Standard_Boolean IsLogarithmic() const { return myIsLogarithmic; } //! Sets true if the color scale has logarithmic intervals. - void SetLogarithmic (const Standard_Boolean isLogarithmic) { myIsLogarithmic = isLogarithmic; } + void SetLogarithmic(const Standard_Boolean isLogarithmic) { myIsLogarithmic = isLogarithmic; } //! Sets the color scale label at index. //! Note that list is automatically resized to include specified index. //! @param theLabel new label text - //! @param theIndex index in range [1, GetNumberOfIntervals()] or [1, GetNumberOfIntervals() + 1] if IsLabelAtBorder() is true; + //! @param theIndex index in range [1, GetNumberOfIntervals()] or [1, GetNumberOfIntervals() + 1] + //! if IsLabelAtBorder() is true; //! label is appended to the end of list if negative index is specified - Standard_EXPORT void SetLabel (const TCollection_ExtendedString& theLabel, const Standard_Integer theIndex); + Standard_EXPORT void SetLabel(const TCollection_ExtendedString& theLabel, + const Standard_Integer theIndex); //! Returns the size of color bar, 0 and 0 by default //! (e.g. should be set by user explicitly before displaying). - void GetSize (Standard_Integer& theBreadth, Standard_Integer& theHeight) const + void GetSize(Standard_Integer& theBreadth, Standard_Integer& theHeight) const { theBreadth = myBreadth; theHeight = myHeight; } //! Sets the size of color bar. - void SetSize (const Standard_Integer theBreadth, const Standard_Integer theHeight) + void SetSize(const Standard_Integer theBreadth, const Standard_Integer theHeight) { myBreadth = theBreadth; myHeight = theHeight; @@ -329,24 +350,24 @@ public: Standard_Integer GetBreadth() const { return myBreadth; } //! Sets the width of color bar. - void SetBreadth (const Standard_Integer theBreadth) { myBreadth = theBreadth; } + void SetBreadth(const Standard_Integer theBreadth) { myBreadth = theBreadth; } //! Returns the height of color bar, 0 by default //! (e.g. should be set by user explicitly before displaying). Standard_Integer GetHeight() const { return myHeight; } //! Sets the height of color bar. - void SetHeight (const Standard_Integer theHeight) { myHeight = theHeight; } + void SetHeight(const Standard_Integer theHeight) { myHeight = theHeight; } //! Returns the bottom-left position of color scale, 0x0 by default. - void GetPosition (Standard_Real& theX, Standard_Real& theY) const + void GetPosition(Standard_Real& theX, Standard_Real& theY) const { theX = myXPos; theY = myYPos; } //! Sets the position of color scale. - void SetPosition (const Standard_Integer theX, const Standard_Integer theY) + void SetPosition(const Standard_Integer theX, const Standard_Integer theY) { myXPos = theX; myYPos = theY; @@ -356,115 +377,120 @@ public: Standard_Integer GetXPosition() const { return myXPos; } //! Sets the left position of color scale. - void SetXPosition (const Standard_Integer theX) { myXPos = theX; } + void SetXPosition(const Standard_Integer theX) { myXPos = theX; } //! Returns the bottom position of color scale, 0 by default. Standard_Integer GetYPosition() const { return myYPos; } //! Sets the bottom position of color scale. - void SetYPosition (const Standard_Integer theY) { myYPos = theY; } + void SetYPosition(const Standard_Integer theY) { myYPos = theY; } //! Returns the font height of text labels, 20 by default. Standard_Integer GetTextHeight() const { return myTextHeight; } //! Sets the height of text of color scale. - void SetTextHeight (const Standard_Integer theHeight) { myTextHeight = theHeight; } + void SetTextHeight(const Standard_Integer theHeight) { myTextHeight = theHeight; } public: - //! Returns the width of text. - //! @param theText [in] the text of which to calculate width. - Standard_EXPORT Standard_Integer TextWidth (const TCollection_ExtendedString& theText) const; + //! @param[in] theText the text of which to calculate width. + Standard_EXPORT Standard_Integer TextWidth(const TCollection_ExtendedString& theText) const; //! Returns the height of text. - //! @param theText [in] the text of which to calculate height. - Standard_EXPORT Standard_Integer TextHeight (const TCollection_ExtendedString& theText) const; + //! @param[in] theText the text of which to calculate height. + Standard_EXPORT Standard_Integer TextHeight(const TCollection_ExtendedString& theText) const; - Standard_EXPORT void TextSize (const TCollection_ExtendedString& theText, - const Standard_Integer theHeight, - Standard_Integer& theWidth, - Standard_Integer& theAscent, - Standard_Integer& theDescent) const; + Standard_EXPORT void TextSize(const TCollection_ExtendedString& theText, + const Standard_Integer theHeight, + Standard_Integer& theWidth, + Standard_Integer& theAscent, + Standard_Integer& theDescent) const; public: - //! Return true if specified display mode is supported. - virtual Standard_Boolean AcceptDisplayMode (const Standard_Integer theMode) const Standard_OVERRIDE { return theMode == 0; } + virtual Standard_Boolean AcceptDisplayMode(const Standard_Integer theMode) const Standard_OVERRIDE + { + return theMode == 0; + } //! Compute presentation. - Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr, - const Handle(Prs3d_Presentation)& thePresentation, - const Standard_Integer theMode) Standard_OVERRIDE; + Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager)& thePrsMgr, + const Handle(Prs3d_Presentation)& thePresentation, + const Standard_Integer theMode) Standard_OVERRIDE; //! Compute selection - not implemented for color scale. - virtual void ComputeSelection (const Handle(SelectMgr_Selection)& /*aSelection*/, - const Standard_Integer /*aMode*/) Standard_OVERRIDE {} + virtual void ComputeSelection(const Handle(SelectMgr_Selection)& /*aSelection*/, + const Standard_Integer /*aMode*/) Standard_OVERRIDE + { + } private: - //! Returns the size of color scale. - //! @param theWidth [out] the width of color scale. - //! @param theHeight [out] the height of color scale. - void SizeHint (Standard_Integer& theWidth, Standard_Integer& theHeight) const; + //! @param[out] theWidth the width of color scale. + //! @param[out] theHeight the height of color scale. + void SizeHint(Standard_Integer& theWidth, Standard_Integer& theHeight) const; //! Returns the upper value of given interval, or minimum for theIndex = 0. - Standard_Real GetIntervalValue (const Standard_Integer theIndex) const; + Standard_Real GetIntervalValue(const Standard_Integer theIndex) const; //! Returns the color for the given value in the given interval. - //! @param theValue [in] the current value of interval - //! @param theMin [in] the min value of interval - //! @param theMax [in] the max value of interval - Quantity_Color colorFromValue (const Standard_Real theValue, - const Standard_Real theMin, - const Standard_Real theMax) const; + //! @param[in] theValue the current value of interval + //! @param[in] theMin the min value of interval + //! @param[in] theMax the max value of interval + Quantity_Color colorFromValue(const Standard_Real theValue, + const Standard_Real theMin, + const Standard_Real theMax) const; //! Initialize text aspect for drawing the labels. void updateTextAspect(); //! Simple alias for Prs3d_Text::Draw(). - //! @param theGroup [in] presentation group - //! @param theText [in] text to draw - //! @param theX [in] X coordinate of text position - //! @param theY [in] Y coordinate of text position - //! @param theVertAlignment [in] text vertical alignment - void drawText (const Handle(Graphic3d_Group)& theGroup, - const TCollection_ExtendedString& theText, - const Standard_Integer theX, const Standard_Integer theY, - const Graphic3d_VerticalTextAlignment theVertAlignment); + //! @param[in] theGroup presentation group + //! @param[in] theText text to draw + //! @param[in] theX X coordinate of text position + //! @param[in] theY Y coordinate of text position + //! @param[in] theVertAlignment text vertical alignment + void drawText(const Handle(Graphic3d_Group)& theGroup, + const TCollection_ExtendedString& theText, + const Standard_Integer theX, + const Standard_Integer theY, + const Graphic3d_VerticalTextAlignment theVertAlignment); //! Determine the maximum text label width in pixels. - Standard_Integer computeMaxLabelWidth (const TColStd_SequenceOfExtendedString& theLabels) const; + Standard_Integer computeMaxLabelWidth(const TColStd_SequenceOfExtendedString& theLabels) const; //! Draw labels. - void drawLabels (const Handle(Graphic3d_Group)& theGroup, - const TColStd_SequenceOfExtendedString& theLabels, - const Standard_Integer theBarBottom, - const Standard_Integer theBarHeight, - const Standard_Integer theMaxLabelWidth, - const Standard_Integer theColorBreadth); + void drawLabels(const Handle(Graphic3d_Group)& theGroup, + const TColStd_SequenceOfExtendedString& theLabels, + const Standard_Integer theBarBottom, + const Standard_Integer theBarHeight, + const Standard_Integer theMaxLabelWidth, + const Standard_Integer theColorBreadth); //! Draw a color bar. - void drawColorBar (const Handle(Prs3d_Presentation)& thePrs, - const Standard_Integer theBarBottom, - const Standard_Integer theBarHeight, - const Standard_Integer theMaxLabelWidth, - const Standard_Integer theColorBreadth); + void drawColorBar(const Handle(Prs3d_Presentation)& thePrs, + const Standard_Integer theBarBottom, + const Standard_Integer theBarHeight, + const Standard_Integer theMaxLabelWidth, + const Standard_Integer theColorBreadth); //! Draw a frame. - //! @param theX [in] the X coordinate of frame position. - //! @param theY [in] the Y coordinate of frame position. - //! @param theWidth [in] the width of frame. - //! @param theHeight [in] the height of frame. - //! @param theColor [in] the color of frame. - void drawFrame (const Handle(Prs3d_Presentation)& thePrs, - const Standard_Integer theX, const Standard_Integer theY, - const Standard_Integer theWidth, const Standard_Integer theHeight, - const Quantity_Color& theColor); + //! @param[in] theX the X coordinate of frame position. + //! @param[in] theY the Y coordinate of frame position. + //! @param[in] theWidth the width of frame. + //! @param[in] theHeight the height of frame. + //! @param[in] theColor the color of frame. + void drawFrame(const Handle(Prs3d_Presentation)& thePrs, + const Standard_Integer theX, + const Standard_Integer theY, + const Standard_Integer theWidth, + const Standard_Integer theHeight, + const Quantity_Color& theColor); private: - - Standard_Real myMin; //!< values range - minimal value - Standard_Real myMax; //!< values range - maximal value + Standard_Real myMin; //!< values range - minimal value + Standard_Real myMax; //!< values range - maximal value + // clang-format off Graphic3d_Vec3d myColorHlsMin; //!< HLS color corresponding to minimum value Graphic3d_Vec3d myColorHlsMax; //!< HLS color corresponding to maximum value TCollection_ExtendedString myTitle; //!< optional title string @@ -479,14 +505,14 @@ private: Aspect_SequenceOfColor myColors; //!< sequence of custom colors TColStd_SequenceOfExtendedString myLabels; //!< sequence of custom text labels Aspect_TypeOfColorScalePosition myLabelPos; //!< label position relative to the color scale - Aspect_TypeOfColorScalePosition myTitlePos; //!< title position - Standard_Integer myXPos; //!< left position - Standard_Integer myYPos; //!< bottom position - Standard_Integer myBreadth; //!< color scale breadth - Standard_Integer myHeight; //!< height of the color scale - Standard_Integer mySpacing; //!< extra spacing between element - Standard_Integer myTextHeight; //!< label font height - + // clang-format on + Aspect_TypeOfColorScalePosition myTitlePos; //!< title position + Standard_Integer myXPos; //!< left position + Standard_Integer myYPos; //!< bottom position + Standard_Integer myBreadth; //!< color scale breadth + Standard_Integer myHeight; //!< height of the color scale + Standard_Integer mySpacing; //!< extra spacing between element + Standard_Integer myTextHeight; //!< label font height }; #endif diff --git a/opencascade/AIS_ColoredDrawer.hxx b/opencascade/AIS_ColoredDrawer.hxx index e3c8eee62..9c3b92426 100644 --- a/opencascade/AIS_ColoredDrawer.hxx +++ b/opencascade/AIS_ColoredDrawer.hxx @@ -22,45 +22,51 @@ class AIS_ColoredDrawer : public Prs3d_Drawer { DEFINE_STANDARD_RTTIEXT(AIS_ColoredDrawer, Prs3d_Drawer) public: - //! Default constructor. - AIS_ColoredDrawer (const Handle(Prs3d_Drawer)& theLink) - : myIsHidden (false), - myHasOwnMaterial(false), - myHasOwnColor (false), - myHasOwnTransp(false), - myHasOwnWidth (false) + AIS_ColoredDrawer(const Handle(Prs3d_Drawer)& theLink) + : myIsHidden(false), + myHasOwnMaterial(false), + myHasOwnColor(false), + myHasOwnTransp(false), + myHasOwnWidth(false) { - Link (theLink); + Link(theLink); } - bool IsHidden() const { return myIsHidden; } - void SetHidden (const bool theToHide) { myIsHidden = theToHide;} + bool IsHidden() const { return myIsHidden; } + + void SetHidden(const bool theToHide) { myIsHidden = theToHide; } + + bool HasOwnMaterial() const { return myHasOwnMaterial; } + + void UnsetOwnMaterial() { myHasOwnMaterial = false; } + + void SetOwnMaterial() { myHasOwnMaterial = true; } - bool HasOwnMaterial() const { return myHasOwnMaterial; } - void UnsetOwnMaterial() { myHasOwnMaterial = false; } - void SetOwnMaterial() { myHasOwnMaterial = true; } + bool HasOwnColor() const { return myHasOwnColor; } - bool HasOwnColor() const { return myHasOwnColor; } - void UnsetOwnColor() { myHasOwnColor = false; } - void SetOwnColor (const Quantity_Color& /*theColor*/) { myHasOwnColor = true; } + void UnsetOwnColor() { myHasOwnColor = false; } - bool HasOwnTransparency() const { return myHasOwnTransp; } - void UnsetOwnTransparency() { myHasOwnTransp = false; } - void SetOwnTransparency (Standard_Real /*theTransp*/) { myHasOwnTransp = true; } + void SetOwnColor(const Quantity_Color& /*theColor*/) { myHasOwnColor = true; } - bool HasOwnWidth() const { return myHasOwnWidth; } - void UnsetOwnWidth() { myHasOwnWidth = false; } - void SetOwnWidth (const Standard_Real /*theWidth*/) { myHasOwnWidth = true; } + bool HasOwnTransparency() const { return myHasOwnTransp; } -public: //! @name list of overridden properties + void UnsetOwnTransparency() { myHasOwnTransp = false; } + void SetOwnTransparency(Standard_Real /*theTransp*/) { myHasOwnTransp = true; } + + bool HasOwnWidth() const { return myHasOwnWidth; } + + void UnsetOwnWidth() { myHasOwnWidth = false; } + + void SetOwnWidth(const Standard_Real /*theWidth*/) { myHasOwnWidth = true; } + +public: //! @name list of overridden properties bool myIsHidden; bool myHasOwnMaterial; bool myHasOwnColor; bool myHasOwnTransp; bool myHasOwnWidth; - }; DEFINE_STANDARD_HANDLE(AIS_ColoredDrawer, Prs3d_Drawer) diff --git a/opencascade/AIS_ColoredShape.hxx b/opencascade/AIS_ColoredShape.hxx index 2eef2c6ab..2997c0bf9 100644 --- a/opencascade/AIS_ColoredShape.hxx +++ b/opencascade/AIS_ColoredShape.hxx @@ -28,39 +28,36 @@ class StdSelect_BRepOwner; class AIS_ColoredShape : public AIS_Shape { public: - //! Default constructor - Standard_EXPORT AIS_ColoredShape (const TopoDS_Shape& theShape); + Standard_EXPORT AIS_ColoredShape(const TopoDS_Shape& theShape); //! Copy constructor - Standard_EXPORT AIS_ColoredShape (const Handle(AIS_Shape)& theShape); + Standard_EXPORT AIS_ColoredShape(const Handle(AIS_Shape)& theShape); public: //! @name sub-shape aspects - //! Customize properties of specified sub-shape. //! The shape will be stored in the map but ignored, if it is not sub-shape of main Shape! //! This method can be used to mark sub-shapes with customizable properties. - Standard_EXPORT virtual Handle(AIS_ColoredDrawer) CustomAspects (const TopoDS_Shape& theShape); + Standard_EXPORT virtual Handle(AIS_ColoredDrawer) CustomAspects(const TopoDS_Shape& theShape); //! Reset the map of custom sub-shape aspects. Standard_EXPORT virtual void ClearCustomAspects(); //! Reset custom properties of specified sub-shape. //! @param theToUnregister unregister or not sub-shape from the map - Standard_EXPORT void UnsetCustomAspects (const TopoDS_Shape& theShape, - const Standard_Boolean theToUnregister = Standard_False); + Standard_EXPORT void UnsetCustomAspects(const TopoDS_Shape& theShape, + const Standard_Boolean theToUnregister = Standard_False); //! Customize color of specified sub-shape - Standard_EXPORT void SetCustomColor (const TopoDS_Shape& theShape, - const Quantity_Color& theColor); + Standard_EXPORT void SetCustomColor(const TopoDS_Shape& theShape, const Quantity_Color& theColor); //! Customize transparency of specified sub-shape - Standard_EXPORT void SetCustomTransparency (const TopoDS_Shape& theShape, - Standard_Real theTransparency); + Standard_EXPORT void SetCustomTransparency(const TopoDS_Shape& theShape, + Standard_Real theTransparency); //! Customize line width of specified sub-shape - Standard_EXPORT void SetCustomWidth (const TopoDS_Shape& theShape, - const Standard_Real theLineWidth); + Standard_EXPORT void SetCustomWidth(const TopoDS_Shape& theShape, + const Standard_Real theLineWidth); //! Return the map of custom aspects. const AIS_DataMapOfShapeDrawer& CustomAspectsMap() const { return myShapeColors; } @@ -69,21 +66,20 @@ public: //! @name sub-shape aspects AIS_DataMapOfShapeDrawer& ChangeCustomAspectsMap() { return myShapeColors; } public: //! @name global aspects - //! Setup color of entire shape. - Standard_EXPORT virtual void SetColor (const Quantity_Color& theColor) Standard_OVERRIDE; + Standard_EXPORT virtual void SetColor(const Quantity_Color& theColor) Standard_OVERRIDE; //! Setup line width of entire shape. - Standard_EXPORT virtual void SetWidth (const Standard_Real theLineWidth) Standard_OVERRIDE; + Standard_EXPORT virtual void SetWidth(const Standard_Real theLineWidth) Standard_OVERRIDE; //! Sets transparency value. - Standard_EXPORT virtual void SetTransparency (const Standard_Real theValue) Standard_OVERRIDE; + Standard_EXPORT virtual void SetTransparency(const Standard_Real theValue) Standard_OVERRIDE; //! Sets the material aspect. - Standard_EXPORT virtual void SetMaterial (const Graphic3d_MaterialAspect& theAspect) Standard_OVERRIDE; + Standard_EXPORT virtual void SetMaterial(const Graphic3d_MaterialAspect& theAspect) + Standard_OVERRIDE; public: - //! Removes the setting for transparency in the reconstructed compound shape. Standard_EXPORT virtual void UnsetTransparency() Standard_OVERRIDE; @@ -91,22 +87,20 @@ public: Standard_EXPORT virtual void UnsetWidth() Standard_OVERRIDE; protected: //! @name override presentation computation - //! Compute presentation considering sub-shape color map. - Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr, - const Handle(Prs3d_Presentation)& thePrs, - const Standard_Integer theMode) Standard_OVERRIDE; + Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager)& thePrsMgr, + const Handle(Prs3d_Presentation)& thePrs, + const Standard_Integer theMode) Standard_OVERRIDE; //! Compute selection considering sub-shape hidden state. - Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSelection, - const Standard_Integer theMode) Standard_OVERRIDE; + Standard_EXPORT virtual void ComputeSelection(const Handle(SelectMgr_Selection)& theSelection, + const Standard_Integer theMode) Standard_OVERRIDE; protected: - - typedef NCollection_IndexedDataMap DataMapOfDrawerCompd; + typedef NCollection_IndexedDataMap + DataMapOfDrawerCompd; protected: - //! Recursive function to map shapes. //! @param theParentDrawer the drawer to be used for undetailed shapes (default colors) //! @param theShapeToParse the subshape to be recursively parsed @@ -115,41 +109,45 @@ protected: //! @param theIsParentClosed flag indicating that specified shape is part of closed Solid //! @param theDrawerOpenedShapePerType the array of shape types to fill //! @param theDrawerClosedFaces the map for closed faces - Standard_EXPORT static Standard_Boolean dispatchColors (const Handle(AIS_ColoredDrawer)& theParentDrawer, - const TopoDS_Shape& theShapeToParse, - const AIS_DataMapOfShapeDrawer& theShapeDrawerMap, - const TopAbs_ShapeEnum theParentType, - const Standard_Boolean theIsParentClosed, - DataMapOfDrawerCompd* theDrawerOpenedShapePerType, - DataMapOfDrawerCompd& theDrawerClosedFaces); -protected: + Standard_EXPORT static Standard_Boolean dispatchColors( + const Handle(AIS_ColoredDrawer)& theParentDrawer, + const TopoDS_Shape& theShapeToParse, + const AIS_DataMapOfShapeDrawer& theShapeDrawerMap, + const TopAbs_ShapeEnum theParentType, + const Standard_Boolean theIsParentClosed, + DataMapOfDrawerCompd* theDrawerOpenedShapePerType, + DataMapOfDrawerCompd& theDrawerClosedFaces); +protected: //! Extract myShapeColors map (KeyshapeColored -> Color) to subshapes map (Subshape -> Color). - //! This needed when colored shape is not part of BaseShape (but subshapes are) and actually container for subshapes. - Standard_EXPORT void fillSubshapeDrawerMap (AIS_DataMapOfShapeDrawer& theSubshapeDrawerMap) const; + //! This needed when colored shape is not part of BaseShape (but subshapes are) and actually + //! container for subshapes. + Standard_EXPORT void fillSubshapeDrawerMap(AIS_DataMapOfShapeDrawer& theSubshapeDrawerMap) const; //! Add shape to presentation //! @param thePrs the presentation //! @param theDrawerOpenedShapePerType the shapes map with unique attributes //! @param theDrawerClosedFaces the map of attributes for closed faces //! @param theMode display mode - Standard_EXPORT void addShapesWithCustomProps (const Handle(Prs3d_Presentation)& thePrs, - const DataMapOfDrawerCompd* theDrawerOpenedShapePerType, - const DataMapOfDrawerCompd& theDrawerClosedFaces, - const Standard_Integer theMode); + Standard_EXPORT void addShapesWithCustomProps( + const Handle(Prs3d_Presentation)& thePrs, + const DataMapOfDrawerCompd* theDrawerOpenedShapePerType, + const DataMapOfDrawerCompd& theDrawerClosedFaces, + const Standard_Integer theMode); //! Check all shapes from myShapeColorsfor visibility Standard_EXPORT Standard_Boolean isShapeEntirelyVisible() const; //! Resolve (parse) theKeyShape into subshapes, search in they for theBaseShape, //! bind all resolved subshapes with theOriginKeyShape and store all binds in theShapeDrawerMap - //! @param theShapeDrawerMap shapes map: resolved and found theBaseShape subshape -> theOriginKeyShape + //! @param theShapeDrawerMap shapes map: resolved and found theBaseShape subshape -> + //! theOriginKeyShape //! @param theKeyShape a shape to be resolved (parse) into smaller (in topological sense) //! subshapes for new bind cycle //! @param theDrawer assigned drawer - Standard_EXPORT void bindSubShapes (AIS_DataMapOfShapeDrawer& theShapeDrawerMap, - const TopoDS_Shape& theKeyShape, - const Handle(AIS_ColoredDrawer)& theDrawer) const; + Standard_EXPORT void bindSubShapes(AIS_DataMapOfShapeDrawer& theShapeDrawerMap, + const TopoDS_Shape& theKeyShape, + const Handle(AIS_ColoredDrawer)& theDrawer) const; //! Add sub-shape to selection considering hidden state (recursively). //! @param theParentDrawer drawer of parent shape @@ -160,24 +158,21 @@ protected: //! @param theTypOfSel type of selection //! @param theDeflection linear deflection //! @param theDeflAngle angular deflection - Standard_EXPORT void computeSubshapeSelection (const Handle(AIS_ColoredDrawer)& theParentDrawer, - const AIS_DataMapOfShapeDrawer& theShapeDrawerMap, - const TopoDS_Shape& theShape, - const Handle(StdSelect_BRepOwner)& theOwner, - const Handle(SelectMgr_Selection)& theSelection, - const TopAbs_ShapeEnum theTypOfSel, - const Standard_Integer thePriority, - const Standard_Real theDeflection, - const Standard_Real theDeflAngle); + Standard_EXPORT void computeSubshapeSelection(const Handle(AIS_ColoredDrawer)& theParentDrawer, + const AIS_DataMapOfShapeDrawer& theShapeDrawerMap, + const TopoDS_Shape& theShape, + const Handle(StdSelect_BRepOwner)& theOwner, + const Handle(SelectMgr_Selection)& theSelection, + const TopAbs_ShapeEnum theTypOfSel, + const Standard_Integer thePriority, + const Standard_Real theDeflection, + const Standard_Real theDeflAngle); protected: - AIS_DataMapOfShapeDrawer myShapeColors; public: - - DEFINE_STANDARD_RTTIEXT(AIS_ColoredShape,AIS_Shape) - + DEFINE_STANDARD_RTTIEXT(AIS_ColoredShape, AIS_Shape) }; DEFINE_STANDARD_HANDLE(AIS_ColoredShape, AIS_Shape) diff --git a/opencascade/AIS_ConnectedInteractive.hxx b/opencascade/AIS_ConnectedInteractive.hxx index dc14e2dfd..41627e81b 100644 --- a/opencascade/AIS_ConnectedInteractive.hxx +++ b/opencascade/AIS_ConnectedInteractive.hxx @@ -37,34 +37,45 @@ class AIS_ConnectedInteractive : public AIS_InteractiveObject { DEFINE_STANDARD_RTTIEXT(AIS_ConnectedInteractive, AIS_InteractiveObject) public: - //! Disconnects the previous view and sets highlight //! mode to 0. This highlights the wireframe presentation //! aTypeOfPresentation3d. //! Top_AllView deactivates hidden line removal. - Standard_EXPORT AIS_ConnectedInteractive(const PrsMgr_TypeOfPresentation3d aTypeOfPresentation3d = PrsMgr_TOP_AllView); - + Standard_EXPORT AIS_ConnectedInteractive( + const PrsMgr_TypeOfPresentation3d aTypeOfPresentation3d = PrsMgr_TOP_AllView); + //! Returns KOI_Object - virtual AIS_KindOfInteractive Type() const Standard_OVERRIDE { return AIS_KindOfInteractive_Object; } + virtual AIS_KindOfInteractive Type() const Standard_OVERRIDE + { + return AIS_KindOfInteractive_Object; + } //! Returns 0 virtual Standard_Integer Signature() const Standard_OVERRIDE { return 0; } - + //! Establishes the connection between the Connected //! Interactive Object, anotherIobj, and its reference. - void Connect (const Handle(AIS_InteractiveObject)& theAnotherObj) { connect (theAnotherObj, Handle(TopLoc_Datum3D)()); } + void Connect(const Handle(AIS_InteractiveObject)& theAnotherObj) + { + connect(theAnotherObj, Handle(TopLoc_Datum3D)()); + } //! Establishes the connection between the Connected //! Interactive Object, anotherIobj, and its reference. //! Locates instance in aLocation. - void Connect (const Handle(AIS_InteractiveObject)& theAnotherObj, - const gp_Trsf& theLocation) { connect (theAnotherObj, new TopLoc_Datum3D (theLocation)); } + void Connect(const Handle(AIS_InteractiveObject)& theAnotherObj, const gp_Trsf& theLocation) + { + connect(theAnotherObj, new TopLoc_Datum3D(theLocation)); + } //! Establishes the connection between the Connected //! Interactive Object, anotherIobj, and its reference. //! Locates instance in aLocation. - void Connect (const Handle(AIS_InteractiveObject)& theAnotherObj, - const Handle(TopLoc_Datum3D)& theLocation) { connect (theAnotherObj, theLocation); } + void Connect(const Handle(AIS_InteractiveObject)& theAnotherObj, + const Handle(TopLoc_Datum3D)& theLocation) + { + connect(theAnotherObj, theLocation); + } //! Returns true if there is a connection established //! between the presentation and its source reference. @@ -86,14 +97,12 @@ public: } //! Return true if reference presentation accepts specified display mode. - virtual Standard_Boolean AcceptDisplayMode (const Standard_Integer theMode) const Standard_OVERRIDE + virtual Standard_Boolean AcceptDisplayMode(const Standard_Integer theMode) const Standard_OVERRIDE { - return myReference.IsNull() - || myReference->AcceptDisplayMode (theMode); + return myReference.IsNull() || myReference->AcceptDisplayMode(theMode); } protected: - //! Calculates the view aPresentation and its updates. //! The latter are managed by aPresentationManager. //! The display mode aMode is 0 by default. @@ -103,35 +112,36 @@ protected: //! compute anything, but just uses the //! presentation of this last object, with //! a transformation if there's one stored. - Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr, - const Handle(Prs3d_Presentation)& theprs, - const Standard_Integer theMode) Standard_OVERRIDE; + Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager)& thePrsMgr, + const Handle(Prs3d_Presentation)& theprs, + const Standard_Integer theMode) Standard_OVERRIDE; //! Computes the presentation according to a point of view. - Standard_EXPORT virtual void computeHLR (const Handle(Graphic3d_Camera)& theProjector, - const Handle(TopLoc_Datum3D)& theTrsf, - const Handle(Prs3d_Presentation)& thePrs) Standard_OVERRIDE; + Standard_EXPORT virtual void computeHLR(const Handle(Graphic3d_Camera)& theProjector, + const Handle(TopLoc_Datum3D)& theTrsf, + const Handle(Prs3d_Presentation)& thePrs) + Standard_OVERRIDE; //! Generates sensitive entities by copying //! them from myReference selection, creates and sets an entity //! owner for this entities and adds them to theSelection - Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSelection, const Standard_Integer theMode) Standard_OVERRIDE; + Standard_EXPORT virtual void ComputeSelection(const Handle(SelectMgr_Selection)& theSelection, + const Standard_Integer theMode) Standard_OVERRIDE; //! Generates sensitive entities by copying //! them from myReference sub shapes selection, creates and sets an entity //! owner for this entities and adds them to theSelection - Standard_EXPORT void computeSubShapeSelection (const Handle(SelectMgr_Selection)& theSelection, const Standard_Integer theMode); + Standard_EXPORT void computeSubShapeSelection(const Handle(SelectMgr_Selection)& theSelection, + const Standard_Integer theMode); - Standard_EXPORT void updateShape (const Standard_Boolean WithLocation = Standard_True); + Standard_EXPORT void updateShape(const Standard_Boolean WithLocation = Standard_True); - Standard_EXPORT void connect (const Handle(AIS_InteractiveObject)& theAnotherObj, - const Handle(TopLoc_Datum3D)& theLocation); + Standard_EXPORT void connect(const Handle(AIS_InteractiveObject)& theAnotherObj, + const Handle(TopLoc_Datum3D)& theLocation); protected: - Handle(AIS_InteractiveObject) myReference; - TopoDS_Shape myShape; - + TopoDS_Shape myShape; }; DEFINE_STANDARD_HANDLE(AIS_ConnectedInteractive, AIS_InteractiveObject) diff --git a/opencascade/AIS_DataMapIteratorOfDataMapOfIOStatus.hxx b/opencascade/AIS_DataMapIteratorOfDataMapOfIOStatus.hxx index d6930ab9c..23e46136c 100644 --- a/opencascade/AIS_DataMapIteratorOfDataMapOfIOStatus.hxx +++ b/opencascade/AIS_DataMapIteratorOfDataMapOfIOStatus.hxx @@ -11,7 +11,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. - #ifndef AIS_DataMapIteratorOfDataMapOfIOStatus_HeaderFile #define AIS_DataMapIteratorOfDataMapOfIOStatus_HeaderFile diff --git a/opencascade/AIS_DataMapOfIOStatus.hxx b/opencascade/AIS_DataMapOfIOStatus.hxx index 07f8b5c90..1591311eb 100644 --- a/opencascade/AIS_DataMapOfIOStatus.hxx +++ b/opencascade/AIS_DataMapOfIOStatus.hxx @@ -21,8 +21,9 @@ #include #include -typedef NCollection_DataMap AIS_DataMapOfIOStatus; -typedef NCollection_DataMap::Iterator AIS_DataMapIteratorOfDataMapOfIOStatus; - +typedef NCollection_DataMap + AIS_DataMapOfIOStatus; +typedef NCollection_DataMap::Iterator + AIS_DataMapIteratorOfDataMapOfIOStatus; #endif diff --git a/opencascade/AIS_DataMapOfShapeDrawer.hxx b/opencascade/AIS_DataMapOfShapeDrawer.hxx index 965572322..6695fb61f 100644 --- a/opencascade/AIS_DataMapOfShapeDrawer.hxx +++ b/opencascade/AIS_DataMapOfShapeDrawer.hxx @@ -18,6 +18,7 @@ #include #include -typedef NCollection_DataMap AIS_DataMapOfShapeDrawer; +typedef NCollection_DataMap + AIS_DataMapOfShapeDrawer; #endif // _AIS_DataMapOfShapeDrawer_HeaderFile diff --git a/opencascade/AIS_DisplayMode.hxx b/opencascade/AIS_DisplayMode.hxx index d2df93e3c..efb85f08a 100644 --- a/opencascade/AIS_DisplayMode.hxx +++ b/opencascade/AIS_DisplayMode.hxx @@ -17,15 +17,14 @@ #ifndef _AIS_DisplayMode_HeaderFile #define _AIS_DisplayMode_HeaderFile - //! Sets display modes other than neutral point ones, //! for interactive objects. The possibilities include: //! - wireframe, //! - shaded, enum AIS_DisplayMode { -AIS_WireFrame, -AIS_Shaded + AIS_WireFrame, + AIS_Shaded }; #endif // _AIS_DisplayMode_HeaderFile diff --git a/opencascade/AIS_ExclusionFilter.hxx b/opencascade/AIS_ExclusionFilter.hxx index f182d4358..2fb959eef 100644 --- a/opencascade/AIS_ExclusionFilter.hxx +++ b/opencascade/AIS_ExclusionFilter.hxx @@ -42,61 +42,65 @@ DEFINE_STANDARD_HANDLE(AIS_ExclusionFilter, SelectMgr_Filter) //! except those of the types and signatures stored //! in the filter framework //! - Exclusion flag off -//! - the funciton IsOk answers true for all objects +//! - the function IsOk answers true for all objects //! which have the same type and signature as the stored ones. class AIS_ExclusionFilter : public SelectMgr_Filter { public: - - //! Constructs an empty exclusion filter object defined by //! the flag setting ExclusionFlagOn. //! By default, the flag is set to true. Standard_EXPORT AIS_ExclusionFilter(const Standard_Boolean ExclusionFlagOn = Standard_True); - + //! All the AIS objects of //! Will be rejected by the IsOk Method. - Standard_EXPORT AIS_ExclusionFilter(const AIS_KindOfInteractive TypeToExclude, const Standard_Boolean ExclusionFlagOn = Standard_True); - + Standard_EXPORT AIS_ExclusionFilter(const AIS_KindOfInteractive TypeToExclude, + const Standard_Boolean ExclusionFlagOn = Standard_True); + //! Constructs an exclusion filter object defined by the //! enumeration value TypeToExclude, the signature //! SignatureInType, and the flag setting ExclusionFlagOn. //! By default, the flag is set to true. - Standard_EXPORT AIS_ExclusionFilter(const AIS_KindOfInteractive TypeToExclude, const Standard_Integer SignatureInType, const Standard_Boolean ExclusionFlagOn = Standard_True); - - Standard_EXPORT virtual Standard_Boolean IsOk (const Handle(SelectMgr_EntityOwner)& anObj) const Standard_OVERRIDE; - + Standard_EXPORT AIS_ExclusionFilter(const AIS_KindOfInteractive TypeToExclude, + const Standard_Integer SignatureInType, + const Standard_Boolean ExclusionFlagOn = Standard_True); + + Standard_EXPORT virtual Standard_Boolean IsOk(const Handle(SelectMgr_EntityOwner)& anObj) const + Standard_OVERRIDE; + //! Adds the type TypeToExclude to the list of types. - Standard_EXPORT Standard_Boolean Add (const AIS_KindOfInteractive TypeToExclude); - - Standard_EXPORT Standard_Boolean Add (const AIS_KindOfInteractive TypeToExclude, const Standard_Integer SignatureInType); - - Standard_EXPORT Standard_Boolean Remove (const AIS_KindOfInteractive TypeToExclude); - - Standard_EXPORT Standard_Boolean Remove (const AIS_KindOfInteractive TypeToExclude, const Standard_Integer SignatureInType); - + Standard_EXPORT Standard_Boolean Add(const AIS_KindOfInteractive TypeToExclude); + + Standard_EXPORT Standard_Boolean Add(const AIS_KindOfInteractive TypeToExclude, + const Standard_Integer SignatureInType); + + Standard_EXPORT Standard_Boolean Remove(const AIS_KindOfInteractive TypeToExclude); + + Standard_EXPORT Standard_Boolean Remove(const AIS_KindOfInteractive TypeToExclude, + const Standard_Integer SignatureInType); + Standard_EXPORT void Clear(); Standard_Boolean IsExclusionFlagOn() const { return myIsExclusionFlagOn; } - void SetExclusionFlag (const Standard_Boolean theStatus) { myIsExclusionFlagOn = theStatus; } + void SetExclusionFlag(const Standard_Boolean theStatus) { myIsExclusionFlagOn = theStatus; } - Standard_EXPORT Standard_Boolean IsStored (const AIS_KindOfInteractive aType) const; - - Standard_EXPORT void ListOfStoredTypes (TColStd_ListOfInteger& TheList) const; - - Standard_EXPORT void ListOfSignature (const AIS_KindOfInteractive aType, TColStd_ListOfInteger& TheStoredList) const; + Standard_EXPORT Standard_Boolean IsStored(const AIS_KindOfInteractive aType) const; - DEFINE_STANDARD_RTTIEXT(AIS_ExclusionFilter,SelectMgr_Filter) + Standard_EXPORT void ListOfStoredTypes(TColStd_ListOfInteger& TheList) const; -private: + Standard_EXPORT void ListOfSignature(const AIS_KindOfInteractive aType, + TColStd_ListOfInteger& TheStoredList) const; - Standard_EXPORT Standard_Boolean IsSignatureIn (const AIS_KindOfInteractive aType, const Standard_Integer aSignature) const; + DEFINE_STANDARD_RTTIEXT(AIS_ExclusionFilter, SelectMgr_Filter) - Standard_Boolean myIsExclusionFlagOn; - TColStd_DataMapOfIntegerListOfInteger myStoredTypes; +private: + Standard_EXPORT Standard_Boolean IsSignatureIn(const AIS_KindOfInteractive aType, + const Standard_Integer aSignature) const; + Standard_Boolean myIsExclusionFlagOn; + TColStd_DataMapOfIntegerListOfInteger myStoredTypes; }; #endif // _AIS_ExclusionFilter_HeaderFile diff --git a/opencascade/AIS_GlobalStatus.hxx b/opencascade/AIS_GlobalStatus.hxx index e823e7960..97f302ba1 100644 --- a/opencascade/AIS_GlobalStatus.hxx +++ b/opencascade/AIS_GlobalStatus.hxx @@ -31,7 +31,6 @@ class AIS_GlobalStatus : public Standard_Transient { DEFINE_STANDARD_RTTIEXT(AIS_GlobalStatus, Standard_Transient) public: - //! Default constructor. Standard_EXPORT AIS_GlobalStatus(); @@ -39,16 +38,16 @@ public: Standard_Integer DisplayMode() const { return myDispMode; } //! Sets display mode. - void SetDisplayMode (const Standard_Integer theMode) { myDispMode = theMode; } + void SetDisplayMode(const Standard_Integer theMode) { myDispMode = theMode; } //! Returns TRUE if object is highlighted Standard_Boolean IsHilighted() const { return myIsHilit; } //! Sets highlighted state. - void SetHilightStatus (const Standard_Boolean theStatus) { myIsHilit = theStatus; } + void SetHilightStatus(const Standard_Boolean theStatus) { myIsHilit = theStatus; } //! Changes applied highlight style for a particular object - void SetHilightStyle (const Handle(Prs3d_Drawer)& theStyle) { myHiStyle = theStyle; } + void SetHilightStyle(const Handle(Prs3d_Drawer)& theStyle) { myHiStyle = theStyle; } //! Returns applied highlight style for a particular object const Handle(Prs3d_Drawer)& HilightStyle() const { return myHiStyle; } @@ -57,46 +56,41 @@ public: const TColStd_ListOfInteger& SelectionModes() const { return mySelModes; } //! Return TRUE if selection mode was registered. - Standard_Boolean IsSModeIn (Standard_Integer theMode) const + Standard_Boolean IsSModeIn(Standard_Integer theMode) const { - return mySelModes.Contains (theMode); + return mySelModes.Contains(theMode); } //! Add selection mode. - Standard_Boolean AddSelectionMode (const Standard_Integer theMode) + Standard_Boolean AddSelectionMode(const Standard_Integer theMode) { - if (!mySelModes.Contains (theMode)) + if (!mySelModes.Contains(theMode)) { - mySelModes.Append (theMode); + mySelModes.Append(theMode); return Standard_True; } return Standard_False; } //! Remove selection mode. - Standard_Boolean RemoveSelectionMode (const Standard_Integer theMode) + Standard_Boolean RemoveSelectionMode(const Standard_Integer theMode) { - return mySelModes.Remove (theMode); + return mySelModes.Remove(theMode); } //! Remove all selection modes. - void ClearSelectionModes() - { - mySelModes.Clear(); - } + void ClearSelectionModes() { mySelModes.Clear(); } Standard_Boolean IsSubIntensityOn() const { return mySubInt; } - void SetSubIntensity (Standard_Boolean theIsOn) { mySubInt = theIsOn; } + void SetSubIntensity(Standard_Boolean theIsOn) { mySubInt = theIsOn; } private: - TColStd_ListOfInteger mySelModes; - Handle(Prs3d_Drawer) myHiStyle; - Standard_Integer myDispMode; - Standard_Boolean myIsHilit; - Standard_Boolean mySubInt; - + Handle(Prs3d_Drawer) myHiStyle; + Standard_Integer myDispMode; + Standard_Boolean myIsHilit; + Standard_Boolean mySubInt; }; #endif // _AIS_GlobalStatus_HeaderFile diff --git a/opencascade/AIS_GraphicTool.hxx b/opencascade/AIS_GraphicTool.hxx index 599339ec0..549d413b0 100644 --- a/opencascade/AIS_GraphicTool.hxx +++ b/opencascade/AIS_GraphicTool.hxx @@ -28,52 +28,41 @@ class Quantity_Color; class Graphic3d_MaterialAspect; - - -class AIS_GraphicTool +class AIS_GraphicTool { public: - DEFINE_STANDARD_ALLOC - - Standard_EXPORT static Quantity_NameOfColor GetLineColor (const Handle(Prs3d_Drawer)& aDrawer, const AIS_TypeOfAttribute TheTypeOfAttributes); - - Standard_EXPORT static void GetLineColor (const Handle(Prs3d_Drawer)& aDrawer, const AIS_TypeOfAttribute TheTypeOfAttributes, Quantity_Color& TheLineColor); - - Standard_EXPORT static Standard_Real GetLineWidth (const Handle(Prs3d_Drawer)& aDrawer, const AIS_TypeOfAttribute TheTypeOfAttributes); - - Standard_EXPORT static Aspect_TypeOfLine GetLineType (const Handle(Prs3d_Drawer)& aDrawer, const AIS_TypeOfAttribute TheTypeOfAttributes); - - Standard_EXPORT static void GetLineAtt (const Handle(Prs3d_Drawer)& aDrawer, const AIS_TypeOfAttribute TheTypeOfAttributes, Quantity_NameOfColor& aCol, Standard_Real& aWidth, Aspect_TypeOfLine& aTyp); - - Standard_EXPORT static Quantity_NameOfColor GetInteriorColor (const Handle(Prs3d_Drawer)& aDrawer); - - Standard_EXPORT static void GetInteriorColor (const Handle(Prs3d_Drawer)& aDrawer, Quantity_Color& aColor); - - Standard_EXPORT static Graphic3d_MaterialAspect GetMaterial (const Handle(Prs3d_Drawer)& aDrawer); + Standard_EXPORT static Quantity_NameOfColor GetLineColor( + const Handle(Prs3d_Drawer)& aDrawer, + const AIS_TypeOfAttribute TheTypeOfAttributes); + Standard_EXPORT static void GetLineColor(const Handle(Prs3d_Drawer)& aDrawer, + const AIS_TypeOfAttribute TheTypeOfAttributes, + Quantity_Color& TheLineColor); + Standard_EXPORT static Standard_Real GetLineWidth(const Handle(Prs3d_Drawer)& aDrawer, + const AIS_TypeOfAttribute TheTypeOfAttributes); + Standard_EXPORT static Aspect_TypeOfLine GetLineType( + const Handle(Prs3d_Drawer)& aDrawer, + const AIS_TypeOfAttribute TheTypeOfAttributes); -protected: - + Standard_EXPORT static void GetLineAtt(const Handle(Prs3d_Drawer)& aDrawer, + const AIS_TypeOfAttribute TheTypeOfAttributes, + Quantity_NameOfColor& aCol, + Standard_Real& aWidth, + Aspect_TypeOfLine& aTyp); + Standard_EXPORT static Quantity_NameOfColor GetInteriorColor(const Handle(Prs3d_Drawer)& aDrawer); + Standard_EXPORT static void GetInteriorColor(const Handle(Prs3d_Drawer)& aDrawer, + Quantity_Color& aColor); + Standard_EXPORT static Graphic3d_MaterialAspect GetMaterial(const Handle(Prs3d_Drawer)& aDrawer); +protected: private: - - - - - }; - - - - - - #endif // _AIS_GraphicTool_HeaderFile diff --git a/opencascade/AIS_InteractiveContext.hxx b/opencascade/AIS_InteractiveContext.hxx index 64c30eb89..e3194bdeb 100644 --- a/opencascade/AIS_InteractiveContext.hxx +++ b/opencascade/AIS_InteractiveContext.hxx @@ -54,10 +54,11 @@ class Prs3d_BasicAspect; class TopoDS_Shape; class SelectMgr_Filter; -//! The Interactive Context allows you to manage graphic behavior and selection of Interactive Objects in one or more viewers. -//! Class methods make this highly transparent. -//! It is essential to remember that an Interactive Object which is already known by the Interactive Context must be modified using Context methods. -//! You can only directly call the methods available for an Interactive Object if it has not been loaded into an Interactive Context. +//! The Interactive Context allows you to manage graphic behavior and selection of Interactive +//! Objects in one or more viewers. Class methods make this highly transparent. It is essential to +//! remember that an Interactive Object which is already known by the Interactive Context must be +//! modified using Context methods. You can only directly call the methods available for an +//! Interactive Object if it has not been loaded into an Interactive Context. //! //! Each selectable object must specify the selection mode that is //! responsible for selection of object as a whole (global selection mode). @@ -67,7 +68,6 @@ class AIS_InteractiveContext : public Standard_Transient { DEFINE_STANDARD_RTTIEXT(AIS_InteractiveContext, Standard_Transient) public: //! @name object display management - //! Constructs the interactive context object defined by the principal viewer MainViewer. Standard_EXPORT AIS_InteractiveContext(const Handle(V3d_Viewer)& MainViewer); @@ -80,107 +80,123 @@ public: //! @name object display management //! - AIS_DS_Erased hidden in main viewer //! - AIS_DS_Temporary temporarily displayed //! - AIS_DS_None nowhere displayed. - Standard_EXPORT PrsMgr_DisplayStatus DisplayStatus (const Handle(AIS_InteractiveObject)& anIobj) const; + Standard_EXPORT PrsMgr_DisplayStatus + DisplayStatus(const Handle(AIS_InteractiveObject)& anIobj) const; //! Returns the status of the Interactive Context for the view of the Interactive Object. - Standard_EXPORT void Status (const Handle(AIS_InteractiveObject)& anObj, TCollection_ExtendedString& astatus) const; + Standard_EXPORT void Status(const Handle(AIS_InteractiveObject)& anObj, + TCollection_ExtendedString& astatus) const; //! Returns true if Object is displayed in the interactive context. - Standard_EXPORT Standard_Boolean IsDisplayed (const Handle(AIS_InteractiveObject)& anIobj) const; + Standard_EXPORT Standard_Boolean IsDisplayed(const Handle(AIS_InteractiveObject)& anIobj) const; - Standard_EXPORT Standard_Boolean IsDisplayed (const Handle(AIS_InteractiveObject)& aniobj, const Standard_Integer aMode) const; + Standard_EXPORT Standard_Boolean IsDisplayed(const Handle(AIS_InteractiveObject)& aniobj, + const Standard_Integer aMode) const; //! Enable or disable automatic activation of default selection mode while displaying the object. - void SetAutoActivateSelection (const Standard_Boolean theIsAuto) { myIsAutoActivateSelMode = theIsAuto; } + void SetAutoActivateSelection(const Standard_Boolean theIsAuto) + { + myIsAutoActivateSelMode = theIsAuto; + } - //! Manages displaying the new object should also automatically activate default selection mode; TRUE by default. + //! Manages displaying the new object should also automatically activate default selection mode; + //! TRUE by default. Standard_Boolean GetAutoActivateSelection() const { return myIsAutoActivateSelMode; } //! Displays the object in this Context using default Display Mode. - //! This will be the object's default display mode, if there is one. Otherwise, it will be the context mode. - //! The Interactive Object's default selection mode is activated if GetAutoActivateSelection() is TRUE. In general, this is 0. - Standard_EXPORT void Display (const Handle(AIS_InteractiveObject)& theIObj, - const Standard_Boolean theToUpdateViewer); + //! This will be the object's default display mode, if there is one. Otherwise, it will be the + //! context mode. The Interactive Object's default selection mode is activated if + //! GetAutoActivateSelection() is TRUE. In general, this is 0. + Standard_EXPORT void Display(const Handle(AIS_InteractiveObject)& theIObj, + const Standard_Boolean theToUpdateViewer); //! Sets status, display mode and selection mode for specified Object - //! If theSelectionMode equals -1, theIObj will not be activated: it will be displayed but will not be selectable. - Standard_EXPORT void Display (const Handle(AIS_InteractiveObject)& theIObj, - const Standard_Integer theDispMode, - const Standard_Integer theSelectionMode, - const Standard_Boolean theToUpdateViewer, - const PrsMgr_DisplayStatus theDispStatus = PrsMgr_DisplayStatus_None); + //! If theSelectionMode equals -1, theIObj will not be activated: it will be displayed but will + //! not be selectable. + Standard_EXPORT void Display( + const Handle(AIS_InteractiveObject)& theIObj, + const Standard_Integer theDispMode, + const Standard_Integer theSelectionMode, + const Standard_Boolean theToUpdateViewer, + const PrsMgr_DisplayStatus theDispStatus = PrsMgr_DisplayStatus_None); //! Allows you to load the Interactive Object with a given selection mode, //! and/or with the desired decomposition option, whether the object is visualized or not. - //! The loaded objects will be selectable but displayable in highlighting only when detected by the Selector. - Standard_EXPORT void Load (const Handle(AIS_InteractiveObject)& theObj, const Standard_Integer theSelectionMode = -1); + //! The loaded objects will be selectable but displayable in highlighting only when detected by + //! the Selector. + Standard_EXPORT void Load(const Handle(AIS_InteractiveObject)& theObj, + const Standard_Integer theSelectionMode = -1); + + //! Hides the object. The object's presentations are simply flagged as invisible and therefore + //! excluded from redrawing. To show hidden objects, use Display(). + Standard_EXPORT void Erase(const Handle(AIS_InteractiveObject)& theIObj, + const Standard_Boolean theToUpdateViewer); + + //! Hides all objects. The object's presentations are simply flagged as invisible and therefore + //! excluded from redrawing. To show all hidden objects, use DisplayAll(). + Standard_EXPORT void EraseAll(const Standard_Boolean theToUpdateViewer); - //! Hides the object. The object's presentations are simply flagged as invisible and therefore excluded from redrawing. - //! To show hidden objects, use Display(). - Standard_EXPORT void Erase (const Handle(AIS_InteractiveObject)& theIObj, - const Standard_Boolean theToUpdateViewer); - - //! Hides all objects. The object's presentations are simply flagged as invisible and therefore excluded from redrawing. - //! To show all hidden objects, use DisplayAll(). - Standard_EXPORT void EraseAll (const Standard_Boolean theToUpdateViewer); - //! Displays all hidden objects. - Standard_EXPORT void DisplayAll (const Standard_Boolean theToUpdateViewer); + Standard_EXPORT void DisplayAll(const Standard_Boolean theToUpdateViewer); - //! Hides selected objects. The object's presentations are simply flagged as invisible and therefore excluded from redrawing. - //! To show hidden objects, use Display(). - Standard_EXPORT void EraseSelected (const Standard_Boolean theToUpdateViewer); + //! Hides selected objects. The object's presentations are simply flagged as invisible and + //! therefore excluded from redrawing. To show hidden objects, use Display(). + Standard_EXPORT void EraseSelected(const Standard_Boolean theToUpdateViewer); //! Displays current objects. - Standard_EXPORT void DisplaySelected (const Standard_Boolean theToUpdateViewer); - + Standard_EXPORT void DisplaySelected(const Standard_Boolean theToUpdateViewer); + //! Empties the graphic presentation of the mode indexed by aMode. //! Warning! Removes theIObj. theIObj is still active if it was previously activated. - void ClearPrs (const Handle(AIS_InteractiveObject)& theIObj, - const Standard_Integer theMode, - const Standard_Boolean theToUpdateViewer) { ClearGlobalPrs (theIObj, theMode, theToUpdateViewer); } + void ClearPrs(const Handle(AIS_InteractiveObject)& theIObj, + const Standard_Integer theMode, + const Standard_Boolean theToUpdateViewer) + { + ClearGlobalPrs(theIObj, theMode, theToUpdateViewer); + } //! Removes Object from every viewer. - Standard_EXPORT void Remove (const Handle(AIS_InteractiveObject)& theIObj, - const Standard_Boolean theToUpdateViewer); + Standard_EXPORT void Remove(const Handle(AIS_InteractiveObject)& theIObj, + const Standard_Boolean theToUpdateViewer); //! Removes all the objects from Context. - Standard_EXPORT void RemoveAll (const Standard_Boolean theToUpdateViewer); + Standard_EXPORT void RemoveAll(const Standard_Boolean theToUpdateViewer); //! Recomputes the seen parts presentation of the Object. //! If theAllModes equals true, all presentations are present in the object even if unseen. - Standard_EXPORT void Redisplay (const Handle(AIS_InteractiveObject)& theIObj, - const Standard_Boolean theToUpdateViewer, - const Standard_Boolean theAllModes = Standard_False); + Standard_EXPORT void Redisplay(const Handle(AIS_InteractiveObject)& theIObj, + const Standard_Boolean theToUpdateViewer, + const Standard_Boolean theAllModes = Standard_False); //! Recomputes the Prs/Selection of displayed objects of a given type and a given signature. //! if signature = -1 doesn't take signature criterion. - Standard_EXPORT void Redisplay (const AIS_KindOfInteractive theTypeOfObject, - const Standard_Integer theSignature, - const Standard_Boolean theToUpdateViewer); + Standard_EXPORT void Redisplay(const AIS_KindOfInteractive theTypeOfObject, + const Standard_Integer theSignature, + const Standard_Boolean theToUpdateViewer); //! Recomputes the displayed presentations, flags the others. //! Doesn't update presentations. - Standard_EXPORT void RecomputePrsOnly (const Handle(AIS_InteractiveObject)& theIObj, - const Standard_Boolean theToUpdateViewer, - const Standard_Boolean theAllModes = Standard_False); + Standard_EXPORT void RecomputePrsOnly(const Handle(AIS_InteractiveObject)& theIObj, + const Standard_Boolean theToUpdateViewer, + const Standard_Boolean theAllModes = Standard_False); //! Recomputes the active selections, flags the others. //! Doesn't update presentations. - Standard_EXPORT void RecomputeSelectionOnly (const Handle(AIS_InteractiveObject)& anIObj); + Standard_EXPORT void RecomputeSelectionOnly(const Handle(AIS_InteractiveObject)& anIObj); - //! Updates displayed interactive object by checking and recomputing its flagged as "to be recomputed" presentation and selection structures. - //! This method does not force any recomputation on its own. - //! The method recomputes selections even if they are loaded without activation in particular selector. - Standard_EXPORT void Update (const Handle(AIS_InteractiveObject)& theIObj, - const Standard_Boolean theUpdateViewer); + //! Updates displayed interactive object by checking and recomputing its flagged as "to be + //! recomputed" presentation and selection structures. This method does not force any + //! recomputation on its own. The method recomputes selections even if they are loaded without + //! activation in particular selector. + Standard_EXPORT void Update(const Handle(AIS_InteractiveObject)& theIObj, + const Standard_Boolean theUpdateViewer); public: //! @name highlighting management - //! Returns default highlight style settings (could be overridden by PrsMgr_PresentableObject). //! //! Tip: although highlighting style is defined by Prs3d_Drawer, - //! only a small set of properties derived from it's base class Graphic3d_PresentationAttributes will be actually used in most cases. + //! only a small set of properties derived from it's base class Graphic3d_PresentationAttributes + //! will be actually used in most cases. //! //! Default highlight style for all types is Aspect_TOHM_COLOR. Other defaults: //! - Prs3d_TypeOfHighlight_Dynamic @@ -197,16 +213,23 @@ public: //! @name highlighting management //! * Color: Quantity_NOC_GRAY80; //! * Layer: Graphic3d_ZLayerId_UNKNOWN, //! object highlighting is drawn on top of main scene within the same layer - //! as object itself (e.g. Graphic3d_ZLayerId_Default by default) and increased priority. + //! as object itself (e.g. Graphic3d_ZLayerId_Default by default) and increased + //! priority. //! //! @param[in] theStyleType highlight style to modify //! @return drawer associated to specified highlight type //! //! @sa MoveTo() using Prs3d_TypeOfHighlight_Dynamic and Prs3d_TypeOfHighlight_LocalDynamic types - //! @sa SelectDetected() using Prs3d_TypeOfHighlight_Selected and Prs3d_TypeOfHighlight_LocalSelected types - //! @sa PrsMgr_PresentableObject::DynamicHilightAttributes() overriding Prs3d_TypeOfHighlight_Dynamic and Prs3d_TypeOfHighlight_LocalDynamic defaults on object level - //! @sa PrsMgr_PresentableObject::HilightAttributes() overriding Prs3d_TypeOfHighlight_Selected and Prs3d_TypeOfHighlight_LocalSelected defaults on object level - const Handle(Prs3d_Drawer)& HighlightStyle (const Prs3d_TypeOfHighlight theStyleType) const { return myStyles[theStyleType]; } + //! @sa SelectDetected() using Prs3d_TypeOfHighlight_Selected and + //! Prs3d_TypeOfHighlight_LocalSelected types + //! @sa PrsMgr_PresentableObject::DynamicHilightAttributes() overriding + //! Prs3d_TypeOfHighlight_Dynamic and Prs3d_TypeOfHighlight_LocalDynamic defaults on object level + //! @sa PrsMgr_PresentableObject::HilightAttributes() overriding Prs3d_TypeOfHighlight_Selected + //! and Prs3d_TypeOfHighlight_LocalSelected defaults on object level + const Handle(Prs3d_Drawer)& HighlightStyle(const Prs3d_TypeOfHighlight theStyleType) const + { + return myStyles[theStyleType]; + } //! Setup highlight style settings. //! Tip: it is better modifying existing style returned by method HighlightStyle() @@ -214,8 +237,8 @@ public: //! @name highlighting management //! //! If a new highlight style is created, its presentation Zlayer should be checked, //! otherwise highlighting might not work as expected. - void SetHighlightStyle (const Prs3d_TypeOfHighlight theStyleType, - const Handle(Prs3d_Drawer)& theStyle) + void SetHighlightStyle(const Prs3d_TypeOfHighlight theStyleType, + const Handle(Prs3d_Drawer)& theStyle) { myStyles[theStyleType] = theStyle; if (theStyleType == Prs3d_TypeOfHighlight_None) @@ -224,8 +247,9 @@ public: //! @name highlighting management } } - //! Returns current dynamic highlight style settings corresponding to Prs3d_TypeOfHighlight_Dynamic. - //! This is just a short-cut to HighlightStyle(Prs3d_TypeOfHighlight_Dynamic). + //! Returns current dynamic highlight style settings corresponding to + //! Prs3d_TypeOfHighlight_Dynamic. This is just a short-cut to + //! HighlightStyle(Prs3d_TypeOfHighlight_Dynamic). const Handle(Prs3d_Drawer)& HighlightStyle() const { return myStyles[Prs3d_TypeOfHighlight_Dynamic]; @@ -233,7 +257,10 @@ public: //! @name highlighting management //! Setup the style of dynamic highlighting corrsponding to Prs3d_TypeOfHighlight_Selected. //! This is just a short-cut to SetHighlightStyle(Prs3d_TypeOfHighlight_Dynamic,theStyle). - void SetHighlightStyle (const Handle(Prs3d_Drawer)& theStyle) { myStyles[Prs3d_TypeOfHighlight_Dynamic] = theStyle; } + void SetHighlightStyle(const Handle(Prs3d_Drawer)& theStyle) + { + myStyles[Prs3d_TypeOfHighlight_Dynamic] = theStyle; + } //! Returns current selection style settings corrsponding to Prs3d_TypeOfHighlight_Selected. //! This is just a short-cut to HighlightStyle(Prs3d_TypeOfHighlight_Selected). @@ -244,185 +271,215 @@ public: //! @name highlighting management //! Setup the style of selection highlighting. //! This is just a short-cut to SetHighlightStyle(Prs3d_TypeOfHighlight_Selected,theStyle). - void SetSelectionStyle (const Handle(Prs3d_Drawer)& theStyle) { myStyles[Prs3d_TypeOfHighlight_Selected] = theStyle; } + void SetSelectionStyle(const Handle(Prs3d_Drawer)& theStyle) + { + myStyles[Prs3d_TypeOfHighlight_Selected] = theStyle; + } //! Returns highlight style of the object if it is marked as highlighted via global status - //! @param theObj [in] the object to check - Standard_EXPORT Standard_Boolean HighlightStyle (const Handle(AIS_InteractiveObject)& theObj, - Handle(Prs3d_Drawer)& theStyle) const; + //! @param[in] theObj the object to check + Standard_EXPORT Standard_Boolean HighlightStyle(const Handle(AIS_InteractiveObject)& theObj, + Handle(Prs3d_Drawer)& theStyle) const; //! Returns highlight style of the owner if it is selected - //! @param theOwner [in] the owner to check - Standard_EXPORT Standard_Boolean HighlightStyle (const Handle(SelectMgr_EntityOwner)& theOwner, - Handle(Prs3d_Drawer)& theStyle) const; + //! @param[in] theOwner the owner to check + Standard_EXPORT Standard_Boolean HighlightStyle(const Handle(SelectMgr_EntityOwner)& theOwner, + Handle(Prs3d_Drawer)& theStyle) const; //! Returns true if the object is marked as highlighted via its global status - //! @param theObj [in] the object to check - Standard_EXPORT Standard_Boolean IsHilighted (const Handle(AIS_InteractiveObject)& theObj) const; + //! @param[in] theObj the object to check + Standard_EXPORT Standard_Boolean IsHilighted(const Handle(AIS_InteractiveObject)& theObj) const; //! Returns true if the owner is marked as selected - //! @param theOwner [in] the owner to check - Standard_EXPORT Standard_Boolean IsHilighted (const Handle(SelectMgr_EntityOwner)& theOwner) const; + //! @param[in] theOwner the owner to check + Standard_EXPORT Standard_Boolean IsHilighted(const Handle(SelectMgr_EntityOwner)& theOwner) const; //! Changes the color of all the lines of the object in view. - Standard_EXPORT void HilightWithColor (const Handle(AIS_InteractiveObject)& theObj, - const Handle(Prs3d_Drawer)& theStyle, - const Standard_Boolean theToUpdateViewer); + Standard_EXPORT void HilightWithColor(const Handle(AIS_InteractiveObject)& theObj, + const Handle(Prs3d_Drawer)& theStyle, + const Standard_Boolean theToUpdateViewer); //! Removes hilighting from the Object. - Standard_EXPORT void Unhilight (const Handle(AIS_InteractiveObject)& theIObj, - const Standard_Boolean theToUpdateViewer); + Standard_EXPORT void Unhilight(const Handle(AIS_InteractiveObject)& theIObj, + const Standard_Boolean theToUpdateViewer); public: //! @name object presence management (View affinity, Layer, Priority) - //! Returns the display priority of the Object. - Standard_EXPORT Graphic3d_DisplayPriority DisplayPriority (const Handle(AIS_InteractiveObject)& theIObj) const; + Standard_EXPORT Graphic3d_DisplayPriority + DisplayPriority(const Handle(AIS_InteractiveObject)& theIObj) const; //! Sets the display priority of the seen parts presentation of the Object. - Standard_EXPORT void SetDisplayPriority (const Handle(AIS_InteractiveObject)& theIObj, - const Graphic3d_DisplayPriority thePriority); + Standard_EXPORT void SetDisplayPriority(const Handle(AIS_InteractiveObject)& theIObj, + const Graphic3d_DisplayPriority thePriority); - Standard_DEPRECATED("Deprecated since OCCT7.7, Graphic3d_DisplayPriority should be passed instead of integer number to SetDisplayPriority()") - void SetDisplayPriority (const Handle(AIS_InteractiveObject)& theIObj, - const Standard_Integer thePriority) { SetDisplayPriority (theIObj, (Graphic3d_DisplayPriority )thePriority); } + Standard_DEPRECATED("Deprecated since OCCT7.7, Graphic3d_DisplayPriority should be passed " + "instead of integer number to SetDisplayPriority()") + + void SetDisplayPriority(const Handle(AIS_InteractiveObject)& theIObj, + const Standard_Integer thePriority) + { + SetDisplayPriority(theIObj, (Graphic3d_DisplayPriority)thePriority); + } //! Get Z layer id set for displayed interactive object. - Standard_EXPORT Graphic3d_ZLayerId GetZLayer (const Handle(AIS_InteractiveObject)& theIObj) const; + Standard_EXPORT Graphic3d_ZLayerId GetZLayer(const Handle(AIS_InteractiveObject)& theIObj) const; //! Set Z layer id for interactive object. - //! The Z layers can be used to display temporarily presentations of some object in front of the other objects in the scene. - //! The ids for Z layers are generated by V3d_Viewer. - Standard_EXPORT void SetZLayer (const Handle(AIS_InteractiveObject)& theIObj, const Graphic3d_ZLayerId theLayerId); + //! The Z layers can be used to display temporarily presentations of some object in front of the + //! other objects in the scene. The ids for Z layers are generated by V3d_Viewer. + Standard_EXPORT void SetZLayer(const Handle(AIS_InteractiveObject)& theIObj, + const Graphic3d_ZLayerId theLayerId); //! Setup object visibility in specified view. //! Has no effect if object is not displayed in this context. - Standard_EXPORT void SetViewAffinity (const Handle(AIS_InteractiveObject)& theIObj, const Handle(V3d_View)& theView, const Standard_Boolean theIsVisible); + Standard_EXPORT void SetViewAffinity(const Handle(AIS_InteractiveObject)& theIObj, + const Handle(V3d_View)& theView, + const Standard_Boolean theIsVisible); public: //! @name Display Mode management - //! Returns the Display Mode setting to be used by default. Standard_Integer DisplayMode() const { return myDefaultDrawer->DisplayMode(); } //! Sets the display mode of seen Interactive Objects (which have no overridden Display Mode). - Standard_EXPORT void SetDisplayMode (const Standard_Integer theMode, - const Standard_Boolean theToUpdateViewer); + Standard_EXPORT void SetDisplayMode(const Standard_Integer theMode, + const Standard_Boolean theToUpdateViewer); //! Sets the display mode of seen Interactive Objects. //! theMode provides the display mode index of the entity theIObj. - Standard_EXPORT void SetDisplayMode (const Handle(AIS_InteractiveObject)& theIObj, - const Standard_Integer theMode, - const Standard_Boolean theToUpdateViewer); + Standard_EXPORT void SetDisplayMode(const Handle(AIS_InteractiveObject)& theIObj, + const Standard_Integer theMode, + const Standard_Boolean theToUpdateViewer); //! Unsets the display mode of seen Interactive Objects. - Standard_EXPORT void UnsetDisplayMode (const Handle(AIS_InteractiveObject)& theIObj, - const Standard_Boolean theToUpdateViewer); + Standard_EXPORT void UnsetDisplayMode(const Handle(AIS_InteractiveObject)& theIObj, + const Standard_Boolean theToUpdateViewer); public: //! @name object local transformation management - //! Puts the location on the initial graphic representation and the selection for the Object. - Standard_EXPORT void SetLocation (const Handle(AIS_InteractiveObject)& theObject, const TopLoc_Location& theLocation); + Standard_EXPORT void SetLocation(const Handle(AIS_InteractiveObject)& theObject, + const TopLoc_Location& theLocation); //! Puts the Object back into its initial position. - Standard_EXPORT void ResetLocation (const Handle(AIS_InteractiveObject)& theObject); + Standard_EXPORT void ResetLocation(const Handle(AIS_InteractiveObject)& theObject); //! Returns true if the Object has a location. - Standard_EXPORT Standard_Boolean HasLocation (const Handle(AIS_InteractiveObject)& theObject) const; + Standard_EXPORT Standard_Boolean + HasLocation(const Handle(AIS_InteractiveObject)& theObject) const; //! Returns the location of the Object. - Standard_EXPORT TopLoc_Location Location (const Handle(AIS_InteractiveObject)& theObject) const; + Standard_EXPORT TopLoc_Location Location(const Handle(AIS_InteractiveObject)& theObject) const; //! Sets transform persistence. - Standard_EXPORT void SetTransformPersistence (const Handle(AIS_InteractiveObject)& theObject, - const Handle(Graphic3d_TransformPers)& theTrsfPers); + Standard_EXPORT void SetTransformPersistence(const Handle(AIS_InteractiveObject)& theObject, + const Handle(Graphic3d_TransformPers)& theTrsfPers); public: //! @name mouse picking logic (detection and dynamic highlighting of entities under cursor) - //! Setup pixel tolerance for MoveTo() operation. //! @sa MoveTo(). - Standard_EXPORT void SetPixelTolerance (const Standard_Integer thePrecision = 2); + Standard_EXPORT void SetPixelTolerance(const Standard_Integer thePrecision = 2); //! Returns the pixel tolerance, default is 2. //! Pixel Tolerance extends sensitivity within MoveTo() operation (picking by point) - //! and can be adjusted by application based on user input precision (e.g. screen pixel density, input device precision, etc.). + //! and can be adjusted by application based on user input precision (e.g. screen pixel density, + //! input device precision, etc.). Standard_EXPORT Standard_Integer PixelTolerance() const; //! Allows to manage sensitivity of a particular selection of interactive object theObject //! and changes previous sensitivity value of all sensitive entities in selection with theMode //! to the given theNewSensitivity. - Standard_EXPORT void SetSelectionSensitivity (const Handle(AIS_InteractiveObject)& theObject, - const Standard_Integer theMode, - const Standard_Integer theNewSensitivity); + Standard_EXPORT void SetSelectionSensitivity(const Handle(AIS_InteractiveObject)& theObject, + const Standard_Integer theMode, + const Standard_Integer theNewSensitivity); //! Returns last active View (argument of MoveTo()/Select() methods). Standard_EXPORT Handle(V3d_View) LastActiveView() const; //! Relays mouse position in pixels theXPix and theYPix to the interactive context selectors. //! This is done by the view theView passing this position to the main viewer and updating it. - //! If theToRedrawOnUpdate is set to false, callee should call RedrawImmediate() to highlight detected object. + //! If theToRedrawOnUpdate is set to false, callee should call RedrawImmediate() to highlight + //! detected object. //! @sa PickingStrategy() //! @sa HighlightStyle() defining default dynamic highlight styles of detected owners //! (Prs3d_TypeOfHighlight_Dynamic and Prs3d_TypeOfHighlight_LocalDynamic) - //! @sa PrsMgr_PresentableObject::DynamicHilightAttributes() defining per-object dynamic highlight style of detected owners (overrides defaults) - Standard_EXPORT AIS_StatusOfDetection MoveTo (const Standard_Integer theXPix, - const Standard_Integer theYPix, - const Handle(V3d_View)& theView, - const Standard_Boolean theToRedrawOnUpdate); + //! @sa PrsMgr_PresentableObject::DynamicHilightAttributes() defining per-object dynamic highlight + //! style of detected owners (overrides defaults) + Standard_EXPORT AIS_StatusOfDetection MoveTo(const Standard_Integer theXPix, + const Standard_Integer theYPix, + const Handle(V3d_View)& theView, + const Standard_Boolean theToRedrawOnUpdate); //! Relays axis theAxis to the interactive context selectors. //! This is done by the view theView passing this axis to the main viewer and updating it. - //! If theToRedrawOnUpdate is set to false, callee should call RedrawImmediate() to highlight detected object. + //! If theToRedrawOnUpdate is set to false, callee should call RedrawImmediate() to highlight + //! detected object. //! @sa PickingStrategy() - Standard_EXPORT AIS_StatusOfDetection MoveTo (const gp_Ax1& theAxis, - const Handle(V3d_View)& theView, - const Standard_Boolean theToRedrawOnUpdate); + Standard_EXPORT AIS_StatusOfDetection MoveTo(const gp_Ax1& theAxis, + const Handle(V3d_View)& theView, + const Standard_Boolean theToRedrawOnUpdate); //! Clears the list of entities detected by MoveTo() and resets dynamic highlighting. //! @param theToRedrawImmediate if TRUE, the main Viewer will be redrawn on update - //! @return TRUE if viewer needs to be updated (e.g. there were actually dynamically highlighted entities) - Standard_EXPORT Standard_Boolean ClearDetected (Standard_Boolean theToRedrawImmediate = Standard_False); + //! @return TRUE if viewer needs to be updated (e.g. there were actually dynamically highlighted + //! entities) + Standard_EXPORT Standard_Boolean + ClearDetected(Standard_Boolean theToRedrawImmediate = Standard_False); //! Returns true if there is a mouse-detected entity in context. //! @sa DetectedOwner(), HasNextDetected(), HilightPreviousDetected(), HilightNextDetected(). Standard_Boolean HasDetected() const { return !myLastPicked.IsNull(); } - //! Returns the owner of the detected sensitive primitive which is currently dynamically highlighted. - //! WARNING! This method is irrelevant to InitDetected()/MoreDetected()/NextDetected(). + //! Returns the owner of the detected sensitive primitive which is currently dynamically + //! highlighted. WARNING! This method is irrelevant to + //! InitDetected()/MoreDetected()/NextDetected(). //! @sa HasDetected(), HasNextDetected(), HilightPreviousDetected(), HilightNextDetected(). const Handle(SelectMgr_EntityOwner)& DetectedOwner() const { return myLastPicked; } //! Returns the interactive objects last detected in context. - //! In general this is just a wrapper for Handle(AIS_InteractiveObject)::DownCast(DetectedOwner()->Selectable()). + //! In general this is just a wrapper for + //! Handle(AIS_InteractiveObject)::DownCast(DetectedOwner()->Selectable()). //! @sa DetectedOwner() - Handle(AIS_InteractiveObject) DetectedInteractive() const { return Handle(AIS_InteractiveObject)::DownCast (myLastPicked->Selectable()); } + Handle(AIS_InteractiveObject) DetectedInteractive() const + { + return Handle(AIS_InteractiveObject)::DownCast(myLastPicked->Selectable()); + } //! Returns true if there is a detected shape in local context. //! @sa HasDetected(), DetectedShape() - Standard_DEPRECATED ("Local Context is deprecated - local selection should be used without Local Context") + Standard_DEPRECATED( + "Local Context is deprecated - local selection should be used without Local Context") Standard_EXPORT Standard_Boolean HasDetectedShape() const; //! Returns the shape detected in local context. //! @sa DetectedOwner() - Standard_DEPRECATED ("Local Context is deprecated - local selection should be used without Local Context") + Standard_DEPRECATED( + "Local Context is deprecated - local selection should be used without Local Context") Standard_EXPORT const TopoDS_Shape& DetectedShape() const; - + //! returns True if other entities were detected in the last mouse detection //! @sa HilightPreviousDetected(), HilightNextDetected(). - Standard_Boolean HasNextDetected() const { return !myDetectedSeq.IsEmpty() && myCurHighlighted <= myDetectedSeq.Upper(); } + Standard_Boolean HasNextDetected() const + { + return !myDetectedSeq.IsEmpty() && myCurHighlighted <= myDetectedSeq.Upper(); + } - //! If more than 1 object is detected by the selector, only the "best" owner is hilighted at the mouse position. - //! This Method allows the user to hilight one after another the other detected entities. - //! If The method select is called, the selected entity will be the hilighted one! - //! WARNING: Loop Method. When all the detected entities have been hilighted, the next call will hilight the first one again. + //! If more than 1 object is detected by the selector, only the "best" owner is hilighted at the + //! mouse position. This Method allows the user to hilight one after another the other detected + //! entities. If The method select is called, the selected entity will be the hilighted one! + //! WARNING: Loop Method. When all the detected entities have been hilighted, the next call will + //! hilight the first one again. //! @return the Rank of hilighted entity //! @sa HasNextDetected(), HilightPreviousDetected(). - Standard_EXPORT Standard_Integer HilightNextDetected (const Handle(V3d_View)& theView, const Standard_Boolean theToRedrawImmediate = Standard_True); + Standard_EXPORT Standard_Integer + HilightNextDetected(const Handle(V3d_View)& theView, + const Standard_Boolean theToRedrawImmediate = Standard_True); //! Same as previous methods in reverse direction. //! @sa HasNextDetected(), HilightNextDetected(). - Standard_EXPORT Standard_Integer HilightPreviousDetected (const Handle(V3d_View)& theView, const Standard_Boolean theToRedrawImmediate = Standard_True); + Standard_EXPORT Standard_Integer + HilightPreviousDetected(const Handle(V3d_View)& theView, + const Standard_Boolean theToRedrawImmediate = Standard_True); public: //! @name iteration through detected entities - //! Initialization for iteration through mouse-detected objects in //! interactive context or in local context if it is opened. //! @sa DetectedCurrentOwner(), MoreDetected(), NextDetected(). @@ -437,102 +494,114 @@ public: //! @name iteration through detected entities //! Return TRUE if there is more mouse-detected objects after the current one //! during iteration through mouse-detected interactive objects. //! @sa DetectedCurrentOwner(), InitDetected(), NextDetected(). - Standard_Boolean MoreDetected() const { return myCurDetected >= myDetectedSeq.Lower() && myCurDetected <= myDetectedSeq.Upper(); } + Standard_Boolean MoreDetected() const + { + return myCurDetected >= myDetectedSeq.Lower() && myCurDetected <= myDetectedSeq.Upper(); + } //! Gets next current object during iteration through mouse-detected interactive objects. //! @sa DetectedCurrentOwner(), InitDetected(), MoreDetected(). void NextDetected() { ++myCurDetected; } //! Returns the owner from detected list pointed by current iterator position. - //! WARNING! This method is irrelevant to DetectedOwner() which returns last picked Owner regardless of iterator position! + //! WARNING! This method is irrelevant to DetectedOwner() which returns last picked Owner + //! regardless of iterator position! //! @sa InitDetected(), MoreDetected(), NextDetected(). Standard_EXPORT Handle(SelectMgr_EntityOwner) DetectedCurrentOwner() const; public: //! @name Selection management - //! Adds object in the selection. - Standard_EXPORT AIS_StatusOfPick AddSelect (const Handle(SelectMgr_EntityOwner)& theObject); + Standard_EXPORT AIS_StatusOfPick AddSelect(const Handle(SelectMgr_EntityOwner)& theObject); //! Adds object in the selection. - AIS_StatusOfPick AddSelect (const Handle(AIS_InteractiveObject)& theObject) + AIS_StatusOfPick AddSelect(const Handle(AIS_InteractiveObject)& theObject) { - return AddSelect (theObject->GlobalSelOwner()); + return AddSelect(theObject->GlobalSelOwner()); } //! Selects objects within the bounding rectangle. //! Viewer should be explicitly redrawn after selection. - //! @param thePntMin [in] rectangle lower point (in pixels) - //! @param thePntMax [in] rectangle upper point (in pixels) - //! @param theView [in] active view where rectangle is defined - //! @param theSelScheme [in] selection scheme + //! @param[in] thePntMin rectangle lower point (in pixels) + //! @param[in] thePntMax rectangle upper point (in pixels) + //! @param[in] theView active view where rectangle is defined + //! @param[in] theSelScheme selection scheme //! @return picking status //! @sa StdSelect_ViewerSelector3d::AllowOverlapDetection() - Standard_EXPORT AIS_StatusOfPick SelectRectangle (const Graphic3d_Vec2i& thePntMin, - const Graphic3d_Vec2i& thePntMax, - const Handle(V3d_View)& theView, - const AIS_SelectionScheme theSelScheme = AIS_SelectionScheme_Replace); + Standard_EXPORT AIS_StatusOfPick + SelectRectangle(const Graphic3d_Vec2i& thePntMin, + const Graphic3d_Vec2i& thePntMax, + const Handle(V3d_View)& theView, + const AIS_SelectionScheme theSelScheme = AIS_SelectionScheme_Replace); //! Select everything found in the polygon defined by bounding polyline. //! Viewer should be explicitly redrawn after selection. - //! @param thePolyline [in] polyline defining polygon bounds (in pixels) - //! @param theView [in] active view where polyline is defined - //! @param theSelScheme [in] selection scheme + //! @param[in] thePolyline polyline defining polygon bounds (in pixels) + //! @param[in] theView active view where polyline is defined + //! @param[in] theSelScheme selection scheme //! @return picking status - Standard_EXPORT AIS_StatusOfPick SelectPolygon (const TColgp_Array1OfPnt2d& thePolyline, - const Handle(V3d_View)& theView, - const AIS_SelectionScheme theSelScheme = AIS_SelectionScheme_Replace); + Standard_EXPORT AIS_StatusOfPick + SelectPolygon(const TColgp_Array1OfPnt2d& thePolyline, + const Handle(V3d_View)& theView, + const AIS_SelectionScheme theSelScheme = AIS_SelectionScheme_Replace); //! Selects the topmost object picked by the point in the view, //! Viewer should be explicitly redrawn after selection. - //! @param thePnt [in] point pixel coordinates within the view - //! @param theView [in] active view where point is defined - //! @param theSelScheme [in] selection scheme + //! @param[in] thePnt point pixel coordinates within the view + //! @param[in] theView active view where point is defined + //! @param[in] theSelScheme selection scheme //! @return picking status - Standard_EXPORT AIS_StatusOfPick SelectPoint (const Graphic3d_Vec2i& thePnt, - const Handle(V3d_View)& theView, - const AIS_SelectionScheme theSelScheme = AIS_SelectionScheme_Replace); + Standard_EXPORT AIS_StatusOfPick + SelectPoint(const Graphic3d_Vec2i& thePnt, + const Handle(V3d_View)& theView, + const AIS_SelectionScheme theSelScheme = AIS_SelectionScheme_Replace); //! Select and hilights the previous detected via AIS_InteractiveContext::MoveTo() method; //! unhilights the previous picked. //! Viewer should be explicitly redrawn after selection. - //! @param theSelScheme [in] selection scheme + //! @param[in] theSelScheme selection scheme //! @return picking status //! - //! @sa HighlightStyle() defining default highlight styles of selected owners (Prs3d_TypeOfHighlight_Selected and Prs3d_TypeOfHighlight_LocalSelected) - //! @sa PrsMgr_PresentableObject::HilightAttributes() defining per-object highlight style of selected owners (overrides defaults) - Standard_EXPORT AIS_StatusOfPick SelectDetected (const AIS_SelectionScheme theSelScheme = AIS_SelectionScheme_Replace); + //! @sa HighlightStyle() defining default highlight styles of selected owners + //! (Prs3d_TypeOfHighlight_Selected and Prs3d_TypeOfHighlight_LocalSelected) + //! @sa PrsMgr_PresentableObject::HilightAttributes() defining per-object highlight style of + //! selected owners (overrides defaults) + Standard_EXPORT AIS_StatusOfPick + SelectDetected(const AIS_SelectionScheme theSelScheme = AIS_SelectionScheme_Replace); //! Returns bounding box of selected objects. - Standard_EXPORT Bnd_Box BoundingBoxOfSelection (const Handle(V3d_View)& theView) const; + Standard_EXPORT Bnd_Box BoundingBoxOfSelection(const Handle(V3d_View)& theView) const; + + Standard_DEPRECATED("BoundingBoxOfSelection() should be called with View argument") - Standard_DEPRECATED ("BoundingBoxOfSelection() should be called with View argument") - Bnd_Box BoundingBoxOfSelection() const { return BoundingBoxOfSelection (Handle(V3d_View)()); } + Bnd_Box BoundingBoxOfSelection() const { return BoundingBoxOfSelection(Handle(V3d_View)()); } //! Sets list of owner selected/deselected using specified selection scheme. //! @param theOwners owners to change selection state //! @param theSelScheme selection scheme //! @return picking status - Standard_EXPORT AIS_StatusOfPick Select (const AIS_NArray1OfEntityOwner& theOwners, - const AIS_SelectionScheme theSelScheme); + Standard_EXPORT AIS_StatusOfPick Select(const AIS_NArray1OfEntityOwner& theOwners, + const AIS_SelectionScheme theSelScheme); //! Fits the view correspondingly to the bounds of selected objects. //! Infinite objects are ignored if infinite state of AIS_InteractiveObject is set to true. - Standard_EXPORT void FitSelected (const Handle(V3d_View)& theView, - const Standard_Real theMargin, - const Standard_Boolean theToUpdate); + Standard_EXPORT void FitSelected(const Handle(V3d_View)& theView, + const Standard_Real theMargin, + const Standard_Boolean theToUpdate); //! Fits the view correspondingly to the bounds of selected objects. //! Infinite objects are ignored if infinite state of AIS_InteractiveObject is set to true. - Standard_EXPORT void FitSelected (const Handle(V3d_View)& theView); + Standard_EXPORT void FitSelected(const Handle(V3d_View)& theView); - //! Return value specified whether selected object must be hilighted when mouse cursor is moved above it + //! Return value specified whether selected object must be hilighted when mouse cursor is moved + //! above it //! @sa MoveTo() Standard_Boolean ToHilightSelected() const { return myToHilightSelected; } - //! Specify whether selected object must be hilighted when mouse cursor is moved above it (in MoveTo method). - //! By default this value is false and selected object is not hilighted in this case. + //! Specify whether selected object must be hilighted when mouse cursor is moved above it (in + //! MoveTo method). By default this value is false and selected object is not hilighted in this + //! case. //! @sa MoveTo() - void SetToHilightSelected (const Standard_Boolean toHilight) { myToHilightSelected = toHilight; } + void SetToHilightSelected(const Standard_Boolean toHilight) { myToHilightSelected = toHilight; } //! Returns true if the automatic highlight mode is active; TRUE by default. //! @sa MoveTo(), Select(), HilightWithColor(), Unhilight() @@ -550,59 +619,65 @@ public: //! @name Selection management //! that is used to implement custom highlighting logic for a specific interactive object class. //! //! @sa MoveTo(), Select(), HilightWithColor(), Unhilight() - void SetAutomaticHilight (Standard_Boolean theStatus) { myAutoHilight = theStatus; } + void SetAutomaticHilight(Standard_Boolean theStatus) { myAutoHilight = theStatus; } //! Unhighlights previously selected owners and marks them as not selected. //! Marks owner given as selected and highlights it. //! Performs selection filters check. - Standard_EXPORT void SetSelected (const Handle(SelectMgr_EntityOwner)& theOwners, - const Standard_Boolean theToUpdateViewer); + Standard_EXPORT void SetSelected(const Handle(SelectMgr_EntityOwner)& theOwners, + const Standard_Boolean theToUpdateViewer); //! Puts the interactive object aniObj in the list of selected objects. //! Performs selection filters check. - Standard_EXPORT void SetSelected (const Handle(AIS_InteractiveObject)& theObject, - const Standard_Boolean theToUpdateViewer); + Standard_EXPORT void SetSelected(const Handle(AIS_InteractiveObject)& theObject, + const Standard_Boolean theToUpdateViewer); //! Allows to highlight or unhighlight the owner given depending on its selection status - Standard_EXPORT void AddOrRemoveSelected (const Handle(AIS_InteractiveObject)& theObject, - const Standard_Boolean theToUpdateViewer); + Standard_EXPORT void AddOrRemoveSelected(const Handle(AIS_InteractiveObject)& theObject, + const Standard_Boolean theToUpdateViewer); //! Updates Selected state of specified owner without calling HilightSelected(). - //! Has no effect if Selected state is not changed, and redirects to AddOrRemoveSelected() otherwise. + //! Has no effect if Selected state is not changed, and redirects to AddOrRemoveSelected() + //! otherwise. //! @param theOwner owner object to set selected state //! @param theIsSelected new selected state //! @return TRUE if Selected state has been changed - Standard_EXPORT Standard_Boolean SetSelectedState (const Handle(SelectMgr_EntityOwner)& theOwner, - const Standard_Boolean theIsSelected); + Standard_EXPORT Standard_Boolean SetSelectedState(const Handle(SelectMgr_EntityOwner)& theOwner, + const Standard_Boolean theIsSelected); //! Highlights selected objects. - Standard_EXPORT void HilightSelected (const Standard_Boolean theToUpdateViewer); + Standard_EXPORT void HilightSelected(const Standard_Boolean theToUpdateViewer); //! Removes highlighting from selected objects. - Standard_EXPORT void UnhilightSelected (const Standard_Boolean theToUpdateViewer); + Standard_EXPORT void UnhilightSelected(const Standard_Boolean theToUpdateViewer); //! Updates the list of selected objects: //! i.e. highlights the newly selected ones and unhighlights previously selected objects. //! @sa HilightSelected(). - void UpdateSelected (Standard_Boolean theToUpdateViewer) { HilightSelected (theToUpdateViewer); } + void UpdateSelected(Standard_Boolean theToUpdateViewer) { HilightSelected(theToUpdateViewer); } - //! Empties previous selected objects in order to get the selected objects detected by the selector using UpdateSelected. - Standard_EXPORT void ClearSelected (const Standard_Boolean theToUpdateViewer); + //! Empties previous selected objects in order to get the selected objects detected by the + //! selector using UpdateSelected. + Standard_EXPORT void ClearSelected(const Standard_Boolean theToUpdateViewer); //! Allows to highlight or unhighlight the owner given depending on its selection status - Standard_EXPORT void AddOrRemoveSelected (const Handle(SelectMgr_EntityOwner)& theOwner, - const Standard_Boolean theToUpdateViewer); + Standard_EXPORT void AddOrRemoveSelected(const Handle(SelectMgr_EntityOwner)& theOwner, + const Standard_Boolean theToUpdateViewer); //! Returns true is the owner given is selected - Standard_Boolean IsSelected (const Handle(SelectMgr_EntityOwner)& theOwner) const { return !theOwner.IsNull() && theOwner->IsSelected(); } + Standard_Boolean IsSelected(const Handle(SelectMgr_EntityOwner)& theOwner) const + { + return !theOwner.IsNull() && theOwner->IsSelected(); + } //! Returns true is the object given is selected - Standard_EXPORT Standard_Boolean IsSelected (const Handle(AIS_InteractiveObject)& theObj) const; + Standard_EXPORT Standard_Boolean IsSelected(const Handle(AIS_InteractiveObject)& theObj) const; //! Returns the first selected object in the list of current selected. Standard_EXPORT Handle(AIS_InteractiveObject) FirstSelectedObject() const; - //! Count a number of selected entities using InitSelected()+MoreSelected()+NextSelected() iterator. + //! Count a number of selected entities using InitSelected()+MoreSelected()+NextSelected() + //! iterator. //! @sa SelectedOwner(), InitSelected(), MoreSelected(), NextSelected(). Standard_Integer NbSelected() { return mySelection->Extent(); } @@ -622,9 +697,7 @@ public: //! @name Selection management //! @sa InitSelected(), MoreSelected(), NextSelected(). Handle(SelectMgr_EntityOwner) SelectedOwner() const { - return !mySelection->More() - ? Handle(SelectMgr_EntityOwner)() - : mySelection->Value(); + return !mySelection->More() ? Handle(SelectMgr_EntityOwner)() : mySelection->Value(); } //! Return Handle(AIS_InteractiveObject)::DownCast (SelectedOwner()->Selectable()). @@ -632,8 +705,8 @@ public: //! @name Selection management Handle(AIS_InteractiveObject) SelectedInteractive() const { return !mySelection->More() - ? Handle(AIS_InteractiveObject)() - : Handle(AIS_InteractiveObject)::DownCast (mySelection->Value()->Selectable()); + ? Handle(AIS_InteractiveObject)() + : Handle(AIS_InteractiveObject)::DownCast(mySelection->Value()->Selectable()); } //! Returns TRUE if the interactive context has a shape selected. @@ -641,11 +714,12 @@ public: //! @name Selection management Standard_EXPORT Standard_Boolean HasSelectedShape() const; //! Returns the selected shape. - //! Basically it is just a shape returned stored by StdSelect_BRepOwner with graphic transformation being applied: + //! Basically it is just a shape returned stored by StdSelect_BRepOwner with graphic + //! transformation being applied: //! @code - //! const Handle(StdSelect_BRepOwner) aBRepOwner = Handle(StdSelect_BRepOwner)::DownCast (SelectedOwner()); - //! TopoDS_Shape aSelShape = aBRepOwner->Shape(); - //! TopoDS_Shape aLocatedShape = aSelShape.Located (aBRepOwner->Location() * aSelShape.Location()); + //! const Handle(StdSelect_BRepOwner) aBRepOwner = Handle(StdSelect_BRepOwner)::DownCast + //! (SelectedOwner()); TopoDS_Shape aSelShape = aBRepOwner->Shape(); TopoDS_Shape + //! aLocatedShape = aSelShape.Located (aBRepOwner->Location() * aSelShape.Location()); //! @endcode //! @sa SelectedOwner(), HasSelectedShape(). Standard_EXPORT TopoDS_Shape SelectedShape() const; @@ -659,16 +733,16 @@ public: //! @name Selection management Handle(Standard_Transient) Applicative() const { return SelectedInteractive()->GetOwner(); } public: //! @name immediate mode rendering - //! initializes the list of presentations to be displayed //! returns False if no local context is opened. Standard_EXPORT Standard_Boolean BeginImmediateDraw(); - + //! returns True if has been stored in the list. - Standard_EXPORT Standard_Boolean ImmediateAdd (const Handle(AIS_InteractiveObject)& theObj, const Standard_Integer theMode = 0); - + Standard_EXPORT Standard_Boolean ImmediateAdd(const Handle(AIS_InteractiveObject)& theObj, + const Standard_Integer theMode = 0); + //! returns True if the immediate display has been done. - Standard_EXPORT Standard_Boolean EndImmediateDraw (const Handle(V3d_View)& theView); + Standard_EXPORT Standard_Boolean EndImmediateDraw(const Handle(V3d_View)& theView); //! Uses the First Active View of Main Viewer! //! returns True if the immediate display has been done. @@ -676,78 +750,98 @@ public: //! @name immediate mode rendering Standard_EXPORT Standard_Boolean IsImmediateModeOn() const; - //! Redraws immediate structures in all views of the viewer given taking into account its visibility. - void RedrawImmediate (const Handle(V3d_Viewer)& theViewer) { myMainPM->RedrawImmediate (theViewer); } + //! Redraws immediate structures in all views of the viewer given taking into account its + //! visibility. + void RedrawImmediate(const Handle(V3d_Viewer)& theViewer) + { + myMainPM->RedrawImmediate(theViewer); + } public: //! @name management of active Selection Modes - //! Activates or deactivates the selection mode for specified object. //! Has no effect if selection mode was already active/deactivated. //! @param theObj object to activate/deactivate selection mode //! @param theMode selection mode to activate/deactivate; - //! deactivation of -1 selection mode will effectively deactivate all selection modes; - //! activation of -1 selection mode with AIS_SelectionModesConcurrency_Single - //! will deactivate all selection modes, and will has no effect otherwise + //! deactivation of -1 selection mode will effectively deactivate all + //! selection modes; activation of -1 selection mode with + //! AIS_SelectionModesConcurrency_Single will deactivate all selection + //! modes, and will has no effect otherwise //! @param theToActivate activation/deactivation flag //! @param theConcurrency specifies how to handle already activated selection modes; - //! default value (AIS_SelectionModesConcurrency_Multiple) means active selection modes should be left as is, - //! AIS_SelectionModesConcurrency_Single can be used if only one selection mode is expected to be active - //! and AIS_SelectionModesConcurrency_GlobalOrLocal can be used if either AIS_InteractiveObject::GlobalSelectionMode() - //! or any combination of Local selection modes is acceptable; - //! this value is considered only if theToActivate set to TRUE - //! @param theIsForce when set to TRUE, the display status will be ignored while activating selection mode - Standard_EXPORT void SetSelectionModeActive (const Handle(AIS_InteractiveObject)& theObj, - const Standard_Integer theMode, - const Standard_Boolean theToActivate, - const AIS_SelectionModesConcurrency theConcurrency = AIS_SelectionModesConcurrency_Multiple, - const Standard_Boolean theIsForce = Standard_False); - - //! Activates the selection mode aMode whose index is given, for the given interactive entity anIobj. - void Activate (const Handle(AIS_InteractiveObject)& theObj, const Standard_Integer theMode = 0, const Standard_Boolean theIsForce = Standard_False) + //! default value (AIS_SelectionModesConcurrency_Multiple) means active + //! selection modes should be left as is, + //! AIS_SelectionModesConcurrency_Single can be used if only one selection + //! mode is expected to be active and + //! AIS_SelectionModesConcurrency_GlobalOrLocal can be used if either + //! AIS_InteractiveObject::GlobalSelectionMode() or any combination of Local + //! selection modes is acceptable; this value is considered only if + //! theToActivate set to TRUE + //! @param theIsForce when set to TRUE, the display status will be ignored while activating + //! selection mode + Standard_EXPORT void SetSelectionModeActive( + const Handle(AIS_InteractiveObject)& theObj, + const Standard_Integer theMode, + const Standard_Boolean theToActivate, + const AIS_SelectionModesConcurrency theConcurrency = AIS_SelectionModesConcurrency_Multiple, + const Standard_Boolean theIsForce = Standard_False); + + //! Activates the selection mode aMode whose index is given, for the given interactive entity + //! anIobj. + void Activate(const Handle(AIS_InteractiveObject)& theObj, + const Standard_Integer theMode = 0, + const Standard_Boolean theIsForce = Standard_False) { - SetSelectionModeActive (theObj, theMode, Standard_True, AIS_SelectionModesConcurrency_GlobalOrLocal, theIsForce); + SetSelectionModeActive(theObj, + theMode, + Standard_True, + AIS_SelectionModesConcurrency_GlobalOrLocal, + theIsForce); } //! Activates the given selection mode for the all displayed objects. - Standard_EXPORT void Activate (const Standard_Integer theMode, - const Standard_Boolean theIsForce = Standard_False); - + Standard_EXPORT void Activate(const Standard_Integer theMode, + const Standard_Boolean theIsForce = Standard_False); + //! Deactivates all the activated selection modes of an object. - void Deactivate (const Handle(AIS_InteractiveObject)& theObj) + void Deactivate(const Handle(AIS_InteractiveObject)& theObj) { - SetSelectionModeActive (theObj, -1, Standard_False, AIS_SelectionModesConcurrency_Single); + SetSelectionModeActive(theObj, -1, Standard_False, AIS_SelectionModesConcurrency_Single); } - //! Deactivates all the activated selection modes of the interactive object anIobj with a given selection mode aMode. - void Deactivate (const Handle(AIS_InteractiveObject)& theObj, const Standard_Integer theMode) + //! Deactivates all the activated selection modes of the interactive object anIobj with a given + //! selection mode aMode. + void Deactivate(const Handle(AIS_InteractiveObject)& theObj, const Standard_Integer theMode) { - SetSelectionModeActive (theObj, theMode, Standard_False); + SetSelectionModeActive(theObj, theMode, Standard_False); } //! Deactivates the given selection mode for all displayed objects. - Standard_EXPORT void Deactivate (const Standard_Integer theMode); + Standard_EXPORT void Deactivate(const Standard_Integer theMode); //! Deactivates all the activated selection mode at all displayed objects. Standard_EXPORT void Deactivate(); //! Returns the list of activated selection modes. - Standard_EXPORT void ActivatedModes (const Handle(AIS_InteractiveObject)& anIobj, TColStd_ListOfInteger& theList) const; + Standard_EXPORT void ActivatedModes(const Handle(AIS_InteractiveObject)& anIobj, + TColStd_ListOfInteger& theList) const; - //! Returns a collection containing all entity owners created for the interactive object in specified selection mode (in all active modes if the Mode == -1) - Standard_EXPORT void EntityOwners (Handle(SelectMgr_IndexedMapOfOwner)& theOwners, - const Handle(AIS_InteractiveObject)& theIObj, - const Standard_Integer theMode = -1) const; + //! Returns a collection containing all entity owners created for the interactive object in + //! specified selection mode (in all active modes if the Mode == -1) + Standard_EXPORT void EntityOwners(Handle(SelectMgr_IndexedMapOfOwner)& theOwners, + const Handle(AIS_InteractiveObject)& theIObj, + const Standard_Integer theMode = -1) const; public: //! @name Selection Filters management - //! @return the context selection filter type. SelectMgr_FilterType FilterType() const { return myFilters->FilterType(); } //! Sets the context selection filter type. //! SelectMgr_TypeFilter_OR selection filter is used by default. //! @param theFilterType the filter type. - void SetFilterType (const SelectMgr_FilterType theFilterType) - { myFilters->SetFilterType (theFilterType); } + void SetFilterType(const SelectMgr_FilterType theFilterType) + { + myFilters->SetFilterType(theFilterType); + } //! Returns the list of filters active in a local context. const SelectMgr_ListOfFilter& Filters() const { return myFilters->StoredFilters(); } @@ -756,10 +850,10 @@ public: //! @name Selection Filters management const Handle(SelectMgr_AndOrFilter)& GlobalFilter() const { return myFilters; } //! Allows you to add the filter. - void AddFilter (const Handle(SelectMgr_Filter)& theFilter) { myFilters->Add (theFilter); } + void AddFilter(const Handle(SelectMgr_Filter)& theFilter) { myFilters->Add(theFilter); } //! Removes a filter from context. - void RemoveFilter (const Handle(SelectMgr_Filter)& theFilter) { myFilters->Remove (theFilter); } + void RemoveFilter(const Handle(SelectMgr_Filter)& theFilter) { myFilters->Remove(theFilter); } //! Remove all filters from context. void RemoveFilters() { myFilters->Clear(); } @@ -768,34 +862,36 @@ public: //! @name Selection Filters management //! @sa MoveTo(), Filters() SelectMgr_PickingStrategy PickingStrategy() const { return myPickingStrategy; } - //! Setup picking strategy - which entities detected by picking line will be accepted, considering Selection Filters. - //! By default (SelectMgr_PickingStrategy_FirstAcceptable), Selection Filters reduce the list of entities - //! so that the context accepts topmost in remaining. + //! Setup picking strategy - which entities detected by picking line will be accepted, considering + //! Selection Filters. By default (SelectMgr_PickingStrategy_FirstAcceptable), Selection Filters + //! reduce the list of entities so that the context accepts topmost in remaining. //! //! This means that entities behind non-selectable (by filters) parts can be picked by user. //! If this behavior is undesirable, and user wants that non-selectable (by filters) parts - //! should remain an obstacle for picking, SelectMgr_PickingStrategy_OnlyTopmost can be set instead. + //! should remain an obstacle for picking, SelectMgr_PickingStrategy_OnlyTopmost can be set + //! instead. //! //! Notice, that since Selection Manager operates only objects registered in it, //! SelectMgr_PickingStrategy_OnlyTopmost will NOT prevent picking entities behind //! visible by unregistered in Selection Manager presentations (e.g. deactivated). - //! Hence, SelectMgr_PickingStrategy_OnlyTopmost changes behavior only with Selection Filters enabled. - void SetPickingStrategy (const SelectMgr_PickingStrategy theStrategy) + //! Hence, SelectMgr_PickingStrategy_OnlyTopmost changes behavior only with Selection Filters + //! enabled. + void SetPickingStrategy(const SelectMgr_PickingStrategy theStrategy) { myPickingStrategy = theStrategy; } public: //! @name common properties - //! Returns the default attribute manager. - //! This contains all the color and line attributes which can be used by interactive objects which do not have their own attributes. + //! This contains all the color and line attributes which can be used by interactive objects which + //! do not have their own attributes. const Handle(Prs3d_Drawer)& DefaultDrawer() const { return myDefaultDrawer; } //! Sets the default attribute manager; should be set at context creation time. //! Warning - this setter doesn't update links to the default drawer of already displayed objects! - void SetDefaultDrawer (const Handle(Prs3d_Drawer)& theDrawer) + void SetDefaultDrawer(const Handle(Prs3d_Drawer)& theDrawer) { - myDefaultDrawer = theDrawer; + myDefaultDrawer = theDrawer; myStyles[Prs3d_TypeOfHighlight_None] = myDefaultDrawer; } @@ -811,199 +907,219 @@ public: //! @name common properties //! Updates the current viewer. Standard_EXPORT void UpdateCurrentViewer(); - //! Returns the list of displayed objects of a particular Type WhichKind and Signature WhichSignature. - //! By Default, WhichSignature equals -1. This means that there is a check on type only. - Standard_EXPORT void DisplayedObjects (AIS_ListOfInteractive& aListOfIO) const; + //! Returns the list of displayed objects of a particular Type WhichKind and Signature + //! WhichSignature. By Default, WhichSignature equals -1. This means that there is a check on type + //! only. + Standard_EXPORT void DisplayedObjects(AIS_ListOfInteractive& aListOfIO) const; //! gives the list of displayed objects of a particular Type and signature. //! by Default, = -1 means control only on . - Standard_EXPORT void DisplayedObjects (const AIS_KindOfInteractive theWhichKind, const Standard_Integer theWhichSignature, AIS_ListOfInteractive& theListOfIO) const; + Standard_EXPORT void DisplayedObjects(const AIS_KindOfInteractive theWhichKind, + const Standard_Integer theWhichSignature, + AIS_ListOfInteractive& theListOfIO) const; - //! Returns the list theListOfIO of erased objects (hidden objects) particular Type WhichKind and Signature WhichSignature. - //! By Default, WhichSignature equals 1. This means that there is a check on type only. - Standard_EXPORT void ErasedObjects (AIS_ListOfInteractive& theListOfIO) const; + //! Returns the list theListOfIO of erased objects (hidden objects) particular Type WhichKind and + //! Signature WhichSignature. By Default, WhichSignature equals 1. This means that there is a + //! check on type only. + Standard_EXPORT void ErasedObjects(AIS_ListOfInteractive& theListOfIO) const; //! gives the list of erased objects (hidden objects) //! Type and signature by Default, = -1 means control only on . - Standard_EXPORT void ErasedObjects (const AIS_KindOfInteractive theWhichKind, const Standard_Integer theWhichSignature, AIS_ListOfInteractive& theListOfIO) const; + Standard_EXPORT void ErasedObjects(const AIS_KindOfInteractive theWhichKind, + const Standard_Integer theWhichSignature, + AIS_ListOfInteractive& theListOfIO) const; - //! Returns the list theListOfIO of objects with indicated display status particular Type WhichKind and Signature WhichSignature. - //! By Default, WhichSignature equals 1. This means that there is a check on type only. - Standard_EXPORT void ObjectsByDisplayStatus (const PrsMgr_DisplayStatus theStatus, AIS_ListOfInteractive& theListOfIO) const; + //! Returns the list theListOfIO of objects with indicated display status particular Type + //! WhichKind and Signature WhichSignature. By Default, WhichSignature equals 1. This means that + //! there is a check on type only. + Standard_EXPORT void ObjectsByDisplayStatus(const PrsMgr_DisplayStatus theStatus, + AIS_ListOfInteractive& theListOfIO) const; //! gives the list of objects with indicated display status //! Type and signature by Default, = -1 means control only on . - Standard_EXPORT void ObjectsByDisplayStatus (const AIS_KindOfInteractive WhichKind, - const Standard_Integer WhichSignature, - const PrsMgr_DisplayStatus theStatus, - AIS_ListOfInteractive& theListOfIO) const; - - //! fills with objects of a particular Type and Signature with no consideration of display status. - //! by Default, = -1 means control only on . - //! if = AIS_KindOfInteractive_None and = -1, all the objects are put into the list. - Standard_EXPORT void ObjectsInside (AIS_ListOfInteractive& aListOfIO, - const AIS_KindOfInteractive WhichKind = AIS_KindOfInteractive_None, - const Standard_Integer WhichSignature = -1) const; + Standard_EXPORT void ObjectsByDisplayStatus(const AIS_KindOfInteractive WhichKind, + const Standard_Integer WhichSignature, + const PrsMgr_DisplayStatus theStatus, + AIS_ListOfInteractive& theListOfIO) const; + + //! fills with objects of a particular Type and Signature with no consideration of + //! display status. by Default, = -1 means control only on . if + //! = AIS_KindOfInteractive_None and = -1, all the objects are put + //! into the list. + Standard_EXPORT void ObjectsInside( + AIS_ListOfInteractive& aListOfIO, + const AIS_KindOfInteractive WhichKind = AIS_KindOfInteractive_None, + const Standard_Integer WhichSignature = -1) const; //! Create iterator through all objects registered in context. AIS_DataMapIteratorOfDataMapOfIOStatus ObjectIterator() const { - return AIS_DataMapIteratorOfDataMapOfIOStatus (myObjects); + return AIS_DataMapIteratorOfDataMapOfIOStatus(myObjects); } //! Rebuilds 1st level of BVH selection forcibly Standard_EXPORT void RebuildSelectionStructs(); //! Disconnects theObjToDisconnect from theAssembly and removes dependent selection structures - Standard_EXPORT void Disconnect (const Handle(AIS_InteractiveObject)& theAssembly, const Handle(AIS_InteractiveObject)& theObjToDisconnect = NULL); + Standard_EXPORT void Disconnect(const Handle(AIS_InteractiveObject)& theAssembly, + const Handle(AIS_InteractiveObject)& theObjToDisconnect = NULL); //! Query objects visible or hidden in specified view due to affinity mask. - Standard_EXPORT void ObjectsForView (AIS_ListOfInteractive& theListOfIO, - const Handle(V3d_View)& theView, - const Standard_Boolean theIsVisibleInView, - const PrsMgr_DisplayStatus theStatus = PrsMgr_DisplayStatus_None) const; + Standard_EXPORT void ObjectsForView( + AIS_ListOfInteractive& theListOfIO, + const Handle(V3d_View)& theView, + const Standard_Boolean theIsVisibleInView, + const PrsMgr_DisplayStatus theStatus = PrsMgr_DisplayStatus_None) const; //! Return rotation gravity point. - Standard_EXPORT virtual gp_Pnt GravityPoint (const Handle(V3d_View)& theView) const; + Standard_EXPORT virtual gp_Pnt GravityPoint(const Handle(V3d_View)& theView) const; public: //! @name debug visualization - //! Visualization of sensitives - for debugging purposes! - Standard_EXPORT void DisplayActiveSensitive (const Handle(V3d_View)& aView); + Standard_EXPORT void DisplayActiveSensitive(const Handle(V3d_View)& aView); //! Clear visualization of sensitives. - Standard_EXPORT void ClearActiveSensitive (const Handle(V3d_View)& aView); + Standard_EXPORT void ClearActiveSensitive(const Handle(V3d_View)& aView); //! Visualization of sensitives - for debugging purposes! - Standard_EXPORT void DisplayActiveSensitive (const Handle(AIS_InteractiveObject)& anObject, const Handle(V3d_View)& aView); + Standard_EXPORT void DisplayActiveSensitive(const Handle(AIS_InteractiveObject)& anObject, + const Handle(V3d_View)& aView); public: //! @name common object display attributes - - //! Sets the graphic attributes of the interactive object, such as visualization mode, color, and material. - Standard_EXPORT void SetLocalAttributes (const Handle(AIS_InteractiveObject)& theIObj, - const Handle(Prs3d_Drawer)& theDrawer, - const Standard_Boolean theToUpdateViewer); + //! Sets the graphic attributes of the interactive object, such as visualization mode, color, and + //! material. + Standard_EXPORT void SetLocalAttributes(const Handle(AIS_InteractiveObject)& theIObj, + const Handle(Prs3d_Drawer)& theDrawer, + const Standard_Boolean theToUpdateViewer); //! Removes the settings for local attributes of the Object and returns to defaults. - Standard_EXPORT void UnsetLocalAttributes (const Handle(AIS_InteractiveObject)& theIObj, - const Standard_Boolean theToUpdateViewer); + Standard_EXPORT void UnsetLocalAttributes(const Handle(AIS_InteractiveObject)& theIObj, + const Standard_Boolean theToUpdateViewer); - //! change the current facing model apply on polygons for SetColor(), SetTransparency(), SetMaterial() methods default facing model is Aspect_TOFM_TWO_SIDE. - //! This mean that attributes is applying both on the front and back face. - Standard_EXPORT void SetCurrentFacingModel (const Handle(AIS_InteractiveObject)& aniobj, const Aspect_TypeOfFacingModel aModel = Aspect_TOFM_BOTH_SIDE); + //! change the current facing model apply on polygons for SetColor(), SetTransparency(), + //! SetMaterial() methods default facing model is Aspect_TOFM_TWO_SIDE. This mean that attributes + //! is applying both on the front and back face. + Standard_EXPORT void SetCurrentFacingModel( + const Handle(AIS_InteractiveObject)& aniobj, + const Aspect_TypeOfFacingModel aModel = Aspect_TOFM_BOTH_SIDE); //! Returns true if a view of the Interactive Object has color. - Standard_EXPORT Standard_Boolean HasColor (const Handle(AIS_InteractiveObject)& aniobj) const; + Standard_EXPORT Standard_Boolean HasColor(const Handle(AIS_InteractiveObject)& aniobj) const; //! Returns the color of the Object in the interactive context. - Standard_EXPORT void Color (const Handle(AIS_InteractiveObject)& aniobj, Quantity_Color& acolor) const; + Standard_EXPORT void Color(const Handle(AIS_InteractiveObject)& aniobj, + Quantity_Color& acolor) const; //! Sets the color of the selected entity. - Standard_EXPORT void SetColor (const Handle(AIS_InteractiveObject)& theIObj, - const Quantity_Color& theColor, - const Standard_Boolean theToUpdateViewer); + Standard_EXPORT void SetColor(const Handle(AIS_InteractiveObject)& theIObj, + const Quantity_Color& theColor, + const Standard_Boolean theToUpdateViewer); //! Removes the color selection for the selected entity. - Standard_EXPORT void UnsetColor (const Handle(AIS_InteractiveObject)& theIObj, - const Standard_Boolean theToUpdateViewer); + Standard_EXPORT void UnsetColor(const Handle(AIS_InteractiveObject)& theIObj, + const Standard_Boolean theToUpdateViewer); //! Returns the width of the Interactive Object in the interactive context. - Standard_EXPORT virtual Standard_Real Width (const Handle(AIS_InteractiveObject)& aniobj) const; + Standard_EXPORT virtual Standard_Real Width(const Handle(AIS_InteractiveObject)& aniobj) const; //! Sets the width of the Object. - Standard_EXPORT virtual void SetWidth (const Handle(AIS_InteractiveObject)& theIObj, - const Standard_Real theValue, - const Standard_Boolean theToUpdateViewer); + Standard_EXPORT virtual void SetWidth(const Handle(AIS_InteractiveObject)& theIObj, + const Standard_Real theValue, + const Standard_Boolean theToUpdateViewer); //! Removes the width setting of the Object. - Standard_EXPORT virtual void UnsetWidth (const Handle(AIS_InteractiveObject)& theIObj, - const Standard_Boolean theToUpdateViewer); + Standard_EXPORT virtual void UnsetWidth(const Handle(AIS_InteractiveObject)& theIObj, + const Standard_Boolean theToUpdateViewer); //! Provides the type of material setting for the view of the Object. - Standard_EXPORT void SetMaterial (const Handle(AIS_InteractiveObject)& theIObj, - const Graphic3d_MaterialAspect& theMaterial, - const Standard_Boolean theToUpdateViewer); + Standard_EXPORT void SetMaterial(const Handle(AIS_InteractiveObject)& theIObj, + const Graphic3d_MaterialAspect& theMaterial, + const Standard_Boolean theToUpdateViewer); //! Removes the type of material setting for viewing the Object. - Standard_EXPORT void UnsetMaterial (const Handle(AIS_InteractiveObject)& theIObj, - const Standard_Boolean theToUpdateViewer); - + Standard_EXPORT void UnsetMaterial(const Handle(AIS_InteractiveObject)& theIObj, + const Standard_Boolean theToUpdateViewer); + //! Provides the transparency settings for viewing the Object. //! The transparency value aValue may be between 0.0, opaque, and 1.0, fully transparent. - Standard_EXPORT void SetTransparency (const Handle(AIS_InteractiveObject)& theIObj, - const Standard_Real theValue, - const Standard_Boolean theToUpdateViewer); + Standard_EXPORT void SetTransparency(const Handle(AIS_InteractiveObject)& theIObj, + const Standard_Real theValue, + const Standard_Boolean theToUpdateViewer); //! Removes the transparency settings for viewing the Object. - Standard_EXPORT void UnsetTransparency (const Handle(AIS_InteractiveObject)& theIObj, - const Standard_Boolean theToUpdateViewer); + Standard_EXPORT void UnsetTransparency(const Handle(AIS_InteractiveObject)& theIObj, + const Standard_Boolean theToUpdateViewer); //! Sets up polygon offsets for the given AIS_InteractiveObject. //! It simply calls AIS_InteractiveObject::SetPolygonOffsets(). - Standard_EXPORT void SetPolygonOffsets (const Handle(AIS_InteractiveObject)& theIObj, - const Standard_Integer theMode, - const Standard_ShortReal theFactor, - const Standard_ShortReal theUnits, - const Standard_Boolean theToUpdateViewer); - + Standard_EXPORT void SetPolygonOffsets(const Handle(AIS_InteractiveObject)& theIObj, + const Standard_Integer theMode, + const Standard_ShortReal theFactor, + const Standard_ShortReal theUnits, + const Standard_Boolean theToUpdateViewer); + //! Simply calls AIS_InteractiveObject::HasPolygonOffsets(). - Standard_EXPORT Standard_Boolean HasPolygonOffsets (const Handle(AIS_InteractiveObject)& anObj) const; + Standard_EXPORT Standard_Boolean + HasPolygonOffsets(const Handle(AIS_InteractiveObject)& anObj) const; //! Retrieves current polygon offsets settings for Object. - Standard_EXPORT void PolygonOffsets (const Handle(AIS_InteractiveObject)& anObj, Standard_Integer& aMode, Standard_ShortReal& aFactor, Standard_ShortReal& aUnits) const; + Standard_EXPORT void PolygonOffsets(const Handle(AIS_InteractiveObject)& anObj, + Standard_Integer& aMode, + Standard_ShortReal& aFactor, + Standard_ShortReal& aUnits) const; public: //! @name trihedron display attributes - //! Sets the size aSize of the trihedron. //! Is used to change the default value 100 mm for display of trihedra. - //! Use of this function in one of your own interactive objects requires a call to the Compute function of the new class. - //! This will recalculate the presentation for every trihedron displayed. - Standard_EXPORT void SetTrihedronSize (const Standard_Real theSize, - const Standard_Boolean theToUpdateViewer); + //! Use of this function in one of your own interactive objects requires a call to the Compute + //! function of the new class. This will recalculate the presentation for every trihedron + //! displayed. + Standard_EXPORT void SetTrihedronSize(const Standard_Real theSize, + const Standard_Boolean theToUpdateViewer); //! returns the current value of trihedron size. Standard_EXPORT Standard_Real TrihedronSize() const; public: //! @name plane display attributes - - //! Sets the plane size defined by the length in the X direction XSize and that in the Y direction YSize. - Standard_EXPORT void SetPlaneSize (const Standard_Real theSizeX, - const Standard_Real theSizeY, - const Standard_Boolean theToUpdateViewer); + //! Sets the plane size defined by the length in the X direction XSize and that in the Y direction + //! YSize. + Standard_EXPORT void SetPlaneSize(const Standard_Real theSizeX, + const Standard_Real theSizeY, + const Standard_Boolean theToUpdateViewer); //! Sets the plane size aSize. - Standard_EXPORT void SetPlaneSize (const Standard_Real theSize, - const Standard_Boolean theToUpdateViewer); + Standard_EXPORT void SetPlaneSize(const Standard_Real theSize, + const Standard_Boolean theToUpdateViewer); - //! Returns true if the length in the X direction XSize is the same as that in the Y direction YSize. - Standard_EXPORT Standard_Boolean PlaneSize (Standard_Real& XSize, Standard_Real& YSize) const; + //! Returns true if the length in the X direction XSize is the same as that in the Y direction + //! YSize. + Standard_EXPORT Standard_Boolean PlaneSize(Standard_Real& XSize, Standard_Real& YSize) const; public: //! @name tessellation deviation properties for automatic triangulation - //! Sets the deviation coefficient theCoefficient. //! Drawings of curves or patches are made with respect to a maximal chordal deviation. //! A Deviation coefficient is used in the shading display mode. //! The shape is seen decomposed into triangles. //! These are used to calculate reflection of light from the surface of the object. //! The triangles are formed from chords of the curves in the shape. - //! The deviation coefficient theCoefficient gives the highest value of the angle with which a chord can deviate from a tangent to a curve. - //! If this limit is reached, a new triangle is begun. - //! This deviation is absolute and is set through the method: SetMaximalChordialDeviation. + //! The deviation coefficient theCoefficient gives the highest value of the angle with which a + //! chord can deviate from a tangent to a curve. If this limit is reached, a new triangle is + //! begun. This deviation is absolute and is set through the method: SetMaximalChordialDeviation. //! The default value is 0.001. //! In drawing shapes, however, you are allowed to ask for a relative deviation. //! This deviation will be: SizeOfObject * DeviationCoefficient. - Standard_EXPORT void SetDeviationCoefficient (const Handle(AIS_InteractiveObject)& theIObj, - const Standard_Real theCoefficient, - const Standard_Boolean theToUpdateViewer); + Standard_EXPORT void SetDeviationCoefficient(const Handle(AIS_InteractiveObject)& theIObj, + const Standard_Real theCoefficient, + const Standard_Boolean theToUpdateViewer); + + Standard_EXPORT void SetDeviationAngle(const Handle(AIS_InteractiveObject)& theIObj, + const Standard_Real theAngle, + const Standard_Boolean theToUpdateViewer); - Standard_EXPORT void SetDeviationAngle (const Handle(AIS_InteractiveObject)& theIObj, - const Standard_Real theAngle, - const Standard_Boolean theToUpdateViewer); - //! Calls the AIS_Shape SetAngleAndDeviation to set both Angle and Deviation coefficients - Standard_EXPORT void SetAngleAndDeviation (const Handle(AIS_InteractiveObject)& theIObj, - const Standard_Real theAngle, - const Standard_Boolean theToUpdateViewer); + Standard_EXPORT void SetAngleAndDeviation(const Handle(AIS_InteractiveObject)& theIObj, + const Standard_Real theAngle, + const Standard_Boolean theToUpdateViewer); //! Sets the deviation coefficient theCoefficient. //! Drawings of curves or patches are made with respect to a maximal chordal deviation. @@ -1011,45 +1127,55 @@ public: //! @name tessellation deviation properties for automatic triangulation //! The shape is seen decomposed into triangles. //! These are used to calculate reflection of light from the surface of the object. //! The triangles are formed from chords of the curves in the shape. - //! The deviation coefficient theCoefficient gives the highest value of the angle with which a chord can deviate from a tangent to a curve. - //! If this limit is reached, a new triangle is begun. - //! This deviation is absolute and is set through the method: SetMaximalChordialDeviation. + //! The deviation coefficient theCoefficient gives the highest value of the angle with which a + //! chord can deviate from a tangent to a curve. If this limit is reached, a new triangle is + //! begun. This deviation is absolute and is set through the method: SetMaximalChordialDeviation. //! The default value is 0.001. //! In drawing shapes, however, you are allowed to ask for a relative deviation. //! This deviation will be: SizeOfObject * DeviationCoefficient. - void SetDeviationCoefficient (const Standard_Real theCoefficient) { myDefaultDrawer->SetDeviationCoefficient (theCoefficient); } - + void SetDeviationCoefficient(const Standard_Real theCoefficient) + { + myDefaultDrawer->SetDeviationCoefficient(theCoefficient); + } + //! Returns the deviation coefficient. //! Drawings of curves or patches are made with respect to a maximal chordal deviation. //! A Deviation coefficient is used in the shading display mode. //! The shape is seen decomposed into triangles. //! These are used to calculate reflection of light from the surface of the object. //! The triangles are formed from chords of the curves in the shape. - //! The deviation coefficient gives the highest value of the angle with which a chord can deviate from a tangent to a curve. - //! If this limit is reached, a new triangle is begun. - //! This deviation is absolute and is set through Prs3d_Drawer::SetMaximalChordialDeviation. - //! The default value is 0.001. - //! In drawing shapes, however, you are allowed to ask for a relative deviation. - //! This deviation will be: SizeOfObject * DeviationCoefficient. + //! The deviation coefficient gives the highest value of the angle with which a chord can deviate + //! from a tangent to a curve. If this limit is reached, a new triangle is begun. This deviation + //! is absolute and is set through Prs3d_Drawer::SetMaximalChordialDeviation. The default value is + //! 0.001. In drawing shapes, however, you are allowed to ask for a relative deviation. This + //! deviation will be: SizeOfObject * DeviationCoefficient. Standard_Real DeviationCoefficient() const { return myDefaultDrawer->DeviationCoefficient(); } //! default 20 degrees - void SetDeviationAngle (const Standard_Real theAngle) { myDefaultDrawer->SetDeviationAngle (theAngle); } + void SetDeviationAngle(const Standard_Real theAngle) + { + myDefaultDrawer->SetDeviationAngle(theAngle); + } Standard_Real DeviationAngle() const { return myDefaultDrawer->DeviationAngle(); } public: //! @name HLR (Hidden Line Removal) display attributes - //! Initializes hidden line aspect in the default drawing tool, or Drawer. //! The default values are: //! Color: Quantity_NOC_YELLOW //! Type of line: Aspect_TOL_DASH //! Width: 1. - const Handle(Prs3d_LineAspect)& HiddenLineAspect() const { return myDefaultDrawer->HiddenLineAspect(); } + const Handle(Prs3d_LineAspect)& HiddenLineAspect() const + { + return myDefaultDrawer->HiddenLineAspect(); + } //! Sets the hidden line aspect anAspect. //! Aspect defines display attributes for hidden lines in HLR projections. - void SetHiddenLineAspect (const Handle(Prs3d_LineAspect)& theAspect) const { myDefaultDrawer->SetHiddenLineAspect (theAspect); } + void SetHiddenLineAspect(const Handle(Prs3d_LineAspect)& theAspect) const + { + myDefaultDrawer->SetHiddenLineAspect(theAspect); + } //! returns Standard_True if the hidden lines are to be drawn. //! By default the hidden lines are not drawn. @@ -1060,321 +1186,404 @@ public: //! @name HLR (Hidden Line Removal) display attributes void DisableDrawHiddenLine() const { myDefaultDrawer->DisableDrawHiddenLine(); } public: //! @name iso-line display attributes - //! Sets the number of U and V isoparameters displayed. - Standard_EXPORT void SetIsoNumber (const Standard_Integer NbIsos, const AIS_TypeOfIso WhichIsos = AIS_TOI_Both); - + Standard_EXPORT void SetIsoNumber(const Standard_Integer NbIsos, + const AIS_TypeOfIso WhichIsos = AIS_TOI_Both); + //! Returns the number of U and V isoparameters displayed. - Standard_EXPORT Standard_Integer IsoNumber (const AIS_TypeOfIso WhichIsos = AIS_TOI_Both); - + Standard_EXPORT Standard_Integer IsoNumber(const AIS_TypeOfIso WhichIsos = AIS_TOI_Both); + //! Returns True if drawing isoparameters on planes is enabled. - void IsoOnPlane (const Standard_Boolean theToSwitchOn) { myDefaultDrawer->SetIsoOnPlane (theToSwitchOn); } - + void IsoOnPlane(const Standard_Boolean theToSwitchOn) + { + myDefaultDrawer->SetIsoOnPlane(theToSwitchOn); + } + //! Returns True if drawing isoparameters on planes is enabled. //! if = False, Standard_Boolean IsoOnPlane() const { return myDefaultDrawer->IsoOnPlane(); } //! Enables or disables on-triangulation build for isolines for a particular object. - //! In case if on-triangulation builder is disabled, default on-plane builder will compute isolines for the object given. - Standard_EXPORT void IsoOnTriangulation (const Standard_Boolean theIsEnabled, - const Handle(AIS_InteractiveObject)& theObject); + //! In case if on-triangulation builder is disabled, default on-plane builder will compute + //! isolines for the object given. + Standard_EXPORT void IsoOnTriangulation(const Standard_Boolean theIsEnabled, + const Handle(AIS_InteractiveObject)& theObject); //! Enables or disables on-triangulation build for isolines for default drawer. - //! In case if on-triangulation builder is disabled, default on-plane builder will compute isolines for the object given. - void IsoOnTriangulation (const Standard_Boolean theToSwitchOn) { myDefaultDrawer->SetIsoOnTriangulation (theToSwitchOn); } + //! In case if on-triangulation builder is disabled, default on-plane builder will compute + //! isolines for the object given. + void IsoOnTriangulation(const Standard_Boolean theToSwitchOn) + { + myDefaultDrawer->SetIsoOnTriangulation(theToSwitchOn); + } //! Returns true if drawing isolines on triangulation algorithm is enabled. Standard_Boolean IsoOnTriangulation() const { return myDefaultDrawer->IsoOnTriangulation(); } -//! @name obsolete methods + //! @name obsolete methods public: - - Standard_DEPRECATED("Deprecated method Display() with obsolete argument theToAllowDecomposition") - void Display (const Handle(AIS_InteractiveObject)& theIObj, - const Standard_Integer theDispMode, - const Standard_Integer theSelectionMode, - const Standard_Boolean theToUpdateViewer, - const Standard_Boolean theToAllowDecomposition, - const PrsMgr_DisplayStatus theDispStatus = PrsMgr_DisplayStatus_None) + Standard_DEPRECATED("Deprecated method Display() with obsolete argument " + "theToAllowDecomposition") + + void Display(const Handle(AIS_InteractiveObject)& theIObj, + const Standard_Integer theDispMode, + const Standard_Integer theSelectionMode, + const Standard_Boolean theToUpdateViewer, + const Standard_Boolean theToAllowDecomposition, + const PrsMgr_DisplayStatus theDispStatus = PrsMgr_DisplayStatus_None) { - (void )theToAllowDecomposition; - Display (theIObj, theDispMode, theSelectionMode, theToUpdateViewer, theDispStatus); + (void)theToAllowDecomposition; + Display(theIObj, theDispMode, theSelectionMode, theToUpdateViewer, theDispStatus); } - Standard_DEPRECATED("Deprecated method Load() with obsolete last argument theToAllowDecomposition") - void Load (const Handle(AIS_InteractiveObject)& theObj, Standard_Integer theSelectionMode, Standard_Boolean ) { Load (theObj, theSelectionMode); } + Standard_DEPRECATED("Deprecated method Load() with obsolete last argument " + "theToAllowDecomposition") + + void Load(const Handle(AIS_InteractiveObject)& theObj, + Standard_Integer theSelectionMode, + Standard_Boolean) + { + Load(theObj, theSelectionMode); + } //! Updates the display in the viewer to take dynamic detection into account. //! On dynamic detection by the mouse cursor, sensitive primitives are highlighted. //! The highlight color of entities detected by mouse movement is white by default. Standard_DEPRECATED("Deprecated method Hilight()") - void Hilight (const Handle(AIS_InteractiveObject)& theObj, - const Standard_Boolean theIsToUpdateViewer) + + void Hilight(const Handle(AIS_InteractiveObject)& theObj, + const Standard_Boolean theIsToUpdateViewer) { - return HilightWithColor (theObj, myStyles[Prs3d_TypeOfHighlight_Dynamic], theIsToUpdateViewer); + return HilightWithColor(theObj, myStyles[Prs3d_TypeOfHighlight_Dynamic], theIsToUpdateViewer); } //! Sets the graphic basic aspect to the current presentation of ALL selected objects. - Standard_DEPRECATED ("Deprecated method - presentation attributes should be assigned directly to object") - Standard_EXPORT void SetSelectedAspect (const Handle(Prs3d_BasicAspect)& theAspect, - const Standard_Boolean theToUpdateViewer); - - //! Selects everything found in the bounding rectangle defined by the pixel minima and maxima, XPMin, YPMin, XPMax, and YPMax in the view. - //! The objects detected are passed to the main viewer, which is then updated. - Standard_DEPRECATED("This method is deprecated - SelectRectangle() taking AIS_SelectionScheme_Replace should be called instead") - Standard_EXPORT AIS_StatusOfPick Select (const Standard_Integer theXPMin, - const Standard_Integer theYPMin, - const Standard_Integer theXPMax, - const Standard_Integer theYPMax, - const Handle(V3d_View)& theView, - const Standard_Boolean theToUpdateViewer); + Standard_DEPRECATED( + "Deprecated method - presentation attributes should be assigned directly to object") + Standard_EXPORT void SetSelectedAspect(const Handle(Prs3d_BasicAspect)& theAspect, + const Standard_Boolean theToUpdateViewer); + + //! Selects everything found in the bounding rectangle defined by the pixel minima and maxima, + //! XPMin, YPMin, XPMax, and YPMax in the view. The objects detected are passed to the main + //! viewer, which is then updated. + Standard_DEPRECATED("This method is deprecated - SelectRectangle() taking " + "AIS_SelectionScheme_Replace should be called instead") + Standard_EXPORT AIS_StatusOfPick Select(const Standard_Integer theXPMin, + const Standard_Integer theYPMin, + const Standard_Integer theXPMax, + const Standard_Integer theYPMax, + const Handle(V3d_View)& theView, + const Standard_Boolean theToUpdateViewer); //! polyline selection; clears the previous picked list - Standard_DEPRECATED("This method is deprecated - SelectPolygon() taking AIS_SelectionScheme_Replace should be called instead") - Standard_EXPORT AIS_StatusOfPick Select (const TColgp_Array1OfPnt2d& thePolyline, - const Handle(V3d_View)& theView, - const Standard_Boolean theToUpdateViewer); + Standard_DEPRECATED("This method is deprecated - SelectPolygon() taking " + "AIS_SelectionScheme_Replace should be called instead") + Standard_EXPORT AIS_StatusOfPick Select(const TColgp_Array1OfPnt2d& thePolyline, + const Handle(V3d_View)& theView, + const Standard_Boolean theToUpdateViewer); //! Stores and hilights the previous detected; Unhilights the previous picked. //! @sa MoveTo(). - Standard_DEPRECATED("This method is deprecated - SelectDetected() taking AIS_SelectionScheme_Replace should be called instead") - Standard_EXPORT AIS_StatusOfPick Select (const Standard_Boolean theToUpdateViewer); + Standard_DEPRECATED("This method is deprecated - SelectDetected() taking " + "AIS_SelectionScheme_Replace should be called instead") + Standard_EXPORT AIS_StatusOfPick Select(const Standard_Boolean theToUpdateViewer); //! Adds the last detected to the list of previous picked. //! If the last detected was already declared as picked, removes it from the Picked List. //! @sa MoveTo(). - Standard_DEPRECATED("This method is deprecated - SelectDetected() taking AIS_SelectionScheme_XOR should be called instead") - Standard_EXPORT AIS_StatusOfPick ShiftSelect (const Standard_Boolean theToUpdateViewer); + Standard_DEPRECATED("This method is deprecated - SelectDetected() taking AIS_SelectionScheme_XOR " + "should be called instead") + Standard_EXPORT AIS_StatusOfPick ShiftSelect(const Standard_Boolean theToUpdateViewer); //! Adds the last detected to the list of previous picked. //! If the last detected was already declared as picked, removes it from the Picked List. - Standard_DEPRECATED("This method is deprecated - SelectPolygon() taking AIS_SelectionScheme_XOR should be called instead") - Standard_EXPORT AIS_StatusOfPick ShiftSelect (const TColgp_Array1OfPnt2d& thePolyline, - const Handle(V3d_View)& theView, - const Standard_Boolean theToUpdateViewer); + Standard_DEPRECATED("This method is deprecated - SelectPolygon() taking AIS_SelectionScheme_XOR " + "should be called instead") + Standard_EXPORT AIS_StatusOfPick ShiftSelect(const TColgp_Array1OfPnt2d& thePolyline, + const Handle(V3d_View)& theView, + const Standard_Boolean theToUpdateViewer); //! Rectangle of selection; adds new detected entities into the picked list, //! removes the detected entities that were already stored. - Standard_DEPRECATED("This method is deprecated - SelectRectangle() taking AIS_SelectionScheme_XOR should be called instead") - Standard_EXPORT AIS_StatusOfPick ShiftSelect (const Standard_Integer theXPMin, - const Standard_Integer theYPMin, - const Standard_Integer theXPMax, - const Standard_Integer theYPMax, - const Handle(V3d_View)& theView, - const Standard_Boolean theToUpdateViewer); + Standard_DEPRECATED("This method is deprecated - SelectRectangle() taking " + "AIS_SelectionScheme_XOR should be called instead") + Standard_EXPORT AIS_StatusOfPick ShiftSelect(const Standard_Integer theXPMin, + const Standard_Integer theYPMin, + const Standard_Integer theXPMax, + const Standard_Integer theYPMax, + const Handle(V3d_View)& theView, + const Standard_Boolean theToUpdateViewer); public: - //! Updates the view of the current object in open context. - //! Objects selected when there is no open local context are called current objects; those selected in open local context, selected objects. - Standard_DEPRECATED ("Local Context is deprecated - local selection should be used without Local Context") - void SetCurrentObject (const Handle(AIS_InteractiveObject)& theIObj, - const Standard_Boolean theToUpdateViewer) { SetSelected (theIObj, theToUpdateViewer); } - - //! Allows to add or remove the object given to the list of current and highlight/unhighlight it correspondingly. - //! Is valid for global context only; for local context use method AddOrRemoveSelected. - //! Since this method makes sense only for neutral point selection of a whole object, - //! if 0 selection of the object is empty this method simply does nothing. - Standard_DEPRECATED ("Local Context is deprecated - local selection should be used without Local Context") - void AddOrRemoveCurrentObject (const Handle(AIS_InteractiveObject)& theObj, - const Standard_Boolean theIsToUpdateViewer) { AddOrRemoveSelected (theObj, theIsToUpdateViewer); } - - //! Updates the list of current objects, i.e. hilights new current objects, removes hilighting from former current objects. - //! Objects selected when there is no open local context are called current objects; those selected in open local context, selected objects. - Standard_DEPRECATED ("Local Context is deprecated - local selection should be used without Local Context") - void UpdateCurrent() { UpdateSelected (Standard_True); } + //! Objects selected when there is no open local context are called current objects; those + //! selected in open local context, selected objects. + Standard_DEPRECATED("Local Context is deprecated - local selection should be used without Local " + "Context") + + void SetCurrentObject(const Handle(AIS_InteractiveObject)& theIObj, + const Standard_Boolean theToUpdateViewer) + { + SetSelected(theIObj, theToUpdateViewer); + } + + //! Allows to add or remove the object given to the list of current and highlight/unhighlight it + //! correspondingly. Is valid for global context only; for local context use method + //! AddOrRemoveSelected. Since this method makes sense only for neutral point selection of a whole + //! object, if 0 selection of the object is empty this method simply does nothing. + Standard_DEPRECATED("Local Context is deprecated - local selection should be used without Local " + "Context") + + void AddOrRemoveCurrentObject(const Handle(AIS_InteractiveObject)& theObj, + const Standard_Boolean theIsToUpdateViewer) + { + AddOrRemoveSelected(theObj, theIsToUpdateViewer); + } + + //! Updates the list of current objects, i.e. hilights new current objects, removes hilighting + //! from former current objects. Objects selected when there is no open local context are called + //! current objects; those selected in open local context, selected objects. + Standard_DEPRECATED("Local Context is deprecated - local selection should be used without Local " + "Context") + + void UpdateCurrent() { UpdateSelected(Standard_True); } //! Returns true if there is a non-null interactive object in Neutral Point. //! Objects selected when there is no open local context are called current objects; //! those selected in open local context, selected objects. - Standard_DEPRECATED ("Local Context is deprecated - local selection should be used without Local Context") - Standard_Boolean IsCurrent (const Handle(AIS_InteractiveObject)& theObject) const { return IsSelected (theObject); } + Standard_DEPRECATED( + "Local Context is deprecated - local selection should be used without Local Context") + + Standard_Boolean IsCurrent(const Handle(AIS_InteractiveObject)& theObject) const + { + return IsSelected(theObject); + } //! Initializes a scan of the current selected objects in Neutral Point. - //! Objects selected when there is no open local context are called current objects; those selected in open local context, selected objects. - Standard_DEPRECATED ("Local Context is deprecated - local selection should be used without Local Context") + //! Objects selected when there is no open local context are called current objects; those + //! selected in open local context, selected objects. + Standard_DEPRECATED("Local Context is deprecated - local selection should be used without Local " + "Context") + void InitCurrent() { InitSelected(); } //! Returns true if there is another object found by the scan of the list of current objects. - //! Objects selected when there is no open local context are called current objects; those selected in open local context, selected objects. - Standard_DEPRECATED ("Local Context is deprecated - local selection should be used without Local Context") + //! Objects selected when there is no open local context are called current objects; those + //! selected in open local context, selected objects. + Standard_DEPRECATED( + "Local Context is deprecated - local selection should be used without Local Context") + Standard_Boolean MoreCurrent() const { return MoreSelected(); } - + //! Continues the scan to the next object in the list of current objects. - //! Objects selected when there is no open local context are called current objects; those selected in open local context, selected objects. - Standard_DEPRECATED ("Local Context is deprecated - local selection should be used without Local Context") + //! Objects selected when there is no open local context are called current objects; those + //! selected in open local context, selected objects. + Standard_DEPRECATED("Local Context is deprecated - local selection should be used without Local " + "Context") + void NextCurrent() { NextSelected(); } //! Returns the current interactive object. - //! Objects selected when there is no open local context are called current objects; those selected in open local context, selected objects. - Standard_DEPRECATED ("Local Context is deprecated - local selection should be used without Local Context") + //! Objects selected when there is no open local context are called current objects; those + //! selected in open local context, selected objects. + Standard_DEPRECATED( + "Local Context is deprecated - local selection should be used without Local Context") + Handle(AIS_InteractiveObject) Current() const { return SelectedInteractive(); } - Standard_DEPRECATED ("Local Context is deprecated - local selection should be used without Local Context") + Standard_DEPRECATED( + "Local Context is deprecated - local selection should be used without Local Context") + Standard_Integer NbCurrents() { return NbSelected(); } //! Highlights current objects. - //! Objects selected when there is no open local context are called current objects; those selected in open local context, selected objects. - Standard_DEPRECATED ("Local Context is deprecated - local selection should be used without Local Context") - void HilightCurrents (const Standard_Boolean theToUpdateViewer) { HilightSelected (theToUpdateViewer); } + //! Objects selected when there is no open local context are called current objects; those + //! selected in open local context, selected objects. + Standard_DEPRECATED("Local Context is deprecated - local selection should be used without Local " + "Context") + + void HilightCurrents(const Standard_Boolean theToUpdateViewer) + { + HilightSelected(theToUpdateViewer); + } //! Removes highlighting from current objects. - //! Objects selected when there is no open local context are called current objects; those selected in open local context, selected objects. - Standard_DEPRECATED ("Local Context is deprecated - local selection should be used without Local Context") - void UnhilightCurrents (const Standard_Boolean theToUpdateViewer) { UnhilightSelected (theToUpdateViewer); } + //! Objects selected when there is no open local context are called current objects; those + //! selected in open local context, selected objects. + Standard_DEPRECATED("Local Context is deprecated - local selection should be used without Local " + "Context") - //! Empties previous current objects in order to get the current objects detected by the selector using UpdateCurrent. - //! Objects selected when there is no open local context are called current objects; those selected in open local context, selected objects. - Standard_DEPRECATED ("Local Context is deprecated - local selection should be used without Local Context") - void ClearCurrents (const Standard_Boolean theToUpdateViewer) { ClearSelected (theToUpdateViewer); } + void UnhilightCurrents(const Standard_Boolean theToUpdateViewer) + { + UnhilightSelected(theToUpdateViewer); + } + + //! Empties previous current objects in order to get the current objects detected by the selector + //! using UpdateCurrent. Objects selected when there is no open local context are called current + //! objects; those selected in open local context, selected objects. + Standard_DEPRECATED("Local Context is deprecated - local selection should be used without Local " + "Context") + + void ClearCurrents(const Standard_Boolean theToUpdateViewer) { ClearSelected(theToUpdateViewer); } //! @return current mouse-detected shape or empty (null) shape, if current interactive object //! is not a shape (AIS_Shape) or there is no current mouse-detected interactive object at all. //! @sa DetectedCurrentOwner(), InitDetected(), MoreDetected(), NextDetected(). - Standard_DEPRECATED ("Local Context is deprecated - ::DetectedCurrentOwner() should be called instead") + Standard_DEPRECATED( + "Local Context is deprecated - ::DetectedCurrentOwner() should be called instead") Standard_EXPORT const TopoDS_Shape& DetectedCurrentShape() const; - - //! @return current mouse-detected interactive object or null object, if there is no currently detected interactives + + //! @return current mouse-detected interactive object or null object, if there is no currently + //! detected interactives //! @sa DetectedCurrentOwner(), InitDetected(), MoreDetected(), NextDetected(). - Standard_DEPRECATED ("Local Context is deprecated - ::DetectedCurrentOwner() should be called instead") + Standard_DEPRECATED( + "Local Context is deprecated - ::DetectedCurrentOwner() should be called instead") Standard_EXPORT Handle(AIS_InteractiveObject) DetectedCurrentObject() const; public: //! @name sub-intensity management (deprecated) - - //! Sub-intensity allows temporary highlighting of particular objects with specified color in a manner of selection highlight, - //! but without actual selection (e.g., global status and owner's selection state will not be updated). - //! The method returns the color of such highlighting. - //! By default, it is Quantity_NOC_GRAY40. + //! Sub-intensity allows temporary highlighting of particular objects with specified color in a + //! manner of selection highlight, but without actual selection (e.g., global status and owner's + //! selection state will not be updated). The method returns the color of such highlighting. By + //! default, it is Quantity_NOC_GRAY40. const Quantity_Color& SubIntensityColor() const { return myStyles[Prs3d_TypeOfHighlight_SubIntensity]->Color(); } - //! Sub-intensity allows temporary highlighting of particular objects with specified color in a manner of selection highlight, - //! but without actual selection (e.g., global status and owner's selection state will not be updated). - //! The method sets up the color for such highlighting. - //! By default, this is Quantity_NOC_GRAY40. - void SetSubIntensityColor (const Quantity_Color& theColor) + //! Sub-intensity allows temporary highlighting of particular objects with specified color in a + //! manner of selection highlight, but without actual selection (e.g., global status and owner's + //! selection state will not be updated). The method sets up the color for such highlighting. By + //! default, this is Quantity_NOC_GRAY40. + void SetSubIntensityColor(const Quantity_Color& theColor) { - myStyles[Prs3d_TypeOfHighlight_SubIntensity]->SetColor (theColor); + myStyles[Prs3d_TypeOfHighlight_SubIntensity]->SetColor(theColor); } - //! Highlights, and removes highlights from, the displayed object which is displayed at Neutral Point with subintensity color. - //! Available only for active local context. - //! There is no effect if there is no local context. - //! If a local context is open, the presentation of the Interactive Object activates the selection mode. - Standard_EXPORT void SubIntensityOn (const Handle(AIS_InteractiveObject)& theIObj, - const Standard_Boolean theToUpdateViewer); + //! Highlights, and removes highlights from, the displayed object which is displayed at Neutral + //! Point with subintensity color. Available only for active local context. There is no effect if + //! there is no local context. If a local context is open, the presentation of the Interactive + //! Object activates the selection mode. + Standard_EXPORT void SubIntensityOn(const Handle(AIS_InteractiveObject)& theIObj, + const Standard_Boolean theToUpdateViewer); //! Removes the subintensity option for the entity. - //! If a local context is open, the presentation of the Interactive Object activates the selection mode. - Standard_EXPORT void SubIntensityOff (const Handle(AIS_InteractiveObject)& theIObj, - const Standard_Boolean theToUpdateViewer); + //! If a local context is open, the presentation of the Interactive Object activates the selection + //! mode. + Standard_EXPORT void SubIntensityOff(const Handle(AIS_InteractiveObject)& theIObj, + const Standard_Boolean theToUpdateViewer); //! Returns selection instance const Handle(AIS_Selection)& Selection() const { return mySelection; } //! Sets selection instance to manipulate a container of selected owners //! @param theSelection an instance of the selection - void SetSelection (const Handle(AIS_Selection)& theSelection) { mySelection = theSelection; } + void SetSelection(const Handle(AIS_Selection)& theSelection) { mySelection = theSelection; } //! Dumps the content of me into the stream - Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const; + Standard_EXPORT virtual void DumpJson(Standard_OStream& theOStream, + Standard_Integer theDepth = -1) const; protected: //! @name internal methods + Standard_EXPORT void GetDefModes(const Handle(AIS_InteractiveObject)& anIobj, + Standard_Integer& Dmode, + Standard_Integer& HiMod, + Standard_Integer& SelMode) const; + + Standard_EXPORT void EraseGlobal(const Handle(AIS_InteractiveObject)& theIObj, + const Standard_Boolean theToUpdateViewer); + + Standard_EXPORT void ClearGlobal(const Handle(AIS_InteractiveObject)& theIObj, + const Standard_Boolean theToUpdateViewer); + + Standard_EXPORT void ClearGlobalPrs(const Handle(AIS_InteractiveObject)& theObj, + const Standard_Integer theMode, + const Standard_Boolean theToUpdateViewer); - Standard_EXPORT void GetDefModes (const Handle(AIS_InteractiveObject)& anIobj, Standard_Integer& Dmode, Standard_Integer& HiMod, Standard_Integer& SelMode) const; - - Standard_EXPORT void EraseGlobal (const Handle(AIS_InteractiveObject)& theIObj, - const Standard_Boolean theToUpdateViewer); - - Standard_EXPORT void ClearGlobal (const Handle(AIS_InteractiveObject)& theIObj, - const Standard_Boolean theToUpdateViewer); - - Standard_EXPORT void ClearGlobalPrs (const Handle(AIS_InteractiveObject)& theObj, - const Standard_Integer theMode, - const Standard_Boolean theToUpdateViewer); - Standard_EXPORT void InitAttributes(); //! Highlights detected objects. //! If theToRedrawOnUpdate is set to false, callee should call RedrawImmediate() to update view. - Standard_EXPORT AIS_StatusOfDetection moveTo (const Handle(V3d_View)& theView, - const Standard_Boolean theToRedrawOnUpdate); + Standard_EXPORT AIS_StatusOfDetection moveTo(const Handle(V3d_View)& theView, + const Standard_Boolean theToRedrawOnUpdate); //! Returns True if the object is detected. - Standard_EXPORT Standard_Boolean isDetected (const Handle(AIS_InteractiveObject)& theObject); + Standard_EXPORT Standard_Boolean isDetected(const Handle(AIS_InteractiveObject)& theObject); //! Helper function to unhighlight all entity owners currently highlighted with seleciton color. - Standard_EXPORT void unselectOwners (const Handle(AIS_InteractiveObject)& theObject); + Standard_EXPORT void unselectOwners(const Handle(AIS_InteractiveObject)& theObject); //! Helper function that highlights the owner given with without //! performing AutoHighlight checks, e.g. is used for dynamic highlight. - Standard_EXPORT void highlightWithColor (const Handle(SelectMgr_EntityOwner)& theOwner, - const Handle(V3d_Viewer)& theViewer = NULL); + Standard_EXPORT void highlightWithColor(const Handle(SelectMgr_EntityOwner)& theOwner, + const Handle(V3d_Viewer)& theViewer = NULL); //! Helper function that highlights the owner given with with check //! for AutoHighlight, e.g. is used for selection. - Standard_EXPORT void highlightSelected (const Handle(SelectMgr_EntityOwner)& theOwner); + Standard_EXPORT void highlightSelected(const Handle(SelectMgr_EntityOwner)& theOwner); - //! Helper function that highlights the owners with check for AutoHighlight, e.g. is used for selection. - //! @param theOwners [in] list of owners to highlight - //! @param theStyle [in] highlight style to apply or NULL to apply selection style - Standard_EXPORT void highlightOwners (const AIS_NListOfEntityOwner& theOwners, - const Handle(Prs3d_Drawer)& theStyle); + //! Helper function that highlights the owners with check for AutoHighlight, e.g. is used for + //! selection. + //! @param[in] theOwners list of owners to highlight + //! @param[in] theStyle highlight style to apply or NULL to apply selection style + Standard_EXPORT void highlightOwners(const AIS_NListOfEntityOwner& theOwners, + const Handle(Prs3d_Drawer)& theStyle); //! Helper function that highlights global owner of the object given with with check //! for AutoHighlight, e.g. is used for selection. //! If global owner is null, it simply highlights the whole object - Standard_EXPORT void highlightGlobal (const Handle(AIS_InteractiveObject)& theObj, - const Handle(Prs3d_Drawer)& theStyle, - const Standard_Integer theDispMode); + Standard_EXPORT void highlightGlobal(const Handle(AIS_InteractiveObject)& theObj, + const Handle(Prs3d_Drawer)& theStyle, + const Standard_Integer theDispMode); //! Helper function that unhighlights all owners that are stored in current AIS_Selection. //! The function updates global status and selection state of owner and interactive object. - //! If the parameter is set to true, interactive objects with sub-intensity - //! switched on in AIS_GlobalStatus will be highlighted with context's sub-intensity color. - Standard_EXPORT void unhighlightSelected (const Standard_Boolean theIsToHilightSubIntensity = Standard_False); + //! If the parameter is set to true, interactive objects with + //! sub-intensity switched on in AIS_GlobalStatus will be highlighted with context's sub-intensity + //! color. + Standard_EXPORT void unhighlightSelected( + const Standard_Boolean theIsToHilightSubIntensity = Standard_False); //! Helper function that unhighlights the owners with check //! for AutoHighlight, e.g. is used for selection. - Standard_EXPORT void unhighlightOwners (const AIS_NListOfEntityOwner& theOwners, - const Standard_Boolean theIsToHilightSubIntensity = Standard_False); + Standard_EXPORT void unhighlightOwners( + const AIS_NListOfEntityOwner& theOwners, + const Standard_Boolean theIsToHilightSubIntensity = Standard_False); //! Helper function that unhighlights global selection owner of given interactive. //! The function does not perform any updates of global or owner status - Standard_EXPORT void unhighlightGlobal (const Handle(AIS_InteractiveObject)& theObj); + Standard_EXPORT void unhighlightGlobal(const Handle(AIS_InteractiveObject)& theObj); //! Helper function that turns on sub-intensity in global status and highlights //! given objects with sub-intensity color - //! @param theObject [in] the object. If NULL is given, than sub-intensity will be turned on for + //! @param[in] theObject the object. If NULL is given, than sub-intensity will be turned on for //! all inveractive objects of the context - //! @param theDispMode [in] display mode. If -1 is given, sub-intensity will be turned on for + //! @param[in] theDispMode display mode. If -1 is given, sub-intensity will be turned on for //! all display modes in global status's list of modes - //! @param theIsDisplayedOnly [in] is true if sub-intensity should be applied only to objects with + //! @param[in] theIsDisplayedOnly is true if sub-intensity should be applied only to objects with //! status AIS_DS_Displayed - Standard_EXPORT void turnOnSubintensity (const Handle(AIS_InteractiveObject)& theObject = NULL, - const Standard_Integer theDispMode = -1, - const Standard_Boolean theIsDisplayedOnly = Standard_True) const; + Standard_EXPORT void turnOnSubintensity( + const Handle(AIS_InteractiveObject)& theObject = NULL, + const Standard_Integer theDispMode = -1, + const Standard_Boolean theIsDisplayedOnly = Standard_True) const; //! Helper function that highlights the object with sub-intensity color without any checks - //! @param theObject [in] the object that will be highlighted - //! @param theMode [in] display mode - Standard_EXPORT void highlightWithSubintensity (const Handle(AIS_InteractiveObject)& theObject, - const Standard_Integer theMode) const; + //! @param[in] theObject the object that will be highlighted + //! @param[in] theMode display mode + Standard_EXPORT void highlightWithSubintensity(const Handle(AIS_InteractiveObject)& theObject, + const Standard_Integer theMode) const; //! Helper function that highlights the owner with sub-intensity color without any checks - //! @param theOwner [in] the owner that will be highlighted - //! @param theMode [in] display mode - Standard_EXPORT void highlightWithSubintensity (const Handle(SelectMgr_EntityOwner)& theOwner, - const Standard_Integer theMode) const; + //! @param[in] theOwner the owner that will be highlighted + //! @param[in] theMode display mode + Standard_EXPORT void highlightWithSubintensity(const Handle(SelectMgr_EntityOwner)& theOwner, + const Standard_Integer theMode) const; //! Helper function that returns correct dynamic highlight style for the object: //! if custom style is defined via object's highlight drawer, it will be used. Otherwise, //! dynamic highlight style of interactive context will be returned. - //! @param theObj [in] the object to check - const Handle(Prs3d_Drawer)& getHiStyle (const Handle(AIS_InteractiveObject)& theObj, - const Handle(SelectMgr_EntityOwner)& theOwner) const + //! @param[in] theObj the object to check + const Handle(Prs3d_Drawer)& getHiStyle(const Handle(AIS_InteractiveObject)& theObj, + const Handle(SelectMgr_EntityOwner)& theOwner) const { const Handle(Prs3d_Drawer)& aHiDrawer = theObj->DynamicHilightAttributes(); if (!aHiDrawer.IsNull()) @@ -1382,19 +1591,21 @@ protected: //! @name internal methods return aHiDrawer; } - return myStyles[!theOwner.IsNull() && theOwner->ComesFromDecomposition() ? Prs3d_TypeOfHighlight_LocalDynamic : Prs3d_TypeOfHighlight_Dynamic]; + return myStyles[!theOwner.IsNull() && theOwner->ComesFromDecomposition() + ? Prs3d_TypeOfHighlight_LocalDynamic + : Prs3d_TypeOfHighlight_Dynamic]; } //! Return TRUE if highlight style of owner requires full viewer redraw. - Standard_EXPORT Standard_Boolean isSlowHiStyle (const Handle(SelectMgr_EntityOwner)& theOwner, - const Handle(V3d_Viewer)& theViewer) const; + Standard_EXPORT Standard_Boolean isSlowHiStyle(const Handle(SelectMgr_EntityOwner)& theOwner, + const Handle(V3d_Viewer)& theViewer) const; //! Helper function that returns correct selection style for the object: //! if custom style is defined via object's highlight drawer, it will be used. Otherwise, //! selection style of interactive context will be returned. - //! @param theObj [in] the object to check - const Handle(Prs3d_Drawer)& getSelStyle (const Handle(AIS_InteractiveObject)& theObj, - const Handle(SelectMgr_EntityOwner)& theOwner) const + //! @param[in] theObj the object to check + const Handle(Prs3d_Drawer)& getSelStyle(const Handle(AIS_InteractiveObject)& theObj, + const Handle(SelectMgr_EntityOwner)& theOwner) const { const Handle(Prs3d_Drawer)& aHiDrawer = theObj->HilightAttributes(); if (!aHiDrawer.IsNull()) @@ -1402,20 +1613,22 @@ protected: //! @name internal methods return aHiDrawer; } - return myStyles[!theOwner.IsNull() && theOwner->ComesFromDecomposition() ? Prs3d_TypeOfHighlight_LocalSelected : Prs3d_TypeOfHighlight_Selected]; + return myStyles[!theOwner.IsNull() && theOwner->ComesFromDecomposition() + ? Prs3d_TypeOfHighlight_LocalSelected + : Prs3d_TypeOfHighlight_Selected]; } - //! Assign the context to the object or throw exception if object was already assigned to another context. - Standard_EXPORT void setContextToObject (const Handle(AIS_InteractiveObject)& theObj); + //! Assign the context to the object or throw exception if object was already assigned to another + //! context. + Standard_EXPORT void setContextToObject(const Handle(AIS_InteractiveObject)& theObj); //! Return display mode for highlighting. - Standard_Integer getHilightMode (const Handle(AIS_InteractiveObject)& theObj, - const Handle(Prs3d_Drawer)& theStyle, - const Standard_Integer theDispMode) const + Standard_Integer getHilightMode(const Handle(AIS_InteractiveObject)& theObj, + const Handle(Prs3d_Drawer)& theStyle, + const Standard_Integer theDispMode) const { - if (!theStyle.IsNull() - && theStyle->DisplayMode() != -1 - && theObj->AcceptDisplayMode (theStyle->DisplayMode())) + if (!theStyle.IsNull() && theStyle->DisplayMode() != -1 + && theObj->AcceptDisplayMode(theStyle->DisplayMode())) { return theStyle->DisplayMode(); } @@ -1436,38 +1649,36 @@ protected: //! @name internal methods if (myLastPicked.IsNull()) return; - myLastPicked->Selectable()->ClearDynamicHighlight (myMainPM); + myLastPicked->Selectable()->ClearDynamicHighlight(myMainPM); } //! Bind/Unbind status to object and its children //! @param[in] theIObj the object to change status //! @param[in] theStatus status, if NULL, unbind object - Standard_EXPORT void setObjectStatus (const Handle(AIS_InteractiveObject)& theIObj, - const PrsMgr_DisplayStatus theStatus, - const Standard_Integer theDispyMode, - const Standard_Integer theSelectionMode); + Standard_EXPORT void setObjectStatus(const Handle(AIS_InteractiveObject)& theIObj, + const PrsMgr_DisplayStatus theStatus, + const Standard_Integer theDispyMode, + const Standard_Integer theSelectionMode); protected: //! @name internal fields - - AIS_DataMapOfIOStatus myObjects; + AIS_DataMapOfIOStatus myObjects; Handle(SelectMgr_SelectionManager) mgrSelector; Handle(PrsMgr_PresentationManager) myMainPM; - Handle(V3d_Viewer) myMainVwr; - V3d_View* myLastActiveView; - Handle(SelectMgr_EntityOwner) myLastPicked; - Standard_Boolean myToHilightSelected; - Handle(AIS_Selection) mySelection; - Handle(SelectMgr_AndOrFilter) myFilters; //!< context filter (the content active filters - //! can be applied with AND or OR operation) - Handle(Prs3d_Drawer) myDefaultDrawer; - Handle(Prs3d_Drawer) myStyles[Prs3d_TypeOfHighlight_NB]; + Handle(V3d_Viewer) myMainVwr; + V3d_View* myLastActiveView; + Handle(SelectMgr_EntityOwner) myLastPicked; + Standard_Boolean myToHilightSelected; + Handle(AIS_Selection) mySelection; + Handle(SelectMgr_AndOrFilter) myFilters; //!< context filter (the content active filters + //! can be applied with AND or OR operation) + Handle(Prs3d_Drawer) myDefaultDrawer; + Handle(Prs3d_Drawer) myStyles[Prs3d_TypeOfHighlight_NB]; TColStd_SequenceOfInteger myDetectedSeq; - Standard_Integer myCurDetected; - Standard_Integer myCurHighlighted; + Standard_Integer myCurDetected; + Standard_Integer myCurHighlighted; SelectMgr_PickingStrategy myPickingStrategy; //!< picking strategy to be applied within MoveTo() - Standard_Boolean myAutoHilight; - Standard_Boolean myIsAutoActivateSelMode; - + Standard_Boolean myAutoHilight; + Standard_Boolean myIsAutoActivateSelMode; }; DEFINE_STANDARD_HANDLE(AIS_InteractiveContext, Standard_Transient) diff --git a/opencascade/AIS_InteractiveObject.hxx b/opencascade/AIS_InteractiveObject.hxx index 93534fb88..f5404e1ff 100644 --- a/opencascade/AIS_InteractiveObject.hxx +++ b/opencascade/AIS_InteractiveObject.hxx @@ -27,24 +27,26 @@ class V3d_View; //! Defines a class of objects with display and selection services. //! Entities which are visualized and selected are Interactive Objects. -//! Specific attributes of entities such as arrow aspect for dimensions must be loaded in a Prs3d_Drawer. +//! Specific attributes of entities such as arrow aspect for dimensions must be loaded in a +//! Prs3d_Drawer. //! -//! You can make use of classes of standard Interactive Objects for which all necessary methods have already been programmed, -//! or you can implement your own classes of Interactive Objects. -//! Key interface methods to be implemented by every Interactive Object: +//! You can make use of classes of standard Interactive Objects for which all necessary methods have +//! already been programmed, or you can implement your own classes of Interactive Objects. Key +//! interface methods to be implemented by every Interactive Object: //! * Presentable Object (PrsMgr_PresentableObject) -//! Consider defining an enumeration of supported Display Mode indexes for particular Interactive Object or class of Interactive Objects. +//! Consider defining an enumeration of supported Display Mode indexes for particular Interactive +//! Object or class of Interactive Objects. //! - AcceptDisplayMode() accepting display modes implemented by this object; //! - Compute() computing presentation for the given display mode index; //! * Selectable Object (SelectMgr_SelectableObject) -//! Consider defining an enumeration of supported Selection Mode indexes for particular Interactive Object or class of Interactive Objects. +//! Consider defining an enumeration of supported Selection Mode indexes for particular +//! Interactive Object or class of Interactive Objects. //! - ComputeSelection() computing selectable entities for the given selection mode index. class AIS_InteractiveObject : public SelectMgr_SelectableObject { friend class AIS_InteractiveContext; DEFINE_STANDARD_RTTIEXT(AIS_InteractiveObject, SelectMgr_SelectableObject) public: - //! Returns the kind of Interactive Object; AIS_KindOfInteractive_None by default. virtual AIS_KindOfInteractive Type() const { return AIS_KindOfInteractive_None; } @@ -59,29 +61,30 @@ public: //! - Circle signature 6 //! - Plane signature 7. virtual Standard_Integer Signature() const { return -1; } - + //! Updates the active presentation; if = Standard_True //! all the presentations inside are recomputed. //! IMPORTANT: It is preferable to call Redisplay method of //! corresponding AIS_InteractiveContext instance for cases when it //! is accessible. This method just redirects call to myCTXPtr, //! so this class field must be up to date for proper result. - Standard_EXPORT void Redisplay (const Standard_Boolean AllModes = Standard_False); + Standard_EXPORT void Redisplay(const Standard_Boolean AllModes = Standard_False); //! Indicates whether the Interactive Object has a pointer to an interactive context. Standard_Boolean HasInteractiveContext() const { return myCTXPtr != NULL; } //! Returns the context pointer to the interactive context. AIS_InteractiveContext* InteractiveContext() const { return myCTXPtr; } - + //! Sets the interactive context aCtx and provides a link //! to the default drawing tool or "Drawer" if there is none. - Standard_EXPORT virtual void SetContext (const Handle(AIS_InteractiveContext)& aCtx); - + Standard_EXPORT virtual void SetContext(const Handle(AIS_InteractiveContext)& aCtx); + //! Returns true if the object has an owner attributed to it. - //! The owner can be a shape for a set of sub-shapes or a sub-shape for sub-shapes which it is composed of, and takes the form of a transient. + //! The owner can be a shape for a set of sub-shapes or a sub-shape for sub-shapes which it is + //! composed of, and takes the form of a transient. Standard_Boolean HasOwner() const { return !myOwner.IsNull(); } - + //! Returns the owner of the Interactive Object. //! The owner can be a shape for a set of sub-shapes or //! a sub-shape for sub-shapes which it is composed of, @@ -97,29 +100,32 @@ public: //! an Interactive Object. This can be a shape for a set of //! sub-shapes or a sub-shape for sub-shapes which it //! is composed of. The owner takes the form of a transient. - void SetOwner (const Handle(Standard_Transient)& theApplicativeEntity) { myOwner = theApplicativeEntity; } + void SetOwner(const Handle(Standard_Transient)& theApplicativeEntity) + { + myOwner = theApplicativeEntity; + } - //! Each Interactive Object has methods which allow us to attribute an Owner to it in the form of a Transient. - //! This method removes the owner from the graphic entity. + //! Each Interactive Object has methods which allow us to attribute an Owner to it in the form of + //! a Transient. This method removes the owner from the graphic entity. void ClearOwner() { myOwner.Nullify(); } //! Drag object in the viewer. - //! @param theCtx [in] interactive context - //! @param theView [in] active View - //! @param theOwner [in] the owner of detected entity - //! @param theDragFrom [in] drag start point - //! @param theDragTo [in] drag end point - //! @param theAction [in] drag action + //! @param[in] theCtx interactive context + //! @param[in] theView active View + //! @param[in] theOwner the owner of detected entity + //! @param[in] theDragFrom drag start point + //! @param[in] theDragTo drag end point + //! @param[in] theAction drag action //! @return FALSE if object rejects dragging action (e.g. AIS_DragAction_Start) - Standard_EXPORT virtual Standard_Boolean ProcessDragging (const Handle(AIS_InteractiveContext)& theCtx, - const Handle(V3d_View)& theView, - const Handle(SelectMgr_EntityOwner)& theOwner, - const Graphic3d_Vec2i& theDragFrom, - const Graphic3d_Vec2i& theDragTo, - const AIS_DragAction theAction); + Standard_EXPORT virtual Standard_Boolean ProcessDragging( + const Handle(AIS_InteractiveContext)& theCtx, + const Handle(V3d_View)& theView, + const Handle(SelectMgr_EntityOwner)& theOwner, + const Graphic3d_Vec2i& theDragFrom, + const Graphic3d_Vec2i& theDragTo, + const AIS_DragAction theAction); public: - //! Returns the context pointer to the interactive context. Standard_EXPORT Handle(AIS_InteractiveContext) GetContext() const; @@ -131,24 +137,26 @@ public: //! Sets the graphic basic aspect to the current presentation. Standard_DEPRECATED("Deprecated method, results might be undefined") - Standard_EXPORT void SetAspect (const Handle(Prs3d_BasicAspect)& anAspect); + Standard_EXPORT void SetAspect(const Handle(Prs3d_BasicAspect)& anAspect); //! Dumps the content of me into the stream - Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE; -protected: + Standard_EXPORT virtual void DumpJson(Standard_OStream& theOStream, + Standard_Integer theDepth = -1) const Standard_OVERRIDE; +protected: //! The TypeOfPresention3d means that the interactive object //! may have a presentation dependent on the view of Display. - Standard_EXPORT AIS_InteractiveObject(const PrsMgr_TypeOfPresentation3d aTypeOfPresentation3d = PrsMgr_TOP_AllView); + Standard_EXPORT AIS_InteractiveObject( + const PrsMgr_TypeOfPresentation3d aTypeOfPresentation3d = PrsMgr_TOP_AllView); //! Set presentation display status. - Standard_EXPORT void SetDisplayStatus (PrsMgr_DisplayStatus theStatus); + Standard_EXPORT void SetDisplayStatus(PrsMgr_DisplayStatus theStatus); protected: - + // clang-format off AIS_InteractiveContext* myCTXPtr; //!< pointer to Interactive Context, where object is currently displayed; @sa SetContext() - Handle(Standard_Transient) myOwner; //!< application-specific owner object - + // clang-format on + Handle(Standard_Transient) myOwner; //!< application-specific owner object }; DEFINE_STANDARD_HANDLE(AIS_InteractiveObject, SelectMgr_SelectableObject) diff --git a/opencascade/AIS_KindOfInteractive.hxx b/opencascade/AIS_KindOfInteractive.hxx index b2e772690..3c794e5ee 100644 --- a/opencascade/AIS_KindOfInteractive.hxx +++ b/opencascade/AIS_KindOfInteractive.hxx @@ -27,15 +27,16 @@ enum AIS_KindOfInteractive AIS_KindOfInteractive_Shape, //!< presentation of topological shape AIS_KindOfInteractive_Object, //!< presentation of group of topological shapes AIS_KindOfInteractive_Relation, //!< presentation of relation (dimensions and constraints) - AIS_KindOfInteractive_Dimension, //!< presentation of dimension (length, radius, diameter and angle) + AIS_KindOfInteractive_Dimension, //!< presentation of dimension (length, radius, diameter and + //!< angle) AIS_KindOfInteractive_LightSource, //!< presentation of light source // old aliases - AIS_KOI_None = AIS_KindOfInteractive_None, - AIS_KOI_Datum = AIS_KindOfInteractive_Datum, - AIS_KOI_Shape = AIS_KindOfInteractive_Shape, - AIS_KOI_Object = AIS_KindOfInteractive_Object, - AIS_KOI_Relation = AIS_KindOfInteractive_Relation, + AIS_KOI_None = AIS_KindOfInteractive_None, + AIS_KOI_Datum = AIS_KindOfInteractive_Datum, + AIS_KOI_Shape = AIS_KindOfInteractive_Shape, + AIS_KOI_Object = AIS_KindOfInteractive_Object, + AIS_KOI_Relation = AIS_KindOfInteractive_Relation, AIS_KOI_Dimension = AIS_KindOfInteractive_Dimension }; diff --git a/opencascade/AIS_LightSource.hxx b/opencascade/AIS_LightSource.hxx index feb5570ab..e7e1e7301 100644 --- a/opencascade/AIS_LightSource.hxx +++ b/opencascade/AIS_LightSource.hxx @@ -29,28 +29,27 @@ class Select3D_SensitiveSphere; //! - Positional light is represented by a sphere or marker; //! - Spot light is represented by a cone; //! - Directional light is represented by a set of arrows at the corner of view. -//! In addition, light source name could be displayed, and clicking on presentation will enable/disable light. +//! In addition, light source name could be displayed, and clicking on presentation will +//! enable/disable light. class AIS_LightSource : public AIS_InteractiveObject { friend class AIS_LightSourceOwner; DEFINE_STANDARD_RTTIEXT(AIS_LightSource, AIS_InteractiveObject) public: - //! Initializes the light source by copying Graphic3d_CLight settings. - Standard_EXPORT AIS_LightSource (const Handle(Graphic3d_CLight)& theLightSource); + Standard_EXPORT AIS_LightSource(const Handle(Graphic3d_CLight)& theLightSource); //! Returns the light. const Handle(Graphic3d_CLight)& Light() const { return myLightSource; } //! Set the light. - void SetLight (const Handle(Graphic3d_CLight)& theLight) + void SetLight(const Handle(Graphic3d_CLight)& theLight) { myLightSource = theLight; SetToUpdate(); } public: //! @name Light properties - //! Returns TRUE if the light source name should be displayed; TRUE by default. Standard_Boolean ToDisplayName() const { return myToDisplayName; } @@ -64,12 +63,12 @@ public: //! @name Light properties } } - //! Returns TRUE to display light source range as sphere (positional light) or cone (spot light); TRUE by default. - //! Has no effect for non-zoomable presentation. + //! Returns TRUE to display light source range as sphere (positional light) or cone (spot light); + //! TRUE by default. Has no effect for non-zoomable presentation. Standard_Boolean ToDisplayRange() const { return myToDisplayRange; } //! Show/hide light source range shaded presentation. - void SetDisplayRange (Standard_Boolean theToDisplay) + void SetDisplayRange(Standard_Boolean theToDisplay) { if (myToDisplayRange != theToDisplay) { @@ -82,7 +81,7 @@ public: //! @name Light properties Standard_Real Size() const { return mySize; } //! Sets the size of presentation. - void SetSize (Standard_Real theSize) + void SetSize(Standard_Real theSize) { if (mySize != theSize) { @@ -95,7 +94,7 @@ public: //! @name Light properties Standard_Integer ArcSize() const { return mySensSphereArcSize; } //! Sets the size of sensitive sphere arc. - void SetArcSize (Standard_Integer theSize) + void SetArcSize(Standard_Integer theSize) { if (mySensSphereArcSize != theSize) { @@ -110,7 +109,7 @@ public: //! @name Light properties bool IsZoomable() const { return myIsZoomable; } //! Sets if transform-persistence is allowed. - void SetZoomable (bool theIsZoomable) + void SetZoomable(bool theIsZoomable) { if (myIsZoomable != theIsZoomable) { @@ -120,7 +119,7 @@ public: //! @name Light properties } //! Sets if dragging is allowed. - void SetDraggable (bool theIsDraggable) + void SetDraggable(bool theIsDraggable) { if (myIsDraggable != theIsDraggable) { @@ -132,13 +131,13 @@ public: //! @name Light properties bool ToSwitchOnClick() const { return myToSwitchOnClick; } //! Sets if mouse click should turn light on/off. - void SetSwitchOnClick (bool theToHandle) { myToSwitchOnClick = theToHandle; } + void SetSwitchOnClick(bool theToHandle) { myToSwitchOnClick = theToHandle; } //! Returns a number of directional light arrows to display; 5 by default. Standard_Integer NbArrows() const { return myNbArrows; } //! Returns a number of directional light arrows to display (supported values: 1, 3, 5, 9). - void SetNbArrows (Standard_Integer theNbArrows) + void SetNbArrows(Standard_Integer theNbArrows) { if (myNbArrows != theNbArrows) { @@ -148,26 +147,30 @@ public: //! @name Light properties } //! Returns light source icon. - //! @param theIsEnabled [in] marker index for enabled/disabled light source states - const Handle(Graphic3d_MarkerImage)& MarkerImage (bool theIsEnabled) const { return myMarkerImages[theIsEnabled ? 1 : 0]; } + //! @param[in] theIsEnabled marker index for enabled/disabled light source states + const Handle(Graphic3d_MarkerImage)& MarkerImage(bool theIsEnabled) const + { + return myMarkerImages[theIsEnabled ? 1 : 0]; + } //! Returns light source icon. - //! @param theIsEnabled [in] marker index for enabled/disabled light source states - Aspect_TypeOfMarker MarkerType (bool theIsEnabled) const { return myMarkerTypes[theIsEnabled ? 1 : 0]; } + //! @param[in] theIsEnabled marker index for enabled/disabled light source states + Aspect_TypeOfMarker MarkerType(bool theIsEnabled) const + { + return myMarkerTypes[theIsEnabled ? 1 : 0]; + } //! Sets custom icon to light source. - void SetMarkerImage (const Handle(Graphic3d_MarkerImage)& theImage, - bool theIsEnabled) + void SetMarkerImage(const Handle(Graphic3d_MarkerImage)& theImage, bool theIsEnabled) { myMarkerImages[theIsEnabled ? 1 : 0] = theImage; - myMarkerTypes [theIsEnabled ? 1 : 0] = !theImage.IsNull() - ? Aspect_TOM_USERDEFINED - : (theIsEnabled ? Aspect_TOM_O_POINT : Aspect_TOM_O_X); + myMarkerTypes[theIsEnabled ? 1 : 0] = !theImage.IsNull() + ? Aspect_TOM_USERDEFINED + : (theIsEnabled ? Aspect_TOM_O_POINT : Aspect_TOM_O_X); } //! Sets standard icon to light source. - void SetMarkerType (Aspect_TypeOfMarker theType, - bool theIsEnabled) + void SetMarkerType(Aspect_TypeOfMarker theType, bool theIsEnabled) { myMarkerTypes[theIsEnabled ? 1 : 0] = theType; } @@ -176,34 +179,36 @@ public: //! @name Light properties Standard_Integer NbSplitsQuadric() const { return myNbSplitsQuadric; } //! Sets tessellation level for quadric surfaces. - void SetNbSplitsQuadric (Standard_Integer theNbSplits) { myNbSplitsQuadric = theNbSplits; } + void SetNbSplitsQuadric(Standard_Integer theNbSplits) { myNbSplitsQuadric = theNbSplits; } //! Returns tessellation level for arrows; 20 by default. Standard_Integer NbSplitsArrow() const { return myNbSplitsArrow; } //! Sets tessellation level for arrows. - void SetNbSplitsArrow (Standard_Integer theNbSplits) { myNbSplitsArrow = theNbSplits; } + void SetNbSplitsArrow(Standard_Integer theNbSplits) { myNbSplitsArrow = theNbSplits; } //! Returns kind of the object. - virtual AIS_KindOfInteractive Type() const Standard_OVERRIDE { return AIS_KindOfInteractive_LightSource; } + virtual AIS_KindOfInteractive Type() const Standard_OVERRIDE + { + return AIS_KindOfInteractive_LightSource; + } protected: - - //! Return true if specified display mode is supported: 0 for main presentation and 1 for highlight. - virtual Standard_Boolean AcceptDisplayMode (const Standard_Integer theMode) const Standard_OVERRIDE + //! Return true if specified display mode is supported: 0 for main presentation and 1 for + //! highlight. + virtual Standard_Boolean AcceptDisplayMode(const Standard_Integer theMode) const Standard_OVERRIDE { - return theMode == 0 - || theMode == 1; + return theMode == 0 || theMode == 1; } //! Computes selection sensitive zones(triangulation) for light source presentation. - Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr, - const Handle(Prs3d_Presentation)& thePrs, - const Standard_Integer theMode) Standard_OVERRIDE; + Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager)& thePrsMgr, + const Handle(Prs3d_Presentation)& thePrs, + const Standard_Integer theMode) Standard_OVERRIDE; //! Fills presentation. - Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSel, - const Standard_Integer theMode) Standard_OVERRIDE; + Standard_EXPORT virtual void ComputeSelection(const Handle(SelectMgr_Selection)& theSel, + const Standard_Integer theMode) Standard_OVERRIDE; //! Drag object in the viewer. //! @param[in] theCtx interactive context @@ -213,15 +218,17 @@ protected: //! @param[in] theDragTo drag end point //! @param[in] theAction drag action //! @return FALSE if object rejects dragging action (e.g. AIS_DragAction_Start) - Standard_EXPORT virtual Standard_Boolean ProcessDragging (const Handle(AIS_InteractiveContext)& theCtx, - const Handle(V3d_View)& theView, - const Handle(SelectMgr_EntityOwner)& theOwner, - const Graphic3d_Vec2i& theDragFrom, - const Graphic3d_Vec2i& theDragTo, - const AIS_DragAction theAction) Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean ProcessDragging( + const Handle(AIS_InteractiveContext)& theCtx, + const Handle(V3d_View)& theView, + const Handle(SelectMgr_EntityOwner)& theOwner, + const Graphic3d_Vec2i& theDragFrom, + const Graphic3d_Vec2i& theDragTo, + const AIS_DragAction theAction) Standard_OVERRIDE; //! Sets new local transformation, which is propagated to Graphic3d_CLight instance. - Standard_EXPORT virtual void setLocalTransformation (const Handle(TopLoc_Datum3D)& theTrsf) Standard_OVERRIDE; + Standard_EXPORT virtual void setLocalTransformation(const Handle(TopLoc_Datum3D)& theTrsf) + Standard_OVERRIDE; //! Updates local transformation basing on a type of light source. Standard_EXPORT virtual void updateLightLocalTransformation(); @@ -233,25 +240,26 @@ protected: Standard_EXPORT virtual void updateLightAspects(); //! Compute ambient light source presentation as a sphere at view corner. - Standard_EXPORT virtual void computeAmbient (const Handle(Prs3d_Presentation)& thePrs, - const Standard_Integer theMode); + Standard_EXPORT virtual void computeAmbient(const Handle(Prs3d_Presentation)& thePrs, + const Standard_Integer theMode); //! Compute directional light source presentation as a set of arrows at view corner. - Standard_EXPORT virtual void computeDirectional (const Handle(Prs3d_Presentation)& thePrs, - const Standard_Integer theMode); + Standard_EXPORT virtual void computeDirectional(const Handle(Prs3d_Presentation)& thePrs, + const Standard_Integer theMode); - //! Compute positional light source presentation as a sphere of either fixed size (no range) or of size representing a maximum range. - Standard_EXPORT virtual void computePositional (const Handle(Prs3d_Presentation)& thePrs, - const Standard_Integer theMode); + //! Compute positional light source presentation as a sphere of either fixed size (no range) or of + //! size representing a maximum range. + Standard_EXPORT virtual void computePositional(const Handle(Prs3d_Presentation)& thePrs, + const Standard_Integer theMode); //! Compute spot light source presentation as a cone. - Standard_EXPORT virtual void computeSpot (const Handle(Prs3d_Presentation)& thePrs, - const Standard_Integer theMode); + Standard_EXPORT virtual void computeSpot(const Handle(Prs3d_Presentation)& thePrs, + const Standard_Integer theMode); protected: + Handle(Graphic3d_CLight) myLightSource; //!< displayed light source - Handle(Graphic3d_CLight) myLightSource; //!< displayed light source - + // clang-format off Handle(Graphic3d_AspectMarker3d) myDisabledMarkerAspect; //!< disabled light source marker style Handle(Graphic3d_AspectLine3d) myArrowLineAspectShadow; //!< arrow shadow style Handle(Graphic3d_MarkerImage) myMarkerImages[2]; //!< icon of disabled (0) and enabled (1) light @@ -268,10 +276,10 @@ protected: Standard_Integer mySensSphereArcSize; //! sensitive sphere arc size in pixels Standard_Boolean myIsZoomable; //!< flag to allow/disallow transform-persistence when possible Standard_Boolean myIsDraggable; //!< flag to allow/disallow rotate directional light source by dragging - Standard_Boolean myToDisplayName; //!< flag to show/hide name - Standard_Boolean myToDisplayRange; //!< flag to show/hide range of positional/spot light - Standard_Boolean myToSwitchOnClick; //!< flag to handle mouse click to turn light on/off - + // clang-format on + Standard_Boolean myToDisplayName; //!< flag to show/hide name + Standard_Boolean myToDisplayRange; //!< flag to show/hide range of positional/spot light + Standard_Boolean myToSwitchOnClick; //!< flag to handle mouse click to turn light on/off }; //! Owner of AIS_LightSource presentation. @@ -279,27 +287,27 @@ class AIS_LightSourceOwner : public SelectMgr_EntityOwner { DEFINE_STANDARD_RTTIEXT(AIS_LightSourceOwner, SelectMgr_EntityOwner) public: - //! Main constructor. - Standard_EXPORT AIS_LightSourceOwner (const Handle(AIS_LightSource)& theObject, - Standard_Integer thePriority = 5); + Standard_EXPORT AIS_LightSourceOwner(const Handle(AIS_LightSource)& theObject, + Standard_Integer thePriority = 5); //! Handle mouse button click event. - Standard_EXPORT virtual Standard_Boolean HandleMouseClick (const Graphic3d_Vec2i& thePoint, - Aspect_VKeyMouse theButton, - Aspect_VKeyFlags theModifiers, - bool theIsDoubleClick) Standard_OVERRIDE; - - //! Highlights selectable object's presentation with display mode in presentation manager with given highlight style. - //! Also a check for auto-highlight is performed - if selectable object manages highlighting on its own, - //! execution will be passed to SelectMgr_SelectableObject::HilightOwnerWithColor method. - Standard_EXPORT virtual void HilightWithColor (const Handle(PrsMgr_PresentationManager)& thePrsMgr, - const Handle(Prs3d_Drawer)& theStyle, - const Standard_Integer theMode) Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean HandleMouseClick(const Graphic3d_Vec2i& thePoint, + Aspect_VKeyMouse theButton, + Aspect_VKeyFlags theModifiers, + bool theIsDoubleClick) + Standard_OVERRIDE; + + //! Highlights selectable object's presentation with display mode in presentation manager with + //! given highlight style. Also a check for auto-highlight is performed - if selectable object + //! manages highlighting on its own, execution will be passed to + //! SelectMgr_SelectableObject::HilightOwnerWithColor method. + Standard_EXPORT virtual void HilightWithColor(const Handle(PrsMgr_PresentationManager)& thePrsMgr, + const Handle(Prs3d_Drawer)& theStyle, + const Standard_Integer theMode) Standard_OVERRIDE; //! Always update dynamic highlighting. Standard_EXPORT virtual Standard_Boolean IsForcedHilight() const Standard_OVERRIDE; - }; #endif // _AIS_LightSource_HeaderFile diff --git a/opencascade/AIS_Line.hxx b/opencascade/AIS_Line.hxx index 5706c0ad8..0bf760c39 100644 --- a/opencascade/AIS_Line.hxx +++ b/opencascade/AIS_Line.hxx @@ -29,40 +29,43 @@ class AIS_Line : public AIS_InteractiveObject { DEFINE_STANDARD_RTTIEXT(AIS_Line, AIS_InteractiveObject) public: - //! Initializes the line aLine. Standard_EXPORT AIS_Line(const Handle(Geom_Line)& aLine); //! Initializes a starting point aStartPoint //! and a finishing point aEndPoint for the line. - Standard_EXPORT AIS_Line(const Handle(Geom_Point)& aStartPoint, const Handle(Geom_Point)& aEndPoint); + Standard_EXPORT AIS_Line(const Handle(Geom_Point)& aStartPoint, + const Handle(Geom_Point)& aEndPoint); //! Returns the signature 5. virtual Standard_Integer Signature() const Standard_OVERRIDE { return 5; } //! Returns the type Datum. - virtual AIS_KindOfInteractive Type() const Standard_OVERRIDE { return AIS_KindOfInteractive_Datum; } + virtual AIS_KindOfInteractive Type() const Standard_OVERRIDE + { + return AIS_KindOfInteractive_Datum; + } //! Constructs an infinite line. const Handle(Geom_Line)& Line() const { return myComponent; } //! Returns the starting point thePStart and the end point thePEnd of the line set by SetPoints. - void Points (Handle(Geom_Point)& thePStart, Handle(Geom_Point)& thePEnd) const + void Points(Handle(Geom_Point)& thePStart, Handle(Geom_Point)& thePEnd) const { thePStart = myStartPoint; thePEnd = myEndPoint; } //! instantiates an infinite line. - void SetLine (const Handle(Geom_Line)& theLine) + void SetLine(const Handle(Geom_Line)& theLine) { - myComponent = theLine; + myComponent = theLine; myLineIsSegment = Standard_False; } //! Sets the starting point thePStart and ending point thePEnd of the //! infinite line to create a finite line segment. - void SetPoints (const Handle(Geom_Point)& thePStart, const Handle(Geom_Point)& thePEnd) + void SetPoints(const Handle(Geom_Point)& thePStart, const Handle(Geom_Point)& thePEnd) { myStartPoint = thePStart; myEndPoint = thePEnd; @@ -70,11 +73,11 @@ public: } //! Provides a new color setting aColor for the line in the drawing tool, or "Drawer". - Standard_EXPORT void SetColor (const Quantity_Color& aColor) Standard_OVERRIDE; + Standard_EXPORT void SetColor(const Quantity_Color& aColor) Standard_OVERRIDE; //! Provides the new width setting aValue for the line in //! the drawing tool, or "Drawer". - Standard_EXPORT void SetWidth (const Standard_Real aValue) Standard_OVERRIDE; + Standard_EXPORT void SetWidth(const Standard_Real aValue) Standard_OVERRIDE; //! Removes the color setting and returns the original color. Standard_EXPORT void UnsetColor() Standard_OVERRIDE; @@ -83,31 +86,28 @@ public: Standard_EXPORT void UnsetWidth() Standard_OVERRIDE; private: + Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager)& thePrsMgr, + const Handle(Prs3d_Presentation)& thePrs, + const Standard_Integer theMode) Standard_OVERRIDE; - Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr, - const Handle(Prs3d_Presentation)& thePrs, - const Standard_Integer theMode) Standard_OVERRIDE; + Standard_EXPORT virtual void ComputeSelection(const Handle(SelectMgr_Selection)& theSel, + const Standard_Integer theMode) Standard_OVERRIDE; - Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSel, - const Standard_Integer theMode) Standard_OVERRIDE; + Standard_EXPORT void ComputeInfiniteLine(const Handle(Prs3d_Presentation)& aPresentation); - Standard_EXPORT void ComputeInfiniteLine (const Handle(Prs3d_Presentation)& aPresentation); + Standard_EXPORT void ComputeSegmentLine(const Handle(Prs3d_Presentation)& aPresentation); - Standard_EXPORT void ComputeSegmentLine (const Handle(Prs3d_Presentation)& aPresentation); + Standard_EXPORT void ComputeInfiniteLineSelection(const Handle(SelectMgr_Selection)& aSelection); - Standard_EXPORT void ComputeInfiniteLineSelection (const Handle(SelectMgr_Selection)& aSelection); - - Standard_EXPORT void ComputeSegmentLineSelection (const Handle(SelectMgr_Selection)& aSelection); + Standard_EXPORT void ComputeSegmentLineSelection(const Handle(SelectMgr_Selection)& aSelection); //! Replace aspects of already computed groups with the new value. - void replaceWithNewLineAspect (const Handle(Prs3d_LineAspect)& theAspect); + void replaceWithNewLineAspect(const Handle(Prs3d_LineAspect)& theAspect); private: - - Handle(Geom_Line) myComponent; + Handle(Geom_Line) myComponent; Handle(Geom_Point) myStartPoint; Handle(Geom_Point) myEndPoint; - Standard_Boolean myLineIsSegment; - + Standard_Boolean myLineIsSegment; }; DEFINE_STANDARD_HANDLE(AIS_Line, AIS_InteractiveObject) diff --git a/opencascade/AIS_ListIteratorOfListOfInteractive.hxx b/opencascade/AIS_ListIteratorOfListOfInteractive.hxx index f5e5984b2..c871b9b4a 100644 --- a/opencascade/AIS_ListIteratorOfListOfInteractive.hxx +++ b/opencascade/AIS_ListIteratorOfListOfInteractive.hxx @@ -11,7 +11,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. - #ifndef AIS_ListIteratorOfListOfInteractive_HeaderFile #define AIS_ListIteratorOfListOfInteractive_HeaderFile diff --git a/opencascade/AIS_ListOfInteractive.hxx b/opencascade/AIS_ListOfInteractive.hxx index bd8940a7e..e110f2fd8 100644 --- a/opencascade/AIS_ListOfInteractive.hxx +++ b/opencascade/AIS_ListOfInteractive.hxx @@ -21,7 +21,7 @@ #include typedef NCollection_List AIS_ListOfInteractive; -typedef NCollection_List::Iterator AIS_ListIteratorOfListOfInteractive; - +typedef NCollection_List::Iterator + AIS_ListIteratorOfListOfInteractive; #endif diff --git a/opencascade/AIS_Manipulator.hxx b/opencascade/AIS_Manipulator.hxx index 84c82ad2a..925d67b07 100644 --- a/opencascade/AIS_Manipulator.hxx +++ b/opencascade/AIS_Manipulator.hxx @@ -30,7 +30,7 @@ NCOLLECTION_HSEQUENCE(AIS_ManipulatorObjectSequence, Handle(AIS_InteractiveObject)) -DEFINE_STANDARD_HANDLE (AIS_Manipulator, AIS_InteractiveObject) +DEFINE_STANDARD_HANDLE(AIS_Manipulator, AIS_InteractiveObject) //! Interactive object class to manipulate local transformation of another interactive //! object or a group of objects via mouse. @@ -93,34 +93,60 @@ DEFINE_STANDARD_HANDLE (AIS_Manipulator, AIS_InteractiveObject) class AIS_Manipulator : public AIS_InteractiveObject { public: - //! Constructs a manipulator object with default placement and all parts to be displayed. Standard_EXPORT AIS_Manipulator(); - //! Constructs a manipulator object with input location and positions of axes and all parts to be displayed. - Standard_EXPORT AIS_Manipulator (const gp_Ax2& thePosition); + //! Constructs a manipulator object with input location and positions of axes and all parts to be + //! displayed. + Standard_EXPORT AIS_Manipulator(const gp_Ax2& thePosition); //! Disable or enable visual parts for translation, rotation or scaling for some axis. //! By default all parts are enabled (will be displayed). - //! @warning Enabling or disabling of visual parts of manipulator does not manage the manipulation (selection) mode. + //! @warning Enabling or disabling of visual parts of manipulator does not manage the manipulation + //! (selection) mode. //! @warning Raises program error if axis index is < 0 or > 2. - Standard_EXPORT void SetPart (const Standard_Integer theAxisIndex, const AIS_ManipulatorMode theMode, const Standard_Boolean theIsEnabled); + Standard_EXPORT void SetPart(const Standard_Integer theAxisIndex, + const AIS_ManipulatorMode theMode, + const Standard_Boolean theIsEnabled); //! Disable or enable visual parts for translation, rotation or scaling for ALL axes. //! By default all parts are enabled (will be displayed). - //! @warning Enabling or disabling of visual parts of manipulator does not manage the manipulation (selection) mode. + //! @warning Enabling or disabling of visual parts of manipulator does not manage the manipulation + //! (selection) mode. //! @warning Raises program error if axis index is < 0 or > 2. - Standard_EXPORT void SetPart (const AIS_ManipulatorMode theMode, const Standard_Boolean theIsEnabled); + Standard_EXPORT void SetPart(const AIS_ManipulatorMode theMode, + const Standard_Boolean theIsEnabled); //! Behavior settings to be applied when performing transformation: //! - FollowTranslation - whether the manipulator will be moved together with an object. //! - FollowRotation - whether the manipulator will be rotated together with an object. - struct OptionsForAttach { + struct OptionsForAttach + { + + OptionsForAttach() + : AdjustPosition(Standard_True), + AdjustSize(Standard_False), + EnableModes(Standard_True) + { + } + + OptionsForAttach& SetAdjustPosition(const Standard_Boolean theApply) + { + AdjustPosition = theApply; + return *this; + } + + OptionsForAttach& SetAdjustSize(const Standard_Boolean theApply) + { + AdjustSize = theApply; + return *this; + } - OptionsForAttach() : AdjustPosition (Standard_True), AdjustSize (Standard_False), EnableModes (Standard_True) {} - OptionsForAttach& SetAdjustPosition (const Standard_Boolean theApply) { AdjustPosition = theApply; return *this; } - OptionsForAttach& SetAdjustSize (const Standard_Boolean theApply) { AdjustSize = theApply; return *this; } - OptionsForAttach& SetEnableModes (const Standard_Boolean theApply) { EnableModes = theApply; return *this; } + OptionsForAttach& SetEnableModes(const Standard_Boolean theApply) + { + EnableModes = theApply; + return *this; + } Standard_Boolean AdjustPosition; Standard_Boolean AdjustSize; @@ -128,54 +154,59 @@ public: }; //! Attaches himself to the input interactive object and become displayed in the same context. - //! It is placed in the center of object bounding box, and its size is adjusted to the object bounding box. - Standard_EXPORT void Attach (const Handle(AIS_InteractiveObject)& theObject, const OptionsForAttach& theOptions = OptionsForAttach()); - - //! Attaches himself to the input interactive object group and become displayed in the same context. - //! It become attached to the first object, baut manage manipulation of the whole group. - //! It is placed in the center of object bounding box, and its size is adjusted to the object bounding box. - Standard_EXPORT void Attach (const Handle(AIS_ManipulatorObjectSequence)& theObject, const OptionsForAttach& theOptions = OptionsForAttach()); + //! It is placed in the center of object bounding box, and its size is adjusted to the object + //! bounding box. + Standard_EXPORT void Attach(const Handle(AIS_InteractiveObject)& theObject, + const OptionsForAttach& theOptions = OptionsForAttach()); + + //! Attaches himself to the input interactive object group and become displayed in the same + //! context. It become attached to the first object, baut manage manipulation of the whole group. + //! It is placed in the center of object bounding box, and its size is adjusted to the object + //! bounding box. + Standard_EXPORT void Attach(const Handle(AIS_ManipulatorObjectSequence)& theObject, + const OptionsForAttach& theOptions = OptionsForAttach()); //! Enable manipualtion mode. //! @warning It activates selection mode in the current context. //! If manipulator is not displayed, no mode will be activated. - Standard_EXPORT void EnableMode (const AIS_ManipulatorMode theMode); + Standard_EXPORT void EnableMode(const AIS_ManipulatorMode theMode); //! Enables mode activation on detection (highlighting). //! By default, mode is activated on selection of manipulator part. //! @warning If this mode is enabled, selection of parts does nothing. - void SetModeActivationOnDetection (const Standard_Boolean theToEnable) + void SetModeActivationOnDetection(const Standard_Boolean theToEnable) { myIsActivationOnDetection = theToEnable; } //! @return true if manual mode activation is enabled. - Standard_Boolean IsModeActivationOnDetection() const - { - return myIsActivationOnDetection; - } + Standard_Boolean IsModeActivationOnDetection() const { return myIsActivationOnDetection; } public: //! Drag object in the viewer. - //! @param theCtx [in] interactive context - //! @param theView [in] active View - //! @param theOwner [in] the owner of detected entity - //! @param theDragFrom [in] drag start point - //! @param theDragTo [in] drag end point - //! @param theAction [in] drag action + //! @param[in] theCtx interactive context + //! @param[in] theView active View + //! @param[in] theOwner the owner of detected entity + //! @param[in] theDragFrom drag start point + //! @param[in] theDragTo drag end point + //! @param[in] theAction drag action //! @return FALSE if object rejects dragging action (e.g. AIS_DragAction_Start) - Standard_EXPORT virtual Standard_Boolean ProcessDragging (const Handle(AIS_InteractiveContext)& theCtx, - const Handle(V3d_View)& theView, - const Handle(SelectMgr_EntityOwner)& theOwner, - const Graphic3d_Vec2i& theDragFrom, - const Graphic3d_Vec2i& theDragTo, - const AIS_DragAction theAction) Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean ProcessDragging( + const Handle(AIS_InteractiveContext)& theCtx, + const Handle(V3d_View)& theView, + const Handle(SelectMgr_EntityOwner)& theOwner, + const Graphic3d_Vec2i& theDragFrom, + const Graphic3d_Vec2i& theDragTo, + const AIS_DragAction theAction) Standard_OVERRIDE; //! Init start (reference) transformation. //! @warning It is used in chain with StartTransform-Transform(gp_Trsf)-StopTransform - //! and is used only for custom transform set. If Transform(const Standard_Integer, const Standard_Integer) is used, - //! initial data is set automatically, and it is reset on DeactivateCurrentMode call if it is not reset yet. - Standard_EXPORT void StartTransform (const Standard_Integer theX, const Standard_Integer theY, const Handle(V3d_View)& theView); + //! and is used only for custom transform set. If Transform(const Standard_Integer, const + //! Standard_Integer) is used, initial data is set automatically, and it is reset on + //! DeactivateCurrentMode call if it is not reset yet. + Standard_EXPORT void StartTransform(const Standard_Integer theX, + const Standard_Integer theY, + const Handle(V3d_View)& theView); //! Apply to the owning objects the input transformation. //! @remark The transformation is set using SetLocalTransformation for owning objects. @@ -184,29 +215,40 @@ public: //! @warning It is used in chain with StartTransform-Transform(gp_Trsf)-StopTransform //! and is used only for custom transform set. //! @warning It will does nothing if transformation is not initiated (with StartTransform() call). - Standard_EXPORT void Transform (const gp_Trsf& aTrsf); + Standard_EXPORT void Transform(const gp_Trsf& aTrsf); + + //! Apply camera transformation to flat skin manipulator + Standard_EXPORT void RecomputeTransformation(const Handle(Graphic3d_Camera)& theCamera) + Standard_OVERRIDE; + + //! Recomputes sensitive primitives for the given selection mode. + //! @param theMode selection mode to recompute sensitive primitives + Standard_EXPORT void RecomputeSelection(const AIS_ManipulatorMode theMode); //! Reset start (reference) transformation. - //! @param theToApply [in] option to apply or to cancel the started transformation. + //! @param[in] theToApply option to apply or to cancel the started transformation. //! @warning It is used in chain with StartTransform-Transform(gp_Trsf)-StopTransform //! and is used only for custom transform set. - Standard_EXPORT void StopTransform (const Standard_Boolean theToApply = Standard_True); + Standard_EXPORT void StopTransform(const Standard_Boolean theToApply = Standard_True); //! Apply transformation made from mouse moving from start position //! (save on the first Transform() call and reset on DeactivateCurrentMode() call.) //! to the in/out mouse position (theX, theY) - Standard_EXPORT gp_Trsf Transform (const Standard_Integer theX, const Standard_Integer theY, - const Handle(V3d_View)& theView); + Standard_EXPORT gp_Trsf Transform(const Standard_Integer theX, + const Standard_Integer theY, + const Handle(V3d_View)& theView); //! Computes transformation of parent object according to the active mode and input motion vector. - //! You can use this method to get object transformation according to current mode or use own algorithm - //! to implement any other transformation for modes. + //! You can use this method to get object transformation according to current mode or use own + //! algorithm to implement any other transformation for modes. //! @return transformation of parent object. - Standard_EXPORT Standard_Boolean ObjectTransformation (const Standard_Integer theX, const Standard_Integer theY, - const Handle(V3d_View)& theView, gp_Trsf& theTrsf); + Standard_EXPORT Standard_Boolean ObjectTransformation(const Standard_Integer theX, + const Standard_Integer theY, + const Handle(V3d_View)& theView, + gp_Trsf& theTrsf); - //! Make inactive the current selected manipulator part and reset current axis index and current mode. - //! After its call HasActiveMode() returns false. + //! Make inactive the current selected manipulator part and reset current axis index and current + //! mode. After its call HasActiveMode() returns false. //! @sa HasActiveMode() Standard_EXPORT void DeactivateCurrentMode(); @@ -221,49 +263,66 @@ public: //! @return one of the owning objects. //! @warning raises program error if theIndex is more than owning objects count or less than 1. - Standard_EXPORT Handle(AIS_InteractiveObject) Object (const Standard_Integer theIndex) const; + Standard_EXPORT Handle(AIS_InteractiveObject) Object(const Standard_Integer theIndex) const; //! @return true if manipulator is attached to some interactive object (has owning object). Standard_Boolean IsAttached() const { return HasOwner(); } - //! @return true if some part of manipulator is selected (transformation mode is active, and owning object can be transformed). + //! @return true if some part of manipulator is selected (transformation mode is active, and + //! owning object can be transformed). Standard_Boolean HasActiveMode() const { return IsAttached() && myCurrentMode != AIS_MM_None; } Standard_Boolean HasActiveTransformation() { return myHasStartedTransformation; } - gp_Trsf StartTransformation() const { return !myStartTrsfs.IsEmpty() ? myStartTrsfs.First() : gp_Trsf(); } + gp_Trsf StartTransformation() const + { + return !myStartTrsfs.IsEmpty() ? myStartTrsfs.First() : gp_Trsf(); + } - gp_Trsf StartTransformation (Standard_Integer theIndex) const + gp_Trsf StartTransformation(Standard_Integer theIndex) const { - Standard_ProgramError_Raise_if (theIndex < 1 || theIndex > Objects()->Upper(), + Standard_ProgramError_Raise_if( + theIndex < 1 || theIndex > Objects()->Upper(), "AIS_Manipulator::StartTransformation(): theIndex is out of bounds"); - return !myStartTrsfs.IsEmpty() ? myStartTrsfs (theIndex) : gp_Trsf(); + return !myStartTrsfs.IsEmpty() ? myStartTrsfs(theIndex) : gp_Trsf(); } public: //! @name Configuration of graphical transformations - //! Enable or disable zoom persistence mode for the manipulator. With //! this mode turned on the presentation will keep fixed screen size. //! @warning when turned on this option overrides transform persistence //! properties and local transformation to achieve necessary visual effect. //! @warning revise use of AdjustSize argument of of \sa AttachToObjects method //! when enabling zoom persistence. - Standard_EXPORT void SetZoomPersistence (const Standard_Boolean theToEnable); + Standard_EXPORT void SetZoomPersistence(const Standard_Boolean theToEnable); //! Returns state of zoom persistence mode, whether it turned on or off. Standard_Boolean ZoomPersistence() const { return myIsZoomPersistentMode; } - //! Redefines transform persistence management to setup transformation for sub-presentation of axes. + //! Redefines transform persistence management to setup transformation for sub-presentation of + //! axes. //! @warning this interactive object does not support custom transformation persistence when //! using \sa ZoomPersistence mode. In this mode the transformation persistence flags for //! presentations are overridden by this class. - //! @warning Invokes debug assertion to catch incompatible usage of the method with \sa ZoomPersistence mode, - //! silently does nothing in release mode. + //! @warning Invokes debug assertion to catch incompatible usage of the method with \sa + //! ZoomPersistence mode, silently does nothing in release mode. //! @warning revise use of AdjustSize argument of of \sa AttachToObjects method //! when enabling zoom persistence. - Standard_EXPORT virtual void SetTransformPersistence (const Handle(Graphic3d_TransformPers)& theTrsfPers) Standard_OVERRIDE; + Standard_EXPORT virtual void SetTransformPersistence( + const Handle(Graphic3d_TransformPers)& theTrsfPers) Standard_OVERRIDE; public: //! @name Setters for parameters + enum ManipulatorSkin + { + ManipulatorSkin_Shaded, + ManipulatorSkin_Flat + }; + + //! @return current manipulator skin mode. + ManipulatorSkin SkinMode() const { return mySkinMode; } + + //! Sets skin mode for the manipulator. + Standard_EXPORT void SetSkinMode(const ManipulatorSkin theSkinMode); AIS_ManipulatorMode ActiveMode() const { return myCurrentMode; } @@ -273,27 +332,47 @@ public: //! @name Setters for parameters const gp_Ax2& Position() const { return myPosition; } //! Sets position of the manipulator object. - Standard_EXPORT void SetPosition (const gp_Ax2& thePosition); + Standard_EXPORT void SetPosition(const gp_Ax2& thePosition); Standard_ShortReal Size() const { return myAxes[0].Size(); } //! Sets size (length of side of the manipulator cubic bounding box. - Standard_EXPORT void SetSize (const Standard_ShortReal theSideLength); + Standard_EXPORT void SetSize(const Standard_ShortReal theSideLength); //! Sets gaps between translator, scaler and rotator sub-presentations. - Standard_EXPORT void SetGap (const Standard_ShortReal theValue); + Standard_EXPORT void SetGap(const Standard_ShortReal theValue); public: - //! Behavior settings to be applied when performing transformation: //! - FollowTranslation - whether the manipulator will be moved together with an object. //! - FollowRotation - whether the manipulator will be rotated together with an object. - struct BehaviorOnTransform { + struct BehaviorOnTransform + { - BehaviorOnTransform() : FollowTranslation (Standard_True), FollowRotation (Standard_True), FollowDragging (Standard_True) {} - BehaviorOnTransform& SetFollowTranslation (const Standard_Boolean theApply) { FollowTranslation = theApply; return *this; } - BehaviorOnTransform& SetFollowRotation (const Standard_Boolean theApply) { FollowRotation = theApply; return *this; } - BehaviorOnTransform& SetFollowDragging (const Standard_Boolean theApply) { FollowDragging = theApply; return *this; } + BehaviorOnTransform() + : FollowTranslation(Standard_True), + FollowRotation(Standard_True), + FollowDragging(Standard_True) + { + } + + BehaviorOnTransform& SetFollowTranslation(const Standard_Boolean theApply) + { + FollowTranslation = theApply; + return *this; + } + + BehaviorOnTransform& SetFollowRotation(const Standard_Boolean theApply) + { + FollowRotation = theApply; + return *this; + } + + BehaviorOnTransform& SetFollowDragging(const Standard_Boolean theApply) + { + FollowDragging = theApply; + return *this; + } Standard_Boolean FollowTranslation; Standard_Boolean FollowRotation; @@ -302,7 +381,10 @@ public: //! Sets behavior settings for transformation action carried on the manipulator, //! whether it translates, rotates together with the transformed object or not. - void SetTransformBehavior (const BehaviorOnTransform& theSettings) { myBehaviorOnTransform = theSettings; } + void SetTransformBehavior(const BehaviorOnTransform& theSettings) + { + myBehaviorOnTransform = theSettings; + } //! @return behavior settings for transformation action of the manipulator. BehaviorOnTransform& ChangeTransformBehavior() { return myBehaviorOnTransform; } @@ -311,52 +393,56 @@ public: const BehaviorOnTransform& TransformBehavior() const { return myBehaviorOnTransform; } public: //! @name Presentation computation - //! Fills presentation. - //! @note Manipulator presentation does not use display mode and for all modes has the same presentation. - Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr, - const Handle(Prs3d_Presentation)& thePrs, - const Standard_Integer theMode = 0) Standard_OVERRIDE; + //! @note Manipulator presentation does not use display mode and for all modes has the same + //! presentation. + Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager)& thePrsMgr, + const Handle(Prs3d_Presentation)& thePrs, + const Standard_Integer theMode = 0) Standard_OVERRIDE; //! Computes selection sensitive zones (triangulation) for manipulator. - //! @param theNode [in] Selection mode that is treated as transformation mode. - Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSelection, - const Standard_Integer theMode) Standard_OVERRIDE; + //! @param[in] theNode Selection mode that is treated as transformation mode. + Standard_EXPORT virtual void ComputeSelection(const Handle(SelectMgr_Selection)& theSelection, + const Standard_Integer theMode) Standard_OVERRIDE; - //! Disables auto highlighting to use HilightSelected() and HilightOwnerWithColor() overridden methods. - virtual Standard_Boolean IsAutoHilight() const Standard_OVERRIDE - { - return Standard_False; - } + //! Disables auto highlighting to use HilightSelected() and HilightOwnerWithColor() overridden + //! methods. + virtual Standard_Boolean IsAutoHilight() const Standard_OVERRIDE { return Standard_False; } //! Method which clear all selected owners belonging //! to this selectable object ( for fast presentation draw ). Standard_EXPORT virtual void ClearSelected() Standard_OVERRIDE; //! Method which draws selected owners ( for fast presentation draw ). - Standard_EXPORT virtual void HilightSelected (const Handle(PrsMgr_PresentationManager)& thePM, const SelectMgr_SequenceOfOwner& theSeq) Standard_OVERRIDE; + Standard_EXPORT virtual void HilightSelected(const Handle(PrsMgr_PresentationManager)& thePM, + const SelectMgr_SequenceOfOwner& theSeq) + Standard_OVERRIDE; //! Method which hilight an owner belonging to //! this selectable object ( for fast presentation draw ). - Standard_EXPORT virtual void HilightOwnerWithColor (const Handle(PrsMgr_PresentationManager)& thePM, - const Handle(Prs3d_Drawer)& theStyle, - const Handle(SelectMgr_EntityOwner)& theOwner) Standard_OVERRIDE; + Standard_EXPORT virtual void HilightOwnerWithColor( + const Handle(PrsMgr_PresentationManager)& thePM, + const Handle(Prs3d_Drawer)& theStyle, + const Handle(SelectMgr_EntityOwner)& theOwner) Standard_OVERRIDE; protected: - Standard_EXPORT void init(); Standard_EXPORT void updateTransformation(); - Standard_EXPORT Handle(Prs3d_Presentation) getHighlightPresentation (const Handle(SelectMgr_EntityOwner)& theOwner) const; + Standard_EXPORT Handle(Prs3d_Presentation) getHighlightPresentation( + const Handle(SelectMgr_EntityOwner)& theOwner) const; + + Standard_EXPORT Handle(Graphic3d_Group) getGroup(const Standard_Integer theIndex, + const AIS_ManipulatorMode theMode) const; - Standard_EXPORT Handle(Graphic3d_Group) getGroup (const Standard_Integer theIndex, const AIS_ManipulatorMode theMode) const; + Standard_EXPORT void attachToPoint(const gp_Pnt& thePoint); - Standard_EXPORT void attachToBox (const Bnd_Box& theBox); + Standard_EXPORT void attachToBox(const Bnd_Box& theBox); - Standard_EXPORT void adjustSize (const Bnd_Box& theBox); + Standard_EXPORT void adjustSize(const Bnd_Box& theBox); - Standard_EXPORT void setTransformPersistence (const Handle(Graphic3d_TransformPers)& theTrsfPers); + Standard_EXPORT void setTransformPersistence(const Handle(Graphic3d_TransformPers)& theTrsfPers); //! Redefines local transformation management method to inform user of improper use. //! @warning this interactive object does not support setting custom local transformation, @@ -364,52 +450,49 @@ protected: //! without need for recomputing presentation. //! @warning Invokes debug assertion in debug to catch incompatible usage of the //! method, silently does nothing in release mode. - Standard_EXPORT virtual void setLocalTransformation (const Handle(TopLoc_Datum3D)& theTrsf) Standard_OVERRIDE; + Standard_EXPORT virtual void setLocalTransformation(const Handle(TopLoc_Datum3D)& theTrsf) + Standard_OVERRIDE; using AIS_InteractiveObject::SetLocalTransformation; // hide visibility protected: //! @name Auxiliary classes to fill presentation with proper primitives - class Quadric { public: - virtual ~Quadric() { myTriangulation.Nullify(); myArray.Nullify(); } - const Handle(Poly_Triangulation)& Triangulation() const { return myTriangulation; } const Handle(Graphic3d_ArrayOfTriangles)& Array() const { return myArray; } protected: - - Handle(Poly_Triangulation) myTriangulation; + Handle(Poly_Triangulation) myTriangulation; Handle(Graphic3d_ArrayOfTriangles) myArray; }; class Disk : public Quadric { public: - Disk() - : Quadric(), - myInnerRad(0.0f), - myOuterRad(1.0f) - { } + : Quadric(), + myInnerRad(0.0f), + myOuterRad(1.0f) + { + } - ~Disk() { } + ~Disk() {} - void Init (const Standard_ShortReal theInnerRadius, - const Standard_ShortReal theOuterRadius, - const gp_Ax1& thePosition, - const Standard_Integer theSlicesNb = 20, - const Standard_Integer theStacksNb = 20); + void Init(const Standard_ShortReal theInnerRadius, + const Standard_ShortReal theOuterRadius, + const gp_Ax1& thePosition, + const Standard_Real theAngle, + const Standard_Integer theSlicesNb = 20, + const Standard_Integer theStacksNb = 20); protected: - gp_Ax1 myPosition; Standard_ShortReal myInnerRad; Standard_ShortReal myOuterRad; @@ -419,64 +502,68 @@ protected: //! @name Auxiliary classes to fill presentation with proper primitiv { public: Sphere() - : Quadric(), - myRadius(1.0f) - {} + : Quadric(), + myRadius(1.0f) + { + } - void Init (const Standard_ShortReal theRadius, - const gp_Pnt& thePosition, - const Standard_Integer theSlicesNb = 20, - const Standard_Integer theStacksNb = 20); + void Init(const Standard_ShortReal theRadius, + const gp_Pnt& thePosition, + const ManipulatorSkin theSkinMode, + const Standard_Integer theSlicesNb = 20, + const Standard_Integer theStacksNb = 20); protected: - - gp_Pnt myPosition; + gp_Pnt myPosition; Standard_ShortReal myRadius; }; class Cube { public: + Cube() {} - Cube() { } - ~Cube() { } + ~Cube() {} - void Init (const gp_Ax1& thePosition, const Standard_ShortReal myBoxSize); + void Init(const gp_Ax1& thePosition, + const Standard_ShortReal myBoxSize, + const ManipulatorSkin theSkinMode); const Handle(Poly_Triangulation)& Triangulation() const { return myTriangulation; } const Handle(Graphic3d_ArrayOfTriangles)& Array() const { return myArray; } private: - - void addTriangle (const Standard_Integer theIndex, const gp_Pnt& theP1, const gp_Pnt& theP2, const gp_Pnt& theP3, - const gp_Dir& theNormal); + void addTriangle(const Standard_Integer theIndex, + const gp_Pnt& theP1, + const gp_Pnt& theP2, + const gp_Pnt& theP3, + const gp_Dir& theNormal); protected: - - Handle(Poly_Triangulation) myTriangulation; + Handle(Poly_Triangulation) myTriangulation; Handle(Graphic3d_ArrayOfTriangles) myArray; }; class Sector : public Quadric { public: - Sector() - : Quadric(), - myRadius(0.0f) - { } + : Quadric(), + myRadius(0.0f) + { + } - ~Sector() { } + ~Sector() {} void Init(const Standard_ShortReal theRadius, const gp_Ax1& thePosition, const gp_Dir& theXDirection, + const ManipulatorSkin theSkinMode, const Standard_Integer theSlicesNb = 5, const Standard_Integer theStacksNb = 5); protected: - gp_Ax1 myPosition; Standard_ShortReal myRadius; }; @@ -489,36 +576,36 @@ protected: //! @name Auxiliary classes to fill presentation with proper primitiv class Axis { public: + Axis(const gp_Ax1& theAxis = gp_Ax1(), + const Quantity_Color& theColor = Quantity_Color(), + const Standard_ShortReal theLength = 10.0f); - Axis (const gp_Ax1& theAxis = gp_Ax1(), - const Quantity_Color& theColor = Quantity_Color(), - const Standard_ShortReal theLength = 10.0f); - - void Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr, - const Handle(Prs3d_Presentation)& thePrs, - const Handle(Prs3d_ShadingAspect)& theAspect); + void Compute(const Handle(PrsMgr_PresentationManager)& thePrsMgr, + const Handle(Prs3d_Presentation)& thePrs, + const Handle(Prs3d_ShadingAspect)& theAspect, + const ManipulatorSkin theSkinMode); const gp_Ax1& ReferenceAxis() const { return myReferenceAxis; } - void SetPosition (const gp_Ax1& thePosition) { myPosition = thePosition; } + void SetPosition(const gp_Ax1& thePosition) { myPosition = thePosition; } const gp_Ax1& Position() const { return myPosition; } - void SetTransformPersistence (const Handle(Graphic3d_TransformPers)& theTrsfPers) + void SetTransformPersistence(const Handle(Graphic3d_TransformPers)& theTrsfPers) { if (!myHighlightTranslator.IsNull()) { - myHighlightTranslator->SetTransformPersistence (theTrsfPers); + myHighlightTranslator->SetTransformPersistence(theTrsfPers); } if (!myHighlightScaler.IsNull()) { - myHighlightScaler->SetTransformPersistence (theTrsfPers); + myHighlightScaler->SetTransformPersistence(theTrsfPers); } if (!myHighlightRotator.IsNull()) { - myHighlightRotator->SetTransformPersistence (theTrsfPers); + myHighlightRotator->SetTransformPersistence(theTrsfPers); } if (!myHighlightDragger.IsNull()) @@ -527,21 +614,21 @@ protected: //! @name Auxiliary classes to fill presentation with proper primitiv } } - void Transform (const Handle(TopLoc_Datum3D)& theTransformation) + void Transform(const Handle(TopLoc_Datum3D)& theTransformation) { if (!myHighlightTranslator.IsNull()) { - myHighlightTranslator->SetTransformation (theTransformation); + myHighlightTranslator->SetTransformation(theTransformation); } if (!myHighlightScaler.IsNull()) { - myHighlightScaler->SetTransformation (theTransformation); + myHighlightScaler->SetTransformation(theTransformation); } if (!myHighlightRotator.IsNull()) { - myHighlightRotator->SetTransformation (theTransformation); + myHighlightRotator->SetTransformation(theTransformation); } if (!myHighlightDragger.IsNull()) @@ -558,11 +645,11 @@ protected: //! @name Auxiliary classes to fill presentation with proper primitiv Standard_Boolean HasDragging() const { return myHasDragging; } - void SetTranslation (const Standard_Boolean theIsEnabled) { myHasTranslation = theIsEnabled; } + void SetTranslation(const Standard_Boolean theIsEnabled) { myHasTranslation = theIsEnabled; } - void SetRotation (const Standard_Boolean theIsEnabled) { myHasRotation = theIsEnabled; } + void SetRotation(const Standard_Boolean theIsEnabled) { myHasRotation = theIsEnabled; } - void SetScaling (const Standard_Boolean theIsEnabled) { myHasScaling = theIsEnabled; } + void SetScaling(const Standard_Boolean theIsEnabled) { myHasScaling = theIsEnabled; } void SetDragging(const Standard_Boolean theIsEnabled) { myHasDragging = theIsEnabled; } @@ -570,11 +657,18 @@ protected: //! @name Auxiliary classes to fill presentation with proper primitiv Standard_ShortReal AxisLength() const { return myLength; } + Standard_ShortReal BoxSize() const { return myBoxSize; } + Standard_ShortReal AxisRadius() const { return myAxisRadius; } - void SetAxisRadius (const Standard_ShortReal theValue) { myAxisRadius = theValue; } + Standard_ShortReal Indent() const { return myIndent; } + + void SetAxisRadius(const Standard_ShortReal theValue) { myAxisRadius = theValue; } - const Handle(Prs3d_Presentation)& TranslatorHighlightPrs() const { return myHighlightTranslator; } + const Handle(Prs3d_Presentation)& TranslatorHighlightPrs() const + { + return myHighlightTranslator; + } const Handle(Prs3d_Presentation)& RotatorHighlightPrs() const { return myHighlightRotator; } @@ -592,57 +686,66 @@ protected: //! @name Auxiliary classes to fill presentation with proper primitiv const Handle(Graphic3d_ArrayOfTriangles)& TriangleArray() const { return myTriangleArray; } - void SetIndent (const Standard_ShortReal theValue) { myIndent = theValue; } + void SetIndent(const Standard_ShortReal theValue) { myIndent = theValue; } - Standard_ShortReal Size() const { return myLength + myBoxSize + myDiskThickness + myIndent * 2.0f; } + Standard_ShortReal Size() const { return myInnerRadius + myDiskThickness + myIndent * 2; } - gp_Pnt ScalerCenter (const gp_Pnt& theLocation) const { return theLocation.XYZ() + myPosition.Direction().XYZ() * (myLength + myIndent + myBoxSize * 0.5f); } + Standard_ShortReal InnerRadius() const { return myInnerRadius + myIndent * 2.0f; } - void SetSize (const Standard_ShortReal theValue) + gp_Pnt ScalerCenter(const gp_Pnt& theLocation) const + { + return theLocation.XYZ() + + myPosition.Direction().XYZ() * (myLength + myIndent + myBoxSize * 0.5f); + } + + void SetSize(const Standard_ShortReal theValue) { if (myIndent > theValue * 0.1f) { - myLength = theValue * 0.7f; - myBoxSize = theValue * 0.15f; + myLength = theValue * 0.7f; + myBoxSize = theValue * 0.15f; myDiskThickness = theValue * 0.05f; - myIndent = theValue * 0.05f; + myIndent = theValue * 0.05f; } else // use pre-set value of predent { Standard_ShortReal aLength = theValue - 2 * myIndent; - myLength = aLength * 0.8f; - myBoxSize = aLength * 0.15f; - myDiskThickness = aLength * 0.05f; + myLength = aLength * 0.8f; + myBoxSize = aLength * 0.15f; + myDiskThickness = aLength * 0.05f; } myInnerRadius = myIndent * 2 + myBoxSize + myLength; - myAxisRadius = myBoxSize / 4.0f; + myAxisRadius = myBoxSize / 4.0f; } Standard_Integer FacettesNumber() const { return myFacettesNumber; } public: - const gp_Pnt& TranslatorTipPosition() const { return myArrowTipPos; } + const Sector& DraggerSector() const { return mySector; } + const Disk& RotatorDisk() const { return myCircle; } + float RotatorDiskRadius() const { return myCircleRadius; } + const Cube& ScalerCube() const { return myCube; } + const gp_Pnt& ScalerCubePosition() const { return myCubePos; } protected: - - gp_Ax1 myReferenceAxis; //!< Returns reference axis assignment. - gp_Ax1 myPosition; //!< Position of the axis including local transformation. + gp_Ax1 myReferenceAxis; //!< Returns reference axis assignment. + gp_Ax1 myPosition; //!< Position of the axis including local transformation. Quantity_Color myColor; - Standard_Boolean myHasTranslation; + Standard_Boolean myHasTranslation; Standard_ShortReal myLength; //!< Length of translation axis. Standard_ShortReal myAxisRadius; - Standard_Boolean myHasScaling; + Standard_Boolean myHasScaling; Standard_ShortReal myBoxSize; //!< Size of scaling cube. - Standard_Boolean myHasRotation; + Standard_Boolean myHasRotation; Standard_ShortReal myInnerRadius; //!< Radius of rotation circle. Standard_ShortReal myDiskThickness; Standard_ShortReal myIndent; //!< Gap between visual part of the manipulator. @@ -650,15 +753,14 @@ protected: //! @name Auxiliary classes to fill presentation with proper primitiv Standard_Boolean myHasDragging; protected: - Standard_Integer myFacettesNumber; - gp_Pnt myArrowTipPos; - Sector mySector; - Disk myCircle; - float myCircleRadius; - Cube myCube; - gp_Pnt myCubePos; + gp_Pnt myArrowTipPos; + Sector mySector; + Disk myCircle; + float myCircleRadius; + Cube myCube; + gp_Pnt myCubePos; Handle(Graphic3d_Group) myTranslatorGroup; Handle(Graphic3d_Group) myScalerGroup; @@ -671,17 +773,23 @@ protected: //! @name Auxiliary classes to fill presentation with proper primitiv Handle(Prs3d_Presentation) myHighlightDragger; Handle(Graphic3d_ArrayOfTriangles) myTriangleArray; - }; protected: - - Axis myAxes[3]; //!< Tree axes of the manipulator. - Sphere myCenter; //!< Visual part displaying the center sphere of the manipulator. + Axis myAxes[3]; //!< Tree axes of the manipulator. + Sphere myCenter; //!< Visual part displaying the center sphere of the manipulator. + // clang-format off gp_Ax2 myPosition; //!< Position of the manipulator object. it displays its location and position of its axes. + Disk myCircle; //!< Outer circle + Handle(Graphic3d_Group) myCircleGroup; + + Disk mySector; //!< Sector indicating the rotation angle + Handle(Graphic3d_Group) mySectorGroup; + Standard_Integer myCurrentIndex; //!< Index of active axis. AIS_ManipulatorMode myCurrentMode; //!< Name of active manipulation mode. + ManipulatorSkin mySkinMode; //!< Name of active skin mode. Standard_Boolean myIsActivationOnDetection; //!< Manual activation of modes (not on parts selection). Standard_Boolean myIsZoomPersistentMode; //!< Zoom persistence mode activation. @@ -691,17 +799,18 @@ protected: //! @name Fields for interactive transformation. Fields only for inte NCollection_Sequence myStartTrsfs; //!< Owning object transformation for start. It is used internally. Standard_Boolean myHasStartedTransformation; //!< Shows if transformation is processed (sequential calls of Transform()). - gp_Ax2 myStartPosition; //! Start position of manipulator. - gp_Pnt myStartPick; //! 3d point corresponding to start mouse pick. - Standard_Real myPrevState; //! Previous value of angle during rotation. + // clang-format on + gp_Ax2 myStartPosition; //! Start position of manipulator. + gp_Pnt myStartPick; //! 3d point corresponding to start mouse pick. + Standard_Real myPrevState; //! Previous value of angle during rotation. //! Aspect used to color current detected part and current selected part. Handle(Prs3d_ShadingAspect) myHighlightAspect; //! Aspect used to color sector part when it's selected. Handle(Prs3d_ShadingAspect) myDraggerHighlight; -public: +public: DEFINE_STANDARD_RTTIEXT(AIS_Manipulator, AIS_InteractiveObject) }; #endif // _AIS_Manipulator_HeaderFile diff --git a/opencascade/AIS_ManipulatorMode.hxx b/opencascade/AIS_ManipulatorMode.hxx index eea969ae0..65b5bb7c2 100644 --- a/opencascade/AIS_ManipulatorMode.hxx +++ b/opencascade/AIS_ManipulatorMode.hxx @@ -19,7 +19,7 @@ //! Mode to make definite kind of transformations with AIS_Manipulator object. enum AIS_ManipulatorMode { - AIS_MM_None = 0, + AIS_MM_None = 0, AIS_MM_Translation = 1, AIS_MM_Rotation, AIS_MM_Scaling, diff --git a/opencascade/AIS_ManipulatorOwner.hxx b/opencascade/AIS_ManipulatorOwner.hxx index 769c355b4..0bde34d1b 100644 --- a/opencascade/AIS_ManipulatorOwner.hxx +++ b/opencascade/AIS_ManipulatorOwner.hxx @@ -27,22 +27,23 @@ DEFINE_STANDARD_HANDLE(AIS_ManipulatorOwner, SelectMgr_EntityOwner) class AIS_ManipulatorOwner : public SelectMgr_EntityOwner { public: - DEFINE_STANDARD_RTTIEXT(AIS_ManipulatorOwner, SelectMgr_EntityOwner) - Standard_EXPORT AIS_ManipulatorOwner (const Handle(SelectMgr_SelectableObject)& theSelObject, - const Standard_Integer theIndex, - const AIS_ManipulatorMode theMode, - const Standard_Integer thePriority = 0); + Standard_EXPORT AIS_ManipulatorOwner(const Handle(SelectMgr_SelectableObject)& theSelObject, + const Standard_Integer theIndex, + const AIS_ManipulatorMode theMode, + const Standard_Integer thePriority = 0); - Standard_EXPORT virtual void HilightWithColor (const Handle(PrsMgr_PresentationManager)& thePM, - const Handle(Prs3d_Drawer)& theStyle, - const Standard_Integer theMode) Standard_OVERRIDE; + Standard_EXPORT virtual void HilightWithColor(const Handle(PrsMgr_PresentationManager)& thePM, + const Handle(Prs3d_Drawer)& theStyle, + const Standard_Integer theMode) Standard_OVERRIDE; - Standard_EXPORT Standard_Boolean IsHilighted (const Handle(PrsMgr_PresentationManager)& thePM, - const Standard_Integer theMode) const Standard_OVERRIDE; + Standard_EXPORT Standard_Boolean + IsHilighted(const Handle(PrsMgr_PresentationManager)& thePM, + const Standard_Integer theMode) const Standard_OVERRIDE; - Standard_EXPORT virtual void Unhilight (const Handle(PrsMgr_PresentationManager)& thePM, const Standard_Integer theMode) Standard_OVERRIDE; + Standard_EXPORT virtual void Unhilight(const Handle(PrsMgr_PresentationManager)& thePM, + const Standard_Integer theMode) Standard_OVERRIDE; AIS_ManipulatorMode Mode() const { return myMode; } @@ -50,9 +51,8 @@ public: Standard_Integer Index() const { return myIndex; } protected: - - Standard_Integer myIndex; //!< index of manipulator axis. - AIS_ManipulatorMode myMode;//!< manipulation (highlight) mode. + Standard_Integer myIndex; //!< index of manipulator axis. + AIS_ManipulatorMode myMode; //!< manipulation (highlight) mode. }; #endif // _AIS_ManipulatorOwner_HeaderFile diff --git a/opencascade/AIS_MediaPlayer.hxx b/opencascade/AIS_MediaPlayer.hxx index d6d00f5a9..e9b485bfc 100644 --- a/opencascade/AIS_MediaPlayer.hxx +++ b/opencascade/AIS_MediaPlayer.hxx @@ -25,7 +25,6 @@ class AIS_MediaPlayer : public AIS_InteractiveObject { DEFINE_STANDARD_RTTIEXT(AIS_MediaPlayer, AIS_InteractiveObject) public: - //! Empty constructor. Standard_EXPORT AIS_MediaPlayer(); @@ -33,18 +32,19 @@ public: Standard_EXPORT virtual ~AIS_MediaPlayer(); //! Setup callback to be called on queue progress (e.g. when new frame should be displayed). - void SetCallback (Graphic3d_MediaTextureSet::CallbackOnUpdate_t theCallbackFunction, void* theCallbackUserPtr) + void SetCallback(Graphic3d_MediaTextureSet::CallbackOnUpdate_t theCallbackFunction, + void* theCallbackUserPtr) { - myFramePair->SetCallback (theCallbackFunction, theCallbackUserPtr); + myFramePair->SetCallback(theCallbackFunction, theCallbackUserPtr); } //! Open specified file. - Standard_EXPORT void OpenInput (const TCollection_AsciiString& thePath, - Standard_Boolean theToWait); + Standard_EXPORT void OpenInput(const TCollection_AsciiString& thePath, + Standard_Boolean theToWait); //! Display new frame. - Standard_EXPORT bool PresentFrame (const Graphic3d_Vec2i& theLeftCorner, - const Graphic3d_Vec2i& theMaxSize); + Standard_EXPORT bool PresentFrame(const Graphic3d_Vec2i& theLeftCorner, + const Graphic3d_Vec2i& theMaxSize); //! Return player context. const Handle(Media_PlayerContext)& PlayerContext() const { return myFramePair->PlayerContext(); } @@ -62,35 +62,34 @@ public: //! Return duration. double Duration() const { return myFramePair->Duration(); } -//! @name AIS_InteractiveObject interface + //! @name AIS_InteractiveObject interface protected: - //! Accept only display mode 0. - virtual Standard_Boolean AcceptDisplayMode (const Standard_Integer theMode) const Standard_OVERRIDE { return theMode == 0; } + virtual Standard_Boolean AcceptDisplayMode(const Standard_Integer theMode) const Standard_OVERRIDE + { + return theMode == 0; + } //! Compute presentation. - Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr, - const Handle(Prs3d_Presentation)& thePrs, - const Standard_Integer theMode) Standard_OVERRIDE; + Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager)& thePrsMgr, + const Handle(Prs3d_Presentation)& thePrs, + const Standard_Integer theMode) Standard_OVERRIDE; //! Compute selection - Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSel, - const Standard_Integer theMode) Standard_OVERRIDE; + Standard_EXPORT virtual void ComputeSelection(const Handle(SelectMgr_Selection)& theSel, + const Standard_Integer theMode) Standard_OVERRIDE; protected: - //! Update frame size. - Standard_EXPORT bool updateSize (const Graphic3d_Vec2i& theLeftCorner, - const Graphic3d_Vec2i& theMaxSize); + Standard_EXPORT bool updateSize(const Graphic3d_Vec2i& theLeftCorner, + const Graphic3d_Vec2i& theMaxSize); protected: - Handle(Graphic3d_MediaTextureSet) myFramePair; Handle(Graphic3d_AspectFillArea3d) myFrameAspect; - Graphic3d_Vec2i myFrameBottomLeft; - Graphic3d_Vec2i myFrameSize; - bool myToClosePlayer; - + Graphic3d_Vec2i myFrameBottomLeft; + Graphic3d_Vec2i myFrameSize; + bool myToClosePlayer; }; #endif // _AIS_MediaPlayer_HeaderFile diff --git a/opencascade/AIS_MouseGesture.hxx b/opencascade/AIS_MouseGesture.hxx index b972e8445..dcf9ee9bb 100644 --- a/opencascade/AIS_MouseGesture.hxx +++ b/opencascade/AIS_MouseGesture.hxx @@ -20,26 +20,32 @@ //! Mouse gesture - only one can be active at one moment. enum AIS_MouseGesture { - AIS_MouseGesture_NONE, //!< no active gesture + AIS_MouseGesture_NONE, //!< no active gesture // AIS_MouseGesture_SelectRectangle, //!< rectangular selection; - //! press button to start, move mouse to define rectangle, release to finish + //! press button to start, move mouse to define rectangle, + //! release to finish AIS_MouseGesture_SelectLasso, //!< polygonal selection; - //! press button to start, move mouse to define polygonal path, release to finish + //! press button to start, move mouse to define polygonal path, + //! release to finish // - AIS_MouseGesture_Zoom, //!< view zoom gesture; - //! move mouse left to zoom-out, and to the right to zoom-in - AIS_MouseGesture_ZoomWindow, //!< view zoom by window gesture; - //! press button to start, move mouse to define rectangle, release to finish - AIS_MouseGesture_Pan, //!< view panning gesture - AIS_MouseGesture_RotateOrbit, //!< orbit rotation gesture - AIS_MouseGesture_RotateView, //!< view rotation gesture - AIS_MouseGesture_Drag, //!< object dragging; - //! press button to start, move mouse to define rectangle, release to finish + AIS_MouseGesture_Zoom, //!< view zoom gesture; + //! move mouse left to zoom-out, and to the right to zoom-in + AIS_MouseGesture_ZoomVertical, //!< view zoom gesture; + //! move mouse up to zoom-out, and to the down to zoom-in + AIS_MouseGesture_ZoomWindow, //!< view zoom by window gesture; + //! press button to start, move mouse to define rectangle, release + //! to finish + AIS_MouseGesture_Pan, //!< view panning gesture + AIS_MouseGesture_RotateOrbit, //!< orbit rotation gesture + AIS_MouseGesture_RotateView, //!< view rotation gesture + AIS_MouseGesture_Drag, //!< object dragging; + //! press button to start, move mouse to define rectangle, release to + //! finish }; //! Map defining mouse gestures. -typedef NCollection_DataMap AIS_MouseGestureMap; +typedef NCollection_DataMap AIS_MouseGestureMap; typedef NCollection_DataMap AIS_MouseSelectionSchemeMap; #endif // _AIS_MouseGesture_HeaderFile diff --git a/opencascade/AIS_MultipleConnectedInteractive.hxx b/opencascade/AIS_MultipleConnectedInteractive.hxx index ab11283d6..2902d5955 100644 --- a/opencascade/AIS_MultipleConnectedInteractive.hxx +++ b/opencascade/AIS_MultipleConnectedInteractive.hxx @@ -29,104 +29,119 @@ class AIS_MultipleConnectedInteractive : public AIS_InteractiveObject { DEFINE_STANDARD_RTTIEXT(AIS_MultipleConnectedInteractive, AIS_InteractiveObject) public: - //! Initializes the Interactive Object with multiple //! connections to AIS_Interactive objects. Standard_EXPORT AIS_MultipleConnectedInteractive(); - //! Establishes the connection between the Connected Interactive Object, theInteractive, and its reference. - //! Locates instance in theLocation and applies specified transformation persistence mode. + //! Establishes the connection between the Connected Interactive Object, theInteractive, and its + //! reference. Locates instance in theLocation and applies specified transformation persistence + //! mode. //! @return created instance object (AIS_ConnectedInteractive or AIS_MultipleConnectedInteractive) - Handle(AIS_InteractiveObject) Connect (const Handle(AIS_InteractiveObject)& theAnotherObj, - const Handle(TopLoc_Datum3D)& theLocation, - const Handle(Graphic3d_TransformPers)& theTrsfPers) + Handle(AIS_InteractiveObject) Connect(const Handle(AIS_InteractiveObject)& theAnotherObj, + const Handle(TopLoc_Datum3D)& theLocation, + const Handle(Graphic3d_TransformPers)& theTrsfPers) { - return connect (theAnotherObj, theLocation, theTrsfPers); + return connect(theAnotherObj, theLocation, theTrsfPers); } - virtual AIS_KindOfInteractive Type() const Standard_OVERRIDE { return AIS_KindOfInteractive_Object; } + virtual AIS_KindOfInteractive Type() const Standard_OVERRIDE + { + return AIS_KindOfInteractive_Object; + } virtual Standard_Integer Signature() const Standard_OVERRIDE { return 1; } - + //! Returns true if the object is connected to others. Standard_EXPORT Standard_Boolean HasConnection() const; - + //! Removes the connection with theInteractive. - Standard_EXPORT void Disconnect (const Handle(AIS_InteractiveObject)& theInteractive); - + Standard_EXPORT void Disconnect(const Handle(AIS_InteractiveObject)& theInteractive); + //! Clears all the connections to objects. Standard_EXPORT void DisconnectAll(); - + //! Informs the graphic context that the interactive Object //! may be decomposed into sub-shapes for dynamic selection. Standard_EXPORT virtual Standard_Boolean AcceptShapeDecomposition() const Standard_OVERRIDE; //! Returns common entity owner if the object is an assembly - virtual const Handle(SelectMgr_EntityOwner)& GetAssemblyOwner() const Standard_OVERRIDE { return myAssemblyOwner; } + virtual const Handle(SelectMgr_EntityOwner)& GetAssemblyOwner() const Standard_OVERRIDE + { + return myAssemblyOwner; + } //! Returns the owner of mode for selection of object as a whole - virtual Handle(SelectMgr_EntityOwner) GlobalSelOwner() const Standard_OVERRIDE { return myAssemblyOwner; } + virtual Handle(SelectMgr_EntityOwner) GlobalSelOwner() const Standard_OVERRIDE + { + return myAssemblyOwner; + } //! Assigns interactive context. - Standard_EXPORT virtual void SetContext (const Handle(AIS_InteractiveContext)& theCtx) Standard_OVERRIDE; + Standard_EXPORT virtual void SetContext(const Handle(AIS_InteractiveContext)& theCtx) + Standard_OVERRIDE; public: // short aliases to Connect() method - - //! Establishes the connection between the Connected Interactive Object, theInteractive, and its reference. - //! Copies local transformation and transformation persistence mode from theInteractive. + //! Establishes the connection between the Connected Interactive Object, theInteractive, and its + //! reference. Copies local transformation and transformation persistence mode from + //! theInteractive. //! @return created instance object (AIS_ConnectedInteractive or AIS_MultipleConnectedInteractive) - Handle(AIS_InteractiveObject) Connect (const Handle(AIS_InteractiveObject)& theAnotherObj) + Handle(AIS_InteractiveObject) Connect(const Handle(AIS_InteractiveObject)& theAnotherObj) { - return connect (theAnotherObj, theAnotherObj->LocalTransformationGeom(), theAnotherObj->TransformPersistence()); + return connect(theAnotherObj, + theAnotherObj->LocalTransformationGeom(), + theAnotherObj->TransformPersistence()); } - //! Establishes the connection between the Connected Interactive Object, theInteractive, and its reference. - //! Locates instance in theLocation and copies transformation persistence mode from theInteractive. + //! Establishes the connection between the Connected Interactive Object, theInteractive, and its + //! reference. Locates instance in theLocation and copies transformation persistence mode from + //! theInteractive. //! @return created instance object (AIS_ConnectedInteractive or AIS_MultipleConnectedInteractive) - Handle(AIS_InteractiveObject) Connect (const Handle(AIS_InteractiveObject)& theAnotherObj, - const gp_Trsf& theLocation) + Handle(AIS_InteractiveObject) Connect(const Handle(AIS_InteractiveObject)& theAnotherObj, + const gp_Trsf& theLocation) { - return connect (theAnotherObj, new TopLoc_Datum3D (theLocation), theAnotherObj->TransformPersistence()); + return connect(theAnotherObj, + new TopLoc_Datum3D(theLocation), + theAnotherObj->TransformPersistence()); } - //! Establishes the connection between the Connected Interactive Object, theInteractive, and its reference. - //! Locates instance in theLocation and applies specified transformation persistence mode. + //! Establishes the connection between the Connected Interactive Object, theInteractive, and its + //! reference. Locates instance in theLocation and applies specified transformation persistence + //! mode. //! @return created instance object (AIS_ConnectedInteractive or AIS_MultipleConnectedInteractive) - Handle(AIS_InteractiveObject) Connect (const Handle(AIS_InteractiveObject)& theAnotherObj, - const gp_Trsf& theLocation, - const Handle(Graphic3d_TransformPers)& theTrsfPers) + Handle(AIS_InteractiveObject) Connect(const Handle(AIS_InteractiveObject)& theAnotherObj, + const gp_Trsf& theLocation, + const Handle(Graphic3d_TransformPers)& theTrsfPers) { - return connect (theAnotherObj, new TopLoc_Datum3D (theLocation), theTrsfPers); + return connect(theAnotherObj, new TopLoc_Datum3D(theLocation), theTrsfPers); } protected: - //! this method is redefined virtual; //! when the instance is connected to another //! InteractiveObject,this method doesn't //! compute anything, but just uses the //! presentation of this last object, with //! a transformation if there's one stored. - Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr, - const Handle(Prs3d_Presentation)& thePrs, - const Standard_Integer theMode) Standard_OVERRIDE; + Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager)& thePrsMgr, + const Handle(Prs3d_Presentation)& thePrs, + const Standard_Integer theMode) Standard_OVERRIDE; - //! Establishes the connection between the Connected Interactive Object, theInteractive, and its reference. - //! Locates instance in theLocation and applies specified transformation persistence mode. + //! Establishes the connection between the Connected Interactive Object, theInteractive, and its + //! reference. Locates instance in theLocation and applies specified transformation persistence + //! mode. //! @return created instance object (AIS_ConnectedInteractive or AIS_MultipleConnectedInteractive) - Standard_EXPORT virtual Handle(AIS_InteractiveObject) connect (const Handle(AIS_InteractiveObject)& theInteractive, - const Handle(TopLoc_Datum3D)& theLocation, - const Handle(Graphic3d_TransformPers)& theTrsfPers); + Standard_EXPORT virtual Handle(AIS_InteractiveObject) connect( + const Handle(AIS_InteractiveObject)& theInteractive, + const Handle(TopLoc_Datum3D)& theLocation, + const Handle(Graphic3d_TransformPers)& theTrsfPers); private: - //! Computes the selection for whole subtree in scene hierarchy. - Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, const Standard_Integer aMode) Standard_OVERRIDE; + Standard_EXPORT virtual void ComputeSelection(const Handle(SelectMgr_Selection)& aSelection, + const Standard_Integer aMode) Standard_OVERRIDE; protected: - Handle(SelectMgr_EntityOwner) myAssemblyOwner; - }; DEFINE_STANDARD_HANDLE(AIS_MultipleConnectedInteractive, AIS_InteractiveObject) diff --git a/opencascade/AIS_Plane.hxx b/opencascade/AIS_Plane.hxx index cf973058f..d1f512159 100644 --- a/opencascade/AIS_Plane.hxx +++ b/opencascade/AIS_Plane.hxx @@ -31,42 +31,50 @@ class AIS_Plane : public AIS_InteractiveObject { DEFINE_STANDARD_RTTIEXT(AIS_Plane, AIS_InteractiveObject) public: - //! initializes the plane aComponent. If //! the mode aCurrentMode equals true, the drawing //! tool, "Drawer" is not initialized. - Standard_EXPORT AIS_Plane(const Handle(Geom_Plane)& aComponent, const Standard_Boolean aCurrentMode = Standard_False); - + Standard_EXPORT AIS_Plane(const Handle(Geom_Plane)& aComponent, + const Standard_Boolean aCurrentMode = Standard_False); + //! initializes the plane aComponent and //! the point aCenter. If the mode aCurrentMode //! equals true, the drawing tool, "Drawer" is not //! initialized. aCurrentMode equals true, the drawing //! tool, "Drawer" is not initialized. - Standard_EXPORT AIS_Plane(const Handle(Geom_Plane)& aComponent, const gp_Pnt& aCenter, const Standard_Boolean aCurrentMode = Standard_False); - + Standard_EXPORT AIS_Plane(const Handle(Geom_Plane)& aComponent, + const gp_Pnt& aCenter, + const Standard_Boolean aCurrentMode = Standard_False); + //! initializes the plane aComponent, the //! point aCenter, and the minimum and maximum //! points, aPmin and aPmax. If the mode //! aCurrentMode equals true, the drawing tool, "Drawer" is not initialized. - Standard_EXPORT AIS_Plane(const Handle(Geom_Plane)& aComponent, const gp_Pnt& aCenter, const gp_Pnt& aPmin, const gp_Pnt& aPmax, const Standard_Boolean aCurrentMode = Standard_False); - - Standard_EXPORT AIS_Plane(const Handle(Geom_Axis2Placement)& aComponent, const AIS_TypeOfPlane aPlaneType, const Standard_Boolean aCurrentMode = Standard_False); - + Standard_EXPORT AIS_Plane(const Handle(Geom_Plane)& aComponent, + const gp_Pnt& aCenter, + const gp_Pnt& aPmin, + const gp_Pnt& aPmax, + const Standard_Boolean aCurrentMode = Standard_False); + + Standard_EXPORT AIS_Plane(const Handle(Geom_Axis2Placement)& aComponent, + const AIS_TypeOfPlane aPlaneType, + const Standard_Boolean aCurrentMode = Standard_False); + //! Same value for x and y directions - Standard_EXPORT void SetSize (const Standard_Real aValue); - + Standard_EXPORT void SetSize(const Standard_Real aValue); + //! Sets the size defined by the length along the X axis //! XVal and the length along the Y axis YVal. - Standard_EXPORT void SetSize (const Standard_Real Xval, const Standard_Real YVal); - + Standard_EXPORT void SetSize(const Standard_Real Xval, const Standard_Real YVal); + Standard_EXPORT void UnsetSize(); - - Standard_EXPORT Standard_Boolean Size (Standard_Real& X, Standard_Real& Y) const; + + Standard_EXPORT Standard_Boolean Size(Standard_Real& X, Standard_Real& Y) const; Standard_Boolean HasOwnSize() const { return myHasOwnSize; } //! Sets transform persistence for zoom with value of minimum size - Standard_EXPORT void SetMinimumSize (const Standard_Real theValue); + Standard_EXPORT void SetMinimumSize(const Standard_Real theValue); //! Unsets transform persistence zoom Standard_EXPORT void UnsetMinimumSize(); @@ -76,29 +84,38 @@ public: virtual Standard_Integer Signature() const Standard_OVERRIDE { return 7; } - virtual AIS_KindOfInteractive Type() const Standard_OVERRIDE { return AIS_KindOfInteractive_Datum; } - + virtual AIS_KindOfInteractive Type() const Standard_OVERRIDE + { + return AIS_KindOfInteractive_Datum; + } + //! Returns the component specified in SetComponent. const Handle(Geom_Plane)& Component() { return myComponent; } //! Creates an instance of the plane aComponent. - Standard_EXPORT void SetComponent (const Handle(Geom_Plane)& aComponent); - + Standard_EXPORT void SetComponent(const Handle(Geom_Plane)& aComponent); + //! Returns the settings for the selected plane //! aComponent, provided in SetPlaneAttributes. //! These include the points aCenter, aPmin, and aPmax - Standard_EXPORT Standard_Boolean PlaneAttributes (Handle(Geom_Plane)& aComponent, gp_Pnt& aCenter, gp_Pnt& aPmin, gp_Pnt& aPmax); - + Standard_EXPORT Standard_Boolean PlaneAttributes(Handle(Geom_Plane)& aComponent, + gp_Pnt& aCenter, + gp_Pnt& aPmin, + gp_Pnt& aPmax); + //! Allows you to provide settings other than default ones //! for the selected plane. These include: center point //! aCenter, maximum aPmax and minimum aPmin. - Standard_EXPORT void SetPlaneAttributes (const Handle(Geom_Plane)& aComponent, const gp_Pnt& aCenter, const gp_Pnt& aPmin, const gp_Pnt& aPmax); + Standard_EXPORT void SetPlaneAttributes(const Handle(Geom_Plane)& aComponent, + const gp_Pnt& aCenter, + const gp_Pnt& aPmin, + const gp_Pnt& aPmax); //! Returns the coordinates of the center point. const gp_Pnt& Center() const { return myCenter; } //! Provides settings for the center theCenter other than (0, 0, 0). - void SetCenter (const gp_Pnt& theCenter) { myCenter = theCenter; } + void SetCenter(const gp_Pnt& theCenter) { myCenter = theCenter; } //! Allows you to provide settings for the position and //! direction of one of the plane's axes, aComponent, in @@ -108,13 +125,14 @@ public: //! - AIS_ TOPL_XYPlane //! - AIS_ TOPL_XZPlane //! - AIS_ TOPL_YZPlane}. - Standard_EXPORT void SetAxis2Placement (const Handle(Geom_Axis2Placement)& aComponent, const AIS_TypeOfPlane aPlaneType); - + Standard_EXPORT void SetAxis2Placement(const Handle(Geom_Axis2Placement)& aComponent, + const AIS_TypeOfPlane aPlaneType); + //! Returns the position of the plane's axis2 system //! identifying the x, y, or z axis and giving the plane a //! direction in 3D space. An axis2 system is a right-handed coordinate system. Standard_EXPORT Handle(Geom_Axis2Placement) Axis2Placement(); - + //! Returns the type of plane - xy, yz, xz or unknown. AIS_TypeOfPlane TypeOfPlane() { return myTypeOfPlane; } @@ -126,31 +144,36 @@ public: //! Allows you to provide settings for a non-default //! current display mode. - void SetCurrentMode (const Standard_Boolean theCurrentMode) { myCurrentMode = theCurrentMode; } + void SetCurrentMode(const Standard_Boolean theCurrentMode) { myCurrentMode = theCurrentMode; } //! Returns true if the display mode selected, aMode, is valid for planes. - Standard_EXPORT virtual Standard_Boolean AcceptDisplayMode (const Standard_Integer aMode) const Standard_OVERRIDE; - + Standard_EXPORT virtual Standard_Boolean AcceptDisplayMode(const Standard_Integer aMode) const + Standard_OVERRIDE; + //! connection to default drawer implies a recomputation of Frame values. - Standard_EXPORT virtual void SetContext (const Handle(AIS_InteractiveContext)& aCtx) Standard_OVERRIDE; + Standard_EXPORT virtual void SetContext(const Handle(AIS_InteractiveContext)& aCtx) + Standard_OVERRIDE; //! Returns the type of sensitivity for the plane; Select3D_TypeOfSensitivity TypeOfSensitivity() const { return myTypeOfSensitivity; } //! Sets the type of sensitivity for the plane. - void SetTypeOfSensitivity (Select3D_TypeOfSensitivity theTypeOfSensitivity) { myTypeOfSensitivity = theTypeOfSensitivity; } + void SetTypeOfSensitivity(Select3D_TypeOfSensitivity theTypeOfSensitivity) + { + myTypeOfSensitivity = theTypeOfSensitivity; + } - Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSelection, const Standard_Integer theMode) Standard_OVERRIDE; + Standard_EXPORT virtual void ComputeSelection(const Handle(SelectMgr_Selection)& theSelection, + const Standard_Integer theMode) Standard_OVERRIDE; - Standard_EXPORT void SetColor (const Quantity_Color& aColor) Standard_OVERRIDE; + Standard_EXPORT void SetColor(const Quantity_Color& aColor) Standard_OVERRIDE; Standard_EXPORT void UnsetColor() Standard_OVERRIDE; private: - - Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr, - const Handle(Prs3d_Presentation)& thePrs, - const Standard_Integer theMode) Standard_OVERRIDE; + Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager)& thePrsMgr, + const Handle(Prs3d_Presentation)& thePrs, + const Standard_Integer theMode) Standard_OVERRIDE; Standard_EXPORT void ComputeFrame(); @@ -159,19 +182,17 @@ private: Standard_EXPORT void InitDrawerAttributes(); private: - - Handle(Geom_Plane) myComponent; + Handle(Geom_Plane) myComponent; Handle(Geom_Axis2Placement) myAx2; - gp_Pnt myCenter; - gp_Pnt myPmin; - gp_Pnt myPmax; - Standard_Boolean myCurrentMode; - Standard_Boolean myAutomaticPosition; - AIS_TypeOfPlane myTypeOfPlane; - Standard_Boolean myIsXYZPlane; - Standard_Boolean myHasOwnSize; - Select3D_TypeOfSensitivity myTypeOfSensitivity; - + gp_Pnt myCenter; + gp_Pnt myPmin; + gp_Pnt myPmax; + Standard_Boolean myCurrentMode; + Standard_Boolean myAutomaticPosition; + AIS_TypeOfPlane myTypeOfPlane; + Standard_Boolean myIsXYZPlane; + Standard_Boolean myHasOwnSize; + Select3D_TypeOfSensitivity myTypeOfSensitivity; }; DEFINE_STANDARD_HANDLE(AIS_Plane, AIS_InteractiveObject) diff --git a/opencascade/AIS_PlaneTrihedron.hxx b/opencascade/AIS_PlaneTrihedron.hxx index 7ae1f34e4..39f445d3b 100644 --- a/opencascade/AIS_PlaneTrihedron.hxx +++ b/opencascade/AIS_PlaneTrihedron.hxx @@ -45,65 +45,64 @@ class AIS_PlaneTrihedron : public AIS_InteractiveObject { DEFINE_STANDARD_RTTIEXT(AIS_PlaneTrihedron, AIS_InteractiveObject) public: - //! Initializes the plane aPlane. The plane trihedron is //! constructed from this and an axis. Standard_EXPORT AIS_PlaneTrihedron(const Handle(Geom_Plane)& aPlane); - + //! Returns the component specified in SetComponent. Standard_EXPORT Handle(Geom_Plane) Component(); - + //! Creates an instance of the component object aPlane. - Standard_EXPORT void SetComponent (const Handle(Geom_Plane)& aPlane); - + Standard_EXPORT void SetComponent(const Handle(Geom_Plane)& aPlane); + //! Returns the "XAxis". Standard_EXPORT Handle(AIS_Line) XAxis() const; - + //! Returns the "YAxis". Standard_EXPORT Handle(AIS_Line) YAxis() const; - + //! Returns the point of origin of the plane trihedron. Standard_EXPORT Handle(AIS_Point) Position() const; - + //! Sets the length of the X and Y axes. - Standard_EXPORT void SetLength (const Standard_Real theLength); - + Standard_EXPORT void SetLength(const Standard_Real theLength); + //! Returns the length of X and Y axes. Standard_EXPORT Standard_Real GetLength() const; - + //! Returns true if the display mode selected, aMode, is valid. - Standard_EXPORT Standard_Boolean AcceptDisplayMode (const Standard_Integer aMode) const Standard_OVERRIDE; + Standard_EXPORT Standard_Boolean + AcceptDisplayMode(const Standard_Integer aMode) const Standard_OVERRIDE; virtual Standard_Integer Signature() const Standard_OVERRIDE { return 4; } //! Returns datum as the type of Interactive Object. - virtual AIS_KindOfInteractive Type() const Standard_OVERRIDE { return AIS_KindOfInteractive_Datum; } + virtual AIS_KindOfInteractive Type() const Standard_OVERRIDE + { + return AIS_KindOfInteractive_Datum; + } //! Allows you to provide settings for the color aColor. - Standard_EXPORT virtual void SetColor (const Quantity_Color& theColor) Standard_OVERRIDE; + Standard_EXPORT virtual void SetColor(const Quantity_Color& theColor) Standard_OVERRIDE; - void SetXLabel (const TCollection_AsciiString& theLabel) { myXLabel = theLabel; } + void SetXLabel(const TCollection_AsciiString& theLabel) { myXLabel = theLabel; } - void SetYLabel (const TCollection_AsciiString& theLabel) { myYLabel = theLabel; } + void SetYLabel(const TCollection_AsciiString& theLabel) { myYLabel = theLabel; } protected: - - Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager)& theprsMgr, - const Handle(Prs3d_Presentation)& thePrs, - const Standard_Integer theMode) Standard_OVERRIDE; + Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager)& theprsMgr, + const Handle(Prs3d_Presentation)& thePrs, + const Standard_Integer theMode) Standard_OVERRIDE; private: - - Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSel, - const Standard_Integer theMode) Standard_OVERRIDE; + Standard_EXPORT virtual void ComputeSelection(const Handle(SelectMgr_Selection)& theSel, + const Standard_Integer theMode) Standard_OVERRIDE; private: - - Handle(Geom_Plane) myPlane; + Handle(Geom_Plane) myPlane; Handle(AIS_InteractiveObject) myShapes[3]; - TCollection_AsciiString myXLabel; - TCollection_AsciiString myYLabel; - + TCollection_AsciiString myXLabel; + TCollection_AsciiString myYLabel; }; DEFINE_STANDARD_HANDLE(AIS_PlaneTrihedron, AIS_InteractiveObject) diff --git a/opencascade/AIS_Point.hxx b/opencascade/AIS_Point.hxx index 4ffa79e7a..ae8187315 100644 --- a/opencascade/AIS_Point.hxx +++ b/opencascade/AIS_Point.hxx @@ -28,41 +28,44 @@ class AIS_Point : public AIS_InteractiveObject { DEFINE_STANDARD_RTTIEXT(AIS_Point, AIS_InteractiveObject) public: - //! Initializes the point aComponent from which the point //! datum will be built. Standard_EXPORT AIS_Point(const Handle(Geom_Point)& aComponent); - + //! Returns index 1, the default index for a point. virtual Standard_Integer Signature() const Standard_OVERRIDE { return 1; } //! Indicates that a point is a datum. - virtual AIS_KindOfInteractive Type() const Standard_OVERRIDE { return AIS_KindOfInteractive_Datum; } + virtual AIS_KindOfInteractive Type() const Standard_OVERRIDE + { + return AIS_KindOfInteractive_Datum; + } //! Returns the component specified in SetComponent. Standard_EXPORT Handle(Geom_Point) Component(); - + //! Constructs an instance of the point aComponent. - Standard_EXPORT void SetComponent (const Handle(Geom_Point)& aComponent); - + Standard_EXPORT void SetComponent(const Handle(Geom_Point)& aComponent); + //! Returns true if the display mode selected is valid for point datums. - Standard_EXPORT Standard_Boolean AcceptDisplayMode (const Standard_Integer aMode) const Standard_OVERRIDE; + Standard_EXPORT Standard_Boolean + AcceptDisplayMode(const Standard_Integer aMode) const Standard_OVERRIDE; //! Allows you to provide settings for the Color. - Standard_EXPORT virtual void SetColor (const Quantity_Color& theColor) Standard_OVERRIDE; + Standard_EXPORT virtual void SetColor(const Quantity_Color& theColor) Standard_OVERRIDE; //! Allows you to remove color settings. Standard_EXPORT virtual void UnsetColor() Standard_OVERRIDE; - + //! Allows you to provide settings for a marker. These include //! - type of marker, //! - marker color, //! - scale factor. - Standard_EXPORT void SetMarker (const Aspect_TypeOfMarker aType); - + Standard_EXPORT void SetMarker(const Aspect_TypeOfMarker aType); + //! Removes the marker settings. Standard_EXPORT void UnsetMarker(); - + //! Returns true if the point datum has a marker. Standard_Boolean HasMarker() const { return myHasTOM; } @@ -70,26 +73,23 @@ public: Standard_EXPORT TopoDS_Vertex Vertex() const; protected: - - Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr, - const Handle(Prs3d_Presentation)& thePrs, - const Standard_Integer theMode) Standard_OVERRIDE; + Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager)& thePrsMgr, + const Handle(Prs3d_Presentation)& thePrs, + const Standard_Integer theMode) Standard_OVERRIDE; private: - - Standard_EXPORT void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, const Standard_Integer aMode) Standard_OVERRIDE; + Standard_EXPORT void ComputeSelection(const Handle(SelectMgr_Selection)& aSelection, + const Standard_Integer aMode) Standard_OVERRIDE; Standard_EXPORT void UpdatePointValues(); //! Replace aspects of already computed groups with the new value. - void replaceWithNewPointAspect (const Handle(Prs3d_PointAspect)& theAspect); + void replaceWithNewPointAspect(const Handle(Prs3d_PointAspect)& theAspect); private: - - Handle(Geom_Point) myComponent; - Standard_Boolean myHasTOM; + Handle(Geom_Point) myComponent; + Standard_Boolean myHasTOM; Aspect_TypeOfMarker myTOM; - }; DEFINE_STANDARD_HANDLE(AIS_Point, AIS_InteractiveObject) diff --git a/opencascade/AIS_PointCloud.hxx b/opencascade/AIS_PointCloud.hxx index 1efd2bc08..a56f810c9 100644 --- a/opencascade/AIS_PointCloud.hxx +++ b/opencascade/AIS_PointCloud.hxx @@ -42,7 +42,6 @@ class AIS_PointCloud : public AIS_InteractiveObject { DEFINE_STANDARD_RTTIEXT(AIS_PointCloud, AIS_InteractiveObject) public: - //! Display modes supported by this Point Cloud object enum DisplayMode { @@ -59,30 +58,29 @@ public: }; public: - //! Constructor. Standard_EXPORT AIS_PointCloud(); //! Sets the points from array of points. //! Method will not copy the input data - array will be stored as handle. - //! @param thePoints [in] the array of points - Standard_EXPORT virtual void SetPoints (const Handle(Graphic3d_ArrayOfPoints)& thePoints); + //! @param[in] thePoints the array of points + Standard_EXPORT virtual void SetPoints(const Handle(Graphic3d_ArrayOfPoints)& thePoints); //! Sets the points with optional colors. //! The input data will be copied into internal buffer. //! The input arrays should have equal length, otherwise //! the presentation will not be computed and displayed. - //! @param theCoords [in] the array of coordinates - //! @param theColors [in] optional array of colors - //! @param theNormals [in] optional array of normals - Standard_EXPORT virtual void SetPoints (const Handle(TColgp_HArray1OfPnt)& theCoords, - const Handle(Quantity_HArray1OfColor)& theColors = NULL, - const Handle(TColgp_HArray1OfDir)& theNormals = NULL); + //! @param[in] theCoords the array of coordinates + //! @param[in] theColors optional array of colors + //! @param[in] theNormals optional array of normals + Standard_EXPORT virtual void SetPoints(const Handle(TColgp_HArray1OfPnt)& theCoords, + const Handle(Quantity_HArray1OfColor)& theColors = NULL, + const Handle(TColgp_HArray1OfDir)& theNormals = NULL); public: - //! Get the points array. - //! Method might be overridden to fill in points array dynamically from application data structures. + //! Method might be overridden to fill in points array dynamically from application data + //! structures. //! @return the array of points Standard_EXPORT virtual const Handle(Graphic3d_ArrayOfPoints) GetPoints() const; @@ -90,35 +88,33 @@ public: Standard_EXPORT virtual Bnd_Box GetBoundingBox() const; public: - - //! Setup custom color. Affects presentation only when no per-point color attribute has been assigned. - Standard_EXPORT virtual void SetColor (const Quantity_Color& theColor) Standard_OVERRIDE; + //! Setup custom color. Affects presentation only when no per-point color attribute has been + //! assigned. + Standard_EXPORT virtual void SetColor(const Quantity_Color& theColor) Standard_OVERRIDE; //! Restore default color. Standard_EXPORT virtual void UnsetColor() Standard_OVERRIDE; //! Setup custom material. Affects presentation only when normals are defined. - Standard_EXPORT virtual void SetMaterial (const Graphic3d_MaterialAspect& theMat) Standard_OVERRIDE; + Standard_EXPORT virtual void SetMaterial(const Graphic3d_MaterialAspect& theMat) + Standard_OVERRIDE; //! Restore default material. Standard_EXPORT virtual void UnsetMaterial() Standard_OVERRIDE; protected: - //! Prepare presentation for this object. - Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr, - const Handle(Prs3d_Presentation)& thePrs, - const Standard_Integer theMode) Standard_OVERRIDE; + Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager)& thePrsMgr, + const Handle(Prs3d_Presentation)& thePrs, + const Standard_Integer theMode) Standard_OVERRIDE; //! Prepare selection for this object. - Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSelection, - const Standard_Integer theMode) Standard_OVERRIDE; + Standard_EXPORT virtual void ComputeSelection(const Handle(SelectMgr_Selection)& theSelection, + const Standard_Integer theMode) Standard_OVERRIDE; private: - - Handle(Graphic3d_ArrayOfPoints) myPoints; //!< points array for presentation - Bnd_Box myBndBox; //!< bounding box for presentation - + Handle(Graphic3d_ArrayOfPoints) myPoints; //!< points array for presentation + Bnd_Box myBndBox; //!< bounding box for presentation }; DEFINE_STANDARD_HANDLE(AIS_PointCloud, AIS_InteractiveObject) @@ -129,32 +125,37 @@ class AIS_PointCloudOwner : public SelectMgr_EntityOwner DEFINE_STANDARD_RTTIEXT(AIS_PointCloudOwner, SelectMgr_EntityOwner) public: //! Main constructor. - Standard_EXPORT AIS_PointCloudOwner (const Handle(AIS_PointCloud)& theOrigin); + Standard_EXPORT AIS_PointCloudOwner(const Handle(AIS_PointCloud)& theOrigin); //! Destructor. Standard_EXPORT virtual ~AIS_PointCloudOwner(); //! Return selected points. - //! WARNING! Indexation starts with 0 (shifted by -1 comparing to Graphic3d_ArrayOfPoints::Vertice()). + //! WARNING! Indexation starts with 0 (shifted by -1 comparing to + //! Graphic3d_ArrayOfPoints::Vertice()). const Handle(TColStd_HPackedMapOfInteger)& SelectedPoints() const { return mySelPoints; } //! Return last detected points. - //! WARNING! Indexation starts with 0 (shifted by -1 comparing to Graphic3d_ArrayOfPoints::Vertice()). + //! WARNING! Indexation starts with 0 (shifted by -1 comparing to + //! Graphic3d_ArrayOfPoints::Vertice()). const Handle(TColStd_HPackedMapOfInteger)& DetectedPoints() const { return myDetPoints; } //! Always update dynamic highlighting. Standard_EXPORT virtual Standard_Boolean IsForcedHilight() const Standard_OVERRIDE; //! Handle dynamic highlighting. - Standard_EXPORT virtual void HilightWithColor (const Handle(PrsMgr_PresentationManager)& thePrsMgr, - const Handle(Prs3d_Drawer)& theStyle, - const Standard_Integer theMode) Standard_OVERRIDE; + Standard_EXPORT virtual void HilightWithColor(const Handle(PrsMgr_PresentationManager)& thePrsMgr, + const Handle(Prs3d_Drawer)& theStyle, + const Standard_Integer theMode) Standard_OVERRIDE; //! Removes highlighting. - Standard_EXPORT virtual void Unhilight (const Handle(PrsMgr_PresentationManager)& thePrsMgr, const Standard_Integer theMode) Standard_OVERRIDE; + Standard_EXPORT virtual void Unhilight(const Handle(PrsMgr_PresentationManager)& thePrsMgr, + const Standard_Integer theMode) Standard_OVERRIDE; //! Clears presentation. - Standard_EXPORT virtual void Clear (const Handle(PrsMgr_PresentationManager)& thePrsMgr, const Standard_Integer theMode) Standard_OVERRIDE; + Standard_EXPORT virtual void Clear(const Handle(PrsMgr_PresentationManager)& thePrsMgr, + const Standard_Integer theMode) Standard_OVERRIDE; + protected: Handle(TColStd_HPackedMapOfInteger) myDetPoints; //!< last detected points Handle(TColStd_HPackedMapOfInteger) mySelPoints; //!< selected points diff --git a/opencascade/AIS_RubberBand.hxx b/opencascade/AIS_RubberBand.hxx index a7a55dbda..1119b065a 100644 --- a/opencascade/AIS_RubberBand.hxx +++ b/opencascade/AIS_RubberBand.hxx @@ -33,46 +33,48 @@ DEFINE_STANDARD_HANDLE(AIS_RubberBand, AIS_InteractiveObject) class AIS_RubberBand : public AIS_InteractiveObject { public: - DEFINE_STANDARD_RTTIEXT(AIS_RubberBand, AIS_InteractiveObject) //! Constructs rubber band with default configuration: empty filling and white solid lines. //! @warning It binds this object with Graphic3d_ZLayerId_TopOSD layer. Standard_EXPORT AIS_RubberBand(); - //! Consructs the rubber band with empty filling and defined line style. - //! @param theLineColor [in] color of rubber band lines - //! @param theType [in] type of rubber band lines - //! @param theLineWidth [in] width of rubber band line. By default it is 1. + //! Constructs the rubber band with empty filling and defined line style. + //! @param[in] theLineColor color of rubber band lines + //! @param[in] theType type of rubber band lines + //! @param[in] theLineWidth width of rubber band line. By default it is 1. //! @warning It binds this object with Graphic3d_ZLayerId_TopOSD layer. - Standard_EXPORT AIS_RubberBand (const Quantity_Color& theLineColor, - const Aspect_TypeOfLine theType, - const Standard_Real theLineWidth = 1.0, - const Standard_Boolean theIsPolygonClosed = Standard_True); + Standard_EXPORT AIS_RubberBand(const Quantity_Color& theLineColor, + const Aspect_TypeOfLine theType, + const Standard_Real theLineWidth = 1.0, + const Standard_Boolean theIsPolygonClosed = Standard_True); //! Constructs the rubber band with defined filling and line parameters. - //! @param theLineColor [in] color of rubber band lines - //! @param theType [in] type of rubber band lines - //! @param theFillColor [in] color of rubber band filling - //! @param theTransparency [in] transparency of the filling. 0 is for opaque filling. By default it is transparent. - //! @param theLineWidth [in] width of rubber band line. By default it is 1. + //! @param[in] theLineColor color of rubber band lines + //! @param[in] theType type of rubber band lines + //! @param[in] theFillColor color of rubber band filling + //! @param[in] theTransparency transparency of the filling. 0 is for opaque filling. By default + //! it is transparent. + //! @param[in] theLineWidth width of rubber band line. By default it is 1. //! @warning It binds this object with Graphic3d_ZLayerId_TopOSD layer. - Standard_EXPORT AIS_RubberBand (const Quantity_Color& theLineColor, - const Aspect_TypeOfLine theType, - const Quantity_Color theFillColor, - const Standard_Real theTransparency = 1.0, - const Standard_Real theLineWidth = 1.0, - const Standard_Boolean theIsPolygonClosed = Standard_True); + Standard_EXPORT AIS_RubberBand(const Quantity_Color& theLineColor, + const Aspect_TypeOfLine theType, + const Quantity_Color theFillColor, + const Standard_Real theTransparency = 1.0, + const Standard_Real theLineWidth = 1.0, + const Standard_Boolean theIsPolygonClosed = Standard_True); Standard_EXPORT virtual ~AIS_RubberBand(); //! Sets rectangle bounds. - Standard_EXPORT void SetRectangle (const Standard_Integer theMinX, const Standard_Integer theMinY, - const Standard_Integer theMaxX, const Standard_Integer theMaxY); + Standard_EXPORT void SetRectangle(const Standard_Integer theMinX, + const Standard_Integer theMinY, + const Standard_Integer theMaxX, + const Standard_Integer theMaxY); //! Adds last point to the list of points. They are used to build polygon for rubber band. //! @sa RemoveLastPoint(), GetPoints() - Standard_EXPORT void AddPoint (const Graphic3d_Vec2i& thePoint); + Standard_EXPORT void AddPoint(const Graphic3d_Vec2i& thePoint); //! Remove last point from the list of points for the rubber band polygon. //! @sa AddPoint(), GetPoints() @@ -88,40 +90,41 @@ public: Standard_EXPORT Quantity_Color LineColor() const; //! Sets color of lines for rubber band presentation. - Standard_EXPORT void SetLineColor (const Quantity_Color& theColor); + Standard_EXPORT void SetLineColor(const Quantity_Color& theColor); //! @return the color of rubber band filling. Standard_EXPORT Quantity_Color FillColor() const; //! Sets color of rubber band filling. - Standard_EXPORT void SetFillColor (const Quantity_Color& theColor); + Standard_EXPORT void SetFillColor(const Quantity_Color& theColor); //! Sets width of line for rubber band presentation. - Standard_EXPORT void SetLineWidth (const Standard_Real theWidth) const; + Standard_EXPORT void SetLineWidth(const Standard_Real theWidth) const; //! @return width of lines. Standard_EXPORT Standard_Real LineWidth() const; //! Sets type of line for rubber band presentation. - Standard_EXPORT void SetLineType (const Aspect_TypeOfLine theType); + Standard_EXPORT void SetLineType(const Aspect_TypeOfLine theType); //! @return type of lines. Standard_EXPORT Aspect_TypeOfLine LineType() const; //! Sets fill transparency. - //! @param theValue [in] the transparency value. 1.0 is for transparent background - Standard_EXPORT void SetFillTransparency (const Standard_Real theValue) const; + //! @param[in] theValue the transparency value. 1.0 is for transparent background + Standard_EXPORT void SetFillTransparency(const Standard_Real theValue) const; //! @return fill transparency. Standard_EXPORT Standard_Real FillTransparency() const; //! Enable or disable filling of rubber band. - Standard_EXPORT void SetFilling (const Standard_Boolean theIsFilling); + Standard_EXPORT void SetFilling(const Standard_Boolean theIsFilling); //! Enable filling of rubber band with defined parameters. - //! @param theColor [in] color of filling - //! @param theTransparency [in] transparency of the filling. 0 is for opaque filling. - Standard_EXPORT void SetFilling (const Quantity_Color theColor, const Standard_Real theTransparency); + //! @param[in] theColor color of filling + //! @param[in] theTransparency transparency of the filling. 0 is for opaque filling. + Standard_EXPORT void SetFilling(const Quantity_Color theColor, + const Standard_Real theTransparency); //! @return true if filling of rubber band is enabled. Standard_EXPORT Standard_Boolean IsFilling() const; @@ -129,26 +132,25 @@ public: //! @return true if automatic closing of rubber band is enabled. Standard_EXPORT Standard_Boolean IsPolygonClosed() const; - //! Automatically create an additional line connecting the first and + //! Automatically create an additional line connecting the first and //! the last screen points to close the boundary polyline Standard_EXPORT void SetPolygonClosed(Standard_Boolean theIsPolygonClosed); protected: - //! Returns true if the interactive object accepts the display mode. - Standard_Boolean AcceptDisplayMode (const Standard_Integer theMode) const Standard_OVERRIDE + Standard_Boolean AcceptDisplayMode(const Standard_Integer theMode) const Standard_OVERRIDE { return theMode == 0; } //! Computes presentation of rubber band. - Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr, - const Handle(Prs3d_Presentation)& thePrs, - const Standard_Integer theMode) Standard_OVERRIDE; + Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager)& thePrsMgr, + const Handle(Prs3d_Presentation)& thePrs, + const Standard_Integer theMode) Standard_OVERRIDE; //! Does not fill selection primitives for rubber band. - virtual void ComputeSelection (const Handle(SelectMgr_Selection)& /*aSelection*/, - const Standard_Integer /*aMode*/) Standard_OVERRIDE { }; + virtual void ComputeSelection(const Handle(SelectMgr_Selection)& /*aSelection*/, + const Standard_Integer /*aMode*/) Standard_OVERRIDE {}; //! Fills triangles primitive array for rubber band filling. //! It uses Delaunay triangulation. @@ -156,12 +158,11 @@ protected: Standard_EXPORT Standard_Boolean fillTriangles(); protected: - NCollection_Sequence myPoints; //!< Array of screen points Handle(Graphic3d_ArrayOfTriangles) myTriangles; //!< Triangles for rubber band filling - Handle(Graphic3d_ArrayOfPolylines) myBorders; //!< Polylines for rubber band borders + Handle(Graphic3d_ArrayOfPolylines) myBorders; //!< Polylines for rubber band borders - Standard_Boolean myIsPolygonClosed; //!< automatic closing of rubber-band flag + Standard_Boolean myIsPolygonClosed; //!< automatic closing of rubber-band flag }; #endif diff --git a/opencascade/AIS_SelectStatus.hxx b/opencascade/AIS_SelectStatus.hxx index 085fdeabe..10efb6a3f 100644 --- a/opencascade/AIS_SelectStatus.hxx +++ b/opencascade/AIS_SelectStatus.hxx @@ -17,12 +17,11 @@ #ifndef _AIS_SelectStatus_HeaderFile #define _AIS_SelectStatus_HeaderFile - enum AIS_SelectStatus { -AIS_SS_Added, -AIS_SS_Removed, -AIS_SS_NotDone + AIS_SS_Added, + AIS_SS_Removed, + AIS_SS_NotDone }; #endif // _AIS_SelectStatus_HeaderFile diff --git a/opencascade/AIS_Selection.hxx b/opencascade/AIS_Selection.hxx index f95a94422..59f142b11 100644 --- a/opencascade/AIS_Selection.hxx +++ b/opencascade/AIS_Selection.hxx @@ -31,7 +31,6 @@ class AIS_Selection : public Standard_Transient { DEFINE_STANDARD_RTTIEXT(AIS_Selection, Standard_Transient) public: - //! creates a new selection. Standard_EXPORT AIS_Selection(); @@ -45,29 +44,33 @@ public: //! @param[in] theSelScheme selection scheme //! @param[in] theIsDetected flag of object detection //! @return result of selection - Standard_EXPORT virtual AIS_SelectStatus Select (const Handle(SelectMgr_EntityOwner)& theOwner, - const Handle(SelectMgr_Filter)& theFilter, - const AIS_SelectionScheme theSelScheme, - const Standard_Boolean theIsDetected); + Standard_EXPORT virtual AIS_SelectStatus Select(const Handle(SelectMgr_EntityOwner)& theOwner, + const Handle(SelectMgr_Filter)& theFilter, + const AIS_SelectionScheme theSelScheme, + const Standard_Boolean theIsDetected); //! the object is always add int the selection. //! faster when the number of objects selected is great. - Standard_EXPORT virtual AIS_SelectStatus AddSelect (const Handle(SelectMgr_EntityOwner)& theObject); + Standard_EXPORT virtual AIS_SelectStatus AddSelect( + const Handle(SelectMgr_EntityOwner)& theObject); //! clears the selection and adds the object in the selection. //! @param[in] theObject element to change selection state //! @param[in] theFilter context filter //! @param[in] theIsDetected flag of object detection - virtual void ClearAndSelect (const Handle(SelectMgr_EntityOwner)& theObject, - const Handle(SelectMgr_Filter)& theFilter, - const Standard_Boolean theIsDetected) + virtual void ClearAndSelect(const Handle(SelectMgr_EntityOwner)& theObject, + const Handle(SelectMgr_Filter)& theFilter, + const Standard_Boolean theIsDetected) { Clear(); - Select (theObject, theFilter, AIS_SelectionScheme_Add, theIsDetected); + Select(theObject, theFilter, AIS_SelectionScheme_Add, theIsDetected); } //! checks if the object is in the selection. - Standard_Boolean IsSelected (const Handle(SelectMgr_EntityOwner)& theObject) const { return myResultMap.IsBound (theObject); } + Standard_Boolean IsSelected(const Handle(SelectMgr_EntityOwner)& theObject) const + { + return myResultMap.IsBound(theObject); + } //! Return the list of selected objects. const AIS_NListOfEntityOwner& Objects() const { return myresult; } @@ -79,7 +82,6 @@ public: Standard_Boolean IsEmpty() const { return myresult.IsEmpty(); } public: - //! Start iteration through selected objects. void Init() { myIterator = AIS_NListOfEntityOwner::Iterator(myresult); } @@ -97,26 +99,24 @@ public: //! @param[in] theSelScheme selection scheme, defines how owner is selected //! @param[in] theToAllowSelOverlap selection flag, if true - overlapped entities are allowed //! @param[in] theFilter context filter to skip not acceptable owners - Standard_EXPORT virtual void SelectOwners (const AIS_NArray1OfEntityOwner& thePickedOwners, - const AIS_SelectionScheme theSelScheme, - const Standard_Boolean theToAllowSelOverlap, - const Handle(SelectMgr_Filter)& theFilter); + Standard_EXPORT virtual void SelectOwners(const AIS_NArray1OfEntityOwner& thePickedOwners, + const AIS_SelectionScheme theSelScheme, + const Standard_Boolean theToAllowSelOverlap, + const Handle(SelectMgr_Filter)& theFilter); protected: - //! Append the owner into the current selection if filter is Ok. - //! @param theOwner [in] element to change selection state - //! @param theFilter [in] context filter to skip not acceptable owners + //! @param[in] theOwner element to change selection state + //! @param[in] theFilter context filter to skip not acceptable owners //! @return result of selection - Standard_EXPORT virtual AIS_SelectStatus appendOwner (const Handle(SelectMgr_EntityOwner)& theOwner, - const Handle(SelectMgr_Filter)& theFilter); + Standard_EXPORT virtual AIS_SelectStatus appendOwner( + const Handle(SelectMgr_EntityOwner)& theOwner, + const Handle(SelectMgr_Filter)& theFilter); protected: - - AIS_NListOfEntityOwner myresult; - AIS_NListOfEntityOwner::Iterator myIterator; + AIS_NListOfEntityOwner myresult; + AIS_NListOfEntityOwner::Iterator myIterator; NCollection_DataMap myResultMap; - }; DEFINE_STANDARD_HANDLE(AIS_Selection, Standard_Transient) diff --git a/opencascade/AIS_SelectionModesConcurrency.hxx b/opencascade/AIS_SelectionModesConcurrency.hxx index aa1d9dc5b..974e4fefc 100644 --- a/opencascade/AIS_SelectionModesConcurrency.hxx +++ b/opencascade/AIS_SelectionModesConcurrency.hxx @@ -14,12 +14,17 @@ #ifndef _AIS_SelectionModesConcurrency_HeaderFile #define _AIS_SelectionModesConcurrency_HeaderFile -//! The mode specifying how multiple active Selection Modes should be treated during activation of new one. +//! The mode specifying how multiple active Selection Modes should be treated during activation of +//! new one. enum AIS_SelectionModesConcurrency { - AIS_SelectionModesConcurrency_Single, //!< only one selection mode can be activated at the same moment - previously activated should be deactivated - AIS_SelectionModesConcurrency_GlobalOrLocal, //!< either Global (AIS_InteractiveObject::GlobalSelectionMode() or Local (multiple) selection modes can be active at the same moment - AIS_SelectionModesConcurrency_Multiple, //!< any combination of selection modes can be activated + AIS_SelectionModesConcurrency_Single, //!< only one selection mode can be activated at the same + //!< moment - previously activated should be deactivated + AIS_SelectionModesConcurrency_GlobalOrLocal, //!< either Global + //!< (AIS_InteractiveObject::GlobalSelectionMode() or + //!< Local (multiple) selection modes can be active + //!< at the same moment + AIS_SelectionModesConcurrency_Multiple, //!< any combination of selection modes can be activated }; #endif // _AIS_SelectionModesConcurrency_HeaderFile diff --git a/opencascade/AIS_SelectionScheme.hxx b/opencascade/AIS_SelectionScheme.hxx index a5de1f3e0..3966c9546 100644 --- a/opencascade/AIS_SelectionScheme.hxx +++ b/opencascade/AIS_SelectionScheme.hxx @@ -21,10 +21,11 @@ enum AIS_SelectionScheme AIS_SelectionScheme_Replace = 0, //!< clears current selection and select detected objects AIS_SelectionScheme_Add, //!< adds detected object to current selection AIS_SelectionScheme_Remove, //!< removes detected object from the current selection - AIS_SelectionScheme_XOR, //!< performs XOR for detected objects, other selected not touched - AIS_SelectionScheme_Clear, //!< clears current selection - AIS_SelectionScheme_ReplaceExtra, //!< replace with one difference: if result of replace is an empty, - //!< and current selection contains detected element, it will be selected + AIS_SelectionScheme_XOR, //!< performs XOR for detected objects, other selected not touched + AIS_SelectionScheme_Clear, //!< clears current selection + AIS_SelectionScheme_ReplaceExtra, //!< replace with one difference: if result of replace is an + //!< empty, and current selection contains detected element, it + //!< will be selected }; #endif // _AIS_SelectionScheme_HeaderFile diff --git a/opencascade/AIS_Shape.hxx b/opencascade/AIS_Shape.hxx index 9c9afc1c4..4797532de 100644 --- a/opencascade/AIS_Shape.hxx +++ b/opencascade/AIS_Shape.hxx @@ -47,21 +47,22 @@ //! true indicating that there is a local setting available //! for the specific object. //! -//! This class allows to map textures on shapes using native UV parametric space of underlying surface of each Face -//! (this means that texture will be visually duplicated on all Faces). -//! To generate texture coordinates, appropriate shading attribute should be set before computing presentation in AIS_Shaded display mode: +//! This class allows to map textures on shapes using native UV parametric space of underlying +//! surface of each Face (this means that texture will be visually duplicated on all Faces). To +//! generate texture coordinates, appropriate shading attribute should be set before computing +//! presentation in AIS_Shaded display mode: //! @code //! Handle(AIS_Shape) aPrs = new AIS_Shape(); //! aPrs->Attributes()->SetupOwnShadingAspect(); //! aPrs->Attributes()->ShadingAspect()->Aspect()->SetTextureMapOn(); -//! aPrs->Attributes()->ShadingAspect()->Aspect()->SetTextureMap (new Graphic3d_Texture2Dmanual (Graphic3d_NOT_2D_ALUMINUM)); +//! aPrs->Attributes()->ShadingAspect()->Aspect()->SetTextureMap (new Graphic3d_Texture2Dmanual +//! (Graphic3d_NOT_2D_ALUMINUM)); //! @endcode //! The texture itself is parametrized in (0,1)x(0,1). class AIS_Shape : public AIS_InteractiveObject { DEFINE_STANDARD_RTTIEXT(AIS_Shape, AIS_InteractiveObject) public: - //! Initializes construction of the shape shap from wires, //! edges and vertices. Standard_EXPORT AIS_Shape(const TopoDS_Shape& shap); @@ -70,59 +71,70 @@ public: virtual Standard_Integer Signature() const Standard_OVERRIDE { return 0; } //! Returns Object as the type of Interactive Object. - virtual AIS_KindOfInteractive Type() const Standard_OVERRIDE { return AIS_KindOfInteractive_Shape; } + virtual AIS_KindOfInteractive Type() const Standard_OVERRIDE + { + return AIS_KindOfInteractive_Shape; + } //! Returns true if the Interactive Object accepts shape decomposition. - virtual Standard_Boolean AcceptShapeDecomposition() const Standard_OVERRIDE { return Standard_True; } + virtual Standard_Boolean AcceptShapeDecomposition() const Standard_OVERRIDE + { + return Standard_True; + } //! Return true if specified display mode is supported. - virtual Standard_Boolean AcceptDisplayMode (const Standard_Integer theMode) const Standard_OVERRIDE { return theMode >= 0 && theMode <= 2; } + virtual Standard_Boolean AcceptDisplayMode(const Standard_Integer theMode) const Standard_OVERRIDE + { + return theMode >= 0 && theMode <= 2; + } //! Returns this shape object. const TopoDS_Shape& Shape() const { return myshape; } //! Constructs an instance of the shape object theShape. - void SetShape (const TopoDS_Shape& theShape) + void SetShape(const TopoDS_Shape& theShape) { myshape = theShape; myCompBB = Standard_True; } //! Alias for ::SetShape(). - void Set (const TopoDS_Shape& theShape) { SetShape (theShape); } + void Set(const TopoDS_Shape& theShape) { SetShape(theShape); } //! Sets a local value for deviation coefficient for this specific shape. Standard_EXPORT Standard_Boolean SetOwnDeviationCoefficient(); //! Sets a local value for deviation angle for this specific shape. Standard_EXPORT Standard_Boolean SetOwnDeviationAngle(); - + //! Sets a local value for deviation coefficient for this specific shape. - Standard_EXPORT void SetOwnDeviationCoefficient (const Standard_Real aCoefficient); + Standard_EXPORT void SetOwnDeviationCoefficient(const Standard_Real aCoefficient); //! this compute a new angle and Deviation from the value anAngle //! and set the values stored in myDrawer with these that become local to the shape - Standard_EXPORT void SetAngleAndDeviation (const Standard_Real anAngle); - + Standard_EXPORT void SetAngleAndDeviation(const Standard_Real anAngle); + //! gives back the angle initial value put by the User. Standard_EXPORT Standard_Real UserAngle() const; - + //! sets myOwnDeviationAngle field in Prs3d_Drawer & recomputes presentation - Standard_EXPORT void SetOwnDeviationAngle (const Standard_Real anAngle); - + Standard_EXPORT void SetOwnDeviationAngle(const Standard_Real anAngle); + //! Returns true and the values of the deviation //! coefficient aCoefficient and the previous deviation //! coefficient aPreviousCoefficient. If these values are //! not already set, false is returned. - Standard_EXPORT Standard_Boolean OwnDeviationCoefficient (Standard_Real& aCoefficient, Standard_Real& aPreviousCoefficient) const; - + Standard_EXPORT Standard_Boolean + OwnDeviationCoefficient(Standard_Real& aCoefficient, Standard_Real& aPreviousCoefficient) const; + //! Returns true and the values of the deviation angle //! anAngle and the previous deviation angle aPreviousAngle. //! If these values are not already set, false is returned. - Standard_EXPORT Standard_Boolean OwnDeviationAngle (Standard_Real& anAngle, Standard_Real& aPreviousAngle) const; - + Standard_EXPORT Standard_Boolean OwnDeviationAngle(Standard_Real& anAngle, + Standard_Real& aPreviousAngle) const; + //! Sets the type of HLR algorithm used by the shape - void SetTypeOfHLR (const Prs3d_TypeOfHLR theTypeOfHLR) { myDrawer->SetTypeOfHLR (theTypeOfHLR); } + void SetTypeOfHLR(const Prs3d_TypeOfHLR theTypeOfHLR) { myDrawer->SetTypeOfHLR(theTypeOfHLR); } //! Gets the type of HLR algorithm Prs3d_TypeOfHLR TypeOfHLR() const { return myDrawer->TypeOfHLR(); } @@ -140,102 +152,120 @@ public: //! Prs3d_Drawer_SeenLineAspect //! - hidden line color in hidden line mode: //! Prs3d_Drawer_HiddenLineAspect. - Standard_EXPORT virtual void SetColor (const Quantity_Color& theColor) Standard_OVERRIDE; + Standard_EXPORT virtual void SetColor(const Quantity_Color& theColor) Standard_OVERRIDE; //! Removes settings for color in the reconstructed compound shape. Standard_EXPORT virtual void UnsetColor() Standard_OVERRIDE; - + //! Sets the value aValue for line width in the reconstructed compound shape. //! Changes line aspects for lines presentation. - Standard_EXPORT virtual void SetWidth (const Standard_Real aValue) Standard_OVERRIDE; - + Standard_EXPORT virtual void SetWidth(const Standard_Real aValue) Standard_OVERRIDE; + //! Removes the setting for line width in the reconstructed compound shape. Standard_EXPORT virtual void UnsetWidth() Standard_OVERRIDE; //! Allows you to provide settings for the material aName //! in the reconstructed compound shape. - Standard_EXPORT virtual void SetMaterial (const Graphic3d_MaterialAspect& aName) Standard_OVERRIDE; - + Standard_EXPORT virtual void SetMaterial(const Graphic3d_MaterialAspect& aName) Standard_OVERRIDE; + //! Removes settings for material in the reconstructed compound shape. Standard_EXPORT virtual void UnsetMaterial() Standard_OVERRIDE; - + //! Sets the value aValue for transparency in the reconstructed compound shape. - Standard_EXPORT virtual void SetTransparency (const Standard_Real aValue = 0.6) Standard_OVERRIDE; - + Standard_EXPORT virtual void SetTransparency(const Standard_Real aValue = 0.6) Standard_OVERRIDE; + //! Removes the setting for transparency in the reconstructed compound shape. Standard_EXPORT virtual void UnsetTransparency() Standard_OVERRIDE; - + //! Constructs a bounding box with which to reconstruct //! compound topological shapes for presentation. Standard_EXPORT virtual const Bnd_Box& BoundingBox(); - + //! AIS_InteractiveObject defines another virtual method BoundingBox, //! which is not the same as above; keep it visible. using AIS_InteractiveObject::BoundingBox; //! Returns the Color attributes of the shape accordingly to //! the current facing model; - Standard_EXPORT virtual void Color (Quantity_Color& aColor) const Standard_OVERRIDE; - + Standard_EXPORT virtual void Color(Quantity_Color& aColor) const Standard_OVERRIDE; + //! Returns the NameOfMaterial attributes of the shape accordingly to //! the current facing model; Standard_EXPORT virtual Graphic3d_NameOfMaterial Material() const Standard_OVERRIDE; - + //! Returns the transparency attributes of the shape accordingly to //! the current facing model; Standard_EXPORT virtual Standard_Real Transparency() const Standard_OVERRIDE; //! Return shape type for specified selection mode. - static TopAbs_ShapeEnum SelectionType (const Standard_Integer theSelMode) + static TopAbs_ShapeEnum SelectionType(const Standard_Integer theSelMode) { switch (theSelMode) { - case 1: return TopAbs_VERTEX; - case 2: return TopAbs_EDGE; - case 3: return TopAbs_WIRE; - case 4: return TopAbs_FACE; - case 5: return TopAbs_SHELL; - case 6: return TopAbs_SOLID; - case 7: return TopAbs_COMPSOLID; - case 8: return TopAbs_COMPOUND; - case 0: return TopAbs_SHAPE; + case 1: + return TopAbs_VERTEX; + case 2: + return TopAbs_EDGE; + case 3: + return TopAbs_WIRE; + case 4: + return TopAbs_FACE; + case 5: + return TopAbs_SHELL; + case 6: + return TopAbs_SOLID; + case 7: + return TopAbs_COMPSOLID; + case 8: + return TopAbs_COMPOUND; + case 0: + return TopAbs_SHAPE; } return TopAbs_SHAPE; } //! Return selection mode for specified shape type. - static Standard_Integer SelectionMode (const TopAbs_ShapeEnum theShapeType) + static Standard_Integer SelectionMode(const TopAbs_ShapeEnum theShapeType) { switch (theShapeType) { - case TopAbs_VERTEX: return 1; - case TopAbs_EDGE: return 2; - case TopAbs_WIRE: return 3; - case TopAbs_FACE: return 4; - case TopAbs_SHELL: return 5; - case TopAbs_SOLID: return 6; - case TopAbs_COMPSOLID: return 7; - case TopAbs_COMPOUND: return 8; - case TopAbs_SHAPE: return 0; + case TopAbs_VERTEX: + return 1; + case TopAbs_EDGE: + return 2; + case TopAbs_WIRE: + return 3; + case TopAbs_FACE: + return 4; + case TopAbs_SHELL: + return 5; + case TopAbs_SOLID: + return 6; + case TopAbs_COMPSOLID: + return 7; + case TopAbs_COMPOUND: + return 8; + case TopAbs_SHAPE: + return 0; } return 0; } public: //! @name methods to alter texture mapping properties - //! Return texture repeat UV values; (1, 1) by default. const gp_Pnt2d& TextureRepeatUV() const { return myUVRepeat; } - //! Sets the number of occurrences of the texture on each face. The texture itself is parameterized in (0,1) by (0,1). - //! Each face of the shape to be textured is parameterized in UV space (Umin,Umax) by (Vmin,Vmax). - void SetTextureRepeatUV (const gp_Pnt2d& theRepeatUV) { myUVRepeat = theRepeatUV; } + //! Sets the number of occurrences of the texture on each face. The texture itself is + //! parameterized in (0,1) by (0,1). Each face of the shape to be textured is parameterized in UV + //! space (Umin,Umax) by (Vmin,Vmax). + void SetTextureRepeatUV(const gp_Pnt2d& theRepeatUV) { myUVRepeat = theRepeatUV; } //! Return texture origin UV position; (0, 0) by default. const gp_Pnt2d& TextureOriginUV() const { return myUVOrigin; } //! Use this method to change the origin of the texture. //! The texel (0,0) will be mapped to the surface (myUVOrigin.X(), myUVOrigin.Y()). - void SetTextureOriginUV (const gp_Pnt2d& theOriginUV) { myUVOrigin = theOriginUV; } + void SetTextureOriginUV(const gp_Pnt2d& theOriginUV) { myUVOrigin = theOriginUV; } //! Return scale factor for UV coordinates; (1, 1) by default. const gp_Pnt2d& TextureScaleUV() const { return myUVScale; } @@ -244,73 +274,75 @@ public: //! @name methods to alter texture mapping properties //! You can specify a scale factor for both U and V. //! Example: if you set ScaleU and ScaleV to 0.5 and you enable texture repeat, //! the texture will appear twice on the face in each direction. - void SetTextureScaleUV (const gp_Pnt2d& theScaleUV) { myUVScale = theScaleUV; } + void SetTextureScaleUV(const gp_Pnt2d& theScaleUV) { myUVScale = theScaleUV; } protected: - //! Compute normal presentation. - Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr, - const Handle(Prs3d_Presentation)& thePrs, - const Standard_Integer theMode) Standard_OVERRIDE; + Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager)& thePrsMgr, + const Handle(Prs3d_Presentation)& thePrs, + const Standard_Integer theMode) Standard_OVERRIDE; //! Compute projected presentation. - virtual void computeHLR (const Handle(Graphic3d_Camera)& theProjector, - const Handle(TopLoc_Datum3D)& theTrsf, - const Handle(Prs3d_Presentation)& thePrs) Standard_OVERRIDE + virtual void computeHLR(const Handle(Graphic3d_Camera)& theProjector, + const Handle(TopLoc_Datum3D)& theTrsf, + const Handle(Prs3d_Presentation)& thePrs) Standard_OVERRIDE { - if (!theTrsf.IsNull() - && theTrsf->Form() != gp_Identity) + if (!theTrsf.IsNull() && theTrsf->Form() != gp_Identity) { - const TopLoc_Location& aLoc = myshape.Location(); - const TopoDS_Shape aShape = myshape.Located (TopLoc_Location (theTrsf->Trsf()) * aLoc); - computeHlrPresentation (theProjector, thePrs, aShape, myDrawer); + const TopLoc_Location& aLoc = myshape.Location(); + const TopoDS_Shape aShape = myshape.Located(TopLoc_Location(theTrsf->Trsf()) * aLoc); + computeHlrPresentation(theProjector, thePrs, aShape, myDrawer); } else { - computeHlrPresentation (theProjector, thePrs, myshape, myDrawer); + computeHlrPresentation(theProjector, thePrs, myshape, myDrawer); } } //! Compute selection. - Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSelection, - const Standard_Integer theMode) Standard_OVERRIDE; - + Standard_EXPORT virtual void ComputeSelection(const Handle(SelectMgr_Selection)& theSelection, + const Standard_Integer theMode) Standard_OVERRIDE; + //! Create own aspects (if they do not exist) and set color to them. //! @return TRUE if new aspects have been created - Standard_EXPORT bool setColor (const Handle(Prs3d_Drawer)& theDrawer, const Quantity_Color& theColor) const; - + Standard_EXPORT bool setColor(const Handle(Prs3d_Drawer)& theDrawer, + const Quantity_Color& theColor) const; + //! Create own aspects (if they do not exist) and set width to them. //! @return TRUE if new aspects have been created - Standard_EXPORT bool setWidth (const Handle(Prs3d_Drawer)& theDrawer, const Standard_Real theWidth) const; - - Standard_EXPORT void setTransparency (const Handle(Prs3d_Drawer)& theDrawer, const Standard_Real theValue) const; - - Standard_EXPORT void setMaterial (const Handle(Prs3d_Drawer)& theDrawer, const Graphic3d_MaterialAspect& theMaterial, const Standard_Boolean theToKeepColor, const Standard_Boolean theToKeepTransp) const; + Standard_EXPORT bool setWidth(const Handle(Prs3d_Drawer)& theDrawer, + const Standard_Real theWidth) const; + + Standard_EXPORT void setTransparency(const Handle(Prs3d_Drawer)& theDrawer, + const Standard_Real theValue) const; + + Standard_EXPORT void setMaterial(const Handle(Prs3d_Drawer)& theDrawer, + const Graphic3d_MaterialAspect& theMaterial, + const Standard_Boolean theToKeepColor, + const Standard_Boolean theToKeepTransp) const; //! Replace aspects of already computed groups from drawer link by the new own value. Standard_EXPORT void replaceWithNewOwnAspects(); public: - //! Compute HLR presentation for specified shape. - Standard_EXPORT static void computeHlrPresentation (const Handle(Graphic3d_Camera)& theProjector, - const Handle(Prs3d_Presentation)& thePrs, - const TopoDS_Shape& theShape, - const Handle(Prs3d_Drawer)& theDrawer); + Standard_EXPORT static void computeHlrPresentation(const Handle(Graphic3d_Camera)& theProjector, + const Handle(Prs3d_Presentation)& thePrs, + const TopoDS_Shape& theShape, + const Handle(Prs3d_Drawer)& theDrawer); //! Dumps the content of me into the stream - Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE; + Standard_EXPORT virtual void DumpJson(Standard_OStream& theOStream, + Standard_Integer theDepth = -1) const Standard_OVERRIDE; protected: - TopoDS_Shape myshape; //!< shape to display Bnd_Box myBB; //!< cached bounding box of the shape gp_Pnt2d myUVOrigin; //!< UV origin vector for generating texture coordinates gp_Pnt2d myUVRepeat; //!< UV repeat vector for generating texture coordinates gp_Pnt2d myUVScale; //!< UV scale vector for generating texture coordinates Standard_Real myInitAng; - Standard_Boolean myCompBB; //!< if TRUE, then bounding box should be recomputed - + Standard_Boolean myCompBB; //!< if TRUE, then bounding box should be recomputed }; DEFINE_STANDARD_HANDLE(AIS_Shape, AIS_InteractiveObject) diff --git a/opencascade/AIS_SignatureFilter.hxx b/opencascade/AIS_SignatureFilter.hxx index 2e87ed10f..018cd8674 100644 --- a/opencascade/AIS_SignatureFilter.hxx +++ b/opencascade/AIS_SignatureFilter.hxx @@ -25,7 +25,6 @@ #include class SelectMgr_EntityOwner; - class AIS_SignatureFilter; DEFINE_STANDARD_HANDLE(AIS_SignatureFilter, AIS_TypeFilter) @@ -60,40 +59,23 @@ class AIS_SignatureFilter : public AIS_TypeFilter { public: - - //! Initializes the signature filter, adding the signature //! specification, aGivenSignature, to that for type, //! aGivenKind, in AIS_TypeFilter. - Standard_EXPORT AIS_SignatureFilter(const AIS_KindOfInteractive aGivenKind, const Standard_Integer aGivenSignature); - + Standard_EXPORT AIS_SignatureFilter(const AIS_KindOfInteractive aGivenKind, + const Standard_Integer aGivenSignature); + //! Returns False if the transient is not an AIS_InteractiveObject. //! Returns False if the signature of InteractiveObject //! is not the same as the stored one in the filter... - Standard_EXPORT Standard_Boolean IsOk (const Handle(SelectMgr_EntityOwner)& anobj) const Standard_OVERRIDE; - - + Standard_EXPORT Standard_Boolean + IsOk(const Handle(SelectMgr_EntityOwner)& anobj) const Standard_OVERRIDE; - - DEFINE_STANDARD_RTTIEXT(AIS_SignatureFilter,AIS_TypeFilter) + DEFINE_STANDARD_RTTIEXT(AIS_SignatureFilter, AIS_TypeFilter) protected: - - - - private: - - Standard_Integer mySig; - - }; - - - - - - #endif // _AIS_SignatureFilter_HeaderFile diff --git a/opencascade/AIS_StatusOfDetection.hxx b/opencascade/AIS_StatusOfDetection.hxx index 0ea74c96f..f466398dc 100644 --- a/opencascade/AIS_StatusOfDetection.hxx +++ b/opencascade/AIS_StatusOfDetection.hxx @@ -17,16 +17,15 @@ #ifndef _AIS_StatusOfDetection_HeaderFile #define _AIS_StatusOfDetection_HeaderFile - enum AIS_StatusOfDetection { -AIS_SOD_Error, -AIS_SOD_Nothing, -AIS_SOD_AllBad, -AIS_SOD_Selected, -AIS_SOD_OnlyOneDetected, -AIS_SOD_OnlyOneGood, -AIS_SOD_SeveralGood + AIS_SOD_Error, + AIS_SOD_Nothing, + AIS_SOD_AllBad, + AIS_SOD_Selected, + AIS_SOD_OnlyOneDetected, + AIS_SOD_OnlyOneGood, + AIS_SOD_SeveralGood }; #endif // _AIS_StatusOfDetection_HeaderFile diff --git a/opencascade/AIS_StatusOfPick.hxx b/opencascade/AIS_StatusOfPick.hxx index e042ce4f1..701bb4cf4 100644 --- a/opencascade/AIS_StatusOfPick.hxx +++ b/opencascade/AIS_StatusOfPick.hxx @@ -17,14 +17,13 @@ #ifndef _AIS_StatusOfPick_HeaderFile #define _AIS_StatusOfPick_HeaderFile - enum AIS_StatusOfPick { -AIS_SOP_Error, -AIS_SOP_NothingSelected, -AIS_SOP_Removed, -AIS_SOP_OneSelected, -AIS_SOP_SeveralSelected + AIS_SOP_Error, + AIS_SOP_NothingSelected, + AIS_SOP_Removed, + AIS_SOP_OneSelected, + AIS_SOP_SeveralSelected }; #endif // _AIS_StatusOfPick_HeaderFile diff --git a/opencascade/AIS_TextLabel.hxx b/opencascade/AIS_TextLabel.hxx index 4b0da2b6d..7aabe006a 100644 --- a/opencascade/AIS_TextLabel.hxx +++ b/opencascade/AIS_TextLabel.hxx @@ -30,57 +30,59 @@ class Font_TextFormatter; class AIS_TextLabel : public AIS_InteractiveObject { public: - //! Default constructor Standard_EXPORT AIS_TextLabel(); //! Return TRUE for supported display mode. - virtual Standard_Boolean AcceptDisplayMode (const Standard_Integer theMode) const Standard_OVERRIDE { return theMode == 0; } + virtual Standard_Boolean AcceptDisplayMode(const Standard_Integer theMode) const Standard_OVERRIDE + { + return theMode == 0; + } //! Setup color of entire text. - Standard_EXPORT virtual void SetColor (const Quantity_Color& theColor) Standard_OVERRIDE; + Standard_EXPORT virtual void SetColor(const Quantity_Color& theColor) Standard_OVERRIDE; //! Setup transparency within [0, 1] range. - Standard_EXPORT virtual void SetTransparency (const Standard_Real theValue) Standard_OVERRIDE; + Standard_EXPORT virtual void SetTransparency(const Standard_Real theValue) Standard_OVERRIDE; //! Removes the transparency setting. - virtual void UnsetTransparency() Standard_OVERRIDE { SetTransparency (0.0); } + virtual void UnsetTransparency() Standard_OVERRIDE { SetTransparency(0.0); } //! Material has no effect for text label. - virtual void SetMaterial (const Graphic3d_MaterialAspect& ) Standard_OVERRIDE {} + virtual void SetMaterial(const Graphic3d_MaterialAspect&) Standard_OVERRIDE {} //! Setup text. - Standard_EXPORT void SetText (const TCollection_ExtendedString& theText); + Standard_EXPORT void SetText(const TCollection_ExtendedString& theText); //! Setup position. - Standard_EXPORT void SetPosition (const gp_Pnt& thePosition); + Standard_EXPORT void SetPosition(const gp_Pnt& thePosition); //! Setup horizontal justification. - Standard_EXPORT void SetHJustification (const Graphic3d_HorizontalTextAlignment theHJust); + Standard_EXPORT void SetHJustification(const Graphic3d_HorizontalTextAlignment theHJust); //! Setup vertical justification. - Standard_EXPORT void SetVJustification (const Graphic3d_VerticalTextAlignment theVJust); + Standard_EXPORT void SetVJustification(const Graphic3d_VerticalTextAlignment theVJust); //! Setup angle. - Standard_EXPORT void SetAngle (const Standard_Real theAngle); + Standard_EXPORT void SetAngle(const Standard_Real theAngle); //! Setup zoomable property. - Standard_EXPORT void SetZoomable (const Standard_Boolean theIsZoomable); + Standard_EXPORT void SetZoomable(const Standard_Boolean theIsZoomable); //! Setup height. - Standard_EXPORT void SetHeight (const Standard_Real theHeight); + Standard_EXPORT void SetHeight(const Standard_Real theHeight); //! Setup font aspect. - Standard_EXPORT void SetFontAspect (const Font_FontAspect theFontAspect); + Standard_EXPORT void SetFontAspect(const Font_FontAspect theFontAspect); //! Setup font. - Standard_EXPORT void SetFont (Standard_CString theFont); + Standard_EXPORT void SetFont(Standard_CString theFont); //! Setup label orientation in the model 3D space. - Standard_EXPORT void SetOrientation3D (const gp_Ax2& theOrientation); + Standard_EXPORT void SetOrientation3D(const gp_Ax2& theOrientation); //! Reset label orientation in the model 3D space. - Standard_EXPORT void UnsetOrientation3D (); + Standard_EXPORT void UnsetOrientation3D(); //! Returns position. Standard_EXPORT const gp_Pnt& Position() const; @@ -100,7 +102,7 @@ public: //! Returns true if the current text placement mode uses text orientation in the model 3D space. Standard_EXPORT Standard_Boolean HasOrientation3D() const; - Standard_EXPORT void SetFlipping (const Standard_Boolean theIsFlipping); + Standard_EXPORT void SetFlipping(const Standard_Boolean theIsFlipping); Standard_EXPORT Standard_Boolean HasFlipping() const; @@ -108,7 +110,10 @@ public: Standard_Boolean HasOwnAnchorPoint() const { return myHasOwnAnchorPoint; } //! Set flag if text uses position as point of attach - void SetOwnAnchorPoint (const Standard_Boolean theOwnAnchorPoint) { myHasOwnAnchorPoint = theOwnAnchorPoint; } + void SetOwnAnchorPoint(const Standard_Boolean theOwnAnchorPoint) + { + myHasOwnAnchorPoint = theOwnAnchorPoint; + } //! Define the display type of the text. //! @@ -117,41 +122,43 @@ public: //! TODT_DEKALE The text is displayed with a 3D style. //! TODT_BLEND The text is displayed in XOR. //! TODT_DIMENSION Dimension line under text will be invisible. - Standard_EXPORT void SetDisplayType (const Aspect_TypeOfDisplayText theDisplayType); + Standard_EXPORT void SetDisplayType(const Aspect_TypeOfDisplayText theDisplayType); //! Modifies the colour of the subtitle for the TODT_SUBTITLE TextDisplayType //! and the colour of backgroubd for the TODT_DEKALE TextDisplayType. - Standard_EXPORT void SetColorSubTitle (const Quantity_Color& theColor); + Standard_EXPORT void SetColorSubTitle(const Quantity_Color& theColor); - //! Returns text presentation formatter; NULL by default, which means standard text formatter will be used. + //! Returns text presentation formatter; NULL by default, which means standard text formatter will + //! be used. const Handle(Font_TextFormatter)& TextFormatter() const { return myFormatter; } //! Setup text formatter for presentation. It's empty by default. - void SetTextFormatter (const Handle(Font_TextFormatter)& theFormatter) { myFormatter = theFormatter; } + void SetTextFormatter(const Handle(Font_TextFormatter)& theFormatter) + { + myFormatter = theFormatter; + } protected: - //! Compute - Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager)& theprsMgr, - const Handle(Prs3d_Presentation)& thePrs, - const Standard_Integer theMode) Standard_OVERRIDE; + Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager)& theprsMgr, + const Handle(Prs3d_Presentation)& thePrs, + const Standard_Integer theMode) Standard_OVERRIDE; //! Compute selection - Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSelection, - const Standard_Integer theMode) Standard_OVERRIDE; + Standard_EXPORT virtual void ComputeSelection(const Handle(SelectMgr_Selection)& theSelection, + const Standard_Integer theMode) Standard_OVERRIDE; //! Calculate label center, width and height - Standard_EXPORT Standard_Boolean calculateLabelParams (const gp_Pnt& thePosition, - gp_Pnt& theCenterOfLabel, - Standard_Real& theWidth, - Standard_Real& theHeight) const; + Standard_EXPORT Standard_Boolean calculateLabelParams(const gp_Pnt& thePosition, + gp_Pnt& theCenterOfLabel, + Standard_Real& theWidth, + Standard_Real& theHeight) const; //! Calculate label transformation - Standard_EXPORT gp_Trsf calculateLabelTrsf (const gp_Pnt& thePosition, - gp_Pnt& theCenterOfLabel) const; + Standard_EXPORT gp_Trsf calculateLabelTrsf(const gp_Pnt& thePosition, + gp_Pnt& theCenterOfLabel) const; protected: - Handle(Font_TextFormatter) myFormatter; TCollection_ExtendedString myText; @@ -161,10 +168,8 @@ protected: Standard_Boolean myHasFlipping; public: - //! CASCADE RTTI - DEFINE_STANDARD_RTTIEXT(AIS_TextLabel,AIS_InteractiveObject) - + DEFINE_STANDARD_RTTIEXT(AIS_TextLabel, AIS_InteractiveObject) }; DEFINE_STANDARD_HANDLE(AIS_TextLabel, AIS_InteractiveObject) diff --git a/opencascade/AIS_TexturedShape.hxx b/opencascade/AIS_TexturedShape.hxx index acd3650d4..1dd5bcec6 100644 --- a/opencascade/AIS_TexturedShape.hxx +++ b/opencascade/AIS_TexturedShape.hxx @@ -30,8 +30,8 @@ class Graphic3d_AspectFillArea3d; class Graphic3d_Texture2D; //! This class allows to map textures on shapes. -//! Presentations modes AIS_WireFrame (0) and AIS_Shaded (1) behave in the same manner as in AIS_Shape, -//! whilst new modes 2 (bounding box) and 3 (texture mapping) extends it functionality. +//! Presentations modes AIS_WireFrame (0) and AIS_Shaded (1) behave in the same manner as in +//! AIS_Shape, whilst new modes 2 (bounding box) and 3 (texture mapping) extends it functionality. //! //! The texture itself is parametrized in (0,1)x(0,1). //! Each face of a shape located in UV space is provided with these parameters: @@ -49,20 +49,22 @@ class AIS_TexturedShape : public AIS_Shape { public: //! @name main methods - //! Initializes the textured shape. - Standard_EXPORT AIS_TexturedShape (const TopoDS_Shape& theShape); + Standard_EXPORT AIS_TexturedShape(const TopoDS_Shape& theShape); - //! Sets the texture source. can specify path to texture image or one of the standard predefined textures. - //! The accepted file types are those used in Image_AlienPixMap with extensions such as rgb, png, jpg and more. - //! To specify the standard predefined texture, the should contain integer - the Graphic3d_NameOfTexture2D enumeration index. + //! Sets the texture source. can specify path to texture image or one of the + //! standard predefined textures. The accepted file types are those used in Image_AlienPixMap with + //! extensions such as rgb, png, jpg and more. To specify the standard predefined texture, the + //! should contain integer - the Graphic3d_NameOfTexture2D enumeration index. //! Setting texture source using this method resets the source pixmap (if was set previously). - Standard_EXPORT virtual void SetTextureFileName (const TCollection_AsciiString& theTextureFileName); + Standard_EXPORT virtual void SetTextureFileName( + const TCollection_AsciiString& theTextureFileName); //! Sets the texture source. specifies image data. - //! Please note that the data should be in Bottom-Up order, the flag of Image_PixMap::IsTopDown() will be ignored by graphic driver. - //! Setting texture source using this method resets the source by filename (if was set previously). - Standard_EXPORT virtual void SetTexturePixMap (const Handle(Image_PixMap)& theTexturePixMap); + //! Please note that the data should be in Bottom-Up order, the flag of Image_PixMap::IsTopDown() + //! will be ignored by graphic driver. Setting texture source using this method resets the source + //! by filename (if was set previously). + Standard_EXPORT virtual void SetTexturePixMap(const Handle(Image_PixMap)& theTexturePixMap); //! @return flag to control texture mapping (for presentation mode 3) Standard_Boolean TextureMapState() const { return myToMapTexture; } @@ -80,10 +82,10 @@ public: //! @name main methods const Handle(Image_PixMap)& TexturePixMap() const { return myTexturePixMap; } public: //! @name methods to alter texture mapping properties - //! Use this method to display the textured shape without recomputing the whole presentation. //! Use this method when ONLY the texture content has been changed. - //! If other parameters (ie: scale factors, texture origin, texture repeat...) have changed, the whole presentation has to be recomputed: + //! If other parameters (ie: scale factors, texture origin, texture repeat...) have changed, the + //! whole presentation has to be recomputed: //! @code //! if (myShape->DisplayMode() == 3) //! { @@ -98,13 +100,14 @@ public: //! @name methods to alter texture mapping properties Standard_EXPORT void UpdateAttributes(); //! Sets the color. - Standard_EXPORT virtual void SetColor (const Quantity_Color& theColor) Standard_OVERRIDE; + Standard_EXPORT virtual void SetColor(const Quantity_Color& theColor) Standard_OVERRIDE; //! Removes settings for the color. Standard_EXPORT virtual void UnsetColor() Standard_OVERRIDE; //! Sets the material aspect. - Standard_EXPORT virtual void SetMaterial (const Graphic3d_MaterialAspect& theAspect) Standard_OVERRIDE; + Standard_EXPORT virtual void SetMaterial(const Graphic3d_MaterialAspect& theAspect) + Standard_OVERRIDE; //! Removes settings for material aspect. Standard_EXPORT virtual void UnsetMaterial() Standard_OVERRIDE; @@ -124,12 +127,13 @@ public: //! @name methods to alter texture mapping properties //! @return texture repeat V value Standard_Real VRepeat() const { return myUVRepeat.Y(); } - //! Sets the number of occurrences of the texture on each face. The texture itself is parameterized in (0,1) by (0,1). - //! Each face of the shape to be textured is parameterized in UV space (Umin,Umax) by (Vmin,Vmax). - //! If RepeatYN is set to false, texture coordinates are clamped in the range (0,1)x(0,1) of the face. - Standard_EXPORT void SetTextureRepeat (const Standard_Boolean theToRepeat, - const Standard_Real theURepeat = 1.0, - const Standard_Real theVRepeat = 1.0); + //! Sets the number of occurrences of the texture on each face. The texture itself is + //! parameterized in (0,1) by (0,1). Each face of the shape to be textured is parameterized in UV + //! space (Umin,Umax) by (Vmin,Vmax). If RepeatYN is set to false, texture coordinates are clamped + //! in the range (0,1)x(0,1) of the face. + Standard_EXPORT void SetTextureRepeat(const Standard_Boolean theToRepeat, + const Standard_Real theURepeat = 1.0, + const Standard_Real theVRepeat = 1.0); //! @return true if texture UV origin has been modified Standard_Boolean TextureOrigin() const { return myIsCustomOrigin; } @@ -140,10 +144,11 @@ public: //! @name methods to alter texture mapping properties //! @return texture origin V position (0.0 by default) Standard_Real TextureVOrigin() const { return myUVOrigin.Y(); } - //! Use this method to change the origin of the texture. The texel (0,0) will be mapped to the surface (UOrigin,VOrigin) - Standard_EXPORT void SetTextureOrigin (const Standard_Boolean theToSetTextureOrigin, - const Standard_Real theUOrigin = 0.0, - const Standard_Real theVOrigin = 0.0); + //! Use this method to change the origin of the texture. The texel (0,0) will be mapped to the + //! surface (UOrigin,VOrigin) + Standard_EXPORT void SetTextureOrigin(const Standard_Boolean theToSetTextureOrigin, + const Standard_Real theUOrigin = 0.0, + const Standard_Real theVOrigin = 0.0); //! @return true if scale factor should be applied to texture mapping Standard_Boolean TextureScale() const { return myToScale; } @@ -158,57 +163,54 @@ public: //! @name methods to alter texture mapping properties //! You can specify a scale factor for both U and V. //! Example: if you set ScaleU and ScaleV to 0.5 and you enable texture repeat, //! the texture will appear twice on the face in each direction. - Standard_EXPORT void SetTextureScale (const Standard_Boolean theToSetTextureScale, - const Standard_Real theScaleU = 1.0, - const Standard_Real theScaleV = 1.0); + Standard_EXPORT void SetTextureScale(const Standard_Boolean theToSetTextureScale, + const Standard_Real theScaleU = 1.0, + const Standard_Real theScaleV = 1.0); //! @return true if displaying of triangles is requested Standard_Boolean ShowTriangles() const { return myToShowTriangles; } //! Use this method to show the triangulation of the shape (for debugging etc.). - Standard_EXPORT void ShowTriangles (const Standard_Boolean theToShowTriangles); + Standard_EXPORT void ShowTriangles(const Standard_Boolean theToShowTriangles); //! @return true if texture color modulation is turned on Standard_Boolean TextureModulate() const { return myModulate; } //! Return true if specified display mode is supported (extends AIS_Shape with Display Mode 3). - virtual Standard_Boolean AcceptDisplayMode (const Standard_Integer theMode) const Standard_OVERRIDE { return theMode >= 0 && theMode <= 3; } + virtual Standard_Boolean AcceptDisplayMode(const Standard_Integer theMode) const Standard_OVERRIDE + { + return theMode >= 0 && theMode <= 3; + } protected: //! @name overridden methods - //! Compute presentation with texture mapping support. - Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr, - const Handle(Prs3d_Presentation)& thePrs, - const Standard_Integer theMode) Standard_OVERRIDE; + Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager)& thePrsMgr, + const Handle(Prs3d_Presentation)& thePrs, + const Standard_Integer theMode) Standard_OVERRIDE; - Standard_EXPORT void updateAttributes (const Handle(Prs3d_Presentation)& thePrs); + Standard_EXPORT void updateAttributes(const Handle(Prs3d_Presentation)& thePrs); protected: //! @name presentation fields - Handle(Graphic3d_Texture2D) myTexture; Handle(Graphic3d_AspectFillArea3d) myAspect; protected: //! @name texture source fields - - Handle(Image_PixMap) myTexturePixMap; - TCollection_AsciiString myTextureFile; - Graphic3d_NameOfTexture2D myPredefTexture; + Handle(Image_PixMap) myTexturePixMap; + TCollection_AsciiString myTextureFile; + Graphic3d_NameOfTexture2D myPredefTexture; protected: //! @name texture mapping properties - - Standard_Boolean myToMapTexture; - Standard_Boolean myModulate; - Standard_Boolean myIsCustomOrigin; - Standard_Boolean myToRepeat; - Standard_Boolean myToScale; - Standard_Boolean myToShowTriangles; + Standard_Boolean myToMapTexture; + Standard_Boolean myModulate; + Standard_Boolean myIsCustomOrigin; + Standard_Boolean myToRepeat; + Standard_Boolean myToScale; + Standard_Boolean myToShowTriangles; public: - - DEFINE_STANDARD_RTTIEXT(AIS_TexturedShape,AIS_Shape) - + DEFINE_STANDARD_RTTIEXT(AIS_TexturedShape, AIS_Shape) }; -DEFINE_STANDARD_HANDLE (AIS_TexturedShape, AIS_Shape) +DEFINE_STANDARD_HANDLE(AIS_TexturedShape, AIS_Shape) #endif // _AIS_TexturedShape_HeaderFile diff --git a/opencascade/AIS_Triangulation.hxx b/opencascade/AIS_Triangulation.hxx index cfe919d03..a2ddb91fc 100644 --- a/opencascade/AIS_Triangulation.hxx +++ b/opencascade/AIS_Triangulation.hxx @@ -31,64 +31,57 @@ class AIS_Triangulation : public AIS_InteractiveObject { DEFINE_STANDARD_RTTIEXT(AIS_Triangulation, AIS_InteractiveObject) public: - //! Constructs the Triangulation display object Standard_EXPORT AIS_Triangulation(const Handle(Poly_Triangulation)& aTriangulation); - //! Set the color for each node. //! Each 32-bit color is Alpha << 24 + Blue << 16 + Green << 8 + Red //! Order of color components is essential for further usage by OpenGL - Standard_EXPORT void SetColors (const Handle(TColStd_HArray1OfInteger)& aColor); - + Standard_EXPORT void SetColors(const Handle(TColStd_HArray1OfInteger)& aColor); //! Get the color for each node. //! Each 32-bit color is Alpha << 24 + Blue << 16 + Green << 8 + Red Standard_EXPORT Handle(TColStd_HArray1OfInteger) GetColors() const; //! Returns true if triangulation has vertex colors. - Standard_Boolean HasVertexColors() const - { - return (myFlagColor == 1); - } - - Standard_EXPORT void SetTriangulation (const Handle(Poly_Triangulation)& aTriangulation); - + Standard_Boolean HasVertexColors() const { return (myFlagColor == 1); } + + Standard_EXPORT void SetTriangulation(const Handle(Poly_Triangulation)& aTriangulation); + //! Returns Poly_Triangulation . Standard_EXPORT Handle(Poly_Triangulation) GetTriangulation() const; //! Sets the value aValue for transparency in the reconstructed compound shape. - Standard_EXPORT virtual void SetTransparency (const Standard_Real aValue = 0.6) Standard_OVERRIDE; + Standard_EXPORT virtual void SetTransparency(const Standard_Real aValue = 0.6) Standard_OVERRIDE; //! Removes the setting for transparency in the reconstructed compound shape. Standard_EXPORT virtual void UnsetTransparency() Standard_OVERRIDE; protected: - Standard_EXPORT void updatePresentation(); private: + Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager)& thePrsMgr, + const Handle(Prs3d_Presentation)& thePrs, + const Standard_Integer theMode) Standard_OVERRIDE; - Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr, - const Handle(Prs3d_Presentation)& thePrs, - const Standard_Integer theMode) Standard_OVERRIDE; - - Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSel, - const Standard_Integer theMode) Standard_OVERRIDE; + Standard_EXPORT virtual void ComputeSelection(const Handle(SelectMgr_Selection)& theSel, + const Standard_Integer theMode) Standard_OVERRIDE; //! Attenuates 32-bit color by a given attenuation factor (0...1): //! aColor = Alpha << 24 + Blue << 16 + Green << 8 + Red - //! All color components are multiplied by aComponent, the result is then packed again as 32-bit integer. - //! Color attenuation is applied to the vertex colors in order to have correct visual result - //! after glColorMaterial(GL_AMBIENT_AND_DIFFUSE). Without it, colors look unnatural and flat. - Standard_EXPORT Graphic3d_Vec4ub attenuateColor (const Standard_Integer theColor, const Standard_Real theComponent); - - Handle(Poly_Triangulation) myTriangulation; + //! All color components are multiplied by aComponent, the result is then packed again as 32-bit + //! integer. Color attenuation is applied to the vertex colors in order to have correct visual + //! result after glColorMaterial(GL_AMBIENT_AND_DIFFUSE). Without it, colors look unnatural and + //! flat. + Standard_EXPORT Graphic3d_Vec4ub attenuateColor(const Standard_Integer theColor, + const Standard_Real theComponent); + + Handle(Poly_Triangulation) myTriangulation; Handle(TColStd_HArray1OfInteger) myColor; - Standard_Integer myFlagColor; - Standard_Integer myNbNodes; - Standard_Integer myNbTriangles; - + Standard_Integer myFlagColor; + Standard_Integer myNbNodes; + Standard_Integer myNbTriangles; }; #endif // _AIS_Triangulation_HeaderFile diff --git a/opencascade/AIS_Trihedron.hxx b/opencascade/AIS_Trihedron.hxx index 03cb6f1c2..760fcbc98 100644 --- a/opencascade/AIS_Trihedron.hxx +++ b/opencascade/AIS_Trihedron.hxx @@ -52,21 +52,20 @@ class AIS_Trihedron : public AIS_InteractiveObject { DEFINE_STANDARD_RTTIEXT(AIS_Trihedron, AIS_InteractiveObject) public: - //! Initializes a trihedron entity. - Standard_EXPORT AIS_Trihedron (const Handle(Geom_Axis2Placement)& theComponent); + Standard_EXPORT AIS_Trihedron(const Handle(Geom_Axis2Placement)& theComponent); //! Returns datum display mode. Prs3d_DatumMode DatumDisplayMode() const { return myTrihDispMode; } //! Sets Shading or Wireframe display mode, triangle or segment graphic group is used relatively. - void SetDatumDisplayMode (Prs3d_DatumMode theMode) { myTrihDispMode = theMode; } + void SetDatumDisplayMode(Prs3d_DatumMode theMode) { myTrihDispMode = theMode; } //! Returns the right-handed coordinate system set in SetComponent. const Handle(Geom_Axis2Placement)& Component() const { return myComponent; } //! Constructs the right-handed coordinate system aComponent. - Standard_EXPORT void SetComponent (const Handle(Geom_Axis2Placement)& theComponent); + Standard_EXPORT void SetComponent(const Handle(Geom_Axis2Placement)& theComponent); //! Returns true if the trihedron object has a size other //! than the default size of 100 mm. along each axis. @@ -76,7 +75,7 @@ public: Standard_EXPORT Standard_Real Size() const; //! Sets the size of trihedron object. - Standard_EXPORT void SetSize (const Standard_Real theValue); + Standard_EXPORT void SetSize(const Standard_Real theValue); //! Removes any non-default settings for size of this trihedron object. //! If the object has 1 color, the default size of the @@ -90,11 +89,10 @@ public: Standard_EXPORT Quantity_Color TextColor() const; //! Sets color of label of trihedron axes. - Standard_EXPORT void SetTextColor (const Quantity_Color& theColor); + Standard_EXPORT void SetTextColor(const Quantity_Color& theColor); //! Sets color of label of trihedron axis. - Standard_EXPORT void SetTextColor (const Prs3d_DatumParts thePart, - const Quantity_Color& theColor); + Standard_EXPORT void SetTextColor(const Prs3d_DatumParts thePart, const Quantity_Color& theColor); //! Returns true if trihedron has own arrow color Standard_Boolean HasArrowColor() const { return myHasOwnArrowColor; } @@ -103,68 +101,68 @@ public: Standard_EXPORT Quantity_Color ArrowColor() const; //! Sets color of arrow of trihedron axes. - Standard_EXPORT void SetArrowColor (const Quantity_Color& theColor); + Standard_EXPORT void SetArrowColor(const Quantity_Color& theColor); //! Sets color of arrow of trihedron axes. - Standard_EXPORT void SetArrowColor (const Prs3d_DatumParts thePart, - const Quantity_Color& theColor); + Standard_EXPORT void SetArrowColor(const Prs3d_DatumParts thePart, + const Quantity_Color& theColor); //! Returns color of datum part: origin or some of trihedron axes. - Standard_EXPORT Quantity_Color DatumPartColor (Prs3d_DatumParts thePart); + Standard_EXPORT Quantity_Color DatumPartColor(Prs3d_DatumParts thePart); //! Sets color of datum part: origin or some of trihedron axes. //! If presentation is shading mode, this color is set for both sides of facing model - Standard_EXPORT void SetDatumPartColor (const Prs3d_DatumParts thePart, - const Quantity_Color& theColor); + Standard_EXPORT void SetDatumPartColor(const Prs3d_DatumParts thePart, + const Quantity_Color& theColor); //! Sets color of origin. //! Standard_DEPRECATED("This method is deprecated - SetColor() should be called instead") - Standard_EXPORT void SetOriginColor (const Quantity_Color& theColor); + Standard_EXPORT void SetOriginColor(const Quantity_Color& theColor); //! Sets color of x-axis. //! Standard_DEPRECATED("This method is deprecated - SetColor() should be called instead") - Standard_EXPORT void SetXAxisColor (const Quantity_Color& theColor); + Standard_EXPORT void SetXAxisColor(const Quantity_Color& theColor); //! Sets color of y-axis. //! Standard_DEPRECATED("This method is deprecated - SetColor() should be called instead") - Standard_EXPORT void SetYAxisColor (const Quantity_Color& theColor); + Standard_EXPORT void SetYAxisColor(const Quantity_Color& theColor); //! Sets color of z-axis. //! Standard_DEPRECATED("This method is deprecated - SetColor() should be called instead") - Standard_EXPORT void SetAxisColor (const Quantity_Color& theColor); + Standard_EXPORT void SetAxisColor(const Quantity_Color& theColor); //! Returns true if arrows are to be drawn Standard_EXPORT Standard_Boolean ToDrawArrows() const; //! Sets whether to draw the arrows in visualization - Standard_EXPORT void SetDrawArrows (const Standard_Boolean theToDraw); + Standard_EXPORT void SetDrawArrows(const Standard_Boolean theToDraw); //! Returns priority of selection for owner of the given type - Standard_Integer SelectionPriority (Prs3d_DatumParts thePart) { return mySelectionPriority[thePart]; } + Standard_Integer SelectionPriority(Prs3d_DatumParts thePart) + { + return mySelectionPriority[thePart]; + } //! Sets priority of selection for owner of the given type - void SetSelectionPriority (Prs3d_DatumParts thePart, - Standard_Integer thePriority) + void SetSelectionPriority(Prs3d_DatumParts thePart, Standard_Integer thePriority) { mySelectionPriority[thePart] = thePriority; } //! Returns text of axis. Parameter thePart should be XAxis, YAxis or ZAxis - const TCollection_ExtendedString& Label (Prs3d_DatumParts thePart) { return myLabels[thePart]; } + const TCollection_ExtendedString& Label(Prs3d_DatumParts thePart) { return myLabels[thePart]; } //! Sets text label for trihedron axis. Parameter thePart should be XAxis, YAxis or ZAxis - void SetLabel (const Prs3d_DatumParts thePart, - const TCollection_ExtendedString& theName) + void SetLabel(const Prs3d_DatumParts thePart, const TCollection_ExtendedString& theName) { myLabels[thePart] = theName; } public: - //! Sets the color theColor for this trihedron object, it changes color of axes. - Standard_EXPORT virtual void SetColor (const Quantity_Color& theColor) Standard_OVERRIDE; + Standard_EXPORT virtual void SetColor(const Quantity_Color& theColor) Standard_OVERRIDE; //! Returns true if the display mode selected, aMode, is valid for trihedron datums. - virtual Standard_Boolean AcceptDisplayMode (const Standard_Integer theMode) const Standard_OVERRIDE + virtual Standard_Boolean AcceptDisplayMode(const Standard_Integer theMode) const Standard_OVERRIDE { return theMode == 0; } @@ -173,79 +171,86 @@ public: virtual Standard_Integer Signature() const Standard_OVERRIDE { return 3; } //! Indicates that the type of Interactive Object is datum. - virtual AIS_KindOfInteractive Type() const Standard_OVERRIDE { return AIS_KindOfInteractive_Datum; } + virtual AIS_KindOfInteractive Type() const Standard_OVERRIDE + { + return AIS_KindOfInteractive_Datum; + } //! Removes the settings for color. Standard_EXPORT virtual void UnsetColor() Standard_OVERRIDE; public: - //! Method which clear all selected owners belonging //! to this selectable object ( for fast presentation draw ). Standard_EXPORT virtual void ClearSelected() Standard_OVERRIDE; //! Method which draws selected owners ( for fast presentation draw ). - Standard_EXPORT virtual void HilightSelected (const Handle(PrsMgr_PresentationManager)& thePM, - const SelectMgr_SequenceOfOwner& theOwners) Standard_OVERRIDE; + Standard_EXPORT virtual void HilightSelected(const Handle(PrsMgr_PresentationManager)& thePM, + const SelectMgr_SequenceOfOwner& theOwners) + Standard_OVERRIDE; //! Method which hilight an owner belonging to //! this selectable object ( for fast presentation draw ). - Standard_EXPORT virtual void HilightOwnerWithColor (const Handle(PrsMgr_PresentationManager)& thePM, - const Handle(Prs3d_Drawer)& theStyle, - const Handle(SelectMgr_EntityOwner)& theOwner) Standard_OVERRIDE; + Standard_EXPORT virtual void HilightOwnerWithColor( + const Handle(PrsMgr_PresentationManager)& thePM, + const Handle(Prs3d_Drawer)& theStyle, + const Handle(SelectMgr_EntityOwner)& theOwner) Standard_OVERRIDE; protected: - //! Compute trihedron presentation. - Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr, - const Handle(Prs3d_Presentation)& thePrs, - const Standard_Integer theMode) Standard_OVERRIDE; + Standard_EXPORT void Compute(const Handle(PrsMgr_PresentationManager)& thePrsMgr, + const Handle(Prs3d_Presentation)& thePrs, + const Standard_Integer theMode) Standard_OVERRIDE; //! Compute selection. - Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSelection, - const Standard_Integer theMode) Standard_OVERRIDE; + Standard_EXPORT virtual void ComputeSelection(const Handle(SelectMgr_Selection)& theSelection, + const Standard_Integer theMode) Standard_OVERRIDE; //! Dumps the content of me into the stream - Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE; + Standard_EXPORT virtual void DumpJson(Standard_OStream& theOStream, + Standard_Integer theDepth = -1) const Standard_OVERRIDE; protected: - //! Creates a sensitive entity for the datum part that will be used in selection owner creation. - Standard_EXPORT Handle(Select3D_SensitiveEntity) createSensitiveEntity (const Prs3d_DatumParts thePart, - const Handle(SelectMgr_EntityOwner)& theOwner) const; + Standard_EXPORT Handle(Select3D_SensitiveEntity) createSensitiveEntity( + const Prs3d_DatumParts thePart, + const Handle(SelectMgr_EntityOwner)& theOwner) const; //! Computes presentation for display mode equal 1. - Standard_EXPORT void computePresentation (const Handle(PrsMgr_PresentationManager)& thePrsMgr, - const Handle(Prs3d_Presentation)& thePrs); + Standard_EXPORT void computePresentation(const Handle(PrsMgr_PresentationManager)& thePrsMgr, + const Handle(Prs3d_Presentation)& thePrs); //! Returns own datum aspect of trihedron, create this aspect if it was not created yet. Standard_EXPORT void setOwnDatumAspect(); //! Returns primitives. - const Handle(Graphic3d_ArrayOfPrimitives)& arrayOfPrimitives (Prs3d_DatumParts thePart) const { return myPrimitives[thePart]; } + const Handle(Graphic3d_ArrayOfPrimitives)& arrayOfPrimitives(Prs3d_DatumParts thePart) const + { + return myPrimitives[thePart]; + } //! Updates graphic groups for the current datum mode //! Parameters of datum position and orientation - Standard_EXPORT void updatePrimitives (const Handle(Prs3d_DatumAspect)& theAspect, - Prs3d_DatumMode theMode, - const gp_Pnt& theOrigin, - const gp_Dir& theXDir, - const gp_Dir& theYDir, - const gp_Dir& theZDir); + Standard_EXPORT void updatePrimitives(const Handle(Prs3d_DatumAspect)& theAspect, + Prs3d_DatumMode theMode, + const gp_Pnt& theOrigin, + const gp_Dir& theXDir, + const gp_Dir& theYDir, + const gp_Dir& theZDir); protected: Handle(Geom_Axis2Placement) myComponent; - Prs3d_DatumMode myTrihDispMode; - Standard_Boolean myHasOwnSize; - Standard_Boolean myHasOwnTextColor; - Standard_Boolean myHasOwnArrowColor; + Prs3d_DatumMode myTrihDispMode; + Standard_Boolean myHasOwnSize; + Standard_Boolean myHasOwnTextColor; + Standard_Boolean myHasOwnArrowColor; TCollection_ExtendedString myLabels[Prs3d_DatumParts_NB]; - Standard_Integer mySelectionPriority[Prs3d_DatumParts_NB]; + Standard_Integer mySelectionPriority[Prs3d_DatumParts_NB]; - Handle(Graphic3d_Group) myPartToGroup[Prs3d_DatumParts_NB]; + Handle(Graphic3d_Group) myPartToGroup[Prs3d_DatumParts_NB]; NCollection_List mySelectedParts; - Handle(Graphic3d_AspectLine3d) myHiddenLineAspect; + Handle(Graphic3d_AspectLine3d) myHiddenLineAspect; Handle(Graphic3d_ArrayOfPrimitives) myPrimitives[Prs3d_DatumParts_NB]; }; diff --git a/opencascade/AIS_TrihedronOwner.hxx b/opencascade/AIS_TrihedronOwner.hxx index e15ba3cde..3ddc1eefb 100644 --- a/opencascade/AIS_TrihedronOwner.hxx +++ b/opencascade/AIS_TrihedronOwner.hxx @@ -24,34 +24,34 @@ class AIS_TrihedronOwner : public SelectMgr_EntityOwner { DEFINE_STANDARD_RTTIEXT(AIS_TrihedronOwner, SelectMgr_EntityOwner) public: - //! Creates an owner of AIS_Trihedron object. - Standard_EXPORT AIS_TrihedronOwner (const Handle(SelectMgr_SelectableObject)& theSelObject, - const Prs3d_DatumParts theDatumPart, - const Standard_Integer thePriority); + Standard_EXPORT AIS_TrihedronOwner(const Handle(SelectMgr_SelectableObject)& theSelObject, + const Prs3d_DatumParts theDatumPart, + const Standard_Integer thePriority); //! Returns the datum part identifier. Prs3d_DatumParts DatumPart() const { return myDatumPart; } //! Highlights selectable object's presentation. - Standard_EXPORT virtual void HilightWithColor (const Handle(PrsMgr_PresentationManager)& thePM, - const Handle(Prs3d_Drawer)& theStyle, - const Standard_Integer theMode) Standard_OVERRIDE; + Standard_EXPORT virtual void HilightWithColor(const Handle(PrsMgr_PresentationManager)& thePM, + const Handle(Prs3d_Drawer)& theStyle, + const Standard_Integer theMode) Standard_OVERRIDE; //! Returns true if the presentation manager thePM //! highlights selections corresponding to the selection mode aMode. - Standard_EXPORT Standard_Boolean IsHilighted (const Handle(PrsMgr_PresentationManager)& thePM, - const Standard_Integer theMode) const Standard_OVERRIDE; + Standard_EXPORT Standard_Boolean + IsHilighted(const Handle(PrsMgr_PresentationManager)& thePM, + const Standard_Integer theMode) const Standard_OVERRIDE; //! Removes highlighting from the owner of a detected //! selectable object in the presentation manager thePM. - Standard_EXPORT virtual void Unhilight (const Handle(PrsMgr_PresentationManager)& thePM, - const Standard_Integer theMode) Standard_OVERRIDE; + Standard_EXPORT virtual void Unhilight(const Handle(PrsMgr_PresentationManager)& thePM, + const Standard_Integer theMode) Standard_OVERRIDE; protected: Prs3d_DatumParts myDatumPart; //!< part of datum selected }; -DEFINE_STANDARD_HANDLE (AIS_TrihedronOwner, SelectMgr_EntityOwner) +DEFINE_STANDARD_HANDLE(AIS_TrihedronOwner, SelectMgr_EntityOwner) #endif // _AIS_TrihedronOwner_HeaderFile diff --git a/opencascade/AIS_TypeFilter.hxx b/opencascade/AIS_TypeFilter.hxx index 1163e24d1..2ef242254 100644 --- a/opencascade/AIS_TypeFilter.hxx +++ b/opencascade/AIS_TypeFilter.hxx @@ -24,7 +24,6 @@ #include class SelectMgr_EntityOwner; - class AIS_TypeFilter; DEFINE_STANDARD_HANDLE(AIS_TypeFilter, SelectMgr_Filter) @@ -55,38 +54,21 @@ class AIS_TypeFilter : public SelectMgr_Filter { public: - - //! Initializes filter for type, aGivenKind. Standard_EXPORT AIS_TypeFilter(const AIS_KindOfInteractive aGivenKind); - + //! Returns False if the transient is not an Interactive //! Object, or if the type of the Interactive Object is not //! the same as that stored in the filter. - Standard_EXPORT virtual Standard_Boolean IsOk (const Handle(SelectMgr_EntityOwner)& anobj) const Standard_OVERRIDE; - - + Standard_EXPORT virtual Standard_Boolean IsOk(const Handle(SelectMgr_EntityOwner)& anobj) const + Standard_OVERRIDE; - - DEFINE_STANDARD_RTTIEXT(AIS_TypeFilter,SelectMgr_Filter) + DEFINE_STANDARD_RTTIEXT(AIS_TypeFilter, SelectMgr_Filter) protected: - - AIS_KindOfInteractive myKind; - private: - - - - }; - - - - - - #endif // _AIS_TypeFilter_HeaderFile diff --git a/opencascade/AIS_TypeOfAttribute.hxx b/opencascade/AIS_TypeOfAttribute.hxx index 10ad56db2..9dda5367b 100644 --- a/opencascade/AIS_TypeOfAttribute.hxx +++ b/opencascade/AIS_TypeOfAttribute.hxx @@ -17,25 +17,24 @@ #ifndef _AIS_TypeOfAttribute_HeaderFile #define _AIS_TypeOfAttribute_HeaderFile - enum AIS_TypeOfAttribute { -AIS_TOA_Line, -AIS_TOA_Dimension, -AIS_TOA_Wire, -AIS_TOA_Plane, -AIS_TOA_Vector, -AIS_TOA_UIso, -AIS_TOA_VIso, -AIS_TOA_Free, -AIS_TOA_UnFree, -AIS_TOA_Section, -AIS_TOA_Hidden, -AIS_TOA_Seen, -AIS_TOA_FaceBoundary, -AIS_TOA_FirstAxis, -AIS_TOA_SecondAxis, -AIS_TOA_ThirdAxis + AIS_TOA_Line, + AIS_TOA_Dimension, + AIS_TOA_Wire, + AIS_TOA_Plane, + AIS_TOA_Vector, + AIS_TOA_UIso, + AIS_TOA_VIso, + AIS_TOA_Free, + AIS_TOA_UnFree, + AIS_TOA_Section, + AIS_TOA_Hidden, + AIS_TOA_Seen, + AIS_TOA_FaceBoundary, + AIS_TOA_FirstAxis, + AIS_TOA_SecondAxis, + AIS_TOA_ThirdAxis }; #endif // _AIS_TypeOfAttribute_HeaderFile diff --git a/opencascade/AIS_TypeOfAxis.hxx b/opencascade/AIS_TypeOfAxis.hxx index d4437deec..e9ef04f34 100644 --- a/opencascade/AIS_TypeOfAxis.hxx +++ b/opencascade/AIS_TypeOfAxis.hxx @@ -20,10 +20,10 @@ //! Declares the type of axis. enum AIS_TypeOfAxis { -AIS_TOAX_Unknown, -AIS_TOAX_XAxis, -AIS_TOAX_YAxis, -AIS_TOAX_ZAxis + AIS_TOAX_Unknown, + AIS_TOAX_XAxis, + AIS_TOAX_YAxis, + AIS_TOAX_ZAxis }; #endif // _AIS_TypeOfAxis_HeaderFile diff --git a/opencascade/AIS_TypeOfIso.hxx b/opencascade/AIS_TypeOfIso.hxx index 65f7d46f6..989ee0c19 100644 --- a/opencascade/AIS_TypeOfIso.hxx +++ b/opencascade/AIS_TypeOfIso.hxx @@ -20,9 +20,9 @@ //! Declares the type of isoparameter displayed. enum AIS_TypeOfIso { -AIS_TOI_IsoU, -AIS_TOI_IsoV, -AIS_TOI_Both + AIS_TOI_IsoU, + AIS_TOI_IsoV, + AIS_TOI_Both }; #endif // _AIS_TypeOfIso_HeaderFile diff --git a/opencascade/AIS_TypeOfPlane.hxx b/opencascade/AIS_TypeOfPlane.hxx index b5dadb261..ce1e138c4 100644 --- a/opencascade/AIS_TypeOfPlane.hxx +++ b/opencascade/AIS_TypeOfPlane.hxx @@ -20,10 +20,10 @@ //! Declares the type of plane. enum AIS_TypeOfPlane { -AIS_TOPL_Unknown, -AIS_TOPL_XYPlane, -AIS_TOPL_XZPlane, -AIS_TOPL_YZPlane + AIS_TOPL_Unknown, + AIS_TOPL_XYPlane, + AIS_TOPL_XZPlane, + AIS_TOPL_YZPlane }; #endif // _AIS_TypeOfPlane_HeaderFile diff --git a/opencascade/AIS_ViewController.hxx b/opencascade/AIS_ViewController.hxx index 0215bdde6..116ec4f9d 100644 --- a/opencascade/AIS_ViewController.hxx +++ b/opencascade/AIS_ViewController.hxx @@ -48,12 +48,12 @@ class WNT_HIDSpaceMouse; //! Class implements the following features: //! - Buffers storing the state of user input (mouse, touches and keyboard). //! - Mapping mouse/multi-touch input to View camera manipulations (panning/rotating/zooming). -//! - Input events are not applied immediately but queued for separate processing from two working threads +//! - Input events are not applied immediately but queued for separate processing from two working +//! threads //! UI thread receiving user input and Rendering thread for OCCT 3D Viewer drawing. class AIS_ViewController : public Aspect_WindowInputListener { public: - //! Empty constructor. Standard_EXPORT AIS_ViewController(); @@ -61,16 +61,25 @@ public: Standard_EXPORT virtual ~AIS_ViewController(); //! Return input buffer. - const AIS_ViewInputBuffer& InputBuffer (AIS_ViewInputBufferType theType) const { return theType == AIS_ViewInputBufferType_UI ? myUI : myGL; } + const AIS_ViewInputBuffer& InputBuffer(AIS_ViewInputBufferType theType) const + { + return theType == AIS_ViewInputBufferType_UI ? myUI : myGL; + } //! Return input buffer. - AIS_ViewInputBuffer& ChangeInputBuffer (AIS_ViewInputBufferType theType) { return theType == AIS_ViewInputBufferType_UI ? myUI : myGL; } + AIS_ViewInputBuffer& ChangeInputBuffer(AIS_ViewInputBufferType theType) + { + return theType == AIS_ViewInputBufferType_UI ? myUI : myGL; + } //! Return view animation; empty (but not NULL) animation by default. const Handle(AIS_AnimationCamera)& ViewAnimation() const { return myViewAnimation; } //! Set view animation to be handled within handleViewRedraw(). - void SetViewAnimation (const Handle(AIS_AnimationCamera)& theAnimation) { myViewAnimation = theAnimation; } + void SetViewAnimation(const Handle(AIS_AnimationCamera)& theAnimation) + { + myViewAnimation = theAnimation; + } //! Interrupt active view animation. Standard_EXPORT void AbortViewAnimation(); @@ -79,197 +88,203 @@ public: const Handle(AIS_Animation)& ObjectsAnimation() const { return myObjAnimation; } //! Set object animation to be handled within handleViewRedraw(). - void SetObjectsAnimation (const Handle(AIS_Animation)& theAnimation) { myObjAnimation = theAnimation; } + void SetObjectsAnimation(const Handle(AIS_Animation)& theAnimation) + { + myObjAnimation = theAnimation; + } //! Return TRUE if object animation should be paused on mouse click; FALSE by default. bool ToPauseObjectsAnimation() const { return myToPauseObjAnimation; } //! Set if object animation should be paused on mouse click. - void SetPauseObjectsAnimation (bool theToPause) { myToPauseObjAnimation = theToPause; } + void SetPauseObjectsAnimation(bool theToPause) { myToPauseObjAnimation = theToPause; } //! Return TRUE if continuous redrawing is enabled; FALSE by default. - //! This option would request a next viewer frame to be completely redrawn right after current frame is finished. + //! This option would request a next viewer frame to be completely redrawn right after current + //! frame is finished. bool IsContinuousRedraw() const { return myIsContinuousRedraw; } //! Enable or disable continuous updates. - void SetContinuousRedraw (bool theToEnable) { myIsContinuousRedraw = theToEnable; } + void SetContinuousRedraw(bool theToEnable) { myIsContinuousRedraw = theToEnable; } public: //! @name global parameters - //! Return camera rotation mode, AIS_RotationMode_BndBoxActive by default. AIS_RotationMode RotationMode() const { return myRotationMode; } //! Set camera rotation mode. - void SetRotationMode (AIS_RotationMode theMode) { myRotationMode = theMode; } + void SetRotationMode(AIS_RotationMode theMode) { myRotationMode = theMode; } //! Return camera navigation mode; AIS_NavigationMode_Orbit by default. AIS_NavigationMode NavigationMode() const { return myNavigationMode; } //! Set camera navigation mode. - Standard_EXPORT void SetNavigationMode (AIS_NavigationMode theMode); + Standard_EXPORT void SetNavigationMode(AIS_NavigationMode theMode); //! Return mouse input acceleration ratio in First Person mode; 1.0 by default. float MouseAcceleration() const { return myMouseAccel; } //! Set mouse input acceleration ratio. - void SetMouseAcceleration (float theRatio) { myMouseAccel = theRatio; } + void SetMouseAcceleration(float theRatio) { myMouseAccel = theRatio; } //! Return orbit rotation acceleration ratio; 1.0 by default. float OrbitAcceleration() const { return myOrbitAccel; } //! Set orbit rotation acceleration ratio. - void SetOrbitAcceleration (float theRatio) { myOrbitAccel = theRatio; } + void SetOrbitAcceleration(float theRatio) { myOrbitAccel = theRatio; } - //! Return TRUE if panning anchor point within perspective projection should be displayed in 3D Viewer; TRUE by default. + //! Return TRUE if panning anchor point within perspective projection should be displayed in 3D + //! Viewer; TRUE by default. bool ToShowPanAnchorPoint() const { return myToShowPanAnchorPoint; } //! Set if panning anchor point within perspective projection should be displayed in 3D Viewer. - void SetShowPanAnchorPoint (bool theToShow) { myToShowPanAnchorPoint = theToShow; } + void SetShowPanAnchorPoint(bool theToShow) { myToShowPanAnchorPoint = theToShow; } //! Return TRUE if rotation point should be displayed in 3D Viewer; TRUE by default. bool ToShowRotateCenter() const { return myToShowRotateCenter; } //! Set if rotation point should be displayed in 3D Viewer. - void SetShowRotateCenter (bool theToShow) { myToShowRotateCenter = theToShow; } + void SetShowRotateCenter(bool theToShow) { myToShowRotateCenter = theToShow; } - //! Return TRUE if camera up orientation within AIS_NavigationMode_Orbit rotation mode should be forced Z up; FALSE by default. + //! Return TRUE if camera up orientation within AIS_NavigationMode_Orbit rotation mode should be + //! forced Z up; FALSE by default. bool ToLockOrbitZUp() const { return myToLockOrbitZUp; } - //! Set if camera up orientation within AIS_NavigationMode_Orbit rotation mode should be forced Z up. - void SetLockOrbitZUp (bool theToForceUp) { myToLockOrbitZUp = theToForceUp; } + //! Set if camera up orientation within AIS_NavigationMode_Orbit rotation mode should be forced Z + //! up. + void SetLockOrbitZUp(bool theToForceUp) { myToLockOrbitZUp = theToForceUp; } //! Return TRUE if z-rotation via two-touches gesture is enabled; FALSE by default. bool ToAllowTouchZRotation() const { return myToAllowTouchZRotation; } //! Set if z-rotation via two-touches gesture is enabled. - void SetAllowTouchZRotation (bool theToEnable) { myToAllowTouchZRotation = theToEnable; } + void SetAllowTouchZRotation(bool theToEnable) { myToAllowTouchZRotation = theToEnable; } //! Return TRUE if camera rotation is allowed; TRUE by default. bool ToAllowRotation() const { return myToAllowRotation; } //! Set if camera rotation is allowed. - void SetAllowRotation (bool theToEnable) { myToAllowRotation = theToEnable; } + void SetAllowRotation(bool theToEnable) { myToAllowRotation = theToEnable; } //! Return TRUE if panning is allowed; TRUE by default. bool ToAllowPanning() const { return myToAllowPanning; } //! Set if panning is allowed. - void SetAllowPanning (bool theToEnable) { myToAllowPanning = theToEnable; } + void SetAllowPanning(bool theToEnable) { myToAllowPanning = theToEnable; } //! Return TRUE if zooming is allowed; TRUE by default. bool ToAllowZooming() const { return myToAllowZooming; } //! Set if zooming is allowed. - void SetAllowZooming (bool theToEnable) { myToAllowZooming = theToEnable; } + void SetAllowZooming(bool theToEnable) { myToAllowZooming = theToEnable; } //! Return TRUE if ZFocus change is allowed; TRUE by default. bool ToAllowZFocus() const { return myToAllowZFocus; } //! Set if ZFocus change is allowed. - void SetAllowZFocus (bool theToEnable) { myToAllowZFocus = theToEnable; } + void SetAllowZFocus(bool theToEnable) { myToAllowZFocus = theToEnable; } //! Return TRUE if dynamic highlight on mouse move is allowed; TRUE by default. bool ToAllowHighlight() const { return myToAllowHighlight; } //! Set if dragging object is allowed. - void SetAllowHighlight (bool theToEnable) { myToAllowHighlight = theToEnable; } + void SetAllowHighlight(bool theToEnable) { myToAllowHighlight = theToEnable; } //! Return TRUE if dragging object is allowed; TRUE by default. bool ToAllowDragging() const { return myToAllowDragging; } //! Set if dynamic highlight on mouse move is allowed. - void SetAllowDragging (bool theToEnable) { myToAllowDragging = theToEnable; } + void SetAllowDragging(bool theToEnable) { myToAllowDragging = theToEnable; } - //! Return TRUE if picked point should be projected to picking ray on zooming at point; TRUE by default. + //! Return TRUE if picked point should be projected to picking ray on zooming at point; TRUE by + //! default. bool ToStickToRayOnZoom() const { return myToStickToRayOnZoom; } //! Set if picked point should be projected to picking ray on zooming at point. - void SetStickToRayOnZoom (bool theToEnable) { myToStickToRayOnZoom = theToEnable; } + void SetStickToRayOnZoom(bool theToEnable) { myToStickToRayOnZoom = theToEnable; } - //! Return TRUE if picked point should be projected to picking ray on rotating around point; TRUE by default. + //! Return TRUE if picked point should be projected to picking ray on rotating around point; TRUE + //! by default. bool ToStickToRayOnRotation() const { return myToStickToRayOnRotation; } //! Set if picked point should be projected to picking ray on rotating around point. - void SetStickToRayOnRotation (bool theToEnable) { myToStickToRayOnRotation = theToEnable; } + void SetStickToRayOnRotation(bool theToEnable) { myToStickToRayOnRotation = theToEnable; } - //! Return TRUE if pitch direction should be inverted while processing Aspect_VKey_NavLookUp/Aspect_VKey_NavLookDown; FALSE by default. + //! Return TRUE if pitch direction should be inverted while processing + //! Aspect_VKey_NavLookUp/Aspect_VKey_NavLookDown; FALSE by default. bool ToInvertPitch() const { return myToInvertPitch; } //! Set flag inverting pitch direction. - void SetInvertPitch (bool theToInvert) { myToInvertPitch = theToInvert; } + void SetInvertPitch(bool theToInvert) { myToInvertPitch = theToInvert; } //! Return normal walking speed, in m/s; 1.5 by default. float WalkSpeedAbsolute() const { return myWalkSpeedAbsolute; } //! Set normal walking speed, in m/s; 1.5 by default. - void SetWalkSpeedAbsolute (float theSpeed) { myWalkSpeedAbsolute = theSpeed; } + void SetWalkSpeedAbsolute(float theSpeed) { myWalkSpeedAbsolute = theSpeed; } //! Return walking speed relative to scene bounding box; 0.1 by default. float WalkSpeedRelative() const { return myWalkSpeedRelative; } //! Set walking speed relative to scene bounding box. - void SetWalkSpeedRelative (float theFactor) { myWalkSpeedRelative = theFactor; } + void SetWalkSpeedRelative(float theFactor) { myWalkSpeedRelative = theFactor; } //! Return active thrust value; 0.0f by default. float ThrustSpeed() const { return myThrustSpeed; } //! Set active thrust value. - void SetThrustSpeed (float theSpeed) { myThrustSpeed = theSpeed; } + void SetThrustSpeed(float theSpeed) { myThrustSpeed = theSpeed; } //! Return TRUE if previous position of MoveTo has been defined. - bool HasPreviousMoveTo() const { return myPrevMoveTo != Graphic3d_Vec2i (-1); } + bool HasPreviousMoveTo() const { return myPrevMoveTo != Graphic3d_Vec2i(-1); } //! Return previous position of MoveTo event in 3D viewer. const Graphic3d_Vec2i& PreviousMoveTo() const { return myPrevMoveTo; } //! Reset previous position of MoveTo. - void ResetPreviousMoveTo() { myPrevMoveTo = Graphic3d_Vec2i (-1); } + void ResetPreviousMoveTo() { myPrevMoveTo = Graphic3d_Vec2i(-1); } //! Return TRUE to display auxiliary tracked XR devices (like tracking stations). bool ToDisplayXRAuxDevices() const { return myToDisplayXRAuxDevices; } //! Set if auxiliary tracked XR devices should be displayed. - void SetDisplayXRAuxDevices (bool theToDisplay) { myToDisplayXRAuxDevices = theToDisplay; } + void SetDisplayXRAuxDevices(bool theToDisplay) { myToDisplayXRAuxDevices = theToDisplay; } //! Return TRUE to display XR hand controllers. bool ToDisplayXRHands() const { return myToDisplayXRHands; } //! Set if tracked XR hand controllers should be displayed. - void SetDisplayXRHands (bool theToDisplay) { myToDisplayXRHands = theToDisplay; } + void SetDisplayXRHands(bool theToDisplay) { myToDisplayXRHands = theToDisplay; } public: //! @name keyboard input - - using Aspect_WindowInputListener::Keys; using Aspect_WindowInputListener::ChangeKeys; + using Aspect_WindowInputListener::Keys; //! Press key. //! Default implementation updates internal cache. //! @param theKey key pressed //! @param theTime event timestamp - Standard_EXPORT virtual void KeyDown (Aspect_VKey theKey, - double theTime, - double thePressure = 1.0) Standard_OVERRIDE; + Standard_EXPORT virtual void KeyDown(Aspect_VKey theKey, + double theTime, + double thePressure = 1.0) Standard_OVERRIDE; //! Release key. //! Default implementation updates internal cache. //! @param theKey key pressed //! @param theTime event timestamp - Standard_EXPORT virtual void KeyUp (Aspect_VKey theKey, - double theTime) Standard_OVERRIDE; + Standard_EXPORT virtual void KeyUp(Aspect_VKey theKey, double theTime) Standard_OVERRIDE; //! Simulate key up/down events from axis value. //! Default implementation updates internal cache. - Standard_EXPORT virtual void KeyFromAxis (Aspect_VKey theNegative, - Aspect_VKey thePositive, - double theTime, - double thePressure) Standard_OVERRIDE; + Standard_EXPORT virtual void KeyFromAxis(Aspect_VKey theNegative, + Aspect_VKey thePositive, + double theTime, + double thePressure) Standard_OVERRIDE; //! Fetch active navigation actions. - Standard_EXPORT AIS_WalkDelta FetchNavigationKeys (Standard_Real theCrouchRatio, - Standard_Real theRunRatio); + Standard_EXPORT AIS_WalkDelta FetchNavigationKeys(Standard_Real theCrouchRatio, + Standard_Real theRunRatio); public: //! @name mouse input - //! Return map defining mouse gestures. const AIS_MouseGestureMap& MouseGestureMap() const { return myMouseGestureMap; } @@ -277,7 +292,10 @@ public: //! @name mouse input AIS_MouseGestureMap& ChangeMouseGestureMap() { return myMouseGestureMap; } //! Return map defining mouse selection schemes. - const AIS_MouseSelectionSchemeMap& MouseSelectionSchemes() const { return myMouseSelectionSchemes; } + const AIS_MouseSelectionSchemeMap& MouseSelectionSchemes() const + { + return myMouseSelectionSchemes; + } //! Return map defining mouse gestures. AIS_MouseSelectionSchemeMap& ChangeMouseSelectionSchemes() { return myMouseSelectionSchemes; } @@ -286,52 +304,54 @@ public: //! @name mouse input double MouseDoubleClickInterval() const { return myMouseDoubleClickInt; } //! Set double click interval in seconds. - void SetMouseDoubleClickInterval (double theSeconds) { myMouseDoubleClickInt = theSeconds; } + void SetMouseDoubleClickInterval(double theSeconds) { myMouseDoubleClickInt = theSeconds; } //! Perform selection in 3D viewer. //! This method is expected to be called from UI thread. //! @param thePnt picking point //! @param theScheme selection scheme - Standard_EXPORT virtual void SelectInViewer (const Graphic3d_Vec2i& thePnt, - const AIS_SelectionScheme theScheme = AIS_SelectionScheme_Replace); + Standard_EXPORT virtual void SelectInViewer( + const Graphic3d_Vec2i& thePnt, + const AIS_SelectionScheme theScheme = AIS_SelectionScheme_Replace); //! Perform selection in 3D viewer. //! This method is expected to be called from UI thread. //! @param thePnts picking point //! @param theScheme selection scheme - Standard_EXPORT virtual void SelectInViewer (const NCollection_Sequence& thePnts, - const AIS_SelectionScheme theScheme = AIS_SelectionScheme_Replace); + Standard_EXPORT virtual void SelectInViewer( + const NCollection_Sequence& thePnts, + const AIS_SelectionScheme theScheme = AIS_SelectionScheme_Replace); //! Update rectangle selection tool. //! This method is expected to be called from UI thread. //! @param thePntFrom rectangle first corner //! @param thePntTo rectangle another corner - Standard_EXPORT virtual void UpdateRubberBand (const Graphic3d_Vec2i& thePntFrom, - const Graphic3d_Vec2i& thePntTo); + Standard_EXPORT virtual void UpdateRubberBand(const Graphic3d_Vec2i& thePntFrom, + const Graphic3d_Vec2i& thePntTo); //! Update polygonal selection tool. //! This method is expected to be called from UI thread. //! @param thePnt new point to add to polygon //! @param theToAppend append new point or update the last point - Standard_EXPORT virtual void UpdatePolySelection (const Graphic3d_Vec2i& thePnt, - bool theToAppend); + Standard_EXPORT virtual void UpdatePolySelection(const Graphic3d_Vec2i& thePnt, bool theToAppend); //! Update zoom event (e.g. from mouse scroll). //! This method is expected to be called from UI thread. //! @param theDelta mouse cursor position to zoom at and zoom delta //! @return TRUE if new zoom event has been created or FALSE if existing one has been updated - Standard_EXPORT virtual bool UpdateZoom (const Aspect_ScrollDelta& theDelta); + Standard_EXPORT virtual bool UpdateZoom(const Aspect_ScrollDelta& theDelta); //! Update Z rotation event. //! @param theAngle rotation angle, in radians. //! @return TRUE if new zoom event has been created or FALSE if existing one has been updated - Standard_EXPORT virtual bool UpdateZRotation (double theAngle); + Standard_EXPORT virtual bool UpdateZRotation(double theAngle); //! Update mouse scroll event; redirects to UpdateZoom by default. //! This method is expected to be called from UI thread. //! @param theDelta mouse cursor position and delta //! @return TRUE if new event has been created or FALSE if existing one has been updated - Standard_EXPORT virtual bool UpdateMouseScroll (const Aspect_ScrollDelta& theDelta) Standard_OVERRIDE; + Standard_EXPORT virtual bool UpdateMouseScroll(const Aspect_ScrollDelta& theDelta) + Standard_OVERRIDE; //! Handle mouse button press/release event. //! This method is expected to be called from UI thread. @@ -341,10 +361,10 @@ public: //! @name mouse input //! @param theIsEmulated if TRUE then mouse event comes NOT from real mouse //! but emulated from non-precise input like touch on screen //! @return TRUE if View should be redrawn - Standard_EXPORT virtual bool UpdateMouseButtons (const Graphic3d_Vec2i& thePoint, - Aspect_VKeyMouse theButtons, - Aspect_VKeyFlags theModifiers, - bool theIsEmulated) Standard_OVERRIDE; + Standard_EXPORT virtual bool UpdateMouseButtons(const Graphic3d_Vec2i& thePoint, + Aspect_VKeyMouse theButtons, + Aspect_VKeyFlags theModifiers, + bool theIsEmulated) Standard_OVERRIDE; //! Handle mouse cursor movement event. //! This method is expected to be called from UI thread. @@ -354,93 +374,90 @@ public: //! @name mouse input //! @param theIsEmulated if TRUE then mouse event comes NOT from real mouse //! but emulated from non-precise input like touch on screen //! @return TRUE if View should be redrawn - Standard_EXPORT virtual bool UpdateMousePosition (const Graphic3d_Vec2i& thePoint, - Aspect_VKeyMouse theButtons, - Aspect_VKeyFlags theModifiers, - bool theIsEmulated) Standard_OVERRIDE; - - //! Handle mouse button click event (emulated by UpdateMouseButtons() while releasing single button). - //! Note that as this method is called by UpdateMouseButtons(), it should be executed from UI thread. - //! Default implementation redirects to SelectInViewer(). - //! This method is expected to be called from UI thread. + Standard_EXPORT virtual bool UpdateMousePosition(const Graphic3d_Vec2i& thePoint, + Aspect_VKeyMouse theButtons, + Aspect_VKeyFlags theModifiers, + bool theIsEmulated) Standard_OVERRIDE; + + //! Handle mouse button click event (emulated by UpdateMouseButtons() while releasing single + //! button). Note that as this method is called by UpdateMouseButtons(), it should be executed + //! from UI thread. Default implementation redirects to SelectInViewer(). This method is expected + //! to be called from UI thread. //! @param thePoint mouse cursor position //! @param theButton clicked button //! @param theModifiers key modifiers //! @param theIsDoubleClick flag indicating double mouse click //! @return TRUE if View should be redrawn - Standard_EXPORT virtual bool UpdateMouseClick (const Graphic3d_Vec2i& thePoint, - Aspect_VKeyMouse theButton, - Aspect_VKeyFlags theModifiers, - bool theIsDoubleClick); + Standard_EXPORT virtual bool UpdateMouseClick(const Graphic3d_Vec2i& thePoint, + Aspect_VKeyMouse theButton, + Aspect_VKeyFlags theModifiers, + bool theIsDoubleClick); using Aspect_WindowInputListener::PressMouseButton; using Aspect_WindowInputListener::ReleaseMouseButton; - using Aspect_WindowInputListener::PressedMouseButtons; using Aspect_WindowInputListener::LastMouseFlags; using Aspect_WindowInputListener::LastMousePosition; + using Aspect_WindowInputListener::PressedMouseButtons; public: //! @name multi-touch input - //! Return scale factor for adjusting tolerances for starting multi-touch gestures; 1.0 by default //! This scale factor is expected to be computed from touch screen resolution. float TouchToleranceScale() const { return myTouchToleranceScale; } //! Set scale factor for adjusting tolerances for starting multi-touch gestures. - void SetTouchToleranceScale (float theTolerance) { myTouchToleranceScale = theTolerance; } + void SetTouchToleranceScale(float theTolerance) { myTouchToleranceScale = theTolerance; } //! Add touch point with the given ID. //! This method is expected to be called from UI thread. //! @param theId touch unique identifier //! @param thePnt touch coordinates //! @param theClearBefore if TRUE previously registered touches will be removed - Standard_EXPORT virtual void AddTouchPoint (Standard_Size theId, - const Graphic3d_Vec2d& thePnt, - Standard_Boolean theClearBefore = false) Standard_OVERRIDE; + Standard_EXPORT virtual void AddTouchPoint(Standard_Size theId, + const Graphic3d_Vec2d& thePnt, + Standard_Boolean theClearBefore = false) + Standard_OVERRIDE; //! Remove touch point with the given ID. //! This method is expected to be called from UI thread. //! @param theId touch unique identifier //! @param theClearSelectPnts if TRUE will initiate clearing of selection points //! @return TRUE if point has been removed - Standard_EXPORT virtual bool RemoveTouchPoint (Standard_Size theId, - Standard_Boolean theClearSelectPnts = false) Standard_OVERRIDE; + Standard_EXPORT virtual bool RemoveTouchPoint(Standard_Size theId, + Standard_Boolean theClearSelectPnts = false) + Standard_OVERRIDE; //! Update touch point with the given ID. //! If point with specified ID was not registered before, it will be added. //! This method is expected to be called from UI thread. //! @param theId touch unique identifier //! @param thePnt touch coordinates - Standard_EXPORT virtual void UpdateTouchPoint (Standard_Size theId, - const Graphic3d_Vec2d& thePnt) Standard_OVERRIDE; + Standard_EXPORT virtual void UpdateTouchPoint(Standard_Size theId, + const Graphic3d_Vec2d& thePnt) Standard_OVERRIDE; using Aspect_WindowInputListener::HasTouchPoints; public: //! @name 3d mouse input - //! Process 3d mouse input event (redirects to translation, rotation and keys). - Standard_EXPORT virtual bool Update3dMouse (const WNT_HIDSpaceMouse& theEvent) Standard_OVERRIDE; + Standard_EXPORT virtual bool Update3dMouse(const WNT_HIDSpaceMouse& theEvent) Standard_OVERRIDE; public: //! @name resize events - //! Handle expose event (window content has been invalidation and should be redrawn). //! Default implementation does nothing. virtual void ProcessExpose() Standard_OVERRIDE {} //! Handle window resize event. //! Default implementation does nothing. - virtual void ProcessConfigure (bool theIsResized) Standard_OVERRIDE - { - (void )theIsResized; - } + virtual void ProcessConfigure(bool theIsResized) Standard_OVERRIDE { (void)theIsResized; } //! Handle window input event immediately. - //! Default implementation does nothing - input events are accumulated in internal buffer until explicit FlushViewEvents() call. + //! Default implementation does nothing - input events are accumulated in internal buffer until + //! explicit FlushViewEvents() call. virtual void ProcessInput() Standard_OVERRIDE {} //! Handle focus event. //! Default implementation resets cached input state (pressed keys). - virtual void ProcessFocus (bool theIsActivated) Standard_OVERRIDE + virtual void ProcessFocus(bool theIsActivated) Standard_OVERRIDE { if (!theIsActivated) { @@ -453,7 +470,6 @@ public: //! @name resize events virtual void ProcessClose() Standard_OVERRIDE {} public: - using Aspect_WindowInputListener::EventTime; //! Reset input state (pressed keys, mouse buttons, etc.) e.g. on window focus loss. @@ -462,8 +478,8 @@ public: //! Reset view orientation. //! This method is expected to be called from UI thread. - Standard_EXPORT virtual void UpdateViewOrientation (V3d_TypeOfOrientation theOrientation, - bool theToFitAll); + Standard_EXPORT virtual void UpdateViewOrientation(V3d_TypeOfOrientation theOrientation, + bool theToFitAll); //! Update buffer for rendering thread. //! This method is expected to be called within synchronization barrier between GUI @@ -471,138 +487,141 @@ public: //! @param theCtx interactive context //! @param theView active view //! @param theToHandle if TRUE, the HandleViewEvents() will be called - Standard_EXPORT virtual void FlushViewEvents (const Handle(AIS_InteractiveContext)& theCtx, - const Handle(V3d_View)& theView, - Standard_Boolean theToHandle = Standard_False); + Standard_EXPORT virtual void FlushViewEvents(const Handle(AIS_InteractiveContext)& theCtx, + const Handle(V3d_View)& theView, + Standard_Boolean theToHandle = Standard_False); //! Process events within rendering thread. - Standard_EXPORT virtual void HandleViewEvents (const Handle(AIS_InteractiveContext)& theCtx, - const Handle(V3d_View)& theView); + Standard_EXPORT virtual void HandleViewEvents(const Handle(AIS_InteractiveContext)& theCtx, + const Handle(V3d_View)& theView); public: - //! Callback called by handleMoveTo() on Selection in 3D Viewer. //! This method is expected to be called from rendering thread. - Standard_EXPORT virtual void OnSelectionChanged (const Handle(AIS_InteractiveContext)& theCtx, - const Handle(V3d_View)& theView); + Standard_EXPORT virtual void OnSelectionChanged(const Handle(AIS_InteractiveContext)& theCtx, + const Handle(V3d_View)& theView); //! Callback called by handleMoveTo() on dragging object in 3D Viewer. //! This method is expected to be called from rendering thread. - Standard_EXPORT virtual void OnObjectDragged (const Handle(AIS_InteractiveContext)& theCtx, - const Handle(V3d_View)& theView, - AIS_DragAction theAction); + Standard_EXPORT virtual void OnObjectDragged(const Handle(AIS_InteractiveContext)& theCtx, + const Handle(V3d_View)& theView, + AIS_DragAction theAction); //! Callback called by HandleViewEvents() on Selection of another (sub)view. //! This method is expected to be called from rendering thread. - Standard_EXPORT virtual void OnSubviewChanged (const Handle(AIS_InteractiveContext)& theCtx, - const Handle(V3d_View)& theOldView, - const Handle(V3d_View)& theNewView); + Standard_EXPORT virtual void OnSubviewChanged(const Handle(AIS_InteractiveContext)& theCtx, + const Handle(V3d_View)& theOldView, + const Handle(V3d_View)& theNewView); //! Pick closest point under mouse cursor. //! This method is expected to be called from rendering thread. - //! @param thePnt [out] result point - //! @param theCtx [in] interactive context - //! @param theView [in] active view - //! @param theCursor [in] mouse cursor - //! @param theToStickToPickRay [in] when TRUE, the result point will lie on picking ray + //! @param[out] thePnt result point + //! @param[in] theCtx interactive context + //! @param[in] theView active view + //! @param[in] theCursor mouse cursor + //! @param[in] theToStickToPickRay when TRUE, the result point will lie on picking ray //! @return TRUE if result has been found - Standard_EXPORT virtual bool PickPoint (gp_Pnt& thePnt, - const Handle(AIS_InteractiveContext)& theCtx, - const Handle(V3d_View)& theView, - const Graphic3d_Vec2i& theCursor, - bool theToStickToPickRay); + Standard_EXPORT virtual bool PickPoint(gp_Pnt& thePnt, + const Handle(AIS_InteractiveContext)& theCtx, + const Handle(V3d_View)& theView, + const Graphic3d_Vec2i& theCursor, + bool theToStickToPickRay); //! Pick closest point by axis. //! This method is expected to be called from rendering thread. - //! @param theTopPnt [out] result point - //! @param theCtx [in] interactive context - //! @param theView [in] active view - //! @param theAxis [in] selection axis + //! @param[out] theTopPnt result point + //! @param[in] theCtx interactive context + //! @param[in] theView active view + //! @param[in] theAxis selection axis //! @return TRUE if result has been found - Standard_EXPORT virtual bool PickAxis (gp_Pnt& theTopPnt, - const Handle(AIS_InteractiveContext)& theCtx, - const Handle(V3d_View)& theView, - const gp_Ax1& theAxis); + Standard_EXPORT virtual bool PickAxis(gp_Pnt& theTopPnt, + const Handle(AIS_InteractiveContext)& theCtx, + const Handle(V3d_View)& theView, + const gp_Ax1& theAxis); //! Compute rotation gravity center point depending on rotation mode. //! This method is expected to be called from rendering thread. - Standard_EXPORT virtual gp_Pnt GravityPoint (const Handle(AIS_InteractiveContext)& theCtx, - const Handle(V3d_View)& theView); + Standard_EXPORT virtual gp_Pnt GravityPoint(const Handle(AIS_InteractiveContext)& theCtx, + const Handle(V3d_View)& theView); //! Modify view camera to fit all objects. - //! Default implementation fits either all visible and all selected objects (swapped on each call). - Standard_EXPORT virtual void FitAllAuto (const Handle(AIS_InteractiveContext)& theCtx, - const Handle(V3d_View)& theView); + //! Default implementation fits either all visible and all selected objects (swapped on each + //! call). + Standard_EXPORT virtual void FitAllAuto(const Handle(AIS_InteractiveContext)& theCtx, + const Handle(V3d_View)& theView); public: - //! Handle hot-keys defining new camera orientation (Aspect_VKey_ViewTop and similar keys). - //! Default implementation starts an animated transaction from the current to the target camera orientation, when specific action key was pressed. - //! This method is expected to be called from rendering thread. - Standard_EXPORT virtual void handleViewOrientationKeys (const Handle(AIS_InteractiveContext)& theCtx, - const Handle(V3d_View)& theView); + //! Default implementation starts an animated transaction from the current to the target camera + //! orientation, when specific action key was pressed. This method is expected to be called from + //! rendering thread. + Standard_EXPORT virtual void handleViewOrientationKeys( + const Handle(AIS_InteractiveContext)& theCtx, + const Handle(V3d_View)& theView); //! Perform navigation (Aspect_VKey_NavForward and similar keys). //! This method is expected to be called from rendering thread. - Standard_EXPORT virtual AIS_WalkDelta handleNavigationKeys (const Handle(AIS_InteractiveContext)& theCtx, - const Handle(V3d_View)& theView); + Standard_EXPORT virtual AIS_WalkDelta handleNavigationKeys( + const Handle(AIS_InteractiveContext)& theCtx, + const Handle(V3d_View)& theView); //! Perform immediate camera actions (rotate/zoom/pan) on gesture progress. //! This method is expected to be called from rendering thread. - Standard_EXPORT virtual void handleCameraActions (const Handle(AIS_InteractiveContext)& theCtx, - const Handle(V3d_View)& theView, - const AIS_WalkDelta& theWalk); + Standard_EXPORT virtual void handleCameraActions(const Handle(AIS_InteractiveContext)& theCtx, + const Handle(V3d_View)& theView, + const AIS_WalkDelta& theWalk); //! Perform moveto/selection/dragging. //! This method is expected to be called from rendering thread. - Standard_EXPORT virtual void handleMoveTo (const Handle(AIS_InteractiveContext)& theCtx, - const Handle(V3d_View)& theView); + Standard_EXPORT virtual void handleMoveTo(const Handle(AIS_InteractiveContext)& theCtx, + const Handle(V3d_View)& theView); //! Return TRUE if another frame should be drawn right after this one. bool toAskNextFrame() const { return myToAskNextFrame; } //! Set if another frame should be drawn right after this one. - void setAskNextFrame (bool theToDraw = true) { myToAskNextFrame = theToDraw; } + void setAskNextFrame(bool theToDraw = true) { myToAskNextFrame = theToDraw; } //! Return if panning anchor point has been defined. - bool hasPanningAnchorPoint() const { return !Precision::IsInfinite (myPanPnt3d.X()); } + bool hasPanningAnchorPoint() const { return !Precision::IsInfinite(myPanPnt3d.X()); } //! Return active panning anchor point. const gp_Pnt& panningAnchorPoint() const { return myPanPnt3d; } //! Set active panning anchor point. - void setPanningAnchorPoint (const gp_Pnt& thePnt) { myPanPnt3d = thePnt; } + void setPanningAnchorPoint(const gp_Pnt& thePnt) { myPanPnt3d = thePnt; } //! Handle panning event myGL.Panning. - Standard_EXPORT virtual void handlePanning (const Handle(V3d_View)& theView); + Standard_EXPORT virtual void handlePanning(const Handle(V3d_View)& theView); //! Handle Z rotation event myGL.ZRotate. - Standard_EXPORT virtual void handleZRotate (const Handle(V3d_View)& theView); + Standard_EXPORT virtual void handleZRotate(const Handle(V3d_View)& theView); //! Return minimal camera distance for zoom operation. double MinZoomDistance() const { return myMinCamDistance; } //! Set minimal camera distance for zoom operation. - void SetMinZoomDistance (double theDist) { myMinCamDistance = theDist; } + void SetMinZoomDistance(double theDist) { myMinCamDistance = theDist; } //! Handle zoom event myGL.ZoomActions. //! This method is expected to be called from rendering thread. - Standard_EXPORT virtual void handleZoom (const Handle(V3d_View)& theView, - const Aspect_ScrollDelta& theParams, - const gp_Pnt* thePnt); + Standard_EXPORT virtual void handleZoom(const Handle(V3d_View)& theView, + const Aspect_ScrollDelta& theParams, + const gp_Pnt* thePnt); //! Handle ZScroll event myGL.ZoomActions. //! This method is expected to be called from rendering thread. - Standard_EXPORT virtual void handleZFocusScroll (const Handle(V3d_View)& theView, - const Aspect_ScrollDelta& theParams); + Standard_EXPORT virtual void handleZFocusScroll(const Handle(V3d_View)& theView, + const Aspect_ScrollDelta& theParams); //! Handle orbital rotation events myGL.OrbitRotation. //! @param theView view to modify //! @param thePnt 3D point to rotate around - //! @param theToLockZUp amend camera to exclude roll angle (put camera Up vector to plane containing global Z and view direction) - Standard_EXPORT virtual void handleOrbitRotation (const Handle(V3d_View)& theView, - const gp_Pnt& thePnt, - bool theToLockZUp); + //! @param theToLockZUp amend camera to exclude roll angle (put camera Up vector to plane + //! containing global Z and view direction) + Standard_EXPORT virtual void handleOrbitRotation(const Handle(V3d_View)& theView, + const gp_Pnt& thePnt, + bool theToLockZUp); //! Handle view direction rotation events myGL.ViewRotation. //! This method is expected to be called from rendering thread. @@ -611,98 +630,96 @@ public: //! @param thePitchExtra extra pitch increment //! @param theRoll roll value //! @param theToRestartOnIncrement flag indicating flight mode - Standard_EXPORT virtual void handleViewRotation (const Handle(V3d_View)& theView, - double theYawExtra, - double thePitchExtra, - double theRoll, - bool theToRestartOnIncrement); + Standard_EXPORT virtual void handleViewRotation(const Handle(V3d_View)& theView, + double theYawExtra, + double thePitchExtra, + double theRoll, + bool theToRestartOnIncrement); //! Handle view redraw. //! This method is expected to be called from rendering thread. - Standard_EXPORT virtual void handleViewRedraw (const Handle(AIS_InteractiveContext)& theCtx, - const Handle(V3d_View)& theView); + Standard_EXPORT virtual void handleViewRedraw(const Handle(AIS_InteractiveContext)& theCtx, + const Handle(V3d_View)& theView); public: - //! Perform XR input. //! This method is expected to be called from rendering thread. - Standard_EXPORT virtual void handleXRInput (const Handle(AIS_InteractiveContext)& theCtx, - const Handle(V3d_View)& theView, - const AIS_WalkDelta& theWalk); + Standard_EXPORT virtual void handleXRInput(const Handle(AIS_InteractiveContext)& theCtx, + const Handle(V3d_View)& theView, + const AIS_WalkDelta& theWalk); //! Handle trackpad view turn action. - Standard_EXPORT virtual void handleXRTurnPad (const Handle(AIS_InteractiveContext)& theCtx, - const Handle(V3d_View)& theView); + Standard_EXPORT virtual void handleXRTurnPad(const Handle(AIS_InteractiveContext)& theCtx, + const Handle(V3d_View)& theView); //! Handle trackpad teleportation action. - Standard_EXPORT virtual void handleXRTeleport (const Handle(AIS_InteractiveContext)& theCtx, - const Handle(V3d_View)& theView); + Standard_EXPORT virtual void handleXRTeleport(const Handle(AIS_InteractiveContext)& theCtx, + const Handle(V3d_View)& theView); //! Handle picking on trigger click. - Standard_EXPORT virtual void handleXRPicking (const Handle(AIS_InteractiveContext)& theCtx, - const Handle(V3d_View)& theView); + Standard_EXPORT virtual void handleXRPicking(const Handle(AIS_InteractiveContext)& theCtx, + const Handle(V3d_View)& theView); //! Perform dynamic highlighting for active hand. - Standard_EXPORT virtual void handleXRHighlight (const Handle(AIS_InteractiveContext)& theCtx, - const Handle(V3d_View)& theView); + Standard_EXPORT virtual void handleXRHighlight(const Handle(AIS_InteractiveContext)& theCtx, + const Handle(V3d_View)& theView); //! Display auxiliary XR presentations. - Standard_EXPORT virtual void handleXRPresentations (const Handle(AIS_InteractiveContext)& theCtx, - const Handle(V3d_View)& theView); + Standard_EXPORT virtual void handleXRPresentations(const Handle(AIS_InteractiveContext)& theCtx, + const Handle(V3d_View)& theView); //! Perform picking with/without dynamic highlighting for XR pose. - Standard_EXPORT virtual Standard_Integer handleXRMoveTo (const Handle(AIS_InteractiveContext)& theCtx, - const Handle(V3d_View)& theView, - const gp_Trsf& thePose, - const Standard_Boolean theToHighlight); + Standard_EXPORT virtual Standard_Integer handleXRMoveTo( + const Handle(AIS_InteractiveContext)& theCtx, + const Handle(V3d_View)& theView, + const gp_Trsf& thePose, + const Standard_Boolean theToHighlight); protected: - //! Flush buffers. - Standard_EXPORT virtual void flushBuffers (const Handle(AIS_InteractiveContext)& theCtx, - const Handle(V3d_View)& theView); + Standard_EXPORT virtual void flushBuffers(const Handle(AIS_InteractiveContext)& theCtx, + const Handle(V3d_View)& theView); //! Flush touch gestures. - Standard_EXPORT virtual void flushGestures (const Handle(AIS_InteractiveContext)& theCtx, - const Handle(V3d_View)& theView); + Standard_EXPORT virtual void flushGestures(const Handle(AIS_InteractiveContext)& theCtx, + const Handle(V3d_View)& theView); //! Return current and previously fetched event times. //! This callback is intended to compute delta between sequentially processed events. - //! @param thePrevTime [out] events time fetched previous time by this method - //! @param theCurrTime [out] actual events time - void updateEventsTime (double& thePrevTime, - double& theCurrTime) + //! @param[out] thePrevTime events time fetched previous time by this method + //! @param[out] theCurrTime actual events time + void updateEventsTime(double& thePrevTime, double& theCurrTime) { - thePrevTime = myLastEventsTime; + thePrevTime = myLastEventsTime; myLastEventsTime = EventTime(); - theCurrTime = myLastEventsTime; + theCurrTime = myLastEventsTime; } //! Perform selection via mouse click. //! This method is expected to be called from rendering thread. - Standard_EXPORT virtual void handleSelectionPick (const Handle(AIS_InteractiveContext)& theCtx, - const Handle(V3d_View)& theView); + Standard_EXPORT virtual void handleSelectionPick(const Handle(AIS_InteractiveContext)& theCtx, + const Handle(V3d_View)& theView); //! Perform dynamic highlight on mouse move. //! This method is expected to be called from rendering thread. - Standard_EXPORT virtual void handleDynamicHighlight (const Handle(AIS_InteractiveContext)& theCtx, - const Handle(V3d_View)& theView); + Standard_EXPORT virtual void handleDynamicHighlight(const Handle(AIS_InteractiveContext)& theCtx, + const Handle(V3d_View)& theView); //! Perform rubber-band selection. //! This method is expected to be called from rendering thread. - Standard_EXPORT virtual void handleSelectionPoly (const Handle(AIS_InteractiveContext)& theCtx, - const Handle(V3d_View)& theView); + Standard_EXPORT virtual void handleSelectionPoly(const Handle(AIS_InteractiveContext)& theCtx, + const Handle(V3d_View)& theView); //! Lazy AIS_InteractiveContext::MoveTo() with myPrevMoveTo check. - Standard_EXPORT virtual void contextLazyMoveTo (const Handle(AIS_InteractiveContext)& theCtx, - const Handle(V3d_View)& theView, - const Graphic3d_Vec2i& thePnt); + Standard_EXPORT virtual void contextLazyMoveTo(const Handle(AIS_InteractiveContext)& theCtx, + const Handle(V3d_View)& theView, + const Graphic3d_Vec2i& thePnt); protected: + AIS_ViewInputBuffer myUI; //!< buffer for UI thread + AIS_ViewInputBuffer myGL; //!< buffer for rendering thread - AIS_ViewInputBuffer myUI; //!< buffer for UI thread - AIS_ViewInputBuffer myGL; //!< buffer for rendering thread - + // clang-format off Standard_Real myLastEventsTime; //!< last fetched events timer value for computing delta/progress Standard_Boolean myToAskNextFrame; //!< flag indicating that another frame should be drawn right after this one Standard_Boolean myIsContinuousRedraw; //!< continuous redrawing (without immediate rendering optimization) @@ -743,16 +760,18 @@ protected: protected: //! @name XR input variables NCollection_Array1 myXRPrsDevices; //!< array of XR tracked devices presentations - Quantity_Color myXRLaserTeleColor; //!< color of teleport laser - Quantity_Color myXRLaserPickColor; //!< color of picking laser - Aspect_XRTrackedDeviceRole myXRLastTeleportHand;//!< active hand for teleport - Aspect_XRTrackedDeviceRole myXRLastPickingHand; //!< active hand for picking objects - Aspect_XRHapticActionData myXRTeleportHaptic; //!< vibration on picking teleport destination - Aspect_XRHapticActionData myXRPickingHaptic; //!< vibration on dynamic highlighting - Aspect_XRHapticActionData myXRSelectHaptic; //!< vibration on selection - Standard_Real myXRLastPickDepthLeft; //!< last picking depth for left hand - Standard_Real myXRLastPickDepthRight; //!< last picking depth for right hand - Standard_Real myXRTurnAngle; //!< discrete turn angle for XR trackpad + // clang-format on + Quantity_Color myXRLaserTeleColor; //!< color of teleport laser + Quantity_Color myXRLaserPickColor; //!< color of picking laser + Aspect_XRTrackedDeviceRole myXRLastTeleportHand; //!< active hand for teleport + Aspect_XRTrackedDeviceRole myXRLastPickingHand; //!< active hand for picking objects + Aspect_XRHapticActionData myXRTeleportHaptic; //!< vibration on picking teleport destination + Aspect_XRHapticActionData myXRPickingHaptic; //!< vibration on dynamic highlighting + Aspect_XRHapticActionData myXRSelectHaptic; //!< vibration on selection + Standard_Real myXRLastPickDepthLeft; //!< last picking depth for left hand + Standard_Real myXRLastPickDepthRight; //!< last picking depth for right hand + Standard_Real myXRTurnAngle; //!< discrete turn angle for XR trackpad + // clang-format off Standard_Boolean myToDisplayXRAuxDevices; //!< flag to display auxiliary tracked XR devices Standard_Boolean myToDisplayXRHands; //!< flag to display XR hands @@ -809,7 +828,7 @@ protected: //! @name rotation/panning transient state variables gp_Vec myCamStartOpToCenter; //!< vector from rotation gravity point to camera Center at the beginning of rotation gp_Vec myCamStartOpToEye; //!< vector from rotation gravity point to camera Eye at the beginning of rotation Graphic3d_Vec3d myRotateStartYawPitchRoll; //!< camera yaw pitch roll at the beginning of rotation - + // clang-format on }; #endif // _AIS_ViewController_HeaderFile diff --git a/opencascade/AIS_ViewCube.hxx b/opencascade/AIS_ViewCube.hxx index 4244db55a..19d340a0f 100644 --- a/opencascade/AIS_ViewCube.hxx +++ b/opencascade/AIS_ViewCube.hxx @@ -40,7 +40,8 @@ class V3d_View; //! //! The object is expected to behave like a trihedron in the view corner, //! therefore its position should be defined using transformation persistence flags: -//! @code SetTransformPersistence (new Graphic3d_TransformPers (Graphic3d_TMF_TriedronPers, Aspect_TOTP_LEFT_LOWER, Graphic3d_Vec2i (100, 100)); @endcode +//! @code SetTransformPersistence (new Graphic3d_TransformPers (Graphic3d_TMF_TriedronPers, +//! Aspect_TOTP_LEFT_LOWER, Graphic3d_Vec2i (100, 100)); @endcode //! //! View Cube parts are sensitive to detection, or dynamic highlighting (but not selection), //! and every its owner AIS_ViewCubeOwner corresponds to camera transformation. @@ -54,24 +55,22 @@ class V3d_View; //! or //! @code aViewCube->HandleClick (aDetectedOwner); @endcode //! that includes transformation loop. -//! This loop allows external actions like application updating. For this purpose AIS_ViewCube has virtual interface onAfterAnimation(), -//! that is to be redefined on application level. +//! This loop allows external actions like application updating. For this purpose AIS_ViewCube has +//! virtual interface onAfterAnimation(), that is to be redefined on application level. class AIS_ViewCube : public AIS_InteractiveObject { DEFINE_STANDARD_RTTIEXT(AIS_ViewCube, AIS_InteractiveObject) public: - //! Return TRUE if specified orientation belongs to box side. - Standard_EXPORT static bool IsBoxSide (V3d_TypeOfOrientation theOrient); + Standard_EXPORT static bool IsBoxSide(V3d_TypeOfOrientation theOrient); //! Return TRUE if specified orientation belongs to box edge. - Standard_EXPORT static bool IsBoxEdge (V3d_TypeOfOrientation theOrient); + Standard_EXPORT static bool IsBoxEdge(V3d_TypeOfOrientation theOrient); //! Return TRUE if specified orientation belongs to box corner (vertex). - Standard_EXPORT static bool IsBoxCorner (V3d_TypeOfOrientation theOrient); + Standard_EXPORT static bool IsBoxCorner(V3d_TypeOfOrientation theOrient); public: - //! Empty constructor. Standard_EXPORT AIS_ViewCube(); @@ -79,28 +78,31 @@ public: const Handle(AIS_AnimationCamera)& ViewAnimation() const { return myViewAnimation; } //! Set view animation. - void SetViewAnimation (const Handle(AIS_AnimationCamera)& theAnimation) { myViewAnimation = theAnimation; } + void SetViewAnimation(const Handle(AIS_AnimationCamera)& theAnimation) + { + myViewAnimation = theAnimation; + } - //! Return TRUE if automatic camera transformation on selection (highlighting) is enabled; TRUE by default. + //! Return TRUE if automatic camera transformation on selection (highlighting) is enabled; TRUE by + //! default. Standard_Boolean ToAutoStartAnimation() const { return myToAutoStartAnim; } //! Enable/disable automatic camera transformation on selection (highlighting). //! The automatic logic can be disabled if application wants performing action manually //! basing on picking results (AIS_ViewCubeOwner). - void SetAutoStartAnimation (bool theToEnable) { myToAutoStartAnim = theToEnable; } + void SetAutoStartAnimation(bool theToEnable) { myToAutoStartAnim = theToEnable; } //! Return TRUE if camera animation should be done in uninterruptible loop; TRUE by default. Standard_Boolean IsFixedAnimationLoop() const { return myIsFixedAnimation; } //! Set if camera animation should be done in uninterruptible loop. - void SetFixedAnimationLoop (bool theToEnable) { myIsFixedAnimation = theToEnable; } + void SetFixedAnimationLoop(bool theToEnable) { myIsFixedAnimation = theToEnable; } //! Reset all size and style parameters to default. //! @warning It doesn't reset position of View Cube Standard_EXPORT void ResetStyles(); protected: - //! Set default visual attributes Standard_EXPORT void setDefaultAttributes(); @@ -108,22 +110,20 @@ protected: Standard_EXPORT void setDefaultHighlightAttributes(); public: //! @name Geometry management API - //! @return size (width and height) of View cube sides; 100 by default. Standard_Real Size() const { return mySize; } //! Sets size (width and height) of View cube sides. //! @param theToAdaptAnother if TRUE, then other parameters will be adapted to specified size - Standard_EXPORT void SetSize (Standard_Real theValue, - Standard_Boolean theToAdaptAnother = true); + Standard_EXPORT void SetSize(Standard_Real theValue, Standard_Boolean theToAdaptAnother = true); //! Return box facet extension to edge/corner facet split; 10 by default. Standard_Real BoxFacetExtension() const { return myBoxFacetExtension; } //! Set new value of box facet extension. - void SetBoxFacetExtension (Standard_Real theValue) + void SetBoxFacetExtension(Standard_Real theValue) { - if (Abs (myBoxFacetExtension - theValue) > Precision::Confusion()) + if (Abs(myBoxFacetExtension - theValue) > Precision::Confusion()) { myBoxFacetExtension = theValue; SetToUpdate(); @@ -134,9 +134,9 @@ public: //! @name Geometry management API Standard_Real AxesPadding() const { return myAxesPadding; } //! Set new value of padding between axes and 3D part (box). - void SetAxesPadding (Standard_Real theValue) + void SetAxesPadding(Standard_Real theValue) { - if (Abs (myAxesPadding - theValue) > Precision::Confusion()) + if (Abs(myAxesPadding - theValue) > Precision::Confusion()) { myAxesPadding = theValue; SetToUpdate(); @@ -147,9 +147,9 @@ public: //! @name Geometry management API Standard_Real BoxEdgeGap() const { return myBoxEdgeGap; } //! Set new value of box edges gap. - void SetBoxEdgeGap (Standard_Real theValue) + void SetBoxEdgeGap(Standard_Real theValue) { - if (Abs (myBoxEdgeGap - theValue) > Precision::Confusion()) + if (Abs(myBoxEdgeGap - theValue) > Precision::Confusion()) { myBoxEdgeGap = theValue; SetToUpdate(); @@ -160,9 +160,9 @@ public: //! @name Geometry management API Standard_Real BoxEdgeMinSize() const { return myBoxEdgeMinSize; } //! Set new value of box edge minimal size. - void SetBoxEdgeMinSize (Standard_Real theValue) + void SetBoxEdgeMinSize(Standard_Real theValue) { - if (Abs (myBoxEdgeMinSize - theValue) > Precision::Confusion()) + if (Abs(myBoxEdgeMinSize - theValue) > Precision::Confusion()) { myBoxEdgeMinSize = theValue; SetToUpdate(); @@ -173,9 +173,9 @@ public: //! @name Geometry management API Standard_Real BoxCornerMinSize() const { return myCornerMinSize; } //! Set new value of box corner minimal size. - void SetBoxCornerMinSize (Standard_Real theValue) + void SetBoxCornerMinSize(Standard_Real theValue) { - if (Abs (myCornerMinSize - theValue) > Precision::Confusion()) + if (Abs(myCornerMinSize - theValue) > Precision::Confusion()) { myCornerMinSize = theValue; SetToUpdate(); @@ -188,15 +188,15 @@ public: //! @name Geometry management API //! Set relative radius of View Cube sides corners (round rectangle). //! The value should be within [0, 0.5] range. - Standard_EXPORT void SetRoundRadius (const Standard_Real theValue); + Standard_EXPORT void SetRoundRadius(const Standard_Real theValue); //! Returns radius of axes of the trihedron; 1.0 by default. Standard_Real AxesRadius() const { return myAxesRadius; } //! Sets radius of axes of the trihedron. - void SetAxesRadius (const Standard_Real theRadius) + void SetAxesRadius(const Standard_Real theRadius) { - if (Abs (myAxesRadius - theRadius) > Precision::Confusion()) + if (Abs(myAxesRadius - theRadius) > Precision::Confusion()) { myAxesRadius = theRadius; SetToUpdate(); @@ -207,9 +207,9 @@ public: //! @name Geometry management API Standard_Real AxesConeRadius() const { return myAxesConeRadius; } //! Sets radius of cone of axes of the trihedron. - void SetAxesConeRadius (Standard_Real theRadius) + void SetAxesConeRadius(Standard_Real theRadius) { - if (Abs (myAxesConeRadius - theRadius) > Precision::Confusion()) + if (Abs(myAxesConeRadius - theRadius) > Precision::Confusion()) { myAxesConeRadius = theRadius; SetToUpdate(); @@ -220,9 +220,9 @@ public: //! @name Geometry management API Standard_Real AxesSphereRadius() const { return myAxesSphereRadius; } //! Sets radius of sphere (central point) of the trihedron. - void SetAxesSphereRadius (Standard_Real theRadius) + void SetAxesSphereRadius(Standard_Real theRadius) { - if (Abs (myAxesSphereRadius - theRadius) > Precision::Confusion()) + if (Abs(myAxesSphereRadius - theRadius) > Precision::Confusion()) { myAxesSphereRadius = theRadius; SetToUpdate(); @@ -233,7 +233,7 @@ public: //! @name Geometry management API Standard_Boolean ToDrawAxes() const { return myToDisplayAxes; } //! Enable/disable drawing of trihedron. - void SetDrawAxes (Standard_Boolean theValue) + void SetDrawAxes(Standard_Boolean theValue) { if (myToDisplayAxes != theValue) { @@ -246,7 +246,7 @@ public: //! @name Geometry management API Standard_Boolean ToDrawEdges() const { return myToDisplayEdges; } //! Enable/disable drawing of edges of View Cube. - void SetDrawEdges (Standard_Boolean theValue) + void SetDrawEdges(Standard_Boolean theValue) { if (myToDisplayEdges != theValue) { @@ -259,7 +259,7 @@ public: //! @name Geometry management API Standard_Boolean ToDrawVertices() const { return myToDisplayVertices; } //! Enable/disable drawing of vertices (corners) of View Cube. - void SetDrawVertices (Standard_Boolean theValue) + void SetDrawVertices(Standard_Boolean theValue) { if (myToDisplayVertices != theValue) { @@ -272,11 +272,10 @@ public: //! @name Geometry management API Standard_Boolean IsYup() const { return myIsYup; } //! Set if application expects Y-up viewer orientation instead of Z-up. - Standard_EXPORT void SetYup (Standard_Boolean theIsYup, - Standard_Boolean theToUpdateLabels = Standard_True); + Standard_EXPORT void SetYup(Standard_Boolean theIsYup, + Standard_Boolean theToUpdateLabels = Standard_True); public: //! @name Style management API - //! Return shading style of box sides. const Handle(Prs3d_ShadingAspect)& BoxSideStyle() const { return myDrawer->ShadingAspect(); } @@ -290,16 +289,16 @@ public: //! @name Style management API const Quantity_Color& BoxColor() const { return myDrawer->ShadingAspect()->Color(); } //! Set new value of front color for the 3D part of object. - //! @param theColor [in] input color value. - void SetBoxColor (const Quantity_Color& theColor) + //! @param[in] theColor input color value. + void SetBoxColor(const Quantity_Color& theColor) { - if (!myDrawer->ShadingAspect()->Color().IsEqual (theColor) - || !myBoxEdgeAspect ->Color().IsEqual (theColor) - || !myBoxCornerAspect->Color().IsEqual (theColor)) + if (!myDrawer->ShadingAspect()->Color().IsEqual(theColor) + || !myBoxEdgeAspect->Color().IsEqual(theColor) + || !myBoxCornerAspect->Color().IsEqual(theColor)) { - myDrawer->ShadingAspect()->SetColor (theColor); - myBoxEdgeAspect->SetColor (theColor); - myBoxCornerAspect->SetColor (theColor); + myDrawer->ShadingAspect()->SetColor(theColor); + myBoxEdgeAspect->SetColor(theColor); + myBoxCornerAspect->SetColor(theColor); SynchronizeAspects(); } } @@ -308,48 +307,50 @@ public: //! @name Style management API Standard_Real BoxTransparency() const { return myDrawer->ShadingAspect()->Transparency(); } //! Set new value of transparency for 3D part of object. - //! @param theValue [in] input transparency value - void SetBoxTransparency (Standard_Real theValue) + //! @param[in] theValue input transparency value + void SetBoxTransparency(Standard_Real theValue) { - if (Abs (myDrawer->ShadingAspect()->Transparency() - theValue) > Precision::Confusion() - || Abs (myBoxEdgeAspect ->Transparency() - theValue) > Precision::Confusion() - || Abs (myBoxCornerAspect->Transparency() - theValue) > Precision::Confusion()) + if (Abs(myDrawer->ShadingAspect()->Transparency() - theValue) > Precision::Confusion() + || Abs(myBoxEdgeAspect->Transparency() - theValue) > Precision::Confusion() + || Abs(myBoxCornerAspect->Transparency() - theValue) > Precision::Confusion()) { - myDrawer->ShadingAspect()->SetTransparency (theValue); - myBoxEdgeAspect->SetTransparency (theValue); - myBoxCornerAspect->SetTransparency (theValue); + myDrawer->ShadingAspect()->SetTransparency(theValue); + myBoxEdgeAspect->SetTransparency(theValue); + myBoxCornerAspect->SetTransparency(theValue); SynchronizeAspects(); } } //! Return color of sides back material. - const Quantity_Color& InnerColor() const { return myDrawer->ShadingAspect()->Color (Aspect_TOFM_BACK_SIDE); } + const Quantity_Color& InnerColor() const + { + return myDrawer->ShadingAspect()->Color(Aspect_TOFM_BACK_SIDE); + } //! Set color of sides back material. Alias for: //! @code Attributes()->ShadingAspect()->Aspect()->ChangeBackMaterial().SetColor() @endcode - void SetInnerColor (const Quantity_Color& theColor) + void SetInnerColor(const Quantity_Color& theColor) { - myDrawer->ShadingAspect()->SetColor (theColor, Aspect_TOFM_BACK_SIDE); + myDrawer->ShadingAspect()->SetColor(theColor, Aspect_TOFM_BACK_SIDE); SynchronizeAspects(); } //! Return box side label or empty string if undefined. //! Default labels: FRONT, BACK, LEFT, RIGHT, TOP, BOTTOM. - TCollection_AsciiString BoxSideLabel (V3d_TypeOfOrientation theSide) const + TCollection_AsciiString BoxSideLabel(V3d_TypeOfOrientation theSide) const { - const TCollection_AsciiString* aLabel = myBoxSideLabels.Seek (theSide); + const TCollection_AsciiString* aLabel = myBoxSideLabels.Seek(theSide); return aLabel != NULL ? *aLabel : TCollection_AsciiString(); } //! Set box side label. - void SetBoxSideLabel (const V3d_TypeOfOrientation theSide, - const TCollection_AsciiString& theLabel) + void SetBoxSideLabel(const V3d_TypeOfOrientation theSide, const TCollection_AsciiString& theLabel) { - if (!IsBoxSide (theSide)) + if (!IsBoxSide(theSide)) { - throw Standard_ProgramError ("AIS_ViewCube::SetBoxSideLabel(), invalid enumeration value"); + throw Standard_ProgramError("AIS_ViewCube::SetBoxSideLabel(), invalid enumeration value"); } - myBoxSideLabels.Bind (theSide, theLabel); + myBoxSideLabels.Bind(theSide, theLabel); SetToUpdate(); } @@ -358,9 +359,9 @@ public: //! @name Style management API //! Set color of text labels on box sides. Alias for: //! @code Attributes()->TextAspect()->SetColor() @endcode - void SetTextColor (const Quantity_Color& theColor) + void SetTextColor(const Quantity_Color& theColor) { - myDrawer->TextAspect()->SetColor (theColor); + myDrawer->TextAspect()->SetColor(theColor); SynchronizeAspects(); } @@ -370,9 +371,9 @@ public: //! @name Style management API //! Set font name that is used for displaying of sides and axes text. Alias for: //! @code Attributes()->TextAspect()->SetFont() @endcode - void SetFont (const TCollection_AsciiString& theFont) + void SetFont(const TCollection_AsciiString& theFont) { - myDrawer->TextAspect()->Aspect()->SetFont (theFont); + myDrawer->TextAspect()->Aspect()->SetFont(theFont); SynchronizeAspects(); } @@ -381,140 +382,132 @@ public: //! @name Style management API //! Change font height. Alias for: //! @code Attributes()->TextAspect()->SetHeight() @endcode - void SetFontHeight (Standard_Real theValue) + void SetFontHeight(Standard_Real theValue) { - if (Abs (myDrawer->TextAspect()->Height() - theValue) > Precision::Confusion()) + if (Abs(myDrawer->TextAspect()->Height() - theValue) > Precision::Confusion()) { - myDrawer->TextAspect()->SetHeight (theValue); + myDrawer->TextAspect()->SetHeight(theValue); SetToUpdate(); } } //! Return axes labels or empty string if undefined. //! Default labels: X, Y, Z. - TCollection_AsciiString AxisLabel (Prs3d_DatumParts theAxis) const + TCollection_AsciiString AxisLabel(Prs3d_DatumParts theAxis) const { - const TCollection_AsciiString* aLabel = myAxesLabels.Seek (theAxis); + const TCollection_AsciiString* aLabel = myAxesLabels.Seek(theAxis); return aLabel != NULL ? *aLabel : TCollection_AsciiString(); } //! Set axes labels. - void SetAxesLabels (const TCollection_AsciiString& theX, - const TCollection_AsciiString& theY, - const TCollection_AsciiString& theZ) + void SetAxesLabels(const TCollection_AsciiString& theX, + const TCollection_AsciiString& theY, + const TCollection_AsciiString& theZ) { - myAxesLabels.Bind (Prs3d_DatumParts_XAxis, theX); - myAxesLabels.Bind (Prs3d_DatumParts_YAxis, theY); - myAxesLabels.Bind (Prs3d_DatumParts_ZAxis, theZ); + myAxesLabels.Bind(Prs3d_DatumParts_XAxis, theX); + myAxesLabels.Bind(Prs3d_DatumParts_YAxis, theY); + myAxesLabels.Bind(Prs3d_DatumParts_ZAxis, theZ); SetToUpdate(); } public: - //! Set new value of color for the whole object. - //! @param theColor [in] input color value. - virtual void SetColor (const Quantity_Color& theColor) Standard_OVERRIDE - { - SetBoxColor (theColor); - } + //! @param[in] theColor input color value. + virtual void SetColor(const Quantity_Color& theColor) Standard_OVERRIDE { SetBoxColor(theColor); } //! Reset color for the whole object. virtual void UnsetColor() Standard_OVERRIDE { - myDrawer->ShadingAspect()->SetColor (Quantity_NOC_WHITE); - myBoxEdgeAspect ->SetColor (Quantity_NOC_GRAY30); - myBoxCornerAspect->SetColor (Quantity_NOC_GRAY30); + myDrawer->ShadingAspect()->SetColor(Quantity_NOC_WHITE); + myBoxEdgeAspect->SetColor(Quantity_NOC_GRAY30); + myBoxCornerAspect->SetColor(Quantity_NOC_GRAY30); SynchronizeAspects(); } //! Set new value of transparency for the whole object. - //! @param theValue [in] input transparency value. - virtual void SetTransparency (const Standard_Real theValue) Standard_OVERRIDE + //! @param[in] theValue input transparency value. + virtual void SetTransparency(const Standard_Real theValue) Standard_OVERRIDE { - SetBoxTransparency (theValue); + SetBoxTransparency(theValue); } //! Reset transparency for the whole object. - virtual void UnsetTransparency() Standard_OVERRIDE - { - SetBoxTransparency (0.0f); - } + virtual void UnsetTransparency() Standard_OVERRIDE { SetBoxTransparency(0.0f); } //! Sets the material for the interactive object. - virtual void SetMaterial (const Graphic3d_MaterialAspect& theMat) Standard_OVERRIDE + virtual void SetMaterial(const Graphic3d_MaterialAspect& theMat) Standard_OVERRIDE { - myDrawer->ShadingAspect()->SetMaterial (theMat); - myBoxEdgeAspect ->SetMaterial (theMat); - myBoxCornerAspect->SetMaterial (theMat); + myDrawer->ShadingAspect()->SetMaterial(theMat); + myBoxEdgeAspect->SetMaterial(theMat); + myBoxCornerAspect->SetMaterial(theMat); SynchronizeAspects(); } //! Sets the material for the interactive object. virtual void UnsetMaterial() Standard_OVERRIDE { - Graphic3d_MaterialAspect aMat (Graphic3d_NameOfMaterial_UserDefined); - aMat.SetColor (Quantity_NOC_WHITE); - aMat.SetAmbientColor (Quantity_NOC_GRAY60); - myDrawer->ShadingAspect()->SetMaterial (aMat); - myBoxEdgeAspect ->SetMaterial (aMat); - myBoxEdgeAspect ->SetColor (Quantity_NOC_GRAY30); - myBoxCornerAspect->SetMaterial (aMat); - myBoxCornerAspect->SetColor (Quantity_NOC_GRAY30); + Graphic3d_MaterialAspect aMat(Graphic3d_NameOfMaterial_UserDefined); + aMat.SetColor(Quantity_NOC_WHITE); + aMat.SetAmbientColor(Quantity_NOC_GRAY60); + myDrawer->ShadingAspect()->SetMaterial(aMat); + myBoxEdgeAspect->SetMaterial(aMat); + myBoxEdgeAspect->SetColor(Quantity_NOC_GRAY30); + myBoxCornerAspect->SetMaterial(aMat); + myBoxCornerAspect->SetColor(Quantity_NOC_GRAY30); SynchronizeAspects(); } public: //! @name animation methods - //! Return duration of animation in seconds; 0.5 sec by default Standard_EXPORT Standard_Real Duration() const; //! Set duration of animation. - //! @param theValue [in] input value of duration in seconds - Standard_EXPORT void SetDuration (Standard_Real theValue); + //! @param[in] theValue input value of duration in seconds + Standard_EXPORT void SetDuration(Standard_Real theValue); - //! Return TRUE if new camera Up direction should be always set to default value for a new camera Direction; FALSE by default. - //! When this flag is FALSE, the new camera Up will be set as current Up orthogonalized to the new camera Direction, - //! and will set to default Up on second click. + //! Return TRUE if new camera Up direction should be always set to default value for a new camera + //! Direction; FALSE by default. When this flag is FALSE, the new camera Up will be set as current + //! Up orthogonalized to the new camera Direction, and will set to default Up on second click. Standard_Boolean ToResetCameraUp() const { return myToResetCameraUp; } - //! Set if new camera Up direction should be always set to default value for a new camera Direction. - void SetResetCamera (Standard_Boolean theToReset) { myToResetCameraUp = theToReset; } + //! Set if new camera Up direction should be always set to default value for a new camera + //! Direction. + void SetResetCamera(Standard_Boolean theToReset) { myToResetCameraUp = theToReset; } - //! Return TRUE if animation should fit selected objects and FALSE to fit entire scene; TRUE by default. + //! Return TRUE if animation should fit selected objects and FALSE to fit entire scene; TRUE by + //! default. Standard_Boolean ToFitSelected() const { return myToFitSelected; } //! Set if animation should fit selected objects or to fit entire scene. - void SetFitSelected (Standard_Boolean theToFitSelected) { myToFitSelected = theToFitSelected; } + void SetFitSelected(Standard_Boolean theToFitSelected) { myToFitSelected = theToFitSelected; } //! @return TRUE if View Cube has unfinished animation of view camera. Standard_EXPORT Standard_Boolean HasAnimation() const; //! Start camera transformation corresponding to the input detected owner. - //! @param theOwner [in] detected owner. - Standard_EXPORT virtual void StartAnimation (const Handle(AIS_ViewCubeOwner)& theOwner); + //! @param[in] theOwner detected owner. + Standard_EXPORT virtual void StartAnimation(const Handle(AIS_ViewCubeOwner)& theOwner); //! Perform one step of current camera transformation. - //! theToUpdate [in] enable/disable update of view. + //! theToUpdate[in] enable/disable update of view. //! @return TRUE if animation is not stopped. - Standard_EXPORT virtual Standard_Boolean UpdateAnimation (const Standard_Boolean theToUpdate); + Standard_EXPORT virtual Standard_Boolean UpdateAnimation(const Standard_Boolean theToUpdate); //! Perform camera transformation corresponding to the input detected owner. - Standard_EXPORT virtual void HandleClick (const Handle(AIS_ViewCubeOwner)& theOwner); + Standard_EXPORT virtual void HandleClick(const Handle(AIS_ViewCubeOwner)& theOwner); protected: - //! Perform internal single step of animation. //! @return FALSE if animation has been finished Standard_EXPORT Standard_Boolean updateAnimation(); //! Fit selected/all into view. - //! @param theView [in] view definition to retrieve scene bounding box + //! @param[in] theView view definition to retrieve scene bounding box //! @param theCamera [in,out] camera definition - Standard_EXPORT virtual void viewFitAll (const Handle(V3d_View)& theView, - const Handle(Graphic3d_Camera)& theCamera); + Standard_EXPORT virtual void viewFitAll(const Handle(V3d_View)& theView, + const Handle(Graphic3d_Camera)& theCamera); protected: //! @name protected virtual API - //! Method that is called after one step of transformation. virtual void onAfterAnimation() {} @@ -522,30 +515,36 @@ protected: //! @name protected virtual API virtual void onAnimationFinished() {} public: //! @name Presentation computation - //! Return TRUE for supported display mode. - virtual Standard_Boolean AcceptDisplayMode (const Standard_Integer theMode) const Standard_OVERRIDE { return theMode == 0; } + virtual Standard_Boolean AcceptDisplayMode(const Standard_Integer theMode) const Standard_OVERRIDE + { + return theMode == 0; + } //! Global selection has no meaning for this class. - virtual Handle(SelectMgr_EntityOwner) GlobalSelOwner() const Standard_OVERRIDE { return Handle(SelectMgr_EntityOwner)(); } + virtual Handle(SelectMgr_EntityOwner) GlobalSelOwner() const Standard_OVERRIDE + { + return Handle(SelectMgr_EntityOwner)(); + } //! Compute 3D part of View Cube. - //! @param thePrsMgr [in] presentation manager. - //! @param thePrs [in] input presentation that is to be filled with flat presentation primitives. - //! @param theMode [in] display mode. + //! @param[in] thePrsMgr presentation manager. + //! @param[in] thePrs input presentation that is to be filled with flat presentation primitives. + //! @param[in] theMode display mode. //! @warning this object accept only 0 display mode. - Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr, - const Handle(Prs3d_Presentation)& thePrs, - const Standard_Integer theMode = 0) Standard_OVERRIDE; + Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager)& thePrsMgr, + const Handle(Prs3d_Presentation)& thePrs, + const Standard_Integer theMode = 0) Standard_OVERRIDE; //! Redefine computing of sensitive entities for View Cube. - //! @param theSelection [in] input selection object that is to be filled with sensitive entities. - //! @param theMode [in] selection mode. + //! @param[in] theSelection input selection object that is to be filled with sensitive entities. + //! @param[in] theMode selection mode. //! @warning object accepts only 0 selection mode. - Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSelection, - const Standard_Integer theMode) Standard_OVERRIDE; + Standard_EXPORT virtual void ComputeSelection(const Handle(SelectMgr_Selection)& theSelection, + const Standard_Integer theMode) Standard_OVERRIDE; - //! Disables auto highlighting to use HilightSelected() and HilightOwnerWithColor() overridden methods. + //! Disables auto highlighting to use HilightSelected() and HilightOwnerWithColor() overridden + //! methods. virtual Standard_Boolean IsAutoHilight() const Standard_OVERRIDE { return Standard_False; } //! Method which clear all selected owners belonging to this selectable object. @@ -553,16 +552,18 @@ public: //! @name Presentation computation virtual void ClearSelected() Standard_OVERRIDE {} //! Method which highlights input owner belonging to this selectable object. - //! @param thePM [in] presentation manager - //! @param theStyle [in] style for dynamic highlighting. - //! @param theOwner [in] input entity owner. - Standard_EXPORT virtual void HilightOwnerWithColor (const Handle(PrsMgr_PresentationManager)& thePM, - const Handle(Prs3d_Drawer)& theStyle, - const Handle(SelectMgr_EntityOwner)& theOwner) Standard_OVERRIDE; + //! @param[in] thePM presentation manager + //! @param[in] theStyle style for dynamic highlighting. + //! @param[in] theOwner input entity owner. + Standard_EXPORT virtual void HilightOwnerWithColor( + const Handle(PrsMgr_PresentationManager)& thePM, + const Handle(Prs3d_Drawer)& theStyle, + const Handle(SelectMgr_EntityOwner)& theOwner) Standard_OVERRIDE; //! Method which draws selected owners. - Standard_EXPORT virtual void HilightSelected (const Handle(PrsMgr_PresentationManager)& thePM, - const SelectMgr_SequenceOfOwner& theSeq) Standard_OVERRIDE; + Standard_EXPORT virtual void HilightSelected(const Handle(PrsMgr_PresentationManager)& thePM, + const SelectMgr_SequenceOfOwner& theSeq) + Standard_OVERRIDE; //! Set default parameters for visual attributes //! @sa Attributes() @@ -581,77 +582,90 @@ public: //! @name Presentation computation } protected: //! @name Auxiliary classes to fill presentation with proper primitives - //! Create triangulation for a box part - for presentation and selection purposes. //! @param theTris [in,out] triangulation to fill, or NULL to return size - //! @param theNbNodes [in,out] should be incremented by a number of nodes defining this triangulation - //! @param theNbTris [in,out] should be incremented by a number of triangles defining this triangulation - //! @param theDir [in] part to define - Standard_EXPORT virtual void createBoxPartTriangles (const Handle(Graphic3d_ArrayOfTriangles)& theTris, - Standard_Integer& theNbNodes, - Standard_Integer& theNbTris, - V3d_TypeOfOrientation theDir) const; + //! @param theNbNodes [in,out] should be incremented by a number of nodes defining this + //! triangulation + //! @param theNbTris [in,out] should be incremented by a number of triangles defining this + //! triangulation + //! @param[in] theDir part to define + Standard_EXPORT virtual void createBoxPartTriangles( + const Handle(Graphic3d_ArrayOfTriangles)& theTris, + Standard_Integer& theNbNodes, + Standard_Integer& theNbTris, + V3d_TypeOfOrientation theDir) const; //! Create triangulation for a box side. //! @param theTris [in,out] triangulation to fill, or NULL to return size - //! @param theNbNodes [in,out] should be incremented by a number of nodes defining this triangulation - //! @param theNbTris [in,out] should be incremented by a number of triangles defining this triangulation - //! @param theDir [in] part to define - Standard_EXPORT virtual void createBoxSideTriangles (const Handle(Graphic3d_ArrayOfTriangles)& theTris, - Standard_Integer& theNbNodes, - Standard_Integer& theNbTris, - V3d_TypeOfOrientation theDir) const; + //! @param theNbNodes [in,out] should be incremented by a number of nodes defining this + //! triangulation + //! @param theNbTris [in,out] should be incremented by a number of triangles defining this + //! triangulation + //! @param[in] theDir part to define + Standard_EXPORT virtual void createBoxSideTriangles( + const Handle(Graphic3d_ArrayOfTriangles)& theTris, + Standard_Integer& theNbNodes, + Standard_Integer& theNbTris, + V3d_TypeOfOrientation theDir) const; //! Create triangulation for a box edge. //! @param theTris [in,out] triangulation to fill, or NULL to return size - //! @param theNbNodes [in,out] should be incremented by a number of nodes defining this triangulation - //! @param theNbTris [in,out] should be incremented by a number of triangles defining this triangulation - //! @param theDir [in] part to define - Standard_EXPORT virtual void createBoxEdgeTriangles (const Handle(Graphic3d_ArrayOfTriangles)& theTris, - Standard_Integer& theNbNodes, - Standard_Integer& theNbTris, - V3d_TypeOfOrientation theDir) const; + //! @param theNbNodes [in,out] should be incremented by a number of nodes defining this + //! triangulation + //! @param theNbTris [in,out] should be incremented by a number of triangles defining this + //! triangulation + //! @param[in] theDir part to define + Standard_EXPORT virtual void createBoxEdgeTriangles( + const Handle(Graphic3d_ArrayOfTriangles)& theTris, + Standard_Integer& theNbNodes, + Standard_Integer& theNbTris, + V3d_TypeOfOrientation theDir) const; //! Create triangulation for a box corner (vertex). //! @param theTris [in,out] triangulation to fill, or NULL to return size - //! @param theNbNodes [in,out] should be incremented by a number of nodes defining this triangulation - //! @param theNbTris [in,out] should be incremented by a number of triangles defining this triangulation - //! @param theDir [in] part to define - Standard_EXPORT virtual void createBoxCornerTriangles (const Handle(Graphic3d_ArrayOfTriangles)& theTris, - Standard_Integer& theNbNodes, - Standard_Integer& theNbTris, - V3d_TypeOfOrientation theDir) const; + //! @param theNbNodes [in,out] should be incremented by a number of nodes defining this + //! triangulation + //! @param theNbTris [in,out] should be incremented by a number of triangles defining this + //! triangulation + //! @param[in] theDir part to define + Standard_EXPORT virtual void createBoxCornerTriangles( + const Handle(Graphic3d_ArrayOfTriangles)& theTris, + Standard_Integer& theNbNodes, + Standard_Integer& theNbTris, + V3d_TypeOfOrientation theDir) const; protected: - //! Create triangulation for a rectangle with round corners. //! @param theTris [in,out] triangulation to fill, or NULL to return size - //! @param theNbNodes [in,out] should be incremented by a number of nodes defining this triangulation - //! @param theNbTris [in,out] should be incremented by a number of triangles defining this triangulation - //! @param theSize [in] rectangle dimensions - //! @param theRadius [in] radius at corners - //! @param theTrsf [in] transformation - Standard_EXPORT static void createRoundRectangleTriangles (const Handle(Graphic3d_ArrayOfTriangles)& theTris, - Standard_Integer& theNbNodes, - Standard_Integer& theNbTris, - const gp_XY& theSize, - Standard_Real theRadius, - const gp_Trsf& theTrsf); + //! @param theNbNodes [in,out] should be incremented by a number of nodes defining this + //! triangulation + //! @param theNbTris [in,out] should be incremented by a number of triangles defining this + //! triangulation + //! @param[in] theSize rectangle dimensions + //! @param[in] theRadius radius at corners + //! @param[in] theTrsf transformation + Standard_EXPORT static void createRoundRectangleTriangles( + const Handle(Graphic3d_ArrayOfTriangles)& theTris, + Standard_Integer& theNbNodes, + Standard_Integer& theNbTris, + const gp_XY& theSize, + Standard_Real theRadius, + const gp_Trsf& theTrsf); protected: - NCollection_DataMap - myBoxSideLabels; //!< map with box side labels + myBoxSideLabels; //!< map with box side labels NCollection_DataMap - myAxesLabels; //!< map with axes labels - Handle(Prs3d_ShadingAspect) myBoxEdgeAspect; //!< style for box edges - Handle(Prs3d_ShadingAspect) myBoxCornerAspect; //!< style for box corner - - Standard_Real mySize; //!< size of box side, length of one axis - Standard_Real myBoxEdgeMinSize; //!< minimal size of box edge - Standard_Real myBoxEdgeGap; //!< gap between box side and box edge - Standard_Real myBoxFacetExtension; //!< box facet extension - Standard_Real myAxesPadding; //!< Padding between box and axes + myAxesLabels; //!< map with axes labels + Handle(Prs3d_ShadingAspect) myBoxEdgeAspect; //!< style for box edges + Handle(Prs3d_ShadingAspect) myBoxCornerAspect; //!< style for box corner + + Standard_Real mySize; //!< size of box side, length of one axis + Standard_Real myBoxEdgeMinSize; //!< minimal size of box edge + Standard_Real myBoxEdgeGap; //!< gap between box side and box edge + Standard_Real myBoxFacetExtension; //!< box facet extension + Standard_Real myAxesPadding; //!< Padding between box and axes + // clang-format off Standard_Real myAxesRadius; //!< radius of axes of the trihedron; 1.0 by default Standard_Real myAxesConeRadius; //!< radius of cone of axes of the trihedron; 3.0 by default Standard_Real myAxesSphereRadius; //!< radius of sphere (central point) of the trihedron; 4.0 by default @@ -661,17 +675,18 @@ protected: Standard_Boolean myToDisplayEdges; //!< box edges visibility Standard_Boolean myToDisplayVertices; //!< box corners (vertices) visibility Standard_Boolean myIsYup; //!< flag indicating that application expects Y-up viewer orientation instead of Z-up - -protected: //! @name Animation options - - Handle(AIS_AnimationCamera) myViewAnimation; //!< Camera animation object - Handle(Graphic3d_Camera) myStartState; //!< Start state of view camera - Handle(Graphic3d_Camera) myEndState; //!< End state of view camera - Standard_Boolean myToAutoStartAnim; //!< start animation automatically on click - Standard_Boolean myIsFixedAnimation; //!< fixed-loop animation - Standard_Boolean myToFitSelected; //!< fit selected or fit entire scene + // clang-format on + +protected: //! @name Animation options + Handle(AIS_AnimationCamera) myViewAnimation; //!< Camera animation object + Handle(Graphic3d_Camera) myStartState; //!< Start state of view camera + Handle(Graphic3d_Camera) myEndState; //!< End state of view camera + Standard_Boolean myToAutoStartAnim; //!< start animation automatically on click + Standard_Boolean myIsFixedAnimation; //!< fixed-loop animation + Standard_Boolean myToFitSelected; //!< fit selected or fit entire scene + // clang-format off Standard_Boolean myToResetCameraUp; //!< always reset camera up direction to default - + // clang-format on }; //! Redefined entity owner that is highlighted when owner is detected, @@ -680,13 +695,12 @@ class AIS_ViewCubeOwner : public SelectMgr_EntityOwner { DEFINE_STANDARD_RTTIEXT(AIS_ViewCubeOwner, SelectMgr_EntityOwner) public: - //! Main constructor. - AIS_ViewCubeOwner (const Handle(AIS_ViewCube)& theObject, - V3d_TypeOfOrientation theOrient, - Standard_Integer thePriority = 5) - : SelectMgr_EntityOwner ((const Handle(SelectMgr_SelectableObject)& )theObject, thePriority), - myMainOrient (theOrient) + AIS_ViewCubeOwner(const Handle(AIS_ViewCube)& theObject, + V3d_TypeOfOrientation theOrient, + Standard_Integer thePriority = 5) + : SelectMgr_EntityOwner((const Handle(SelectMgr_SelectableObject)&)theObject, thePriority), + myMainOrient(theOrient) { myFromDecomposition = true; } @@ -699,21 +713,22 @@ public: V3d_TypeOfOrientation MainOrientation() const { return myMainOrient; } //! Handle mouse button click event. - virtual Standard_Boolean HandleMouseClick (const Graphic3d_Vec2i& thePoint, - Aspect_VKeyMouse theButton, - Aspect_VKeyFlags theModifiers, - bool theIsDoubleClick) Standard_OVERRIDE - { - (void )thePoint; (void )theButton; (void )theModifiers; (void )theIsDoubleClick; - AIS_ViewCube* aCubePrs = dynamic_cast(mySelectable); - aCubePrs->HandleClick (this); + virtual Standard_Boolean HandleMouseClick(const Graphic3d_Vec2i& thePoint, + Aspect_VKeyMouse theButton, + Aspect_VKeyFlags theModifiers, + bool theIsDoubleClick) Standard_OVERRIDE + { + (void)thePoint; + (void)theButton; + (void)theModifiers; + (void)theIsDoubleClick; + AIS_ViewCube* aCubePrs = dynamic_cast(mySelectable); + aCubePrs->HandleClick(this); return Standard_True; } protected: - V3d_TypeOfOrientation myMainOrient; //!< new orientation to set - }; //! Simple sensitive element for picking by point only. @@ -721,20 +736,18 @@ class AIS_ViewCubeSensitive : public Select3D_SensitivePrimitiveArray { DEFINE_STANDARD_RTTIEXT(AIS_ViewCubeSensitive, Select3D_SensitivePrimitiveArray) public: - //! Constructor. - Standard_EXPORT AIS_ViewCubeSensitive (const Handle(SelectMgr_EntityOwner)& theOwner, - const Handle(Graphic3d_ArrayOfTriangles)& theTris); + Standard_EXPORT AIS_ViewCubeSensitive(const Handle(SelectMgr_EntityOwner)& theOwner, + const Handle(Graphic3d_ArrayOfTriangles)& theTris); //! Checks whether element overlaps current selecting volume. - Standard_EXPORT virtual Standard_Boolean Matches (SelectBasics_SelectingVolumeManager& theMgr, - SelectBasics_PickResult& thePickResult) Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean Matches(SelectBasics_SelectingVolumeManager& theMgr, + SelectBasics_PickResult& thePickResult) + Standard_OVERRIDE; protected: - //! Checks if picking ray can be used for detection. - Standard_EXPORT bool isValidRay (const SelectBasics_SelectingVolumeManager& theMgr) const; - + Standard_EXPORT bool isValidRay(const SelectBasics_SelectingVolumeManager& theMgr) const; }; #endif // _AIS_ViewCube_HeaderFile diff --git a/opencascade/AIS_ViewInputBuffer.hxx b/opencascade/AIS_ViewInputBuffer.hxx index c009e9f65..9c420cbb8 100644 --- a/opencascade/AIS_ViewInputBuffer.hxx +++ b/opencascade/AIS_ViewInputBuffer.hxx @@ -41,18 +41,22 @@ enum AIS_ViewInputBufferType class AIS_ViewInputBuffer { public: - - bool IsNewGesture; //!< transition from one action to another + bool IsNewGesture; //!< transition from one action to another NCollection_Sequence ZoomActions; //!< the queue with zoom actions struct _orientation { - bool ToFitAll; //!< perform FitAll operation - bool ToSetViewOrient; //!< set new view orientation - V3d_TypeOfOrientation ViewOrient; //!< new view orientation - - _orientation() : ToFitAll (false), ToSetViewOrient (false), ViewOrient (V3d_Xpos) {} + bool ToFitAll; //!< perform FitAll operation + bool ToSetViewOrient; //!< set new view orientation + V3d_TypeOfOrientation ViewOrient; //!< new view orientation + + _orientation() + : ToFitAll(false), + ToSetViewOrient(false), + ViewOrient(V3d_Xpos) + { + } } Orientation; struct _highlighting @@ -60,18 +64,25 @@ public: bool ToHilight; //!< perform dynamic highlighting at specified point Graphic3d_Vec2i Point; //!< the new point for dynamic highlighting - _highlighting() : ToHilight (false) {} + _highlighting() + : ToHilight(false) + { + } } MoveTo; struct _selection { - AIS_ViewSelectionTool Tool; //!< perform selection - AIS_SelectionScheme Scheme; //!< selection scheme - NCollection_Sequence - Points; //!< the points for selection - bool ToApplyTool; //!< apply rubber-band selection tool - - _selection() : Tool (AIS_ViewSelectionTool_Picking), Scheme (AIS_SelectionScheme_UNKNOWN), ToApplyTool (false) {} + AIS_ViewSelectionTool Tool; //!< perform selection + AIS_SelectionScheme Scheme; //!< selection scheme + NCollection_Sequence Points; //!< the points for selection + bool ToApplyTool; //!< apply rubber-band selection tool + + _selection() + : Tool(AIS_ViewSelectionTool_Picking), + Scheme(AIS_SelectionScheme_UNKNOWN), + ToApplyTool(false) + { + } } Selection; struct _panningParams @@ -81,7 +92,11 @@ public: bool ToPan; //!< perform panning Graphic3d_Vec2i Delta; //!< panning delta - _panningParams() : ToStart (false), ToPan (false) {} + _panningParams() + : ToStart(false), + ToPan(false) + { + } } Panning; struct _draggingParams @@ -94,7 +109,14 @@ public: Graphic3d_Vec2i PointStart; //!< drag start point Graphic3d_Vec2i PointTo; //!< drag end point - _draggingParams() : ToStart (false), ToConfirm (false), ToMove (false), ToStop (false), ToAbort (false) {} + _draggingParams() + : ToStart(false), + ToConfirm(false), + ToMove(false), + ToStop(false), + ToAbort(false) + { + } } Dragging; struct _orbitRotation @@ -104,7 +126,11 @@ public: bool ToRotate; //!< perform orbit rotation Graphic3d_Vec2d PointTo; //!< orbit rotation end point - _orbitRotation() : ToStart (false), ToRotate (false) {} + _orbitRotation() + : ToStart(false), + ToRotate(false) + { + } } OrbitRotation; struct _viewRotation @@ -114,7 +140,11 @@ public: bool ToRotate; //!< perform view rotation Graphic3d_Vec2d PointTo; //!< view rotation end point - _viewRotation() : ToStart (false), ToRotate (false) {} + _viewRotation() + : ToStart(false), + ToRotate(false) + { + } } ViewRotation; struct _zrotateParams @@ -123,37 +153,41 @@ public: double Angle; //!< Z rotation angle bool ToRotate; //!< start Z rotation - _zrotateParams() : Angle (0.0), ToRotate (false) {} + _zrotateParams() + : Angle(0.0), + ToRotate(false) + { + } } ZRotate; public: - AIS_ViewInputBuffer() - : IsNewGesture (false) {} + : IsNewGesture(false) + { + } //! Reset events buffer. void Reset() { - Orientation.ToFitAll = false; + Orientation.ToFitAll = false; Orientation.ToSetViewOrient = false; - MoveTo.ToHilight = false; - Selection.ToApplyTool = false; - IsNewGesture = false; + MoveTo.ToHilight = false; + Selection.ToApplyTool = false; + IsNewGesture = false; ZoomActions.Clear(); - Panning.ToStart = false; - Panning.ToPan = false; - Dragging.ToStart = false; - Dragging.ToConfirm = false; - Dragging.ToMove = false; - Dragging.ToStop = false; - Dragging.ToAbort = false; + Panning.ToStart = false; + Panning.ToPan = false; + Dragging.ToStart = false; + Dragging.ToConfirm = false; + Dragging.ToMove = false; + Dragging.ToStop = false; + Dragging.ToAbort = false; OrbitRotation.ToStart = false; OrbitRotation.ToRotate = false; ViewRotation.ToStart = false; ViewRotation.ToRotate = false; - ZRotate.ToRotate = false; + ZRotate.ToRotate = false; } - }; #endif // _AIS_ViewInputBuffer_HeaderFile diff --git a/opencascade/AIS_WalkDelta.hxx b/opencascade/AIS_WalkDelta.hxx index ef68b67ad..045df64db 100644 --- a/opencascade/AIS_WalkDelta.hxx +++ b/opencascade/AIS_WalkDelta.hxx @@ -27,9 +27,9 @@ enum AIS_WalkTranslation //! Walking rotation components. enum AIS_WalkRotation { - AIS_WalkRotation_Yaw = 0, //!< yaw rotation angle - AIS_WalkRotation_Pitch, //!< pitch rotation angle - AIS_WalkRotation_Roll, //!< roll rotation angle + AIS_WalkRotation_Yaw = 0, //!< yaw rotation angle + AIS_WalkRotation_Pitch, //!< pitch rotation angle + AIS_WalkRotation_Roll, //!< roll rotation angle }; //! Walking value. @@ -40,10 +40,15 @@ struct AIS_WalkPart Standard_Real Duration; //!< duration //! Return TRUE if delta is empty. - bool IsEmpty() const { return Abs (Value) <= RealSmall(); } + bool IsEmpty() const { return Abs(Value) <= RealSmall(); } //! Empty constructor. - AIS_WalkPart() : Value (0.0), Pressure (1.0), Duration (0.0) {} + AIS_WalkPart() + : Value(0.0), + Pressure(1.0), + Duration(0.0) + { + } }; //! Walking values. @@ -51,43 +56,51 @@ struct AIS_WalkDelta { //! Empty constructor. AIS_WalkDelta() - : myIsDefined (false), myIsJumping (false), myIsCrouching (false), myIsRunning (false) {} + : myIsDefined(false), + myIsJumping(false), + myIsCrouching(false), + myIsRunning(false) + { + } //! Return translation component. - const AIS_WalkPart& operator[] (AIS_WalkTranslation thePart) const { return myTranslation[thePart]; } + const AIS_WalkPart& operator[](AIS_WalkTranslation thePart) const + { + return myTranslation[thePart]; + } //! Return translation component. - AIS_WalkPart& operator[] (AIS_WalkTranslation thePart) { return myTranslation[thePart]; } + AIS_WalkPart& operator[](AIS_WalkTranslation thePart) { return myTranslation[thePart]; } //! Return rotation component. - const AIS_WalkPart& operator[] (AIS_WalkRotation thePart) const { return myRotation[thePart]; } + const AIS_WalkPart& operator[](AIS_WalkRotation thePart) const { return myRotation[thePart]; } //! Return rotation component. - AIS_WalkPart& operator[] (AIS_WalkRotation thePart) { return myRotation[thePart]; } + AIS_WalkPart& operator[](AIS_WalkRotation thePart) { return myRotation[thePart]; } //! Return jumping state. bool IsJumping() const { return myIsJumping; } //! Set jumping state. - void SetJumping (bool theIsJumping) { myIsJumping = theIsJumping; } + void SetJumping(bool theIsJumping) { myIsJumping = theIsJumping; } //! Return crouching state. bool IsCrouching() const { return myIsCrouching; } //! Set crouching state. - void SetCrouching (bool theIsCrouching) { myIsCrouching = theIsCrouching; } + void SetCrouching(bool theIsCrouching) { myIsCrouching = theIsCrouching; } //! Return running state. bool IsRunning() const { return myIsRunning; } //! Set running state. - void SetRunning (bool theIsRunning) { myIsRunning = theIsRunning; } + void SetRunning(bool theIsRunning) { myIsRunning = theIsRunning; } //! Return TRUE if navigation keys are pressed even if delta from the previous frame is empty. bool IsDefined() const { return myIsDefined || !IsEmpty(); } //! Set if any navigation key is pressed. - void SetDefined (bool theIsDefined) { myIsDefined = theIsDefined; } + void SetDefined(bool theIsDefined) { myIsDefined = theIsDefined; } //! Return TRUE when both Rotation and Translation deltas are empty. bool IsEmpty() const { return !ToMove() && !ToRotate(); } @@ -96,27 +109,25 @@ struct AIS_WalkDelta bool ToMove() const { return !myTranslation[AIS_WalkTranslation_Forward].IsEmpty() - || !myTranslation[AIS_WalkTranslation_Side].IsEmpty() - || !myTranslation[AIS_WalkTranslation_Up].IsEmpty(); + || !myTranslation[AIS_WalkTranslation_Side].IsEmpty() + || !myTranslation[AIS_WalkTranslation_Up].IsEmpty(); } //! Return TRUE if rotation delta is defined. bool ToRotate() const { return !myRotation[AIS_WalkRotation_Yaw].IsEmpty() - || !myRotation[AIS_WalkRotation_Pitch].IsEmpty() - || !myRotation[AIS_WalkRotation_Roll].IsEmpty(); + || !myRotation[AIS_WalkRotation_Pitch].IsEmpty() + || !myRotation[AIS_WalkRotation_Roll].IsEmpty(); } private: - AIS_WalkPart myTranslation[3]; AIS_WalkPart myRotation[3]; - bool myIsDefined; - bool myIsJumping; - bool myIsCrouching; - bool myIsRunning; - + bool myIsDefined; + bool myIsJumping; + bool myIsCrouching; + bool myIsRunning; }; #endif // _AIS_WalkDelta_HeaderFile diff --git a/opencascade/AIS_XRTrackedDevice.hxx b/opencascade/AIS_XRTrackedDevice.hxx index 8ba307759..edb7a96ad 100644 --- a/opencascade/AIS_XRTrackedDevice.hxx +++ b/opencascade/AIS_XRTrackedDevice.hxx @@ -26,8 +26,8 @@ class AIS_XRTrackedDevice : public AIS_InteractiveObject DEFINE_STANDARD_RTTIEXT(AIS_XRTrackedDevice, AIS_InteractiveObject) public: //! Main constructor. - Standard_EXPORT AIS_XRTrackedDevice (const Handle(Graphic3d_ArrayOfTriangles)& theTris, - const Handle(Image_Texture)& theTexture); + Standard_EXPORT AIS_XRTrackedDevice(const Handle(Graphic3d_ArrayOfTriangles)& theTris, + const Handle(Image_Texture)& theTexture); //! Empty constructor. Standard_EXPORT AIS_XRTrackedDevice(); @@ -36,39 +36,41 @@ public: Aspect_XRTrackedDeviceRole Role() const { return myRole; } //! Set device role. - void SetRole (Aspect_XRTrackedDeviceRole theRole) { myRole = theRole; } + void SetRole(Aspect_XRTrackedDeviceRole theRole) { myRole = theRole; } //! Return laser color. const Quantity_Color& LaserColor() const { return myLaserColor; } //! Set laser color. - Standard_EXPORT void SetLaserColor (const Quantity_Color& theColor); + Standard_EXPORT void SetLaserColor(const Quantity_Color& theColor); //! Return laser length. Standard_ShortReal LaserLength() const { return myLaserLength; } //! Set laser length. - Standard_EXPORT void SetLaserLength (Standard_ShortReal theLength); + Standard_EXPORT void SetLaserLength(Standard_ShortReal theLength); //! Return unit scale factor. Standard_ShortReal UnitFactor() const { return myUnitFactor; } //! Set unit scale factor. - void SetUnitFactor (Standard_ShortReal theFactor) { myUnitFactor = theFactor; } + void SetUnitFactor(Standard_ShortReal theFactor) { myUnitFactor = theFactor; } protected: - //! Returns true for 0 mode. - virtual Standard_Boolean AcceptDisplayMode (const Standard_Integer theMode) const Standard_OVERRIDE { return theMode == 0; } + virtual Standard_Boolean AcceptDisplayMode(const Standard_Integer theMode) const Standard_OVERRIDE + { + return theMode == 0; + } //! Compute presentation. - Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr, - const Handle(Prs3d_Presentation)& thePrs, - const Standard_Integer theMode) Standard_OVERRIDE; + Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager)& thePrsMgr, + const Handle(Prs3d_Presentation)& thePrs, + const Standard_Integer theMode) Standard_OVERRIDE; //! Compute selection. - Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSel, - const Standard_Integer theMode) Standard_OVERRIDE; + Standard_EXPORT virtual void ComputeSelection(const Handle(SelectMgr_Selection)& theSel, + const Standard_Integer theMode) Standard_OVERRIDE; //! Compute laser ray presentation. Standard_EXPORT void computeLaserRay(); @@ -78,15 +80,14 @@ private: class XRTexture; private: - Handle(Graphic3d_Group) myRayGroup; Handle(Graphic3d_ArrayOfTriangles) myTris; - Quantity_Color myLaserColor; - Standard_ShortReal myLaserLength; - Standard_ShortReal myUnitFactor; - Aspect_XRTrackedDeviceRole myRole; - Standard_Boolean myToShowAxes; + Quantity_Color myLaserColor; + Standard_ShortReal myLaserLength; + Standard_ShortReal myUnitFactor; + Aspect_XRTrackedDeviceRole myRole; + Standard_Boolean myToShowAxes; }; #endif // _AIS_XRTrackedDevice_HeaderFile diff --git a/opencascade/APIHeaderSection_EditHeader.hxx b/opencascade/APIHeaderSection_EditHeader.hxx index 749528cb4..7302db76f 100644 --- a/opencascade/APIHeaderSection_EditHeader.hxx +++ b/opencascade/APIHeaderSection_EditHeader.hxx @@ -27,50 +27,38 @@ class TCollection_HAsciiString; class Standard_Transient; class Interface_InterfaceModel; - class APIHeaderSection_EditHeader; DEFINE_STANDARD_HANDLE(APIHeaderSection_EditHeader, IFSelect_Editor) - class APIHeaderSection_EditHeader : public IFSelect_Editor { public: - - Standard_EXPORT APIHeaderSection_EditHeader(); - - Standard_EXPORT TCollection_AsciiString Label() const Standard_OVERRIDE; - - Standard_EXPORT Standard_Boolean Recognize (const Handle(IFSelect_EditForm)& form) const Standard_OVERRIDE; - - Standard_EXPORT Handle(TCollection_HAsciiString) StringValue (const Handle(IFSelect_EditForm)& form, const Standard_Integer num) const Standard_OVERRIDE; - - Standard_EXPORT Standard_Boolean Apply (const Handle(IFSelect_EditForm)& form, const Handle(Standard_Transient)& ent, const Handle(Interface_InterfaceModel)& model) const Standard_OVERRIDE; - - Standard_EXPORT Standard_Boolean Load (const Handle(IFSelect_EditForm)& form, const Handle(Standard_Transient)& ent, const Handle(Interface_InterfaceModel)& model) const Standard_OVERRIDE; - - + Standard_EXPORT TCollection_AsciiString Label() const Standard_OVERRIDE; - DEFINE_STANDARD_RTTIEXT(APIHeaderSection_EditHeader,IFSelect_Editor) + Standard_EXPORT Standard_Boolean + Recognize(const Handle(IFSelect_EditForm)& form) const Standard_OVERRIDE; -protected: + Standard_EXPORT Handle(TCollection_HAsciiString) StringValue( + const Handle(IFSelect_EditForm)& form, + const Standard_Integer num) const Standard_OVERRIDE; + Standard_EXPORT Standard_Boolean + Apply(const Handle(IFSelect_EditForm)& form, + const Handle(Standard_Transient)& ent, + const Handle(Interface_InterfaceModel)& model) const Standard_OVERRIDE; + Standard_EXPORT Standard_Boolean + Load(const Handle(IFSelect_EditForm)& form, + const Handle(Standard_Transient)& ent, + const Handle(Interface_InterfaceModel)& model) const Standard_OVERRIDE; + DEFINE_STANDARD_RTTIEXT(APIHeaderSection_EditHeader, IFSelect_Editor) +protected: private: - - - - }; - - - - - - #endif // _APIHeaderSection_EditHeader_HeaderFile diff --git a/opencascade/APIHeaderSection_MakeHeader.hxx b/opencascade/APIHeaderSection_MakeHeader.hxx index 9415693b6..ce2c1ca6d 100644 --- a/opencascade/APIHeaderSection_MakeHeader.hxx +++ b/opencascade/APIHeaderSection_MakeHeader.hxx @@ -31,172 +31,166 @@ class StepData_StepModel; class Interface_Protocol; class TCollection_HAsciiString; - //! This class allows to consult and prepare/edit data stored in //! a Step Model Header -class APIHeaderSection_MakeHeader +class APIHeaderSection_MakeHeader { public: - DEFINE_STANDARD_ALLOC - //! Prepares a new MakeHeader from scratch Standard_EXPORT APIHeaderSection_MakeHeader(const Standard_Integer shapetype = 0); - + //! Prepares a MakeHeader from the content of a StepModel //! See IsDone to know if the Header is well defined Standard_EXPORT APIHeaderSection_MakeHeader(const Handle(StepData_StepModel)& model); - + //! Cancels the former definition and gives a FileName //! To be used when a Model has no well defined Header - Standard_EXPORT void Init (const Standard_CString nameval); - + Standard_EXPORT void Init(const Standard_CString nameval); + //! Returns True if all data have been defined (see also //! HasFn, HasFs, HasFd) Standard_EXPORT Standard_Boolean IsDone() const; - + //! Creates an empty header for a new //! STEP model and allows the header fields to be completed. - Standard_EXPORT void Apply (const Handle(StepData_StepModel)& model) const; - + Standard_EXPORT void Apply(const Handle(StepData_StepModel)& model) const; + //! Builds a Header, creates a new StepModel, then applies the //! Header to the StepModel //! The Schema Name is taken from the Protocol (if it inherits //! from StepData, else it is left in blanks) - Standard_EXPORT Handle(StepData_StepModel) NewModel (const Handle(Interface_Protocol)& protocol) const; - + Standard_EXPORT Handle(StepData_StepModel) NewModel( + const Handle(Interface_Protocol)& protocol) const; + //! Checks whether there is a //! file_name entity. Returns True if there is one. Standard_EXPORT Standard_Boolean HasFn() const; - + //! Returns the file_name entity. //! Returns an empty entity if the file_name entity is not initialized. Standard_EXPORT Handle(HeaderSection_FileName) FnValue() const; - - Standard_EXPORT void SetName (const Handle(TCollection_HAsciiString)& aName); - + + Standard_EXPORT void SetName(const Handle(TCollection_HAsciiString)& aName); + //! Returns the name attribute for the file_name entity. Standard_EXPORT Handle(TCollection_HAsciiString) Name() const; - - Standard_EXPORT void SetTimeStamp (const Handle(TCollection_HAsciiString)& aTimeStamp); - + + Standard_EXPORT void SetTimeStamp(const Handle(TCollection_HAsciiString)& aTimeStamp); + //! Returns the value of the time_stamp attribute for the file_name entity. Standard_EXPORT Handle(TCollection_HAsciiString) TimeStamp() const; - - Standard_EXPORT void SetAuthor (const Handle(Interface_HArray1OfHAsciiString)& aAuthor); - - Standard_EXPORT void SetAuthorValue (const Standard_Integer num, const Handle(TCollection_HAsciiString)& aAuthor); - + + Standard_EXPORT void SetAuthor(const Handle(Interface_HArray1OfHAsciiString)& aAuthor); + + Standard_EXPORT void SetAuthorValue(const Standard_Integer num, + const Handle(TCollection_HAsciiString)& aAuthor); + Standard_EXPORT Handle(Interface_HArray1OfHAsciiString) Author() const; - + //! Returns the value of the name attribute for the file_name entity. - Standard_EXPORT Handle(TCollection_HAsciiString) AuthorValue (const Standard_Integer num) const; - + Standard_EXPORT Handle(TCollection_HAsciiString) AuthorValue(const Standard_Integer num) const; + //! Returns the number of values for the author attribute in the file_name entity. Standard_EXPORT Standard_Integer NbAuthor() const; - - Standard_EXPORT void SetOrganization (const Handle(Interface_HArray1OfHAsciiString)& aOrganization); - - Standard_EXPORT void SetOrganizationValue (const Standard_Integer num, const Handle(TCollection_HAsciiString)& aOrganization); - + + Standard_EXPORT void SetOrganization( + const Handle(Interface_HArray1OfHAsciiString)& aOrganization); + + Standard_EXPORT void SetOrganizationValue(const Standard_Integer num, + const Handle(TCollection_HAsciiString)& aOrganization); + Standard_EXPORT Handle(Interface_HArray1OfHAsciiString) Organization() const; - + //! Returns the value of attribute //! organization for the file_name entity. - Standard_EXPORT Handle(TCollection_HAsciiString) OrganizationValue (const Standard_Integer num) const; - + Standard_EXPORT Handle(TCollection_HAsciiString) OrganizationValue( + const Standard_Integer num) const; + //! Returns the number of values for //! the organization attribute in the file_name entity. Standard_EXPORT Standard_Integer NbOrganization() const; - - Standard_EXPORT void SetPreprocessorVersion (const Handle(TCollection_HAsciiString)& aPreprocessorVersion); - + + Standard_EXPORT void SetPreprocessorVersion( + const Handle(TCollection_HAsciiString)& aPreprocessorVersion); + //! Returns the name of the preprocessor_version for the file_name entity. Standard_EXPORT Handle(TCollection_HAsciiString) PreprocessorVersion() const; - - Standard_EXPORT void SetOriginatingSystem (const Handle(TCollection_HAsciiString)& aOriginatingSystem); - + + Standard_EXPORT void SetOriginatingSystem( + const Handle(TCollection_HAsciiString)& aOriginatingSystem); + Standard_EXPORT Handle(TCollection_HAsciiString) OriginatingSystem() const; - - Standard_EXPORT void SetAuthorisation (const Handle(TCollection_HAsciiString)& aAuthorisation); - + + Standard_EXPORT void SetAuthorisation(const Handle(TCollection_HAsciiString)& aAuthorisation); + //! Returns the value of the authorization attribute for the file_name entity. Standard_EXPORT Handle(TCollection_HAsciiString) Authorisation() const; - + //! Checks whether there is a file_schema entity. Returns True if there is one. Standard_EXPORT Standard_Boolean HasFs() const; - - //! Returns the file_schema entity. Returns an empty entity if the file_schema entity is not initialized. + + //! Returns the file_schema entity. Returns an empty entity if the file_schema entity is not + //! initialized. Standard_EXPORT Handle(HeaderSection_FileSchema) FsValue() const; - - Standard_EXPORT void SetSchemaIdentifiers (const Handle(Interface_HArray1OfHAsciiString)& aSchemaIdentifiers); - - Standard_EXPORT void SetSchemaIdentifiersValue (const Standard_Integer num, const Handle(TCollection_HAsciiString)& aSchemaIdentifier); - + + Standard_EXPORT void SetSchemaIdentifiers( + const Handle(Interface_HArray1OfHAsciiString)& aSchemaIdentifiers); + + Standard_EXPORT void SetSchemaIdentifiersValue( + const Standard_Integer num, + const Handle(TCollection_HAsciiString)& aSchemaIdentifier); + Standard_EXPORT Handle(Interface_HArray1OfHAsciiString) SchemaIdentifiers() const; - + //! Returns the value of the schema_identifier attribute for the file_schema entity. - Standard_EXPORT Handle(TCollection_HAsciiString) SchemaIdentifiersValue (const Standard_Integer num) const; - + Standard_EXPORT Handle(TCollection_HAsciiString) SchemaIdentifiersValue( + const Standard_Integer num) const; + //! Returns the number of values for the schema_identifier attribute in the file_schema entity. Standard_EXPORT Standard_Integer NbSchemaIdentifiers() const; - + //! Add a subname of schema (if not yet in the list) - Standard_EXPORT void AddSchemaIdentifier (const Handle(TCollection_HAsciiString)& aSchemaIdentifier); - + Standard_EXPORT void AddSchemaIdentifier( + const Handle(TCollection_HAsciiString)& aSchemaIdentifier); + //! Checks whether there is a file_description entity. Returns True if there is one. Standard_EXPORT Standard_Boolean HasFd() const; - + //! Returns the file_description //! entity. Returns an empty entity if the file_description entity is not initialized. Standard_EXPORT Handle(HeaderSection_FileDescription) FdValue() const; - - Standard_EXPORT void SetDescription (const Handle(Interface_HArray1OfHAsciiString)& aDescription); - - Standard_EXPORT void SetDescriptionValue (const Standard_Integer num, const Handle(TCollection_HAsciiString)& aDescription); - + + Standard_EXPORT void SetDescription(const Handle(Interface_HArray1OfHAsciiString)& aDescription); + + Standard_EXPORT void SetDescriptionValue(const Standard_Integer num, + const Handle(TCollection_HAsciiString)& aDescription); + Standard_EXPORT Handle(Interface_HArray1OfHAsciiString) Description() const; - + //! Returns the value of the //! description attribute for the file_description entity. - Standard_EXPORT Handle(TCollection_HAsciiString) DescriptionValue (const Standard_Integer num) const; - + Standard_EXPORT Handle(TCollection_HAsciiString) DescriptionValue( + const Standard_Integer num) const; + //! Returns the number of values for //! the file_description entity in the STEP file header. Standard_EXPORT Standard_Integer NbDescription() const; - - Standard_EXPORT void SetImplementationLevel (const Handle(TCollection_HAsciiString)& aImplementationLevel); - + + Standard_EXPORT void SetImplementationLevel( + const Handle(TCollection_HAsciiString)& aImplementationLevel); + //! Returns the value of the //! implementation_level attribute for the file_description entity. Standard_EXPORT Handle(TCollection_HAsciiString) ImplementationLevel() const; - - - protected: - - - - - private: - - - - Standard_Boolean done; - Handle(HeaderSection_FileName) fn; - Handle(HeaderSection_FileSchema) fs; + Standard_Boolean done; + Handle(HeaderSection_FileName) fn; + Handle(HeaderSection_FileSchema) fs; Handle(HeaderSection_FileDescription) fd; - - }; - - - - - - #endif // _APIHeaderSection_MakeHeader_HeaderFile diff --git a/opencascade/Adaptor2d_Curve2d.hxx b/opencascade/Adaptor2d_Curve2d.hxx index 7f1d17cd8..7e7f988fe 100644 --- a/opencascade/Adaptor2d_Curve2d.hxx +++ b/opencascade/Adaptor2d_Curve2d.hxx @@ -51,108 +51,112 @@ class Adaptor2d_Curve2d : public Standard_Transient { DEFINE_STANDARD_RTTIEXT(Adaptor2d_Curve2d, Standard_Transient) public: - //! Shallow copy of adaptor Standard_EXPORT virtual Handle(Adaptor2d_Curve2d) ShallowCopy() const; - + Standard_EXPORT virtual Standard_Real FirstParameter() const; - + Standard_EXPORT virtual Standard_Real LastParameter() const; - + Standard_EXPORT virtual GeomAbs_Shape Continuity() const; - + //! If necessary, breaks the curve in intervals of //! continuity . And returns the number of //! intervals. - Standard_EXPORT virtual Standard_Integer NbIntervals (const GeomAbs_Shape S) const; - + Standard_EXPORT virtual Standard_Integer NbIntervals(const GeomAbs_Shape S) const; + //! Stores in the parameters bounding the intervals //! of continuity . //! //! The array must provide enough room to accommodate //! for the parameters. i.e. T.Length() > NbIntervals() - Standard_EXPORT virtual void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const; - + Standard_EXPORT virtual void Intervals(TColStd_Array1OfReal& T, const GeomAbs_Shape S) const; + //! Returns a curve equivalent of between //! parameters and . is used to //! test for 3d points confusion. //! If >= - Standard_EXPORT virtual Handle(Adaptor2d_Curve2d) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const; - + Standard_EXPORT virtual Handle(Adaptor2d_Curve2d) Trim(const Standard_Real First, + const Standard_Real Last, + const Standard_Real Tol) const; + Standard_EXPORT virtual Standard_Boolean IsClosed() const; - + Standard_EXPORT virtual Standard_Boolean IsPeriodic() const; - + Standard_EXPORT virtual Standard_Real Period() const; - + //! Computes the point of parameter U on the curve. - Standard_EXPORT virtual gp_Pnt2d Value (const Standard_Real U) const; - + Standard_EXPORT virtual gp_Pnt2d Value(const Standard_Real U) const; + //! Computes the point of parameter U on the curve. - Standard_EXPORT virtual void D0 (const Standard_Real U, gp_Pnt2d& P) const; - + Standard_EXPORT virtual void D0(const Standard_Real U, gp_Pnt2d& P) const; + //! Computes the point of parameter U on the curve with its //! first derivative. //! Raised if the continuity of the current interval //! is not C1. - Standard_EXPORT virtual void D1 (const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V) const; - + Standard_EXPORT virtual void D1(const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V) const; //! Returns the point P of parameter U, the first and second //! derivatives V1 and V2. //! Raised if the continuity of the current interval //! is not C2. - Standard_EXPORT virtual void D2 (const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2) const; - + Standard_EXPORT virtual void D2(const Standard_Real U, + gp_Pnt2d& P, + gp_Vec2d& V1, + gp_Vec2d& V2) const; //! Returns the point P of parameter U, the first, the second //! and the third derivative. //! Raised if the continuity of the current interval //! is not C3. - Standard_EXPORT virtual void D3 (const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2, gp_Vec2d& V3) const; - + Standard_EXPORT virtual void D3(const Standard_Real U, + gp_Pnt2d& P, + gp_Vec2d& V1, + gp_Vec2d& V2, + gp_Vec2d& V3) const; //! The returned vector gives the value of the derivative for the //! order of derivation N. //! Raised if the continuity of the current interval //! is not CN. //! Raised if N < 1. - Standard_EXPORT virtual gp_Vec2d DN (const Standard_Real U, const Standard_Integer N) const; - + Standard_EXPORT virtual gp_Vec2d DN(const Standard_Real U, const Standard_Integer N) const; + //! Returns the parametric resolution corresponding //! to the real space resolution . - Standard_EXPORT virtual Standard_Real Resolution (const Standard_Real R3d) const; - + Standard_EXPORT virtual Standard_Real Resolution(const Standard_Real R3d) const; + //! Returns the type of the curve in the current //! interval : Line, Circle, Ellipse, Hyperbola, //! Parabola, BezierCurve, BSplineCurve, OtherCurve. Standard_EXPORT virtual GeomAbs_CurveType GetType() const; - + Standard_EXPORT virtual gp_Lin2d Line() const; - + Standard_EXPORT virtual gp_Circ2d Circle() const; - + Standard_EXPORT virtual gp_Elips2d Ellipse() const; - + Standard_EXPORT virtual gp_Hypr2d Hyperbola() const; - + Standard_EXPORT virtual gp_Parab2d Parabola() const; - + Standard_EXPORT virtual Standard_Integer Degree() const; - + Standard_EXPORT virtual Standard_Boolean IsRational() const; - + Standard_EXPORT virtual Standard_Integer NbPoles() const; - + Standard_EXPORT virtual Standard_Integer NbKnots() const; - + Standard_EXPORT virtual Standard_Integer NbSamples() const; - + Standard_EXPORT virtual Handle(Geom2d_BezierCurve) Bezier() const; - + Standard_EXPORT virtual Handle(Geom2d_BSplineCurve) BSpline() const; Standard_EXPORT virtual ~Adaptor2d_Curve2d(); - }; #endif // _Adaptor2d_Curve2d_HeaderFile diff --git a/opencascade/Adaptor2d_Line2d.hxx b/opencascade/Adaptor2d_Line2d.hxx index 5fe95ce88..8b94ed898 100644 --- a/opencascade/Adaptor2d_Line2d.hxx +++ b/opencascade/Adaptor2d_Line2d.hxx @@ -40,96 +40,109 @@ class Geom2d_BSplineCurve; //! Use by the TopolTool to trim a surface. -class Adaptor2d_Line2d : public Adaptor2d_Curve2d +class Adaptor2d_Line2d : public Adaptor2d_Curve2d { DEFINE_STANDARD_RTTIEXT(Adaptor2d_Line2d, Adaptor2d_Curve2d) public: - Standard_EXPORT Adaptor2d_Line2d(); - - Standard_EXPORT Adaptor2d_Line2d(const gp_Pnt2d& P, const gp_Dir2d& D, const Standard_Real UFirst, const Standard_Real ULast); - + + Standard_EXPORT Adaptor2d_Line2d(const gp_Pnt2d& P, + const gp_Dir2d& D, + const Standard_Real UFirst, + const Standard_Real ULast); + //! Shallow copy of adaptor Standard_EXPORT virtual Handle(Adaptor2d_Curve2d) ShallowCopy() const Standard_OVERRIDE; - Standard_EXPORT void Load (const gp_Lin2d& L); - - Standard_EXPORT void Load (const gp_Lin2d& L, const Standard_Real UFirst, const Standard_Real ULast); - + Standard_EXPORT void Load(const gp_Lin2d& L); + + Standard_EXPORT void Load(const gp_Lin2d& L, + const Standard_Real UFirst, + const Standard_Real ULast); + Standard_EXPORT Standard_Real FirstParameter() const Standard_OVERRIDE; - + Standard_EXPORT Standard_Real LastParameter() const Standard_OVERRIDE; - + Standard_EXPORT GeomAbs_Shape Continuity() const Standard_OVERRIDE; - + //! If necessary, breaks the curve in intervals of //! continuity . And returns the number of //! intervals. - Standard_EXPORT Standard_Integer NbIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE; - + Standard_EXPORT Standard_Integer NbIntervals(const GeomAbs_Shape S) const Standard_OVERRIDE; + //! Stores in the parameters bounding the intervals //! of continuity . //! //! The array must provide enough room to accommodate //! for the parameters. i.e. T.Length() > NbIntervals() - Standard_EXPORT void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const Standard_OVERRIDE; - + Standard_EXPORT void Intervals(TColStd_Array1OfReal& T, + const GeomAbs_Shape S) const Standard_OVERRIDE; + //! Returns a curve equivalent of between //! parameters and . is used to //! test for 3d points confusion. //! If >= - Standard_EXPORT Handle(Adaptor2d_Curve2d) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE; - + Standard_EXPORT Handle(Adaptor2d_Curve2d) Trim(const Standard_Real First, + const Standard_Real Last, + const Standard_Real Tol) const Standard_OVERRIDE; + Standard_EXPORT Standard_Boolean IsClosed() const Standard_OVERRIDE; - + Standard_EXPORT Standard_Boolean IsPeriodic() const Standard_OVERRIDE; - + Standard_EXPORT Standard_Real Period() const Standard_OVERRIDE; - - Standard_EXPORT gp_Pnt2d Value (const Standard_Real X) const Standard_OVERRIDE; - - Standard_EXPORT void D0 (const Standard_Real X, gp_Pnt2d& P) const Standard_OVERRIDE; - - Standard_EXPORT void D1 (const Standard_Real X, gp_Pnt2d& P, gp_Vec2d& V) const Standard_OVERRIDE; - - Standard_EXPORT void D2 (const Standard_Real X, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2) const Standard_OVERRIDE; - - Standard_EXPORT void D3 (const Standard_Real X, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2, gp_Vec2d& V3) const Standard_OVERRIDE; - - Standard_EXPORT gp_Vec2d DN (const Standard_Real U, const Standard_Integer N) const Standard_OVERRIDE; - - Standard_EXPORT Standard_Real Resolution (const Standard_Real R3d) const Standard_OVERRIDE; - + + Standard_EXPORT gp_Pnt2d Value(const Standard_Real X) const Standard_OVERRIDE; + + Standard_EXPORT void D0(const Standard_Real X, gp_Pnt2d& P) const Standard_OVERRIDE; + + Standard_EXPORT void D1(const Standard_Real X, gp_Pnt2d& P, gp_Vec2d& V) const Standard_OVERRIDE; + + Standard_EXPORT void D2(const Standard_Real X, + gp_Pnt2d& P, + gp_Vec2d& V1, + gp_Vec2d& V2) const Standard_OVERRIDE; + + Standard_EXPORT void D3(const Standard_Real X, + gp_Pnt2d& P, + gp_Vec2d& V1, + gp_Vec2d& V2, + gp_Vec2d& V3) const Standard_OVERRIDE; + + Standard_EXPORT gp_Vec2d DN(const Standard_Real U, + const Standard_Integer N) const Standard_OVERRIDE; + + Standard_EXPORT Standard_Real Resolution(const Standard_Real R3d) const Standard_OVERRIDE; + Standard_EXPORT GeomAbs_CurveType GetType() const Standard_OVERRIDE; - + Standard_EXPORT gp_Lin2d Line() const Standard_OVERRIDE; - + Standard_EXPORT gp_Circ2d Circle() const Standard_OVERRIDE; - + Standard_EXPORT gp_Elips2d Ellipse() const Standard_OVERRIDE; - + Standard_EXPORT gp_Hypr2d Hyperbola() const Standard_OVERRIDE; - + Standard_EXPORT gp_Parab2d Parabola() const Standard_OVERRIDE; - + Standard_EXPORT Standard_Integer Degree() const Standard_OVERRIDE; - + Standard_EXPORT Standard_Boolean IsRational() const Standard_OVERRIDE; - + Standard_EXPORT Standard_Integer NbPoles() const Standard_OVERRIDE; - + Standard_EXPORT Standard_Integer NbKnots() const Standard_OVERRIDE; - + Standard_EXPORT Handle(Geom2d_BezierCurve) Bezier() const Standard_OVERRIDE; - + Standard_EXPORT Handle(Geom2d_BSplineCurve) BSpline() const Standard_OVERRIDE; private: - Standard_Real myUfirst; Standard_Real myUlast; - gp_Ax2d myAx2d; - + gp_Ax2d myAx2d; }; DEFINE_STANDARD_HANDLE(Adaptor2d_Line2d, Adaptor2d_Curve2d) diff --git a/opencascade/Adaptor2d_OffsetCurve.hxx b/opencascade/Adaptor2d_OffsetCurve.hxx index dae4124ec..1407f72e3 100644 --- a/opencascade/Adaptor2d_OffsetCurve.hxx +++ b/opencascade/Adaptor2d_OffsetCurve.hxx @@ -34,36 +34,41 @@ class Geom2d_BezierCurve; class Geom2d_BSplineCurve; //! Defines an Offset curve (algorithmic 2d curve). -class Adaptor2d_OffsetCurve : public Adaptor2d_Curve2d +class Adaptor2d_OffsetCurve : public Adaptor2d_Curve2d { DEFINE_STANDARD_RTTIEXT(Adaptor2d_OffsetCurve, Adaptor2d_Curve2d) public: - //! The Offset is set to 0. Standard_EXPORT Adaptor2d_OffsetCurve(); - + //! The curve is loaded. The Offset is set to 0. Standard_EXPORT Adaptor2d_OffsetCurve(const Handle(Adaptor2d_Curve2d)& C); - + //! Creates an OffsetCurve curve. //! The Offset is set to Offset. - Standard_EXPORT Adaptor2d_OffsetCurve(const Handle(Adaptor2d_Curve2d)& C, const Standard_Real Offset); - + Standard_EXPORT Adaptor2d_OffsetCurve(const Handle(Adaptor2d_Curve2d)& C, + const Standard_Real Offset); + //! Create an Offset curve. //! WFirst,WLast define the bounds of the Offset curve. - Standard_EXPORT Adaptor2d_OffsetCurve(const Handle(Adaptor2d_Curve2d)& C, const Standard_Real Offset, const Standard_Real WFirst, const Standard_Real WLast); - + Standard_EXPORT Adaptor2d_OffsetCurve(const Handle(Adaptor2d_Curve2d)& C, + const Standard_Real Offset, + const Standard_Real WFirst, + const Standard_Real WLast); + //! Shallow copy of adaptor Standard_EXPORT virtual Handle(Adaptor2d_Curve2d) ShallowCopy() const Standard_OVERRIDE; //! Changes the curve. The Offset is reset to 0. - Standard_EXPORT void Load (const Handle(Adaptor2d_Curve2d)& S); - + Standard_EXPORT void Load(const Handle(Adaptor2d_Curve2d)& S); + //! Changes the Offset on the current Curve. - Standard_EXPORT void Load (const Standard_Real Offset); - + Standard_EXPORT void Load(const Standard_Real Offset); + //! Changes the Offset Curve on the current Curve. - Standard_EXPORT void Load (const Standard_Real Offset, const Standard_Real WFirst, const Standard_Real WLast); + Standard_EXPORT void Load(const Standard_Real Offset, + const Standard_Real WFirst, + const Standard_Real WLast); const Handle(Adaptor2d_Curve2d)& Curve() const { return myCurve; } @@ -74,105 +79,111 @@ public: virtual Standard_Real LastParameter() const Standard_OVERRIDE { return myLast; } Standard_EXPORT GeomAbs_Shape Continuity() const Standard_OVERRIDE; - + //! If necessary, breaks the curve in intervals of //! continuity . And returns the number of //! intervals. - Standard_EXPORT Standard_Integer NbIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE; - + Standard_EXPORT Standard_Integer NbIntervals(const GeomAbs_Shape S) const Standard_OVERRIDE; + //! Stores in the parameters bounding the intervals //! of continuity . //! //! The array must provide enough room to accommodate //! for the parameters. i.e. T.Length() > NbIntervals() - Standard_EXPORT void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const Standard_OVERRIDE; - + Standard_EXPORT void Intervals(TColStd_Array1OfReal& T, + const GeomAbs_Shape S) const Standard_OVERRIDE; + //! Returns a curve equivalent of between //! parameters and . is used to //! test for 3d points confusion. //! If >= - Standard_EXPORT Handle(Adaptor2d_Curve2d) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE; - + Standard_EXPORT Handle(Adaptor2d_Curve2d) Trim(const Standard_Real First, + const Standard_Real Last, + const Standard_Real Tol) const Standard_OVERRIDE; + Standard_EXPORT Standard_Boolean IsClosed() const Standard_OVERRIDE; - + Standard_EXPORT Standard_Boolean IsPeriodic() const Standard_OVERRIDE; - + Standard_EXPORT Standard_Real Period() const Standard_OVERRIDE; - + //! Computes the point of parameter U on the curve. - Standard_EXPORT gp_Pnt2d Value (const Standard_Real U) const Standard_OVERRIDE; - + Standard_EXPORT gp_Pnt2d Value(const Standard_Real U) const Standard_OVERRIDE; + //! Computes the point of parameter U on the curve. - Standard_EXPORT void D0 (const Standard_Real U, gp_Pnt2d& P) const Standard_OVERRIDE; - + Standard_EXPORT void D0(const Standard_Real U, gp_Pnt2d& P) const Standard_OVERRIDE; + //! Computes the point of parameter U on the curve with its //! first derivative. //! Raised if the continuity of the current interval //! is not C1. - Standard_EXPORT void D1 (const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V) const Standard_OVERRIDE; - + Standard_EXPORT void D1(const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V) const Standard_OVERRIDE; //! Returns the point P of parameter U, the first and second //! derivatives V1 and V2. //! Raised if the continuity of the current interval //! is not C2. - Standard_EXPORT void D2 (const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2) const Standard_OVERRIDE; - + Standard_EXPORT void D2(const Standard_Real U, + gp_Pnt2d& P, + gp_Vec2d& V1, + gp_Vec2d& V2) const Standard_OVERRIDE; //! Returns the point P of parameter U, the first, the second //! and the third derivative. //! Raised if the continuity of the current interval //! is not C3. - Standard_EXPORT void D3 (const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2, gp_Vec2d& V3) const Standard_OVERRIDE; - + Standard_EXPORT void D3(const Standard_Real U, + gp_Pnt2d& P, + gp_Vec2d& V1, + gp_Vec2d& V2, + gp_Vec2d& V3) const Standard_OVERRIDE; //! The returned vector gives the value of the derivative for the //! order of derivation N. //! Raised if the continuity of the current interval //! is not CN. //! Raised if N < 1. - Standard_EXPORT gp_Vec2d DN (const Standard_Real U, const Standard_Integer N) const Standard_OVERRIDE; - + Standard_EXPORT gp_Vec2d DN(const Standard_Real U, + const Standard_Integer N) const Standard_OVERRIDE; + //! Returns the parametric resolution corresponding //! to the real space resolution . - Standard_EXPORT Standard_Real Resolution (const Standard_Real R3d) const Standard_OVERRIDE; - + Standard_EXPORT Standard_Real Resolution(const Standard_Real R3d) const Standard_OVERRIDE; + //! Returns the type of the curve in the current //! interval : Line, Circle, Ellipse, Hyperbola, //! Parabola, BezierCurve, BSplineCurve, OtherCurve. Standard_EXPORT GeomAbs_CurveType GetType() const Standard_OVERRIDE; - + Standard_EXPORT gp_Lin2d Line() const Standard_OVERRIDE; - + Standard_EXPORT gp_Circ2d Circle() const Standard_OVERRIDE; - + Standard_EXPORT gp_Elips2d Ellipse() const Standard_OVERRIDE; - + Standard_EXPORT gp_Hypr2d Hyperbola() const Standard_OVERRIDE; - + Standard_EXPORT gp_Parab2d Parabola() const Standard_OVERRIDE; - + Standard_EXPORT Standard_Integer Degree() const Standard_OVERRIDE; - + Standard_EXPORT Standard_Boolean IsRational() const Standard_OVERRIDE; - + Standard_EXPORT Standard_Integer NbPoles() const Standard_OVERRIDE; - + Standard_EXPORT Standard_Integer NbKnots() const Standard_OVERRIDE; - + Standard_EXPORT Handle(Geom2d_BezierCurve) Bezier() const Standard_OVERRIDE; - + Standard_EXPORT Handle(Geom2d_BSplineCurve) BSpline() const Standard_OVERRIDE; - Standard_EXPORT Standard_Integer NbSamples() const Standard_OVERRIDE; + Standard_EXPORT Standard_Integer NbSamples() const Standard_OVERRIDE; private: - Handle(Adaptor2d_Curve2d) myCurve; - Standard_Real myOffset; - Standard_Real myFirst; - Standard_Real myLast; - + Standard_Real myOffset; + Standard_Real myFirst; + Standard_Real myLast; }; DEFINE_STANDARD_HANDLE(Adaptor2d_OffsetCurve, Adaptor2d_Curve2d) diff --git a/opencascade/Adaptor3d_Curve.hxx b/opencascade/Adaptor3d_Curve.hxx index b1fc10086..b5fed646a 100644 --- a/opencascade/Adaptor3d_Curve.hxx +++ b/opencascade/Adaptor3d_Curve.hxx @@ -53,108 +53,109 @@ class Adaptor3d_Curve : public Standard_Transient { DEFINE_STANDARD_RTTIEXT(Adaptor3d_Curve, Standard_Transient) public: - //! Shallow copy of adaptor Standard_EXPORT virtual Handle(Adaptor3d_Curve) ShallowCopy() const; Standard_EXPORT virtual Standard_Real FirstParameter() const; - + Standard_EXPORT virtual Standard_Real LastParameter() const; - + Standard_EXPORT virtual GeomAbs_Shape Continuity() const; - + //! Returns the number of intervals for continuity //! . May be one if Continuity(me) >= - Standard_EXPORT virtual Standard_Integer NbIntervals (const GeomAbs_Shape S) const; - + Standard_EXPORT virtual Standard_Integer NbIntervals(const GeomAbs_Shape S) const; + //! Stores in the parameters bounding the intervals //! of continuity . //! //! The array must provide enough room to accommodate //! for the parameters. i.e. T.Length() > NbIntervals() - Standard_EXPORT virtual void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const; - + Standard_EXPORT virtual void Intervals(TColStd_Array1OfReal& T, const GeomAbs_Shape S) const; + //! Returns a curve equivalent of between //! parameters and . is used to //! test for 3d points confusion. //! If >= - Standard_EXPORT virtual Handle(Adaptor3d_Curve) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const; - + Standard_EXPORT virtual Handle(Adaptor3d_Curve) Trim(const Standard_Real First, + const Standard_Real Last, + const Standard_Real Tol) const; + Standard_EXPORT virtual Standard_Boolean IsClosed() const; - + Standard_EXPORT virtual Standard_Boolean IsPeriodic() const; - + Standard_EXPORT virtual Standard_Real Period() const; - + //! Computes the point of parameter U on the curve. - Standard_EXPORT virtual gp_Pnt Value (const Standard_Real U) const; - + Standard_EXPORT virtual gp_Pnt Value(const Standard_Real U) const; + //! Computes the point of parameter U on the curve. - Standard_EXPORT virtual void D0 (const Standard_Real U, gp_Pnt& P) const; - + Standard_EXPORT virtual void D0(const Standard_Real U, gp_Pnt& P) const; + //! Computes the point of parameter U on the curve with its //! first derivative. //! Raised if the continuity of the current interval //! is not C1. - Standard_EXPORT virtual void D1 (const Standard_Real U, gp_Pnt& P, gp_Vec& V) const; - + Standard_EXPORT virtual void D1(const Standard_Real U, gp_Pnt& P, gp_Vec& V) const; //! Returns the point P of parameter U, the first and second //! derivatives V1 and V2. //! Raised if the continuity of the current interval //! is not C2. - Standard_EXPORT virtual void D2 (const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2) const; - + Standard_EXPORT virtual void D2(const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2) const; //! Returns the point P of parameter U, the first, the second //! and the third derivative. //! Raised if the continuity of the current interval //! is not C3. - Standard_EXPORT virtual void D3 (const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, gp_Vec& V3) const; - + Standard_EXPORT virtual void D3(const Standard_Real U, + gp_Pnt& P, + gp_Vec& V1, + gp_Vec& V2, + gp_Vec& V3) const; //! The returned vector gives the value of the derivative for the //! order of derivation N. //! Raised if the continuity of the current interval //! is not CN. //! Raised if N < 1. - Standard_EXPORT virtual gp_Vec DN (const Standard_Real U, const Standard_Integer N) const; - + Standard_EXPORT virtual gp_Vec DN(const Standard_Real U, const Standard_Integer N) const; + //! Returns the parametric resolution corresponding //! to the real space resolution . - Standard_EXPORT virtual Standard_Real Resolution (const Standard_Real R3d) const; - + Standard_EXPORT virtual Standard_Real Resolution(const Standard_Real R3d) const; + //! Returns the type of the curve in the current //! interval : Line, Circle, Ellipse, Hyperbola, //! Parabola, BezierCurve, BSplineCurve, OtherCurve. Standard_EXPORT virtual GeomAbs_CurveType GetType() const; - + Standard_EXPORT virtual gp_Lin Line() const; - + Standard_EXPORT virtual gp_Circ Circle() const; - + Standard_EXPORT virtual gp_Elips Ellipse() const; - + Standard_EXPORT virtual gp_Hypr Hyperbola() const; - + Standard_EXPORT virtual gp_Parab Parabola() const; - + Standard_EXPORT virtual Standard_Integer Degree() const; - + Standard_EXPORT virtual Standard_Boolean IsRational() const; - + Standard_EXPORT virtual Standard_Integer NbPoles() const; - + Standard_EXPORT virtual Standard_Integer NbKnots() const; - + Standard_EXPORT virtual Handle(Geom_BezierCurve) Bezier() const; - + Standard_EXPORT virtual Handle(Geom_BSplineCurve) BSpline() const; Standard_EXPORT virtual Handle(Geom_OffsetCurve) OffsetCurve() const; Standard_EXPORT virtual ~Adaptor3d_Curve(); - }; #endif // _Adaptor3d_Curve_HeaderFile diff --git a/opencascade/Adaptor3d_CurveOnSurface.hxx b/opencascade/Adaptor3d_CurveOnSurface.hxx index a1105a488..cf9f072ff 100644 --- a/opencascade/Adaptor3d_CurveOnSurface.hxx +++ b/opencascade/Adaptor3d_CurveOnSurface.hxx @@ -31,167 +31,189 @@ DEFINE_STANDARD_HANDLE(Adaptor3d_CurveOnSurface, Adaptor3d_Curve) //! required of the curve by algorithms which use it. The //! curve is defined as a 2D curve from the Geom2d //! package, in the parametric space of the surface. -class Adaptor3d_CurveOnSurface : public Adaptor3d_Curve +class Adaptor3d_CurveOnSurface : public Adaptor3d_Curve { DEFINE_STANDARD_RTTIEXT(Adaptor3d_CurveOnSurface, Adaptor3d_Curve) public: - Standard_EXPORT Adaptor3d_CurveOnSurface(); - + Standard_EXPORT Adaptor3d_CurveOnSurface(const Handle(Adaptor3d_Surface)& S); - + //! Creates a CurveOnSurface from the 2d curve and //! the surface . - Standard_EXPORT Adaptor3d_CurveOnSurface(const Handle(Adaptor2d_Curve2d)& C, const Handle(Adaptor3d_Surface)& S); - + Standard_EXPORT Adaptor3d_CurveOnSurface(const Handle(Adaptor2d_Curve2d)& C, + const Handle(Adaptor3d_Surface)& S); + //! Shallow copy of adaptor Standard_EXPORT virtual Handle(Adaptor3d_Curve) ShallowCopy() const Standard_OVERRIDE; //! Changes the surface. - Standard_EXPORT void Load (const Handle(Adaptor3d_Surface)& S); - + Standard_EXPORT void Load(const Handle(Adaptor3d_Surface)& S); + //! Changes the 2d curve. - Standard_EXPORT void Load (const Handle(Adaptor2d_Curve2d)& C); - + Standard_EXPORT void Load(const Handle(Adaptor2d_Curve2d)& C); + //! Load both curve and surface. - Standard_EXPORT void Load (const Handle(Adaptor2d_Curve2d)& C, const Handle(Adaptor3d_Surface)& S); - + Standard_EXPORT void Load(const Handle(Adaptor2d_Curve2d)& C, const Handle(Adaptor3d_Surface)& S); + Standard_EXPORT const Handle(Adaptor2d_Curve2d)& GetCurve() const; - + Standard_EXPORT const Handle(Adaptor3d_Surface)& GetSurface() const; - + Standard_EXPORT Handle(Adaptor2d_Curve2d)& ChangeCurve(); - + Standard_EXPORT Handle(Adaptor3d_Surface)& ChangeSurface(); - + Standard_EXPORT Standard_Real FirstParameter() const Standard_OVERRIDE; - + Standard_EXPORT Standard_Real LastParameter() const Standard_OVERRIDE; - + Standard_EXPORT GeomAbs_Shape Continuity() const Standard_OVERRIDE; - + //! Returns the number of intervals for continuity //! . May be one if Continuity(me) >= - Standard_EXPORT Standard_Integer NbIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE; - + Standard_EXPORT Standard_Integer NbIntervals(const GeomAbs_Shape S) const Standard_OVERRIDE; + //! Stores in the parameters bounding the intervals //! of continuity . //! //! The array must provide enough room to accommodate //! for the parameters. i.e. T.Length() > NbIntervals() - Standard_EXPORT void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const Standard_OVERRIDE; - + Standard_EXPORT void Intervals(TColStd_Array1OfReal& T, + const GeomAbs_Shape S) const Standard_OVERRIDE; + //! Returns a curve equivalent of between //! parameters and . is used to //! test for 3d points confusion. //! If >= - Standard_EXPORT Handle(Adaptor3d_Curve) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE; - + Standard_EXPORT Handle(Adaptor3d_Curve) Trim(const Standard_Real First, + const Standard_Real Last, + const Standard_Real Tol) const Standard_OVERRIDE; + Standard_EXPORT Standard_Boolean IsClosed() const Standard_OVERRIDE; - + Standard_EXPORT Standard_Boolean IsPeriodic() const Standard_OVERRIDE; - + Standard_EXPORT Standard_Real Period() const Standard_OVERRIDE; - + //! Computes the point of parameter U on the curve. - Standard_EXPORT gp_Pnt Value (const Standard_Real U) const Standard_OVERRIDE; - + Standard_EXPORT gp_Pnt Value(const Standard_Real U) const Standard_OVERRIDE; + //! Computes the point of parameter U on the curve. - Standard_EXPORT void D0 (const Standard_Real U, gp_Pnt& P) const Standard_OVERRIDE; - + Standard_EXPORT void D0(const Standard_Real U, gp_Pnt& P) const Standard_OVERRIDE; + //! Computes the point of parameter U on the curve with its //! first derivative. //! Raised if the continuity of the current interval //! is not C1. - Standard_EXPORT void D1 (const Standard_Real U, gp_Pnt& P, gp_Vec& V) const Standard_OVERRIDE; - + Standard_EXPORT void D1(const Standard_Real U, gp_Pnt& P, gp_Vec& V) const Standard_OVERRIDE; //! Returns the point P of parameter U, the first and second //! derivatives V1 and V2. //! Raised if the continuity of the current interval //! is not C2. - Standard_EXPORT void D2 (const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2) const Standard_OVERRIDE; - + Standard_EXPORT void D2(const Standard_Real U, + gp_Pnt& P, + gp_Vec& V1, + gp_Vec& V2) const Standard_OVERRIDE; //! Returns the point P of parameter U, the first, the second //! and the third derivative. //! Raised if the continuity of the current interval //! is not C3. - Standard_EXPORT void D3 (const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, gp_Vec& V3) const Standard_OVERRIDE; - + Standard_EXPORT void D3(const Standard_Real U, + gp_Pnt& P, + gp_Vec& V1, + gp_Vec& V2, + gp_Vec& V3) const Standard_OVERRIDE; //! The returned vector gives the value of the derivative for the //! order of derivation N. //! Raised if the continuity of the current interval //! is not CN. //! Raised if N < 1. - Standard_EXPORT gp_Vec DN (const Standard_Real U, const Standard_Integer N) const Standard_OVERRIDE; - + Standard_EXPORT gp_Vec DN(const Standard_Real U, + const Standard_Integer N) const Standard_OVERRIDE; + //! Returns the parametric resolution corresponding //! to the real space resolution . - Standard_EXPORT Standard_Real Resolution (const Standard_Real R3d) const Standard_OVERRIDE; - + Standard_EXPORT Standard_Real Resolution(const Standard_Real R3d) const Standard_OVERRIDE; + //! Returns the type of the curve in the current //! interval : Line, Circle, Ellipse, Hyperbola, //! Parabola, BezierCurve, BSplineCurve, OtherCurve. Standard_EXPORT GeomAbs_CurveType GetType() const Standard_OVERRIDE; - + Standard_EXPORT gp_Lin Line() const Standard_OVERRIDE; - + Standard_EXPORT gp_Circ Circle() const Standard_OVERRIDE; - + Standard_EXPORT gp_Elips Ellipse() const Standard_OVERRIDE; - + Standard_EXPORT gp_Hypr Hyperbola() const Standard_OVERRIDE; - + Standard_EXPORT gp_Parab Parabola() const Standard_OVERRIDE; - + Standard_EXPORT Standard_Integer Degree() const Standard_OVERRIDE; - + Standard_EXPORT Standard_Boolean IsRational() const Standard_OVERRIDE; - + Standard_EXPORT Standard_Integer NbPoles() const Standard_OVERRIDE; - + Standard_EXPORT Standard_Integer NbKnots() const Standard_OVERRIDE; - + Standard_EXPORT Handle(Geom_BezierCurve) Bezier() const Standard_OVERRIDE; - + Standard_EXPORT Handle(Geom_BSplineCurve) BSpline() const Standard_OVERRIDE; private: - Standard_EXPORT void EvalKPart(); - + //! Evaluates myFirstSurf and myLastSurf //! for trimming the curve on surface. //! Following methods output left-bottom and right-top points //! of located part on surface //! for trimming the curve on surface. Standard_EXPORT void EvalFirstLastSurf(); - - Standard_EXPORT void LocatePart (const gp_Pnt2d& UV, const gp_Vec2d& DUV, const Handle(Adaptor3d_Surface)& S, gp_Pnt2d& LeftBot, gp_Pnt2d& RightTop) const; - - Standard_EXPORT Standard_Boolean LocatePart_RevExt (const gp_Pnt2d& UV, const gp_Vec2d& DUV, const Handle(Adaptor3d_Surface)& S, gp_Pnt2d& LeftBot, gp_Pnt2d& RightTop) const; - - Standard_EXPORT Standard_Boolean LocatePart_Offset (const gp_Pnt2d& UV, const gp_Vec2d& DUV, const Handle(Adaptor3d_Surface)& S, gp_Pnt2d& LeftBot, gp_Pnt2d& RightTop) const; - + + Standard_EXPORT void LocatePart(const gp_Pnt2d& UV, + const gp_Vec2d& DUV, + const Handle(Adaptor3d_Surface)& S, + gp_Pnt2d& LeftBot, + gp_Pnt2d& RightTop) const; + + Standard_EXPORT Standard_Boolean LocatePart_RevExt(const gp_Pnt2d& UV, + const gp_Vec2d& DUV, + const Handle(Adaptor3d_Surface)& S, + gp_Pnt2d& LeftBot, + gp_Pnt2d& RightTop) const; + + Standard_EXPORT Standard_Boolean LocatePart_Offset(const gp_Pnt2d& UV, + const gp_Vec2d& DUV, + const Handle(Adaptor3d_Surface)& S, + gp_Pnt2d& LeftBot, + gp_Pnt2d& RightTop) const; + //! Extracts the numbers of knots which equal //! the point and checks derivative components //! by zero equivalence. - Standard_EXPORT void FindBounds (const TColStd_Array1OfReal& Arr, const Standard_Real XYComp, const Standard_Real DUVComp, Standard_Integer& Bnd1, Standard_Integer& Bnd2, Standard_Boolean& DerIsNull) const; + Standard_EXPORT void FindBounds(const TColStd_Array1OfReal& Arr, + const Standard_Real XYComp, + const Standard_Real DUVComp, + Standard_Integer& Bnd1, + Standard_Integer& Bnd2, + Standard_Boolean& DerIsNull) const; private: - - Handle(Adaptor3d_Surface) mySurface; - Handle(Adaptor2d_Curve2d) myCurve; - GeomAbs_CurveType myType; - gp_Circ myCirc; - gp_Lin myLin; - Handle(Adaptor3d_Surface) myFirstSurf; - Handle(Adaptor3d_Surface) myLastSurf; + Handle(Adaptor3d_Surface) mySurface; + Handle(Adaptor2d_Curve2d) myCurve; + GeomAbs_CurveType myType; + gp_Circ myCirc; + gp_Lin myLin; + Handle(Adaptor3d_Surface) myFirstSurf; + Handle(Adaptor3d_Surface) myLastSurf; Handle(TColStd_HSequenceOfReal) myIntervals; - GeomAbs_Shape myIntCont; - + GeomAbs_Shape myIntCont; }; #endif // _Adaptor3d_CurveOnSurface_HeaderFile diff --git a/opencascade/Adaptor3d_HSurfaceTool.hxx b/opencascade/Adaptor3d_HSurfaceTool.hxx index 1b3eae0c9..076d8a2a3 100644 --- a/opencascade/Adaptor3d_HSurfaceTool.hxx +++ b/opencascade/Adaptor3d_HSurfaceTool.hxx @@ -37,145 +37,258 @@ #include #include -class Adaptor3d_HSurfaceTool +class Adaptor3d_HSurfaceTool { public: - DEFINE_STANDARD_ALLOC - static Standard_Real FirstUParameter (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->FirstUParameter(); } + static Standard_Real FirstUParameter(const Handle(Adaptor3d_Surface)& theSurf) + { + return theSurf->FirstUParameter(); + } - static Standard_Real FirstVParameter (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->FirstVParameter(); } + static Standard_Real FirstVParameter(const Handle(Adaptor3d_Surface)& theSurf) + { + return theSurf->FirstVParameter(); + } - static Standard_Real LastUParameter (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->LastUParameter(); } + static Standard_Real LastUParameter(const Handle(Adaptor3d_Surface)& theSurf) + { + return theSurf->LastUParameter(); + } - static Standard_Real LastVParameter (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->LastVParameter(); } + static Standard_Real LastVParameter(const Handle(Adaptor3d_Surface)& theSurf) + { + return theSurf->LastVParameter(); + } - static Standard_Integer NbUIntervals (const Handle(Adaptor3d_Surface)& theSurf, const GeomAbs_Shape theSh) { return theSurf->NbUIntervals (theSh); } + static Standard_Integer NbUIntervals(const Handle(Adaptor3d_Surface)& theSurf, + const GeomAbs_Shape theSh) + { + return theSurf->NbUIntervals(theSh); + } - static Standard_Integer NbVIntervals (const Handle(Adaptor3d_Surface)& theSurf, const GeomAbs_Shape theSh) { return theSurf->NbVIntervals (theSh); } + static Standard_Integer NbVIntervals(const Handle(Adaptor3d_Surface)& theSurf, + const GeomAbs_Shape theSh) + { + return theSurf->NbVIntervals(theSh); + } - static void UIntervals (const Handle(Adaptor3d_Surface)& theSurf, TColStd_Array1OfReal& theTab, const GeomAbs_Shape theSh) { theSurf->UIntervals (theTab, theSh); } + static void UIntervals(const Handle(Adaptor3d_Surface)& theSurf, + TColStd_Array1OfReal& theTab, + const GeomAbs_Shape theSh) + { + theSurf->UIntervals(theTab, theSh); + } - static void VIntervals (const Handle(Adaptor3d_Surface)& theSurf, TColStd_Array1OfReal& theTab, const GeomAbs_Shape theSh) { theSurf->VIntervals (theTab, theSh); } + static void VIntervals(const Handle(Adaptor3d_Surface)& theSurf, + TColStd_Array1OfReal& theTab, + const GeomAbs_Shape theSh) + { + theSurf->VIntervals(theTab, theSh); + } //! If >= - static Handle(Adaptor3d_Surface) UTrim (const Handle(Adaptor3d_Surface)& theSurf, - const Standard_Real theFirst, const Standard_Real theLast, const Standard_Real theTol) + static Handle(Adaptor3d_Surface) UTrim(const Handle(Adaptor3d_Surface)& theSurf, + const Standard_Real theFirst, + const Standard_Real theLast, + const Standard_Real theTol) { - return theSurf->UTrim (theFirst, theLast, theTol); + return theSurf->UTrim(theFirst, theLast, theTol); } //! If >= - static Handle(Adaptor3d_Surface) VTrim (const Handle(Adaptor3d_Surface)& theSurf, - const Standard_Real theFirst, const Standard_Real theLast, const Standard_Real theTol) + static Handle(Adaptor3d_Surface) VTrim(const Handle(Adaptor3d_Surface)& theSurf, + const Standard_Real theFirst, + const Standard_Real theLast, + const Standard_Real theTol) { - return theSurf->VTrim (theFirst, theLast, theTol); + return theSurf->VTrim(theFirst, theLast, theTol); } - - static Standard_Boolean IsUClosed (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->IsUClosed(); } - static Standard_Boolean IsVClosed (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->IsVClosed(); } - - static Standard_Boolean IsUPeriodic (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->IsUPeriodic(); } + static Standard_Boolean IsUClosed(const Handle(Adaptor3d_Surface)& theSurf) + { + return theSurf->IsUClosed(); + } - static Standard_Real UPeriod (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->UPeriod(); } + static Standard_Boolean IsVClosed(const Handle(Adaptor3d_Surface)& theSurf) + { + return theSurf->IsVClosed(); + } - static Standard_Boolean IsVPeriodic (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->IsVPeriodic(); } - - static Standard_Real VPeriod (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->VPeriod(); } + static Standard_Boolean IsUPeriodic(const Handle(Adaptor3d_Surface)& theSurf) + { + return theSurf->IsUPeriodic(); + } - static gp_Pnt Value (const Handle(Adaptor3d_Surface)& theSurf, const Standard_Real theU, const Standard_Real theV) { return theSurf->Value (theU, theV); } + static Standard_Real UPeriod(const Handle(Adaptor3d_Surface)& theSurf) + { + return theSurf->UPeriod(); + } - static void D0 (const Handle(Adaptor3d_Surface)& theSurf, - const Standard_Real theU, const Standard_Real theV, - gp_Pnt& thePnt) + static Standard_Boolean IsVPeriodic(const Handle(Adaptor3d_Surface)& theSurf) { - theSurf->D0 (theU, theV, thePnt); + return theSurf->IsVPeriodic(); } - static void D1 (const Handle(Adaptor3d_Surface)& theSurf, - const Standard_Real theU, const Standard_Real theV, - gp_Pnt& thePnt, - gp_Vec& theD1U, gp_Vec& theD1V) + static Standard_Real VPeriod(const Handle(Adaptor3d_Surface)& theSurf) { - theSurf->D1 (theU, theV, thePnt, theD1U, theD1V); + return theSurf->VPeriod(); } - static void D2 (const Handle(Adaptor3d_Surface)& theSurf, - const Standard_Real theU, const Standard_Real theV, - gp_Pnt& thePnt, - gp_Vec& theD1U, gp_Vec& theD1V, - gp_Vec& theD2U, gp_Vec& theD2V, gp_Vec& theD2UV) + static gp_Pnt Value(const Handle(Adaptor3d_Surface)& theSurf, + const Standard_Real theU, + const Standard_Real theV) { - theSurf->D2 (theU, theV, thePnt, theD1U, theD1V, theD2U, theD2V, theD2UV); + return theSurf->Value(theU, theV); } - static void D3 (const Handle(Adaptor3d_Surface)& theSurf, - const Standard_Real theU, const Standard_Real theV, - gp_Pnt& thePnt, - gp_Vec& theD1U, gp_Vec& theD1V, - gp_Vec& theD2U, gp_Vec& theD2V, gp_Vec& theD2UV, - gp_Vec& theD3U, gp_Vec& theD3V, gp_Vec& theD3UUV, gp_Vec& theD3UVV) + static void D0(const Handle(Adaptor3d_Surface)& theSurf, + const Standard_Real theU, + const Standard_Real theV, + gp_Pnt& thePnt) { - theSurf->D3 (theU, theV, thePnt, theD1U, theD1V, theD2U, theD2V, theD2UV, theD3U, theD3V, theD3UUV, theD3UVV); + theSurf->D0(theU, theV, thePnt); } - static gp_Vec DN (const Handle(Adaptor3d_Surface)& theSurf, - const Standard_Real theU, const Standard_Real theV, - const Standard_Integer theNU, const Standard_Integer theNV) + static void D1(const Handle(Adaptor3d_Surface)& theSurf, + const Standard_Real theU, + const Standard_Real theV, + gp_Pnt& thePnt, + gp_Vec& theD1U, + gp_Vec& theD1V) { - return theSurf->DN (theU, theV, theNU, theNV); + theSurf->D1(theU, theV, thePnt, theD1U, theD1V); } - static Standard_Real UResolution (const Handle(Adaptor3d_Surface)& theSurf, const Standard_Real theR3d) + static void D2(const Handle(Adaptor3d_Surface)& theSurf, + const Standard_Real theU, + const Standard_Real theV, + gp_Pnt& thePnt, + gp_Vec& theD1U, + gp_Vec& theD1V, + gp_Vec& theD2U, + gp_Vec& theD2V, + gp_Vec& theD2UV) { - return theSurf->UResolution (theR3d); + theSurf->D2(theU, theV, thePnt, theD1U, theD1V, theD2U, theD2V, theD2UV); } - static Standard_Real VResolution (const Handle(Adaptor3d_Surface)& theSurf, const Standard_Real theR3d) + static void D3(const Handle(Adaptor3d_Surface)& theSurf, + const Standard_Real theU, + const Standard_Real theV, + gp_Pnt& thePnt, + gp_Vec& theD1U, + gp_Vec& theD1V, + gp_Vec& theD2U, + gp_Vec& theD2V, + gp_Vec& theD2UV, + gp_Vec& theD3U, + gp_Vec& theD3V, + gp_Vec& theD3UUV, + gp_Vec& theD3UVV) { - return theSurf->VResolution (theR3d); + theSurf->D3(theU, + theV, + thePnt, + theD1U, + theD1V, + theD2U, + theD2V, + theD2UV, + theD3U, + theD3V, + theD3UUV, + theD3UVV); } - static GeomAbs_SurfaceType GetType (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->GetType(); } + static gp_Vec DN(const Handle(Adaptor3d_Surface)& theSurf, + const Standard_Real theU, + const Standard_Real theV, + const Standard_Integer theNU, + const Standard_Integer theNV) + { + return theSurf->DN(theU, theV, theNU, theNV); + } + + static Standard_Real UResolution(const Handle(Adaptor3d_Surface)& theSurf, + const Standard_Real theR3d) + { + return theSurf->UResolution(theR3d); + } + + static Standard_Real VResolution(const Handle(Adaptor3d_Surface)& theSurf, + const Standard_Real theR3d) + { + return theSurf->VResolution(theR3d); + } - static gp_Pln Plane (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->Plane(); } + static GeomAbs_SurfaceType GetType(const Handle(Adaptor3d_Surface)& theSurf) + { + return theSurf->GetType(); + } - static gp_Cylinder Cylinder (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->Cylinder(); } + static gp_Pln Plane(const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->Plane(); } - static gp_Cone Cone (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->Cone(); } + static gp_Cylinder Cylinder(const Handle(Adaptor3d_Surface)& theSurf) + { + return theSurf->Cylinder(); + } - static gp_Torus Torus (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->Torus(); } + static gp_Cone Cone(const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->Cone(); } - static gp_Sphere Sphere (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->Sphere(); } + static gp_Torus Torus(const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->Torus(); } - static Handle(Geom_BezierSurface) Bezier (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->Bezier(); } + static gp_Sphere Sphere(const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->Sphere(); } - static Handle(Geom_BSplineSurface) BSpline (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->BSpline(); } + static Handle(Geom_BezierSurface) Bezier(const Handle(Adaptor3d_Surface)& theSurf) + { + return theSurf->Bezier(); + } - static gp_Ax1 AxeOfRevolution (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->AxeOfRevolution(); } + static Handle(Geom_BSplineSurface) BSpline(const Handle(Adaptor3d_Surface)& theSurf) + { + return theSurf->BSpline(); + } - static gp_Dir Direction (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->Direction(); } + static gp_Ax1 AxeOfRevolution(const Handle(Adaptor3d_Surface)& theSurf) + { + return theSurf->AxeOfRevolution(); + } - static Handle(Adaptor3d_Curve) BasisCurve (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->BasisCurve(); } + static gp_Dir Direction(const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->Direction(); } - static Handle(Adaptor3d_Surface) BasisSurface (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->BasisSurface(); } + static Handle(Adaptor3d_Curve) BasisCurve(const Handle(Adaptor3d_Surface)& theSurf) + { + return theSurf->BasisCurve(); + } - static Standard_Real OffsetValue (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->OffsetValue(); } + static Handle(Adaptor3d_Surface) BasisSurface(const Handle(Adaptor3d_Surface)& theSurf) + { + return theSurf->BasisSurface(); + } - Standard_EXPORT static Standard_Boolean IsSurfG1 (const Handle(Adaptor3d_Surface)& theSurf, - const Standard_Boolean theAlongU, - const Standard_Real theAngTol = Precision::Angular()); + static Standard_Real OffsetValue(const Handle(Adaptor3d_Surface)& theSurf) + { + return theSurf->OffsetValue(); + } - Standard_EXPORT static Standard_Integer NbSamplesU (const Handle(Adaptor3d_Surface)& S); + Standard_EXPORT static Standard_Boolean IsSurfG1( + const Handle(Adaptor3d_Surface)& theSurf, + const Standard_Boolean theAlongU, + const Standard_Real theAngTol = Precision::Angular()); - Standard_EXPORT static Standard_Integer NbSamplesV (const Handle(Adaptor3d_Surface)& S); + Standard_EXPORT static Standard_Integer NbSamplesU(const Handle(Adaptor3d_Surface)& S); - Standard_EXPORT static Standard_Integer NbSamplesU (const Handle(Adaptor3d_Surface)& S, const Standard_Real u1, const Standard_Real u2); + Standard_EXPORT static Standard_Integer NbSamplesV(const Handle(Adaptor3d_Surface)& S); - Standard_EXPORT static Standard_Integer NbSamplesV (const Handle(Adaptor3d_Surface)& , const Standard_Real v1, const Standard_Real v2); + Standard_EXPORT static Standard_Integer NbSamplesU(const Handle(Adaptor3d_Surface)& S, + const Standard_Real u1, + const Standard_Real u2); + Standard_EXPORT static Standard_Integer NbSamplesV(const Handle(Adaptor3d_Surface)&, + const Standard_Real v1, + const Standard_Real v2); }; #endif // _Adaptor3d_HSurfaceTool_HeaderFile diff --git a/opencascade/Adaptor3d_HVertex.hxx b/opencascade/Adaptor3d_HVertex.hxx index a887fca9a..ccb6ffcfd 100644 --- a/opencascade/Adaptor3d_HVertex.hxx +++ b/opencascade/Adaptor3d_HVertex.hxx @@ -21,56 +21,37 @@ #include #include - class Adaptor3d_HVertex; DEFINE_STANDARD_HANDLE(Adaptor3d_HVertex, Standard_Transient) - class Adaptor3d_HVertex : public Standard_Transient { public: - - Standard_EXPORT Adaptor3d_HVertex(); - - Standard_EXPORT Adaptor3d_HVertex(const gp_Pnt2d& P, const TopAbs_Orientation Ori, const Standard_Real Resolution); - - Standard_EXPORT virtual gp_Pnt2d Value(); - - Standard_EXPORT virtual Standard_Real Parameter (const Handle(Adaptor2d_Curve2d)& C); - - //! Parametric resolution (2d). - Standard_EXPORT virtual Standard_Real Resolution (const Handle(Adaptor2d_Curve2d)& C); - - Standard_EXPORT virtual TopAbs_Orientation Orientation(); - - Standard_EXPORT virtual Standard_Boolean IsSame (const Handle(Adaptor3d_HVertex)& Other); - + Standard_EXPORT Adaptor3d_HVertex(const gp_Pnt2d& P, + const TopAbs_Orientation Ori, + const Standard_Real Resolution); + Standard_EXPORT virtual gp_Pnt2d Value(); - DEFINE_STANDARD_RTTIEXT(Adaptor3d_HVertex,Standard_Transient) + Standard_EXPORT virtual Standard_Real Parameter(const Handle(Adaptor2d_Curve2d)& C); -protected: + //! Parametric resolution (2d). + Standard_EXPORT virtual Standard_Real Resolution(const Handle(Adaptor2d_Curve2d)& C); + Standard_EXPORT virtual TopAbs_Orientation Orientation(); + Standard_EXPORT virtual Standard_Boolean IsSame(const Handle(Adaptor3d_HVertex)& Other); + DEFINE_STANDARD_RTTIEXT(Adaptor3d_HVertex, Standard_Transient) +protected: private: - - - gp_Pnt2d myPnt; - Standard_Real myTol; + gp_Pnt2d myPnt; + Standard_Real myTol; TopAbs_Orientation myOri; - - }; - - - - - - #endif // _Adaptor3d_HVertex_HeaderFile diff --git a/opencascade/Adaptor3d_InterFunc.hxx b/opencascade/Adaptor3d_InterFunc.hxx index 857326f4a..a8ed38a9a 100644 --- a/opencascade/Adaptor3d_InterFunc.hxx +++ b/opencascade/Adaptor3d_InterFunc.hxx @@ -26,40 +26,40 @@ class Adaptor2d_Curve2d; //! Adpator_CurveOnSurface relatively to the //! discontinuities of the surface. Used to //! find the roots of the functions -class Adaptor3d_InterFunc : public math_FunctionWithDerivative +class Adaptor3d_InterFunc : public math_FunctionWithDerivative { public: - DEFINE_STANDARD_ALLOC - //! build the function U(t)=FixVal if Fix =1 or //! V(t)=FixVal if Fix=2 - Standard_EXPORT Adaptor3d_InterFunc(const Handle(Adaptor2d_Curve2d)& C, const Standard_Real FixVal, const Standard_Integer Fix); - + Standard_EXPORT Adaptor3d_InterFunc(const Handle(Adaptor2d_Curve2d)& C, + const Standard_Real FixVal, + const Standard_Integer Fix); + //! computes the value of the function for the variable . //! Returns True if the calculation were successfully done, //! False otherwise. - Standard_EXPORT Standard_Boolean Value (const Standard_Real X, Standard_Real& F); - + Standard_EXPORT Standard_Boolean Value(const Standard_Real X, Standard_Real& F); + //! computes the derivative of the function //! for the variable . //! Returns True if the calculation were successfully done, //! False otherwise. - Standard_EXPORT Standard_Boolean Derivative (const Standard_Real X, Standard_Real& D); - + Standard_EXPORT Standard_Boolean Derivative(const Standard_Real X, Standard_Real& D); + //! computes the value and the derivative of the //! function for the variable . //! Returns True if the calculation were successfully done, //! False otherwise. - Standard_EXPORT Standard_Boolean Values (const Standard_Real X, Standard_Real& F, Standard_Real& D); + Standard_EXPORT Standard_Boolean Values(const Standard_Real X, + Standard_Real& F, + Standard_Real& D); private: - Handle(Adaptor2d_Curve2d) myCurve2d; - Standard_Real myFixVal; - Standard_Integer myFix; - + Standard_Real myFixVal; + Standard_Integer myFix; }; #endif // _Adaptor3d_InterFunc_HeaderFile diff --git a/opencascade/Adaptor3d_IsoCurve.hxx b/opencascade/Adaptor3d_IsoCurve.hxx index 38b6a07ae..d90c4ec57 100644 --- a/opencascade/Adaptor3d_IsoCurve.hxx +++ b/opencascade/Adaptor3d_IsoCurve.hxx @@ -26,40 +26,48 @@ DEFINE_STANDARD_HANDLE(Adaptor3d_IsoCurve, Adaptor3d_Curve) //! type of isoparametric curve (U or V) is defined //! with the enumeration IsoType from GeomAbs if //! NoneIso is given an error is raised. -class Adaptor3d_IsoCurve : public Adaptor3d_Curve +class Adaptor3d_IsoCurve : public Adaptor3d_Curve { DEFINE_STANDARD_RTTIEXT(Adaptor3d_IsoCurve, Adaptor3d_Curve) public: - //! The iso is set to NoneIso. Standard_EXPORT Adaptor3d_IsoCurve(); - + //! The surface is loaded. The iso is set to NoneIso. Standard_EXPORT Adaptor3d_IsoCurve(const Handle(Adaptor3d_Surface)& S); - + //! Creates an IsoCurve curve. Iso defines the //! type (isoU or isoU) Param defines the value of //! the iso. The bounds of the iso are the bounds //! of the surface. - Standard_EXPORT Adaptor3d_IsoCurve(const Handle(Adaptor3d_Surface)& S, const GeomAbs_IsoType Iso, const Standard_Real Param); - + Standard_EXPORT Adaptor3d_IsoCurve(const Handle(Adaptor3d_Surface)& S, + const GeomAbs_IsoType Iso, + const Standard_Real Param); + //! Create an IsoCurve curve. Iso defines the type //! (isoU or isov). Param defines the value of the //! iso. WFirst,WLast define the bounds of the iso. - Standard_EXPORT Adaptor3d_IsoCurve(const Handle(Adaptor3d_Surface)& S, const GeomAbs_IsoType Iso, const Standard_Real Param, const Standard_Real WFirst, const Standard_Real WLast); - + Standard_EXPORT Adaptor3d_IsoCurve(const Handle(Adaptor3d_Surface)& S, + const GeomAbs_IsoType Iso, + const Standard_Real Param, + const Standard_Real WFirst, + const Standard_Real WLast); + //! Shallow copy of adaptor Standard_EXPORT virtual Handle(Adaptor3d_Curve) ShallowCopy() const Standard_OVERRIDE; //! Changes the surface. The iso is reset to //! NoneIso. - Standard_EXPORT void Load (const Handle(Adaptor3d_Surface)& S); - + Standard_EXPORT void Load(const Handle(Adaptor3d_Surface)& S); + //! Changes the iso on the current surface. - Standard_EXPORT void Load (const GeomAbs_IsoType Iso, const Standard_Real Param); - + Standard_EXPORT void Load(const GeomAbs_IsoType Iso, const Standard_Real Param); + //! Changes the iso on the current surface. - Standard_EXPORT void Load (const GeomAbs_IsoType Iso, const Standard_Real Param, const Standard_Real WFirst, const Standard_Real WLast); + Standard_EXPORT void Load(const GeomAbs_IsoType Iso, + const Standard_Real Param, + const Standard_Real WFirst, + const Standard_Real WLast); const Handle(Adaptor3d_Surface)& Surface() const { return mySurface; } @@ -72,103 +80,109 @@ public: virtual Standard_Real LastParameter() const Standard_OVERRIDE { return myLast; } Standard_EXPORT GeomAbs_Shape Continuity() const Standard_OVERRIDE; - + //! Returns the number of intervals for continuity //! . May be one if Continuity(me) >= - Standard_EXPORT Standard_Integer NbIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE; - + Standard_EXPORT Standard_Integer NbIntervals(const GeomAbs_Shape S) const Standard_OVERRIDE; + //! Stores in the parameters bounding the intervals //! of continuity . //! //! The array must provide enough room to accommodate //! for the parameters. i.e. T.Length() > NbIntervals() - Standard_EXPORT void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const Standard_OVERRIDE; - + Standard_EXPORT void Intervals(TColStd_Array1OfReal& T, + const GeomAbs_Shape S) const Standard_OVERRIDE; + //! Returns a curve equivalent of between //! parameters and . is used to //! test for 3d points confusion. //! If >= - Standard_EXPORT Handle(Adaptor3d_Curve) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE; - + Standard_EXPORT Handle(Adaptor3d_Curve) Trim(const Standard_Real First, + const Standard_Real Last, + const Standard_Real Tol) const Standard_OVERRIDE; + Standard_EXPORT Standard_Boolean IsClosed() const Standard_OVERRIDE; - + Standard_EXPORT Standard_Boolean IsPeriodic() const Standard_OVERRIDE; - + Standard_EXPORT Standard_Real Period() const Standard_OVERRIDE; - + //! Computes the point of parameter U on the curve. - Standard_EXPORT gp_Pnt Value (const Standard_Real U) const Standard_OVERRIDE; - + Standard_EXPORT gp_Pnt Value(const Standard_Real U) const Standard_OVERRIDE; + //! Computes the point of parameter U on the curve. - Standard_EXPORT void D0 (const Standard_Real U, gp_Pnt& P) const Standard_OVERRIDE; - + Standard_EXPORT void D0(const Standard_Real U, gp_Pnt& P) const Standard_OVERRIDE; + //! Computes the point of parameter U on the curve with its //! first derivative. //! Raised if the continuity of the current interval //! is not C1. - Standard_EXPORT void D1 (const Standard_Real U, gp_Pnt& P, gp_Vec& V) const Standard_OVERRIDE; - + Standard_EXPORT void D1(const Standard_Real U, gp_Pnt& P, gp_Vec& V) const Standard_OVERRIDE; //! Returns the point P of parameter U, the first and second //! derivatives V1 and V2. //! Raised if the continuity of the current interval //! is not C2. - Standard_EXPORT void D2 (const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2) const Standard_OVERRIDE; - + Standard_EXPORT void D2(const Standard_Real U, + gp_Pnt& P, + gp_Vec& V1, + gp_Vec& V2) const Standard_OVERRIDE; //! Returns the point P of parameter U, the first, the second //! and the third derivative. //! Raised if the continuity of the current interval //! is not C3. - Standard_EXPORT void D3 (const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, gp_Vec& V3) const Standard_OVERRIDE; - + Standard_EXPORT void D3(const Standard_Real U, + gp_Pnt& P, + gp_Vec& V1, + gp_Vec& V2, + gp_Vec& V3) const Standard_OVERRIDE; //! The returned vector gives the value of the derivative for the //! order of derivation N. //! Raised if the continuity of the current interval //! is not CN. //! Raised if N < 1. - Standard_EXPORT gp_Vec DN (const Standard_Real U, const Standard_Integer N) const Standard_OVERRIDE; - + Standard_EXPORT gp_Vec DN(const Standard_Real U, + const Standard_Integer N) const Standard_OVERRIDE; + //! Returns the parametric resolution corresponding //! to the real space resolution . - Standard_EXPORT Standard_Real Resolution (const Standard_Real R3d) const Standard_OVERRIDE; - + Standard_EXPORT Standard_Real Resolution(const Standard_Real R3d) const Standard_OVERRIDE; + //! Returns the type of the curve in the current //! interval : Line, Circle, Ellipse, Hyperbola, //! Parabola, BezierCurve, BSplineCurve, OtherCurve. Standard_EXPORT GeomAbs_CurveType GetType() const Standard_OVERRIDE; - + Standard_EXPORT gp_Lin Line() const Standard_OVERRIDE; - + Standard_EXPORT gp_Circ Circle() const Standard_OVERRIDE; - + Standard_EXPORT gp_Elips Ellipse() const Standard_OVERRIDE; - + Standard_EXPORT gp_Hypr Hyperbola() const Standard_OVERRIDE; - + Standard_EXPORT gp_Parab Parabola() const Standard_OVERRIDE; - + Standard_EXPORT Standard_Integer Degree() const Standard_OVERRIDE; - + Standard_EXPORT Standard_Boolean IsRational() const Standard_OVERRIDE; - + Standard_EXPORT Standard_Integer NbPoles() const Standard_OVERRIDE; - + Standard_EXPORT Standard_Integer NbKnots() const Standard_OVERRIDE; - + Standard_EXPORT Handle(Geom_BezierCurve) Bezier() const Standard_OVERRIDE; - + Standard_EXPORT Handle(Geom_BSplineCurve) BSpline() const Standard_OVERRIDE; private: - Handle(Adaptor3d_Surface) mySurface; - GeomAbs_IsoType myIso; - Standard_Real myFirst; - Standard_Real myLast; - Standard_Real myParameter; - + GeomAbs_IsoType myIso; + Standard_Real myFirst; + Standard_Real myLast; + Standard_Real myParameter; }; #endif // _Adaptor3d_IsoCurve_HeaderFile diff --git a/opencascade/Adaptor3d_Surface.hxx b/opencascade/Adaptor3d_Surface.hxx index 1c4d1618a..67e62521d 100644 --- a/opencascade/Adaptor3d_Surface.hxx +++ b/opencascade/Adaptor3d_Surface.hxx @@ -52,156 +52,184 @@ DEFINE_STANDARD_HANDLE(Adaptor3d_Surface, Standard_Transient) //! Warning: All the methods are virtual and implemented with a //! raise to allow to redefined only the methods really used. //! -//! Polynomial coefficients of BSpline surfaces used for their evaluation are cached for better performance. -//! Therefore these evaluations are not thread-safe and parallel evaluations need to be prevented. +//! Polynomial coefficients of BSpline surfaces used for their evaluation are cached for better +//! performance. Therefore these evaluations are not thread-safe and parallel evaluations need to be +//! prevented. class Adaptor3d_Surface : public Standard_Transient { DEFINE_STANDARD_RTTIEXT(Adaptor3d_Surface, Standard_Transient) public: - //! Shallow copy of adaptor Standard_EXPORT virtual Handle(Adaptor3d_Surface) ShallowCopy() const; Standard_EXPORT virtual Standard_Real FirstUParameter() const; - + Standard_EXPORT virtual Standard_Real LastUParameter() const; - + Standard_EXPORT virtual Standard_Real FirstVParameter() const; - + Standard_EXPORT virtual Standard_Real LastVParameter() const; - + Standard_EXPORT virtual GeomAbs_Shape UContinuity() const; - + Standard_EXPORT virtual GeomAbs_Shape VContinuity() const; - + //! Returns the number of U intervals for continuity //! . May be one if UContinuity(me) >= - Standard_EXPORT virtual Standard_Integer NbUIntervals (const GeomAbs_Shape S) const; - + Standard_EXPORT virtual Standard_Integer NbUIntervals(const GeomAbs_Shape S) const; + //! Returns the number of V intervals for continuity //! . May be one if VContinuity(me) >= - Standard_EXPORT virtual Standard_Integer NbVIntervals (const GeomAbs_Shape S) const; - + Standard_EXPORT virtual Standard_Integer NbVIntervals(const GeomAbs_Shape S) const; + //! Returns the intervals with the requested continuity //! in the U direction. - Standard_EXPORT virtual void UIntervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const; - + Standard_EXPORT virtual void UIntervals(TColStd_Array1OfReal& T, const GeomAbs_Shape S) const; + //! Returns the intervals with the requested continuity //! in the V direction. - Standard_EXPORT virtual void VIntervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const; - + Standard_EXPORT virtual void VIntervals(TColStd_Array1OfReal& T, const GeomAbs_Shape S) const; + //! Returns a surface trimmed in the U direction //! equivalent of between //! parameters and . is used to //! test for 3d points confusion. //! If >= - Standard_EXPORT virtual Handle(Adaptor3d_Surface) UTrim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const; - + Standard_EXPORT virtual Handle(Adaptor3d_Surface) UTrim(const Standard_Real First, + const Standard_Real Last, + const Standard_Real Tol) const; + //! Returns a surface trimmed in the V direction between //! parameters and . is used to //! test for 3d points confusion. //! If >= - Standard_EXPORT virtual Handle(Adaptor3d_Surface) VTrim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const; - + Standard_EXPORT virtual Handle(Adaptor3d_Surface) VTrim(const Standard_Real First, + const Standard_Real Last, + const Standard_Real Tol) const; + Standard_EXPORT virtual Standard_Boolean IsUClosed() const; - + Standard_EXPORT virtual Standard_Boolean IsVClosed() const; - + Standard_EXPORT virtual Standard_Boolean IsUPeriodic() const; - + Standard_EXPORT virtual Standard_Real UPeriod() const; - + Standard_EXPORT virtual Standard_Boolean IsVPeriodic() const; - + Standard_EXPORT virtual Standard_Real VPeriod() const; //! Computes the point of parameters U,V on the surface. //! Tip: use GeomLib::NormEstim() to calculate surface normal at specified (U, V) point. - Standard_EXPORT virtual gp_Pnt Value (const Standard_Real U, const Standard_Real V) const; + Standard_EXPORT virtual gp_Pnt Value(const Standard_Real U, const Standard_Real V) const; //! Computes the point of parameters U,V on the surface. - Standard_EXPORT virtual void D0 (const Standard_Real U, const Standard_Real V, gp_Pnt& P) const; - + Standard_EXPORT virtual void D0(const Standard_Real U, const Standard_Real V, gp_Pnt& P) const; + //! Computes the point and the first derivatives on the surface. //! Raised if the continuity of the current intervals is not C1. //! //! Tip: use GeomLib::NormEstim() to calculate surface normal at specified (U, V) point. - Standard_EXPORT virtual void D1 (const Standard_Real U, const Standard_Real V, gp_Pnt& P, gp_Vec& D1U, gp_Vec& D1V) const; + Standard_EXPORT virtual void D1(const Standard_Real U, + const Standard_Real V, + gp_Pnt& P, + gp_Vec& D1U, + gp_Vec& D1V) const; //! Computes the point, the first and second //! derivatives on the surface. //! Raised if the continuity of the current //! intervals is not C2. - Standard_EXPORT virtual void D2 (const Standard_Real U, const Standard_Real V, gp_Pnt& P, gp_Vec& D1U, gp_Vec& D1V, gp_Vec& D2U, gp_Vec& D2V, gp_Vec& D2UV) const; - + Standard_EXPORT virtual void D2(const Standard_Real U, + const Standard_Real V, + gp_Pnt& P, + gp_Vec& D1U, + gp_Vec& D1V, + gp_Vec& D2U, + gp_Vec& D2V, + gp_Vec& D2UV) const; + //! Computes the point, the first, second and third //! derivatives on the surface. //! Raised if the continuity of the current //! intervals is not C3. - Standard_EXPORT virtual void D3 (const Standard_Real U, const Standard_Real V, gp_Pnt& P, gp_Vec& D1U, gp_Vec& D1V, gp_Vec& D2U, gp_Vec& D2V, gp_Vec& D2UV, gp_Vec& D3U, gp_Vec& D3V, gp_Vec& D3UUV, gp_Vec& D3UVV) const; - + Standard_EXPORT virtual void D3(const Standard_Real U, + const Standard_Real V, + gp_Pnt& P, + gp_Vec& D1U, + gp_Vec& D1V, + gp_Vec& D2U, + gp_Vec& D2V, + gp_Vec& D2UV, + gp_Vec& D3U, + gp_Vec& D3V, + gp_Vec& D3UUV, + gp_Vec& D3UVV) const; + //! Computes the derivative of order Nu in the direction U and Nv //! in the direction V at the point P(U, V). //! Raised if the current U interval is not not CNu //! and the current V interval is not CNv. //! Raised if Nu + Nv < 1 or Nu < 0 or Nv < 0. - Standard_EXPORT virtual gp_Vec DN (const Standard_Real U, const Standard_Real V, const Standard_Integer Nu, const Standard_Integer Nv) const; - + Standard_EXPORT virtual gp_Vec DN(const Standard_Real U, + const Standard_Real V, + const Standard_Integer Nu, + const Standard_Integer Nv) const; + //! Returns the parametric U resolution corresponding //! to the real space resolution . - Standard_EXPORT virtual Standard_Real UResolution (const Standard_Real R3d) const; - + Standard_EXPORT virtual Standard_Real UResolution(const Standard_Real R3d) const; + //! Returns the parametric V resolution corresponding //! to the real space resolution . - Standard_EXPORT virtual Standard_Real VResolution (const Standard_Real R3d) const; - + Standard_EXPORT virtual Standard_Real VResolution(const Standard_Real R3d) const; + //! Returns the type of the surface : Plane, Cylinder, //! Cone, Sphere, Torus, BezierSurface, //! BSplineSurface, SurfaceOfRevolution, //! SurfaceOfExtrusion, OtherSurface Standard_EXPORT virtual GeomAbs_SurfaceType GetType() const; - + Standard_EXPORT virtual gp_Pln Plane() const; - + Standard_EXPORT virtual gp_Cylinder Cylinder() const; - + Standard_EXPORT virtual gp_Cone Cone() const; - + Standard_EXPORT virtual gp_Sphere Sphere() const; - + Standard_EXPORT virtual gp_Torus Torus() const; - + Standard_EXPORT virtual Standard_Integer UDegree() const; - + Standard_EXPORT virtual Standard_Integer NbUPoles() const; - + Standard_EXPORT virtual Standard_Integer VDegree() const; - + Standard_EXPORT virtual Standard_Integer NbVPoles() const; - + Standard_EXPORT virtual Standard_Integer NbUKnots() const; - + Standard_EXPORT virtual Standard_Integer NbVKnots() const; - + Standard_EXPORT virtual Standard_Boolean IsURational() const; - + Standard_EXPORT virtual Standard_Boolean IsVRational() const; - + Standard_EXPORT virtual Handle(Geom_BezierSurface) Bezier() const; - + Standard_EXPORT virtual Handle(Geom_BSplineSurface) BSpline() const; - + Standard_EXPORT virtual gp_Ax1 AxeOfRevolution() const; - + Standard_EXPORT virtual gp_Dir Direction() const; - + Standard_EXPORT virtual Handle(Adaptor3d_Curve) BasisCurve() const; - + Standard_EXPORT virtual Handle(Adaptor3d_Surface) BasisSurface() const; - + Standard_EXPORT virtual Standard_Real OffsetValue() const; Standard_EXPORT virtual ~Adaptor3d_Surface(); - }; #endif // _Adaptor3d_Surface_HeaderFile diff --git a/opencascade/Adaptor3d_TopolTool.hxx b/opencascade/Adaptor3d_TopolTool.hxx index 439b16e12..6944cc499 100644 --- a/opencascade/Adaptor3d_TopolTool.hxx +++ b/opencascade/Adaptor3d_TopolTool.hxx @@ -37,111 +37,119 @@ class Adaptor3d_TopolTool : public Standard_Transient { public: - Standard_EXPORT Adaptor3d_TopolTool(); - + Standard_EXPORT Adaptor3d_TopolTool(const Handle(Adaptor3d_Surface)& Surface); - + Standard_EXPORT virtual void Initialize(); - - Standard_EXPORT virtual void Initialize (const Handle(Adaptor3d_Surface)& S); - - Standard_EXPORT virtual void Initialize (const Handle(Adaptor2d_Curve2d)& Curve); - + + Standard_EXPORT virtual void Initialize(const Handle(Adaptor3d_Surface)& S); + + Standard_EXPORT virtual void Initialize(const Handle(Adaptor2d_Curve2d)& Curve); + Standard_EXPORT virtual void Init(); - + Standard_EXPORT virtual Standard_Boolean More(); - + Standard_EXPORT virtual Handle(Adaptor2d_Curve2d) Value(); - + Standard_EXPORT virtual void Next(); - + Standard_EXPORT virtual void InitVertexIterator(); - + Standard_EXPORT virtual Standard_Boolean MoreVertex(); - + Standard_EXPORT virtual Handle(Adaptor3d_HVertex) Vertex(); - + Standard_EXPORT virtual void NextVertex(); - - Standard_EXPORT virtual TopAbs_State Classify (const gp_Pnt2d& P, const Standard_Real Tol, const Standard_Boolean ReacdreOnPeriodic = Standard_True); - - Standard_EXPORT virtual Standard_Boolean IsThePointOn (const gp_Pnt2d& P, const Standard_Real Tol, const Standard_Boolean ReacdreOnPeriodic = Standard_True); - + + Standard_EXPORT virtual TopAbs_State Classify( + const gp_Pnt2d& P, + const Standard_Real Tol, + const Standard_Boolean ReacdreOnPeriodic = Standard_True); + + Standard_EXPORT virtual Standard_Boolean IsThePointOn( + const gp_Pnt2d& P, + const Standard_Real Tol, + const Standard_Boolean ReacdreOnPeriodic = Standard_True); + //! If the function returns the orientation of the arc. //! If the orientation is FORWARD or REVERSED, the arc is //! a "real" limit of the surface. //! If the orientation is INTERNAL or EXTERNAL, the arc is //! considered as an arc on the surface. - Standard_EXPORT virtual TopAbs_Orientation Orientation (const Handle(Adaptor2d_Curve2d)& C); - + Standard_EXPORT virtual TopAbs_Orientation Orientation(const Handle(Adaptor2d_Curve2d)& C); + //! Returns the orientation of the vertex V. //! The vertex has been found with an exploration on //! a given arc. The orientation is the orientation //! of the vertex on this arc. - Standard_EXPORT virtual TopAbs_Orientation Orientation (const Handle(Adaptor3d_HVertex)& V); - + Standard_EXPORT virtual TopAbs_Orientation Orientation(const Handle(Adaptor3d_HVertex)& V); + //! Returns True if the vertices V1 and V2 are identical. //! This method does not take the orientation of the //! vertices in account. - Standard_EXPORT virtual Standard_Boolean Identical (const Handle(Adaptor3d_HVertex)& V1, const Handle(Adaptor3d_HVertex)& V2); - + Standard_EXPORT virtual Standard_Boolean Identical(const Handle(Adaptor3d_HVertex)& V1, + const Handle(Adaptor3d_HVertex)& V2); + //! answers if arcs and vertices may have 3d representations, //! so that we could use Tol3d and Pnt methods. Standard_EXPORT virtual Standard_Boolean Has3d() const; - + //! returns 3d tolerance of the arc C - Standard_EXPORT virtual Standard_Real Tol3d (const Handle(Adaptor2d_Curve2d)& C) const; - + Standard_EXPORT virtual Standard_Real Tol3d(const Handle(Adaptor2d_Curve2d)& C) const; + //! returns 3d tolerance of the vertex V - Standard_EXPORT virtual Standard_Real Tol3d (const Handle(Adaptor3d_HVertex)& V) const; - + Standard_EXPORT virtual Standard_Real Tol3d(const Handle(Adaptor3d_HVertex)& V) const; + //! returns 3d point of the vertex V - Standard_EXPORT virtual gp_Pnt Pnt (const Handle(Adaptor3d_HVertex)& V) const; - + Standard_EXPORT virtual gp_Pnt Pnt(const Handle(Adaptor3d_HVertex)& V) const; + Standard_EXPORT virtual void ComputeSamplePoints(); - + //! compute the sample-points for the intersections algorithms Standard_EXPORT virtual Standard_Integer NbSamplesU(); - + //! compute the sample-points for the intersections algorithms Standard_EXPORT virtual Standard_Integer NbSamplesV(); - + //! compute the sample-points for the intersections algorithms Standard_EXPORT virtual Standard_Integer NbSamples(); - + //! return the set of U parameters on the surface //! obtained by the method SamplePnts - Standard_EXPORT void UParameters (TColStd_Array1OfReal& theArray) const; - + Standard_EXPORT void UParameters(TColStd_Array1OfReal& theArray) const; + //! return the set of V parameters on the surface //! obtained by the method SamplePnts - Standard_EXPORT void VParameters (TColStd_Array1OfReal& theArray) const; - - Standard_EXPORT virtual void SamplePoint (const Standard_Integer Index, gp_Pnt2d& P2d, gp_Pnt& P3d); - + Standard_EXPORT void VParameters(TColStd_Array1OfReal& theArray) const; + + Standard_EXPORT virtual void SamplePoint(const Standard_Integer Index, + gp_Pnt2d& P2d, + gp_Pnt& P3d); + Standard_EXPORT virtual Standard_Boolean DomainIsInfinite(); - + Standard_EXPORT virtual Standard_Address Edge() const; - //! Compute the sample-points for the intersections algorithms by adaptive algorithm for BSpline surfaces. - //! For other surfaces algorithm is the same as in method ComputeSamplePoints(), - //! but only fill arrays of U and V sample parameters; - //! @param theDefl [in] a required deflection - //! @param theNUmin [in] minimal nb points for U - //! @param theNVmin [in] minimal nb points for V - Standard_EXPORT virtual void SamplePnts (const Standard_Real theDefl, - const Standard_Integer theNUmin, - const Standard_Integer theNVmin); + //! Compute the sample-points for the intersections algorithms by adaptive algorithm for BSpline + //! surfaces. For other surfaces algorithm is the same as in method ComputeSamplePoints(), but + //! only fill arrays of U and V sample parameters; + //! @param[in] theDefl a required deflection + //! @param[in] theNUmin minimal nb points for U + //! @param[in] theNVmin minimal nb points for V + Standard_EXPORT virtual void SamplePnts(const Standard_Real theDefl, + const Standard_Integer theNUmin, + const Standard_Integer theNVmin); //! Compute the sample-points for the intersections algorithms //! by adaptive algorithm for BSpline surfaces - is used in SamplePnts - //! @param theDefl [in] required deflection - //! @param theNUmin [in] minimal nb points for U - //! @param theNVmin [in] minimal nb points for V - Standard_EXPORT virtual void BSplSamplePnts (const Standard_Real theDefl, - const Standard_Integer theNUmin, - const Standard_Integer theNVmin); + //! @param[in] theDefl required deflection + //! @param[in] theNUmin minimal nb points for U + //! @param[in] theNVmin minimal nb points for V + Standard_EXPORT virtual void BSplSamplePnts(const Standard_Real theDefl, + const Standard_Integer theNUmin, + const Standard_Integer theNVmin); //! Returns true if provide uniform sampling of points. Standard_EXPORT virtual Standard_Boolean IsUniformSampling() const; @@ -150,31 +158,30 @@ public: //! @param[in] theC conical surface //! @param[in] theU U parameter of cone's apex //! @param[in] theV V parameter of cone's apex - Standard_EXPORT static void GetConeApexParam (const gp_Cone& theC, Standard_Real& theU, Standard_Real& theV); + Standard_EXPORT static void GetConeApexParam(const gp_Cone& theC, + Standard_Real& theU, + Standard_Real& theV); - DEFINE_STANDARD_RTTIEXT(Adaptor3d_TopolTool,Standard_Transient) + DEFINE_STANDARD_RTTIEXT(Adaptor3d_TopolTool, Standard_Transient) protected: - - Handle(Adaptor3d_Surface) myS; - Standard_Integer myNbSamplesU; - Standard_Integer myNbSamplesV; + Handle(Adaptor3d_Surface) myS; + Standard_Integer myNbSamplesU; + Standard_Integer myNbSamplesV; Handle(TColStd_HArray1OfReal) myUPars; Handle(TColStd_HArray1OfReal) myVPars; private: - - Standard_Integer nbRestr; - Standard_Integer idRestr; - Standard_Real Uinf; - Standard_Real Usup; - Standard_Real Vinf; - Standard_Real Vsup; - Handle(Adaptor2d_Line2d) myRestr[4]; - Standard_Integer nbVtx; - Standard_Integer idVtx; + Standard_Integer nbRestr; + Standard_Integer idRestr; + Standard_Real Uinf; + Standard_Real Usup; + Standard_Real Vinf; + Standard_Real Vsup; + Handle(Adaptor2d_Line2d) myRestr[4]; + Standard_Integer nbVtx; + Standard_Integer idVtx; Handle(Adaptor3d_HVertex) myVtx[2]; - }; #endif // _Adaptor3d_TopolTool_HeaderFile diff --git a/opencascade/AdvApp2Var_ApproxAFunc2Var.hxx b/opencascade/AdvApp2Var_ApproxAFunc2Var.hxx index 73e72e7da..576e020ec 100644 --- a/opencascade/AdvApp2Var_ApproxAFunc2Var.hxx +++ b/opencascade/AdvApp2Var_ApproxAFunc2Var.hxx @@ -35,20 +35,19 @@ class AdvApprox_Cutting; class AdvApp2Var_Criterion; class Geom_BSplineSurface; - //! Perform the approximation of F(U,V) //! Arguments are : //! Num1DSS, Num2DSS, Num3DSS :The numbers of 1,2,3 dimensional subspaces //! OneDTol, TwoDTol, ThreeDTol: The tolerance of approximation in each //! subspaces //! OneDTolFr, TwoDTolFr, ThreeDTolFr: The tolerance of approximation on -//! the boundarys in each subspaces +//! the boundaries in each subspaces //! [FirstInU, LastInU]: The Bounds in U of the Approximation //! [FirstInV, LastInV]: The Bounds in V of the Approximation //! FavorIso : Give preference to extract u-iso or v-iso on F(U,V) //! This can be useful to optimize the method //! ContInU, ContInV : Continuity waiting in u and v -//! PrecisCode : Precision on approximation's error mesurement +//! PrecisCode : Precision on approximation's error measurement //! 1 : Fast computation and average precision //! 2 : Average computation and good precision //! 3 : Slow computation and very good precision @@ -82,165 +81,211 @@ class Geom_BSplineSurface; //! with the tolerances given in the create function and the //! results will be given in that order as well that is : //! Surface(n) will correspond to the nth entry described by Num3DSS -class AdvApp2Var_ApproxAFunc2Var +class AdvApp2Var_ApproxAFunc2Var { public: - DEFINE_STANDARD_ALLOC - - Standard_EXPORT AdvApp2Var_ApproxAFunc2Var(const Standard_Integer Num1DSS, const Standard_Integer Num2DSS, const Standard_Integer Num3DSS, const Handle(TColStd_HArray1OfReal)& OneDTol, const Handle(TColStd_HArray1OfReal)& TwoDTol, const Handle(TColStd_HArray1OfReal)& ThreeDTol, const Handle(TColStd_HArray2OfReal)& OneDTolFr, const Handle(TColStd_HArray2OfReal)& TwoDTolFr, const Handle(TColStd_HArray2OfReal)& ThreeDTolFr, const Standard_Real FirstInU, const Standard_Real LastInU, const Standard_Real FirstInV, const Standard_Real LastInV, const GeomAbs_IsoType FavorIso, const GeomAbs_Shape ContInU, const GeomAbs_Shape ContInV, const Standard_Integer PrecisCode, const Standard_Integer MaxDegInU, const Standard_Integer MaxDegInV, const Standard_Integer MaxPatch, const AdvApp2Var_EvaluatorFunc2Var& Func, AdvApprox_Cutting& UChoice, AdvApprox_Cutting& VChoice); - - Standard_EXPORT AdvApp2Var_ApproxAFunc2Var(const Standard_Integer Num1DSS, const Standard_Integer Num2DSS, const Standard_Integer Num3DSS, const Handle(TColStd_HArray1OfReal)& OneDTol, const Handle(TColStd_HArray1OfReal)& TwoDTol, const Handle(TColStd_HArray1OfReal)& ThreeDTol, const Handle(TColStd_HArray2OfReal)& OneDTolFr, const Handle(TColStd_HArray2OfReal)& TwoDTolFr, const Handle(TColStd_HArray2OfReal)& ThreeDTolFr, const Standard_Real FirstInU, const Standard_Real LastInU, const Standard_Real FirstInV, const Standard_Real LastInV, const GeomAbs_IsoType FavorIso, const GeomAbs_Shape ContInU, const GeomAbs_Shape ContInV, const Standard_Integer PrecisCode, const Standard_Integer MaxDegInU, const Standard_Integer MaxDegInV, const Standard_Integer MaxPatch, const AdvApp2Var_EvaluatorFunc2Var& Func, const AdvApp2Var_Criterion& Crit, AdvApprox_Cutting& UChoice, AdvApprox_Cutting& VChoice); - + Standard_EXPORT AdvApp2Var_ApproxAFunc2Var(const Standard_Integer Num1DSS, + const Standard_Integer Num2DSS, + const Standard_Integer Num3DSS, + const Handle(TColStd_HArray1OfReal)& OneDTol, + const Handle(TColStd_HArray1OfReal)& TwoDTol, + const Handle(TColStd_HArray1OfReal)& ThreeDTol, + const Handle(TColStd_HArray2OfReal)& OneDTolFr, + const Handle(TColStd_HArray2OfReal)& TwoDTolFr, + const Handle(TColStd_HArray2OfReal)& ThreeDTolFr, + const Standard_Real FirstInU, + const Standard_Real LastInU, + const Standard_Real FirstInV, + const Standard_Real LastInV, + const GeomAbs_IsoType FavorIso, + const GeomAbs_Shape ContInU, + const GeomAbs_Shape ContInV, + const Standard_Integer PrecisCode, + const Standard_Integer MaxDegInU, + const Standard_Integer MaxDegInV, + const Standard_Integer MaxPatch, + const AdvApp2Var_EvaluatorFunc2Var& Func, + AdvApprox_Cutting& UChoice, + AdvApprox_Cutting& VChoice); + + Standard_EXPORT AdvApp2Var_ApproxAFunc2Var(const Standard_Integer Num1DSS, + const Standard_Integer Num2DSS, + const Standard_Integer Num3DSS, + const Handle(TColStd_HArray1OfReal)& OneDTol, + const Handle(TColStd_HArray1OfReal)& TwoDTol, + const Handle(TColStd_HArray1OfReal)& ThreeDTol, + const Handle(TColStd_HArray2OfReal)& OneDTolFr, + const Handle(TColStd_HArray2OfReal)& TwoDTolFr, + const Handle(TColStd_HArray2OfReal)& ThreeDTolFr, + const Standard_Real FirstInU, + const Standard_Real LastInU, + const Standard_Real FirstInV, + const Standard_Real LastInV, + const GeomAbs_IsoType FavorIso, + const GeomAbs_Shape ContInU, + const GeomAbs_Shape ContInV, + const Standard_Integer PrecisCode, + const Standard_Integer MaxDegInU, + const Standard_Integer MaxDegInV, + const Standard_Integer MaxPatch, + const AdvApp2Var_EvaluatorFunc2Var& Func, + const AdvApp2Var_Criterion& Crit, + AdvApprox_Cutting& UChoice, + AdvApprox_Cutting& VChoice); + //! True if the approximation succeeded within the imposed //! tolerances and the wished continuities - Standard_Boolean IsDone() const; - + Standard_Boolean IsDone() const; + //! True if the approximation did come out with a result that //! is not NECESSARELY within the required tolerance or a result //! that is not recognized with the wished continuities - Standard_Boolean HasResult() const; - + Standard_Boolean HasResult() const; + //! returns the BSplineSurface of range Index - Handle(Geom_BSplineSurface) Surface (const Standard_Integer Index) const; - - Standard_Integer UDegree() const; - - Standard_Integer VDegree() const; - - Standard_Integer NumSubSpaces (const Standard_Integer Dimension) const; - + Handle(Geom_BSplineSurface) Surface(const Standard_Integer Index) const; + + Standard_Integer UDegree() const; + + Standard_Integer VDegree() const; + + Standard_Integer NumSubSpaces(const Standard_Integer Dimension) const; + //! returns the errors max - Standard_EXPORT Handle(TColStd_HArray1OfReal) MaxError (const Standard_Integer Dimension) const; - + Standard_EXPORT Handle(TColStd_HArray1OfReal) MaxError(const Standard_Integer Dimension) const; + //! returns the average errors - Standard_EXPORT Handle(TColStd_HArray1OfReal) AverageError (const Standard_Integer Dimension) const; - + Standard_EXPORT Handle(TColStd_HArray1OfReal) AverageError( + const Standard_Integer Dimension) const; + //! returns the errors max on UFrontiers //! Warning: //! Dimension must be equal to 3. - Standard_EXPORT Handle(TColStd_HArray1OfReal) UFrontError (const Standard_Integer Dimension) const; - + Standard_EXPORT Handle(TColStd_HArray1OfReal) UFrontError(const Standard_Integer Dimension) const; + //! returns the errors max on VFrontiers //! Warning: //! Dimension must be equal to 3. - Standard_EXPORT Handle(TColStd_HArray1OfReal) VFrontError (const Standard_Integer Dimension) const; - + Standard_EXPORT Handle(TColStd_HArray1OfReal) VFrontError(const Standard_Integer Dimension) const; + //! returns the error max of the BSplineSurface of range Index - Standard_EXPORT Standard_Real MaxError (const Standard_Integer Dimension, const Standard_Integer Index) const; - + Standard_EXPORT Standard_Real MaxError(const Standard_Integer Dimension, + const Standard_Integer Index) const; + //! returns the average error of the BSplineSurface of range Index - Standard_EXPORT Standard_Real AverageError (const Standard_Integer Dimension, const Standard_Integer Index) const; - + Standard_EXPORT Standard_Real AverageError(const Standard_Integer Dimension, + const Standard_Integer Index) const; + //! returns the error max of the BSplineSurface of range Index on a UFrontier - Standard_EXPORT Standard_Real UFrontError (const Standard_Integer Dimension, const Standard_Integer Index) const; - - //! returns the error max of the BSplineSurface of range Index on a VFrontier - Standard_EXPORT Standard_Real VFrontError (const Standard_Integer Dimension, const Standard_Integer Index) const; - - Standard_EXPORT Standard_Real CritError (const Standard_Integer Dimension, const Standard_Integer Index) const; - - //! Prints on the stream 'o' information on the current state - //! of the object. - Standard_EXPORT void Dump (Standard_OStream& o) const; + Standard_EXPORT Standard_Real UFrontError(const Standard_Integer Dimension, + const Standard_Integer Index) const; + //! returns the error max of the BSplineSurface of range Index on a VFrontier + Standard_EXPORT Standard_Real VFrontError(const Standard_Integer Dimension, + const Standard_Integer Index) const; + Standard_EXPORT Standard_Real CritError(const Standard_Integer Dimension, + const Standard_Integer Index) const; + //! Prints on the stream 'o' information on the current state + //! of the object. + Standard_EXPORT void Dump(Standard_OStream& o) const; protected: - - - - - private: - - //! Initialisation of the approximation ; used by Create Standard_EXPORT void Init(); - + //! Initialisation of the approximation with a grid of regular cuttings ; //! used by Init and Perform - Standard_EXPORT void InitGrid (const Standard_Integer NbInt); - + Standard_EXPORT void InitGrid(const Standard_Integer NbInt); + //! Computation of the approximation result ; used by Create - Standard_EXPORT void Perform (const AdvApprox_Cutting& UChoice, const AdvApprox_Cutting& VChoice, const AdvApp2Var_EvaluatorFunc2Var& Func); - + Standard_EXPORT void Perform(const AdvApprox_Cutting& UChoice, + const AdvApprox_Cutting& VChoice, + const AdvApp2Var_EvaluatorFunc2Var& Func); + //! Computation of the approximation result ; used by Create - Standard_EXPORT void Perform (const AdvApprox_Cutting& UChoice, const AdvApprox_Cutting& VChoice, const AdvApp2Var_EvaluatorFunc2Var& Func, const AdvApp2Var_Criterion& Crit); - + Standard_EXPORT void Perform(const AdvApprox_Cutting& UChoice, + const AdvApprox_Cutting& VChoice, + const AdvApp2Var_EvaluatorFunc2Var& Func, + const AdvApp2Var_Criterion& Crit); + //! Computation of the polynomial approximations ; used by Perform - Standard_EXPORT void ComputePatches (const AdvApprox_Cutting& UChoice, const AdvApprox_Cutting& VChoice, const AdvApp2Var_EvaluatorFunc2Var& Func); - + Standard_EXPORT void ComputePatches(const AdvApprox_Cutting& UChoice, + const AdvApprox_Cutting& VChoice, + const AdvApp2Var_EvaluatorFunc2Var& Func); + //! Computation of the polynomial approximations ; used by Perform - Standard_EXPORT void ComputePatches (const AdvApprox_Cutting& UChoice, const AdvApprox_Cutting& VChoice, const AdvApp2Var_EvaluatorFunc2Var& Func, const AdvApp2Var_Criterion& Crit); - + Standard_EXPORT void ComputePatches(const AdvApprox_Cutting& UChoice, + const AdvApprox_Cutting& VChoice, + const AdvApp2Var_EvaluatorFunc2Var& Func, + const AdvApp2Var_Criterion& Crit); + //! Approximation of the constraints ; used by ComputePatches - Standard_EXPORT void ComputeConstraints (const AdvApprox_Cutting& UChoice, const AdvApprox_Cutting& VChoice, const AdvApp2Var_EvaluatorFunc2Var& Func); - + Standard_EXPORT void ComputeConstraints(const AdvApprox_Cutting& UChoice, + const AdvApprox_Cutting& VChoice, + const AdvApp2Var_EvaluatorFunc2Var& Func); + //! Approximation of the constraints ; used by ComputePatches - Standard_EXPORT void ComputeConstraints (const AdvApprox_Cutting& UChoice, const AdvApprox_Cutting& VChoice, const AdvApp2Var_EvaluatorFunc2Var& Func, const AdvApp2Var_Criterion& Crit); - + Standard_EXPORT void ComputeConstraints(const AdvApprox_Cutting& UChoice, + const AdvApprox_Cutting& VChoice, + const AdvApp2Var_EvaluatorFunc2Var& Func, + const AdvApp2Var_Criterion& Crit); + //! Computation of the 3D errors on the approximation result ; used by Perform Standard_EXPORT void Compute3DErrors(); - + //! Computation of the max value of the criterion on the approximation result ; //! used by Perform Standard_EXPORT void ComputeCritError(); - + //! Conversion of the approximation result in BSpline; used by Create Standard_EXPORT void ConvertBS(); - - Standard_Integer myNumSubSpaces[3]; - Handle(TColStd_HArray1OfReal) my1DTolerances; - Handle(TColStd_HArray1OfReal) my2DTolerances; - Handle(TColStd_HArray1OfReal) my3DTolerances; - Handle(TColStd_HArray2OfReal) my1DTolOnFront; - Handle(TColStd_HArray2OfReal) my2DTolOnFront; - Handle(TColStd_HArray2OfReal) my3DTolOnFront; - Standard_Real myFirstParInU; - Standard_Real myLastParInU; - Standard_Real myFirstParInV; - Standard_Real myLastParInV; - GeomAbs_IsoType myFavoriteIso; - GeomAbs_Shape myContInU; - GeomAbs_Shape myContInV; - Standard_Integer myPrecisionCode; - Standard_Integer myMaxDegInU; - Standard_Integer myMaxDegInV; - Standard_Integer myMaxPatches; - AdvApp2Var_Context myConditions; - AdvApp2Var_Network myResult; - AdvApp2Var_Framework myConstraints; - Standard_Boolean myDone; - Standard_Boolean myHasResult; + Standard_Integer myNumSubSpaces[3]; + Handle(TColStd_HArray1OfReal) my1DTolerances; + Handle(TColStd_HArray1OfReal) my2DTolerances; + Handle(TColStd_HArray1OfReal) my3DTolerances; + Handle(TColStd_HArray2OfReal) my1DTolOnFront; + Handle(TColStd_HArray2OfReal) my2DTolOnFront; + Handle(TColStd_HArray2OfReal) my3DTolOnFront; + Standard_Real myFirstParInU; + Standard_Real myLastParInU; + Standard_Real myFirstParInV; + Standard_Real myLastParInV; + GeomAbs_IsoType myFavoriteIso; + GeomAbs_Shape myContInU; + GeomAbs_Shape myContInV; + Standard_Integer myPrecisionCode; + Standard_Integer myMaxDegInU; + Standard_Integer myMaxDegInV; + Standard_Integer myMaxPatches; + AdvApp2Var_Context myConditions; + AdvApp2Var_Network myResult; + AdvApp2Var_Framework myConstraints; + Standard_Boolean myDone; + Standard_Boolean myHasResult; Handle(TColGeom_HArray1OfSurface) mySurfaces; - Standard_Integer myDegreeInU; - Standard_Integer myDegreeInV; - Handle(TColStd_HArray1OfReal) my1DMaxError; - Handle(TColStd_HArray1OfReal) my1DAverageError; - Handle(TColStd_HArray1OfReal) my1DUFrontError; - Handle(TColStd_HArray1OfReal) my1DVFrontError; - Handle(TColStd_HArray1OfReal) my2DMaxError; - Handle(TColStd_HArray1OfReal) my2DAverageError; - Handle(TColStd_HArray1OfReal) my2DUFrontError; - Handle(TColStd_HArray1OfReal) my2DVFrontError; - Handle(TColStd_HArray1OfReal) my3DMaxError; - Handle(TColStd_HArray1OfReal) my3DAverageError; - Handle(TColStd_HArray1OfReal) my3DUFrontError; - Handle(TColStd_HArray1OfReal) my3DVFrontError; - Standard_Real myCriterionError; - - + Standard_Integer myDegreeInU; + Standard_Integer myDegreeInV; + Handle(TColStd_HArray1OfReal) my1DMaxError; + Handle(TColStd_HArray1OfReal) my1DAverageError; + Handle(TColStd_HArray1OfReal) my1DUFrontError; + Handle(TColStd_HArray1OfReal) my1DVFrontError; + Handle(TColStd_HArray1OfReal) my2DMaxError; + Handle(TColStd_HArray1OfReal) my2DAverageError; + Handle(TColStd_HArray1OfReal) my2DUFrontError; + Handle(TColStd_HArray1OfReal) my2DVFrontError; + Handle(TColStd_HArray1OfReal) my3DMaxError; + Handle(TColStd_HArray1OfReal) my3DAverageError; + Handle(TColStd_HArray1OfReal) my3DUFrontError; + Handle(TColStd_HArray1OfReal) my3DVFrontError; + Standard_Real myCriterionError; }; - #include - - - - #endif // _AdvApp2Var_ApproxAFunc2Var_HeaderFile diff --git a/opencascade/AdvApp2Var_ApproxAFunc2Var.lxx b/opencascade/AdvApp2Var_ApproxAFunc2Var.lxx index 0f4f55505..622dcbf57 100644 --- a/opencascade/AdvApp2Var_ApproxAFunc2Var.lxx +++ b/opencascade/AdvApp2Var_ApproxAFunc2Var.lxx @@ -15,35 +15,34 @@ #include #include - -inline Standard_Boolean AdvApp2Var_ApproxAFunc2Var::IsDone() const +inline Standard_Boolean AdvApp2Var_ApproxAFunc2Var::IsDone() const { return myDone; } - inline Standard_Boolean AdvApp2Var_ApproxAFunc2Var::HasResult() const +inline Standard_Boolean AdvApp2Var_ApproxAFunc2Var::HasResult() const { return myHasResult; } - inline Handle(Geom_BSplineSurface) -AdvApp2Var_ApproxAFunc2Var::Surface( const Standard_Integer SSPIndex) const +inline Handle(Geom_BSplineSurface) AdvApp2Var_ApproxAFunc2Var::Surface( + const Standard_Integer SSPIndex) const { - return Handle(Geom_BSplineSurface)::DownCast( mySurfaces->Value(SSPIndex) ); + return Handle(Geom_BSplineSurface)::DownCast(mySurfaces->Value(SSPIndex)); } - inline Standard_Integer AdvApp2Var_ApproxAFunc2Var::UDegree() const +inline Standard_Integer AdvApp2Var_ApproxAFunc2Var::UDegree() const { return myDegreeInU; } - inline Standard_Integer AdvApp2Var_ApproxAFunc2Var::VDegree() const +inline Standard_Integer AdvApp2Var_ApproxAFunc2Var::VDegree() const { return myDegreeInV; } - inline Standard_Integer AdvApp2Var_ApproxAFunc2Var::NumSubSpaces(const Standard_Integer Dimension) const +inline Standard_Integer AdvApp2Var_ApproxAFunc2Var::NumSubSpaces( + const Standard_Integer Dimension) const { - return myNumSubSpaces[Dimension-1]; + return myNumSubSpaces[Dimension - 1]; } - diff --git a/opencascade/AdvApp2Var_ApproxF2var.hxx b/opencascade/AdvApp2Var_ApproxF2var.hxx index 1b810ec3f..2f2859122 100644 --- a/opencascade/AdvApp2Var_ApproxF2var.hxx +++ b/opencascade/AdvApp2Var_ApproxF2var.hxx @@ -13,7 +13,7 @@ // AdvApp2Var_ApproxF2var.hxx /*--------------------------------------------------------------- -| description de la macro et du prototype des routines +| description de la macro et du prototype des routines | de l'approximation a deux variables | a utiliser dans AdvApp2Var |--------------------------------------------------------------*/ @@ -23,198 +23,186 @@ #include #include #include + // -class AdvApp2Var_ApproxF2var { - public: - -Standard_EXPORT static int mma2fnc_(integer *ndimen, - integer *nbsesp, - integer *ndimse, - doublereal *uvfonc, - const AdvApp2Var_EvaluatorFunc2Var& foncnp, - doublereal *tconst, - integer *isofav, - integer *nbroot, - doublereal *rootlg, - integer *iordre, - integer *ideriv, - integer *ndgjac, - integer *nbcrmx, - integer *ncflim, - doublereal *epsapr, - integer *ncoeff, - doublereal *courbe, - integer *nbcrbe, - doublereal *somtab, - doublereal *diftab, - doublereal *contr1, - doublereal *contr2, - doublereal *tabdec, - doublereal *errmax, - doublereal *errmoy, - integer *iercod); - - -Standard_EXPORT static int mma2roo_(integer *nbpntu, - integer *nbpntv, - doublereal *urootl, - doublereal *vrootl); - - -Standard_EXPORT static int mma2jmx_(integer *ndgjac, - integer *iordre, - doublereal *xjacmx); - -Standard_EXPORT static int mmapptt_(const integer * , - const integer * , - const integer * , - doublereal * , - integer * ); - -Standard_EXPORT static int mma2cdi_(integer *ndimen, - integer *nbpntu, - doublereal *urootl, - integer *nbpntv, - doublereal *vrootl, - integer *iordru, - integer *iordrv, - doublereal *contr1, - doublereal *contr2, - doublereal *contr3, - doublereal *contr4, - doublereal *sotbu1, - doublereal *sotbu2, - doublereal *ditbu1, - doublereal *ditbu2, - doublereal *sotbv1, - doublereal *sotbv2, - doublereal *ditbv1, - doublereal *ditbv2, - doublereal *sosotb, - doublereal *soditb, - doublereal *disotb, - doublereal *diditb, - integer *iercod); - - -Standard_EXPORT static int mma2ds1_(integer *ndimen, - doublereal *uintfn, - doublereal *vintfn, - const AdvApp2Var_EvaluatorFunc2Var& foncnp, - integer *nbpntu, - integer *nbpntv, - doublereal *urootb, - doublereal *vrootb, - integer *isofav, - doublereal *sosotb, - doublereal *disotb, - doublereal *soditb, - doublereal *diditb, - doublereal *fpntab, - doublereal *ttable, - integer *iercod); - -Standard_EXPORT static int mma2ce1_(integer *numdec, - integer *ndimen, - integer *nbsesp, - integer *ndimse, - integer *ndminu, - integer *ndminv, - integer *ndguli, - integer *ndgvli, - integer *ndjacu, - integer *ndjacv, - integer *iordru, - integer *iordrv, - integer *nbpntu, - integer *nbpntv, - doublereal *epsapr, - doublereal *sosotb, - doublereal *disotb, - doublereal *soditb, - doublereal *diditb, - doublereal *patjac, - doublereal *errmax, - doublereal *errmoy, - integer *ndegpu, - integer *ndegpv, - integer *itydec, - integer *iercod); - - -Standard_EXPORT static int mma2can_(const integer * , - const integer * , - const integer * , - const integer * , - const integer * , - const integer * , - const integer * , - const doublereal *, - doublereal * , - doublereal * , - integer * ); - - -Standard_EXPORT static int mma1her_(const integer * , - doublereal * , - integer * ); - - -Standard_EXPORT static int mma2ac2_(const integer * , - const integer * , - const integer * , - const integer * , - const integer * , - const integer * , - const doublereal * , - const integer * , - const doublereal * , - const doublereal * , - doublereal * ); - - -Standard_EXPORT static int mma2ac3_(const integer * , - const integer * , - const integer * , - const integer * , - const integer * , - const integer * , - const doublereal * , - const integer * , - const doublereal * , - const doublereal * , - doublereal * ); - - -Standard_EXPORT static int mma2ac1_(const integer * , - const integer * , - const integer * , - const integer * , - const integer * , - const doublereal * , - const doublereal * , - const doublereal * , - const doublereal * , - const doublereal * , - const doublereal * , - doublereal * ); - - -Standard_EXPORT static int mma2fx6_(integer *ncfmxu, - integer *ncfmxv, - integer *ndimen, - integer *nbsesp, - integer *ndimse, - integer *nbupat, - integer *nbvpat, - integer *iordru, - integer *iordrv, - doublereal *epsapr, - doublereal *epsfro, - doublereal *patcan, - doublereal *errmax, - integer *ncoefu, - integer *ncoefv); +class AdvApp2Var_ApproxF2var +{ +public: + Standard_EXPORT static int mma2fnc_(integer* ndimen, + integer* nbsesp, + integer* ndimse, + doublereal* uvfonc, + const AdvApp2Var_EvaluatorFunc2Var& foncnp, + doublereal* tconst, + integer* isofav, + integer* nbroot, + doublereal* rootlg, + integer* iordre, + integer* ideriv, + integer* ndgjac, + integer* nbcrmx, + integer* ncflim, + doublereal* epsapr, + integer* ncoeff, + doublereal* courbe, + integer* nbcrbe, + doublereal* somtab, + doublereal* diftab, + doublereal* contr1, + doublereal* contr2, + doublereal* tabdec, + doublereal* errmax, + doublereal* errmoy, + integer* iercod); + + Standard_EXPORT static int mma2roo_(integer* nbpntu, + integer* nbpntv, + doublereal* urootl, + doublereal* vrootl); + + Standard_EXPORT static int mma2jmx_(integer* ndgjac, integer* iordre, doublereal* xjacmx); + + Standard_EXPORT static int mmapptt_(const integer*, + const integer*, + const integer*, + doublereal*, + integer*); + + Standard_EXPORT static int mma2cdi_(integer* ndimen, + integer* nbpntu, + doublereal* urootl, + integer* nbpntv, + doublereal* vrootl, + integer* iordru, + integer* iordrv, + doublereal* contr1, + doublereal* contr2, + doublereal* contr3, + doublereal* contr4, + doublereal* sotbu1, + doublereal* sotbu2, + doublereal* ditbu1, + doublereal* ditbu2, + doublereal* sotbv1, + doublereal* sotbv2, + doublereal* ditbv1, + doublereal* ditbv2, + doublereal* sosotb, + doublereal* soditb, + doublereal* disotb, + doublereal* diditb, + integer* iercod); + + Standard_EXPORT static int mma2ds1_(integer* ndimen, + doublereal* uintfn, + doublereal* vintfn, + const AdvApp2Var_EvaluatorFunc2Var& foncnp, + integer* nbpntu, + integer* nbpntv, + doublereal* urootb, + doublereal* vrootb, + integer* isofav, + doublereal* sosotb, + doublereal* disotb, + doublereal* soditb, + doublereal* diditb, + doublereal* fpntab, + doublereal* ttable, + integer* iercod); + + Standard_EXPORT static int mma2ce1_(integer* numdec, + integer* ndimen, + integer* nbsesp, + integer* ndimse, + integer* ndminu, + integer* ndminv, + integer* ndguli, + integer* ndgvli, + integer* ndjacu, + integer* ndjacv, + integer* iordru, + integer* iordrv, + integer* nbpntu, + integer* nbpntv, + doublereal* epsapr, + doublereal* sosotb, + doublereal* disotb, + doublereal* soditb, + doublereal* diditb, + doublereal* patjac, + doublereal* errmax, + doublereal* errmoy, + integer* ndegpu, + integer* ndegpv, + integer* itydec, + integer* iercod); + + Standard_EXPORT static int mma2can_(const integer*, + const integer*, + const integer*, + const integer*, + const integer*, + const integer*, + const integer*, + const doublereal*, + doublereal*, + doublereal*, + integer*); + + Standard_EXPORT static int mma1her_(const integer*, doublereal*, integer*); + + Standard_EXPORT static int mma2ac2_(const integer*, + const integer*, + const integer*, + const integer*, + const integer*, + const integer*, + const doublereal*, + const integer*, + const doublereal*, + const doublereal*, + doublereal*); + + Standard_EXPORT static int mma2ac3_(const integer*, + const integer*, + const integer*, + const integer*, + const integer*, + const integer*, + const doublereal*, + const integer*, + const doublereal*, + const doublereal*, + doublereal*); + + Standard_EXPORT static int mma2ac1_(const integer*, + const integer*, + const integer*, + const integer*, + const integer*, + const doublereal*, + const doublereal*, + const doublereal*, + const doublereal*, + const doublereal*, + const doublereal*, + doublereal*); + + Standard_EXPORT static int mma2fx6_(integer* ncfmxu, + integer* ncfmxv, + integer* ndimen, + integer* nbsesp, + integer* ndimse, + integer* nbupat, + integer* nbvpat, + integer* iordru, + integer* iordrv, + doublereal* epsapr, + doublereal* epsfro, + doublereal* patcan, + doublereal* errmax, + integer* ncoefu, + integer* ncoefv); }; #endif diff --git a/opencascade/AdvApp2Var_Context.hxx b/opencascade/AdvApp2Var_Context.hxx index 1c692a3bd..c37d16f51 100644 --- a/opencascade/AdvApp2Var_Context.hxx +++ b/opencascade/AdvApp2Var_Context.hxx @@ -25,82 +25,81 @@ #include #include - - //! contains all the parameters for approximation //! ( tolerancy, computing option, ...) -class AdvApp2Var_Context +class AdvApp2Var_Context { public: - DEFINE_STANDARD_ALLOC - Standard_EXPORT AdvApp2Var_Context(); - - Standard_EXPORT AdvApp2Var_Context(const Standard_Integer ifav, const Standard_Integer iu, const Standard_Integer iv, const Standard_Integer nlimu, const Standard_Integer nlimv, const Standard_Integer iprecis, const Standard_Integer nb1Dss, const Standard_Integer nb2Dss, const Standard_Integer nb3Dss, const Handle(TColStd_HArray1OfReal)& tol1D, const Handle(TColStd_HArray1OfReal)& tol2D, const Handle(TColStd_HArray1OfReal)& tol3D, const Handle(TColStd_HArray2OfReal)& tof1D, const Handle(TColStd_HArray2OfReal)& tof2D, const Handle(TColStd_HArray2OfReal)& tof3D); - + + Standard_EXPORT AdvApp2Var_Context(const Standard_Integer ifav, + const Standard_Integer iu, + const Standard_Integer iv, + const Standard_Integer nlimu, + const Standard_Integer nlimv, + const Standard_Integer iprecis, + const Standard_Integer nb1Dss, + const Standard_Integer nb2Dss, + const Standard_Integer nb3Dss, + const Handle(TColStd_HArray1OfReal)& tol1D, + const Handle(TColStd_HArray1OfReal)& tol2D, + const Handle(TColStd_HArray1OfReal)& tol3D, + const Handle(TColStd_HArray2OfReal)& tof1D, + const Handle(TColStd_HArray2OfReal)& tof2D, + const Handle(TColStd_HArray2OfReal)& tof3D); + Standard_EXPORT Standard_Integer TotalDimension() const; - + Standard_EXPORT Standard_Integer TotalNumberSSP() const; - + Standard_EXPORT Standard_Integer FavorIso() const; - + Standard_EXPORT Standard_Integer UOrder() const; - + Standard_EXPORT Standard_Integer VOrder() const; - + Standard_EXPORT Standard_Integer ULimit() const; - + Standard_EXPORT Standard_Integer VLimit() const; - + Standard_EXPORT Standard_Integer UJacDeg() const; - + Standard_EXPORT Standard_Integer VJacDeg() const; - + Standard_EXPORT Handle(TColStd_HArray1OfReal) UJacMax() const; - + Standard_EXPORT Handle(TColStd_HArray1OfReal) VJacMax() const; - + Standard_EXPORT Handle(TColStd_HArray1OfReal) URoots() const; - + Standard_EXPORT Handle(TColStd_HArray1OfReal) VRoots() const; - + Standard_EXPORT Handle(TColStd_HArray1OfReal) UGauss() const; - + Standard_EXPORT Handle(TColStd_HArray1OfReal) VGauss() const; - - Standard_EXPORT Handle(TColStd_HArray1OfReal) IToler() const; - - Standard_EXPORT Handle(TColStd_HArray2OfReal) FToler() const; - - Standard_EXPORT Handle(TColStd_HArray2OfReal) CToler() const; + Standard_EXPORT Handle(TColStd_HArray1OfReal) IToler() const; + Standard_EXPORT Handle(TColStd_HArray2OfReal) FToler() const; + Standard_EXPORT Handle(TColStd_HArray2OfReal) CToler() const; protected: - - - - - private: - - - - Standard_Integer myFav; - Standard_Integer myOrdU; - Standard_Integer myOrdV; - Standard_Integer myLimU; - Standard_Integer myLimV; - Standard_Integer myNb1DSS; - Standard_Integer myNb2DSS; - Standard_Integer myNb3DSS; - Standard_Integer myNbURoot; - Standard_Integer myNbVRoot; - Standard_Integer myJDegU; - Standard_Integer myJDegV; + Standard_Integer myFav; + Standard_Integer myOrdU; + Standard_Integer myOrdV; + Standard_Integer myLimU; + Standard_Integer myLimV; + Standard_Integer myNb1DSS; + Standard_Integer myNb2DSS; + Standard_Integer myNb3DSS; + Standard_Integer myNbURoot; + Standard_Integer myNbVRoot; + Standard_Integer myJDegU; + Standard_Integer myJDegV; Handle(TColStd_HArray1OfReal) myJMaxU; Handle(TColStd_HArray1OfReal) myJMaxV; Handle(TColStd_HArray1OfReal) myURoots; @@ -110,14 +109,6 @@ private: Handle(TColStd_HArray1OfReal) myInternalTol; Handle(TColStd_HArray2OfReal) myFrontierTol; Handle(TColStd_HArray2OfReal) myCuttingTol; - - }; - - - - - - #endif // _AdvApp2Var_Context_HeaderFile diff --git a/opencascade/AdvApp2Var_Criterion.hxx b/opencascade/AdvApp2Var_Criterion.hxx index ba92de300..f63c90626 100644 --- a/opencascade/AdvApp2Var_Criterion.hxx +++ b/opencascade/AdvApp2Var_Criterion.hxx @@ -28,51 +28,30 @@ class AdvApp2Var_Patch; class AdvApp2Var_Context; - - //! this class contains a given criterion to be satisfied -class AdvApp2Var_Criterion +class AdvApp2Var_Criterion { public: - DEFINE_STANDARD_ALLOC Standard_EXPORT virtual ~AdvApp2Var_Criterion(); - - Standard_EXPORT virtual void Value (AdvApp2Var_Patch& P, const AdvApp2Var_Context& C) const = 0; - - Standard_EXPORT virtual Standard_Boolean IsSatisfied (const AdvApp2Var_Patch& P) const = 0; - - Standard_EXPORT Standard_Real MaxValue() const; - - Standard_EXPORT AdvApp2Var_CriterionType Type() const; - - Standard_EXPORT AdvApp2Var_CriterionRepartition Repartition() const; + Standard_EXPORT virtual void Value(AdvApp2Var_Patch& P, const AdvApp2Var_Context& C) const = 0; + Standard_EXPORT virtual Standard_Boolean IsSatisfied(const AdvApp2Var_Patch& P) const = 0; + Standard_EXPORT Standard_Real MaxValue() const; -protected: - + Standard_EXPORT AdvApp2Var_CriterionType Type() const; + Standard_EXPORT AdvApp2Var_CriterionRepartition Repartition() const; - Standard_Real myMaxValue; - AdvApp2Var_CriterionType myType; +protected: + Standard_Real myMaxValue; + AdvApp2Var_CriterionType myType; AdvApp2Var_CriterionRepartition myRepartition; - private: - - - - - }; - - - - - - #endif // _AdvApp2Var_Criterion_HeaderFile diff --git a/opencascade/AdvApp2Var_CriterionRepartition.hxx b/opencascade/AdvApp2Var_CriterionRepartition.hxx index 8474b962a..d9acdf0fa 100644 --- a/opencascade/AdvApp2Var_CriterionRepartition.hxx +++ b/opencascade/AdvApp2Var_CriterionRepartition.hxx @@ -24,8 +24,8 @@ //! of cutting process enum AdvApp2Var_CriterionRepartition { -AdvApp2Var_Regular, -AdvApp2Var_Incremental + AdvApp2Var_Regular, + AdvApp2Var_Incremental }; #endif // _AdvApp2Var_CriterionRepartition_HeaderFile diff --git a/opencascade/AdvApp2Var_CriterionType.hxx b/opencascade/AdvApp2Var_CriterionType.hxx index a562e876b..89e134003 100644 --- a/opencascade/AdvApp2Var_CriterionType.hxx +++ b/opencascade/AdvApp2Var_CriterionType.hxx @@ -17,13 +17,15 @@ #ifndef _AdvApp2Var_CriterionType_HeaderFile #define _AdvApp2Var_CriterionType_HeaderFile -//! influency of the criterion on cutting process//! cutting when criterion is not satisfied -//! desactivation of the compute of the error max//! cutting when error max is not good or if error +//! influence of the criterion on cutting process +//! cutting when criterion is not satisfied +//! deactivation of the compute of the error max +//! cutting when error max is not good or if error //! max is good and criterion is not satisfied enum AdvApp2Var_CriterionType { -AdvApp2Var_Absolute, -AdvApp2Var_Relative + AdvApp2Var_Absolute, + AdvApp2Var_Relative }; #endif // _AdvApp2Var_CriterionType_HeaderFile diff --git a/opencascade/AdvApp2Var_Data.hxx b/opencascade/AdvApp2Var_Data.hxx index 26f82b0ac..f2fc2ee1f 100644 --- a/opencascade/AdvApp2Var_Data.hxx +++ b/opencascade/AdvApp2Var_Data.hxx @@ -16,71 +16,83 @@ #include #include + // -struct mdnombr_1_ { - doublereal pi, - deuxpi, - pisur2, - pis180, - c180pi, - zero, - one, - a180, - a360, - a90; +struct mdnombr_1_ +{ + doublereal pi, deuxpi, pisur2, pis180, c180pi, zero, one, a180, a360, a90; }; + // -struct minombr_1_ { +struct minombr_1_ +{ integer nbr[1001]; }; + // -struct maovpar_1_ { +struct maovpar_1_ +{ doublereal r8und, r8ovr, x4und, x4ovr; - real r4und, r4ovr; - integer r4nbe, r8nbm, r8nbe, i4ovr, i4ovn, r4exp, r8exp, r4exn, r8exn, - r4ncs, r8ncs, r4nbm; - shortint i2ovr, i2ovn; + real r4und, r4ovr; + integer r4nbe, r8nbm, r8nbe, i4ovr, i4ovn, r4exp, r8exp, r4exn, r8exn, r4ncs, r8ncs, r4nbm; + shortint i2ovr, i2ovn; }; + // -struct maovpch_1_ { +struct maovpch_1_ +{ char cnmmac[16], frmr4[8], frmr8[8], cdcode[8]; }; + // -struct mlgdrtl_1_ { - doublereal rootab[930],// was [465][2] - hiltab[930],// was [465][2] +struct mlgdrtl_1_ +{ + doublereal rootab[930], // was [465][2] + hiltab[930], // was [465][2] hi0tab[31]; - }; +}; + // -struct mmjcobi_1_ { - doublereal plgcan[3968];// was [496][2][4] - doublereal canjac[3968];// was [496][2][4] +struct mmjcobi_1_ +{ + doublereal plgcan[3968]; // was [496][2][4] + doublereal canjac[3968]; // was [496][2][4] }; + // -struct mmcmcnp_1_ { - doublereal cnp[3721]; // was [61][61] ; +struct mmcmcnp_1_ +{ + doublereal cnp[3721]; // was [61][61] ; }; + // -struct mmapgss_1_ { - doublereal gslxjs[5017], - gsl0js[52]; +struct mmapgss_1_ +{ + doublereal gslxjs[5017], gsl0js[52]; }; + // -struct mmapgs0_1_ { +struct mmapgs0_1_ +{ doublereal gslxj0[4761], gsl0j0[49]; }; + // -struct mmapgs1_1_ { +struct mmapgs1_1_ +{ doublereal gslxj1[4505], gsl0j1[46]; }; + // -struct mmapgs2_1_ { +struct mmapgs2_1_ +{ doublereal gslxj2[4249], gsl0j2[43]; }; + //// -class AdvApp2Var_Data { - public: - +class AdvApp2Var_Data +{ +public: Standard_EXPORT static mdnombr_1_& Getmdnombr(); Standard_EXPORT static minombr_1_& Getminombr(); Standard_EXPORT static maovpar_1_& Getmaovpar(); @@ -92,8 +104,8 @@ class AdvApp2Var_Data { Standard_EXPORT static mmapgs0_1_& Getmmapgs0(); Standard_EXPORT static mmapgs1_1_& Getmmapgs1(); Standard_EXPORT static mmapgs2_1_& Getmmapgs2(); - }; + // #define mdnombr_ AdvApp2Var_Data::Getmdnombr() #define minombr_ AdvApp2Var_Data::Getminombr() diff --git a/opencascade/AdvApp2Var_Data_f2c.hxx b/opencascade/AdvApp2Var_Data_f2c.hxx index f9976b95b..6aa1d5c43 100644 --- a/opencascade/AdvApp2Var_Data_f2c.hxx +++ b/opencascade/AdvApp2Var_Data_f2c.hxx @@ -16,26 +16,35 @@ #define AdvApp2Var_Data_f2c_HeaderFile #ifndef F2CTYPE_DEFINED -typedef int integer; +typedef int integer; typedef double doublereal; -#define F2CTYPE_DEFINED + #define F2CTYPE_DEFINED #endif typedef unsigned long uinteger; -typedef char *address; -typedef short int shortint; -typedef float real; -typedef struct { real r, i; } complex; -typedef struct { doublereal r, i; } doublecomplex; -typedef long int logical; +typedef char* address; +typedef short int shortint; +typedef float real; + +typedef struct +{ + real r, i; +} complex; + +typedef struct +{ + doublereal r, i; +} doublecomplex; + +typedef long int logical; typedef short int shortlogical; -typedef char logical1; -typedef char integer1; -#if 0 /* Adjust for integer*8. */ +typedef char logical1; +typedef char integer1; +#if 0 /* Adjust for integer*8. */ typedef long long longint; /* system-dependent */ typedef unsigned long long ulongint; /* system-dependent */ -#define qbit_clear(a,b) ((a) & ~((ulongint)1 << (b))) -#define qbit_set(a,b) ((a) | ((ulongint)1 << (b))) + #define qbit_clear(a, b) ((a) & ~((ulongint)1 << (b))) + #define qbit_set(a, b) ((a) | ((ulongint)1 << (b))) #endif #define TRUE_ (1) @@ -43,7 +52,7 @@ typedef unsigned long long ulongint; /* system-dependent */ /* Extern is for use with -E */ #ifndef Extern -#define Extern extern + #define Extern extern #endif /* I/O stuff */ @@ -61,120 +70,128 @@ typedef long int ftnint; /*external read, write*/ typedef struct -{ flag cierr; - ftnint ciunit; - flag ciend; - char *cifmt; - ftnint cirec; +{ + flag cierr; + ftnint ciunit; + flag ciend; + char* cifmt; + ftnint cirec; } cilist; /*internal read, write*/ typedef struct -{ flag icierr; - char *iciunit; - flag iciend; - char *icifmt; - ftnint icirlen; - ftnint icirnum; +{ + flag icierr; + char* iciunit; + flag iciend; + char* icifmt; + ftnint icirlen; + ftnint icirnum; } icilist; /*open*/ typedef struct -{ flag oerr; - ftnint ounit; - char *ofnm; - ftnlen ofnmlen; - char *osta; - char *oacc; - char *ofm; - ftnint orl; - char *oblnk; +{ + flag oerr; + ftnint ounit; + char* ofnm; + ftnlen ofnmlen; + char* osta; + char* oacc; + char* ofm; + ftnint orl; + char* oblnk; } olist; /*close*/ typedef struct -{ flag cerr; - ftnint cunit; - char *csta; +{ + flag cerr; + ftnint cunit; + char* csta; } cllist; /*rewind, backspace, endfile*/ typedef struct -{ flag aerr; - ftnint aunit; +{ + flag aerr; + ftnint aunit; } alist; /* inquire */ typedef struct -{ flag inerr; - ftnint inunit; - char *infile; - ftnlen infilen; - ftnint *inex; /*parameters in standard's order*/ - ftnint *inopen; - ftnint *innum; - ftnint *innamed; - char *inname; - ftnlen innamlen; - char *inacc; - ftnlen inacclen; - char *inseq; - ftnlen inseqlen; - char *indir; - ftnlen indirlen; - char *infmt; - ftnlen infmtlen; - char *inform; - ftnint informlen; - char *inunf; - ftnlen inunflen; - ftnint *inrecl; - ftnint *innrec; - char *inblank; - ftnlen inblanklen; +{ + flag inerr; + ftnint inunit; + char* infile; + ftnlen infilen; + ftnint* inex; /*parameters in standard's order*/ + ftnint* inopen; + ftnint* innum; + ftnint* innamed; + char* inname; + ftnlen innamlen; + char* inacc; + ftnlen inacclen; + char* inseq; + ftnlen inseqlen; + char* indir; + ftnlen indirlen; + char* infmt; + ftnlen infmtlen; + char* inform; + ftnint informlen; + char* inunf; + ftnlen inunflen; + ftnint* inrecl; + ftnint* innrec; + char* inblank; + ftnlen inblanklen; } inlist; #define VOID void -union Multitype { /* for multiple entry points */ - integer1 g; - shortint h; - integer i; - /* longint j; */ - real r; - doublereal d; - complex c; - doublecomplex z; - }; +union Multitype { /* for multiple entry points */ + integer1 g; + shortint h; + integer i; + /* longint j; */ + real r; + doublereal d; + complex c; + doublecomplex z; +}; typedef union Multitype Multitype; -/*typedef long int Long;*/ /* No longer used; formerly in Namelist */ +/*typedef long int Long;*/ /* No longer used; formerly in Namelist */ -struct Vardesc { /* for Namelist */ - char *name; - char *addr; - ftnlen *dims; - int type; - }; +struct Vardesc +{ /* for Namelist */ + char* name; + char* addr; + ftnlen* dims; + int type; +}; typedef struct Vardesc Vardesc; -struct Namelist { - char *name; - Vardesc **vars; - int nvars; - }; +struct Namelist +{ + char* name; + Vardesc** vars; + int nvars; +}; typedef struct Namelist Namelist; #define advapp_abs(x) ((x) >= 0 ? (x) : -(x)) -#define dabs(x) (doublereal)advapp_abs(x) -#define advapp_min(a,b) ((a) <= (b) ? (a) : (b)) -#define advapp_max(a,b) ((a) >= (b) ? (a) : (b)) -#define dmin(a,b) (doublereal)advapp_min(a,b) -#define dmax(a,b) (doublereal)advapp_max(a,b) -#define bit_test(a,b) ((a) >> (b) & 1) -#define bit_clear(a,b) ((a) & ~((uinteger)1 << (b))) -#define bit_set(a,b) ((a) | ((uinteger)1 << (b))) +#define dabs(x) (doublereal) advapp_abs(x) +#define advapp_min(a, b) ((a) <= (b) ? (a) : (b)) +#define advapp_max(a, b) ((a) >= (b) ? (a) : (b)) +#define dmin(a, b) (doublereal) advapp_min(a, b) +#define dmax(a, b) (doublereal) advapp_max(a, b) +#define bit_test(a, b) ((a) >> (b) & 1) +#define bit_clear(a, b) ((a) & ~((uinteger)1 << (b))) +#define bit_set(a, b) ((a) | ((uinteger)1 << (b))) /* procedure parameter types for -A and -C++ */ @@ -205,32 +222,32 @@ typedef /* Character */ VOID (*H_fp)(); typedef /* Subroutine */ int (*S_fp)(); #endif /* E_fp is for real functions when -R is not specified */ -typedef VOID C_f; /* complex function */ -typedef VOID H_f; /* character function */ -typedef VOID Z_f; /* double complex function */ -typedef doublereal E_f; /* real function with -R not specified */ +typedef VOID C_f; /* complex function */ +typedef VOID H_f; /* character function */ +typedef VOID Z_f; /* double complex function */ +typedef doublereal E_f; /* real function with -R not specified */ /* undef any lower-case symbols that your C compiler predefines, e.g.: */ #ifndef Skip_f2c_Undefs -#undef cray -#undef gcos -#undef mc68010 -#undef mc68020 -#undef mips -#undef pdp11 -#undef sgi -#undef sparc -#undef sun -#undef sun2 -#undef sun3 -#undef sun4 -#undef u370 -#undef u3b -#undef u3b2 -#undef u3b5 -#undef unix -#undef vax + #undef cray + #undef gcos + #undef mc68010 + #undef mc68020 + #undef mips + #undef pdp11 + #undef sgi + #undef sparc + #undef sun + #undef sun2 + #undef sun3 + #undef sun4 + #undef u370 + #undef u3b + #undef u3b2 + #undef u3b5 + #undef unix + #undef vax #endif -//#endif +// #endif #endif diff --git a/opencascade/AdvApp2Var_EvaluatorFunc2Var.hxx b/opencascade/AdvApp2Var_EvaluatorFunc2Var.hxx index 2215281fe..ef90dbe69 100644 --- a/opencascade/AdvApp2Var_EvaluatorFunc2Var.hxx +++ b/opencascade/AdvApp2Var_EvaluatorFunc2Var.hxx @@ -24,51 +24,57 @@ class AdvApp2Var_EvaluatorFunc2Var { public: - //! Empty constructor AdvApp2Var_EvaluatorFunc2Var() {} //! Destructor should be declared as virtual - virtual ~AdvApp2Var_EvaluatorFunc2Var () {} + virtual ~AdvApp2Var_EvaluatorFunc2Var() {} //! Function evaluation method to be defined by descendant - virtual void Evaluate (Standard_Integer* theDimension, - Standard_Real* theUStartEnd, //!< First and last parameters in U - Standard_Real* theVStartEnd, //!< First and last parameters in V - Standard_Integer* theFavorIso, //!< Choice of constante, 1 for U, 2 for V - Standard_Real* theConstParam, //!< Value of constant parameter - Standard_Integer* theNbParams, //!< Number of parameters N - Standard_Real* theParameters, //!< Values of parameters, - Standard_Integer* theUOrder, //!< Derivative Request in U - Standard_Integer* theVOrder, //!< Derivative Request in V - Standard_Real* theResult, //!< Result[Dimension,N] - Standard_Integer* theErrorCode) const = 0; + virtual void Evaluate(Standard_Integer* theDimension, + Standard_Real* theUStartEnd, //!< First and last parameters in U + Standard_Real* theVStartEnd, //!< First and last parameters in V + Standard_Integer* theFavorIso, //!< Choice of constante, 1 for U, 2 for V + Standard_Real* theConstParam, //!< Value of constant parameter + Standard_Integer* theNbParams, //!< Number of parameters N + Standard_Real* theParameters, //!< Values of parameters, + Standard_Integer* theUOrder, //!< Derivative Request in U + Standard_Integer* theVOrder, //!< Derivative Request in V + Standard_Real* theResult, //!< Result[Dimension,N] + Standard_Integer* theErrorCode) const = 0; //! Shortcut for function-call style usage - void operator() (Standard_Integer* theDimension, - Standard_Real* theUStartEnd, - Standard_Real* theVStartEnd, - Standard_Integer* theFavorIso, - Standard_Real* theConstParam, - Standard_Integer* theNbParams, - Standard_Real* theParameters, - Standard_Integer* theUOrder, - Standard_Integer* theVOrder, - Standard_Real* theResult, - Standard_Integer* theErrorCode) const + void operator()(Standard_Integer* theDimension, + Standard_Real* theUStartEnd, + Standard_Real* theVStartEnd, + Standard_Integer* theFavorIso, + Standard_Real* theConstParam, + Standard_Integer* theNbParams, + Standard_Real* theParameters, + Standard_Integer* theUOrder, + Standard_Integer* theVOrder, + Standard_Real* theResult, + Standard_Integer* theErrorCode) const { - Evaluate (theDimension, theUStartEnd, theVStartEnd, theFavorIso, - theConstParam, theNbParams, - theParameters, theUOrder, theVOrder, theResult, theErrorCode); + Evaluate(theDimension, + theUStartEnd, + theVStartEnd, + theFavorIso, + theConstParam, + theNbParams, + theParameters, + theUOrder, + theVOrder, + theResult, + theErrorCode); } private: - //! Copy constructor is declared private to forbid copying - AdvApp2Var_EvaluatorFunc2Var (const AdvApp2Var_EvaluatorFunc2Var& ) {} + AdvApp2Var_EvaluatorFunc2Var(const AdvApp2Var_EvaluatorFunc2Var&) {} //! Assignment operator is declared private to forbid copying - void operator= (const AdvApp2Var_EvaluatorFunc2Var& ) {} + void operator=(const AdvApp2Var_EvaluatorFunc2Var&) {} }; #endif diff --git a/opencascade/AdvApp2Var_Framework.hxx b/opencascade/AdvApp2Var_Framework.hxx index 0f78d3822..987e5881b 100644 --- a/opencascade/AdvApp2Var_Framework.hxx +++ b/opencascade/AdvApp2Var_Framework.hxx @@ -31,51 +31,66 @@ class AdvApp2Var_Iso; class AdvApp2Var_Node; - - -class AdvApp2Var_Framework +class AdvApp2Var_Framework { public: - DEFINE_STANDARD_ALLOC - Standard_EXPORT AdvApp2Var_Framework(); - - Standard_EXPORT AdvApp2Var_Framework(const AdvApp2Var_SequenceOfNode& Frame, const AdvApp2Var_SequenceOfStrip& UFrontier, const AdvApp2Var_SequenceOfStrip& VFrontier); + + Standard_EXPORT AdvApp2Var_Framework(const AdvApp2Var_SequenceOfNode& Frame, + const AdvApp2Var_SequenceOfStrip& UFrontier, + const AdvApp2Var_SequenceOfStrip& VFrontier); //! search the Index of the first Iso not approximated, //! if all Isos are approximated NULL is returned. - Standard_EXPORT Handle(AdvApp2Var_Iso) FirstNotApprox (Standard_Integer& IndexIso, Standard_Integer& IndexStrip) const; - - Standard_EXPORT Standard_Integer FirstNode (const GeomAbs_IsoType Type, const Standard_Integer IndexIso, const Standard_Integer IndexStrip) const; - - Standard_EXPORT Standard_Integer LastNode (const GeomAbs_IsoType Type, const Standard_Integer IndexIso, const Standard_Integer IndexStrip) const; - - Standard_EXPORT void ChangeIso (const Standard_Integer IndexIso, const Standard_Integer IndexStrip, const Handle(AdvApp2Var_Iso)& anIso); - - const Handle(AdvApp2Var_Node)& Node (const Standard_Integer IndexNode) const { return myNodeConstraints.Value(IndexNode); } - - Standard_EXPORT const Handle(AdvApp2Var_Node)& Node (const Standard_Real U, const Standard_Real V) const; - - Standard_EXPORT const AdvApp2Var_Iso& IsoU (const Standard_Real U, const Standard_Real V0, const Standard_Real V1) const; - - Standard_EXPORT const AdvApp2Var_Iso& IsoV (const Standard_Real U0, const Standard_Real U1, const Standard_Real V) const; - - Standard_EXPORT void UpdateInU (const Standard_Real CuttingValue); - - Standard_EXPORT void UpdateInV (const Standard_Real CuttingValue); - - Standard_EXPORT const Handle(TColStd_HArray1OfReal)& UEquation (const Standard_Integer IndexIso, const Standard_Integer IndexStrip) const; - - Standard_EXPORT const Handle(TColStd_HArray1OfReal)& VEquation (const Standard_Integer IndexIso, const Standard_Integer IndexStrip) const; + Standard_EXPORT Handle(AdvApp2Var_Iso) FirstNotApprox(Standard_Integer& IndexIso, + Standard_Integer& IndexStrip) const; -private: + Standard_EXPORT Standard_Integer FirstNode(const GeomAbs_IsoType Type, + const Standard_Integer IndexIso, + const Standard_Integer IndexStrip) const; + + Standard_EXPORT Standard_Integer LastNode(const GeomAbs_IsoType Type, + const Standard_Integer IndexIso, + const Standard_Integer IndexStrip) const; + + Standard_EXPORT void ChangeIso(const Standard_Integer IndexIso, + const Standard_Integer IndexStrip, + const Handle(AdvApp2Var_Iso)& anIso); + + const Handle(AdvApp2Var_Node)& Node(const Standard_Integer IndexNode) const + { + return myNodeConstraints.Value(IndexNode); + } + + Standard_EXPORT const Handle(AdvApp2Var_Node)& Node(const Standard_Real U, + const Standard_Real V) const; - AdvApp2Var_SequenceOfNode myNodeConstraints; + Standard_EXPORT const AdvApp2Var_Iso& IsoU(const Standard_Real U, + const Standard_Real V0, + const Standard_Real V1) const; + + Standard_EXPORT const AdvApp2Var_Iso& IsoV(const Standard_Real U0, + const Standard_Real U1, + const Standard_Real V) const; + + Standard_EXPORT void UpdateInU(const Standard_Real CuttingValue); + + Standard_EXPORT void UpdateInV(const Standard_Real CuttingValue); + + Standard_EXPORT const Handle(TColStd_HArray1OfReal)& UEquation( + const Standard_Integer IndexIso, + const Standard_Integer IndexStrip) const; + + Standard_EXPORT const Handle(TColStd_HArray1OfReal)& VEquation( + const Standard_Integer IndexIso, + const Standard_Integer IndexStrip) const; + +private: + AdvApp2Var_SequenceOfNode myNodeConstraints; AdvApp2Var_SequenceOfStrip myUConstraints; AdvApp2Var_SequenceOfStrip myVConstraints; - }; #endif // _AdvApp2Var_Framework_HeaderFile diff --git a/opencascade/AdvApp2Var_Iso.hxx b/opencascade/AdvApp2Var_Iso.hxx index 09a2ace5f..9d44d86fe 100644 --- a/opencascade/AdvApp2Var_Iso.hxx +++ b/opencascade/AdvApp2Var_Iso.hxx @@ -36,90 +36,106 @@ class AdvApp2Var_Iso : public Standard_Transient { DEFINE_STANDARD_RTTIEXT(AdvApp2Var_Iso, Standard_Transient) public: - Standard_EXPORT AdvApp2Var_Iso(); - - Standard_EXPORT AdvApp2Var_Iso(const GeomAbs_IsoType type, const Standard_Integer iu, const Standard_Integer iv); - - Standard_EXPORT AdvApp2Var_Iso(const GeomAbs_IsoType type, const Standard_Real cte, const Standard_Real Ufirst, const Standard_Real Ulast, const Standard_Real Vfirst, const Standard_Real Vlast, const Standard_Integer pos, const Standard_Integer iu, const Standard_Integer iv); - + + Standard_EXPORT AdvApp2Var_Iso(const GeomAbs_IsoType type, + const Standard_Integer iu, + const Standard_Integer iv); + + Standard_EXPORT AdvApp2Var_Iso(const GeomAbs_IsoType type, + const Standard_Real cte, + const Standard_Real Ufirst, + const Standard_Real Ulast, + const Standard_Real Vfirst, + const Standard_Real Vlast, + const Standard_Integer pos, + const Standard_Integer iu, + const Standard_Integer iv); + Standard_EXPORT Standard_Boolean IsApproximated() const; - + Standard_EXPORT Standard_Boolean HasResult() const; - - Standard_EXPORT void MakeApprox (const AdvApp2Var_Context& Conditions, const Standard_Real a, const Standard_Real b, const Standard_Real c, const Standard_Real d, const AdvApp2Var_EvaluatorFunc2Var& func, AdvApp2Var_Node& NodeBegin, AdvApp2Var_Node& NodeEnd); - - Standard_EXPORT void ChangeDomain (const Standard_Real a, const Standard_Real b); - - Standard_EXPORT void ChangeDomain (const Standard_Real a, const Standard_Real b, const Standard_Real c, const Standard_Real d); - - Standard_EXPORT void SetConstante (const Standard_Real newcte); - - Standard_EXPORT void SetPosition (const Standard_Integer newpos); - + + Standard_EXPORT void MakeApprox(const AdvApp2Var_Context& Conditions, + const Standard_Real a, + const Standard_Real b, + const Standard_Real c, + const Standard_Real d, + const AdvApp2Var_EvaluatorFunc2Var& func, + AdvApp2Var_Node& NodeBegin, + AdvApp2Var_Node& NodeEnd); + + Standard_EXPORT void ChangeDomain(const Standard_Real a, const Standard_Real b); + + Standard_EXPORT void ChangeDomain(const Standard_Real a, + const Standard_Real b, + const Standard_Real c, + const Standard_Real d); + + Standard_EXPORT void SetConstante(const Standard_Real newcte); + + Standard_EXPORT void SetPosition(const Standard_Integer newpos); + Standard_EXPORT void ResetApprox(); - + Standard_EXPORT void OverwriteApprox(); - + Standard_EXPORT GeomAbs_IsoType Type() const; - + Standard_EXPORT Standard_Real Constante() const; - + Standard_EXPORT Standard_Real T0() const; - + Standard_EXPORT Standard_Real T1() const; - + Standard_EXPORT Standard_Real U0() const; - + Standard_EXPORT Standard_Real U1() const; - + Standard_EXPORT Standard_Real V0() const; - + Standard_EXPORT Standard_Real V1() const; - + Standard_EXPORT Standard_Integer UOrder() const; - + Standard_EXPORT Standard_Integer VOrder() const; - + Standard_EXPORT Standard_Integer Position() const; - + Standard_EXPORT Standard_Integer NbCoeff() const; - + Standard_EXPORT const Handle(TColStd_HArray1OfReal)& Polynom() const; - + Standard_EXPORT Handle(TColStd_HArray1OfReal) SomTab() const; - + Standard_EXPORT Handle(TColStd_HArray1OfReal) DifTab() const; - + Standard_EXPORT Handle(TColStd_HArray2OfReal) MaxErrors() const; - + Standard_EXPORT Handle(TColStd_HArray2OfReal) MoyErrors() const; private: - AdvApp2Var_Iso(const AdvApp2Var_Iso& Other); - AdvApp2Var_Iso& operator= (const AdvApp2Var_Iso& theOther); + AdvApp2Var_Iso& operator=(const AdvApp2Var_Iso& theOther); private: - - GeomAbs_IsoType myType; - Standard_Real myConstPar; - Standard_Real myU0; - Standard_Real myU1; - Standard_Real myV0; - Standard_Real myV1; - Standard_Integer myPosition; - Standard_Integer myExtremOrder; - Standard_Integer myDerivOrder; - Standard_Integer myNbCoeff; - Standard_Boolean myApprIsDone; - Standard_Boolean myHasResult; + GeomAbs_IsoType myType; + Standard_Real myConstPar; + Standard_Real myU0; + Standard_Real myU1; + Standard_Real myV0; + Standard_Real myV1; + Standard_Integer myPosition; + Standard_Integer myExtremOrder; + Standard_Integer myDerivOrder; + Standard_Integer myNbCoeff; + Standard_Boolean myApprIsDone; + Standard_Boolean myHasResult; Handle(TColStd_HArray1OfReal) myEquation; Handle(TColStd_HArray2OfReal) myMaxErrors; Handle(TColStd_HArray2OfReal) myMoyErrors; Handle(TColStd_HArray1OfReal) mySomTab; Handle(TColStd_HArray1OfReal) myDifTab; - }; #endif // _AdvApp2Var_Iso_HeaderFile diff --git a/opencascade/AdvApp2Var_MathBase.hxx b/opencascade/AdvApp2Var_MathBase.hxx index e1b708c37..b614b1f3f 100644 --- a/opencascade/AdvApp2Var_MathBase.hxx +++ b/opencascade/AdvApp2Var_MathBase.hxx @@ -15,309 +15,290 @@ #ifndef AdvApp2Var_MathBase_HeaderFile #define AdvApp2Var_MathBase_HeaderFile - #include #include -class AdvApp2Var_MathBase { - public: + +class AdvApp2Var_MathBase +{ +public: /// - Standard_EXPORT static int mmapcmp_(integer*, - integer*, - integer*, - double*, - double*); - - Standard_EXPORT static int mmdrc11_(integer* , - integer* , - integer* , - doublereal* , - doublereal* , - doublereal* ); - - Standard_EXPORT static int mmfmca9_( integer* , - integer* , - integer* , - integer* , - integer* , - integer* , - doublereal* , - doublereal* ); - - Standard_EXPORT static int mmfmcb5_( integer* , - integer* , - integer* , - doublereal* , - integer* , - integer* , - integer* , - doublereal* , - integer* ); - - Standard_EXPORT static void mmwprcs_(doublereal*, - doublereal*, - doublereal*, - doublereal*, - integer*, - integer*); + Standard_EXPORT static int mmapcmp_(integer*, integer*, integer*, double*, double*); + + Standard_EXPORT static int mmdrc11_(integer*, + integer*, + integer*, + doublereal*, + doublereal*, + doublereal*); + + Standard_EXPORT static int mmfmca9_(integer*, + integer*, + integer*, + integer*, + integer*, + integer*, + doublereal*, + doublereal*); + + Standard_EXPORT static int mmfmcb5_(integer*, + integer*, + integer*, + doublereal*, + integer*, + integer*, + integer*, + doublereal*, + integer*); + + Standard_EXPORT static void mmwprcs_(doublereal*, + doublereal*, + doublereal*, + doublereal*, + integer*, + integer*); /// - Standard_EXPORT static int mmcglc1_(integer *ndimax, - integer *ndimen, - integer *ncoeff, - doublereal *courbe, - doublereal *tdebut, - doublereal *tfinal, - doublereal *epsiln, - doublereal *xlongc, - doublereal *erreur, - integer *iercod); - - - - Standard_EXPORT static int mmbulld_(integer *nbcoln, - integer *nblign, - doublereal *dtabtr, - integer *numcle); - - Standard_EXPORT static int mmcdriv_(integer *ndimen, - integer *ncoeff, - doublereal *courbe, - integer *ideriv, - integer *ncofdv, - doublereal *crvdrv); - - - Standard_EXPORT static int mmcvctx_(integer *ndimen, - integer *ncofmx, - integer *nderiv, - doublereal *ctrtes, - doublereal *crvres, - doublereal *tabaux, - doublereal *xmatri, - integer *iercod); - - Standard_EXPORT static int mdsptpt_(integer *ndimen, - doublereal *point1, - doublereal *point2, - doublereal *distan); - - - Standard_EXPORT static int mmaperx_(integer *ncofmx, - integer *ndimen, - integer *ncoeff, - integer *iordre, - doublereal *crvjac, - integer *ncfnew, - doublereal *ycvmax, - doublereal *errmax, - integer *iercod); - - Standard_EXPORT static int mmdrvck_(integer *ncoeff, - integer *ndimen, - doublereal *courbe, - integer *ideriv, - doublereal *tparam, - doublereal *pntcrb); - - Standard_EXPORT static int mmeps1_(doublereal *epsilo); - - Standard_EXPORT static int mmfmca8_(const integer *ndimen, - const integer *ncoefu, - const integer *ncoefv, - const integer *ndimax, - const integer *ncfumx, - const integer *ncfvmx, - doublereal *tabini, - doublereal *tabres); - - Standard_EXPORT static int mmfmcar_(integer *ndimen, - integer *ncofmx, - integer *ncoefu, - integer *ncoefv, - doublereal *patold, - doublereal *upara1, - doublereal *upara2, - doublereal *vpara1, - doublereal *vpara2, - doublereal *patnew, - integer *iercod); - - Standard_EXPORT static int mmfmtb1_(integer *maxsz1, - doublereal *table1, - integer *isize1, - integer *jsize1, - integer *maxsz2, - doublereal *table2, - integer *isize2, - integer *jsize2, - integer *iercod); - - Standard_EXPORT static int mmgaus1_(integer *ndimf, - int (*bfunx) ( - integer *ninteg, - doublereal *parame, - doublereal *vfunj1, - integer *iercod - ), //mmfunj1_() from Smoothing.cxx - integer *k, - doublereal *xd, - doublereal *xf, - doublereal *saux1, - doublereal *saux2, - doublereal *somme, - integer *niter, - integer *iercod); - - Standard_EXPORT static int mmhjcan_(integer *ndimen, - integer *ncourb, - integer *ncftab, - integer *orcont, - integer *ncflim, - doublereal *tcbold, - doublereal *tdecop, - doublereal *tcbnew, - integer *iercod); - - Standard_EXPORT static int mminltt_(integer *ncolmx, - integer *nlgnmx, - doublereal *tabtri, - integer *nbrcol, - integer *nbrlgn, - doublereal *ajoute, - doublereal *epseg, - integer *iercod); - - Standard_EXPORT static int mmjaccv_(const integer *ncoef, - const integer *ndim, - const integer *ider, - const doublereal *crvlgd, - doublereal *polaux, - doublereal *crvcan); - - Standard_EXPORT static int mmpobas_(doublereal *tparam, - integer *iordre, - integer *ncoeff, - integer *nderiv, - doublereal *valbas, - integer *iercod); - - Standard_EXPORT static int mmmpocur_(integer *ncofmx, - integer *ndim, - integer *ndeg, - doublereal *courbe, - doublereal *tparam, - doublereal *tabval); - - Standard_EXPORT static int mmposui_(integer *dimmat, - integer *nistoc, - integer *aposit, - integer *posuiv, - integer *iercod); - - Standard_EXPORT static int mmresol_(integer *hdimen, - integer *gdimen, - integer *hnstoc, - integer *gnstoc, - integer *mnstoc, - doublereal *matsyh, - doublereal *matsyg, - doublereal *vecsyh, - doublereal *vecsyg, - integer *hposit, - integer *hposui, - integer *gposit, - integer *mmposui, - integer *mposit, - doublereal *vecsol, - integer *iercod); - - Standard_EXPORT static int mmrtptt_(integer *ndglgd, - doublereal *rtlegd); - - Standard_EXPORT static int mmsrre2_(doublereal *tparam, - integer *nbrval, - doublereal *tablev, - doublereal *epsil, - integer *numint, - integer *itypen, - integer *iercod); - - Standard_EXPORT static int mmtrpjj_(integer *ncofmx, - integer *ndimen, - integer *ncoeff, - doublereal *epsi3d, - integer *iordre, - doublereal *crvlgd, - doublereal *ycvmax, - doublereal *errmax, - integer *ncfnew); - - Standard_EXPORT static int mmunivt_(integer *ndimen, - doublereal *vector, - doublereal *vecnrm, - doublereal *epsiln, - integer *iercod); - - Standard_EXPORT static int mmvncol_(integer *ndimen, - doublereal *vecin, - doublereal *vecout, - integer *iercod); - - Standard_EXPORT static doublereal msc_(integer *ndimen, - doublereal *vecte1, - doublereal *vecte2); - - Standard_EXPORT static int mvsheld_(integer *n, - integer *is, - doublereal *dtab, - integer *icle); - - - Standard_EXPORT static int mmarcin_(integer *ndimax, - integer *ndim, - integer *ncoeff, - doublereal *crvold, - doublereal *u0, - doublereal *u1, - doublereal *crvnew, - integer *iercod); - - - Standard_EXPORT static int mmcvinv_(integer *ndimax, - integer *ncoef, - integer *ndim, - doublereal *curveo, - doublereal *curve); - - Standard_EXPORT static int mmjacan_(const integer *ideriv, - integer *ndeg, - doublereal *poljac, - doublereal *polcan); - - Standard_EXPORT static int mmpocrb_(integer *ndimax, - integer *ncoeff, - doublereal *courbe, - integer *ndim, - doublereal *tparam, - doublereal *pntcrb); - - Standard_EXPORT static int mmmrslwd_(integer *normax, - integer *nordre, - integer *ndim, - doublereal *amat, - doublereal *bmat, - doublereal *epspiv, - doublereal *aaux, - doublereal *xmat, - integer *iercod); - - Standard_EXPORT static int mmveps3_(doublereal *eps03); - - Standard_EXPORT static doublereal pow__di (doublereal *x, - integer *n); - - Standard_EXPORT static doublereal mzsnorm_(integer *ndimen, - doublereal *vecteu); + Standard_EXPORT static int mmcglc1_(integer* ndimax, + integer* ndimen, + integer* ncoeff, + doublereal* courbe, + doublereal* tdebut, + doublereal* tfinal, + doublereal* epsiln, + doublereal* xlongc, + doublereal* erreur, + integer* iercod); + + Standard_EXPORT static int mmbulld_(integer* nbcoln, + integer* nblign, + doublereal* dtabtr, + integer* numcle); + + Standard_EXPORT static int mmcdriv_(integer* ndimen, + integer* ncoeff, + doublereal* courbe, + integer* ideriv, + integer* ncofdv, + doublereal* crvdrv); + + Standard_EXPORT static int mmcvctx_(integer* ndimen, + integer* ncofmx, + integer* nderiv, + doublereal* ctrtes, + doublereal* crvres, + doublereal* tabaux, + doublereal* xmatri, + integer* iercod); + + Standard_EXPORT static int mdsptpt_(integer* ndimen, + doublereal* point1, + doublereal* point2, + doublereal* distan); + + Standard_EXPORT static int mmaperx_(integer* ncofmx, + integer* ndimen, + integer* ncoeff, + integer* iordre, + doublereal* crvjac, + integer* ncfnew, + doublereal* ycvmax, + doublereal* errmax, + integer* iercod); + + Standard_EXPORT static int mmdrvck_(integer* ncoeff, + integer* ndimen, + doublereal* courbe, + integer* ideriv, + doublereal* tparam, + doublereal* pntcrb); + + Standard_EXPORT static int mmeps1_(doublereal* epsilo); + + Standard_EXPORT static int mmfmca8_(const integer* ndimen, + const integer* ncoefu, + const integer* ncoefv, + const integer* ndimax, + const integer* ncfumx, + const integer* ncfvmx, + doublereal* tabini, + doublereal* tabres); + + Standard_EXPORT static int mmfmcar_(integer* ndimen, + integer* ncofmx, + integer* ncoefu, + integer* ncoefv, + doublereal* patold, + doublereal* upara1, + doublereal* upara2, + doublereal* vpara1, + doublereal* vpara2, + doublereal* patnew, + integer* iercod); + + Standard_EXPORT static int mmfmtb1_(integer* maxsz1, + doublereal* table1, + integer* isize1, + integer* jsize1, + integer* maxsz2, + doublereal* table2, + integer* isize2, + integer* jsize2, + integer* iercod); + + Standard_EXPORT static int mmgaus1_( + integer* ndimf, + int (*bfunx)(integer* ninteg, + doublereal* parame, + doublereal* vfunj1, + integer* iercod), // mmfunj1_() from Smoothing.cxx + integer* k, + doublereal* xd, + doublereal* xf, + doublereal* saux1, + doublereal* saux2, + doublereal* somme, + integer* niter, + integer* iercod); + + Standard_EXPORT static int mmhjcan_(integer* ndimen, + integer* ncourb, + integer* ncftab, + integer* orcont, + integer* ncflim, + doublereal* tcbold, + doublereal* tdecop, + doublereal* tcbnew, + integer* iercod); + + Standard_EXPORT static int mminltt_(integer* ncolmx, + integer* nlgnmx, + doublereal* tabtri, + integer* nbrcol, + integer* nbrlgn, + doublereal* ajoute, + doublereal* epseg, + integer* iercod); + + Standard_EXPORT static int mmjaccv_(const integer* ncoef, + const integer* ndim, + const integer* ider, + const doublereal* crvlgd, + doublereal* polaux, + doublereal* crvcan); + + Standard_EXPORT static int mmpobas_(doublereal* tparam, + integer* iordre, + integer* ncoeff, + integer* nderiv, + doublereal* valbas, + integer* iercod); + + Standard_EXPORT static int mmmpocur_(integer* ncofmx, + integer* ndim, + integer* ndeg, + doublereal* courbe, + doublereal* tparam, + doublereal* tabval); + + Standard_EXPORT static int mmposui_(integer* dimmat, + integer* nistoc, + integer* aposit, + integer* posuiv, + integer* iercod); + + Standard_EXPORT static int mmresol_(integer* hdimen, + integer* gdimen, + integer* hnstoc, + integer* gnstoc, + integer* mnstoc, + doublereal* matsyh, + doublereal* matsyg, + doublereal* vecsyh, + doublereal* vecsyg, + integer* hposit, + integer* hposui, + integer* gposit, + integer* mmposui, + integer* mposit, + doublereal* vecsol, + integer* iercod); + + Standard_EXPORT static int mmrtptt_(integer* ndglgd, doublereal* rtlegd); + + Standard_EXPORT static int mmsrre2_(doublereal* tparam, + integer* nbrval, + doublereal* tablev, + doublereal* epsil, + integer* numint, + integer* itypen, + integer* iercod); + + Standard_EXPORT static int mmtrpjj_(integer* ncofmx, + integer* ndimen, + integer* ncoeff, + doublereal* epsi3d, + integer* iordre, + doublereal* crvlgd, + doublereal* ycvmax, + doublereal* errmax, + integer* ncfnew); + + Standard_EXPORT static int mmunivt_(integer* ndimen, + doublereal* vector, + doublereal* vecnrm, + doublereal* epsiln, + integer* iercod); + + Standard_EXPORT static int mmvncol_(integer* ndimen, + doublereal* vecin, + doublereal* vecout, + integer* iercod); + + Standard_EXPORT static doublereal msc_(integer* ndimen, doublereal* vecte1, doublereal* vecte2); + + Standard_EXPORT static int mvsheld_(integer* n, integer* is, doublereal* dtab, integer* icle); + + Standard_EXPORT static int mmarcin_(integer* ndimax, + integer* ndim, + integer* ncoeff, + doublereal* crvold, + doublereal* u0, + doublereal* u1, + doublereal* crvnew, + integer* iercod); + + Standard_EXPORT static int mmcvinv_(integer* ndimax, + integer* ncoef, + integer* ndim, + doublereal* curveo, + doublereal* curve); + + Standard_EXPORT static int mmjacan_(const integer* ideriv, + integer* ndeg, + doublereal* poljac, + doublereal* polcan); + + Standard_EXPORT static int mmpocrb_(integer* ndimax, + integer* ncoeff, + doublereal* courbe, + integer* ndim, + doublereal* tparam, + doublereal* pntcrb); + + Standard_EXPORT static int mmmrslwd_(integer* normax, + integer* nordre, + integer* ndim, + doublereal* amat, + doublereal* bmat, + doublereal* epspiv, + doublereal* aaux, + doublereal* xmat, + integer* iercod); + + Standard_EXPORT static int mmveps3_(doublereal* eps03); + + Standard_EXPORT static doublereal pow__di(doublereal* x, integer* n); + + Standard_EXPORT static doublereal mzsnorm_(integer* ndimen, doublereal* vecteu); }; - #endif diff --git a/opencascade/AdvApp2Var_Network.hxx b/opencascade/AdvApp2Var_Network.hxx index 1047bbe8b..ad127ddff 100644 --- a/opencascade/AdvApp2Var_Network.hxx +++ b/opencascade/AdvApp2Var_Network.hxx @@ -26,58 +26,59 @@ #include class AdvApp2Var_Patch; - - -class AdvApp2Var_Network +class AdvApp2Var_Network { public: - DEFINE_STANDARD_ALLOC - Standard_EXPORT AdvApp2Var_Network(); - - Standard_EXPORT AdvApp2Var_Network(const AdvApp2Var_SequenceOfPatch& Net, const TColStd_SequenceOfReal& TheU, const TColStd_SequenceOfReal& TheV); - + + Standard_EXPORT AdvApp2Var_Network(const AdvApp2Var_SequenceOfPatch& Net, + const TColStd_SequenceOfReal& TheU, + const TColStd_SequenceOfReal& TheV); + //! search the Index of the first Patch not approximated, //! if all Patches are approximated Standard_False is returned - Standard_EXPORT Standard_Boolean FirstNotApprox (Standard_Integer& Index) const; - - AdvApp2Var_Patch& ChangePatch (const Standard_Integer Index) { return *myNet.Value(Index); } - AdvApp2Var_Patch& operator() (const Standard_Integer Index) { return ChangePatch(Index); } - - Standard_EXPORT void UpdateInU (const Standard_Real CuttingValue); - - Standard_EXPORT void UpdateInV (const Standard_Real CuttingValue); - - Standard_EXPORT void SameDegree (const Standard_Integer iu, const Standard_Integer iv, Standard_Integer& ncfu, Standard_Integer& ncfv); - + Standard_EXPORT Standard_Boolean FirstNotApprox(Standard_Integer& Index) const; + + AdvApp2Var_Patch& ChangePatch(const Standard_Integer Index) { return *myNet.Value(Index); } + + AdvApp2Var_Patch& operator()(const Standard_Integer Index) { return ChangePatch(Index); } + + Standard_EXPORT void UpdateInU(const Standard_Real CuttingValue); + + Standard_EXPORT void UpdateInV(const Standard_Real CuttingValue); + + Standard_EXPORT void SameDegree(const Standard_Integer iu, + const Standard_Integer iv, + Standard_Integer& ncfu, + Standard_Integer& ncfv); + Standard_EXPORT Standard_Integer NbPatch() const; - + Standard_EXPORT Standard_Integer NbPatchInU() const; - + Standard_EXPORT Standard_Integer NbPatchInV() const; - - Standard_EXPORT Standard_Real UParameter (const Standard_Integer Index) const; - - Standard_EXPORT Standard_Real VParameter (const Standard_Integer Index) const; - const AdvApp2Var_Patch& Patch (const Standard_Integer UIndex, const Standard_Integer VIndex) const + Standard_EXPORT Standard_Real UParameter(const Standard_Integer Index) const; + + Standard_EXPORT Standard_Real VParameter(const Standard_Integer Index) const; + + const AdvApp2Var_Patch& Patch(const Standard_Integer UIndex, const Standard_Integer VIndex) const { - return *myNet.Value ((VIndex-1)*(myUParameters.Length()-1) + UIndex); + return *myNet.Value((VIndex - 1) * (myUParameters.Length() - 1) + UIndex); } - const AdvApp2Var_Patch& operator() (const Standard_Integer UIndex, const Standard_Integer VIndex) const + const AdvApp2Var_Patch& operator()(const Standard_Integer UIndex, + const Standard_Integer VIndex) const { - return Patch(UIndex,VIndex); + return Patch(UIndex, VIndex); } private: - AdvApp2Var_SequenceOfPatch myNet; - TColStd_SequenceOfReal myUParameters; - TColStd_SequenceOfReal myVParameters; - + TColStd_SequenceOfReal myUParameters; + TColStd_SequenceOfReal myVParameters; }; #endif // _AdvApp2Var_Network_HeaderFile diff --git a/opencascade/AdvApp2Var_Node.hxx b/opencascade/AdvApp2Var_Node.hxx index 5722d3d5b..fb4e0f675 100644 --- a/opencascade/AdvApp2Var_Node.hxx +++ b/opencascade/AdvApp2Var_Node.hxx @@ -28,18 +28,19 @@ class AdvApp2Var_Node : public Standard_Transient { DEFINE_STANDARD_RTTIEXT(AdvApp2Var_Node, Standard_Transient) public: - Standard_EXPORT AdvApp2Var_Node(); - + Standard_EXPORT AdvApp2Var_Node(const Standard_Integer iu, const Standard_Integer iv); - - Standard_EXPORT AdvApp2Var_Node(const gp_XY& UV, const Standard_Integer iu, const Standard_Integer iv); + + Standard_EXPORT AdvApp2Var_Node(const gp_XY& UV, + const Standard_Integer iu, + const Standard_Integer iv); //! Returns the coordinates (U,V) of the node const gp_XY& Coord() const { return myCoord; } //! changes the coordinates (U,V) to (x1,x2) - void SetCoord (const Standard_Real x1, const Standard_Real x2) + void SetCoord(const Standard_Real x1, const Standard_Real x2) { myCoord.SetX(x1); myCoord.SetY(x2); @@ -52,49 +53,49 @@ public: Standard_Integer VOrder() const { return myOrdInV; } //! affects the value F(U,V) or its derivates on the node (U,V) - void SetPoint (const Standard_Integer iu, const Standard_Integer iv, const gp_Pnt& Pt) + void SetPoint(const Standard_Integer iu, const Standard_Integer iv, const gp_Pnt& Pt) { myTruePoints.SetValue(iu, iv, Pt); } //! returns the value F(U,V) or its derivates on the node (U,V) - const gp_Pnt& Point (const Standard_Integer iu, const Standard_Integer iv) const + const gp_Pnt& Point(const Standard_Integer iu, const Standard_Integer iv) const { return myTruePoints.Value(iu, iv); } //! affects the error between F(U,V) and its approximation - void SetError (const Standard_Integer iu, const Standard_Integer iv, const Standard_Real error) + void SetError(const Standard_Integer iu, const Standard_Integer iv, const Standard_Real error) { myErrors.SetValue(iu, iv, error); } //! returns the error between F(U,V) and its approximation - Standard_Real Error (const Standard_Integer iu, const Standard_Integer iv) const { return myErrors.Value(iu, iv); } + Standard_Real Error(const Standard_Integer iu, const Standard_Integer iv) const + { + return myErrors.Value(iu, iv); + } //! Assign operator. - AdvApp2Var_Node& operator= (const AdvApp2Var_Node& theOther) + AdvApp2Var_Node& operator=(const AdvApp2Var_Node& theOther) { myTruePoints = theOther.myTruePoints; - myErrors = theOther.myErrors; - myCoord = theOther.myCoord; - myOrdInU = theOther.myOrdInU; - myOrdInV = theOther.myOrdInV; + myErrors = theOther.myErrors; + myCoord = theOther.myCoord; + myOrdInU = theOther.myOrdInU; + myOrdInV = theOther.myOrdInV; return *this; } private: - - AdvApp2Var_Node (const AdvApp2Var_Node& theOther); + AdvApp2Var_Node(const AdvApp2Var_Node& theOther); private: - - TColgp_Array2OfPnt myTruePoints; + TColgp_Array2OfPnt myTruePoints; TColStd_Array2OfReal myErrors; - gp_XY myCoord; - Standard_Integer myOrdInU; - Standard_Integer myOrdInV; - + gp_XY myCoord; + Standard_Integer myOrdInU; + Standard_Integer myOrdInV; }; #endif // _AdvApp2Var_Node_HeaderFile diff --git a/opencascade/AdvApp2Var_Patch.hxx b/opencascade/AdvApp2Var_Patch.hxx index 1afe83be0..b64e6287b 100644 --- a/opencascade/AdvApp2Var_Patch.hxx +++ b/opencascade/AdvApp2Var_Patch.hxx @@ -31,110 +31,115 @@ class AdvApp2Var_Context; class AdvApp2Var_Framework; class AdvApp2Var_Criterion; - - //! used to store results on a domain [Ui,Ui+1]x[Vj,Vj+1] class AdvApp2Var_Patch : public Standard_Transient { DEFINE_STANDARD_RTTIEXT(AdvApp2Var_Patch, Standard_Transient) public: - Standard_EXPORT AdvApp2Var_Patch(); - - Standard_EXPORT AdvApp2Var_Patch(const Standard_Real U0, const Standard_Real U1, const Standard_Real V0, const Standard_Real V1, const Standard_Integer iu, const Standard_Integer iv); - + + Standard_EXPORT AdvApp2Var_Patch(const Standard_Real U0, + const Standard_Real U1, + const Standard_Real V0, + const Standard_Real V1, + const Standard_Integer iu, + const Standard_Integer iv); + Standard_EXPORT Standard_Boolean IsDiscretised() const; - - Standard_EXPORT void Discretise (const AdvApp2Var_Context& Conditions, const AdvApp2Var_Framework& Constraints, const AdvApp2Var_EvaluatorFunc2Var& func); - + + Standard_EXPORT void Discretise(const AdvApp2Var_Context& Conditions, + const AdvApp2Var_Framework& Constraints, + const AdvApp2Var_EvaluatorFunc2Var& func); + Standard_EXPORT Standard_Boolean IsApproximated() const; - + Standard_EXPORT Standard_Boolean HasResult() const; - - Standard_EXPORT void MakeApprox (const AdvApp2Var_Context& Conditions, const AdvApp2Var_Framework& Constraints, const Standard_Integer NumDec); - - Standard_EXPORT void AddConstraints (const AdvApp2Var_Context& Conditions, const AdvApp2Var_Framework& Constraints); - - Standard_EXPORT void AddErrors (const AdvApp2Var_Framework& Constraints); - - Standard_EXPORT void ChangeDomain (const Standard_Real a, const Standard_Real b, const Standard_Real c, const Standard_Real d); - + + Standard_EXPORT void MakeApprox(const AdvApp2Var_Context& Conditions, + const AdvApp2Var_Framework& Constraints, + const Standard_Integer NumDec); + + Standard_EXPORT void AddConstraints(const AdvApp2Var_Context& Conditions, + const AdvApp2Var_Framework& Constraints); + + Standard_EXPORT void AddErrors(const AdvApp2Var_Framework& Constraints); + + Standard_EXPORT void ChangeDomain(const Standard_Real a, + const Standard_Real b, + const Standard_Real c, + const Standard_Real d); + Standard_EXPORT void ResetApprox(); - + Standard_EXPORT void OverwriteApprox(); - + Standard_EXPORT Standard_Real U0() const; - + Standard_EXPORT Standard_Real U1() const; - + Standard_EXPORT Standard_Real V0() const; - + Standard_EXPORT Standard_Real V1() const; - + Standard_EXPORT Standard_Integer UOrder() const; - + Standard_EXPORT Standard_Integer VOrder() const; - + Standard_EXPORT Standard_Integer CutSense() const; - - Standard_EXPORT Standard_Integer CutSense (const AdvApp2Var_Criterion& Crit, const Standard_Integer NumDec) const; - + + Standard_EXPORT Standard_Integer CutSense(const AdvApp2Var_Criterion& Crit, + const Standard_Integer NumDec) const; + Standard_EXPORT Standard_Integer NbCoeffInU() const; - + Standard_EXPORT Standard_Integer NbCoeffInV() const; - - Standard_EXPORT void ChangeNbCoeff (const Standard_Integer NbCoeffU, const Standard_Integer NbCoeffV); - - Standard_EXPORT Handle(TColgp_HArray2OfPnt) Poles (const Standard_Integer SSPIndex, const AdvApp2Var_Context& Conditions) const; - - Standard_EXPORT Handle(TColStd_HArray1OfReal) Coefficients (const Standard_Integer SSPIndex, const AdvApp2Var_Context& Conditions) const; - + + Standard_EXPORT void ChangeNbCoeff(const Standard_Integer NbCoeffU, + const Standard_Integer NbCoeffV); + + Standard_EXPORT Handle(TColgp_HArray2OfPnt) Poles(const Standard_Integer SSPIndex, + const AdvApp2Var_Context& Conditions) const; + + Standard_EXPORT Handle(TColStd_HArray1OfReal) Coefficients( + const Standard_Integer SSPIndex, + const AdvApp2Var_Context& Conditions) const; + Standard_EXPORT Handle(TColStd_HArray1OfReal) MaxErrors() const; - + Standard_EXPORT Handle(TColStd_HArray1OfReal) AverageErrors() const; - + Standard_EXPORT Handle(TColStd_HArray2OfReal) IsoErrors() const; - + Standard_EXPORT Standard_Real CritValue() const; - - Standard_EXPORT void SetCritValue (const Standard_Real dist); -private: + Standard_EXPORT void SetCritValue(const Standard_Real dist); +private: AdvApp2Var_Patch(const AdvApp2Var_Patch& P); - AdvApp2Var_Patch& operator= (const AdvApp2Var_Patch& theOther); + AdvApp2Var_Patch& operator=(const AdvApp2Var_Patch& theOther); private: - - Standard_Real myU0; - Standard_Real myU1; - Standard_Real myV0; - Standard_Real myV1; - Standard_Integer myOrdInU; - Standard_Integer myOrdInV; - Standard_Integer myNbCoeffInU; - Standard_Integer myNbCoeffInV; - Standard_Boolean myApprIsDone; - Standard_Boolean myHasResult; + Standard_Real myU0; + Standard_Real myU1; + Standard_Real myV0; + Standard_Real myV1; + Standard_Integer myOrdInU; + Standard_Integer myOrdInV; + Standard_Integer myNbCoeffInU; + Standard_Integer myNbCoeffInV; + Standard_Boolean myApprIsDone; + Standard_Boolean myHasResult; Handle(TColStd_HArray1OfReal) myEquation; Handle(TColStd_HArray1OfReal) myMaxErrors; Handle(TColStd_HArray1OfReal) myMoyErrors; Handle(TColStd_HArray2OfReal) myIsoErrors; - Standard_Integer myCutSense; - Standard_Boolean myDiscIsDone; + Standard_Integer myCutSense; + Standard_Boolean myDiscIsDone; Handle(TColStd_HArray1OfReal) mySosoTab; Handle(TColStd_HArray1OfReal) myDisoTab; Handle(TColStd_HArray1OfReal) mySodiTab; Handle(TColStd_HArray1OfReal) myDidiTab; - Standard_Real myCritValue; - - + Standard_Real myCritValue; }; - - - - - - #endif // _AdvApp2Var_Patch_HeaderFile diff --git a/opencascade/AdvApp2Var_SequenceOfPatch.hxx b/opencascade/AdvApp2Var_SequenceOfPatch.hxx index f78064814..23a34c051 100644 --- a/opencascade/AdvApp2Var_SequenceOfPatch.hxx +++ b/opencascade/AdvApp2Var_SequenceOfPatch.hxx @@ -22,5 +22,4 @@ typedef NCollection_Sequence AdvApp2Var_SequenceOfPatch; - #endif diff --git a/opencascade/AdvApp2Var_SequenceOfStrip.hxx b/opencascade/AdvApp2Var_SequenceOfStrip.hxx index 69eea3607..5ee651128 100644 --- a/opencascade/AdvApp2Var_SequenceOfStrip.hxx +++ b/opencascade/AdvApp2Var_SequenceOfStrip.hxx @@ -22,5 +22,4 @@ typedef NCollection_Sequence AdvApp2Var_SequenceOfStrip; - #endif diff --git a/opencascade/AdvApp2Var_SysBase.hxx b/opencascade/AdvApp2Var_SysBase.hxx index 8cf12ccfb..31ed6931f 100644 --- a/opencascade/AdvApp2Var_SysBase.hxx +++ b/opencascade/AdvApp2Var_SysBase.hxx @@ -18,85 +18,70 @@ #include #include -class AdvApp2Var_SysBase { - public: +class AdvApp2Var_SysBase +{ +public: Standard_EXPORT AdvApp2Var_SysBase(); Standard_EXPORT ~AdvApp2Var_SysBase(); - + // Standard_EXPORT int mainial_(); - Standard_EXPORT static int macinit_(int *, - int *); + Standard_EXPORT static int macinit_(int*, int*); // - Standard_EXPORT int mcrdelt_(integer *iunit, - integer *isize, - void *t, - intptr_t *iofset, - integer *iercod); - - Standard_EXPORT static int mcrfill_(integer *size, - void *tin, - void *tout); - - Standard_EXPORT int mcrrqst_(integer *iunit, - integer *isize, - void *t, - intptr_t *iofset, - integer *iercod); + Standard_EXPORT int mcrdelt_(integer* iunit, + integer* isize, + void* t, + intptr_t* iofset, + integer* iercod); + + Standard_EXPORT static int mcrfill_(integer* size, void* tin, void* tout); + + Standard_EXPORT int mcrrqst_(integer* iunit, + integer* isize, + void* t, + intptr_t* iofset, + integer* iercod); Standard_EXPORT static integer mnfndeb_(); - Standard_EXPORT static int do__fio(); - Standard_EXPORT static int do__lio (); - Standard_EXPORT int macrai4_(integer *nbelem, - integer *maxelm, - integer *itablo, - intptr_t *iofset, - integer *iercod); - Standard_EXPORT int macrar8_(integer *nbelem, - integer *maxelm, - doublereal *xtablo, - intptr_t *iofset, - integer *iercod); - Standard_EXPORT int macrdi4_(integer *nbelem, - integer *maxelm, - integer *itablo, - intptr_t *iofset, - integer *iercod); - - Standard_EXPORT int macrdr8_(integer *nbelem, - integer *maxelm, - doublereal *xtablo, - intptr_t *iofset, - integer *iercod); - Standard_EXPORT static int maermsg_(const char *cnompg, - integer *icoder, - ftnlen cnompg_len); - Standard_EXPORT static int maitbr8_(integer *itaill, - doublereal *xtab, - doublereal *xval); - Standard_EXPORT static int maovsr8_(integer *ivalcs); - Standard_EXPORT static int mgenmsg_(const char *nomprg, - ftnlen nomprg_len); - - Standard_EXPORT static int mgsomsg_(const char *nomprg, - ftnlen nomprg_len); - Standard_EXPORT static void miraz_(integer *taille, - void *adt); - Standard_EXPORT static int msifill_(integer *nbintg, - integer *ivecin, - integer *ivecou); - Standard_EXPORT static int msrfill_(integer *nbreel, - doublereal *vecent, - doublereal * vecsor); - Standard_EXPORT static int mswrdbg_(const char *ctexte, - ftnlen ctexte_len); - Standard_EXPORT static void mvriraz_(integer *taille, - void*adt); - + Standard_EXPORT static int do__fio(); + Standard_EXPORT static int do__lio(); + Standard_EXPORT int macrai4_(integer* nbelem, + integer* maxelm, + integer* itablo, + intptr_t* iofset, + integer* iercod); + Standard_EXPORT int macrar8_(integer* nbelem, + integer* maxelm, + doublereal* xtablo, + intptr_t* iofset, + integer* iercod); + Standard_EXPORT int macrdi4_(integer* nbelem, + integer* maxelm, + integer* itablo, + intptr_t* iofset, + integer* iercod); + + Standard_EXPORT int macrdr8_(integer* nbelem, + integer* maxelm, + doublereal* xtablo, + intptr_t* iofset, + integer* iercod); + Standard_EXPORT static int maermsg_(const char* cnompg, integer* icoder, ftnlen cnompg_len); + Standard_EXPORT static int maitbr8_(integer* itaill, doublereal* xtab, doublereal* xval); + Standard_EXPORT static int maovsr8_(integer* ivalcs); + Standard_EXPORT static int mgenmsg_(const char* nomprg, ftnlen nomprg_len); + + Standard_EXPORT static int mgsomsg_(const char* nomprg, ftnlen nomprg_len); + Standard_EXPORT static void miraz_(integer* taille, void* adt); + Standard_EXPORT static int msifill_(integer* nbintg, integer* ivecin, integer* ivecou); + Standard_EXPORT static int msrfill_(integer* nbreel, doublereal* vecent, doublereal* vecsor); + Standard_EXPORT static int mswrdbg_(const char* ctexte, ftnlen ctexte_len); + Standard_EXPORT static void mvriraz_(integer* taille, void* adt); + private: int macrchk_(); - int mcrlist_(integer *ier) const; + int mcrlist_(integer* ier) const; /* Maximum number of allowed allocation requests. Currently the maximum known number of requests is 7 - see @@ -106,12 +91,13 @@ private: tolerable when used for static memory. */ static const int MAX_ALLOC_NB = 32; - - enum { + + enum + { static_allocation = 0, /* indicates static allocation, currently not used */ heap_allocation = 1 /* indicates heap allocation */ }; - + /* Describes an individual memory allocation request. See format description in the AdvApp2Var_SysBase.cxx. The field order is preserved and the sizes are chosen to minimize @@ -121,25 +107,27 @@ private: No initialization constructor should be provided to avoid wasting time when allocating a field mcrgene_. */ - struct mitem { - unsigned char prot; - unsigned char unit; //unit of allocation: 1, 2, 4 or 8 - integer reqsize; - intptr_t loc; - intptr_t offset; - unsigned char alloctype; // static_allocation or heap_allocation - integer size; - intptr_t addr; - integer userzone; //not used - intptr_t startaddr; - intptr_t endaddr; - integer rank; + struct mitem + { + unsigned char prot; + unsigned char unit; // unit of allocation: 1, 2, 4 or 8 + integer reqsize; + intptr_t loc; + intptr_t offset; + unsigned char alloctype; // static_allocation or heap_allocation + integer size; + intptr_t addr; + integer userzone; // not used + intptr_t startaddr; + intptr_t endaddr; + integer rank; }; - - struct { - mitem icore[MAX_ALLOC_NB]; - integer ncore; - unsigned char lprot; + + struct + { + mitem icore[MAX_ALLOC_NB]; + integer ncore; + unsigned char lprot; } mcrgene_; /* Contains statistics on allocation requests. @@ -149,9 +137,10 @@ private: nbyte - current number of allocated bytes; mbyte - maximum number of ever allocated bytes. */ - struct { + struct + { integer nrqst[2], ndelt[2], nbyte[2], mbyte[2]; - } mcrstac_; + } mcrstac_; }; #endif diff --git a/opencascade/AdvApprox_ApproxAFunction.hxx b/opencascade/AdvApprox_ApproxAFunction.hxx index 245cc01b0..aeb5c427d 100644 --- a/opencascade/AdvApprox_ApproxAFunction.hxx +++ b/opencascade/AdvApprox_ApproxAFunction.hxx @@ -38,16 +38,12 @@ #include class AdvApprox_Cutting; - - //! this approximate a given function -class AdvApprox_ApproxAFunction +class AdvApprox_ApproxAFunction { public: - DEFINE_STANDARD_ALLOC - //! Constructs approximator tool. //! //! Warning: @@ -67,109 +63,138 @@ public: //! the nth entry described by Num3DSS //! The same type of schema applies to the Poles1d, Poles2d and //! Poles. - Standard_EXPORT AdvApprox_ApproxAFunction(const Standard_Integer Num1DSS, const Standard_Integer Num2DSS, const Standard_Integer Num3DSS, const Handle(TColStd_HArray1OfReal)& OneDTol, const Handle(TColStd_HArray1OfReal)& TwoDTol, const Handle(TColStd_HArray1OfReal)& ThreeDTol, const Standard_Real First, const Standard_Real Last, const GeomAbs_Shape Continuity, const Standard_Integer MaxDeg, const Standard_Integer MaxSeg, const AdvApprox_EvaluatorFunction& Func); - + Standard_EXPORT AdvApprox_ApproxAFunction(const Standard_Integer Num1DSS, + const Standard_Integer Num2DSS, + const Standard_Integer Num3DSS, + const Handle(TColStd_HArray1OfReal)& OneDTol, + const Handle(TColStd_HArray1OfReal)& TwoDTol, + const Handle(TColStd_HArray1OfReal)& ThreeDTol, + const Standard_Real First, + const Standard_Real Last, + const GeomAbs_Shape Continuity, + const Standard_Integer MaxDeg, + const Standard_Integer MaxSeg, + const AdvApprox_EvaluatorFunction& Func); + //! Approximation with user methode of cutting - Standard_EXPORT AdvApprox_ApproxAFunction(const Standard_Integer Num1DSS, const Standard_Integer Num2DSS, const Standard_Integer Num3DSS, const Handle(TColStd_HArray1OfReal)& OneDTol, const Handle(TColStd_HArray1OfReal)& TwoDTol, const Handle(TColStd_HArray1OfReal)& ThreeDTol, const Standard_Real First, const Standard_Real Last, const GeomAbs_Shape Continuity, const Standard_Integer MaxDeg, const Standard_Integer MaxSeg, const AdvApprox_EvaluatorFunction& Func, const AdvApprox_Cutting& CutTool); - - Standard_EXPORT static void Approximation (const Standard_Integer TotalDimension, const Standard_Integer TotalNumSS, const TColStd_Array1OfInteger& LocalDimension, const Standard_Real First, const Standard_Real Last, AdvApprox_EvaluatorFunction& Evaluator, const AdvApprox_Cutting& CutTool, const Standard_Integer ContinuityOrder, const Standard_Integer NumMaxCoeffs, const Standard_Integer MaxSegments, const TColStd_Array1OfReal& TolerancesArray, const Standard_Integer code_precis, Standard_Integer& NumCurves, TColStd_Array1OfInteger& NumCoeffPerCurveArray, TColStd_Array1OfReal& LocalCoefficientArray, TColStd_Array1OfReal& IntervalsArray, TColStd_Array1OfReal& ErrorMaxArray, TColStd_Array1OfReal& AverageErrorArray, Standard_Integer& ErrorCode); - - Standard_Boolean IsDone() const; - - Standard_Boolean HasResult() const; - + Standard_EXPORT AdvApprox_ApproxAFunction(const Standard_Integer Num1DSS, + const Standard_Integer Num2DSS, + const Standard_Integer Num3DSS, + const Handle(TColStd_HArray1OfReal)& OneDTol, + const Handle(TColStd_HArray1OfReal)& TwoDTol, + const Handle(TColStd_HArray1OfReal)& ThreeDTol, + const Standard_Real First, + const Standard_Real Last, + const GeomAbs_Shape Continuity, + const Standard_Integer MaxDeg, + const Standard_Integer MaxSeg, + const AdvApprox_EvaluatorFunction& Func, + const AdvApprox_Cutting& CutTool); + + Standard_EXPORT static void Approximation(const Standard_Integer TotalDimension, + const Standard_Integer TotalNumSS, + const TColStd_Array1OfInteger& LocalDimension, + const Standard_Real First, + const Standard_Real Last, + AdvApprox_EvaluatorFunction& Evaluator, + const AdvApprox_Cutting& CutTool, + const Standard_Integer ContinuityOrder, + const Standard_Integer NumMaxCoeffs, + const Standard_Integer MaxSegments, + const TColStd_Array1OfReal& TolerancesArray, + const Standard_Integer code_precis, + Standard_Integer& NumCurves, + TColStd_Array1OfInteger& NumCoeffPerCurveArray, + TColStd_Array1OfReal& LocalCoefficientArray, + TColStd_Array1OfReal& IntervalsArray, + TColStd_Array1OfReal& ErrorMaxArray, + TColStd_Array1OfReal& AverageErrorArray, + Standard_Integer& ErrorCode); + + Standard_Boolean IsDone() const; + + Standard_Boolean HasResult() const; + //! returns the poles from the algorithms as is - Handle(TColStd_HArray2OfReal) Poles1d() const; - + Handle(TColStd_HArray2OfReal) Poles1d() const; + //! returns the poles from the algorithms as is - Handle(TColgp_HArray2OfPnt2d) Poles2d() const; - + Handle(TColgp_HArray2OfPnt2d) Poles2d() const; + //! -- returns the poles from the algorithms as is - Handle(TColgp_HArray2OfPnt) Poles() const; - + Handle(TColgp_HArray2OfPnt) Poles() const; + //! as the name says Standard_EXPORT Standard_Integer NbPoles() const; - + //! returns the poles at Index from the 1d subspace - Standard_EXPORT void Poles1d (const Standard_Integer Index, TColStd_Array1OfReal& P) const; - + Standard_EXPORT void Poles1d(const Standard_Integer Index, TColStd_Array1OfReal& P) const; + //! returns the poles at Index from the 2d subspace - Standard_EXPORT void Poles2d (const Standard_Integer Index, TColgp_Array1OfPnt2d& P) const; - + Standard_EXPORT void Poles2d(const Standard_Integer Index, TColgp_Array1OfPnt2d& P) const; + //! returns the poles at Index from the 3d subspace - Standard_EXPORT void Poles (const Standard_Integer Index, TColgp_Array1OfPnt& P) const; - - Standard_Integer Degree() const; - - Standard_Integer NbKnots() const; - - Standard_Integer NumSubSpaces (const Standard_Integer Dimension) const; - - Handle(TColStd_HArray1OfReal) Knots() const; - - Handle(TColStd_HArray1OfInteger) Multiplicities() const; - - //! returns the error as is in the algorithms - Standard_EXPORT Handle(TColStd_HArray1OfReal) MaxError (const Standard_Integer Dimension) const; - - //! returns the error as is in the algorithms - Standard_EXPORT Handle(TColStd_HArray1OfReal) AverageError (const Standard_Integer Dimension) const; - - Standard_EXPORT Standard_Real MaxError (const Standard_Integer Dimension, const Standard_Integer Index) const; - - Standard_EXPORT Standard_Real AverageError (const Standard_Integer Dimension, const Standard_Integer Index) const; - - //! display information on approximation. - Standard_EXPORT void Dump (Standard_OStream& o) const; + Standard_EXPORT void Poles(const Standard_Integer Index, TColgp_Array1OfPnt& P) const; + Standard_Integer Degree() const; + Standard_Integer NbKnots() const; + Standard_Integer NumSubSpaces(const Standard_Integer Dimension) const; -protected: + Handle(TColStd_HArray1OfReal) Knots() const; + Handle(TColStd_HArray1OfInteger) Multiplicities() const; + //! returns the error as is in the algorithms + Standard_EXPORT Handle(TColStd_HArray1OfReal) MaxError(const Standard_Integer Dimension) const; + //! returns the error as is in the algorithms + Standard_EXPORT Handle(TColStd_HArray1OfReal) AverageError( + const Standard_Integer Dimension) const; + Standard_EXPORT Standard_Real MaxError(const Standard_Integer Dimension, + const Standard_Integer Index) const; -private: - - - Standard_EXPORT void Perform (const Standard_Integer Num1DSS, const Standard_Integer Num2DSS, const Standard_Integer Num3DSS, const AdvApprox_Cutting& CutTool); - - - Standard_Integer myNumSubSpaces[3]; - Handle(TColStd_HArray1OfReal) my1DTolerances; - Handle(TColStd_HArray1OfReal) my2DTolerances; - Handle(TColStd_HArray1OfReal) my3DTolerances; - Standard_Real myFirst; - Standard_Real myLast; - GeomAbs_Shape myContinuity; - Standard_Integer myMaxDegree; - Standard_Integer myMaxSegments; - Standard_Boolean myDone; - Standard_Boolean myHasResult; - Handle(TColStd_HArray2OfReal) my1DPoles; - Handle(TColgp_HArray2OfPnt2d) my2DPoles; - Handle(TColgp_HArray2OfPnt) my3DPoles; - Handle(TColStd_HArray1OfReal) myKnots; - Handle(TColStd_HArray1OfInteger) myMults; - Standard_Integer myDegree; - Standard_Address myEvaluator; - Handle(TColStd_HArray1OfReal) my1DMaxError; - Handle(TColStd_HArray1OfReal) my1DAverageError; - Handle(TColStd_HArray1OfReal) my2DMaxError; - Handle(TColStd_HArray1OfReal) my2DAverageError; - Handle(TColStd_HArray1OfReal) my3DMaxError; - Handle(TColStd_HArray1OfReal) my3DAverageError; + Standard_EXPORT Standard_Real AverageError(const Standard_Integer Dimension, + const Standard_Integer Index) const; + //! display information on approximation. + Standard_EXPORT void Dump(Standard_OStream& o) const; +protected: +private: + Standard_EXPORT void Perform(const Standard_Integer Num1DSS, + const Standard_Integer Num2DSS, + const Standard_Integer Num3DSS, + const AdvApprox_Cutting& CutTool); + + Standard_Integer myNumSubSpaces[3]; + Handle(TColStd_HArray1OfReal) my1DTolerances; + Handle(TColStd_HArray1OfReal) my2DTolerances; + Handle(TColStd_HArray1OfReal) my3DTolerances; + Standard_Real myFirst; + Standard_Real myLast; + GeomAbs_Shape myContinuity; + Standard_Integer myMaxDegree; + Standard_Integer myMaxSegments; + Standard_Boolean myDone; + Standard_Boolean myHasResult; + Handle(TColStd_HArray2OfReal) my1DPoles; + Handle(TColgp_HArray2OfPnt2d) my2DPoles; + Handle(TColgp_HArray2OfPnt) my3DPoles; + Handle(TColStd_HArray1OfReal) myKnots; + Handle(TColStd_HArray1OfInteger) myMults; + Standard_Integer myDegree; + Standard_Address myEvaluator; + Handle(TColStd_HArray1OfReal) my1DMaxError; + Handle(TColStd_HArray1OfReal) my1DAverageError; + Handle(TColStd_HArray1OfReal) my2DMaxError; + Handle(TColStd_HArray1OfReal) my2DAverageError; + Handle(TColStd_HArray1OfReal) my3DMaxError; + Handle(TColStd_HArray1OfReal) my3DAverageError; }; - #include - - - - #endif // _AdvApprox_ApproxAFunction_HeaderFile diff --git a/opencascade/AdvApprox_ApproxAFunction.lxx b/opencascade/AdvApprox_ApproxAFunction.lxx index 70f5757e7..cc6223345 100644 --- a/opencascade/AdvApprox_ApproxAFunction.lxx +++ b/opencascade/AdvApprox_ApproxAFunction.lxx @@ -17,78 +17,105 @@ #include #include #include + //======================================================================= -//function : IsDone -//purpose : +// function : IsDone +// purpose : //======================================================================= -inline Standard_Boolean AdvApprox_ApproxAFunction::HasResult() const -{ return myHasResult ; } +inline Standard_Boolean AdvApprox_ApproxAFunction::HasResult() const +{ + return myHasResult; +} + //======================================================================= -//function : IsDone -//purpose : +// function : IsDone +// purpose : //======================================================================= -inline Standard_Boolean AdvApprox_ApproxAFunction::IsDone() const -{ return myDone ; } +inline Standard_Boolean AdvApprox_ApproxAFunction::IsDone() const +{ + return myDone; +} + //======================================================================= -//function : Poles1d -//purpose : +// function : Poles1d +// purpose : //======================================================================= -inline Handle(TColStd_HArray2OfReal) AdvApprox_ApproxAFunction::Poles1d() - const -{ return my1DPoles ; } +inline Handle(TColStd_HArray2OfReal) AdvApprox_ApproxAFunction::Poles1d() const +{ + return my1DPoles; +} + //======================================================================= -//function : Poles2d -//purpose : +// function : Poles2d +// purpose : //======================================================================= -inline Handle(TColgp_HArray2OfPnt2d) AdvApprox_ApproxAFunction::Poles2d() - const -{ return my2DPoles ; } +inline Handle(TColgp_HArray2OfPnt2d) AdvApprox_ApproxAFunction::Poles2d() const +{ + return my2DPoles; +} + //======================================================================= -//function : Poles -//purpose : +// function : Poles +// purpose : //======================================================================= -inline Handle(TColgp_HArray2OfPnt) AdvApprox_ApproxAFunction::Poles() - const -{ return my3DPoles ; } +inline Handle(TColgp_HArray2OfPnt) AdvApprox_ApproxAFunction::Poles() const +{ + return my3DPoles; +} + //======================================================================= -//function : Degree -//purpose : +// function : Degree +// purpose : //======================================================================= inline Standard_Integer AdvApprox_ApproxAFunction::Degree() const -{ return myDegree ; } +{ + return myDegree; +} + //======================================================================= -//function : NbKnots -//purpose : +// function : NbKnots +// purpose : //======================================================================= inline Standard_Integer AdvApprox_ApproxAFunction::NbKnots() const -{ return myKnots->Length() ; } +{ + return myKnots->Length(); +} + //======================================================================= -//function : Knots -//purpose : +// function : Knots +// purpose : //======================================================================= -inline Handle(TColStd_HArray1OfReal) AdvApprox_ApproxAFunction::Knots() const - -{ return myKnots ; } +inline Handle(TColStd_HArray1OfReal) AdvApprox_ApproxAFunction::Knots() const + +{ + return myKnots; +} + //======================================================================= -//function : Multiplicities -//purpose : +// function : Multiplicities +// purpose : //======================================================================= -inline Handle(TColStd_HArray1OfInteger) -AdvApprox_ApproxAFunction::Multiplicities() const +inline Handle(TColStd_HArray1OfInteger) AdvApprox_ApproxAFunction::Multiplicities() const -{ return myMults ;} +{ + return myMults; +} //======================================================================= -//function : NumSubSpaces -//purpose : +// function : NumSubSpaces +// purpose : //======================================================================= -inline Standard_Integer AdvApprox_ApproxAFunction::NumSubSpaces(const Standard_Integer Dimension) const -{ if (Dimension < 1 || Dimension > 3) throw Standard_ConstructionError() ; - return myNumSubSpaces[Dimension-1] ; } +inline Standard_Integer AdvApprox_ApproxAFunction::NumSubSpaces( + const Standard_Integer Dimension) const +{ + if (Dimension < 1 || Dimension > 3) + throw Standard_ConstructionError(); + return myNumSubSpaces[Dimension - 1]; +} diff --git a/opencascade/AdvApprox_Cutting.hxx b/opencascade/AdvApprox_Cutting.hxx index c6e2c1780..2ff9dbefc 100644 --- a/opencascade/AdvApprox_Cutting.hxx +++ b/opencascade/AdvApprox_Cutting.hxx @@ -24,24 +24,17 @@ #include #include - //! to choose the way of cutting in approximation -class AdvApprox_Cutting +class AdvApprox_Cutting { public: - DEFINE_STANDARD_ALLOC Standard_EXPORT virtual ~AdvApprox_Cutting(); - - Standard_EXPORT virtual Standard_Boolean Value (const Standard_Real a, const Standard_Real b, Standard_Real& cuttingvalue) const = 0; + Standard_EXPORT virtual Standard_Boolean Value(const Standard_Real a, + const Standard_Real b, + Standard_Real& cuttingvalue) const = 0; }; - - - - - - #endif // _AdvApprox_Cutting_HeaderFile diff --git a/opencascade/AdvApprox_DichoCutting.hxx b/opencascade/AdvApprox_DichoCutting.hxx index e987e812c..74d733fed 100644 --- a/opencascade/AdvApprox_DichoCutting.hxx +++ b/opencascade/AdvApprox_DichoCutting.hxx @@ -25,41 +25,21 @@ #include #include - - //! if Cutting is necessary in [a,b], we cut at (a+b) / 2. -class AdvApprox_DichoCutting : public AdvApprox_Cutting +class AdvApprox_DichoCutting : public AdvApprox_Cutting { public: - DEFINE_STANDARD_ALLOC - Standard_EXPORT AdvApprox_DichoCutting(); - - Standard_EXPORT virtual Standard_Boolean Value (const Standard_Real a, const Standard_Real b, Standard_Real& cuttingvalue) const Standard_OVERRIDE; - - + Standard_EXPORT virtual Standard_Boolean Value(const Standard_Real a, + const Standard_Real b, + Standard_Real& cuttingvalue) const + Standard_OVERRIDE; protected: - - - - - private: - - - - - }; - - - - - - #endif // _AdvApprox_DichoCutting_HeaderFile diff --git a/opencascade/AdvApprox_EvaluatorFunction.hxx b/opencascade/AdvApprox_EvaluatorFunction.hxx index 3394a2cd4..d35a52dca 100644 --- a/opencascade/AdvApprox_EvaluatorFunction.hxx +++ b/opencascade/AdvApprox_EvaluatorFunction.hxx @@ -24,40 +24,40 @@ //! Interface for a class implementing a function to be approximated //! by AdvApprox_ApproxAFunction -class AdvApprox_EvaluatorFunction +class AdvApprox_EvaluatorFunction { - public: - +public: //! Empty constructor - AdvApprox_EvaluatorFunction () {} - + AdvApprox_EvaluatorFunction() {} + //! Destructor should be declared as virtual - virtual ~AdvApprox_EvaluatorFunction () {} - + virtual ~AdvApprox_EvaluatorFunction() {} + //! Function evaluation method to be defined by descendant - virtual void Evaluate (Standard_Integer *Dimension, - Standard_Real StartEnd[2], - Standard_Real *Parameter, - Standard_Integer *DerivativeRequest, - Standard_Real *Result, // [Dimension] - Standard_Integer *ErrorCode) = 0; + virtual void Evaluate(Standard_Integer* Dimension, + Standard_Real StartEnd[2], + Standard_Real* Parameter, + Standard_Integer* DerivativeRequest, + Standard_Real* Result, // [Dimension] + Standard_Integer* ErrorCode) = 0; //! Shortcut for function-call style usage - void operator () (Standard_Integer *Dimension, - Standard_Real StartEnd[2], - Standard_Real *Parameter, - Standard_Integer *DerivativeRequest, - Standard_Real *Result, // [Dimension] - Standard_Integer *ErrorCode) - { Evaluate (Dimension, StartEnd, Parameter, DerivativeRequest, Result, ErrorCode); } - - private: - + void operator()(Standard_Integer* Dimension, + Standard_Real StartEnd[2], + Standard_Real* Parameter, + Standard_Integer* DerivativeRequest, + Standard_Real* Result, // [Dimension] + Standard_Integer* ErrorCode) + { + Evaluate(Dimension, StartEnd, Parameter, DerivativeRequest, Result, ErrorCode); + } + +private: //! Copy constructor is declared private to forbid copying - AdvApprox_EvaluatorFunction (const AdvApprox_EvaluatorFunction&) {} + AdvApprox_EvaluatorFunction(const AdvApprox_EvaluatorFunction&) {} //! Assignment operator is declared private to forbid copying - void operator = (const AdvApprox_EvaluatorFunction&) {} + void operator=(const AdvApprox_EvaluatorFunction&) {} }; #endif diff --git a/opencascade/AdvApprox_PrefAndRec.hxx b/opencascade/AdvApprox_PrefAndRec.hxx index baf0aebc3..95978f76e 100644 --- a/opencascade/AdvApprox_PrefAndRec.hxx +++ b/opencascade/AdvApprox_PrefAndRec.hxx @@ -25,20 +25,17 @@ #include #include - - //! inherits class Cutting; contains a list of preferential points (pi)i //! and a list of Recommended points used in cutting management. //! if Cutting is necessary in [a,b], we cut at the di nearest from (a+b)/2 -class AdvApprox_PrefAndRec : public AdvApprox_Cutting +class AdvApprox_PrefAndRec : public AdvApprox_Cutting { public: - DEFINE_STANDARD_ALLOC - - Standard_EXPORT AdvApprox_PrefAndRec(const TColStd_Array1OfReal& RecomendedCut, const TColStd_Array1OfReal& PrefferedCut, const Standard_Real Weight = 5); - + Standard_EXPORT AdvApprox_PrefAndRec(const TColStd_Array1OfReal& RecomendedCut, + const TColStd_Array1OfReal& PrefferedCut, + const Standard_Real Weight = 5); //! cuting value is //! - the recommended point nerest of (a+b)/2 @@ -46,32 +43,16 @@ public: //! - the preferential point nearest of (a+b) / 2 //! if pi is in ](r*a+b)/(r+1) , (a+r*b)/(r+1)[ where r = Weight //! - or (a+b)/2 else. - Standard_EXPORT virtual Standard_Boolean Value (const Standard_Real a, const Standard_Real b, Standard_Real& cuttingvalue) const Standard_OVERRIDE; - - - + Standard_EXPORT virtual Standard_Boolean Value(const Standard_Real a, + const Standard_Real b, + Standard_Real& cuttingvalue) const + Standard_OVERRIDE; protected: - - - - - private: - - - TColStd_Array1OfReal myRecCutting; TColStd_Array1OfReal myPrefCutting; - Standard_Real myWeight; - - + Standard_Real myWeight; }; - - - - - - #endif // _AdvApprox_PrefAndRec_HeaderFile diff --git a/opencascade/AdvApprox_PrefCutting.hxx b/opencascade/AdvApprox_PrefCutting.hxx index de5661820..9fbcf2818 100644 --- a/opencascade/AdvApprox_PrefCutting.hxx +++ b/opencascade/AdvApprox_PrefCutting.hxx @@ -25,42 +25,23 @@ #include #include - //! inherits class Cutting; contains a list of preferential points (di)i //! if Cutting is necessary in [a,b], we cut at the di nearest from (a+b)/2. -class AdvApprox_PrefCutting : public AdvApprox_Cutting +class AdvApprox_PrefCutting : public AdvApprox_Cutting { public: - DEFINE_STANDARD_ALLOC - Standard_EXPORT AdvApprox_PrefCutting(const TColStd_Array1OfReal& CutPnts); - - Standard_EXPORT virtual Standard_Boolean Value (const Standard_Real a, const Standard_Real b, Standard_Real& cuttingvalue) const Standard_OVERRIDE; - - + Standard_EXPORT virtual Standard_Boolean Value(const Standard_Real a, + const Standard_Real b, + Standard_Real& cuttingvalue) const + Standard_OVERRIDE; protected: - - - - - private: - - - TColStd_Array1OfReal myPntOfCutting; - - }; - - - - - - #endif // _AdvApprox_PrefCutting_HeaderFile diff --git a/opencascade/AdvApprox_SimpleApprox.hxx b/opencascade/AdvApprox_SimpleApprox.hxx index fc014b203..8cfaa4173 100644 --- a/opencascade/AdvApprox_SimpleApprox.hxx +++ b/opencascade/AdvApprox_SimpleApprox.hxx @@ -31,76 +31,72 @@ #include class PLib_JacobiPolynomial; - -//! Approximate a function on an intervall [First,Last] +//! Approximate a function on an interval [First,Last] //! The result is a simple polynomial whose degree is as low as //! possible to satisfy the required tolerance and the //! maximum degree. The maximum error and the averrage error //! resulting from approximating the function by the polynomial are computed -class AdvApprox_SimpleApprox +class AdvApprox_SimpleApprox { public: - DEFINE_STANDARD_ALLOC - - Standard_EXPORT AdvApprox_SimpleApprox(const Standard_Integer TotalDimension, const Standard_Integer TotalNumSS, const GeomAbs_Shape Continuity, const Standard_Integer WorkDegree, const Standard_Integer NbGaussPoints, const Handle(PLib_JacobiPolynomial)& JacobiBase, const AdvApprox_EvaluatorFunction& Func); - + Standard_EXPORT AdvApprox_SimpleApprox(const Standard_Integer TotalDimension, + const Standard_Integer TotalNumSS, + const GeomAbs_Shape Continuity, + const Standard_Integer WorkDegree, + const Standard_Integer NbGaussPoints, + const Handle(PLib_JacobiPolynomial)& JacobiBase, + const AdvApprox_EvaluatorFunction& Func); + //! Constructs approximator tool. //! //! Warning: //! the Func should be valid reference to object of type //! inherited from class EvaluatorFunction from Approx //! with life time longer than that of the approximator tool; - Standard_EXPORT void Perform (const TColStd_Array1OfInteger& LocalDimension, const TColStd_Array1OfReal& LocalTolerancesArray, const Standard_Real First, const Standard_Real Last, const Standard_Integer MaxDegree); - + Standard_EXPORT void Perform(const TColStd_Array1OfInteger& LocalDimension, + const TColStd_Array1OfReal& LocalTolerancesArray, + const Standard_Real First, + const Standard_Real Last, + const Standard_Integer MaxDegree); + Standard_EXPORT Standard_Boolean IsDone() const; - + Standard_EXPORT Standard_Integer Degree() const; - + //! returns the coefficients in the Jacobi Base Standard_EXPORT Handle(TColStd_HArray1OfReal) Coefficients() const; - + //! returns the constraints at First Standard_EXPORT Handle(TColStd_HArray2OfReal) FirstConstr() const; - + //! returns the constraints at Last Standard_EXPORT Handle(TColStd_HArray2OfReal) LastConstr() const; - + Standard_EXPORT Handle(TColStd_HArray1OfReal) SomTab() const; - + Standard_EXPORT Handle(TColStd_HArray1OfReal) DifTab() const; - - Standard_EXPORT Standard_Real MaxError (const Standard_Integer Index) const; - - Standard_EXPORT Standard_Real AverageError (const Standard_Integer Index) const; - - //! display information on approximation - Standard_EXPORT void Dump (Standard_OStream& o) const; + Standard_EXPORT Standard_Real MaxError(const Standard_Integer Index) const; + Standard_EXPORT Standard_Real AverageError(const Standard_Integer Index) const; + //! display information on approximation + Standard_EXPORT void Dump(Standard_OStream& o) const; protected: - - - - - private: - - - - Standard_Integer myTotalNumSS; - Standard_Integer myTotalDimension; - Standard_Integer myNbGaussPoints; - Standard_Integer myWorkDegree; - Standard_Integer myNivConstr; + Standard_Integer myTotalNumSS; + Standard_Integer myTotalDimension; + Standard_Integer myNbGaussPoints; + Standard_Integer myWorkDegree; + Standard_Integer myNivConstr; Handle(PLib_JacobiPolynomial) myJacPol; Handle(TColStd_HArray1OfReal) myTabPoints; Handle(TColStd_HArray2OfReal) myTabWeights; - Standard_Address myEvaluator; - Standard_Integer myDegree; + Standard_Address myEvaluator; + Standard_Integer myDegree; Handle(TColStd_HArray1OfReal) myCoeff; Handle(TColStd_HArray2OfReal) myFirstConstr; Handle(TColStd_HArray2OfReal) myLastConstr; @@ -108,15 +104,7 @@ private: Handle(TColStd_HArray1OfReal) myDifTab; Handle(TColStd_HArray1OfReal) myMaxError; Handle(TColStd_HArray1OfReal) myAverageError; - Standard_Boolean done; - - + Standard_Boolean done; }; - - - - - - #endif // _AdvApprox_SimpleApprox_HeaderFile diff --git a/opencascade/AppBlend_AppSurf.gxx b/opencascade/AppBlend_AppSurf.gxx deleted file mode 100644 index 44f56420f..000000000 --- a/opencascade/AppBlend_AppSurf.gxx +++ /dev/null @@ -1,1015 +0,0 @@ -// Copyright (c) 1995-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -static Standard_Boolean scal = 1; - -Standard_EXPORT Standard_Boolean AppBlend_GetContextSplineApprox(); -Standard_EXPORT Standard_Boolean AppBlend_GetContextApproxWithNoTgt(); - -// modified by EAP (Edward AGAPOV) Fri Jan 4 2002, bug OCC9 -// --- keep pipe parametrized like path - - -//======================================================================= -//function : AppBlend_AppSurf -//purpose : -//======================================================================= - -AppBlend_AppSurf::AppBlend_AppSurf () -: done(Standard_False), - dmin(0), - dmax(0), - tol3d(0.0), - tol2d(0.0), - nbit(0), - udeg(0), - vdeg(0), - knownp(Standard_False), - tol3dreached(0.0), - tol2dreached(0.0), - paramtype(Approx_ChordLength), - continuity(GeomAbs_C2) -{ - critweights[0]=0.4; - critweights[1]=0.2; - critweights[2]=0.4; -} - - -//======================================================================= -//function : AppBlend_AppSurf -//purpose : -//======================================================================= - -AppBlend_AppSurf::AppBlend_AppSurf (const Standard_Integer Degmin, - const Standard_Integer Degmax, - const Standard_Real Tol3d, - const Standard_Real Tol2d, - const Standard_Integer NbIt, - const Standard_Boolean KnownParameters) -: done(Standard_False), - dmin(Degmin), - dmax(Degmax), - tol3d(Tol3d), - tol2d(Tol2d), - nbit(NbIt), - udeg(0), - vdeg(0), - knownp(KnownParameters), - tol3dreached(0.0), - tol2dreached(0.0), - paramtype(Approx_ChordLength), - continuity(GeomAbs_C2) -{ - critweights[0]=0.4; - critweights[1]=0.2; - critweights[2]=0.4; -} - -//======================================================================= -//function : Init -//purpose : -//======================================================================= - -void AppBlend_AppSurf::Init (const Standard_Integer Degmin, - const Standard_Integer Degmax, - const Standard_Real Tol3d, - const Standard_Real Tol2d, - const Standard_Integer NbIt, - const Standard_Boolean KnownParameters) -{ - done = Standard_False; - dmin = Degmin; - dmax = Degmax; - tol3d = Tol3d; - tol2d = Tol2d; - nbit = NbIt; - knownp = KnownParameters; - continuity = GeomAbs_C2; - paramtype = Approx_ChordLength; - critweights[0]=0.4; - critweights[1]=0.2; - critweights[2]=0.4; -} - -//======================================================================= -//function : CriteriumWeight -//purpose : returns the Weights associed to the criterium used in -// the optimization. -//======================================================================= -// -void AppBlend_AppSurf::CriteriumWeight(Standard_Real& W1, Standard_Real& W2, Standard_Real& W3) const -{ - W1 = critweights[0]; - W2 = critweights[1]; - W3 = critweights[2] ; -} -//======================================================================= -//function : SetCriteriumWeight -//purpose : -//======================================================================= - -void AppBlend_AppSurf::SetCriteriumWeight(const Standard_Real W1, const Standard_Real W2, const Standard_Real W3) -{ - if (W1 < 0 || W2 < 0 || W3 < 0 ) throw Standard_DomainError(); - critweights[0] = W1; - critweights[1] = W2; - critweights[2] = W3; -} -//======================================================================= -//function : SetContinuity -//purpose : -//======================================================================= - -void AppBlend_AppSurf::SetContinuity (const GeomAbs_Shape TheCont) -{ - continuity = TheCont; -} - -//======================================================================= -//function : Continuity -//purpose : -//======================================================================= - -GeomAbs_Shape AppBlend_AppSurf::Continuity () const -{ - return continuity; -} - -//======================================================================= -//function : SetParType -//purpose : -//======================================================================= - -void AppBlend_AppSurf::SetParType (const Approx_ParametrizationType ParType) -{ - paramtype = ParType; -} - -//======================================================================= -//function : ParType -//purpose : -//======================================================================= - -Approx_ParametrizationType AppBlend_AppSurf::ParType () const -{ - return paramtype; -} - - -//======================================================================= -//function : Perform -//purpose : -//======================================================================= - -void AppBlend_AppSurf::Perform(const Handle(TheLine)& Lin, - TheSectionGenerator& F, - const Standard_Boolean SpApprox) - -{ - InternalPerform(Lin, F, SpApprox, Standard_False); -} - -//======================================================================= -//function : PerformSmoothing -//purpose : -//======================================================================= - -void AppBlend_AppSurf::PerformSmoothing(const Handle(TheLine)& Lin, - TheSectionGenerator& F) - -{ - InternalPerform(Lin, F, Standard_True, Standard_True); -} - -//======================================================================= -//function : InternalPerform -//purpose : -//======================================================================= - -void AppBlend_AppSurf::InternalPerform(const Handle(TheLine)& Lin, - TheSectionGenerator& F, - const Standard_Boolean SpApprox, - const Standard_Boolean UseSmoothing) - -{ - done = Standard_False; - if (Lin.IsNull()) {return;} - Standard_Integer i,j,k,NbPoint; - Standard_Integer NbUPoles,NbUKnots,NbPoles2d,NbVPoles; - Standard_Boolean withderiv; - AppParCurves_Constraint Cfirst,Clast; - - Standard_Real mytol3d,mytol2d; - gp_XYZ newDv; - - seqPoles2d.Clear(); - - NbPoint=Lin->NbPoints(); - AppDef_MultiPointConstraint multP; - AppDef_MultiLine multL(NbPoint); - - F.GetShape(NbUPoles,NbUKnots,udeg,NbPoles2d); - - tabUKnots = new TColStd_HArray1OfReal (1,NbUKnots); - tabUMults = new TColStd_HArray1OfInteger (1,NbUKnots); - - F.Knots(tabUKnots->ChangeArray1()); - F.Mults(tabUMults->ChangeArray1()); - - TColgp_Array1OfPnt tabAppP(1,NbUPoles); - TColgp_Array1OfVec tabAppV(1,NbUPoles); - - TColgp_Array1OfPnt2d tabP2d(1,Max(1,NbPoles2d)); - TColgp_Array1OfVec2d tabV2d(1,Max(1,NbPoles2d)); - - TColStd_Array1OfReal tabW(1,NbUPoles),tabDW(1,NbUPoles); - - TColgp_Array1OfPnt2d tabAppP2d(1,NbPoles2d+NbUPoles); // points2d + poids - TColgp_Array1OfVec2d tabAppV2d(1,NbPoles2d+NbUPoles); - - - AppParCurves_MultiBSpCurve multC; - -// Standard_Boolean SpApprox = Standard_False; - - withderiv = F.Section(Lin->Point(1),tabAppP,tabAppV,tabP2d,tabV2d, - tabW,tabDW); - - if(AppBlend_GetContextApproxWithNoTgt()) withderiv = Standard_False; - - for (j=1; j<=NbPoles2d; j++) { - tabAppP2d(j) = tabP2d(j); - if (withderiv) { - tabAppV2d(j) = tabV2d(j); - } - } - for (j=1; j<=NbUPoles; j++) { - // pour les courbes rationnelles il faut multiplier les poles par - // leurs poids respectifs - if (withderiv) { - tabAppV2d(NbPoles2d+j).SetCoord(tabDW(j),0.); - newDv.SetLinearForm(tabDW(j),tabAppP(j).XYZ(),tabW(j),tabAppV(j).XYZ()); - tabAppV(j).SetXYZ(newDv); - } - tabAppP(j).SetXYZ(tabAppP(j).XYZ() * tabW(j)); - tabAppP2d(NbPoles2d+j).SetCoord(tabW(j),0.); - } - - if (withderiv) { - multP = AppDef_MultiPointConstraint(tabAppP,tabAppP2d,tabAppV,tabAppV2d); - Cfirst = AppParCurves_TangencyPoint; - } - else { - multP = AppDef_MultiPointConstraint(tabAppP,tabAppP2d); - Cfirst = AppParCurves_PassPoint; - } - multL.SetValue(1,multP); - - for (i=2; i<=NbPoint-1; i++) { - if (SpApprox) { - F.Section(Lin->Point(i),tabAppP,tabP2d,tabW); - for (j=1; j<=NbPoles2d; j++) { - tabAppP2d(j) = tabP2d(j); - } - for (j=1; j<=NbUPoles; j++) { - // pour les courbes rationnelles il faut multiplier les poles par - // leurs poids respectifs - tabAppP(j).SetXYZ(tabAppP(j).XYZ() * tabW(j)); - tabAppP2d(NbPoles2d+j).SetCoord(tabW(j),0.); - } - multP = AppDef_MultiPointConstraint(tabAppP,tabAppP2d); - multL.SetValue(i,multP); - } -// *********************** - else { - withderiv = F.Section(Lin->Point(i),tabAppP,tabAppV,tabP2d,tabV2d, - tabW,tabDW); - if(AppBlend_GetContextApproxWithNoTgt()) withderiv = Standard_False; - - for (j=1; j<=NbPoles2d; j++) { - tabAppP2d(j) = tabP2d(j); - if (withderiv) { - tabAppV2d(j) = tabV2d(j); - } - } - for (j=1; j<=NbUPoles; j++) { - // pour les courbes rationnelles il faut multiplier les poles par - // leurs poids respectifs - if (withderiv) { - tabAppV2d(NbPoles2d+j).SetCoord(tabDW(j),0.); - newDv.SetLinearForm(tabDW(j),tabAppP(j).XYZ(),tabW(j),tabAppV(j).XYZ()); - tabAppV(j).SetXYZ(newDv); - } - tabAppP(j).SetXYZ(tabAppP(j).XYZ() * tabW(j)); - tabAppP2d(NbPoles2d+j).SetCoord(tabW(j),0.); - } - if (withderiv) { - multP = AppDef_MultiPointConstraint(tabAppP,tabAppP2d,tabAppV,tabAppV2d); - } - else { - multP = AppDef_MultiPointConstraint(tabAppP,tabAppP2d); - } - multL.SetValue(i,multP); - } -// ****************************** - } - - withderiv = F.Section(Lin->Point(NbPoint),tabAppP,tabAppV,tabP2d,tabV2d, - tabW,tabDW); - if(AppBlend_GetContextApproxWithNoTgt()) withderiv = Standard_False; - - for (j=1; j<=NbPoles2d; j++) { - tabAppP2d(j) = tabP2d(j); - if (withderiv) { - tabAppV2d(j) = tabV2d(j); - } - } - for (j=1; j<=NbUPoles; j++) { - // pour les courbes rationnelles il faut multiplier les poles par - // leurs poids respectifs - if (withderiv) { - tabAppV2d(NbPoles2d+j).SetCoord(tabDW(j),0.); - newDv.SetLinearForm(tabDW(j),tabAppP(j).XYZ(),tabW(j),tabAppV(j).XYZ()); - tabAppV(j).SetXYZ(newDv); - } - tabAppP(j).SetXYZ(tabAppP(j).XYZ() * tabW(j)); - tabAppP2d(NbPoles2d+j).SetCoord(tabW(j),0.); - } - - if (withderiv) { - multP = AppDef_MultiPointConstraint(tabAppP,tabAppP2d,tabAppV,tabAppV2d); - Clast = AppParCurves_TangencyPoint; - } - else { - multP = AppDef_MultiPointConstraint(tabAppP,tabAppP2d); - Clast = AppParCurves_PassPoint; - } - multL.SetValue(NbPoint,multP); - - //IFV 04.06.07 occ13904 - if(NbPoint == 2) { - dmin = 1; - if(Cfirst == AppParCurves_PassPoint && Clast == AppParCurves_PassPoint) { - dmax = 1; - } - } - - - if (!SpApprox) { - AppDef_Compute theapprox (dmin,dmax,tol3d,tol2d,nbit, Standard_True, paramtype); - if (knownp) { - math_Vector theParams(1,NbPoint); - - // On recale les parametres entre 0 et 1. - theParams(1) = 0.; - theParams(NbPoint) = 1.; - Standard_Real Uf = F.Parameter(Lin->Point(1)); - Standard_Real Ul = F.Parameter(Lin->Point(NbPoint))-Uf; - for (i=2; iPoint(i))-Uf)/Ul; - } - AppDef_Compute theAppDef(theParams,dmin,dmax,tol3d,tol2d,nbit, - Standard_True, Standard_True); - theapprox = theAppDef; - } - theapprox.SetConstraints(Cfirst,Clast); - theapprox.Perform(multL); - - Standard_Real TheTol3d, TheTol2d; - mytol3d = mytol2d = 0.0; - for (Standard_Integer Index=1; Index<=theapprox.NbMultiCurves(); Index++) { - theapprox.Error(Index, TheTol3d, TheTol2d); - mytol3d = Max(TheTol3d, mytol3d); - mytol2d = Max(TheTol2d, mytol2d); - } -#ifdef OCCT_DEBUG - std::cout << " Tolerances obtenues --> 3d : "<< mytol3d << std::endl; - std::cout << " --> 2d : "<< mytol2d << std::endl; -#endif - multC = theapprox.SplineValue(); - } - - else { - if(!UseSmoothing) { - Standard_Boolean UseSquares = Standard_False; - if(nbit == 0) UseSquares = Standard_True; - AppDef_BSplineCompute theapprox (dmin,dmax,tol3d,tol2d,nbit,Standard_True, paramtype, - UseSquares); - if(continuity == GeomAbs_C0) { - theapprox.SetContinuity(0); - } - if(continuity == GeomAbs_C1) { - theapprox.SetContinuity(1); - } - else if(continuity == GeomAbs_C2) { - theapprox.SetContinuity(2); - } - else { - theapprox.SetContinuity(3); - } - - theapprox.SetConstraints(Cfirst,Clast); - - if (knownp) { - math_Vector theParams(1,NbPoint); - // On recale les parametres entre 0 et 1. - theParams(1) = 0.; - theParams(NbPoint) = 1.; - Standard_Real Uf = F.Parameter(Lin->Point(1)); - Standard_Real Ul = F.Parameter(Lin->Point(NbPoint))-Uf; - for (i=2; iPoint(i))-Uf)/Ul; - } - - theapprox.Init(dmin,dmax,tol3d,tol2d,nbit,Standard_True, - Approx_IsoParametric,Standard_True); - theapprox.SetParameters(theParams); - } - theapprox.Perform(multL); - theapprox.Error(mytol3d,mytol2d); -#ifdef OCCT_DEBUG - std::cout << " Tolerances obtenues --> 3d : "<< mytol3d << std::endl; - std::cout << " --> 2d : "<< mytol2d << std::endl; -#endif - tol3dreached = mytol3d; - tol2dreached = mytol2d; - multC = theapprox.Value(); - } - else { - //Variational algo - Handle(AppParCurves_HArray1OfConstraintCouple) TABofCC = - new AppParCurves_HArray1OfConstraintCouple(1, NbPoint); - AppParCurves_Constraint Constraint=AppParCurves_NoConstraint; - - for(i = 1; i <= NbPoint; ++i) { - AppParCurves_ConstraintCouple ACC(i,Constraint); - TABofCC->SetValue(i,ACC); - } - - TABofCC->ChangeValue(1).SetConstraint(Cfirst); - TABofCC->ChangeValue(NbPoint).SetConstraint(Clast); - - AppDef_Variational Variation(multL, 1, NbPoint, TABofCC); - -//=================================== - Standard_Integer theMaxSegments = 1000; - Standard_Boolean theWithMinMax = Standard_False; - Standard_Boolean theWithCutting = Standard_True; -//=================================== - - Variation.SetMaxDegree(dmax); - Variation.SetContinuity(continuity); - Variation.SetMaxSegment(theMaxSegments); - - Variation.SetTolerance(tol3d); - Variation.SetWithMinMax(theWithMinMax); - Variation.SetWithCutting(theWithCutting); - Variation.SetNbIterations(nbit); - - Variation.SetCriteriumWeight(critweights[0], critweights[1], critweights[2]); - - if(!Variation.IsCreated()) { - return; - } - - if(Variation.IsOverConstrained()) { - return; - } - - try { - Variation.Approximate(); - } - catch (Standard_Failure const&) { - return; - } - - if(!Variation.IsDone()) { - return; - } - - mytol3d = Variation.MaxError(); - mytol2d = 0.; -#ifdef OCCT_DEBUG - std::cout << " Tolerances obtenues --> 3d : "<< mytol3d << std::endl; - std::cout << " --> 2d : "<< mytol2d << std::endl; -#endif - tol3dreached = mytol3d; - tol2dreached = mytol2d; - multC = Variation.Value(); - } - } - - vdeg = multC.Degree(); - NbVPoles = multC.NbPoles(); - - tabPoles = new TColgp_HArray2OfPnt (1,NbUPoles,1,NbVPoles); - tabWeights = new TColStd_HArray2OfReal (1,NbUPoles,1,NbVPoles); - tabVKnots = new TColStd_HArray1OfReal (multC.Knots().Lower(), - multC.Knots().Upper()); - tabVKnots->ChangeArray1() = multC.Knots(); - - if (knownp && !UseSmoothing) { - BSplCLib::Reparametrize(F.Parameter(Lin->Point(1)), - F.Parameter(Lin->Point(NbPoint)), - tabVKnots->ChangeArray1()); - } - - tabVMults = new TColStd_HArray1OfInteger (multC.Multiplicities().Lower(), - multC.Multiplicities().Upper()); - tabVMults->ChangeArray1() = multC.Multiplicities(); - - - TColgp_Array1OfPnt newtabP(1,NbVPoles); - Handle(TColgp_HArray1OfPnt2d) newtabP2d = - new TColgp_HArray1OfPnt2d(1,NbVPoles); - for (j=1; j <=NbUPoles; j++) { - multC.Curve(j,newtabP); - multC.Curve(j+NbUPoles+NbPoles2d,newtabP2d->ChangeArray1()); - for (k=1; k<=NbVPoles; k++) { - // pour les courbes rationnelles il faut maintenant diviser - // les poles par leurs poids respectifs - tabPoles->ChangeValue(j,k).SetXYZ(newtabP(k).XYZ()/newtabP2d->Value(k).X()); - Standard_Real aWeight = newtabP2d->Value(k).X(); - if (aWeight < gp::Resolution()) { - done = Standard_False; - return; - } - tabWeights->SetValue(j,k,aWeight); - } - } - - for (j=1; j<=NbPoles2d; j++) { - newtabP2d = new TColgp_HArray1OfPnt2d(1,NbVPoles); - multC.Curve(NbUPoles+j,newtabP2d->ChangeArray1()); - seqPoles2d.Append(newtabP2d); - } - - done = Standard_True; -} - - -//======================================================================= -//function : Perform -//purpose : -//======================================================================= - -void AppBlend_AppSurf::Perform(const Handle(TheLine)& Lin, - TheSectionGenerator& F, - const Standard_Integer NbMaxP) -{ - done = Standard_False; - if (Lin.IsNull()) {return;} - Standard_Integer i,j,k; - Standard_Integer NbUPoles,NbUKnots,NbPoles2d,NbVPoles; - Standard_Boolean withderiv; - AppParCurves_Constraint Cfirst=AppParCurves_NoConstraint,Clast=AppParCurves_NoConstraint; - - Standard_Real mytol3d = 0.0, mytol2d = 0.0; - gp_XYZ newDv; - - seqPoles2d.Clear(); - - Standard_Integer NbPointTot = Lin->NbPoints(); - - F.GetShape(NbUPoles,NbUKnots,udeg,NbPoles2d); - - tabUKnots = new TColStd_HArray1OfReal (1,NbUKnots); - tabUMults = new TColStd_HArray1OfInteger (1,NbUKnots); - - F.Knots(tabUKnots->ChangeArray1()); - F.Mults(tabUMults->ChangeArray1()); - - TColgp_Array1OfPnt tabAppP(1,NbUPoles); - TColgp_Array1OfVec tabAppV(1,NbUPoles); - Standard_Real X,Y,Z,DX,DY,DZ; - X = Y = Z = RealLast(); - DX = DY = DZ = RealFirst(); - - TColgp_Array1OfPnt2d tabP2d(1,Max(1,NbPoles2d)); - TColgp_Array1OfVec2d tabV2d(1,Max(1,NbPoles2d)); - TColStd_Array1OfReal X2d(1,Max(1,NbPoles2d));X2d.Init(RealLast()); - TColStd_Array1OfReal Y2d(1,Max(1,NbPoles2d));Y2d.Init(RealLast()); - TColStd_Array1OfReal DX2d(1,Max(1,NbPoles2d));DX2d.Init(RealFirst()); - TColStd_Array1OfReal DY2d(1,Max(1,NbPoles2d));DY2d.Init(RealFirst()); - - TColStd_Array1OfReal tabW(1,NbUPoles),tabDW(1,NbUPoles); - - TColgp_Array1OfPnt2d tabAppP2d(1,NbPoles2d+NbUPoles); // points2d + poids - TColgp_Array1OfVec2d tabAppV2d(1,NbPoles2d+NbUPoles); - - // On calcule les boites de chaque ligne (box for all lines) - for(i = 1; i <= NbPointTot; i++){ - F.Section(Lin->Point(i),tabAppP,tabAppV,tabP2d,tabV2d,tabW,tabDW); - Standard_Real x,y,z; - for (j = 1; j <= NbUPoles; j++) - { - tabAppP(j).Coord(x,y,z); - if(x < X) { X = x; } - if(x > DX) { DX = x; } - if(y < Y) { Y = y; } - if(y > DY) { DY = y; } - if(z < Z) { Z = z; } - if(z > DZ) { DZ = z; } - } - for (j = 1; j <= NbPoles2d; j++) - { - tabP2d(j).Coord(x,y); - if(x < X2d (j)) { X2d (j) = x; } - if(x > DX2d(j)) { DX2d(j) = x; } - if(y < Y2d (j)) { Y2d (j) = y; } - if(y > DY2d(j)) { DY2d(j) = y; } - } - } - // On calcule pour chaque ligne la transformation vers 0 1. - Standard_Real seuil = 1000.*tol3d; - Standard_Real seuil2d = 1000.*tol2d; - if((DX - X) < seuil ){ DX = 1.; X = 0.; } - else{ DX = 1./(DX - X); X *= -DX; } - if((DY - Y) < seuil){ DY = 1.; Y = 0.; } - else{ DY = 1./(DY - Y); Y *= -DY; } - if((DZ - Z) < seuil){ DZ = 1.; Z = 0.; } - else{ DZ = 1./(DZ - Z); Z *= -DZ; } - for(j = 1; j <= NbPoles2d; j++){ - if((DX2d(j) - X2d(j)) < seuil2d){ DX2d(j) = 1.; X2d(j) = 0.; } - else{ DX2d(j) = 1./(DX2d(j) - X2d(j)); X2d(j) *= -DX2d(j); } - if((DY2d(j) - Y2d(j)) < seuil2d){ DY2d(j) = 1.; Y2d(j) = 0.; } - else{ DY2d(j) = 1./(DY2d(j) - Y2d(j)); Y2d(j) *= -DY2d(j); } - } - if(!scal){ - DX = 1.; X = 0.; - DY = 1.; Y = 0.; - DZ = 1.; Z = 0.; - for(j = 1; j <= NbPoles2d; j++){ - DX2d(j) = 1.; X2d(j) = 0.; - DY2d(j) = 1.; Y2d(j) = 0.; - } - } -// modified by eap Thu Jan 3 14:45:22 2002 ___BEGIN___ - // Keep "inter-troncons" parameters, not only first and last -// Standard_Real Ufirst=0,Ulast=0; - TColStd_SequenceOfReal aParamSeq; - if (knownp) { -// Ufirst = F.Parameter(Lin->Point(1)); -// Ulast = F.Parameter(Lin->Point(NbPointTot)); - aParamSeq.Append( F.Parameter (Lin->Point(1)) ); - } -// modified by EAP Thu Jan 3 14:45:41 2002 ___END___ - - Approx_MCurvesToBSpCurve concat; - - //On calcule le nombre de troncons. - Standard_Integer nbtronc = NbPointTot/NbMaxP; - Standard_Integer reste = NbPointTot - (nbtronc * NbMaxP); - // On regarde si il faut prendre un troncon de plus. - Standard_Integer nmax = NbMaxP; - if(nbtronc > 0 && reste > 0){ - nmax = NbPointTot/(nbtronc + 1); - if(nmax > (2*NbMaxP)/3) { - nbtronc++; - reste = NbPointTot - (nbtronc * nmax); - } - else nmax = NbMaxP; - } - else if(nbtronc == 0){ - nbtronc = 1; - nmax = reste; - reste = 0; - } - - // Approximate each "troncon" with nb of Bezier's using AppDef_Compute - // and concat them into BSpline with Approx_MCurvesToBSpCurve - - TColStd_Array1OfInteger troncsize(1,nbtronc); - TColStd_Array1OfInteger troncstart(1,nbtronc); - - Standard_Integer rab = reste/nbtronc + 1; - Standard_Integer start = 1; - Standard_Integer itronc ; - for( itronc = 1; itronc <= nbtronc; itronc++){ - troncstart(itronc) = start; - Standard_Integer rabrab = Min(rab,reste); - if(reste > 0){ reste -= rabrab; } - troncsize(itronc) = nmax + rabrab + 1; - start += (nmax + rabrab); - } - troncsize(nbtronc) = troncsize(nbtronc) - 1; - for(itronc = 1; itronc <= nbtronc; itronc++){ - Standard_Integer NbPoint = troncsize(itronc); - Standard_Integer StPoint = troncstart(itronc); - AppDef_MultiPointConstraint multP; - AppDef_MultiLine multL(NbPoint); - - for (i=1; i<=NbPoint; i++) { - Standard_Integer iLin = StPoint + i - 1; - Standard_Real x,y,z; - withderiv = F.Section(Lin->Point(iLin),tabAppP,tabAppV,tabP2d,tabV2d, - tabW,tabDW); - if(AppBlend_GetContextApproxWithNoTgt()) withderiv = Standard_False; - - for (j=1; j<=NbPoles2d; j++) { - tabP2d(j).Coord(x,y); - tabAppP2d(j).SetCoord(DX2d(j)*x+X2d(j),DY2d(j)*y+Y2d(j)); - if (withderiv) { - tabV2d(j).Coord(x,y); - tabAppV2d(j).SetCoord(DX2d(j)*x,DY2d(j)*y); - } - } - for (j=1; j<=NbUPoles; j++) { - // pour les courbes rationnelles il faut multiplier les poles par - // leurs poids respectifs - if (withderiv) { - tabAppV2d(NbPoles2d+j).SetCoord(tabDW(j),0.); - newDv.SetLinearForm(tabDW(j),tabAppP(j).XYZ(),tabW(j),tabAppV(j).XYZ()); - tabAppV(j).SetCoord(DX*newDv.X(),DY*newDv.Y(),DZ*newDv.Z()); - } - tabAppP(j).SetXYZ(tabAppP(j).XYZ() * tabW(j)); - tabAppP2d(NbPoles2d+j).SetCoord(tabW(j),0.); - tabAppP(j).Coord(x,y,z); - tabAppP(j).SetCoord(DX*x+X,DY*y+Y,DZ*z+Z); - } - if (withderiv) { - multP = AppDef_MultiPointConstraint(tabAppP,tabAppP2d,tabAppV,tabAppV2d); - if(i == 1) Cfirst = AppParCurves_TangencyPoint; - else if(i == NbPoint) Clast = AppParCurves_TangencyPoint; - } - else { - multP = AppDef_MultiPointConstraint(tabAppP,tabAppP2d); - if(i == 1) Cfirst = AppParCurves_PassPoint; - else if(i == NbPoint) Clast = AppParCurves_PassPoint; - } - multL.SetValue(i,multP); - } - - - //IFV 04.06.07 occ13904 - if(NbPoint == 2) { - dmin = 1; - if(Cfirst == AppParCurves_PassPoint && Clast == AppParCurves_PassPoint) { - dmax = 1; - } - } - -// modified by EAP Thu Jan 3 15:44:13 2002 ___BEGIN___ - Standard_Real Ufloc=0., Ulloc=0.; - AppDef_Compute theapprox (dmin,dmax,tol3d,tol2d,nbit); - if (knownp) { - math_Vector theParams(1,NbPoint); - // On recale les parametres entre 0 et 1. - /*Standard_Real*/ Ufloc = F.Parameter(Lin->Point(StPoint)); - /*Standard_Real*/ Ulloc = F.Parameter(Lin->Point(StPoint+NbPoint-1)); -// modified by EAP Thu Jan 3 15:45:17 2002 ___END___ - for (i=1; i <= NbPoint; i++) { - Standard_Integer iLin = StPoint + i - 1; - theParams(i) = (F.Parameter(Lin->Point(iLin))-Ufloc)/(Ulloc - Ufloc); - } - AppDef_Compute theAppDef1(theParams,dmin,dmax,tol3d,tol2d,nbit, Standard_True,Standard_True); - theapprox = theAppDef1; - } - theapprox.SetConstraints(Cfirst,Clast); - theapprox.Perform(multL); - -// modified by EAP Thu Jan 3 16:00:43 2002 ___BEGIN___ - // To know internal parameters if multicurve is approximated by several Bezier's - TColStd_SequenceOfReal aPoleDistSeq; - Standard_Real aWholeDist=0; -// modified by EAP Thu Jan 3 16:45:48 2002 ___END___ - Standard_Real TheTol3d, TheTol2d; - for (Standard_Integer Index=1; Index<=theapprox.NbMultiCurves(); Index++) { - AppParCurves_MultiCurve& mucu = theapprox.ChangeValue(Index); - theapprox.Error(Index, TheTol3d, TheTol2d); - mytol3d = Max(TheTol3d/DX, mytol3d); - mytol3d = Max(TheTol3d/DY, mytol3d); - mytol3d = Max(TheTol3d/DZ, mytol3d); - for(j = 1; j <= NbUPoles; j++){ - mucu.Transform(j, - -X/DX,1./DX, - -Y/DY,1./DY, - -Z/DZ,1./DZ); - } - for(j = 1; j <= NbPoles2d; j++){ - mucu.Transform2d(j + NbUPoles, - -X2d(j)/DX2d(j),1./DX2d(j), - -Y2d(j)/DY2d(j),1./DY2d(j)); - mytol2d = Max(TheTol2d/DX2d(j), mytol2d); - mytol2d = Max(TheTol2d/DY2d(j), mytol2d); - } - concat.Append(mucu); - -// modified by EAP Thu Jan 3 15:45:23 2002 ___BEGIN___ - if (knownp && theapprox.NbMultiCurves() > 1) - { - gp_Pnt aFirstPole = mucu.Pole(Index, 1); - gp_Pnt aLastPole = mucu.Pole(Index, mucu.NbPoles()); - aPoleDistSeq.Append (aFirstPole.Distance(aLastPole)); - aWholeDist += aPoleDistSeq.Last(); - } - } - if (knownp) - { - Standard_Integer iDist; - Standard_Real iU = Ufloc; - for (iDist=1; iDist 3d : "<< mytol3d << std::endl; - std::cout << " --> 2d : "<< mytol2d << std::endl; -#endif - tol3dreached = mytol3d; - tol2dreached = mytol2d; - concat.Perform(); - const AppParCurves_MultiBSpCurve& multC = concat.Value(); - vdeg = multC.Degree(); - NbVPoles = multC.NbPoles(); - - tabPoles = new TColgp_HArray2OfPnt (1,NbUPoles,1,NbVPoles); - tabWeights = new TColStd_HArray2OfReal (1,NbUPoles,1,NbVPoles); - tabVKnots = new TColStd_HArray1OfReal (multC.Knots().Lower(), - multC.Knots().Upper()); - tabVKnots->ChangeArray1() = multC.Knots(); - - if (knownp) { -// modified by EAP Fri Jan 4 12:07:30 2002 ___BEGIN___ - if (aParamSeq.Length() != tabVKnots->Length()) - { - BSplCLib::Reparametrize(F.Parameter(Lin->Point(1)), - F.Parameter(Lin->Point(Lin->NbPoints())), - tabVKnots->ChangeArray1() - ); -#ifdef OCCT_DEBUG - std::cout << "Warning: AppBlend_AppSurf::Perform(), bad length of aParamSeq: " << - aParamSeq.Length() << " instead of " << tabVKnots->Length() << std::endl; -#endif - } - else - { - Standard_Integer iKnot, iTabKnot = tabVKnots->Lower(); - for (iKnot=1; iKnot<=aParamSeq.Length(); iKnot++, iTabKnot++) - { - //cout << "Replace " << tabVKnots->Value(iTabKnot) << " with " << aParamSeq(iKnot) << endl; - tabVKnots->SetValue(iTabKnot, aParamSeq(iKnot)); - } - } -// modified by EAP Fri Jan 4 12:07:35 2002 ___END___ - } - - tabVMults = new TColStd_HArray1OfInteger (multC.Multiplicities().Lower(), - multC.Multiplicities().Upper()); - tabVMults->ChangeArray1() = multC.Multiplicities(); - - - TColgp_Array1OfPnt newtabP(1,NbVPoles); - Handle(TColgp_HArray1OfPnt2d) newtabP2d = - new TColgp_HArray1OfPnt2d(1,NbVPoles); - for (j=1; j <=NbUPoles; j++) { - multC.Curve(j,newtabP); - multC.Curve(j+NbUPoles+NbPoles2d,newtabP2d->ChangeArray1()); - for (k=1; k<=NbVPoles; k++) { - // pour les courbes rationnelles il faut maintenant diviser - // les poles par leurs poids respectifs - tabPoles->ChangeValue(j,k).SetXYZ(newtabP(k).XYZ()/newtabP2d->Value(k).X()); - Standard_Real aWeight = newtabP2d->Value(k).X(); - if (aWeight < gp::Resolution()) { - done = Standard_False; - return; - } - tabWeights->SetValue(j,k,aWeight); - } - } - - for (j=1; j<=NbPoles2d; j++) { - newtabP2d = new TColgp_HArray1OfPnt2d(1,NbVPoles); - multC.Curve(NbUPoles+j,newtabP2d->ChangeArray1()); - seqPoles2d.Append(newtabP2d); - } - - done = Standard_True; -} - - -//======================================================================= -//function : SurfShape -//purpose : -//======================================================================= - -void AppBlend_AppSurf::SurfShape (Standard_Integer& UDegree, - Standard_Integer& VDegree, - Standard_Integer& NbUPoles, - Standard_Integer& NbVPoles, - Standard_Integer& NbUKnots, - Standard_Integer& NbVKnots) const -{ - if (!done) {throw StdFail_NotDone();} - UDegree = udeg; - VDegree = vdeg; - NbUPoles = tabPoles->ColLength(); - NbVPoles = tabPoles->RowLength(); - NbUKnots = tabUKnots->Length(); - NbVKnots = tabVKnots->Length(); -} - - -void AppBlend_AppSurf::Surface(TColgp_Array2OfPnt& TPoles, - TColStd_Array2OfReal& TWeights, - TColStd_Array1OfReal& TUKnots, - TColStd_Array1OfReal& TVKnots, - TColStd_Array1OfInteger& TUMults, - TColStd_Array1OfInteger& TVMults) const - -{ - if (!done) {throw StdFail_NotDone();} - TPoles = tabPoles->Array2(); - TWeights = tabWeights->Array2(); - TUKnots = tabUKnots->Array1(); - TUMults = tabUMults->Array1(); - TVKnots = tabVKnots->Array1(); - TVMults = tabVMults->Array1(); -} - -//======================================================================= -//function : Curves2dShape -//purpose : -//======================================================================= - -void AppBlend_AppSurf::Curves2dShape(Standard_Integer& Degree, - Standard_Integer& NbPoles, - Standard_Integer& NbKnots) const -{ - if (!done) {throw StdFail_NotDone();} - if (seqPoles2d.Length() == 0) {throw Standard_DomainError();} - Degree = vdeg; - NbPoles = tabPoles->ColLength(); - NbKnots = tabVKnots->Length(); -} - -//======================================================================= -//function : Curve2d -//purpose : -//======================================================================= - -void AppBlend_AppSurf::Curve2d(const Standard_Integer Index, - TColgp_Array1OfPnt2d& TPoles, - TColStd_Array1OfReal& TKnots, - TColStd_Array1OfInteger& TMults) const -{ - if (!done) {throw StdFail_NotDone();} - if (seqPoles2d.Length() == 0) {throw Standard_DomainError();} - TPoles = seqPoles2d(Index)->Array1(); - TKnots = tabVKnots->Array1(); - TMults = tabVMults->Array1(); -} - -//======================================================================= -//function : TolCurveOnSurf -//purpose : -//======================================================================= - -Standard_Real AppBlend_AppSurf::TolCurveOnSurf(const Standard_Integer) const -{ - return tol3dreached; //On ne s'embete pas !! -} - - - diff --git a/opencascade/AppBlend_AppSurf.lxx b/opencascade/AppBlend_AppSurf.lxx index 0d52a930b..ce031bccb 100644 --- a/opencascade/AppBlend_AppSurf.lxx +++ b/opencascade/AppBlend_AppSurf.lxx @@ -19,102 +19,151 @@ #include #include - inline Standard_Boolean AppBlend_AppSurf::IsDone() const { return done; } - inline Standard_Integer AppBlend_AppSurf::UDegree() const { - if (!done) {throw StdFail_NotDone();} + if (!done) + { + throw StdFail_NotDone(); + } return udeg; } inline Standard_Integer AppBlend_AppSurf::VDegree() const { - if (!done) {throw StdFail_NotDone();} + if (!done) + { + throw StdFail_NotDone(); + } return vdeg; } inline const TColgp_Array2OfPnt& AppBlend_AppSurf::SurfPoles() const { - if (!done) {throw StdFail_NotDone();} + if (!done) + { + throw StdFail_NotDone(); + } return tabPoles->Array2(); } inline const TColStd_Array2OfReal& AppBlend_AppSurf::SurfWeights() const { - if (!done) {throw StdFail_NotDone();} + if (!done) + { + throw StdFail_NotDone(); + } return tabWeights->Array2(); } - inline const TColStd_Array1OfReal& AppBlend_AppSurf::SurfUKnots() const { - if (!done) {throw StdFail_NotDone();} + if (!done) + { + throw StdFail_NotDone(); + } return tabUKnots->Array1(); } inline const TColStd_Array1OfReal& AppBlend_AppSurf::SurfVKnots() const { - if (!done) {throw StdFail_NotDone();} + if (!done) + { + throw StdFail_NotDone(); + } return tabVKnots->Array1(); } inline const TColStd_Array1OfInteger& AppBlend_AppSurf::SurfUMults() const { - if (!done) {throw StdFail_NotDone();} + if (!done) + { + throw StdFail_NotDone(); + } return tabUMults->Array1(); } inline const TColStd_Array1OfInteger& AppBlend_AppSurf::SurfVMults() const { - if (!done) {throw StdFail_NotDone();} + if (!done) + { + throw StdFail_NotDone(); + } return tabVMults->Array1(); } -inline Standard_Integer AppBlend_AppSurf::NbCurves2d () const +inline Standard_Integer AppBlend_AppSurf::NbCurves2d() const { - if (!done) {throw StdFail_NotDone();} + if (!done) + { + throw StdFail_NotDone(); + } return seqPoles2d.Length(); } inline Standard_Integer AppBlend_AppSurf::Curves2dDegree() const { - if (!done) {throw StdFail_NotDone();} - if (seqPoles2d.Length() == 0) {throw Standard_DomainError();} + if (!done) + { + throw StdFail_NotDone(); + } + if (seqPoles2d.Length() == 0) + { + throw Standard_DomainError(); + } return vdeg; } -inline const TColgp_Array1OfPnt2d& AppBlend_AppSurf:: - Curve2dPoles(const Standard_Integer Index) const +inline const TColgp_Array1OfPnt2d& AppBlend_AppSurf::Curve2dPoles( + const Standard_Integer Index) const { - if (!done) {throw StdFail_NotDone();} - if (seqPoles2d.Length() == 0) {throw Standard_DomainError();} + if (!done) + { + throw StdFail_NotDone(); + } + if (seqPoles2d.Length() == 0) + { + throw Standard_DomainError(); + } return seqPoles2d(Index)->Array1(); } -inline const TColStd_Array1OfReal& AppBlend_AppSurf::Curves2dKnots () const +inline const TColStd_Array1OfReal& AppBlend_AppSurf::Curves2dKnots() const { - if (!done) {throw StdFail_NotDone();} - if (seqPoles2d.Length() == 0) {throw Standard_DomainError();} + if (!done) + { + throw StdFail_NotDone(); + } + if (seqPoles2d.Length() == 0) + { + throw Standard_DomainError(); + } return tabVKnots->Array1(); } -inline const TColStd_Array1OfInteger& AppBlend_AppSurf::Curves2dMults () const +inline const TColStd_Array1OfInteger& AppBlend_AppSurf::Curves2dMults() const { - if (!done) {throw StdFail_NotDone();} - if (seqPoles2d.Length() == 0) {throw Standard_DomainError();} + if (!done) + { + throw StdFail_NotDone(); + } + if (seqPoles2d.Length() == 0) + { + throw Standard_DomainError(); + } return tabVMults->Array1(); } -inline void AppBlend_AppSurf::TolReached (Standard_Real& Tol3d, - Standard_Real& Tol2d) const +inline void AppBlend_AppSurf::TolReached(Standard_Real& Tol3d, Standard_Real& Tol2d) const { - if (!done) {throw StdFail_NotDone();} + if (!done) + { + throw StdFail_NotDone(); + } Tol3d = tol3dreached; Tol2d = tol2dreached; } - diff --git a/opencascade/AppBlend_Approx.hxx b/opencascade/AppBlend_Approx.hxx index 5797cd8f4..23a7651f1 100644 --- a/opencascade/AppBlend_Approx.hxx +++ b/opencascade/AppBlend_Approx.hxx @@ -28,77 +28,71 @@ #include #include - //! Bspline approximation of a surface. -class AppBlend_Approx +class AppBlend_Approx { public: - DEFINE_STANDARD_ALLOC - Standard_EXPORT virtual Standard_Boolean IsDone() const = 0; - - Standard_EXPORT virtual void SurfShape (Standard_Integer& UDegree, Standard_Integer& VDegree, Standard_Integer& NbUPoles, Standard_Integer& NbVPoles, Standard_Integer& NbUKnots, Standard_Integer& NbVKnots) const = 0; - - Standard_EXPORT virtual void Surface (TColgp_Array2OfPnt& TPoles, TColStd_Array2OfReal& TWeights, TColStd_Array1OfReal& TUKnots, TColStd_Array1OfReal& TVKnots, TColStd_Array1OfInteger& TUMults, TColStd_Array1OfInteger& TVMults) const = 0; - - Standard_EXPORT virtual Standard_Integer UDegree() const = 0; - - Standard_EXPORT virtual Standard_Integer VDegree() const = 0; - - Standard_EXPORT virtual const TColgp_Array2OfPnt& SurfPoles() const = 0; - - Standard_EXPORT virtual const TColStd_Array2OfReal& SurfWeights() const = 0; - - Standard_EXPORT virtual const TColStd_Array1OfReal& SurfUKnots() const = 0; - - Standard_EXPORT virtual const TColStd_Array1OfReal& SurfVKnots() const = 0; - - Standard_EXPORT virtual const TColStd_Array1OfInteger& SurfUMults() const = 0; - - Standard_EXPORT virtual const TColStd_Array1OfInteger& SurfVMults() const = 0; - - Standard_EXPORT virtual Standard_Integer NbCurves2d() const = 0; - - Standard_EXPORT virtual void Curves2dShape (Standard_Integer& Degree, Standard_Integer& NbPoles, Standard_Integer& NbKnots) const = 0; - - Standard_EXPORT virtual void Curve2d (const Standard_Integer Index, TColgp_Array1OfPnt2d& TPoles, TColStd_Array1OfReal& TKnots, TColStd_Array1OfInteger& TMults) const = 0; - - Standard_EXPORT virtual Standard_Integer Curves2dDegree() const = 0; - - Standard_EXPORT virtual const TColgp_Array1OfPnt2d& Curve2dPoles (const Standard_Integer Index) const = 0; - - Standard_EXPORT virtual const TColStd_Array1OfReal& Curves2dKnots() const = 0; - - Standard_EXPORT virtual const TColStd_Array1OfInteger& Curves2dMults() const = 0; - - Standard_EXPORT virtual void TolReached (Standard_Real& Tol3d, Standard_Real& Tol2d) const = 0; - - Standard_EXPORT virtual Standard_Real TolCurveOnSurf (const Standard_Integer Index) const = 0; - Standard_EXPORT virtual ~AppBlend_Approx(); + Standard_EXPORT virtual void SurfShape(Standard_Integer& UDegree, + Standard_Integer& VDegree, + Standard_Integer& NbUPoles, + Standard_Integer& NbVPoles, + Standard_Integer& NbUKnots, + Standard_Integer& NbVKnots) const = 0; + Standard_EXPORT virtual void Surface(TColgp_Array2OfPnt& TPoles, + TColStd_Array2OfReal& TWeights, + TColStd_Array1OfReal& TUKnots, + TColStd_Array1OfReal& TVKnots, + TColStd_Array1OfInteger& TUMults, + TColStd_Array1OfInteger& TVMults) const = 0; + Standard_EXPORT virtual Standard_Integer UDegree() const = 0; -protected: + Standard_EXPORT virtual Standard_Integer VDegree() const = 0; + Standard_EXPORT virtual const TColgp_Array2OfPnt& SurfPoles() const = 0; + Standard_EXPORT virtual const TColStd_Array2OfReal& SurfWeights() const = 0; + Standard_EXPORT virtual const TColStd_Array1OfReal& SurfUKnots() const = 0; + Standard_EXPORT virtual const TColStd_Array1OfReal& SurfVKnots() const = 0; -private: + Standard_EXPORT virtual const TColStd_Array1OfInteger& SurfUMults() const = 0; + Standard_EXPORT virtual const TColStd_Array1OfInteger& SurfVMults() const = 0; + Standard_EXPORT virtual Standard_Integer NbCurves2d() const = 0; + Standard_EXPORT virtual void Curves2dShape(Standard_Integer& Degree, + Standard_Integer& NbPoles, + Standard_Integer& NbKnots) const = 0; + Standard_EXPORT virtual void Curve2d(const Standard_Integer Index, + TColgp_Array1OfPnt2d& TPoles, + TColStd_Array1OfReal& TKnots, + TColStd_Array1OfInteger& TMults) const = 0; -}; + Standard_EXPORT virtual Standard_Integer Curves2dDegree() const = 0; + Standard_EXPORT virtual const TColgp_Array1OfPnt2d& Curve2dPoles( + const Standard_Integer Index) const = 0; + Standard_EXPORT virtual const TColStd_Array1OfReal& Curves2dKnots() const = 0; + Standard_EXPORT virtual const TColStd_Array1OfInteger& Curves2dMults() const = 0; + Standard_EXPORT virtual void TolReached(Standard_Real& Tol3d, Standard_Real& Tol2d) const = 0; + Standard_EXPORT virtual Standard_Real TolCurveOnSurf(const Standard_Integer Index) const = 0; + Standard_EXPORT virtual ~AppBlend_Approx(); +protected: +private: +}; #endif // _AppBlend_Approx_HeaderFile diff --git a/opencascade/AppCont_ContMatrices.hxx b/opencascade/AppCont_ContMatrices.hxx index c136b9459..6b963e49b 100644 --- a/opencascade/AppCont_ContMatrices.hxx +++ b/opencascade/AppCont_ContMatrices.hxx @@ -18,10 +18,9 @@ // Stockage des matrices de resolution d approxiamtion continue. // La classe est limitee a 26 pour MMatrix et InvMMatrix, (pas de contraintes) -// pour IBPMatrix (contraintes de passage aux extremites) +// pour IBPMatrix (contraintes de passage aux extremites) // et IBTMatrix (contraintes de tangence aux extremites). - void InvMMatrix(const Standard_Integer classe, math_Matrix& M); void MMatrix(const Standard_Integer classe, math_Matrix& M); @@ -30,8 +29,6 @@ void IBPMatrix(const Standard_Integer classe, math_Matrix& M); void IBTMatrix(const Standard_Integer classe, math_Matrix& M); -void VBernstein(const Standard_Integer classe, - const Standard_Integer nbpoints, - math_Matrix& M); +void VBernstein(const Standard_Integer classe, const Standard_Integer nbpoints, math_Matrix& M); #endif diff --git a/opencascade/AppCont_Function.hxx b/opencascade/AppCont_Function.hxx index 4a3f223ed..2c3cdeeb0 100644 --- a/opencascade/AppCont_Function.hxx +++ b/opencascade/AppCont_Function.hxx @@ -27,31 +27,24 @@ class AppCont_Function { public: - AppCont_Function() { - myNbPnt = -1; + myNbPnt = -1; myNbPnt2d = -1; } //! Get number of 3d and 2d points returned by "Value" and "D1" functions. void GetNumberOfPoints(Standard_Integer& theNbPnt, Standard_Integer& theNbPnt2d) const { - theNbPnt = myNbPnt; + theNbPnt = myNbPnt; theNbPnt2d = myNbPnt2d; } //! Get number of 3d points returned by "Value" and "D1" functions. - Standard_Integer GetNbOf3dPoints() const - { - return myNbPnt; - } + Standard_Integer GetNbOf3dPoints() const { return myNbPnt; } //! Get number of 2d points returned by "Value" and "D1" functions. - Standard_Integer GetNbOf2dPoints() const - { - return myNbPnt2d; - } + Standard_Integer GetNbOf2dPoints() const { return myNbPnt2d; } //! Destructor virtual ~AppCont_Function() {} @@ -63,26 +56,26 @@ public: virtual Standard_Real LastParameter() const = 0; //! Returns the point at parameter . - virtual Standard_Boolean Value (const Standard_Real theU, - NCollection_Array1& thePnt2d, - NCollection_Array1& thePnt) const = 0; + virtual Standard_Boolean Value(const Standard_Real theU, + NCollection_Array1& thePnt2d, + NCollection_Array1& thePnt) const = 0; //! Returns the derivative at parameter . - virtual Standard_Boolean D1 (const Standard_Real theU, - NCollection_Array1& theVec2d, - NCollection_Array1& theVec) const = 0; - - //! Return information about peridicity in output paramateters space. - //! @param theDimIdx Defines index in output parameters space. 1 <= theDimIdx <= 3 * myNbPnt + 2 * myNbPnt2d. - virtual void PeriodInformation (const Standard_Integer /*theDimIdx*/, - Standard_Boolean& IsPeriodic, - Standard_Real& thePeriod) const + virtual Standard_Boolean D1(const Standard_Real theU, + NCollection_Array1& theVec2d, + NCollection_Array1& theVec) const = 0; + + //! Return information about peridicity in output paramateters space. + //! @param theDimIdx Defines index in output parameters space. 1 <= theDimIdx <= 3 * myNbPnt + 2 * + //! myNbPnt2d. + virtual void PeriodInformation(const Standard_Integer /*theDimIdx*/, + Standard_Boolean& IsPeriodic, + Standard_Real& thePeriod) const { IsPeriodic = Standard_False; - thePeriod = 0.0; + thePeriod = 0.0; }; - protected: Standard_Integer myNbPnt; Standard_Integer myNbPnt2d; diff --git a/opencascade/AppCont_LeastSquare.hxx b/opencascade/AppCont_LeastSquare.hxx index 67bdfb483..6dfa29e56 100644 --- a/opencascade/AppCont_LeastSquare.hxx +++ b/opencascade/AppCont_LeastSquare.hxx @@ -33,7 +33,6 @@ struct PeriodicityInfo class AppCont_LeastSquare { public: - Standard_EXPORT AppCont_LeastSquare(const AppCont_Function& SSP, const Standard_Real U0, const Standard_Real U1, @@ -44,31 +43,28 @@ public: Standard_EXPORT const AppParCurves_MultiCurve& Value(); - Standard_EXPORT void Error(Standard_Real& F, - Standard_Real& MaxE3d, - Standard_Real& MaxE2d) const; + Standard_EXPORT void Error(Standard_Real& F, Standard_Real& MaxE3d, Standard_Real& MaxE2d) const; Standard_EXPORT Standard_Boolean IsDone() const; private: - //! Fix border point evaluation. - void FixSingleBorderPoint(const AppCont_Function& theSSP, - const Standard_Real theU, - const Standard_Real theU0, - const Standard_Real theU1, + void FixSingleBorderPoint(const AppCont_Function& theSSP, + const Standard_Real theU, + const Standard_Real theU0, + const Standard_Real theU1, NCollection_Array1& theFix2d, NCollection_Array1& theFix); - AppParCurves_MultiCurve mySCU; - math_Matrix myPoints; - math_Matrix myPoles; - math_Vector myParam; - math_Matrix myVB; + AppParCurves_MultiCurve mySCU; + math_Matrix myPoints; + math_Matrix myPoles; + math_Vector myParam; + math_Matrix myVB; NCollection_Array1 myPerInfo; - Standard_Boolean myDone; - Standard_Integer myDegre; - Standard_Integer myNbdiscret, myNbP, myNbP2d; + Standard_Boolean myDone; + Standard_Integer myDegre; + Standard_Integer myNbdiscret, myNbP, myNbP2d; }; #endif diff --git a/opencascade/AppDef_Array1OfMultiPointConstraint.hxx b/opencascade/AppDef_Array1OfMultiPointConstraint.hxx index acd9bf0fc..1bdb4332e 100644 --- a/opencascade/AppDef_Array1OfMultiPointConstraint.hxx +++ b/opencascade/AppDef_Array1OfMultiPointConstraint.hxx @@ -22,5 +22,4 @@ typedef NCollection_Array1 AppDef_Array1OfMultiPointConstraint; - #endif diff --git a/opencascade/AppDef_BSpGradient_BFGSOfMyBSplGradientOfBSplineCompute.hxx b/opencascade/AppDef_BSpGradient_BFGSOfMyBSplGradientOfBSplineCompute.hxx index f8549c0fd..8f4d90ff3 100644 --- a/opencascade/AppDef_BSpGradient_BFGSOfMyBSplGradientOfBSplineCompute.hxx +++ b/opencascade/AppDef_BSpGradient_BFGSOfMyBSplGradientOfBSplineCompute.hxx @@ -30,42 +30,26 @@ class AppDef_BSpParLeastSquareOfMyBSplGradientOfBSplineCompute; class AppDef_BSpParFunctionOfMyBSplGradientOfBSplineCompute; class math_MultipleVarFunctionWithGradient; - - -class AppDef_BSpGradient_BFGSOfMyBSplGradientOfBSplineCompute : public math_BFGS +class AppDef_BSpGradient_BFGSOfMyBSplGradientOfBSplineCompute : public math_BFGS { public: - DEFINE_STANDARD_ALLOC - - Standard_EXPORT AppDef_BSpGradient_BFGSOfMyBSplGradientOfBSplineCompute(math_MultipleVarFunctionWithGradient& F, const math_Vector& StartingPoint, const Standard_Real Tolerance3d, const Standard_Real Tolerance2d, const Standard_Real Eps, const Standard_Integer NbIterations = 200); - - Standard_EXPORT virtual Standard_Boolean IsSolutionReached (math_MultipleVarFunctionWithGradient& F) const Standard_OVERRIDE; - - + Standard_EXPORT AppDef_BSpGradient_BFGSOfMyBSplGradientOfBSplineCompute( + math_MultipleVarFunctionWithGradient& F, + const math_Vector& StartingPoint, + const Standard_Real Tolerance3d, + const Standard_Real Tolerance2d, + const Standard_Real Eps, + const Standard_Integer NbIterations = 200); + Standard_EXPORT virtual Standard_Boolean IsSolutionReached( + math_MultipleVarFunctionWithGradient& F) const Standard_OVERRIDE; protected: - - - - - private: - - - Standard_Real myTol3d; Standard_Real myTol2d; - - }; - - - - - - #endif // _AppDef_BSpGradient_BFGSOfMyBSplGradientOfBSplineCompute_HeaderFile diff --git a/opencascade/AppDef_BSpParFunctionOfMyBSplGradientOfBSplineCompute.hxx b/opencascade/AppDef_BSpParFunctionOfMyBSplGradientOfBSplineCompute.hxx index 0a7ff5db3..0e1172fff 100644 --- a/opencascade/AppDef_BSpParFunctionOfMyBSplGradientOfBSplineCompute.hxx +++ b/opencascade/AppDef_BSpParFunctionOfMyBSplGradientOfBSplineCompute.hxx @@ -38,130 +38,121 @@ class AppDef_BSpParLeastSquareOfMyBSplGradientOfBSplineCompute; class AppParCurves_MultiBSpCurve; class math_Matrix; - - -class AppDef_BSpParFunctionOfMyBSplGradientOfBSplineCompute : public math_MultipleVarFunctionWithGradient +class AppDef_BSpParFunctionOfMyBSplGradientOfBSplineCompute + : public math_MultipleVarFunctionWithGradient { public: - DEFINE_STANDARD_ALLOC - //! initializes the fields of the function. The approximating //! curve has control points. - Standard_EXPORT AppDef_BSpParFunctionOfMyBSplGradientOfBSplineCompute(const AppDef_MultiLine& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, const math_Vector& Parameters, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, const Standard_Integer NbPol); - + Standard_EXPORT AppDef_BSpParFunctionOfMyBSplGradientOfBSplineCompute( + const AppDef_MultiLine& SSP, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, + const math_Vector& Parameters, + const TColStd_Array1OfReal& Knots, + const TColStd_Array1OfInteger& Mults, + const Standard_Integer NbPol); + //! returns the number of variables of the function. It //! corresponds to the number of MultiPoints. Standard_EXPORT Standard_Integer NbVariables() const; - + //! this method computes the new approximation of the //! MultiLine //! SSP and calculates F = sum (||Pui - Bi*Pi||2) for each //! point of the MultiLine. - Standard_EXPORT Standard_Boolean Value (const math_Vector& X, Standard_Real& F); - + Standard_EXPORT Standard_Boolean Value(const math_Vector& X, Standard_Real& F); + //! returns the gradient G of the sum above for the //! parameters Xi. - Standard_EXPORT Standard_Boolean Gradient (const math_Vector& X, math_Vector& G); - + Standard_EXPORT Standard_Boolean Gradient(const math_Vector& X, math_Vector& G); + //! returns the value F=sum(||Pui - Bi*Pi||)2. //! returns the value G = grad(F) for the parameters Xi. - Standard_EXPORT Standard_Boolean Values (const math_Vector& X, Standard_Real& F, math_Vector& G); - + Standard_EXPORT Standard_Boolean Values(const math_Vector& X, Standard_Real& F, math_Vector& G); + //! returns the new parameters of the MultiLine. Standard_EXPORT const math_Vector& NewParameters() const; - + //! returns the MultiBSpCurve approximating the set after //! computing the value F or Grad(F). Standard_EXPORT AppParCurves_MultiBSpCurve CurveValue(); - + //! returns the distance between the MultiPoint of range //! IPoint and the curve CurveIndex. - Standard_EXPORT Standard_Real Error (const Standard_Integer IPoint, const Standard_Integer CurveIndex); - + Standard_EXPORT Standard_Real Error(const Standard_Integer IPoint, + const Standard_Integer CurveIndex); + //! returns the maximum distance between the points //! and the MultiBSpCurve. Standard_EXPORT Standard_Real MaxError3d() const; - + //! returns the maximum distance between the points //! and the MultiBSpCurve. Standard_EXPORT Standard_Real MaxError2d() const; - + //! returns the function matrix used to approximate the //! multiline. Standard_EXPORT const math_Matrix& FunctionMatrix() const; - + //! returns the derivative function matrix used to approximate the //! multiline. Standard_EXPORT const math_Matrix& DerivativeFunctionMatrix() const; - + //! Returns the indexes of the first non null values of //! A and DA. //! The values are non null from Index(ieme point) +1 //! to Index(ieme point) + degree +1. Standard_EXPORT const math_IntegerVector& Index() const; - - Standard_EXPORT AppParCurves_Constraint FirstConstraint (const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, const Standard_Integer FirstPoint) const; - - Standard_EXPORT AppParCurves_Constraint LastConstraint (const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, const Standard_Integer LastPoint) const; - - Standard_EXPORT void SetFirstLambda (const Standard_Real l1); - - Standard_EXPORT void SetLastLambda (const Standard_Real l2); + Standard_EXPORT AppParCurves_Constraint + FirstConstraint(const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, + const Standard_Integer FirstPoint) const; + Standard_EXPORT AppParCurves_Constraint + LastConstraint(const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, + const Standard_Integer LastPoint) const; + Standard_EXPORT void SetFirstLambda(const Standard_Real l1); -protected: + Standard_EXPORT void SetLastLambda(const Standard_Real l2); - +protected: //! this method is used each time Value or Gradient is //! needed. - Standard_EXPORT void Perform (const math_Vector& X); - - - + Standard_EXPORT void Perform(const math_Vector& X); private: - - - - Standard_Boolean Done; - AppDef_MultiLine MyMultiLine; - AppParCurves_MultiBSpCurve MyMultiBSpCurve; - Standard_Integer nbpoles; - math_Vector myParameters; - Standard_Real FVal; - math_Vector ValGrad_F; - math_Matrix MyF; - math_Matrix PTLX; - math_Matrix PTLY; - math_Matrix PTLZ; - math_Matrix A; - math_Matrix DA; + Standard_Boolean Done; + AppDef_MultiLine MyMultiLine; + AppParCurves_MultiBSpCurve MyMultiBSpCurve; + Standard_Integer nbpoles; + math_Vector myParameters; + Standard_Real FVal; + math_Vector ValGrad_F; + math_Matrix MyF; + math_Matrix PTLX; + math_Matrix PTLY; + math_Matrix PTLZ; + math_Matrix A; + math_Matrix DA; AppDef_BSpParLeastSquareOfMyBSplGradientOfBSplineCompute MyLeastSquare; - Standard_Boolean Contraintes; - Standard_Integer NbP; - Standard_Integer NbCu; - Standard_Integer Adeb; - Standard_Integer Afin; - Handle(TColStd_HArray1OfInteger) tabdim; - Standard_Real ERR3d; - Standard_Real ERR2d; - Standard_Integer FirstP; - Standard_Integer LastP; - Handle(AppParCurves_HArray1OfConstraintCouple) myConstraints; - Standard_Real mylambda1; - Standard_Real mylambda2; - - + Standard_Boolean Contraintes; + Standard_Integer NbP; + Standard_Integer NbCu; + Standard_Integer Adeb; + Standard_Integer Afin; + Handle(TColStd_HArray1OfInteger) tabdim; + Standard_Real ERR3d; + Standard_Real ERR2d; + Standard_Integer FirstP; + Standard_Integer LastP; + Handle(AppParCurves_HArray1OfConstraintCouple) myConstraints; + Standard_Real mylambda1; + Standard_Real mylambda2; }; - - - - - - #endif // _AppDef_BSpParFunctionOfMyBSplGradientOfBSplineCompute_HeaderFile diff --git a/opencascade/AppDef_BSpParLeastSquareOfMyBSplGradientOfBSplineCompute.hxx b/opencascade/AppDef_BSpParLeastSquareOfMyBSplGradientOfBSplineCompute.hxx index 1c2bd3d1d..caa36666c 100644 --- a/opencascade/AppDef_BSpParLeastSquareOfMyBSplGradientOfBSplineCompute.hxx +++ b/opencascade/AppDef_BSpParLeastSquareOfMyBSplGradientOfBSplineCompute.hxx @@ -41,15 +41,11 @@ class AppParCurves_MultiCurve; class AppParCurves_MultiBSpCurve; class math_Matrix; - - -class AppDef_BSpParLeastSquareOfMyBSplGradientOfBSplineCompute +class AppDef_BSpParLeastSquareOfMyBSplGradientOfBSplineCompute { public: - DEFINE_STANDARD_ALLOC - //! given a MultiLine, this algorithm computes the least //! square resolution using the Householder-QR method. //! If the first and/or the last point is a constraint @@ -66,11 +62,24 @@ public: //! and is also the same for each MultiLine point because //! they are approximated in parallel(so with the same //! parameter, only the vector B changes). - Standard_EXPORT AppDef_BSpParLeastSquareOfMyBSplGradientOfBSplineCompute(const AppDef_MultiLine& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const AppParCurves_Constraint FirstCons, const AppParCurves_Constraint LastCons, const math_Vector& Parameters, const Standard_Integer NbPol); - + Standard_EXPORT AppDef_BSpParLeastSquareOfMyBSplGradientOfBSplineCompute( + const AppDef_MultiLine& SSP, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const AppParCurves_Constraint FirstCons, + const AppParCurves_Constraint LastCons, + const math_Vector& Parameters, + const Standard_Integer NbPol); + //! Initializes the fields of the object. - Standard_EXPORT AppDef_BSpParLeastSquareOfMyBSplGradientOfBSplineCompute(const AppDef_MultiLine& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const AppParCurves_Constraint FirstCons, const AppParCurves_Constraint LastCons, const Standard_Integer NbPol); - + Standard_EXPORT AppDef_BSpParLeastSquareOfMyBSplGradientOfBSplineCompute( + const AppDef_MultiLine& SSP, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const AppParCurves_Constraint FirstCons, + const AppParCurves_Constraint LastCons, + const Standard_Integer NbPol); + //! given a MultiLine, this algorithm computes the least //! square resolution using the Householder-QR method. //! If the first and/or the last point is a constraint @@ -86,171 +95,192 @@ public: //! and is also the same for each MultiLine point because //! they are approximated in parallel(so with the same //! parameter, only the vector B changes). - Standard_EXPORT AppDef_BSpParLeastSquareOfMyBSplGradientOfBSplineCompute(const AppDef_MultiLine& SSP, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const AppParCurves_Constraint FirstCons, const AppParCurves_Constraint LastCons, const math_Vector& Parameters, const Standard_Integer NbPol); - + Standard_EXPORT AppDef_BSpParLeastSquareOfMyBSplGradientOfBSplineCompute( + const AppDef_MultiLine& SSP, + const TColStd_Array1OfReal& Knots, + const TColStd_Array1OfInteger& Mults, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const AppParCurves_Constraint FirstCons, + const AppParCurves_Constraint LastCons, + const math_Vector& Parameters, + const Standard_Integer NbPol); + //! Initializes the fields of the object. - Standard_EXPORT AppDef_BSpParLeastSquareOfMyBSplGradientOfBSplineCompute(const AppDef_MultiLine& SSP, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const AppParCurves_Constraint FirstCons, const AppParCurves_Constraint LastCons, const Standard_Integer NbPol); - + Standard_EXPORT AppDef_BSpParLeastSquareOfMyBSplGradientOfBSplineCompute( + const AppDef_MultiLine& SSP, + const TColStd_Array1OfReal& Knots, + const TColStd_Array1OfInteger& Mults, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const AppParCurves_Constraint FirstCons, + const AppParCurves_Constraint LastCons, + const Standard_Integer NbPol); + //! Is used after having initialized the fields. //! The case "CurvaturePoint" is not treated in this method. - Standard_EXPORT void Perform (const math_Vector& Parameters); - + Standard_EXPORT void Perform(const math_Vector& Parameters); + //! Is used after having initialized the fields. - Standard_EXPORT void Perform (const math_Vector& Parameters, const Standard_Real l1, const Standard_Real l2); - + Standard_EXPORT void Perform(const math_Vector& Parameters, + const Standard_Real l1, + const Standard_Real l2); + //! Is used after having initialized the fields. //! is the tangent vector at the first point. //! is the tangent vector at the last point. - Standard_EXPORT void Perform (const math_Vector& Parameters, const math_Vector& V1t, const math_Vector& V2t, const Standard_Real l1, const Standard_Real l2); - + Standard_EXPORT void Perform(const math_Vector& Parameters, + const math_Vector& V1t, + const math_Vector& V2t, + const Standard_Real l1, + const Standard_Real l2); + //! Is used after having initialized the fields. //! is the tangent vector at the first point. //! is the tangent vector at the last point. //! is the tangent vector at the first point. //! is the tangent vector at the last point. - Standard_EXPORT void Perform (const math_Vector& Parameters, const math_Vector& V1t, const math_Vector& V2t, const math_Vector& V1c, const math_Vector& V2c, const Standard_Real l1, const Standard_Real l2); - + Standard_EXPORT void Perform(const math_Vector& Parameters, + const math_Vector& V1t, + const math_Vector& V2t, + const math_Vector& V1c, + const math_Vector& V2c, + const Standard_Real l1, + const Standard_Real l2); + //! returns True if all has been correctly done. Standard_EXPORT Standard_Boolean IsDone() const; - + //! returns the result of the approximation, i.e. all the //! Curves. //! An exception is raised if NotDone. Standard_EXPORT AppParCurves_MultiCurve BezierValue(); - + //! returns the result of the approximation, i.e. all the //! Curves. //! An exception is raised if NotDone. Standard_EXPORT const AppParCurves_MultiBSpCurve& BSplineValue(); - + //! returns the function matrix used to approximate the //! set. Standard_EXPORT const math_Matrix& FunctionMatrix() const; - + //! returns the derivative function matrix used //! to approximate the set. Standard_EXPORT const math_Matrix& DerivativeFunctionMatrix() const; - + //! returns the maximum errors between the MultiLine //! and the approximation curves. F is the sum of the square //! distances. Grad is the derivative vector of the //! function F. - Standard_EXPORT void ErrorGradient (math_Vector& Grad, Standard_Real& F, Standard_Real& MaxE3d, Standard_Real& MaxE2d); - + Standard_EXPORT void ErrorGradient(math_Vector& Grad, + Standard_Real& F, + Standard_Real& MaxE3d, + Standard_Real& MaxE2d); + //! returns the distances between the points of the //! multiline and the approximation curves. Standard_EXPORT const math_Matrix& Distance(); - + //! returns the maximum errors between the MultiLine //! and the approximation curves. F is the sum of the square //! distances. - Standard_EXPORT void Error (Standard_Real& F, Standard_Real& MaxE3d, Standard_Real& MaxE2d); - + Standard_EXPORT void Error(Standard_Real& F, Standard_Real& MaxE3d, Standard_Real& MaxE2d); + //! returns the value (P2 - P1)/ V1 if the first point //! was a tangency point. Standard_EXPORT Standard_Real FirstLambda() const; - + //! returns the value (PN - PN-1)/ VN if the last point //! was a tangency point. Standard_EXPORT Standard_Real LastLambda() const; - + //! returns the matrix of points value. Standard_EXPORT const math_Matrix& Points() const; - + //! returns the matrix of resulting control points value. Standard_EXPORT const math_Matrix& Poles() const; - + //! Returns the indexes of the first non null values of //! A and DA. //! The values are non null from Index(ieme point) +1 //! to Index(ieme point) + degree +1. Standard_EXPORT const math_IntegerVector& KIndex() const; - - - protected: - - //! is used by the constructors above. - Standard_EXPORT void Init (const AppDef_MultiLine& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint); - + Standard_EXPORT void Init(const AppDef_MultiLine& SSP, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint); + //! returns the number of second member columns. //! Is used internally to initialize the fields. - Standard_EXPORT Standard_Integer NbBColumns (const AppDef_MultiLine& SSP) const; - + Standard_EXPORT Standard_Integer NbBColumns(const AppDef_MultiLine& SSP) const; + //! returns the first point being fitted. - Standard_EXPORT Standard_Integer TheFirstPoint (const AppParCurves_Constraint FirstCons, const Standard_Integer FirstPoint) const; - + Standard_EXPORT Standard_Integer TheFirstPoint(const AppParCurves_Constraint FirstCons, + const Standard_Integer FirstPoint) const; + //! returns the last point being fitted. - Standard_EXPORT Standard_Integer TheLastPoint (const AppParCurves_Constraint LastCons, const Standard_Integer LastPoint) const; - - //! Affects the fields in the case of a constraint point. - Standard_EXPORT void Affect (const AppDef_MultiLine& SSP, const Standard_Integer Index, AppParCurves_Constraint& Cons, math_Vector& Vt, math_Vector& Vc); - - Standard_EXPORT void ComputeFunction (const math_Vector& Parameters); - - Standard_EXPORT void SearchIndex (math_IntegerVector& Index); - - //! computes internal matrixes for the resolution - Standard_EXPORT void MakeTAA (math_Vector& TheA, math_Vector& TheB); - - //! computes internal matrixes for the resolution - Standard_EXPORT void MakeTAA (math_Vector& TheA); - - //! computes internal matrixes for the resolution - Standard_EXPORT void MakeTAA (math_Vector& TheA, math_Matrix& TheB); + Standard_EXPORT Standard_Integer TheLastPoint(const AppParCurves_Constraint LastCons, + const Standard_Integer LastPoint) const; + //! Affects the fields in the case of a constraint point. + Standard_EXPORT void Affect(const AppDef_MultiLine& SSP, + const Standard_Integer Index, + AppParCurves_Constraint& Cons, + math_Vector& Vt, + math_Vector& Vc); + Standard_EXPORT void ComputeFunction(const math_Vector& Parameters); + Standard_EXPORT void SearchIndex(math_IntegerVector& Index); -private: + //! computes internal matrixes for the resolution + Standard_EXPORT void MakeTAA(math_Vector& TheA, math_Vector& TheB); + //! computes internal matrixes for the resolution + Standard_EXPORT void MakeTAA(math_Vector& TheA); + //! computes internal matrixes for the resolution + Standard_EXPORT void MakeTAA(math_Vector& TheA, math_Matrix& TheB); - AppParCurves_Constraint FirstConstraint; - AppParCurves_Constraint LastConstraint; - AppParCurves_MultiBSpCurve SCU; - Handle(TColStd_HArray1OfReal) myknots; +private: + AppParCurves_Constraint FirstConstraint; + AppParCurves_Constraint LastConstraint; + AppParCurves_MultiBSpCurve SCU; + Handle(TColStd_HArray1OfReal) myknots; Handle(TColStd_HArray1OfInteger) mymults; - math_Matrix mypoles; - math_Matrix A; - math_Matrix DA; - math_Matrix B2; - math_Matrix mypoints; - math_Vector Vflatknots; - math_Vector Vec1t; - math_Vector Vec1c; - math_Vector Vec2t; - math_Vector Vec2c; - math_Matrix theError; - math_IntegerVector myindex; - Standard_Real lambda1; - Standard_Real lambda2; - Standard_Integer FirstP; - Standard_Integer LastP; - Standard_Integer Nlignes; - Standard_Integer Ninc; - Standard_Integer NA; - Standard_Integer myfirstp; - Standard_Integer mylastp; - Standard_Integer resinit; - Standard_Integer resfin; - Standard_Integer nbP2d; - Standard_Integer nbP; - Standard_Integer nbpoles; - Standard_Integer deg; - Standard_Boolean done; - Standard_Boolean iscalculated; - Standard_Boolean isready; - - + math_Matrix mypoles; + math_Matrix A; + math_Matrix DA; + math_Matrix B2; + math_Matrix mypoints; + math_Vector Vflatknots; + math_Vector Vec1t; + math_Vector Vec1c; + math_Vector Vec2t; + math_Vector Vec2c; + math_Matrix theError; + math_IntegerVector myindex; + Standard_Real lambda1; + Standard_Real lambda2; + Standard_Integer FirstP; + Standard_Integer LastP; + Standard_Integer Nlignes; + Standard_Integer Ninc; + Standard_Integer NA; + Standard_Integer myfirstp; + Standard_Integer mylastp; + Standard_Integer resinit; + Standard_Integer resfin; + Standard_Integer nbP2d; + Standard_Integer nbP; + Standard_Integer nbpoles; + Standard_Integer deg; + Standard_Boolean done; + Standard_Boolean iscalculated; + Standard_Boolean isready; }; - - - - - - #endif // _AppDef_BSpParLeastSquareOfMyBSplGradientOfBSplineCompute_HeaderFile diff --git a/opencascade/AppDef_BSplineCompute.hxx b/opencascade/AppDef_BSplineCompute.hxx index 06d5e0620..32b8d888b 100644 --- a/opencascade/AppDef_BSplineCompute.hxx +++ b/opencascade/AppDef_BSplineCompute.hxx @@ -46,15 +46,11 @@ class AppDef_Gradient_BFGSOfMyGradientbisOfBSplineCompute; class AppParCurves_MultiBSpCurve; class AppParCurves_MultiCurve; - - -class AppDef_BSplineCompute +class AppDef_BSplineCompute { public: - DEFINE_STANDARD_ALLOC - //! The MultiLine will be approximated until tolerances //! will be reached. //! The approximation will be done from degreemin to degreemax @@ -64,58 +60,101 @@ public: //! //! The multiplicities of the internal knots is set by //! default. - Standard_EXPORT AppDef_BSplineCompute(const AppDef_MultiLine& Line, const Standard_Integer degreemin = 4, const Standard_Integer degreemax = 8, const Standard_Real Tolerance3d = 1.0e-3, const Standard_Real Tolerance2d = 1.0e-6, const Standard_Integer NbIterations = 5, const Standard_Boolean cutting = Standard_True, const Approx_ParametrizationType parametrization = Approx_ChordLength, const Standard_Boolean Squares = Standard_False); - + Standard_EXPORT AppDef_BSplineCompute( + const AppDef_MultiLine& Line, + const Standard_Integer degreemin = 4, + const Standard_Integer degreemax = 8, + const Standard_Real Tolerance3d = 1.0e-3, + const Standard_Real Tolerance2d = 1.0e-6, + const Standard_Integer NbIterations = 5, + const Standard_Boolean cutting = Standard_True, + const Approx_ParametrizationType parametrization = Approx_ChordLength, + const Standard_Boolean Squares = Standard_False); + //! The MultiLine will be approximated until tolerances //! will be reached. //! The approximation will be done from degreemin to degreemax //! with a cutting if the corresponding boolean is True. //! If is True, the computation will be done with //! no iteration at all. - Standard_EXPORT AppDef_BSplineCompute(const AppDef_MultiLine& Line, const math_Vector& Parameters, const Standard_Integer degreemin = 4, const Standard_Integer degreemax = 8, const Standard_Real Tolerance3d = 1.0e-03, const Standard_Real Tolerance2d = 1.0e-06, const Standard_Integer NbIterations = 5, const Standard_Boolean cutting = Standard_True, const Standard_Boolean Squares = Standard_False); - + Standard_EXPORT AppDef_BSplineCompute(const AppDef_MultiLine& Line, + const math_Vector& Parameters, + const Standard_Integer degreemin = 4, + const Standard_Integer degreemax = 8, + const Standard_Real Tolerance3d = 1.0e-03, + const Standard_Real Tolerance2d = 1.0e-06, + const Standard_Integer NbIterations = 5, + const Standard_Boolean cutting = Standard_True, + const Standard_Boolean Squares = Standard_False); + //! Initializes the fields of the algorithm. - Standard_EXPORT AppDef_BSplineCompute(const math_Vector& Parameters, const Standard_Integer degreemin = 4, const Standard_Integer degreemax = 8, const Standard_Real Tolerance3d = 1.0e-03, const Standard_Real Tolerance2d = 1.0e-06, const Standard_Integer NbIterations = 5, const Standard_Boolean cutting = Standard_True, const Standard_Boolean Squares = Standard_False); - + Standard_EXPORT AppDef_BSplineCompute(const math_Vector& Parameters, + const Standard_Integer degreemin = 4, + const Standard_Integer degreemax = 8, + const Standard_Real Tolerance3d = 1.0e-03, + const Standard_Real Tolerance2d = 1.0e-06, + const Standard_Integer NbIterations = 5, + const Standard_Boolean cutting = Standard_True, + const Standard_Boolean Squares = Standard_False); + //! Initializes the fields of the algorithm. - Standard_EXPORT AppDef_BSplineCompute(const Standard_Integer degreemin = 4, const Standard_Integer degreemax = 8, const Standard_Real Tolerance3d = 1.0e-03, const Standard_Real Tolerance2d = 1.0e-06, const Standard_Integer NbIterations = 5, const Standard_Boolean cutting = Standard_True, const Approx_ParametrizationType parametrization = Approx_ChordLength, const Standard_Boolean Squares = Standard_False); - + Standard_EXPORT AppDef_BSplineCompute( + const Standard_Integer degreemin = 4, + const Standard_Integer degreemax = 8, + const Standard_Real Tolerance3d = 1.0e-03, + const Standard_Real Tolerance2d = 1.0e-06, + const Standard_Integer NbIterations = 5, + const Standard_Boolean cutting = Standard_True, + const Approx_ParametrizationType parametrization = Approx_ChordLength, + const Standard_Boolean Squares = Standard_False); + //! Constructs an interpolation of the MultiLine //! The result will be a C2 curve of degree 3. - Standard_EXPORT void Interpol (const AppDef_MultiLine& Line); - + Standard_EXPORT void Interpol(const AppDef_MultiLine& Line); + //! Initializes the fields of the algorithm. - Standard_EXPORT void Init (const Standard_Integer degreemin = 4, const Standard_Integer degreemax = 8, const Standard_Real Tolerance3d = 1.0e-03, const Standard_Real Tolerance2d = 1.0e-06, const Standard_Integer NbIterations = 5, const Standard_Boolean cutting = Standard_True, const Approx_ParametrizationType parametrization = Approx_ChordLength, const Standard_Boolean Squares = Standard_False); - + Standard_EXPORT void Init(const Standard_Integer degreemin = 4, + const Standard_Integer degreemax = 8, + const Standard_Real Tolerance3d = 1.0e-03, + const Standard_Real Tolerance2d = 1.0e-06, + const Standard_Integer NbIterations = 5, + const Standard_Boolean cutting = Standard_True, + const Approx_ParametrizationType parametrization = Approx_ChordLength, + const Standard_Boolean Squares = Standard_False); + //! runs the algorithm after having initialized the fields. - Standard_EXPORT void Perform (const AppDef_MultiLine& Line); - + Standard_EXPORT void Perform(const AppDef_MultiLine& Line); + //! The approximation will begin with the //! set of parameters . - Standard_EXPORT void SetParameters (const math_Vector& ThePar); - + Standard_EXPORT void SetParameters(const math_Vector& ThePar); + //! The approximation will be done with the //! set of knots . The multiplicities will be set //! with the degree and the desired continuity. - Standard_EXPORT void SetKnots (const TColStd_Array1OfReal& Knots); - + Standard_EXPORT void SetKnots(const TColStd_Array1OfReal& Knots); + //! The approximation will be done with the //! set of knots and the multiplicities . - Standard_EXPORT void SetKnotsAndMultiplicities (const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults); - + Standard_EXPORT void SetKnotsAndMultiplicities(const TColStd_Array1OfReal& Knots, + const TColStd_Array1OfInteger& Mults); + //! changes the degrees of the approximation. - Standard_EXPORT void SetDegrees (const Standard_Integer degreemin, const Standard_Integer degreemax); - + Standard_EXPORT void SetDegrees(const Standard_Integer degreemin, + const Standard_Integer degreemax); + //! Changes the tolerances of the approximation. - Standard_EXPORT void SetTolerances (const Standard_Real Tolerance3d, const Standard_Real Tolerance2d); - + Standard_EXPORT void SetTolerances(const Standard_Real Tolerance3d, + const Standard_Real Tolerance2d); + //! sets the continuity of the spline. //! if C = 2, the spline will be C2. - Standard_EXPORT void SetContinuity (const Standard_Integer C); - + Standard_EXPORT void SetContinuity(const Standard_Integer C); + //! changes the first and the last constraint points. - Standard_EXPORT void SetConstraints (const AppParCurves_Constraint firstC, const AppParCurves_Constraint lastC); - + Standard_EXPORT void SetConstraints(const AppParCurves_Constraint firstC, + const AppParCurves_Constraint lastC); + //! Sets periodic flag. //! If thePeriodic = Standard_True, algorithm tries to build periodic //! multicurve using corresponding C1 boundary condition for first and last multipoints. @@ -126,93 +165,99 @@ public: //! the status NoApproximation has been sent by the user //! when more points were needed. Standard_EXPORT Standard_Boolean IsAllApproximated() const; - + //! returns False if the status NoPointsAdded has been sent. Standard_EXPORT Standard_Boolean IsToleranceReached() const; - + //! returns the tolerances 2d and 3d of the MultiBSpCurve. - Standard_EXPORT void Error (Standard_Real& tol3d, Standard_Real& tol2d) const; - + Standard_EXPORT void Error(Standard_Real& tol3d, Standard_Real& tol2d) const; + //! returns the result of the approximation. Standard_EXPORT const AppParCurves_MultiBSpCurve& Value() const; - + //! returns the result of the approximation. Standard_EXPORT AppParCurves_MultiBSpCurve& ChangeValue(); - + //! returns the new parameters of the approximation //! corresponding to the points of the MultiBSpCurve. Standard_EXPORT const TColStd_Array1OfReal& Parameters() const; - - - protected: - - - - - private: - - //! is internally used in the algorithm. - Standard_EXPORT Standard_Boolean Compute (const AppDef_MultiLine& Line, const Standard_Integer fpt, const Standard_Integer lpt, math_Vector& Para, const TColStd_Array1OfReal& Knots, TColStd_Array1OfInteger& Mults); - + Standard_EXPORT Standard_Boolean Compute(const AppDef_MultiLine& Line, + const Standard_Integer fpt, + const Standard_Integer lpt, + math_Vector& Para, + const TColStd_Array1OfReal& Knots, + TColStd_Array1OfInteger& Mults); + //! is internally used in the algorithm. - Standard_EXPORT Standard_Boolean ComputeCurve (const AppDef_MultiLine& Line, const Standard_Integer firspt, const Standard_Integer lastpt); - - //! computes new parameters between firstP and lastP. - Standard_EXPORT void Parameters (const AppDef_MultiLine& Line, const Standard_Integer firstP, const Standard_Integer LastP, math_Vector& TheParameters) const; - - Standard_EXPORT Standard_Real SearchFirstLambda (const AppDef_MultiLine& Line, const math_Vector& Para, const TColStd_Array1OfReal& Knots, const math_Vector& V, const Standard_Integer index) const; - - Standard_EXPORT Standard_Real SearchLastLambda (const AppDef_MultiLine& Line, const math_Vector& Para, const TColStd_Array1OfReal& Knots, const math_Vector& V, const Standard_Integer index) const; - - Standard_EXPORT void TangencyVector (const AppDef_MultiLine& Line, const AppParCurves_MultiCurve& C, const Standard_Real U, math_Vector& V) const; - - Standard_EXPORT void FirstTangencyVector (const AppDef_MultiLine& Line, const Standard_Integer index, math_Vector& V) const; - - Standard_EXPORT void LastTangencyVector (const AppDef_MultiLine& Line, const Standard_Integer index, math_Vector& V) const; - - Standard_EXPORT void FindRealConstraints (const AppDef_MultiLine& Line); - - - AppParCurves_MultiBSpCurve TheMultiBSpCurve; - Standard_Boolean alldone; - Standard_Boolean tolreached; - Approx_ParametrizationType Par; - Handle(TColStd_HArray1OfReal) myParameters; - Handle(TColStd_HArray1OfReal) myfirstParam; - Handle(TColStd_HArray1OfReal) myknots; - Handle(TColStd_HArray1OfInteger) mymults; - Standard_Boolean myhasknots; - Standard_Boolean myhasmults; - Handle(AppParCurves_HArray1OfConstraintCouple) myConstraints; - Standard_Integer mydegremin; - Standard_Integer mydegremax; - Standard_Real mytol3d; - Standard_Real mytol2d; - Standard_Real currenttol3d; - Standard_Real currenttol2d; - Standard_Boolean mycut; - Standard_Boolean mysquares; - Standard_Integer myitermax; - AppParCurves_Constraint myfirstC; - AppParCurves_Constraint mylastC; - AppParCurves_Constraint realfirstC; - AppParCurves_Constraint reallastC; - Standard_Integer mycont; - Standard_Real mylambda1; - Standard_Real mylambda2; - Standard_Boolean myPeriodic; + Standard_EXPORT Standard_Boolean ComputeCurve(const AppDef_MultiLine& Line, + const Standard_Integer firspt, + const Standard_Integer lastpt); + //! computes new parameters between firstP and lastP. + Standard_EXPORT void Parameters(const AppDef_MultiLine& Line, + const Standard_Integer firstP, + const Standard_Integer LastP, + math_Vector& TheParameters) const; -}; + Standard_EXPORT Standard_Real SearchFirstLambda(const AppDef_MultiLine& Line, + const math_Vector& Para, + const TColStd_Array1OfReal& Knots, + const math_Vector& V, + const Standard_Integer index) const; + Standard_EXPORT Standard_Real SearchLastLambda(const AppDef_MultiLine& Line, + const math_Vector& Para, + const TColStd_Array1OfReal& Knots, + const math_Vector& V, + const Standard_Integer index) const; + Standard_EXPORT void TangencyVector(const AppDef_MultiLine& Line, + const AppParCurves_MultiCurve& C, + const Standard_Real U, + math_Vector& V) const; + Standard_EXPORT void FirstTangencyVector(const AppDef_MultiLine& Line, + const Standard_Integer index, + math_Vector& V) const; + Standard_EXPORT void LastTangencyVector(const AppDef_MultiLine& Line, + const Standard_Integer index, + math_Vector& V) const; + Standard_EXPORT void FindRealConstraints(const AppDef_MultiLine& Line); + AppParCurves_MultiBSpCurve TheMultiBSpCurve; + Standard_Boolean alldone; + Standard_Boolean tolreached; + Approx_ParametrizationType Par; + Handle(TColStd_HArray1OfReal) myParameters; + Handle(TColStd_HArray1OfReal) myfirstParam; + Handle(TColStd_HArray1OfReal) myknots; + Handle(TColStd_HArray1OfInteger) mymults; + Standard_Boolean myhasknots; + Standard_Boolean myhasmults; + Handle(AppParCurves_HArray1OfConstraintCouple) myConstraints; + Standard_Integer mydegremin; + Standard_Integer mydegremax; + Standard_Real mytol3d; + Standard_Real mytol2d; + Standard_Real currenttol3d; + Standard_Real currenttol2d; + Standard_Boolean mycut; + Standard_Boolean mysquares; + Standard_Integer myitermax; + AppParCurves_Constraint myfirstC; + AppParCurves_Constraint mylastC; + AppParCurves_Constraint realfirstC; + AppParCurves_Constraint reallastC; + Standard_Integer mycont; + Standard_Real mylambda1; + Standard_Real mylambda2; + Standard_Boolean myPeriodic; +}; #endif // _AppDef_BSplineCompute_HeaderFile diff --git a/opencascade/AppDef_Compute.hxx b/opencascade/AppDef_Compute.hxx index 2dd4b06d6..b472c5609 100644 --- a/opencascade/AppDef_Compute.hxx +++ b/opencascade/AppDef_Compute.hxx @@ -43,151 +43,188 @@ class AppDef_Gradient_BFGSOfMyGradientOfCompute; class AppParCurves_MultiCurve; class AppParCurves_MultiBSpCurve; - - -class AppDef_Compute +class AppDef_Compute { public: - DEFINE_STANDARD_ALLOC - //! The MultiLine will be approximated until tolerances //! will be reached. //! The approximation will be done from degreemin to degreemax //! with a cutting if the corresponding boolean is True. //! If is True, the computation will be done with //! no iteration at all. - Standard_EXPORT AppDef_Compute(const AppDef_MultiLine& Line, const Standard_Integer degreemin = 4, const Standard_Integer degreemax = 8, const Standard_Real Tolerance3d = 1.0e-3, const Standard_Real Tolerance2d = 1.0e-6, const Standard_Integer NbIterations = 5, const Standard_Boolean cutting = Standard_True, const Approx_ParametrizationType parametrization = Approx_ChordLength, const Standard_Boolean Squares = Standard_False); - + Standard_EXPORT AppDef_Compute( + const AppDef_MultiLine& Line, + const Standard_Integer degreemin = 4, + const Standard_Integer degreemax = 8, + const Standard_Real Tolerance3d = 1.0e-3, + const Standard_Real Tolerance2d = 1.0e-6, + const Standard_Integer NbIterations = 5, + const Standard_Boolean cutting = Standard_True, + const Approx_ParametrizationType parametrization = Approx_ChordLength, + const Standard_Boolean Squares = Standard_False); + //! The MultiLine will be approximated until tolerances //! will be reached. //! The approximation will be done from degreemin to degreemax //! with a cutting if the corresponding boolean is True. //! If is True, the computation will be done with //! no iteration at all. - Standard_EXPORT AppDef_Compute(const AppDef_MultiLine& Line, const math_Vector& Parameters, const Standard_Integer degreemin = 4, const Standard_Integer degreemax = 8, const Standard_Real Tolerance3d = 1.0e-03, const Standard_Real Tolerance2d = 1.0e-06, const Standard_Integer NbIterations = 5, const Standard_Boolean cutting = Standard_True, const Standard_Boolean Squares = Standard_False); - + Standard_EXPORT AppDef_Compute(const AppDef_MultiLine& Line, + const math_Vector& Parameters, + const Standard_Integer degreemin = 4, + const Standard_Integer degreemax = 8, + const Standard_Real Tolerance3d = 1.0e-03, + const Standard_Real Tolerance2d = 1.0e-06, + const Standard_Integer NbIterations = 5, + const Standard_Boolean cutting = Standard_True, + const Standard_Boolean Squares = Standard_False); + //! Initializes the fields of the algorithm. - Standard_EXPORT AppDef_Compute(const math_Vector& Parameters, const Standard_Integer degreemin = 4, const Standard_Integer degreemax = 8, const Standard_Real Tolerance3d = 1.0e-03, const Standard_Real Tolerance2d = 1.0e-06, const Standard_Integer NbIterations = 5, const Standard_Boolean cutting = Standard_True, const Standard_Boolean Squares = Standard_False); - + Standard_EXPORT AppDef_Compute(const math_Vector& Parameters, + const Standard_Integer degreemin = 4, + const Standard_Integer degreemax = 8, + const Standard_Real Tolerance3d = 1.0e-03, + const Standard_Real Tolerance2d = 1.0e-06, + const Standard_Integer NbIterations = 5, + const Standard_Boolean cutting = Standard_True, + const Standard_Boolean Squares = Standard_False); + //! Initializes the fields of the algorithm. - Standard_EXPORT AppDef_Compute(const Standard_Integer degreemin = 4, const Standard_Integer degreemax = 8, const Standard_Real Tolerance3d = 1.0e-03, const Standard_Real Tolerance2d = 1.0e-06, const Standard_Integer NbIterations = 5, const Standard_Boolean cutting = Standard_True, const Approx_ParametrizationType parametrization = Approx_ChordLength, const Standard_Boolean Squares = Standard_False); - + Standard_EXPORT AppDef_Compute( + const Standard_Integer degreemin = 4, + const Standard_Integer degreemax = 8, + const Standard_Real Tolerance3d = 1.0e-03, + const Standard_Real Tolerance2d = 1.0e-06, + const Standard_Integer NbIterations = 5, + const Standard_Boolean cutting = Standard_True, + const Approx_ParametrizationType parametrization = Approx_ChordLength, + const Standard_Boolean Squares = Standard_False); + //! Initializes the fields of the algorithm. - Standard_EXPORT void Init (const Standard_Integer degreemin = 4, const Standard_Integer degreemax = 8, const Standard_Real Tolerance3d = 1.0e-03, const Standard_Real Tolerance2d = 1.0e-06, const Standard_Integer NbIterations = 5, const Standard_Boolean cutting = Standard_True, const Approx_ParametrizationType parametrization = Approx_ChordLength, const Standard_Boolean Squares = Standard_False); - + Standard_EXPORT void Init(const Standard_Integer degreemin = 4, + const Standard_Integer degreemax = 8, + const Standard_Real Tolerance3d = 1.0e-03, + const Standard_Real Tolerance2d = 1.0e-06, + const Standard_Integer NbIterations = 5, + const Standard_Boolean cutting = Standard_True, + const Approx_ParametrizationType parametrization = Approx_ChordLength, + const Standard_Boolean Squares = Standard_False); + //! runs the algorithm after having initialized the fields. - Standard_EXPORT void Perform (const AppDef_MultiLine& Line); - + Standard_EXPORT void Perform(const AppDef_MultiLine& Line); + //! changes the degrees of the approximation. - Standard_EXPORT void SetDegrees (const Standard_Integer degreemin, const Standard_Integer degreemax); - + Standard_EXPORT void SetDegrees(const Standard_Integer degreemin, + const Standard_Integer degreemax); + //! Changes the tolerances of the approximation. - Standard_EXPORT void SetTolerances (const Standard_Real Tolerance3d, const Standard_Real Tolerance2d); - + Standard_EXPORT void SetTolerances(const Standard_Real Tolerance3d, + const Standard_Real Tolerance2d); + //! changes the first and the last constraint points. - Standard_EXPORT void SetConstraints (const AppParCurves_Constraint firstC, const AppParCurves_Constraint lastC); - + Standard_EXPORT void SetConstraints(const AppParCurves_Constraint firstC, + const AppParCurves_Constraint lastC); + //! returns False if at a moment of the approximation, //! the status NoApproximation has been sent by the user //! when more points were needed. Standard_EXPORT Standard_Boolean IsAllApproximated() const; - + //! returns False if the status NoPointsAdded has been sent. Standard_EXPORT Standard_Boolean IsToleranceReached() const; - + //! returns the tolerances 2d and 3d of the MultiCurve. - Standard_EXPORT void Error (const Standard_Integer Index, Standard_Real& tol3d, Standard_Real& tol2d) const; - + Standard_EXPORT void Error(const Standard_Integer Index, + Standard_Real& tol3d, + Standard_Real& tol2d) const; + //! Returns the number of MultiCurve doing the approximation //! of the MultiLine. Standard_EXPORT Standard_Integer NbMultiCurves() const; - + //! returns the result of the approximation. - Standard_EXPORT const AppParCurves_MultiCurve& Value (const Standard_Integer Index = 1) const; - + Standard_EXPORT const AppParCurves_MultiCurve& Value(const Standard_Integer Index = 1) const; + //! returns the result of the approximation. - Standard_EXPORT AppParCurves_MultiCurve& ChangeValue (const Standard_Integer Index = 1); - + Standard_EXPORT AppParCurves_MultiCurve& ChangeValue(const Standard_Integer Index = 1); + //! returns the result of the approximation. Standard_EXPORT const AppParCurves_MultiBSpCurve& SplineValue(); - + //! returns the type of parametrization - Standard_EXPORT Approx_ParametrizationType Parametrization () const; - + Standard_EXPORT Approx_ParametrizationType Parametrization() const; + //! returns the new parameters of the approximation //! corresponding to the points of the multicurve . - Standard_EXPORT const TColStd_Array1OfReal& Parameters (const Standard_Integer Index = 1) const; - - + Standard_EXPORT const TColStd_Array1OfReal& Parameters(const Standard_Integer Index = 1) const; protected: - - - - - private: - - //! is internally used in the algorithm. - Standard_EXPORT Standard_Boolean Compute (const AppDef_MultiLine& Line, - const Standard_Integer fpt, - const Standard_Integer lpt, - math_Vector& Para, - Standard_Real& TheTol3d, - Standard_Real& TheTol2d, - Standard_Integer& indbad); - + Standard_EXPORT Standard_Boolean Compute(const AppDef_MultiLine& Line, + const Standard_Integer fpt, + const Standard_Integer lpt, + math_Vector& Para, + Standard_Real& TheTol3d, + Standard_Real& TheTol2d, + Standard_Integer& indbad); + //! is internally used in the algorithm. - Standard_EXPORT Standard_Boolean ComputeCurve (const AppDef_MultiLine& Line, const Standard_Integer firspt, const Standard_Integer lastpt); - + Standard_EXPORT Standard_Boolean ComputeCurve(const AppDef_MultiLine& Line, + const Standard_Integer firspt, + const Standard_Integer lastpt); + //! computes new parameters between firstP and lastP. - Standard_EXPORT void Parameters (const AppDef_MultiLine& Line, const Standard_Integer firstP, const Standard_Integer LastP, math_Vector& TheParameters) const; - - Standard_EXPORT Standard_Real SearchFirstLambda (const AppDef_MultiLine& Line, const math_Vector& Para, const math_Vector& V, const Standard_Integer index) const; - - Standard_EXPORT Standard_Real SearchLastLambda (const AppDef_MultiLine& Line, const math_Vector& Para, const math_Vector& V, const Standard_Integer index) const; - - Standard_EXPORT void FirstTangencyVector (const AppDef_MultiLine& Line, const Standard_Integer index, math_Vector& V) const; - - Standard_EXPORT void LastTangencyVector (const AppDef_MultiLine& Line, const Standard_Integer index, math_Vector& V) const; - - - AppParCurves_SequenceOfMultiCurve myMultiCurves; - AppParCurves_MultiCurve TheMultiCurve; - AppParCurves_MultiBSpCurve myspline; - Standard_Boolean alldone; - Standard_Boolean tolreached; - Approx_ParametrizationType Par; - Handle(TColStd_HArray1OfReal) myParameters; - Handle(TColStd_HArray1OfReal) myfirstParam; - Approx_SequenceOfHArray1OfReal myPar; - TColStd_SequenceOfReal Tolers3d; - TColStd_SequenceOfReal Tolers2d; + Standard_EXPORT void Parameters(const AppDef_MultiLine& Line, + const Standard_Integer firstP, + const Standard_Integer LastP, + math_Vector& TheParameters) const; + + Standard_EXPORT Standard_Real SearchFirstLambda(const AppDef_MultiLine& Line, + const math_Vector& Para, + const math_Vector& V, + const Standard_Integer index) const; + + Standard_EXPORT Standard_Real SearchLastLambda(const AppDef_MultiLine& Line, + const math_Vector& Para, + const math_Vector& V, + const Standard_Integer index) const; + + Standard_EXPORT void FirstTangencyVector(const AppDef_MultiLine& Line, + const Standard_Integer index, + math_Vector& V) const; + + Standard_EXPORT void LastTangencyVector(const AppDef_MultiLine& Line, + const Standard_Integer index, + math_Vector& V) const; + + AppParCurves_SequenceOfMultiCurve myMultiCurves; + AppParCurves_MultiCurve TheMultiCurve; + AppParCurves_MultiBSpCurve myspline; + Standard_Boolean alldone; + Standard_Boolean tolreached; + Approx_ParametrizationType Par; + Handle(TColStd_HArray1OfReal) myParameters; + Handle(TColStd_HArray1OfReal) myfirstParam; + Approx_SequenceOfHArray1OfReal myPar; + TColStd_SequenceOfReal Tolers3d; + TColStd_SequenceOfReal Tolers2d; Handle(AppParCurves_HArray1OfConstraintCouple) myConstraints; - Standard_Integer mydegremin; - Standard_Integer mydegremax; - Standard_Real mytol3d; - Standard_Real mytol2d; - Standard_Real currenttol3d; - Standard_Real currenttol2d; - Standard_Boolean mycut; - Standard_Boolean mysquares; - Standard_Integer myitermax; - AppParCurves_Constraint myfirstC; - AppParCurves_Constraint mylastC; - Standard_Integer myMultiLineNb; - Standard_Boolean myIsClear; - - + Standard_Integer mydegremin; + Standard_Integer mydegremax; + Standard_Real mytol3d; + Standard_Real mytol2d; + Standard_Real currenttol3d; + Standard_Real currenttol2d; + Standard_Boolean mycut; + Standard_Boolean mysquares; + Standard_Integer myitermax; + AppParCurves_Constraint myfirstC; + AppParCurves_Constraint mylastC; + Standard_Integer myMultiLineNb; + Standard_Boolean myIsClear; }; - - - - - - #endif // _AppDef_Compute_HeaderFile diff --git a/opencascade/AppDef_Gradient_BFGSOfMyGradientOfCompute.hxx b/opencascade/AppDef_Gradient_BFGSOfMyGradientOfCompute.hxx index c3b011b8e..2643db270 100644 --- a/opencascade/AppDef_Gradient_BFGSOfMyGradientOfCompute.hxx +++ b/opencascade/AppDef_Gradient_BFGSOfMyGradientOfCompute.hxx @@ -31,42 +31,26 @@ class AppDef_ResConstraintOfMyGradientOfCompute; class AppDef_ParFunctionOfMyGradientOfCompute; class math_MultipleVarFunctionWithGradient; - - -class AppDef_Gradient_BFGSOfMyGradientOfCompute : public math_BFGS +class AppDef_Gradient_BFGSOfMyGradientOfCompute : public math_BFGS { public: - DEFINE_STANDARD_ALLOC - - Standard_EXPORT AppDef_Gradient_BFGSOfMyGradientOfCompute(math_MultipleVarFunctionWithGradient& F, const math_Vector& StartingPoint, const Standard_Real Tolerance3d, const Standard_Real Tolerance2d, const Standard_Real Eps, const Standard_Integer NbIterations = 200); - - Standard_EXPORT virtual Standard_Boolean IsSolutionReached (math_MultipleVarFunctionWithGradient& F) const Standard_OVERRIDE; - - + Standard_EXPORT AppDef_Gradient_BFGSOfMyGradientOfCompute( + math_MultipleVarFunctionWithGradient& F, + const math_Vector& StartingPoint, + const Standard_Real Tolerance3d, + const Standard_Real Tolerance2d, + const Standard_Real Eps, + const Standard_Integer NbIterations = 200); + Standard_EXPORT virtual Standard_Boolean IsSolutionReached( + math_MultipleVarFunctionWithGradient& F) const Standard_OVERRIDE; protected: - - - - - private: - - - Standard_Real myTol3d; Standard_Real myTol2d; - - }; - - - - - - #endif // _AppDef_Gradient_BFGSOfMyGradientOfCompute_HeaderFile diff --git a/opencascade/AppDef_Gradient_BFGSOfMyGradientbisOfBSplineCompute.hxx b/opencascade/AppDef_Gradient_BFGSOfMyGradientbisOfBSplineCompute.hxx index 4f45e380d..8ac68c822 100644 --- a/opencascade/AppDef_Gradient_BFGSOfMyGradientbisOfBSplineCompute.hxx +++ b/opencascade/AppDef_Gradient_BFGSOfMyGradientbisOfBSplineCompute.hxx @@ -31,42 +31,26 @@ class AppDef_ResConstraintOfMyGradientbisOfBSplineCompute; class AppDef_ParFunctionOfMyGradientbisOfBSplineCompute; class math_MultipleVarFunctionWithGradient; - - -class AppDef_Gradient_BFGSOfMyGradientbisOfBSplineCompute : public math_BFGS +class AppDef_Gradient_BFGSOfMyGradientbisOfBSplineCompute : public math_BFGS { public: - DEFINE_STANDARD_ALLOC - - Standard_EXPORT AppDef_Gradient_BFGSOfMyGradientbisOfBSplineCompute(math_MultipleVarFunctionWithGradient& F, const math_Vector& StartingPoint, const Standard_Real Tolerance3d, const Standard_Real Tolerance2d, const Standard_Real Eps, const Standard_Integer NbIterations = 200); - - Standard_EXPORT virtual Standard_Boolean IsSolutionReached (math_MultipleVarFunctionWithGradient& F) const Standard_OVERRIDE; - - + Standard_EXPORT AppDef_Gradient_BFGSOfMyGradientbisOfBSplineCompute( + math_MultipleVarFunctionWithGradient& F, + const math_Vector& StartingPoint, + const Standard_Real Tolerance3d, + const Standard_Real Tolerance2d, + const Standard_Real Eps, + const Standard_Integer NbIterations = 200); + Standard_EXPORT virtual Standard_Boolean IsSolutionReached( + math_MultipleVarFunctionWithGradient& F) const Standard_OVERRIDE; protected: - - - - - private: - - - Standard_Real myTol3d; Standard_Real myTol2d; - - }; - - - - - - #endif // _AppDef_Gradient_BFGSOfMyGradientbisOfBSplineCompute_HeaderFile diff --git a/opencascade/AppDef_Gradient_BFGSOfTheGradient.hxx b/opencascade/AppDef_Gradient_BFGSOfTheGradient.hxx index dda9a709d..12e3af9ac 100644 --- a/opencascade/AppDef_Gradient_BFGSOfTheGradient.hxx +++ b/opencascade/AppDef_Gradient_BFGSOfTheGradient.hxx @@ -31,42 +31,25 @@ class AppDef_ResConstraintOfTheGradient; class AppDef_ParFunctionOfTheGradient; class math_MultipleVarFunctionWithGradient; - - -class AppDef_Gradient_BFGSOfTheGradient : public math_BFGS +class AppDef_Gradient_BFGSOfTheGradient : public math_BFGS { public: - DEFINE_STANDARD_ALLOC - - Standard_EXPORT AppDef_Gradient_BFGSOfTheGradient(math_MultipleVarFunctionWithGradient& F, const math_Vector& StartingPoint, const Standard_Real Tolerance3d, const Standard_Real Tolerance2d, const Standard_Real Eps, const Standard_Integer NbIterations = 200); - - Standard_EXPORT virtual Standard_Boolean IsSolutionReached (math_MultipleVarFunctionWithGradient& F) const Standard_OVERRIDE; - - + Standard_EXPORT AppDef_Gradient_BFGSOfTheGradient(math_MultipleVarFunctionWithGradient& F, + const math_Vector& StartingPoint, + const Standard_Real Tolerance3d, + const Standard_Real Tolerance2d, + const Standard_Real Eps, + const Standard_Integer NbIterations = 200); + Standard_EXPORT virtual Standard_Boolean IsSolutionReached( + math_MultipleVarFunctionWithGradient& F) const Standard_OVERRIDE; protected: - - - - - private: - - - Standard_Real myTol3d; Standard_Real myTol2d; - - }; - - - - - - #endif // _AppDef_Gradient_BFGSOfTheGradient_HeaderFile diff --git a/opencascade/AppDef_HArray1OfMultiPointConstraint.hxx b/opencascade/AppDef_HArray1OfMultiPointConstraint.hxx index 987985ad5..e8582620f 100644 --- a/opencascade/AppDef_HArray1OfMultiPointConstraint.hxx +++ b/opencascade/AppDef_HArray1OfMultiPointConstraint.hxx @@ -23,5 +23,4 @@ DEFINE_HARRAY1(AppDef_HArray1OfMultiPointConstraint, AppDef_Array1OfMultiPointConstraint) - #endif diff --git a/opencascade/AppDef_LinearCriteria.hxx b/opencascade/AppDef_LinearCriteria.hxx index 7c7d2938b..5cdbea5ee 100644 --- a/opencascade/AppDef_LinearCriteria.hxx +++ b/opencascade/AppDef_LinearCriteria.hxx @@ -30,7 +30,6 @@ class FEmTool_ElementaryCriterion; class FEmTool_Curve; class math_Matrix; - class AppDef_LinearCriteria; DEFINE_STANDARD_HANDLE(AppDef_LinearCriteria, AppDef_SmoothCriterion) @@ -40,80 +39,87 @@ class AppDef_LinearCriteria : public AppDef_SmoothCriterion { public: + Standard_EXPORT AppDef_LinearCriteria(const AppDef_MultiLine& SSP, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint); - - Standard_EXPORT AppDef_LinearCriteria(const AppDef_MultiLine& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint); - - Standard_EXPORT void SetParameters (const Handle(TColStd_HArray1OfReal)& Parameters) Standard_OVERRIDE; - - Standard_EXPORT void SetCurve (const Handle(FEmTool_Curve)& C) Standard_OVERRIDE; - - Standard_EXPORT void GetCurve (Handle(FEmTool_Curve)& C) const Standard_OVERRIDE; - - Standard_EXPORT void SetEstimation (const Standard_Real E1, const Standard_Real E2, const Standard_Real E3) Standard_OVERRIDE; - - Standard_EXPORT Standard_Real& EstLength() Standard_OVERRIDE; - - Standard_EXPORT void GetEstimation (Standard_Real& E1, Standard_Real& E2, Standard_Real& E3) const Standard_OVERRIDE; - - Standard_EXPORT Handle(FEmTool_HAssemblyTable) AssemblyTable() const Standard_OVERRIDE; - - Standard_EXPORT Handle(TColStd_HArray2OfInteger) DependenceTable() const Standard_OVERRIDE; - - Standard_EXPORT Standard_Integer QualityValues (const Standard_Real J1min, const Standard_Real J2min, const Standard_Real J3min, Standard_Real& J1, Standard_Real& J2, Standard_Real& J3) Standard_OVERRIDE; - - Standard_EXPORT void ErrorValues (Standard_Real& MaxError, Standard_Real& QuadraticError, Standard_Real& AverageError) Standard_OVERRIDE; - - Standard_EXPORT void Hessian (const Standard_Integer Element, const Standard_Integer Dimension1, const Standard_Integer Dimension2, math_Matrix& H) Standard_OVERRIDE; - - Standard_EXPORT void Gradient (const Standard_Integer Element, const Standard_Integer Dimension, math_Vector& G) Standard_OVERRIDE; - - //! Convert the assembly Vector in an Curve; - Standard_EXPORT void InputVector (const math_Vector& X, const Handle(FEmTool_HAssemblyTable)& AssTable) Standard_OVERRIDE; - - Standard_EXPORT void SetWeight (const Standard_Real QuadraticWeight, const Standard_Real QualityWeight, const Standard_Real percentJ1, const Standard_Real percentJ2, const Standard_Real percentJ3) Standard_OVERRIDE; - - Standard_EXPORT void GetWeight (Standard_Real& QuadraticWeight, Standard_Real& QualityWeight) const Standard_OVERRIDE; - - Standard_EXPORT void SetWeight (const TColStd_Array1OfReal& Weight) Standard_OVERRIDE; + Standard_EXPORT void SetParameters(const Handle(TColStd_HArray1OfReal)& Parameters) + Standard_OVERRIDE; + Standard_EXPORT void SetCurve(const Handle(FEmTool_Curve)& C) Standard_OVERRIDE; + Standard_EXPORT void GetCurve(Handle(FEmTool_Curve)& C) const Standard_OVERRIDE; + Standard_EXPORT void SetEstimation(const Standard_Real E1, + const Standard_Real E2, + const Standard_Real E3) Standard_OVERRIDE; - DEFINE_STANDARD_RTTIEXT(AppDef_LinearCriteria,AppDef_SmoothCriterion) - -protected: + Standard_EXPORT Standard_Real& EstLength() Standard_OVERRIDE; + Standard_EXPORT void GetEstimation(Standard_Real& E1, + Standard_Real& E2, + Standard_Real& E3) const Standard_OVERRIDE; + Standard_EXPORT Handle(FEmTool_HAssemblyTable) AssemblyTable() const Standard_OVERRIDE; + Standard_EXPORT Handle(TColStd_HArray2OfInteger) DependenceTable() const Standard_OVERRIDE; -private: + Standard_EXPORT Standard_Integer QualityValues(const Standard_Real J1min, + const Standard_Real J2min, + const Standard_Real J3min, + Standard_Real& J1, + Standard_Real& J2, + Standard_Real& J3) Standard_OVERRIDE; - - Standard_EXPORT void BuildCache (const Standard_Integer E); + Standard_EXPORT void ErrorValues(Standard_Real& MaxError, + Standard_Real& QuadraticError, + Standard_Real& AverageError) Standard_OVERRIDE; - AppDef_MultiLine mySSP; - Handle(TColStd_HArray1OfReal) myParameters; - Handle(TColStd_HArray1OfReal) myCache; - Handle(FEmTool_ElementaryCriterion) myCriteria[3]; - Standard_Real myEstimation[3]; - Standard_Real myQuadraticWeight; - Standard_Real myQualityWeight; - Standard_Real myPercent[3]; - TColStd_Array1OfReal myPntWeight; - Handle(FEmTool_Curve) myCurve; - Standard_Real myLength; - Standard_Integer myE; - Standard_Integer IF; - Standard_Integer IL; + Standard_EXPORT void Hessian(const Standard_Integer Element, + const Standard_Integer Dimension1, + const Standard_Integer Dimension2, + math_Matrix& H) Standard_OVERRIDE; + Standard_EXPORT void Gradient(const Standard_Integer Element, + const Standard_Integer Dimension, + math_Vector& G) Standard_OVERRIDE; -}; + //! Convert the assembly Vector in an Curve; + Standard_EXPORT void InputVector(const math_Vector& X, + const Handle(FEmTool_HAssemblyTable)& AssTable) + Standard_OVERRIDE; + Standard_EXPORT void SetWeight(const Standard_Real QuadraticWeight, + const Standard_Real QualityWeight, + const Standard_Real percentJ1, + const Standard_Real percentJ2, + const Standard_Real percentJ3) Standard_OVERRIDE; + Standard_EXPORT void GetWeight(Standard_Real& QuadraticWeight, + Standard_Real& QualityWeight) const Standard_OVERRIDE; + Standard_EXPORT void SetWeight(const TColStd_Array1OfReal& Weight) Standard_OVERRIDE; + DEFINE_STANDARD_RTTIEXT(AppDef_LinearCriteria, AppDef_SmoothCriterion) +protected: +private: + Standard_EXPORT void BuildCache(const Standard_Integer E); + AppDef_MultiLine mySSP; + Handle(TColStd_HArray1OfReal) myParameters; + Handle(TColStd_HArray1OfReal) myCache; + Handle(FEmTool_ElementaryCriterion) myCriteria[3]; + Standard_Real myEstimation[3]; + Standard_Real myQuadraticWeight; + Standard_Real myQualityWeight; + Standard_Real myPercent[3]; + TColStd_Array1OfReal myPntWeight; + Handle(FEmTool_Curve) myCurve; + Standard_Real myLength; + Standard_Integer myE; + Standard_Integer IF; + Standard_Integer IL; +}; #endif // _AppDef_LinearCriteria_HeaderFile diff --git a/opencascade/AppDef_MultiLine.hxx b/opencascade/AppDef_MultiLine.hxx index 737a73f21..5183ba890 100644 --- a/opencascade/AppDef_MultiLine.hxx +++ b/opencascade/AppDef_MultiLine.hxx @@ -29,7 +29,6 @@ #include class AppDef_MultiPointConstraint; - //! This class describes the organized set of points used in the //! approximations. A MultiLine is composed of n //! MultiPointConstraints. @@ -51,88 +50,69 @@ class AppDef_MultiPointConstraint; //! (P1, Q1, ...R1), ...(Pn, Qn, ...Rn) n= 1,...NbMult are //! MultiPointConstraints. //! There are NbPoints points in each MultiPointConstraint. -class AppDef_MultiLine +class AppDef_MultiLine { public: - DEFINE_STANDARD_ALLOC - //! creates an undefined MultiLine. Standard_EXPORT AppDef_MultiLine(); - + //! given the number NbMult of MultiPointConstraints of this //! MultiLine , it initializes all the fields.SetValue must be //! called in order for the values of the multipoint //! constraint to be taken into account. //! An exception is raised if NbMult < 0. Standard_EXPORT AppDef_MultiLine(const Standard_Integer NbMult); - + //! Constructs a MultiLine with an array of MultiPointConstraints. Standard_EXPORT AppDef_MultiLine(const AppDef_Array1OfMultiPointConstraint& tabMultiP); - + //! The MultiLine constructed will have one line of //! 3d points without their tangencies. Standard_EXPORT AppDef_MultiLine(const TColgp_Array1OfPnt& tabP3d); - + //! The MultiLine constructed will have one line of //! 2d points without their tangencies. Standard_EXPORT AppDef_MultiLine(const TColgp_Array1OfPnt2d& tabP2d); - + //! returns the number of MultiPointConstraints of the //! MultiLine. Standard_EXPORT Standard_Integer NbMultiPoints() const; - + //! returns the number of Points from MultiPoints composing //! the MultiLine. Standard_EXPORT Standard_Integer NbPoints() const; - + //! Sets the value of the parameter for the //! MultiPointConstraint at position Index. //! Exceptions //! - Standard_OutOfRange if Index is less //! than 0 or Index is greater than the number //! of Multipoint constraints in the MultiLine. - Standard_EXPORT void SetParameter (const Standard_Integer Index, const Standard_Real U); - + Standard_EXPORT void SetParameter(const Standard_Integer Index, const Standard_Real U); + //! It sets the MultiPointConstraint of range Index to the //! value MPoint. //! An exception is raised if Index < 0 or Index> MPoint. //! An exception is raised if the dimensions of the //! MultiPoints are different. - Standard_EXPORT void SetValue (const Standard_Integer Index, const AppDef_MultiPointConstraint& MPoint); - + Standard_EXPORT void SetValue(const Standard_Integer Index, + const AppDef_MultiPointConstraint& MPoint); + //! returns the MultiPointConstraint of range Index //! An exception is raised if Index<0 or Index>MPoint. - Standard_EXPORT AppDef_MultiPointConstraint Value (const Standard_Integer Index) const; - + Standard_EXPORT AppDef_MultiPointConstraint Value(const Standard_Integer Index) const; + //! Prints on the stream o information on the current //! state of the object. //! Is used to redefine the operator <<. - Standard_EXPORT void Dump (Standard_OStream& o) const; - - - + Standard_EXPORT void Dump(Standard_OStream& o) const; protected: - - - Handle(AppDef_HArray1OfMultiPointConstraint) tabMult; - private: - - - - - }; - - - - - - #endif // _AppDef_MultiLine_HeaderFile diff --git a/opencascade/AppDef_MultiPointConstraint.hxx b/opencascade/AppDef_MultiPointConstraint.hxx index 70a91f929..52a0b51f7 100644 --- a/opencascade/AppDef_MultiPointConstraint.hxx +++ b/opencascade/AppDef_MultiPointConstraint.hxx @@ -44,97 +44,111 @@ class gp_Vec2d; //! all points, including the parameter. //! - If a MultiPointConstraint is a "tangency" //! point, the point is also a "passing" point. -class AppDef_MultiPointConstraint : public AppParCurves_MultiPoint +class AppDef_MultiPointConstraint : public AppParCurves_MultiPoint { public: - DEFINE_STANDARD_ALLOC - //! creates an undefined MultiPointConstraint. Standard_EXPORT AppDef_MultiPointConstraint(); - + //! constructs a set of Points used to approximate a Multiline. //! These Points can be of 2 or 3 dimensions. //! Points will be initialized with SetPoint and SetPoint2d. - Standard_EXPORT AppDef_MultiPointConstraint(const Standard_Integer NbPoints, const Standard_Integer NbPoints2d); - + Standard_EXPORT AppDef_MultiPointConstraint(const Standard_Integer NbPoints, + const Standard_Integer NbPoints2d); + //! creates a MultiPoint only composed of 3D points. Standard_EXPORT AppDef_MultiPointConstraint(const TColgp_Array1OfPnt& tabP); - + //! creates a MultiPoint only composed of 2D points. Standard_EXPORT AppDef_MultiPointConstraint(const TColgp_Array1OfPnt2d& tabP); - + //! constructs a set of Points used to approximate a Multiline. //! These Points can be of 2 or 3 dimensions. //! Points will be initialized with SetPoint and SetPoint2d. - Standard_EXPORT AppDef_MultiPointConstraint(const TColgp_Array1OfPnt& tabP, const TColgp_Array1OfPnt2d& tabP2d); - + Standard_EXPORT AppDef_MultiPointConstraint(const TColgp_Array1OfPnt& tabP, + const TColgp_Array1OfPnt2d& tabP2d); + //! creates a MultiPointConstraint with a constraint of //! Curvature. //! An exception is raised if //! (length of + length of ) is different //! from (length of + length of ) or //! from (length of + length of ) - Standard_EXPORT AppDef_MultiPointConstraint(const TColgp_Array1OfPnt& tabP, const TColgp_Array1OfPnt2d& tabP2d, const TColgp_Array1OfVec& tabVec, const TColgp_Array1OfVec2d& tabVec2d, const TColgp_Array1OfVec& tabCur, const TColgp_Array1OfVec2d& tabCur2d); - + Standard_EXPORT AppDef_MultiPointConstraint(const TColgp_Array1OfPnt& tabP, + const TColgp_Array1OfPnt2d& tabP2d, + const TColgp_Array1OfVec& tabVec, + const TColgp_Array1OfVec2d& tabVec2d, + const TColgp_Array1OfVec& tabCur, + const TColgp_Array1OfVec2d& tabCur2d); + //! creates a MultiPointConstraint with a constraint of //! Tangency. //! An exception is raised if //! (length of + length of ) is different //! from (length of + length of ) - Standard_EXPORT AppDef_MultiPointConstraint(const TColgp_Array1OfPnt& tabP, const TColgp_Array1OfPnt2d& tabP2d, const TColgp_Array1OfVec& tabVec, const TColgp_Array1OfVec2d& tabVec2d); - + Standard_EXPORT AppDef_MultiPointConstraint(const TColgp_Array1OfPnt& tabP, + const TColgp_Array1OfPnt2d& tabP2d, + const TColgp_Array1OfVec& tabVec, + const TColgp_Array1OfVec2d& tabVec2d); + //! creates a MultiPointConstraint only composed of 3d points //! with constraints of curvature. //! An exception is raised if the length of tabP is different //! from the length of tabVec or from tabCur. - Standard_EXPORT AppDef_MultiPointConstraint(const TColgp_Array1OfPnt& tabP, const TColgp_Array1OfVec& tabVec, const TColgp_Array1OfVec& tabCur); - + Standard_EXPORT AppDef_MultiPointConstraint(const TColgp_Array1OfPnt& tabP, + const TColgp_Array1OfVec& tabVec, + const TColgp_Array1OfVec& tabCur); + //! creates a MultiPointConstraint only composed of 3d points //! with constraints of tangency. //! An exception is raised if the length of tabP is different //! from the length of tabVec. - Standard_EXPORT AppDef_MultiPointConstraint(const TColgp_Array1OfPnt& tabP, const TColgp_Array1OfVec& tabVec); - + Standard_EXPORT AppDef_MultiPointConstraint(const TColgp_Array1OfPnt& tabP, + const TColgp_Array1OfVec& tabVec); + //! creates a MultiPointConstraint only composed of 2d points //! with constraints of tangency. //! An exception is raised if the length of tabP is different //! from the length of tabVec2d. - Standard_EXPORT AppDef_MultiPointConstraint(const TColgp_Array1OfPnt2d& tabP2d, const TColgp_Array1OfVec2d& tabVec2d); - + Standard_EXPORT AppDef_MultiPointConstraint(const TColgp_Array1OfPnt2d& tabP2d, + const TColgp_Array1OfVec2d& tabVec2d); + //! creates a MultiPointConstraint only composed of 2d points //! with constraints of curvature. //! An exception is raised if the length of tabP is different //! from the length of tabVec2d or from tabCur2d. - Standard_EXPORT AppDef_MultiPointConstraint(const TColgp_Array1OfPnt2d& tabP2d, const TColgp_Array1OfVec2d& tabVec2d, const TColgp_Array1OfVec2d& tabCur2d); - + Standard_EXPORT AppDef_MultiPointConstraint(const TColgp_Array1OfPnt2d& tabP2d, + const TColgp_Array1OfVec2d& tabVec2d, + const TColgp_Array1OfVec2d& tabCur2d); + //! sets the value of the tangency of the point of range //! Index. //! An exception is raised if Index <0 or if Index > number //! of 3d points. //! An exception is raised if Tang has an incorrect number of //! dimensions. - Standard_EXPORT void SetTang (const Standard_Integer Index, const gp_Vec& Tang); - + Standard_EXPORT void SetTang(const Standard_Integer Index, const gp_Vec& Tang); + //! returns the tangency value of the point of range Index. //! An exception is raised if Index < 0 or if Index > number //! of 3d points. - Standard_EXPORT gp_Vec Tang (const Standard_Integer Index) const; - + Standard_EXPORT gp_Vec Tang(const Standard_Integer Index) const; + //! sets the value of the tangency of the point of range //! Index. //! An exception is raised if Index total number of Points //! An exception is raised if Tang has an incorrect number of //! dimensions. - Standard_EXPORT void SetTang2d (const Standard_Integer Index, const gp_Vec2d& Tang2d); - + Standard_EXPORT void SetTang2d(const Standard_Integer Index, const gp_Vec2d& Tang2d); + //! returns the tangency value of the point of range Index. //! An exception is raised if Index < number of 3d points or //! if Index > total number of points. - Standard_EXPORT gp_Vec2d Tang2d (const Standard_Integer Index) const; - + Standard_EXPORT gp_Vec2d Tang2d(const Standard_Integer Index) const; + //! Vec sets the value of the normal vector at the //! point of index Index. The norm of the normal //! vector at the point of position Index is set to the normal curvature. @@ -142,13 +156,13 @@ public: //! of 3d points. //! An exception is raised if Curv has an incorrect number of //! dimensions. - Standard_EXPORT void SetCurv (const Standard_Integer Index, const gp_Vec& Curv); - + Standard_EXPORT void SetCurv(const Standard_Integer Index, const gp_Vec& Curv); + //! returns the normal vector at the point of range Index. //! An exception is raised if Index < 0 or if Index > number //! of 3d points. - Standard_EXPORT gp_Vec Curv (const Standard_Integer Index) const; - + Standard_EXPORT gp_Vec Curv(const Standard_Integer Index) const; + //! Vec sets the value of the normal vector at the //! point of index Index. The norm of the normal //! vector at the point of position Index is set to the normal curvature. @@ -156,27 +170,27 @@ public: //! of 3d points. //! An exception is raised if Curv has an incorrect number of //! dimensions. - Standard_EXPORT void SetCurv2d (const Standard_Integer Index, const gp_Vec2d& Curv2d); - + Standard_EXPORT void SetCurv2d(const Standard_Integer Index, const gp_Vec2d& Curv2d); + //! returns the normal vector at the point of range Index. //! An exception is raised if Index < 0 or if Index > number //! of 3d points. - Standard_EXPORT gp_Vec2d Curv2d (const Standard_Integer Index) const; - + Standard_EXPORT gp_Vec2d Curv2d(const Standard_Integer Index) const; + //! returns True if the MultiPoint has a tangency value. Standard_EXPORT Standard_Boolean IsTangencyPoint() const; - + //! returns True if the MultiPoint has a curvature value. Standard_EXPORT Standard_Boolean IsCurvaturePoint() const; - + //! Prints on the stream o information on the current //! state of the object. //! Is used to redefine the operator <<. - Standard_EXPORT virtual void Dump (Standard_OStream& o) const Standard_OVERRIDE; + Standard_EXPORT virtual void Dump(Standard_OStream& o) const Standard_OVERRIDE; private: - Handle(TColgp_HArray1OfVec) tabTang; - Handle(TColgp_HArray1OfVec) tabCurv; + Handle(TColgp_HArray1OfVec) tabTang; + Handle(TColgp_HArray1OfVec) tabCurv; Handle(TColgp_HArray1OfVec2d) tabTang2d; Handle(TColgp_HArray1OfVec2d) tabCurv2d; }; diff --git a/opencascade/AppDef_MyBSplGradientOfBSplineCompute.hxx b/opencascade/AppDef_MyBSplGradientOfBSplineCompute.hxx index aa0392ed8..e841c6d30 100644 --- a/opencascade/AppDef_MyBSplGradientOfBSplineCompute.hxx +++ b/opencascade/AppDef_MyBSplGradientOfBSplineCompute.hxx @@ -37,88 +37,99 @@ class AppDef_BSpParFunctionOfMyBSplGradientOfBSplineCompute; class AppDef_BSpGradient_BFGSOfMyBSplGradientOfBSplineCompute; class AppParCurves_MultiBSpCurve; - - -class AppDef_MyBSplGradientOfBSplineCompute +class AppDef_MyBSplGradientOfBSplineCompute { public: - DEFINE_STANDARD_ALLOC - //! Tries to minimize the sum (square(||Qui - Bi*Pi||)) //! where Pui describe the approximating BSpline curves'Poles //! and Qi the MultiLine points with a parameter ui. //! In this algorithm, the parameters ui are the unknowns. //! The tolerance required on this sum is given by Tol. //! The desired degree of the resulting curve is Deg. - Standard_EXPORT AppDef_MyBSplGradientOfBSplineCompute(const AppDef_MultiLine& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, math_Vector& Parameters, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, const Standard_Integer Deg, const Standard_Real Tol3d, const Standard_Real Tol2d, const Standard_Integer NbIterations = 1); - + Standard_EXPORT AppDef_MyBSplGradientOfBSplineCompute( + const AppDef_MultiLine& SSP, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, + math_Vector& Parameters, + const TColStd_Array1OfReal& Knots, + const TColStd_Array1OfInteger& Mults, + const Standard_Integer Deg, + const Standard_Real Tol3d, + const Standard_Real Tol2d, + const Standard_Integer NbIterations = 1); + //! Tries to minimize the sum (square(||Qui - Bi*Pi||)) //! where Pui describe the approximating BSpline curves'Poles //! and Qi the MultiLine points with a parameter ui. //! In this algorithm, the parameters ui are the unknowns. //! The tolerance required on this sum is given by Tol. //! The desired degree of the resulting curve is Deg. - Standard_EXPORT AppDef_MyBSplGradientOfBSplineCompute(const AppDef_MultiLine& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, math_Vector& Parameters, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, const Standard_Integer Deg, const Standard_Real Tol3d, const Standard_Real Tol2d, const Standard_Integer NbIterations, const Standard_Real lambda1, const Standard_Real lambda2); - + Standard_EXPORT AppDef_MyBSplGradientOfBSplineCompute( + const AppDef_MultiLine& SSP, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, + math_Vector& Parameters, + const TColStd_Array1OfReal& Knots, + const TColStd_Array1OfInteger& Mults, + const Standard_Integer Deg, + const Standard_Real Tol3d, + const Standard_Real Tol2d, + const Standard_Integer NbIterations, + const Standard_Real lambda1, + const Standard_Real lambda2); + //! returns True if all has been correctly done. Standard_EXPORT Standard_Boolean IsDone() const; - + //! returns all the BSpline curves approximating the //! MultiLine SSP after minimization of the parameter. Standard_EXPORT AppParCurves_MultiBSpCurve Value() const; - + //! returns the difference between the old and the new //! approximation. //! An exception is raised if NotDone. //! An exception is raised if Index<1 or Index>NbParameters. - Standard_EXPORT Standard_Real Error (const Standard_Integer Index) const; - + Standard_EXPORT Standard_Real Error(const Standard_Integer Index) const; + //! returns the maximum difference between the old and the //! new approximation. Standard_EXPORT Standard_Real MaxError3d() const; - + //! returns the maximum difference between the old and the //! new approximation. Standard_EXPORT Standard_Real MaxError2d() const; - + //! returns the average error between the old and the //! new approximation. Standard_EXPORT Standard_Real AverageError() const; - - - protected: - - - Standard_EXPORT void Perform (const AppDef_MultiLine& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, math_Vector& Parameters, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, const Standard_Integer Deg, const Standard_Real Tol3d, const Standard_Real Tol2d, const Standard_Integer NbIterations = 200); - - - + Standard_EXPORT void Perform(const AppDef_MultiLine& SSP, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, + math_Vector& Parameters, + const TColStd_Array1OfReal& Knots, + const TColStd_Array1OfInteger& Mults, + const Standard_Integer Deg, + const Standard_Real Tol3d, + const Standard_Real Tol2d, + const Standard_Integer NbIterations = 200); private: - - - AppParCurves_MultiBSpCurve SCU; - math_Vector ParError; - Standard_Real AvError; - Standard_Real MError3d; - Standard_Real MError2d; - Standard_Real mylambda1; - Standard_Real mylambda2; - Standard_Boolean myIsLambdaDefined; - Standard_Boolean Done; - - + math_Vector ParError; + Standard_Real AvError; + Standard_Real MError3d; + Standard_Real MError2d; + Standard_Real mylambda1; + Standard_Real mylambda2; + Standard_Boolean myIsLambdaDefined; + Standard_Boolean Done; }; - - - - - - #endif // _AppDef_MyBSplGradientOfBSplineCompute_HeaderFile diff --git a/opencascade/AppDef_MyGradientOfCompute.hxx b/opencascade/AppDef_MyGradientOfCompute.hxx index f1b3a67a1..6514840cb 100644 --- a/opencascade/AppDef_MyGradientOfCompute.hxx +++ b/opencascade/AppDef_MyGradientOfCompute.hxx @@ -36,75 +36,61 @@ class AppDef_ParFunctionOfMyGradientOfCompute; class AppDef_Gradient_BFGSOfMyGradientOfCompute; class AppParCurves_MultiCurve; - - -class AppDef_MyGradientOfCompute +class AppDef_MyGradientOfCompute { public: - DEFINE_STANDARD_ALLOC - //! Tries to minimize the sum (square(||Qui - Bi*Pi||)) //! where Pui describe the approximating Bezier curves'Poles //! and Qi the MultiLine points with a parameter ui. //! In this algorithm, the parameters ui are the unknowns. //! The tolerance required on this sum is given by Tol. //! The desired degree of the resulting curve is Deg. - Standard_EXPORT AppDef_MyGradientOfCompute(const AppDef_MultiLine& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, math_Vector& Parameters, const Standard_Integer Deg, const Standard_Real Tol3d, const Standard_Real Tol2d, const Standard_Integer NbIterations = 200); - + Standard_EXPORT AppDef_MyGradientOfCompute( + const AppDef_MultiLine& SSP, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, + math_Vector& Parameters, + const Standard_Integer Deg, + const Standard_Real Tol3d, + const Standard_Real Tol2d, + const Standard_Integer NbIterations = 200); + //! returns True if all has been correctly done. Standard_EXPORT Standard_Boolean IsDone() const; - + //! returns all the Bezier curves approximating the //! MultiLine SSP after minimization of the parameter. Standard_EXPORT AppParCurves_MultiCurve Value() const; - + //! returns the difference between the old and the new //! approximation. //! An exception is raised if NotDone. //! An exception is raised if Index<1 or Index>NbParameters. - Standard_EXPORT Standard_Real Error (const Standard_Integer Index) const; - + Standard_EXPORT Standard_Real Error(const Standard_Integer Index) const; + //! returns the maximum difference between the old and the //! new approximation. Standard_EXPORT Standard_Real MaxError3d() const; - + //! returns the maximum difference between the old and the //! new approximation. Standard_EXPORT Standard_Real MaxError2d() const; - + //! returns the average error between the old and the //! new approximation. Standard_EXPORT Standard_Real AverageError() const; - - - protected: - - - - - private: - - - AppParCurves_MultiCurve SCU; - math_Vector ParError; - Standard_Real AvError; - Standard_Real MError3d; - Standard_Real MError2d; - Standard_Boolean Done; - - + math_Vector ParError; + Standard_Real AvError; + Standard_Real MError3d; + Standard_Real MError2d; + Standard_Boolean Done; }; - - - - - - #endif // _AppDef_MyGradientOfCompute_HeaderFile diff --git a/opencascade/AppDef_MyGradientbisOfBSplineCompute.hxx b/opencascade/AppDef_MyGradientbisOfBSplineCompute.hxx index 0a5ccfe93..2fda15930 100644 --- a/opencascade/AppDef_MyGradientbisOfBSplineCompute.hxx +++ b/opencascade/AppDef_MyGradientbisOfBSplineCompute.hxx @@ -36,75 +36,61 @@ class AppDef_ParFunctionOfMyGradientbisOfBSplineCompute; class AppDef_Gradient_BFGSOfMyGradientbisOfBSplineCompute; class AppParCurves_MultiCurve; - - -class AppDef_MyGradientbisOfBSplineCompute +class AppDef_MyGradientbisOfBSplineCompute { public: - DEFINE_STANDARD_ALLOC - //! Tries to minimize the sum (square(||Qui - Bi*Pi||)) //! where Pui describe the approximating Bezier curves'Poles //! and Qi the MultiLine points with a parameter ui. //! In this algorithm, the parameters ui are the unknowns. //! The tolerance required on this sum is given by Tol. //! The desired degree of the resulting curve is Deg. - Standard_EXPORT AppDef_MyGradientbisOfBSplineCompute(const AppDef_MultiLine& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, math_Vector& Parameters, const Standard_Integer Deg, const Standard_Real Tol3d, const Standard_Real Tol2d, const Standard_Integer NbIterations = 200); - + Standard_EXPORT AppDef_MyGradientbisOfBSplineCompute( + const AppDef_MultiLine& SSP, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, + math_Vector& Parameters, + const Standard_Integer Deg, + const Standard_Real Tol3d, + const Standard_Real Tol2d, + const Standard_Integer NbIterations = 200); + //! returns True if all has been correctly done. Standard_EXPORT Standard_Boolean IsDone() const; - + //! returns all the Bezier curves approximating the //! MultiLine SSP after minimization of the parameter. Standard_EXPORT AppParCurves_MultiCurve Value() const; - + //! returns the difference between the old and the new //! approximation. //! An exception is raised if NotDone. //! An exception is raised if Index<1 or Index>NbParameters. - Standard_EXPORT Standard_Real Error (const Standard_Integer Index) const; - + Standard_EXPORT Standard_Real Error(const Standard_Integer Index) const; + //! returns the maximum difference between the old and the //! new approximation. Standard_EXPORT Standard_Real MaxError3d() const; - + //! returns the maximum difference between the old and the //! new approximation. Standard_EXPORT Standard_Real MaxError2d() const; - + //! returns the average error between the old and the //! new approximation. Standard_EXPORT Standard_Real AverageError() const; - - - protected: - - - - - private: - - - AppParCurves_MultiCurve SCU; - math_Vector ParError; - Standard_Real AvError; - Standard_Real MError3d; - Standard_Real MError2d; - Standard_Boolean Done; - - + math_Vector ParError; + Standard_Real AvError; + Standard_Real MError3d; + Standard_Real MError2d; + Standard_Boolean Done; }; - - - - - - #endif // _AppDef_MyGradientbisOfBSplineCompute_HeaderFile diff --git a/opencascade/AppDef_MyLineTool.hxx b/opencascade/AppDef_MyLineTool.hxx index c9ae70021..c31ebb343 100644 --- a/opencascade/AppDef_MyLineTool.hxx +++ b/opencascade/AppDef_MyLineTool.hxx @@ -28,81 +28,101 @@ #include class AppDef_MultiLine; - //! Example of MultiLine tool corresponding to the tools of the packages AppParCurves and Approx. //! For Approx, the tool will not add points if the algorithms want some. -class AppDef_MyLineTool +class AppDef_MyLineTool { public: - DEFINE_STANDARD_ALLOC - //! Returns the first index of multipoints of the MultiLine. - Standard_EXPORT static Standard_Integer FirstPoint (const AppDef_MultiLine& ML); - + Standard_EXPORT static Standard_Integer FirstPoint(const AppDef_MultiLine& ML); + //! Returns the last index of multipoints of the MultiLine. - Standard_EXPORT static Standard_Integer LastPoint (const AppDef_MultiLine& ML); - + Standard_EXPORT static Standard_Integer LastPoint(const AppDef_MultiLine& ML); + //! Returns the number of 2d points of a MultiLine. - Standard_EXPORT static Standard_Integer NbP2d (const AppDef_MultiLine& ML); - + Standard_EXPORT static Standard_Integer NbP2d(const AppDef_MultiLine& ML); + //! Returns the number of 3d points of a MultiLine. - Standard_EXPORT static Standard_Integer NbP3d (const AppDef_MultiLine& ML); - + Standard_EXPORT static Standard_Integer NbP3d(const AppDef_MultiLine& ML); + //! returns the 3d points of the multipoint //! when only 3d points exist. - Standard_EXPORT static void Value (const AppDef_MultiLine& ML, const Standard_Integer MPointIndex, TColgp_Array1OfPnt& tabPt); - + Standard_EXPORT static void Value(const AppDef_MultiLine& ML, + const Standard_Integer MPointIndex, + TColgp_Array1OfPnt& tabPt); + //! returns the 2d points of the multipoint //! when only 2d points exist. - Standard_EXPORT static void Value (const AppDef_MultiLine& ML, const Standard_Integer MPointIndex, TColgp_Array1OfPnt2d& tabPt2d); - + Standard_EXPORT static void Value(const AppDef_MultiLine& ML, + const Standard_Integer MPointIndex, + TColgp_Array1OfPnt2d& tabPt2d); + //! returns the 3d and 2d points of the multipoint //! . - Standard_EXPORT static void Value (const AppDef_MultiLine& ML, const Standard_Integer MPointIndex, TColgp_Array1OfPnt& tabPt, TColgp_Array1OfPnt2d& tabPt2d); - + Standard_EXPORT static void Value(const AppDef_MultiLine& ML, + const Standard_Integer MPointIndex, + TColgp_Array1OfPnt& tabPt, + TColgp_Array1OfPnt2d& tabPt2d); + //! returns the 3d points of the multipoint //! when only 3d points exist. - Standard_EXPORT static Standard_Boolean Tangency (const AppDef_MultiLine& ML, const Standard_Integer MPointIndex, TColgp_Array1OfVec& tabV); - + Standard_EXPORT static Standard_Boolean Tangency(const AppDef_MultiLine& ML, + const Standard_Integer MPointIndex, + TColgp_Array1OfVec& tabV); + //! returns the 2d tangency points of the multipoint //! only when 2d points exist. - Standard_EXPORT static Standard_Boolean Tangency (const AppDef_MultiLine& ML, const Standard_Integer MPointIndex, TColgp_Array1OfVec2d& tabV2d); - + Standard_EXPORT static Standard_Boolean Tangency(const AppDef_MultiLine& ML, + const Standard_Integer MPointIndex, + TColgp_Array1OfVec2d& tabV2d); + //! returns the 3d and 2d points of the multipoint //! . - Standard_EXPORT static Standard_Boolean Tangency (const AppDef_MultiLine& ML, const Standard_Integer MPointIndex, TColgp_Array1OfVec& tabV, TColgp_Array1OfVec2d& tabV2d); - + Standard_EXPORT static Standard_Boolean Tangency(const AppDef_MultiLine& ML, + const Standard_Integer MPointIndex, + TColgp_Array1OfVec& tabV, + TColgp_Array1OfVec2d& tabV2d); + //! returns the 3d curvatures of the multipoint //! when only 3d points exist. - Standard_EXPORT static Standard_Boolean Curvature (const AppDef_MultiLine& ML, const Standard_Integer MPointIndex, TColgp_Array1OfVec& tabV); - + Standard_EXPORT static Standard_Boolean Curvature(const AppDef_MultiLine& ML, + const Standard_Integer MPointIndex, + TColgp_Array1OfVec& tabV); + //! returns the 2d curvatures of the multipoint //! only when 2d points exist. - Standard_EXPORT static Standard_Boolean Curvature (const AppDef_MultiLine& ML, const Standard_Integer MPointIndex, TColgp_Array1OfVec2d& tabV2d); - + Standard_EXPORT static Standard_Boolean Curvature(const AppDef_MultiLine& ML, + const Standard_Integer MPointIndex, + TColgp_Array1OfVec2d& tabV2d); + //! returns the 3d and 2d curvatures of the multipoint //! . - Standard_EXPORT static Standard_Boolean Curvature (const AppDef_MultiLine& ML, const Standard_Integer MPointIndex, TColgp_Array1OfVec& tabV, TColgp_Array1OfVec2d& tabV2d); - + Standard_EXPORT static Standard_Boolean Curvature(const AppDef_MultiLine& ML, + const Standard_Integer MPointIndex, + TColgp_Array1OfVec& tabV, + TColgp_Array1OfVec2d& tabV2d); + //! returns NoPointsAdded - Standard_EXPORT static Approx_Status WhatStatus (const AppDef_MultiLine& ML, const Standard_Integer I1, const Standard_Integer I2); - + Standard_EXPORT static Approx_Status WhatStatus(const AppDef_MultiLine& ML, + const Standard_Integer I1, + const Standard_Integer I2); + //! Is never called in the algorithms. //! Nothing is done. - Standard_EXPORT static AppDef_MultiLine MakeMLBetween (const AppDef_MultiLine& ML, - const Standard_Integer I1, - const Standard_Integer I2, - const Standard_Integer NbPMin); + Standard_EXPORT static AppDef_MultiLine MakeMLBetween(const AppDef_MultiLine& ML, + const Standard_Integer I1, + const Standard_Integer I2, + const Standard_Integer NbPMin); //! Is never called in the algorithms. //! Nothing is done. - Standard_EXPORT static Standard_Boolean MakeMLOneMorePoint (const AppDef_MultiLine& ML, - const Standard_Integer I1, - const Standard_Integer I2, - const Standard_Integer indbad, - AppDef_MultiLine& OtherLine); + Standard_EXPORT static Standard_Boolean MakeMLOneMorePoint(const AppDef_MultiLine& ML, + const Standard_Integer I1, + const Standard_Integer I2, + const Standard_Integer indbad, + AppDef_MultiLine& OtherLine); }; #endif // _AppDef_MyLineTool_HeaderFile diff --git a/opencascade/AppDef_ParFunctionOfMyGradientOfCompute.hxx b/opencascade/AppDef_ParFunctionOfMyGradientOfCompute.hxx index 0e4466697..b688bb737 100644 --- a/opencascade/AppDef_ParFunctionOfMyGradientOfCompute.hxx +++ b/opencascade/AppDef_ParFunctionOfMyGradientOfCompute.hxx @@ -35,110 +35,98 @@ class AppDef_ParLeastSquareOfMyGradientOfCompute; class AppDef_ResConstraintOfMyGradientOfCompute; class AppParCurves_MultiCurve; - - -class AppDef_ParFunctionOfMyGradientOfCompute : public math_MultipleVarFunctionWithGradient +class AppDef_ParFunctionOfMyGradientOfCompute : public math_MultipleVarFunctionWithGradient { public: - DEFINE_STANDARD_ALLOC - //! initializes the fields of the function. The approximating //! curve has the desired degree Deg. - Standard_EXPORT AppDef_ParFunctionOfMyGradientOfCompute(const AppDef_MultiLine& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, const math_Vector& Parameters, const Standard_Integer Deg); - + Standard_EXPORT AppDef_ParFunctionOfMyGradientOfCompute( + const AppDef_MultiLine& SSP, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, + const math_Vector& Parameters, + const Standard_Integer Deg); + //! returns the number of variables of the function. It //! corresponds to the number of MultiPoints. Standard_EXPORT Standard_Integer NbVariables() const; - + //! this method computes the new approximation of the //! MultiLine //! SSP and calculates F = sum (||Pui - Bi*Pi||2) for each //! point of the MultiLine. - Standard_EXPORT Standard_Boolean Value (const math_Vector& X, Standard_Real& F); - + Standard_EXPORT Standard_Boolean Value(const math_Vector& X, Standard_Real& F); + //! returns the gradient G of the sum above for the //! parameters Xi. - Standard_EXPORT Standard_Boolean Gradient (const math_Vector& X, math_Vector& G); - + Standard_EXPORT Standard_Boolean Gradient(const math_Vector& X, math_Vector& G); + //! returns the value F=sum(||Pui - Bi*Pi||)2. //! returns the value G = grad(F) for the parameters Xi. - Standard_EXPORT Standard_Boolean Values (const math_Vector& X, Standard_Real& F, math_Vector& G); - + Standard_EXPORT Standard_Boolean Values(const math_Vector& X, Standard_Real& F, math_Vector& G); + //! returns the new parameters of the MultiLine. Standard_EXPORT const math_Vector& NewParameters() const; - + //! returns the MultiCurve approximating the set after //! computing the value F or Grad(F). Standard_EXPORT const AppParCurves_MultiCurve& CurveValue(); - + //! returns the distance between the MultiPoint of range //! IPoint and the curve CurveIndex. - Standard_EXPORT Standard_Real Error (const Standard_Integer IPoint, const Standard_Integer CurveIndex) const; - + Standard_EXPORT Standard_Real Error(const Standard_Integer IPoint, + const Standard_Integer CurveIndex) const; + //! returns the maximum distance between the points //! and the MultiCurve. Standard_EXPORT Standard_Real MaxError3d() const; - + //! returns the maximum distance between the points //! and the MultiCurve. Standard_EXPORT Standard_Real MaxError2d() const; - - Standard_EXPORT AppParCurves_Constraint FirstConstraint (const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, const Standard_Integer FirstPoint) const; - - Standard_EXPORT AppParCurves_Constraint LastConstraint (const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, const Standard_Integer LastPoint) const; - + Standard_EXPORT AppParCurves_Constraint + FirstConstraint(const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, + const Standard_Integer FirstPoint) const; + Standard_EXPORT AppParCurves_Constraint + LastConstraint(const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, + const Standard_Integer LastPoint) const; protected: - - //! this method is used each time Value or Gradient is //! needed. - Standard_EXPORT void Perform (const math_Vector& X); - - - + Standard_EXPORT void Perform(const math_Vector& X); private: - - - - Standard_Boolean Done; - AppDef_MultiLine MyMultiLine; - AppParCurves_MultiCurve MyMultiCurve; - Standard_Integer Degre; - math_Vector myParameters; - Standard_Real FVal; - math_Vector ValGrad_F; - math_Matrix MyF; - math_Matrix PTLX; - math_Matrix PTLY; - math_Matrix PTLZ; - math_Matrix A; - math_Matrix DA; - AppDef_ParLeastSquareOfMyGradientOfCompute MyLeastSquare; - Standard_Boolean Contraintes; - Standard_Integer NbP; - Standard_Integer NbCu; - Standard_Integer Adeb; - Standard_Integer Afin; - Handle(TColStd_HArray1OfInteger) tabdim; - Standard_Real ERR3d; - Standard_Real ERR2d; - Standard_Integer FirstP; - Standard_Integer LastP; + Standard_Boolean Done; + AppDef_MultiLine MyMultiLine; + AppParCurves_MultiCurve MyMultiCurve; + Standard_Integer Degre; + math_Vector myParameters; + Standard_Real FVal; + math_Vector ValGrad_F; + math_Matrix MyF; + math_Matrix PTLX; + math_Matrix PTLY; + math_Matrix PTLZ; + math_Matrix A; + math_Matrix DA; + AppDef_ParLeastSquareOfMyGradientOfCompute MyLeastSquare; + Standard_Boolean Contraintes; + Standard_Integer NbP; + Standard_Integer NbCu; + Standard_Integer Adeb; + Standard_Integer Afin; + Handle(TColStd_HArray1OfInteger) tabdim; + Standard_Real ERR3d; + Standard_Real ERR2d; + Standard_Integer FirstP; + Standard_Integer LastP; Handle(AppParCurves_HArray1OfConstraintCouple) myConstraints; - - }; - - - - - - #endif // _AppDef_ParFunctionOfMyGradientOfCompute_HeaderFile diff --git a/opencascade/AppDef_ParFunctionOfMyGradientbisOfBSplineCompute.hxx b/opencascade/AppDef_ParFunctionOfMyGradientbisOfBSplineCompute.hxx index d608f7ed4..346a030dd 100644 --- a/opencascade/AppDef_ParFunctionOfMyGradientbisOfBSplineCompute.hxx +++ b/opencascade/AppDef_ParFunctionOfMyGradientbisOfBSplineCompute.hxx @@ -35,110 +35,99 @@ class AppDef_ParLeastSquareOfMyGradientbisOfBSplineCompute; class AppDef_ResConstraintOfMyGradientbisOfBSplineCompute; class AppParCurves_MultiCurve; - - -class AppDef_ParFunctionOfMyGradientbisOfBSplineCompute : public math_MultipleVarFunctionWithGradient +class AppDef_ParFunctionOfMyGradientbisOfBSplineCompute + : public math_MultipleVarFunctionWithGradient { public: - DEFINE_STANDARD_ALLOC - //! initializes the fields of the function. The approximating //! curve has the desired degree Deg. - Standard_EXPORT AppDef_ParFunctionOfMyGradientbisOfBSplineCompute(const AppDef_MultiLine& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, const math_Vector& Parameters, const Standard_Integer Deg); - + Standard_EXPORT AppDef_ParFunctionOfMyGradientbisOfBSplineCompute( + const AppDef_MultiLine& SSP, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, + const math_Vector& Parameters, + const Standard_Integer Deg); + //! returns the number of variables of the function. It //! corresponds to the number of MultiPoints. Standard_EXPORT Standard_Integer NbVariables() const; - + //! this method computes the new approximation of the //! MultiLine //! SSP and calculates F = sum (||Pui - Bi*Pi||2) for each //! point of the MultiLine. - Standard_EXPORT Standard_Boolean Value (const math_Vector& X, Standard_Real& F); - + Standard_EXPORT Standard_Boolean Value(const math_Vector& X, Standard_Real& F); + //! returns the gradient G of the sum above for the //! parameters Xi. - Standard_EXPORT Standard_Boolean Gradient (const math_Vector& X, math_Vector& G); - + Standard_EXPORT Standard_Boolean Gradient(const math_Vector& X, math_Vector& G); + //! returns the value F=sum(||Pui - Bi*Pi||)2. //! returns the value G = grad(F) for the parameters Xi. - Standard_EXPORT Standard_Boolean Values (const math_Vector& X, Standard_Real& F, math_Vector& G); - + Standard_EXPORT Standard_Boolean Values(const math_Vector& X, Standard_Real& F, math_Vector& G); + //! returns the new parameters of the MultiLine. Standard_EXPORT const math_Vector& NewParameters() const; - + //! returns the MultiCurve approximating the set after //! computing the value F or Grad(F). Standard_EXPORT const AppParCurves_MultiCurve& CurveValue(); - + //! returns the distance between the MultiPoint of range //! IPoint and the curve CurveIndex. - Standard_EXPORT Standard_Real Error (const Standard_Integer IPoint, const Standard_Integer CurveIndex) const; - + Standard_EXPORT Standard_Real Error(const Standard_Integer IPoint, + const Standard_Integer CurveIndex) const; + //! returns the maximum distance between the points //! and the MultiCurve. Standard_EXPORT Standard_Real MaxError3d() const; - + //! returns the maximum distance between the points //! and the MultiCurve. Standard_EXPORT Standard_Real MaxError2d() const; - - Standard_EXPORT AppParCurves_Constraint FirstConstraint (const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, const Standard_Integer FirstPoint) const; - - Standard_EXPORT AppParCurves_Constraint LastConstraint (const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, const Standard_Integer LastPoint) const; - + Standard_EXPORT AppParCurves_Constraint + FirstConstraint(const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, + const Standard_Integer FirstPoint) const; + Standard_EXPORT AppParCurves_Constraint + LastConstraint(const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, + const Standard_Integer LastPoint) const; protected: - - //! this method is used each time Value or Gradient is //! needed. - Standard_EXPORT void Perform (const math_Vector& X); - - - + Standard_EXPORT void Perform(const math_Vector& X); private: - - - - Standard_Boolean Done; - AppDef_MultiLine MyMultiLine; - AppParCurves_MultiCurve MyMultiCurve; - Standard_Integer Degre; - math_Vector myParameters; - Standard_Real FVal; - math_Vector ValGrad_F; - math_Matrix MyF; - math_Matrix PTLX; - math_Matrix PTLY; - math_Matrix PTLZ; - math_Matrix A; - math_Matrix DA; + Standard_Boolean Done; + AppDef_MultiLine MyMultiLine; + AppParCurves_MultiCurve MyMultiCurve; + Standard_Integer Degre; + math_Vector myParameters; + Standard_Real FVal; + math_Vector ValGrad_F; + math_Matrix MyF; + math_Matrix PTLX; + math_Matrix PTLY; + math_Matrix PTLZ; + math_Matrix A; + math_Matrix DA; AppDef_ParLeastSquareOfMyGradientbisOfBSplineCompute MyLeastSquare; - Standard_Boolean Contraintes; - Standard_Integer NbP; - Standard_Integer NbCu; - Standard_Integer Adeb; - Standard_Integer Afin; - Handle(TColStd_HArray1OfInteger) tabdim; - Standard_Real ERR3d; - Standard_Real ERR2d; - Standard_Integer FirstP; - Standard_Integer LastP; - Handle(AppParCurves_HArray1OfConstraintCouple) myConstraints; - - + Standard_Boolean Contraintes; + Standard_Integer NbP; + Standard_Integer NbCu; + Standard_Integer Adeb; + Standard_Integer Afin; + Handle(TColStd_HArray1OfInteger) tabdim; + Standard_Real ERR3d; + Standard_Real ERR2d; + Standard_Integer FirstP; + Standard_Integer LastP; + Handle(AppParCurves_HArray1OfConstraintCouple) myConstraints; }; - - - - - - #endif // _AppDef_ParFunctionOfMyGradientbisOfBSplineCompute_HeaderFile diff --git a/opencascade/AppDef_ParFunctionOfTheGradient.hxx b/opencascade/AppDef_ParFunctionOfTheGradient.hxx index 72d561df2..2a6f0b0e5 100644 --- a/opencascade/AppDef_ParFunctionOfTheGradient.hxx +++ b/opencascade/AppDef_ParFunctionOfTheGradient.hxx @@ -35,110 +35,98 @@ class AppDef_ParLeastSquareOfTheGradient; class AppDef_ResConstraintOfTheGradient; class AppParCurves_MultiCurve; - - -class AppDef_ParFunctionOfTheGradient : public math_MultipleVarFunctionWithGradient +class AppDef_ParFunctionOfTheGradient : public math_MultipleVarFunctionWithGradient { public: - DEFINE_STANDARD_ALLOC - //! initializes the fields of the function. The approximating //! curve has the desired degree Deg. - Standard_EXPORT AppDef_ParFunctionOfTheGradient(const AppDef_MultiLine& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, const math_Vector& Parameters, const Standard_Integer Deg); - + Standard_EXPORT AppDef_ParFunctionOfTheGradient( + const AppDef_MultiLine& SSP, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, + const math_Vector& Parameters, + const Standard_Integer Deg); + //! returns the number of variables of the function. It //! corresponds to the number of MultiPoints. Standard_EXPORT Standard_Integer NbVariables() const; - + //! this method computes the new approximation of the //! MultiLine //! SSP and calculates F = sum (||Pui - Bi*Pi||2) for each //! point of the MultiLine. - Standard_EXPORT Standard_Boolean Value (const math_Vector& X, Standard_Real& F); - + Standard_EXPORT Standard_Boolean Value(const math_Vector& X, Standard_Real& F); + //! returns the gradient G of the sum above for the //! parameters Xi. - Standard_EXPORT Standard_Boolean Gradient (const math_Vector& X, math_Vector& G); - + Standard_EXPORT Standard_Boolean Gradient(const math_Vector& X, math_Vector& G); + //! returns the value F=sum(||Pui - Bi*Pi||)2. //! returns the value G = grad(F) for the parameters Xi. - Standard_EXPORT Standard_Boolean Values (const math_Vector& X, Standard_Real& F, math_Vector& G); - + Standard_EXPORT Standard_Boolean Values(const math_Vector& X, Standard_Real& F, math_Vector& G); + //! returns the new parameters of the MultiLine. Standard_EXPORT const math_Vector& NewParameters() const; - + //! returns the MultiCurve approximating the set after //! computing the value F or Grad(F). Standard_EXPORT const AppParCurves_MultiCurve& CurveValue(); - + //! returns the distance between the MultiPoint of range //! IPoint and the curve CurveIndex. - Standard_EXPORT Standard_Real Error (const Standard_Integer IPoint, const Standard_Integer CurveIndex) const; - + Standard_EXPORT Standard_Real Error(const Standard_Integer IPoint, + const Standard_Integer CurveIndex) const; + //! returns the maximum distance between the points //! and the MultiCurve. Standard_EXPORT Standard_Real MaxError3d() const; - + //! returns the maximum distance between the points //! and the MultiCurve. Standard_EXPORT Standard_Real MaxError2d() const; - - Standard_EXPORT AppParCurves_Constraint FirstConstraint (const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, const Standard_Integer FirstPoint) const; - - Standard_EXPORT AppParCurves_Constraint LastConstraint (const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, const Standard_Integer LastPoint) const; - + Standard_EXPORT AppParCurves_Constraint + FirstConstraint(const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, + const Standard_Integer FirstPoint) const; + Standard_EXPORT AppParCurves_Constraint + LastConstraint(const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, + const Standard_Integer LastPoint) const; protected: - - //! this method is used each time Value or Gradient is //! needed. - Standard_EXPORT void Perform (const math_Vector& X); - - - + Standard_EXPORT void Perform(const math_Vector& X); private: - - - - Standard_Boolean Done; - AppDef_MultiLine MyMultiLine; - AppParCurves_MultiCurve MyMultiCurve; - Standard_Integer Degre; - math_Vector myParameters; - Standard_Real FVal; - math_Vector ValGrad_F; - math_Matrix MyF; - math_Matrix PTLX; - math_Matrix PTLY; - math_Matrix PTLZ; - math_Matrix A; - math_Matrix DA; - AppDef_ParLeastSquareOfTheGradient MyLeastSquare; - Standard_Boolean Contraintes; - Standard_Integer NbP; - Standard_Integer NbCu; - Standard_Integer Adeb; - Standard_Integer Afin; - Handle(TColStd_HArray1OfInteger) tabdim; - Standard_Real ERR3d; - Standard_Real ERR2d; - Standard_Integer FirstP; - Standard_Integer LastP; + Standard_Boolean Done; + AppDef_MultiLine MyMultiLine; + AppParCurves_MultiCurve MyMultiCurve; + Standard_Integer Degre; + math_Vector myParameters; + Standard_Real FVal; + math_Vector ValGrad_F; + math_Matrix MyF; + math_Matrix PTLX; + math_Matrix PTLY; + math_Matrix PTLZ; + math_Matrix A; + math_Matrix DA; + AppDef_ParLeastSquareOfTheGradient MyLeastSquare; + Standard_Boolean Contraintes; + Standard_Integer NbP; + Standard_Integer NbCu; + Standard_Integer Adeb; + Standard_Integer Afin; + Handle(TColStd_HArray1OfInteger) tabdim; + Standard_Real ERR3d; + Standard_Real ERR2d; + Standard_Integer FirstP; + Standard_Integer LastP; Handle(AppParCurves_HArray1OfConstraintCouple) myConstraints; - - }; - - - - - - #endif // _AppDef_ParFunctionOfTheGradient_HeaderFile diff --git a/opencascade/AppDef_ParLeastSquareOfMyGradientOfCompute.hxx b/opencascade/AppDef_ParLeastSquareOfMyGradientOfCompute.hxx index 336499edc..147321fdf 100644 --- a/opencascade/AppDef_ParLeastSquareOfMyGradientOfCompute.hxx +++ b/opencascade/AppDef_ParLeastSquareOfMyGradientOfCompute.hxx @@ -42,15 +42,11 @@ class AppParCurves_MultiCurve; class AppParCurves_MultiBSpCurve; class math_Matrix; - - -class AppDef_ParLeastSquareOfMyGradientOfCompute +class AppDef_ParLeastSquareOfMyGradientOfCompute { public: - DEFINE_STANDARD_ALLOC - //! given a MultiLine, this algorithm computes the least //! square resolution using the Householder-QR method. //! If the first and/or the last point is a constraint @@ -67,11 +63,24 @@ public: //! and is also the same for each MultiLine point because //! they are approximated in parallel(so with the same //! parameter, only the vector B changes). - Standard_EXPORT AppDef_ParLeastSquareOfMyGradientOfCompute(const AppDef_MultiLine& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const AppParCurves_Constraint FirstCons, const AppParCurves_Constraint LastCons, const math_Vector& Parameters, const Standard_Integer NbPol); - + Standard_EXPORT AppDef_ParLeastSquareOfMyGradientOfCompute( + const AppDef_MultiLine& SSP, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const AppParCurves_Constraint FirstCons, + const AppParCurves_Constraint LastCons, + const math_Vector& Parameters, + const Standard_Integer NbPol); + //! Initializes the fields of the object. - Standard_EXPORT AppDef_ParLeastSquareOfMyGradientOfCompute(const AppDef_MultiLine& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const AppParCurves_Constraint FirstCons, const AppParCurves_Constraint LastCons, const Standard_Integer NbPol); - + Standard_EXPORT AppDef_ParLeastSquareOfMyGradientOfCompute( + const AppDef_MultiLine& SSP, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const AppParCurves_Constraint FirstCons, + const AppParCurves_Constraint LastCons, + const Standard_Integer NbPol); + //! given a MultiLine, this algorithm computes the least //! square resolution using the Householder-QR method. //! If the first and/or the last point is a constraint @@ -87,171 +96,192 @@ public: //! and is also the same for each MultiLine point because //! they are approximated in parallel(so with the same //! parameter, only the vector B changes). - Standard_EXPORT AppDef_ParLeastSquareOfMyGradientOfCompute(const AppDef_MultiLine& SSP, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const AppParCurves_Constraint FirstCons, const AppParCurves_Constraint LastCons, const math_Vector& Parameters, const Standard_Integer NbPol); - + Standard_EXPORT AppDef_ParLeastSquareOfMyGradientOfCompute( + const AppDef_MultiLine& SSP, + const TColStd_Array1OfReal& Knots, + const TColStd_Array1OfInteger& Mults, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const AppParCurves_Constraint FirstCons, + const AppParCurves_Constraint LastCons, + const math_Vector& Parameters, + const Standard_Integer NbPol); + //! Initializes the fields of the object. - Standard_EXPORT AppDef_ParLeastSquareOfMyGradientOfCompute(const AppDef_MultiLine& SSP, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const AppParCurves_Constraint FirstCons, const AppParCurves_Constraint LastCons, const Standard_Integer NbPol); - + Standard_EXPORT AppDef_ParLeastSquareOfMyGradientOfCompute( + const AppDef_MultiLine& SSP, + const TColStd_Array1OfReal& Knots, + const TColStd_Array1OfInteger& Mults, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const AppParCurves_Constraint FirstCons, + const AppParCurves_Constraint LastCons, + const Standard_Integer NbPol); + //! Is used after having initialized the fields. //! The case "CurvaturePoint" is not treated in this method. - Standard_EXPORT void Perform (const math_Vector& Parameters); - + Standard_EXPORT void Perform(const math_Vector& Parameters); + //! Is used after having initialized the fields. - Standard_EXPORT void Perform (const math_Vector& Parameters, const Standard_Real l1, const Standard_Real l2); - + Standard_EXPORT void Perform(const math_Vector& Parameters, + const Standard_Real l1, + const Standard_Real l2); + //! Is used after having initialized the fields. //! is the tangent vector at the first point. //! is the tangent vector at the last point. - Standard_EXPORT void Perform (const math_Vector& Parameters, const math_Vector& V1t, const math_Vector& V2t, const Standard_Real l1, const Standard_Real l2); - + Standard_EXPORT void Perform(const math_Vector& Parameters, + const math_Vector& V1t, + const math_Vector& V2t, + const Standard_Real l1, + const Standard_Real l2); + //! Is used after having initialized the fields. //! is the tangent vector at the first point. //! is the tangent vector at the last point. //! is the tangent vector at the first point. //! is the tangent vector at the last point. - Standard_EXPORT void Perform (const math_Vector& Parameters, const math_Vector& V1t, const math_Vector& V2t, const math_Vector& V1c, const math_Vector& V2c, const Standard_Real l1, const Standard_Real l2); - + Standard_EXPORT void Perform(const math_Vector& Parameters, + const math_Vector& V1t, + const math_Vector& V2t, + const math_Vector& V1c, + const math_Vector& V2c, + const Standard_Real l1, + const Standard_Real l2); + //! returns True if all has been correctly done. Standard_EXPORT Standard_Boolean IsDone() const; - + //! returns the result of the approximation, i.e. all the //! Curves. //! An exception is raised if NotDone. Standard_EXPORT AppParCurves_MultiCurve BezierValue(); - + //! returns the result of the approximation, i.e. all the //! Curves. //! An exception is raised if NotDone. Standard_EXPORT const AppParCurves_MultiBSpCurve& BSplineValue(); - + //! returns the function matrix used to approximate the //! set. Standard_EXPORT const math_Matrix& FunctionMatrix() const; - + //! returns the derivative function matrix used //! to approximate the set. Standard_EXPORT const math_Matrix& DerivativeFunctionMatrix() const; - + //! returns the maximum errors between the MultiLine //! and the approximation curves. F is the sum of the square //! distances. Grad is the derivative vector of the //! function F. - Standard_EXPORT void ErrorGradient (math_Vector& Grad, Standard_Real& F, Standard_Real& MaxE3d, Standard_Real& MaxE2d); - + Standard_EXPORT void ErrorGradient(math_Vector& Grad, + Standard_Real& F, + Standard_Real& MaxE3d, + Standard_Real& MaxE2d); + //! returns the distances between the points of the //! multiline and the approximation curves. Standard_EXPORT const math_Matrix& Distance(); - + //! returns the maximum errors between the MultiLine //! and the approximation curves. F is the sum of the square //! distances. - Standard_EXPORT void Error (Standard_Real& F, Standard_Real& MaxE3d, Standard_Real& MaxE2d); - + Standard_EXPORT void Error(Standard_Real& F, Standard_Real& MaxE3d, Standard_Real& MaxE2d); + //! returns the value (P2 - P1)/ V1 if the first point //! was a tangency point. Standard_EXPORT Standard_Real FirstLambda() const; - + //! returns the value (PN - PN-1)/ VN if the last point //! was a tangency point. Standard_EXPORT Standard_Real LastLambda() const; - + //! returns the matrix of points value. Standard_EXPORT const math_Matrix& Points() const; - + //! returns the matrix of resulting control points value. Standard_EXPORT const math_Matrix& Poles() const; - + //! Returns the indexes of the first non null values of //! A and DA. //! The values are non null from Index(ieme point) +1 //! to Index(ieme point) + degree +1. Standard_EXPORT const math_IntegerVector& KIndex() const; - - - protected: - - //! is used by the constructors above. - Standard_EXPORT void Init (const AppDef_MultiLine& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint); - + Standard_EXPORT void Init(const AppDef_MultiLine& SSP, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint); + //! returns the number of second member columns. //! Is used internally to initialize the fields. - Standard_EXPORT Standard_Integer NbBColumns (const AppDef_MultiLine& SSP) const; - + Standard_EXPORT Standard_Integer NbBColumns(const AppDef_MultiLine& SSP) const; + //! returns the first point being fitted. - Standard_EXPORT Standard_Integer TheFirstPoint (const AppParCurves_Constraint FirstCons, const Standard_Integer FirstPoint) const; - + Standard_EXPORT Standard_Integer TheFirstPoint(const AppParCurves_Constraint FirstCons, + const Standard_Integer FirstPoint) const; + //! returns the last point being fitted. - Standard_EXPORT Standard_Integer TheLastPoint (const AppParCurves_Constraint LastCons, const Standard_Integer LastPoint) const; - - //! Affects the fields in the case of a constraint point. - Standard_EXPORT void Affect (const AppDef_MultiLine& SSP, const Standard_Integer Index, AppParCurves_Constraint& Cons, math_Vector& Vt, math_Vector& Vc); - - Standard_EXPORT void ComputeFunction (const math_Vector& Parameters); - - Standard_EXPORT void SearchIndex (math_IntegerVector& Index); - - //! computes internal matrixes for the resolution - Standard_EXPORT void MakeTAA (math_Vector& TheA, math_Vector& TheB); - - //! computes internal matrixes for the resolution - Standard_EXPORT void MakeTAA (math_Vector& TheA); - - //! computes internal matrixes for the resolution - Standard_EXPORT void MakeTAA (math_Vector& TheA, math_Matrix& TheB); + Standard_EXPORT Standard_Integer TheLastPoint(const AppParCurves_Constraint LastCons, + const Standard_Integer LastPoint) const; + //! Affects the fields in the case of a constraint point. + Standard_EXPORT void Affect(const AppDef_MultiLine& SSP, + const Standard_Integer Index, + AppParCurves_Constraint& Cons, + math_Vector& Vt, + math_Vector& Vc); + Standard_EXPORT void ComputeFunction(const math_Vector& Parameters); + Standard_EXPORT void SearchIndex(math_IntegerVector& Index); -private: + //! computes internal matrixes for the resolution + Standard_EXPORT void MakeTAA(math_Vector& TheA, math_Vector& TheB); + //! computes internal matrixes for the resolution + Standard_EXPORT void MakeTAA(math_Vector& TheA); + //! computes internal matrixes for the resolution + Standard_EXPORT void MakeTAA(math_Vector& TheA, math_Matrix& TheB); - AppParCurves_Constraint FirstConstraint; - AppParCurves_Constraint LastConstraint; - AppParCurves_MultiBSpCurve SCU; - Handle(TColStd_HArray1OfReal) myknots; +private: + AppParCurves_Constraint FirstConstraint; + AppParCurves_Constraint LastConstraint; + AppParCurves_MultiBSpCurve SCU; + Handle(TColStd_HArray1OfReal) myknots; Handle(TColStd_HArray1OfInteger) mymults; - math_Matrix mypoles; - math_Matrix A; - math_Matrix DA; - math_Matrix B2; - math_Matrix mypoints; - math_Vector Vflatknots; - math_Vector Vec1t; - math_Vector Vec1c; - math_Vector Vec2t; - math_Vector Vec2c; - math_Matrix theError; - math_IntegerVector myindex; - Standard_Real lambda1; - Standard_Real lambda2; - Standard_Integer FirstP; - Standard_Integer LastP; - Standard_Integer Nlignes; - Standard_Integer Ninc; - Standard_Integer NA; - Standard_Integer myfirstp; - Standard_Integer mylastp; - Standard_Integer resinit; - Standard_Integer resfin; - Standard_Integer nbP2d; - Standard_Integer nbP; - Standard_Integer nbpoles; - Standard_Integer deg; - Standard_Boolean done; - Standard_Boolean iscalculated; - Standard_Boolean isready; - - + math_Matrix mypoles; + math_Matrix A; + math_Matrix DA; + math_Matrix B2; + math_Matrix mypoints; + math_Vector Vflatknots; + math_Vector Vec1t; + math_Vector Vec1c; + math_Vector Vec2t; + math_Vector Vec2c; + math_Matrix theError; + math_IntegerVector myindex; + Standard_Real lambda1; + Standard_Real lambda2; + Standard_Integer FirstP; + Standard_Integer LastP; + Standard_Integer Nlignes; + Standard_Integer Ninc; + Standard_Integer NA; + Standard_Integer myfirstp; + Standard_Integer mylastp; + Standard_Integer resinit; + Standard_Integer resfin; + Standard_Integer nbP2d; + Standard_Integer nbP; + Standard_Integer nbpoles; + Standard_Integer deg; + Standard_Boolean done; + Standard_Boolean iscalculated; + Standard_Boolean isready; }; - - - - - - #endif // _AppDef_ParLeastSquareOfMyGradientOfCompute_HeaderFile diff --git a/opencascade/AppDef_ParLeastSquareOfMyGradientbisOfBSplineCompute.hxx b/opencascade/AppDef_ParLeastSquareOfMyGradientbisOfBSplineCompute.hxx index 463cabc9e..4257a6f0e 100644 --- a/opencascade/AppDef_ParLeastSquareOfMyGradientbisOfBSplineCompute.hxx +++ b/opencascade/AppDef_ParLeastSquareOfMyGradientbisOfBSplineCompute.hxx @@ -42,15 +42,11 @@ class AppParCurves_MultiCurve; class AppParCurves_MultiBSpCurve; class math_Matrix; - - -class AppDef_ParLeastSquareOfMyGradientbisOfBSplineCompute +class AppDef_ParLeastSquareOfMyGradientbisOfBSplineCompute { public: - DEFINE_STANDARD_ALLOC - //! given a MultiLine, this algorithm computes the least //! square resolution using the Householder-QR method. //! If the first and/or the last point is a constraint @@ -67,11 +63,24 @@ public: //! and is also the same for each MultiLine point because //! they are approximated in parallel(so with the same //! parameter, only the vector B changes). - Standard_EXPORT AppDef_ParLeastSquareOfMyGradientbisOfBSplineCompute(const AppDef_MultiLine& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const AppParCurves_Constraint FirstCons, const AppParCurves_Constraint LastCons, const math_Vector& Parameters, const Standard_Integer NbPol); - + Standard_EXPORT AppDef_ParLeastSquareOfMyGradientbisOfBSplineCompute( + const AppDef_MultiLine& SSP, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const AppParCurves_Constraint FirstCons, + const AppParCurves_Constraint LastCons, + const math_Vector& Parameters, + const Standard_Integer NbPol); + //! Initializes the fields of the object. - Standard_EXPORT AppDef_ParLeastSquareOfMyGradientbisOfBSplineCompute(const AppDef_MultiLine& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const AppParCurves_Constraint FirstCons, const AppParCurves_Constraint LastCons, const Standard_Integer NbPol); - + Standard_EXPORT AppDef_ParLeastSquareOfMyGradientbisOfBSplineCompute( + const AppDef_MultiLine& SSP, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const AppParCurves_Constraint FirstCons, + const AppParCurves_Constraint LastCons, + const Standard_Integer NbPol); + //! given a MultiLine, this algorithm computes the least //! square resolution using the Householder-QR method. //! If the first and/or the last point is a constraint @@ -87,171 +96,192 @@ public: //! and is also the same for each MultiLine point because //! they are approximated in parallel(so with the same //! parameter, only the vector B changes). - Standard_EXPORT AppDef_ParLeastSquareOfMyGradientbisOfBSplineCompute(const AppDef_MultiLine& SSP, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const AppParCurves_Constraint FirstCons, const AppParCurves_Constraint LastCons, const math_Vector& Parameters, const Standard_Integer NbPol); - + Standard_EXPORT AppDef_ParLeastSquareOfMyGradientbisOfBSplineCompute( + const AppDef_MultiLine& SSP, + const TColStd_Array1OfReal& Knots, + const TColStd_Array1OfInteger& Mults, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const AppParCurves_Constraint FirstCons, + const AppParCurves_Constraint LastCons, + const math_Vector& Parameters, + const Standard_Integer NbPol); + //! Initializes the fields of the object. - Standard_EXPORT AppDef_ParLeastSquareOfMyGradientbisOfBSplineCompute(const AppDef_MultiLine& SSP, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const AppParCurves_Constraint FirstCons, const AppParCurves_Constraint LastCons, const Standard_Integer NbPol); - + Standard_EXPORT AppDef_ParLeastSquareOfMyGradientbisOfBSplineCompute( + const AppDef_MultiLine& SSP, + const TColStd_Array1OfReal& Knots, + const TColStd_Array1OfInteger& Mults, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const AppParCurves_Constraint FirstCons, + const AppParCurves_Constraint LastCons, + const Standard_Integer NbPol); + //! Is used after having initialized the fields. //! The case "CurvaturePoint" is not treated in this method. - Standard_EXPORT void Perform (const math_Vector& Parameters); - + Standard_EXPORT void Perform(const math_Vector& Parameters); + //! Is used after having initialized the fields. - Standard_EXPORT void Perform (const math_Vector& Parameters, const Standard_Real l1, const Standard_Real l2); - + Standard_EXPORT void Perform(const math_Vector& Parameters, + const Standard_Real l1, + const Standard_Real l2); + //! Is used after having initialized the fields. //! is the tangent vector at the first point. //! is the tangent vector at the last point. - Standard_EXPORT void Perform (const math_Vector& Parameters, const math_Vector& V1t, const math_Vector& V2t, const Standard_Real l1, const Standard_Real l2); - + Standard_EXPORT void Perform(const math_Vector& Parameters, + const math_Vector& V1t, + const math_Vector& V2t, + const Standard_Real l1, + const Standard_Real l2); + //! Is used after having initialized the fields. //! is the tangent vector at the first point. //! is the tangent vector at the last point. //! is the tangent vector at the first point. //! is the tangent vector at the last point. - Standard_EXPORT void Perform (const math_Vector& Parameters, const math_Vector& V1t, const math_Vector& V2t, const math_Vector& V1c, const math_Vector& V2c, const Standard_Real l1, const Standard_Real l2); - + Standard_EXPORT void Perform(const math_Vector& Parameters, + const math_Vector& V1t, + const math_Vector& V2t, + const math_Vector& V1c, + const math_Vector& V2c, + const Standard_Real l1, + const Standard_Real l2); + //! returns True if all has been correctly done. Standard_EXPORT Standard_Boolean IsDone() const; - + //! returns the result of the approximation, i.e. all the //! Curves. //! An exception is raised if NotDone. Standard_EXPORT AppParCurves_MultiCurve BezierValue(); - + //! returns the result of the approximation, i.e. all the //! Curves. //! An exception is raised if NotDone. Standard_EXPORT const AppParCurves_MultiBSpCurve& BSplineValue(); - + //! returns the function matrix used to approximate the //! set. Standard_EXPORT const math_Matrix& FunctionMatrix() const; - + //! returns the derivative function matrix used //! to approximate the set. Standard_EXPORT const math_Matrix& DerivativeFunctionMatrix() const; - + //! returns the maximum errors between the MultiLine //! and the approximation curves. F is the sum of the square //! distances. Grad is the derivative vector of the //! function F. - Standard_EXPORT void ErrorGradient (math_Vector& Grad, Standard_Real& F, Standard_Real& MaxE3d, Standard_Real& MaxE2d); - + Standard_EXPORT void ErrorGradient(math_Vector& Grad, + Standard_Real& F, + Standard_Real& MaxE3d, + Standard_Real& MaxE2d); + //! returns the distances between the points of the //! multiline and the approximation curves. Standard_EXPORT const math_Matrix& Distance(); - + //! returns the maximum errors between the MultiLine //! and the approximation curves. F is the sum of the square //! distances. - Standard_EXPORT void Error (Standard_Real& F, Standard_Real& MaxE3d, Standard_Real& MaxE2d); - + Standard_EXPORT void Error(Standard_Real& F, Standard_Real& MaxE3d, Standard_Real& MaxE2d); + //! returns the value (P2 - P1)/ V1 if the first point //! was a tangency point. Standard_EXPORT Standard_Real FirstLambda() const; - + //! returns the value (PN - PN-1)/ VN if the last point //! was a tangency point. Standard_EXPORT Standard_Real LastLambda() const; - + //! returns the matrix of points value. Standard_EXPORT const math_Matrix& Points() const; - + //! returns the matrix of resulting control points value. Standard_EXPORT const math_Matrix& Poles() const; - + //! Returns the indexes of the first non null values of //! A and DA. //! The values are non null from Index(ieme point) +1 //! to Index(ieme point) + degree +1. Standard_EXPORT const math_IntegerVector& KIndex() const; - - - protected: - - //! is used by the constructors above. - Standard_EXPORT void Init (const AppDef_MultiLine& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint); - + Standard_EXPORT void Init(const AppDef_MultiLine& SSP, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint); + //! returns the number of second member columns. //! Is used internally to initialize the fields. - Standard_EXPORT Standard_Integer NbBColumns (const AppDef_MultiLine& SSP) const; - + Standard_EXPORT Standard_Integer NbBColumns(const AppDef_MultiLine& SSP) const; + //! returns the first point being fitted. - Standard_EXPORT Standard_Integer TheFirstPoint (const AppParCurves_Constraint FirstCons, const Standard_Integer FirstPoint) const; - + Standard_EXPORT Standard_Integer TheFirstPoint(const AppParCurves_Constraint FirstCons, + const Standard_Integer FirstPoint) const; + //! returns the last point being fitted. - Standard_EXPORT Standard_Integer TheLastPoint (const AppParCurves_Constraint LastCons, const Standard_Integer LastPoint) const; - - //! Affects the fields in the case of a constraint point. - Standard_EXPORT void Affect (const AppDef_MultiLine& SSP, const Standard_Integer Index, AppParCurves_Constraint& Cons, math_Vector& Vt, math_Vector& Vc); - - Standard_EXPORT void ComputeFunction (const math_Vector& Parameters); - - Standard_EXPORT void SearchIndex (math_IntegerVector& Index); - - //! computes internal matrixes for the resolution - Standard_EXPORT void MakeTAA (math_Vector& TheA, math_Vector& TheB); - - //! computes internal matrixes for the resolution - Standard_EXPORT void MakeTAA (math_Vector& TheA); - - //! computes internal matrixes for the resolution - Standard_EXPORT void MakeTAA (math_Vector& TheA, math_Matrix& TheB); + Standard_EXPORT Standard_Integer TheLastPoint(const AppParCurves_Constraint LastCons, + const Standard_Integer LastPoint) const; + //! Affects the fields in the case of a constraint point. + Standard_EXPORT void Affect(const AppDef_MultiLine& SSP, + const Standard_Integer Index, + AppParCurves_Constraint& Cons, + math_Vector& Vt, + math_Vector& Vc); + Standard_EXPORT void ComputeFunction(const math_Vector& Parameters); + Standard_EXPORT void SearchIndex(math_IntegerVector& Index); -private: + //! computes internal matrixes for the resolution + Standard_EXPORT void MakeTAA(math_Vector& TheA, math_Vector& TheB); + //! computes internal matrixes for the resolution + Standard_EXPORT void MakeTAA(math_Vector& TheA); + //! computes internal matrixes for the resolution + Standard_EXPORT void MakeTAA(math_Vector& TheA, math_Matrix& TheB); - AppParCurves_Constraint FirstConstraint; - AppParCurves_Constraint LastConstraint; - AppParCurves_MultiBSpCurve SCU; - Handle(TColStd_HArray1OfReal) myknots; +private: + AppParCurves_Constraint FirstConstraint; + AppParCurves_Constraint LastConstraint; + AppParCurves_MultiBSpCurve SCU; + Handle(TColStd_HArray1OfReal) myknots; Handle(TColStd_HArray1OfInteger) mymults; - math_Matrix mypoles; - math_Matrix A; - math_Matrix DA; - math_Matrix B2; - math_Matrix mypoints; - math_Vector Vflatknots; - math_Vector Vec1t; - math_Vector Vec1c; - math_Vector Vec2t; - math_Vector Vec2c; - math_Matrix theError; - math_IntegerVector myindex; - Standard_Real lambda1; - Standard_Real lambda2; - Standard_Integer FirstP; - Standard_Integer LastP; - Standard_Integer Nlignes; - Standard_Integer Ninc; - Standard_Integer NA; - Standard_Integer myfirstp; - Standard_Integer mylastp; - Standard_Integer resinit; - Standard_Integer resfin; - Standard_Integer nbP2d; - Standard_Integer nbP; - Standard_Integer nbpoles; - Standard_Integer deg; - Standard_Boolean done; - Standard_Boolean iscalculated; - Standard_Boolean isready; - - + math_Matrix mypoles; + math_Matrix A; + math_Matrix DA; + math_Matrix B2; + math_Matrix mypoints; + math_Vector Vflatknots; + math_Vector Vec1t; + math_Vector Vec1c; + math_Vector Vec2t; + math_Vector Vec2c; + math_Matrix theError; + math_IntegerVector myindex; + Standard_Real lambda1; + Standard_Real lambda2; + Standard_Integer FirstP; + Standard_Integer LastP; + Standard_Integer Nlignes; + Standard_Integer Ninc; + Standard_Integer NA; + Standard_Integer myfirstp; + Standard_Integer mylastp; + Standard_Integer resinit; + Standard_Integer resfin; + Standard_Integer nbP2d; + Standard_Integer nbP; + Standard_Integer nbpoles; + Standard_Integer deg; + Standard_Boolean done; + Standard_Boolean iscalculated; + Standard_Boolean isready; }; - - - - - - #endif // _AppDef_ParLeastSquareOfMyGradientbisOfBSplineCompute_HeaderFile diff --git a/opencascade/AppDef_ParLeastSquareOfTheGradient.hxx b/opencascade/AppDef_ParLeastSquareOfTheGradient.hxx index 1f1bb56d6..9d9303260 100644 --- a/opencascade/AppDef_ParLeastSquareOfTheGradient.hxx +++ b/opencascade/AppDef_ParLeastSquareOfTheGradient.hxx @@ -42,15 +42,11 @@ class AppParCurves_MultiCurve; class AppParCurves_MultiBSpCurve; class math_Matrix; - - -class AppDef_ParLeastSquareOfTheGradient +class AppDef_ParLeastSquareOfTheGradient { public: - DEFINE_STANDARD_ALLOC - //! given a MultiLine, this algorithm computes the least //! square resolution using the Householder-QR method. //! If the first and/or the last point is a constraint @@ -67,11 +63,22 @@ public: //! and is also the same for each MultiLine point because //! they are approximated in parallel(so with the same //! parameter, only the vector B changes). - Standard_EXPORT AppDef_ParLeastSquareOfTheGradient(const AppDef_MultiLine& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const AppParCurves_Constraint FirstCons, const AppParCurves_Constraint LastCons, const math_Vector& Parameters, const Standard_Integer NbPol); - + Standard_EXPORT AppDef_ParLeastSquareOfTheGradient(const AppDef_MultiLine& SSP, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const AppParCurves_Constraint FirstCons, + const AppParCurves_Constraint LastCons, + const math_Vector& Parameters, + const Standard_Integer NbPol); + //! Initializes the fields of the object. - Standard_EXPORT AppDef_ParLeastSquareOfTheGradient(const AppDef_MultiLine& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const AppParCurves_Constraint FirstCons, const AppParCurves_Constraint LastCons, const Standard_Integer NbPol); - + Standard_EXPORT AppDef_ParLeastSquareOfTheGradient(const AppDef_MultiLine& SSP, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const AppParCurves_Constraint FirstCons, + const AppParCurves_Constraint LastCons, + const Standard_Integer NbPol); + //! given a MultiLine, this algorithm computes the least //! square resolution using the Householder-QR method. //! If the first and/or the last point is a constraint @@ -87,171 +94,190 @@ public: //! and is also the same for each MultiLine point because //! they are approximated in parallel(so with the same //! parameter, only the vector B changes). - Standard_EXPORT AppDef_ParLeastSquareOfTheGradient(const AppDef_MultiLine& SSP, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const AppParCurves_Constraint FirstCons, const AppParCurves_Constraint LastCons, const math_Vector& Parameters, const Standard_Integer NbPol); - + Standard_EXPORT AppDef_ParLeastSquareOfTheGradient(const AppDef_MultiLine& SSP, + const TColStd_Array1OfReal& Knots, + const TColStd_Array1OfInteger& Mults, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const AppParCurves_Constraint FirstCons, + const AppParCurves_Constraint LastCons, + const math_Vector& Parameters, + const Standard_Integer NbPol); + //! Initializes the fields of the object. - Standard_EXPORT AppDef_ParLeastSquareOfTheGradient(const AppDef_MultiLine& SSP, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const AppParCurves_Constraint FirstCons, const AppParCurves_Constraint LastCons, const Standard_Integer NbPol); - + Standard_EXPORT AppDef_ParLeastSquareOfTheGradient(const AppDef_MultiLine& SSP, + const TColStd_Array1OfReal& Knots, + const TColStd_Array1OfInteger& Mults, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const AppParCurves_Constraint FirstCons, + const AppParCurves_Constraint LastCons, + const Standard_Integer NbPol); + //! Is used after having initialized the fields. //! The case "CurvaturePoint" is not treated in this method. - Standard_EXPORT void Perform (const math_Vector& Parameters); - + Standard_EXPORT void Perform(const math_Vector& Parameters); + //! Is used after having initialized the fields. - Standard_EXPORT void Perform (const math_Vector& Parameters, const Standard_Real l1, const Standard_Real l2); - + Standard_EXPORT void Perform(const math_Vector& Parameters, + const Standard_Real l1, + const Standard_Real l2); + //! Is used after having initialized the fields. //! is the tangent vector at the first point. //! is the tangent vector at the last point. - Standard_EXPORT void Perform (const math_Vector& Parameters, const math_Vector& V1t, const math_Vector& V2t, const Standard_Real l1, const Standard_Real l2); - + Standard_EXPORT void Perform(const math_Vector& Parameters, + const math_Vector& V1t, + const math_Vector& V2t, + const Standard_Real l1, + const Standard_Real l2); + //! Is used after having initialized the fields. //! is the tangent vector at the first point. //! is the tangent vector at the last point. //! is the tangent vector at the first point. //! is the tangent vector at the last point. - Standard_EXPORT void Perform (const math_Vector& Parameters, const math_Vector& V1t, const math_Vector& V2t, const math_Vector& V1c, const math_Vector& V2c, const Standard_Real l1, const Standard_Real l2); - + Standard_EXPORT void Perform(const math_Vector& Parameters, + const math_Vector& V1t, + const math_Vector& V2t, + const math_Vector& V1c, + const math_Vector& V2c, + const Standard_Real l1, + const Standard_Real l2); + //! returns True if all has been correctly done. Standard_EXPORT Standard_Boolean IsDone() const; - + //! returns the result of the approximation, i.e. all the //! Curves. //! An exception is raised if NotDone. Standard_EXPORT AppParCurves_MultiCurve BezierValue(); - + //! returns the result of the approximation, i.e. all the //! Curves. //! An exception is raised if NotDone. Standard_EXPORT const AppParCurves_MultiBSpCurve& BSplineValue(); - + //! returns the function matrix used to approximate the //! set. Standard_EXPORT const math_Matrix& FunctionMatrix() const; - + //! returns the derivative function matrix used //! to approximate the set. Standard_EXPORT const math_Matrix& DerivativeFunctionMatrix() const; - + //! returns the maximum errors between the MultiLine //! and the approximation curves. F is the sum of the square //! distances. Grad is the derivative vector of the //! function F. - Standard_EXPORT void ErrorGradient (math_Vector& Grad, Standard_Real& F, Standard_Real& MaxE3d, Standard_Real& MaxE2d); - + Standard_EXPORT void ErrorGradient(math_Vector& Grad, + Standard_Real& F, + Standard_Real& MaxE3d, + Standard_Real& MaxE2d); + //! returns the distances between the points of the //! multiline and the approximation curves. Standard_EXPORT const math_Matrix& Distance(); - + //! returns the maximum errors between the MultiLine //! and the approximation curves. F is the sum of the square //! distances. - Standard_EXPORT void Error (Standard_Real& F, Standard_Real& MaxE3d, Standard_Real& MaxE2d); - + Standard_EXPORT void Error(Standard_Real& F, Standard_Real& MaxE3d, Standard_Real& MaxE2d); + //! returns the value (P2 - P1)/ V1 if the first point //! was a tangency point. Standard_EXPORT Standard_Real FirstLambda() const; - + //! returns the value (PN - PN-1)/ VN if the last point //! was a tangency point. Standard_EXPORT Standard_Real LastLambda() const; - + //! returns the matrix of points value. Standard_EXPORT const math_Matrix& Points() const; - + //! returns the matrix of resulting control points value. Standard_EXPORT const math_Matrix& Poles() const; - + //! Returns the indexes of the first non null values of //! A and DA. //! The values are non null from Index(ieme point) +1 //! to Index(ieme point) + degree +1. Standard_EXPORT const math_IntegerVector& KIndex() const; - - - protected: - - //! is used by the constructors above. - Standard_EXPORT void Init (const AppDef_MultiLine& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint); - + Standard_EXPORT void Init(const AppDef_MultiLine& SSP, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint); + //! returns the number of second member columns. //! Is used internally to initialize the fields. - Standard_EXPORT Standard_Integer NbBColumns (const AppDef_MultiLine& SSP) const; - + Standard_EXPORT Standard_Integer NbBColumns(const AppDef_MultiLine& SSP) const; + //! returns the first point being fitted. - Standard_EXPORT Standard_Integer TheFirstPoint (const AppParCurves_Constraint FirstCons, const Standard_Integer FirstPoint) const; - + Standard_EXPORT Standard_Integer TheFirstPoint(const AppParCurves_Constraint FirstCons, + const Standard_Integer FirstPoint) const; + //! returns the last point being fitted. - Standard_EXPORT Standard_Integer TheLastPoint (const AppParCurves_Constraint LastCons, const Standard_Integer LastPoint) const; - - //! Affects the fields in the case of a constraint point. - Standard_EXPORT void Affect (const AppDef_MultiLine& SSP, const Standard_Integer Index, AppParCurves_Constraint& Cons, math_Vector& Vt, math_Vector& Vc); - - Standard_EXPORT void ComputeFunction (const math_Vector& Parameters); - - Standard_EXPORT void SearchIndex (math_IntegerVector& Index); - - //! computes internal matrixes for the resolution - Standard_EXPORT void MakeTAA (math_Vector& TheA, math_Vector& TheB); - - //! computes internal matrixes for the resolution - Standard_EXPORT void MakeTAA (math_Vector& TheA); - - //! computes internal matrixes for the resolution - Standard_EXPORT void MakeTAA (math_Vector& TheA, math_Matrix& TheB); + Standard_EXPORT Standard_Integer TheLastPoint(const AppParCurves_Constraint LastCons, + const Standard_Integer LastPoint) const; + //! Affects the fields in the case of a constraint point. + Standard_EXPORT void Affect(const AppDef_MultiLine& SSP, + const Standard_Integer Index, + AppParCurves_Constraint& Cons, + math_Vector& Vt, + math_Vector& Vc); + Standard_EXPORT void ComputeFunction(const math_Vector& Parameters); + Standard_EXPORT void SearchIndex(math_IntegerVector& Index); -private: + //! computes internal matrixes for the resolution + Standard_EXPORT void MakeTAA(math_Vector& TheA, math_Vector& TheB); + //! computes internal matrixes for the resolution + Standard_EXPORT void MakeTAA(math_Vector& TheA); + //! computes internal matrixes for the resolution + Standard_EXPORT void MakeTAA(math_Vector& TheA, math_Matrix& TheB); - AppParCurves_Constraint FirstConstraint; - AppParCurves_Constraint LastConstraint; - AppParCurves_MultiBSpCurve SCU; - Handle(TColStd_HArray1OfReal) myknots; +private: + AppParCurves_Constraint FirstConstraint; + AppParCurves_Constraint LastConstraint; + AppParCurves_MultiBSpCurve SCU; + Handle(TColStd_HArray1OfReal) myknots; Handle(TColStd_HArray1OfInteger) mymults; - math_Matrix mypoles; - math_Matrix A; - math_Matrix DA; - math_Matrix B2; - math_Matrix mypoints; - math_Vector Vflatknots; - math_Vector Vec1t; - math_Vector Vec1c; - math_Vector Vec2t; - math_Vector Vec2c; - math_Matrix theError; - math_IntegerVector myindex; - Standard_Real lambda1; - Standard_Real lambda2; - Standard_Integer FirstP; - Standard_Integer LastP; - Standard_Integer Nlignes; - Standard_Integer Ninc; - Standard_Integer NA; - Standard_Integer myfirstp; - Standard_Integer mylastp; - Standard_Integer resinit; - Standard_Integer resfin; - Standard_Integer nbP2d; - Standard_Integer nbP; - Standard_Integer nbpoles; - Standard_Integer deg; - Standard_Boolean done; - Standard_Boolean iscalculated; - Standard_Boolean isready; - - + math_Matrix mypoles; + math_Matrix A; + math_Matrix DA; + math_Matrix B2; + math_Matrix mypoints; + math_Vector Vflatknots; + math_Vector Vec1t; + math_Vector Vec1c; + math_Vector Vec2t; + math_Vector Vec2c; + math_Matrix theError; + math_IntegerVector myindex; + Standard_Real lambda1; + Standard_Real lambda2; + Standard_Integer FirstP; + Standard_Integer LastP; + Standard_Integer Nlignes; + Standard_Integer Ninc; + Standard_Integer NA; + Standard_Integer myfirstp; + Standard_Integer mylastp; + Standard_Integer resinit; + Standard_Integer resfin; + Standard_Integer nbP2d; + Standard_Integer nbP; + Standard_Integer nbpoles; + Standard_Integer deg; + Standard_Boolean done; + Standard_Boolean iscalculated; + Standard_Boolean isready; }; - - - - - - #endif // _AppDef_ParLeastSquareOfTheGradient_HeaderFile diff --git a/opencascade/AppDef_ResConstraintOfMyGradientOfCompute.hxx b/opencascade/AppDef_ResConstraintOfMyGradientOfCompute.hxx index 75dfb16d4..64ce79626 100644 --- a/opencascade/AppDef_ResConstraintOfMyGradientOfCompute.hxx +++ b/opencascade/AppDef_ResConstraintOfMyGradientOfCompute.hxx @@ -33,15 +33,11 @@ class AppDef_MyLineTool; class AppParCurves_MultiCurve; class math_Matrix; - - -class AppDef_ResConstraintOfMyGradientOfCompute +class AppDef_ResConstraintOfMyGradientOfCompute { public: - DEFINE_STANDARD_ALLOC - //! Given a MultiLine SSP with constraints points, this //! algorithm finds the best curve solution to approximate it. //! The poles from SCurv issued for example from the least @@ -52,67 +48,64 @@ public: //! and DA is the derivative bernstein matrix.(They can come //! from an approximation with ParLeastSquare.) //! The MultiCurve is modified. New MultiPoles are given. - Standard_EXPORT AppDef_ResConstraintOfMyGradientOfCompute(const AppDef_MultiLine& SSP, AppParCurves_MultiCurve& SCurv, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const Handle(AppParCurves_HArray1OfConstraintCouple)& Constraints, const math_Matrix& Bern, const math_Matrix& DerivativeBern, const Standard_Real Tolerance = 1.0e-10); - + Standard_EXPORT AppDef_ResConstraintOfMyGradientOfCompute( + const AppDef_MultiLine& SSP, + AppParCurves_MultiCurve& SCurv, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const Handle(AppParCurves_HArray1OfConstraintCouple)& Constraints, + const math_Matrix& Bern, + const math_Matrix& DerivativeBern, + const Standard_Real Tolerance = 1.0e-10); + //! returns True if all has been correctly done. Standard_EXPORT Standard_Boolean IsDone() const; - + //! returns the maximum difference value between the curve //! and the given points. Standard_EXPORT Standard_Real Error() const; - + Standard_EXPORT const math_Matrix& ConstraintMatrix() const; - + //! returns the duale variables of the system. Standard_EXPORT const math_Vector& Duale() const; - + //! Returns the derivative of the constraint matrix. - Standard_EXPORT const math_Matrix& ConstraintDerivative (const AppDef_MultiLine& SSP, const math_Vector& Parameters, const Standard_Integer Deg, const math_Matrix& DA); - + Standard_EXPORT const math_Matrix& ConstraintDerivative(const AppDef_MultiLine& SSP, + const math_Vector& Parameters, + const Standard_Integer Deg, + const math_Matrix& DA); + //! returns the Inverse of Cont*Transposed(Cont), where //! Cont is the constraint matrix for the algorithm. Standard_EXPORT const math_Matrix& InverseMatrix() const; - - - protected: - - //! is used internally to create the fields. - Standard_EXPORT Standard_Integer NbConstraints (const AppDef_MultiLine& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints) const; - - //! is internally used for the fields creation. - Standard_EXPORT Standard_Integer NbColumns (const AppDef_MultiLine& SSP, const Standard_Integer Deg) const; - - + Standard_EXPORT Standard_Integer + NbConstraints(const AppDef_MultiLine& SSP, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints) const; + //! is internally used for the fields creation. + Standard_EXPORT Standard_Integer NbColumns(const AppDef_MultiLine& SSP, + const Standard_Integer Deg) const; private: - - - - Standard_Boolean Done; - Standard_Real Err; - math_Matrix Cont; - math_Matrix DeCont; - math_Vector Secont; - math_Matrix CTCinv; - math_Vector Vardua; - Standard_Integer IncPass; - Standard_Integer IncTan; - Standard_Integer IncCurv; + Standard_Boolean Done; + Standard_Real Err; + math_Matrix Cont; + math_Matrix DeCont; + math_Vector Secont; + math_Matrix CTCinv; + math_Vector Vardua; + Standard_Integer IncPass; + Standard_Integer IncTan; + Standard_Integer IncCurv; TColStd_Array1OfInteger IPas; TColStd_Array1OfInteger ITan; TColStd_Array1OfInteger ICurv; - - }; - - - - - - #endif // _AppDef_ResConstraintOfMyGradientOfCompute_HeaderFile diff --git a/opencascade/AppDef_ResConstraintOfMyGradientbisOfBSplineCompute.hxx b/opencascade/AppDef_ResConstraintOfMyGradientbisOfBSplineCompute.hxx index 8c5b484a1..57e026b18 100644 --- a/opencascade/AppDef_ResConstraintOfMyGradientbisOfBSplineCompute.hxx +++ b/opencascade/AppDef_ResConstraintOfMyGradientbisOfBSplineCompute.hxx @@ -33,15 +33,11 @@ class AppDef_MyLineTool; class AppParCurves_MultiCurve; class math_Matrix; - - -class AppDef_ResConstraintOfMyGradientbisOfBSplineCompute +class AppDef_ResConstraintOfMyGradientbisOfBSplineCompute { public: - DEFINE_STANDARD_ALLOC - //! Given a MultiLine SSP with constraints points, this //! algorithm finds the best curve solution to approximate it. //! The poles from SCurv issued for example from the least @@ -52,67 +48,64 @@ public: //! and DA is the derivative bernstein matrix.(They can come //! from an approximation with ParLeastSquare.) //! The MultiCurve is modified. New MultiPoles are given. - Standard_EXPORT AppDef_ResConstraintOfMyGradientbisOfBSplineCompute(const AppDef_MultiLine& SSP, AppParCurves_MultiCurve& SCurv, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const Handle(AppParCurves_HArray1OfConstraintCouple)& Constraints, const math_Matrix& Bern, const math_Matrix& DerivativeBern, const Standard_Real Tolerance = 1.0e-10); - + Standard_EXPORT AppDef_ResConstraintOfMyGradientbisOfBSplineCompute( + const AppDef_MultiLine& SSP, + AppParCurves_MultiCurve& SCurv, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const Handle(AppParCurves_HArray1OfConstraintCouple)& Constraints, + const math_Matrix& Bern, + const math_Matrix& DerivativeBern, + const Standard_Real Tolerance = 1.0e-10); + //! returns True if all has been correctly done. Standard_EXPORT Standard_Boolean IsDone() const; - + //! returns the maximum difference value between the curve //! and the given points. Standard_EXPORT Standard_Real Error() const; - + Standard_EXPORT const math_Matrix& ConstraintMatrix() const; - + //! returns the duale variables of the system. Standard_EXPORT const math_Vector& Duale() const; - + //! Returns the derivative of the constraint matrix. - Standard_EXPORT const math_Matrix& ConstraintDerivative (const AppDef_MultiLine& SSP, const math_Vector& Parameters, const Standard_Integer Deg, const math_Matrix& DA); - + Standard_EXPORT const math_Matrix& ConstraintDerivative(const AppDef_MultiLine& SSP, + const math_Vector& Parameters, + const Standard_Integer Deg, + const math_Matrix& DA); + //! returns the Inverse of Cont*Transposed(Cont), where //! Cont is the constraint matrix for the algorithm. Standard_EXPORT const math_Matrix& InverseMatrix() const; - - - protected: - - //! is used internally to create the fields. - Standard_EXPORT Standard_Integer NbConstraints (const AppDef_MultiLine& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints) const; - - //! is internally used for the fields creation. - Standard_EXPORT Standard_Integer NbColumns (const AppDef_MultiLine& SSP, const Standard_Integer Deg) const; - - + Standard_EXPORT Standard_Integer + NbConstraints(const AppDef_MultiLine& SSP, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints) const; + //! is internally used for the fields creation. + Standard_EXPORT Standard_Integer NbColumns(const AppDef_MultiLine& SSP, + const Standard_Integer Deg) const; private: - - - - Standard_Boolean Done; - Standard_Real Err; - math_Matrix Cont; - math_Matrix DeCont; - math_Vector Secont; - math_Matrix CTCinv; - math_Vector Vardua; - Standard_Integer IncPass; - Standard_Integer IncTan; - Standard_Integer IncCurv; + Standard_Boolean Done; + Standard_Real Err; + math_Matrix Cont; + math_Matrix DeCont; + math_Vector Secont; + math_Matrix CTCinv; + math_Vector Vardua; + Standard_Integer IncPass; + Standard_Integer IncTan; + Standard_Integer IncCurv; TColStd_Array1OfInteger IPas; TColStd_Array1OfInteger ITan; TColStd_Array1OfInteger ICurv; - - }; - - - - - - #endif // _AppDef_ResConstraintOfMyGradientbisOfBSplineCompute_HeaderFile diff --git a/opencascade/AppDef_ResConstraintOfTheGradient.hxx b/opencascade/AppDef_ResConstraintOfTheGradient.hxx index fa6aac684..85eff2c58 100644 --- a/opencascade/AppDef_ResConstraintOfTheGradient.hxx +++ b/opencascade/AppDef_ResConstraintOfTheGradient.hxx @@ -33,15 +33,11 @@ class AppDef_MyLineTool; class AppParCurves_MultiCurve; class math_Matrix; - - -class AppDef_ResConstraintOfTheGradient +class AppDef_ResConstraintOfTheGradient { public: - DEFINE_STANDARD_ALLOC - //! Given a MultiLine SSP with constraints points, this //! algorithm finds the best curve solution to approximate it. //! The poles from SCurv issued for example from the least @@ -52,67 +48,64 @@ public: //! and DA is the derivative bernstein matrix.(They can come //! from an approximation with ParLeastSquare.) //! The MultiCurve is modified. New MultiPoles are given. - Standard_EXPORT AppDef_ResConstraintOfTheGradient(const AppDef_MultiLine& SSP, AppParCurves_MultiCurve& SCurv, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const Handle(AppParCurves_HArray1OfConstraintCouple)& Constraints, const math_Matrix& Bern, const math_Matrix& DerivativeBern, const Standard_Real Tolerance = 1.0e-10); - + Standard_EXPORT AppDef_ResConstraintOfTheGradient( + const AppDef_MultiLine& SSP, + AppParCurves_MultiCurve& SCurv, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const Handle(AppParCurves_HArray1OfConstraintCouple)& Constraints, + const math_Matrix& Bern, + const math_Matrix& DerivativeBern, + const Standard_Real Tolerance = 1.0e-10); + //! returns True if all has been correctly done. Standard_EXPORT Standard_Boolean IsDone() const; - + //! returns the maximum difference value between the curve //! and the given points. Standard_EXPORT Standard_Real Error() const; - + Standard_EXPORT const math_Matrix& ConstraintMatrix() const; - + //! returns the duale variables of the system. Standard_EXPORT const math_Vector& Duale() const; - + //! Returns the derivative of the constraint matrix. - Standard_EXPORT const math_Matrix& ConstraintDerivative (const AppDef_MultiLine& SSP, const math_Vector& Parameters, const Standard_Integer Deg, const math_Matrix& DA); - + Standard_EXPORT const math_Matrix& ConstraintDerivative(const AppDef_MultiLine& SSP, + const math_Vector& Parameters, + const Standard_Integer Deg, + const math_Matrix& DA); + //! returns the Inverse of Cont*Transposed(Cont), where //! Cont is the constraint matrix for the algorithm. Standard_EXPORT const math_Matrix& InverseMatrix() const; - - - protected: - - //! is used internally to create the fields. - Standard_EXPORT Standard_Integer NbConstraints (const AppDef_MultiLine& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints) const; - - //! is internally used for the fields creation. - Standard_EXPORT Standard_Integer NbColumns (const AppDef_MultiLine& SSP, const Standard_Integer Deg) const; - - + Standard_EXPORT Standard_Integer + NbConstraints(const AppDef_MultiLine& SSP, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints) const; + //! is internally used for the fields creation. + Standard_EXPORT Standard_Integer NbColumns(const AppDef_MultiLine& SSP, + const Standard_Integer Deg) const; private: - - - - Standard_Boolean Done; - Standard_Real Err; - math_Matrix Cont; - math_Matrix DeCont; - math_Vector Secont; - math_Matrix CTCinv; - math_Vector Vardua; - Standard_Integer IncPass; - Standard_Integer IncTan; - Standard_Integer IncCurv; + Standard_Boolean Done; + Standard_Real Err; + math_Matrix Cont; + math_Matrix DeCont; + math_Vector Secont; + math_Matrix CTCinv; + math_Vector Vardua; + Standard_Integer IncPass; + Standard_Integer IncTan; + Standard_Integer IncCurv; TColStd_Array1OfInteger IPas; TColStd_Array1OfInteger ITan; TColStd_Array1OfInteger ICurv; - - }; - - - - - - #endif // _AppDef_ResConstraintOfTheGradient_HeaderFile diff --git a/opencascade/AppDef_SmoothCriterion.hxx b/opencascade/AppDef_SmoothCriterion.hxx index b1a836526..dc421d3de 100644 --- a/opencascade/AppDef_SmoothCriterion.hxx +++ b/opencascade/AppDef_SmoothCriterion.hxx @@ -30,7 +30,6 @@ class FEmTool_Curve; class math_Matrix; - class AppDef_SmoothCriterion; DEFINE_STANDARD_HANDLE(AppDef_SmoothCriterion, Standard_Transient) @@ -39,62 +38,65 @@ class AppDef_SmoothCriterion : public Standard_Transient { public: + Standard_EXPORT virtual void SetParameters(const Handle(TColStd_HArray1OfReal)& Parameters) = 0; - - Standard_EXPORT virtual void SetParameters (const Handle(TColStd_HArray1OfReal)& Parameters) = 0; - - Standard_EXPORT virtual void SetCurve (const Handle(FEmTool_Curve)& C) = 0; - - Standard_EXPORT virtual void GetCurve (Handle(FEmTool_Curve)& C) const = 0; - - Standard_EXPORT virtual void SetEstimation (const Standard_Real E1, const Standard_Real E2, const Standard_Real E3) = 0; - - Standard_EXPORT virtual Standard_Real& EstLength() = 0; - - Standard_EXPORT virtual void GetEstimation (Standard_Real& E1, Standard_Real& E2, Standard_Real& E3) const = 0; - - Standard_EXPORT virtual Handle(FEmTool_HAssemblyTable) AssemblyTable() const = 0; - - Standard_EXPORT virtual Handle(TColStd_HArray2OfInteger) DependenceTable() const = 0; - - Standard_EXPORT virtual Standard_Integer QualityValues (const Standard_Real J1min, const Standard_Real J2min, const Standard_Real J3min, Standard_Real& J1, Standard_Real& J2, Standard_Real& J3) = 0; - - Standard_EXPORT virtual void ErrorValues (Standard_Real& MaxError, Standard_Real& QuadraticError, Standard_Real& AverageError) = 0; - - Standard_EXPORT virtual void Hessian (const Standard_Integer Element, const Standard_Integer Dimension1, const Standard_Integer Dimension2, math_Matrix& H) = 0; - - Standard_EXPORT virtual void Gradient (const Standard_Integer Element, const Standard_Integer Dimension, math_Vector& G) = 0; - - //! Convert the assembly Vector in an Curve; - Standard_EXPORT virtual void InputVector (const math_Vector& X, const Handle(FEmTool_HAssemblyTable)& AssTable) = 0; - - Standard_EXPORT virtual void SetWeight (const Standard_Real QuadraticWeight, const Standard_Real QualityWeight, const Standard_Real percentJ1, const Standard_Real percentJ2, const Standard_Real percentJ3) = 0; - - Standard_EXPORT virtual void GetWeight (Standard_Real& QuadraticWeight, Standard_Real& QualityWeight) const = 0; - - Standard_EXPORT virtual void SetWeight (const TColStd_Array1OfReal& Weight) = 0; + Standard_EXPORT virtual void SetCurve(const Handle(FEmTool_Curve)& C) = 0; + Standard_EXPORT virtual void GetCurve(Handle(FEmTool_Curve)& C) const = 0; + Standard_EXPORT virtual void SetEstimation(const Standard_Real E1, + const Standard_Real E2, + const Standard_Real E3) = 0; + Standard_EXPORT virtual Standard_Real& EstLength() = 0; - DEFINE_STANDARD_RTTIEXT(AppDef_SmoothCriterion,Standard_Transient) - -protected: - - + Standard_EXPORT virtual void GetEstimation(Standard_Real& E1, + Standard_Real& E2, + Standard_Real& E3) const = 0; + Standard_EXPORT virtual Handle(FEmTool_HAssemblyTable) AssemblyTable() const = 0; -private: + Standard_EXPORT virtual Handle(TColStd_HArray2OfInteger) DependenceTable() const = 0; + Standard_EXPORT virtual Standard_Integer QualityValues(const Standard_Real J1min, + const Standard_Real J2min, + const Standard_Real J3min, + Standard_Real& J1, + Standard_Real& J2, + Standard_Real& J3) = 0; + Standard_EXPORT virtual void ErrorValues(Standard_Real& MaxError, + Standard_Real& QuadraticError, + Standard_Real& AverageError) = 0; + Standard_EXPORT virtual void Hessian(const Standard_Integer Element, + const Standard_Integer Dimension1, + const Standard_Integer Dimension2, + math_Matrix& H) = 0; -}; + Standard_EXPORT virtual void Gradient(const Standard_Integer Element, + const Standard_Integer Dimension, + math_Vector& G) = 0; + //! Convert the assembly Vector in an Curve; + Standard_EXPORT virtual void InputVector(const math_Vector& X, + const Handle(FEmTool_HAssemblyTable)& AssTable) = 0; + Standard_EXPORT virtual void SetWeight(const Standard_Real QuadraticWeight, + const Standard_Real QualityWeight, + const Standard_Real percentJ1, + const Standard_Real percentJ2, + const Standard_Real percentJ3) = 0; + Standard_EXPORT virtual void GetWeight(Standard_Real& QuadraticWeight, + Standard_Real& QualityWeight) const = 0; + Standard_EXPORT virtual void SetWeight(const TColStd_Array1OfReal& Weight) = 0; + DEFINE_STANDARD_RTTIEXT(AppDef_SmoothCriterion, Standard_Transient) +protected: +private: +}; #endif // _AppDef_SmoothCriterion_HeaderFile diff --git a/opencascade/AppDef_TheFunction.hxx b/opencascade/AppDef_TheFunction.hxx index fb7652829..e6dab6b3d 100644 --- a/opencascade/AppDef_TheFunction.hxx +++ b/opencascade/AppDef_TheFunction.hxx @@ -35,110 +35,98 @@ class AppDef_TheLeastSquares; class AppDef_TheResol; class AppParCurves_MultiCurve; - - -class AppDef_TheFunction : public math_MultipleVarFunctionWithGradient +class AppDef_TheFunction : public math_MultipleVarFunctionWithGradient { public: - DEFINE_STANDARD_ALLOC - //! initializes the fields of the function. The approximating //! curve has the desired degree Deg. - Standard_EXPORT AppDef_TheFunction(const AppDef_MultiLine& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, const math_Vector& Parameters, const Standard_Integer Deg); - + Standard_EXPORT AppDef_TheFunction( + const AppDef_MultiLine& SSP, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, + const math_Vector& Parameters, + const Standard_Integer Deg); + //! returns the number of variables of the function. It //! corresponds to the number of MultiPoints. Standard_EXPORT Standard_Integer NbVariables() const; - + //! this method computes the new approximation of the //! MultiLine //! SSP and calculates F = sum (||Pui - Bi*Pi||2) for each //! point of the MultiLine. - Standard_EXPORT Standard_Boolean Value (const math_Vector& X, Standard_Real& F); - + Standard_EXPORT Standard_Boolean Value(const math_Vector& X, Standard_Real& F); + //! returns the gradient G of the sum above for the //! parameters Xi. - Standard_EXPORT Standard_Boolean Gradient (const math_Vector& X, math_Vector& G); - + Standard_EXPORT Standard_Boolean Gradient(const math_Vector& X, math_Vector& G); + //! returns the value F=sum(||Pui - Bi*Pi||)2. //! returns the value G = grad(F) for the parameters Xi. - Standard_EXPORT Standard_Boolean Values (const math_Vector& X, Standard_Real& F, math_Vector& G); - + Standard_EXPORT Standard_Boolean Values(const math_Vector& X, Standard_Real& F, math_Vector& G); + //! returns the new parameters of the MultiLine. Standard_EXPORT const math_Vector& NewParameters() const; - + //! returns the MultiCurve approximating the set after //! computing the value F or Grad(F). Standard_EXPORT const AppParCurves_MultiCurve& CurveValue(); - + //! returns the distance between the MultiPoint of range //! IPoint and the curve CurveIndex. - Standard_EXPORT Standard_Real Error (const Standard_Integer IPoint, const Standard_Integer CurveIndex) const; - + Standard_EXPORT Standard_Real Error(const Standard_Integer IPoint, + const Standard_Integer CurveIndex) const; + //! returns the maximum distance between the points //! and the MultiCurve. Standard_EXPORT Standard_Real MaxError3d() const; - + //! returns the maximum distance between the points //! and the MultiCurve. Standard_EXPORT Standard_Real MaxError2d() const; - - Standard_EXPORT AppParCurves_Constraint FirstConstraint (const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, const Standard_Integer FirstPoint) const; - - Standard_EXPORT AppParCurves_Constraint LastConstraint (const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, const Standard_Integer LastPoint) const; - + Standard_EXPORT AppParCurves_Constraint + FirstConstraint(const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, + const Standard_Integer FirstPoint) const; + Standard_EXPORT AppParCurves_Constraint + LastConstraint(const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, + const Standard_Integer LastPoint) const; protected: - - //! this method is used each time Value or Gradient is //! needed. - Standard_EXPORT void Perform (const math_Vector& X); - - - + Standard_EXPORT void Perform(const math_Vector& X); private: - - - - Standard_Boolean Done; - AppDef_MultiLine MyMultiLine; - AppParCurves_MultiCurve MyMultiCurve; - Standard_Integer Degre; - math_Vector myParameters; - Standard_Real FVal; - math_Vector ValGrad_F; - math_Matrix MyF; - math_Matrix PTLX; - math_Matrix PTLY; - math_Matrix PTLZ; - math_Matrix A; - math_Matrix DA; - AppDef_TheLeastSquares MyLeastSquare; - Standard_Boolean Contraintes; - Standard_Integer NbP; - Standard_Integer NbCu; - Standard_Integer Adeb; - Standard_Integer Afin; - Handle(TColStd_HArray1OfInteger) tabdim; - Standard_Real ERR3d; - Standard_Real ERR2d; - Standard_Integer FirstP; - Standard_Integer LastP; + Standard_Boolean Done; + AppDef_MultiLine MyMultiLine; + AppParCurves_MultiCurve MyMultiCurve; + Standard_Integer Degre; + math_Vector myParameters; + Standard_Real FVal; + math_Vector ValGrad_F; + math_Matrix MyF; + math_Matrix PTLX; + math_Matrix PTLY; + math_Matrix PTLZ; + math_Matrix A; + math_Matrix DA; + AppDef_TheLeastSquares MyLeastSquare; + Standard_Boolean Contraintes; + Standard_Integer NbP; + Standard_Integer NbCu; + Standard_Integer Adeb; + Standard_Integer Afin; + Handle(TColStd_HArray1OfInteger) tabdim; + Standard_Real ERR3d; + Standard_Real ERR2d; + Standard_Integer FirstP; + Standard_Integer LastP; Handle(AppParCurves_HArray1OfConstraintCouple) myConstraints; - - }; - - - - - - #endif // _AppDef_TheFunction_HeaderFile diff --git a/opencascade/AppDef_TheGradient.hxx b/opencascade/AppDef_TheGradient.hxx index b37925d40..d1cf8566d 100644 --- a/opencascade/AppDef_TheGradient.hxx +++ b/opencascade/AppDef_TheGradient.hxx @@ -36,75 +36,61 @@ class AppDef_ParFunctionOfTheGradient; class AppDef_Gradient_BFGSOfTheGradient; class AppParCurves_MultiCurve; - - -class AppDef_TheGradient +class AppDef_TheGradient { public: - DEFINE_STANDARD_ALLOC - //! Tries to minimize the sum (square(||Qui - Bi*Pi||)) //! where Pui describe the approximating Bezier curves'Poles //! and Qi the MultiLine points with a parameter ui. //! In this algorithm, the parameters ui are the unknowns. //! The tolerance required on this sum is given by Tol. //! The desired degree of the resulting curve is Deg. - Standard_EXPORT AppDef_TheGradient(const AppDef_MultiLine& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, math_Vector& Parameters, const Standard_Integer Deg, const Standard_Real Tol3d, const Standard_Real Tol2d, const Standard_Integer NbIterations = 200); - + Standard_EXPORT AppDef_TheGradient( + const AppDef_MultiLine& SSP, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, + math_Vector& Parameters, + const Standard_Integer Deg, + const Standard_Real Tol3d, + const Standard_Real Tol2d, + const Standard_Integer NbIterations = 200); + //! returns True if all has been correctly done. Standard_EXPORT Standard_Boolean IsDone() const; - + //! returns all the Bezier curves approximating the //! MultiLine SSP after minimization of the parameter. Standard_EXPORT AppParCurves_MultiCurve Value() const; - + //! returns the difference between the old and the new //! approximation. //! An exception is raised if NotDone. //! An exception is raised if Index<1 or Index>NbParameters. - Standard_EXPORT Standard_Real Error (const Standard_Integer Index) const; - + Standard_EXPORT Standard_Real Error(const Standard_Integer Index) const; + //! returns the maximum difference between the old and the //! new approximation. Standard_EXPORT Standard_Real MaxError3d() const; - + //! returns the maximum difference between the old and the //! new approximation. Standard_EXPORT Standard_Real MaxError2d() const; - + //! returns the average error between the old and the //! new approximation. Standard_EXPORT Standard_Real AverageError() const; - - - protected: - - - - - private: - - - AppParCurves_MultiCurve SCU; - math_Vector ParError; - Standard_Real AvError; - Standard_Real MError3d; - Standard_Real MError2d; - Standard_Boolean Done; - - + math_Vector ParError; + Standard_Real AvError; + Standard_Real MError3d; + Standard_Real MError2d; + Standard_Boolean Done; }; - - - - - - #endif // _AppDef_TheGradient_HeaderFile diff --git a/opencascade/AppDef_TheLeastSquares.hxx b/opencascade/AppDef_TheLeastSquares.hxx index 7c10ee2ba..31c9f8513 100644 --- a/opencascade/AppDef_TheLeastSquares.hxx +++ b/opencascade/AppDef_TheLeastSquares.hxx @@ -42,15 +42,11 @@ class AppParCurves_MultiCurve; class AppParCurves_MultiBSpCurve; class math_Matrix; - - -class AppDef_TheLeastSquares +class AppDef_TheLeastSquares { public: - DEFINE_STANDARD_ALLOC - //! given a MultiLine, this algorithm computes the least //! square resolution using the Householder-QR method. //! If the first and/or the last point is a constraint @@ -67,11 +63,22 @@ public: //! and is also the same for each MultiLine point because //! they are approximated in parallel(so with the same //! parameter, only the vector B changes). - Standard_EXPORT AppDef_TheLeastSquares(const AppDef_MultiLine& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const AppParCurves_Constraint FirstCons, const AppParCurves_Constraint LastCons, const math_Vector& Parameters, const Standard_Integer NbPol); - + Standard_EXPORT AppDef_TheLeastSquares(const AppDef_MultiLine& SSP, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const AppParCurves_Constraint FirstCons, + const AppParCurves_Constraint LastCons, + const math_Vector& Parameters, + const Standard_Integer NbPol); + //! Initializes the fields of the object. - Standard_EXPORT AppDef_TheLeastSquares(const AppDef_MultiLine& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const AppParCurves_Constraint FirstCons, const AppParCurves_Constraint LastCons, const Standard_Integer NbPol); - + Standard_EXPORT AppDef_TheLeastSquares(const AppDef_MultiLine& SSP, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const AppParCurves_Constraint FirstCons, + const AppParCurves_Constraint LastCons, + const Standard_Integer NbPol); + //! given a MultiLine, this algorithm computes the least //! square resolution using the Householder-QR method. //! If the first and/or the last point is a constraint @@ -87,171 +94,190 @@ public: //! and is also the same for each MultiLine point because //! they are approximated in parallel(so with the same //! parameter, only the vector B changes). - Standard_EXPORT AppDef_TheLeastSquares(const AppDef_MultiLine& SSP, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const AppParCurves_Constraint FirstCons, const AppParCurves_Constraint LastCons, const math_Vector& Parameters, const Standard_Integer NbPol); - + Standard_EXPORT AppDef_TheLeastSquares(const AppDef_MultiLine& SSP, + const TColStd_Array1OfReal& Knots, + const TColStd_Array1OfInteger& Mults, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const AppParCurves_Constraint FirstCons, + const AppParCurves_Constraint LastCons, + const math_Vector& Parameters, + const Standard_Integer NbPol); + //! Initializes the fields of the object. - Standard_EXPORT AppDef_TheLeastSquares(const AppDef_MultiLine& SSP, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const AppParCurves_Constraint FirstCons, const AppParCurves_Constraint LastCons, const Standard_Integer NbPol); - + Standard_EXPORT AppDef_TheLeastSquares(const AppDef_MultiLine& SSP, + const TColStd_Array1OfReal& Knots, + const TColStd_Array1OfInteger& Mults, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const AppParCurves_Constraint FirstCons, + const AppParCurves_Constraint LastCons, + const Standard_Integer NbPol); + //! Is used after having initialized the fields. //! The case "CurvaturePoint" is not treated in this method. - Standard_EXPORT void Perform (const math_Vector& Parameters); - + Standard_EXPORT void Perform(const math_Vector& Parameters); + //! Is used after having initialized the fields. - Standard_EXPORT void Perform (const math_Vector& Parameters, const Standard_Real l1, const Standard_Real l2); - + Standard_EXPORT void Perform(const math_Vector& Parameters, + const Standard_Real l1, + const Standard_Real l2); + //! Is used after having initialized the fields. //! is the tangent vector at the first point. //! is the tangent vector at the last point. - Standard_EXPORT void Perform (const math_Vector& Parameters, const math_Vector& V1t, const math_Vector& V2t, const Standard_Real l1, const Standard_Real l2); - + Standard_EXPORT void Perform(const math_Vector& Parameters, + const math_Vector& V1t, + const math_Vector& V2t, + const Standard_Real l1, + const Standard_Real l2); + //! Is used after having initialized the fields. //! is the tangent vector at the first point. //! is the tangent vector at the last point. //! is the tangent vector at the first point. //! is the tangent vector at the last point. - Standard_EXPORT void Perform (const math_Vector& Parameters, const math_Vector& V1t, const math_Vector& V2t, const math_Vector& V1c, const math_Vector& V2c, const Standard_Real l1, const Standard_Real l2); - + Standard_EXPORT void Perform(const math_Vector& Parameters, + const math_Vector& V1t, + const math_Vector& V2t, + const math_Vector& V1c, + const math_Vector& V2c, + const Standard_Real l1, + const Standard_Real l2); + //! returns True if all has been correctly done. Standard_EXPORT Standard_Boolean IsDone() const; - + //! returns the result of the approximation, i.e. all the //! Curves. //! An exception is raised if NotDone. Standard_EXPORT AppParCurves_MultiCurve BezierValue(); - + //! returns the result of the approximation, i.e. all the //! Curves. //! An exception is raised if NotDone. Standard_EXPORT const AppParCurves_MultiBSpCurve& BSplineValue(); - + //! returns the function matrix used to approximate the //! set. Standard_EXPORT const math_Matrix& FunctionMatrix() const; - + //! returns the derivative function matrix used //! to approximate the set. Standard_EXPORT const math_Matrix& DerivativeFunctionMatrix() const; - + //! returns the maximum errors between the MultiLine //! and the approximation curves. F is the sum of the square //! distances. Grad is the derivative vector of the //! function F. - Standard_EXPORT void ErrorGradient (math_Vector& Grad, Standard_Real& F, Standard_Real& MaxE3d, Standard_Real& MaxE2d); - + Standard_EXPORT void ErrorGradient(math_Vector& Grad, + Standard_Real& F, + Standard_Real& MaxE3d, + Standard_Real& MaxE2d); + //! returns the distances between the points of the //! multiline and the approximation curves. Standard_EXPORT const math_Matrix& Distance(); - + //! returns the maximum errors between the MultiLine //! and the approximation curves. F is the sum of the square //! distances. - Standard_EXPORT void Error (Standard_Real& F, Standard_Real& MaxE3d, Standard_Real& MaxE2d); - + Standard_EXPORT void Error(Standard_Real& F, Standard_Real& MaxE3d, Standard_Real& MaxE2d); + //! returns the value (P2 - P1)/ V1 if the first point //! was a tangency point. Standard_EXPORT Standard_Real FirstLambda() const; - + //! returns the value (PN - PN-1)/ VN if the last point //! was a tangency point. Standard_EXPORT Standard_Real LastLambda() const; - + //! returns the matrix of points value. Standard_EXPORT const math_Matrix& Points() const; - + //! returns the matrix of resulting control points value. Standard_EXPORT const math_Matrix& Poles() const; - + //! Returns the indexes of the first non null values of //! A and DA. //! The values are non null from Index(ieme point) +1 //! to Index(ieme point) + degree +1. Standard_EXPORT const math_IntegerVector& KIndex() const; - - - protected: - - //! is used by the constructors above. - Standard_EXPORT void Init (const AppDef_MultiLine& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint); - + Standard_EXPORT void Init(const AppDef_MultiLine& SSP, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint); + //! returns the number of second member columns. //! Is used internally to initialize the fields. - Standard_EXPORT Standard_Integer NbBColumns (const AppDef_MultiLine& SSP) const; - + Standard_EXPORT Standard_Integer NbBColumns(const AppDef_MultiLine& SSP) const; + //! returns the first point being fitted. - Standard_EXPORT Standard_Integer TheFirstPoint (const AppParCurves_Constraint FirstCons, const Standard_Integer FirstPoint) const; - + Standard_EXPORT Standard_Integer TheFirstPoint(const AppParCurves_Constraint FirstCons, + const Standard_Integer FirstPoint) const; + //! returns the last point being fitted. - Standard_EXPORT Standard_Integer TheLastPoint (const AppParCurves_Constraint LastCons, const Standard_Integer LastPoint) const; - - //! Affects the fields in the case of a constraint point. - Standard_EXPORT void Affect (const AppDef_MultiLine& SSP, const Standard_Integer Index, AppParCurves_Constraint& Cons, math_Vector& Vt, math_Vector& Vc); - - Standard_EXPORT void ComputeFunction (const math_Vector& Parameters); - - Standard_EXPORT void SearchIndex (math_IntegerVector& Index); - - //! computes internal matrixes for the resolution - Standard_EXPORT void MakeTAA (math_Vector& TheA, math_Vector& TheB); - - //! computes internal matrixes for the resolution - Standard_EXPORT void MakeTAA (math_Vector& TheA); - - //! computes internal matrixes for the resolution - Standard_EXPORT void MakeTAA (math_Vector& TheA, math_Matrix& TheB); + Standard_EXPORT Standard_Integer TheLastPoint(const AppParCurves_Constraint LastCons, + const Standard_Integer LastPoint) const; + //! Affects the fields in the case of a constraint point. + Standard_EXPORT void Affect(const AppDef_MultiLine& SSP, + const Standard_Integer Index, + AppParCurves_Constraint& Cons, + math_Vector& Vt, + math_Vector& Vc); + Standard_EXPORT void ComputeFunction(const math_Vector& Parameters); + Standard_EXPORT void SearchIndex(math_IntegerVector& Index); -private: + //! computes internal matrixes for the resolution + Standard_EXPORT void MakeTAA(math_Vector& TheA, math_Vector& TheB); + //! computes internal matrixes for the resolution + Standard_EXPORT void MakeTAA(math_Vector& TheA); + //! computes internal matrixes for the resolution + Standard_EXPORT void MakeTAA(math_Vector& TheA, math_Matrix& TheB); - AppParCurves_Constraint FirstConstraint; - AppParCurves_Constraint LastConstraint; - AppParCurves_MultiBSpCurve SCU; - Handle(TColStd_HArray1OfReal) myknots; +private: + AppParCurves_Constraint FirstConstraint; + AppParCurves_Constraint LastConstraint; + AppParCurves_MultiBSpCurve SCU; + Handle(TColStd_HArray1OfReal) myknots; Handle(TColStd_HArray1OfInteger) mymults; - math_Matrix mypoles; - math_Matrix A; - math_Matrix DA; - math_Matrix B2; - math_Matrix mypoints; - math_Vector Vflatknots; - math_Vector Vec1t; - math_Vector Vec1c; - math_Vector Vec2t; - math_Vector Vec2c; - math_Matrix theError; - math_IntegerVector myindex; - Standard_Real lambda1; - Standard_Real lambda2; - Standard_Integer FirstP; - Standard_Integer LastP; - Standard_Integer Nlignes; - Standard_Integer Ninc; - Standard_Integer NA; - Standard_Integer myfirstp; - Standard_Integer mylastp; - Standard_Integer resinit; - Standard_Integer resfin; - Standard_Integer nbP2d; - Standard_Integer nbP; - Standard_Integer nbpoles; - Standard_Integer deg; - Standard_Boolean done; - Standard_Boolean iscalculated; - Standard_Boolean isready; - - + math_Matrix mypoles; + math_Matrix A; + math_Matrix DA; + math_Matrix B2; + math_Matrix mypoints; + math_Vector Vflatknots; + math_Vector Vec1t; + math_Vector Vec1c; + math_Vector Vec2t; + math_Vector Vec2c; + math_Matrix theError; + math_IntegerVector myindex; + Standard_Real lambda1; + Standard_Real lambda2; + Standard_Integer FirstP; + Standard_Integer LastP; + Standard_Integer Nlignes; + Standard_Integer Ninc; + Standard_Integer NA; + Standard_Integer myfirstp; + Standard_Integer mylastp; + Standard_Integer resinit; + Standard_Integer resfin; + Standard_Integer nbP2d; + Standard_Integer nbP; + Standard_Integer nbpoles; + Standard_Integer deg; + Standard_Boolean done; + Standard_Boolean iscalculated; + Standard_Boolean isready; }; - - - - - - #endif // _AppDef_TheLeastSquares_HeaderFile diff --git a/opencascade/AppDef_TheResol.hxx b/opencascade/AppDef_TheResol.hxx index 93b13ddad..64152e516 100644 --- a/opencascade/AppDef_TheResol.hxx +++ b/opencascade/AppDef_TheResol.hxx @@ -33,15 +33,11 @@ class AppDef_MyLineTool; class AppParCurves_MultiCurve; class math_Matrix; - - -class AppDef_TheResol +class AppDef_TheResol { public: - DEFINE_STANDARD_ALLOC - //! Given a MultiLine SSP with constraints points, this //! algorithm finds the best curve solution to approximate it. //! The poles from SCurv issued for example from the least @@ -52,67 +48,63 @@ public: //! and DA is the derivative bernstein matrix.(They can come //! from an approximation with ParLeastSquare.) //! The MultiCurve is modified. New MultiPoles are given. - Standard_EXPORT AppDef_TheResol(const AppDef_MultiLine& SSP, AppParCurves_MultiCurve& SCurv, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const Handle(AppParCurves_HArray1OfConstraintCouple)& Constraints, const math_Matrix& Bern, const math_Matrix& DerivativeBern, const Standard_Real Tolerance = 1.0e-10); - + Standard_EXPORT AppDef_TheResol(const AppDef_MultiLine& SSP, + AppParCurves_MultiCurve& SCurv, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const Handle(AppParCurves_HArray1OfConstraintCouple)& Constraints, + const math_Matrix& Bern, + const math_Matrix& DerivativeBern, + const Standard_Real Tolerance = 1.0e-10); + //! returns True if all has been correctly done. Standard_EXPORT Standard_Boolean IsDone() const; - + //! returns the maximum difference value between the curve //! and the given points. Standard_EXPORT Standard_Real Error() const; - + Standard_EXPORT const math_Matrix& ConstraintMatrix() const; - + //! returns the duale variables of the system. Standard_EXPORT const math_Vector& Duale() const; - + //! Returns the derivative of the constraint matrix. - Standard_EXPORT const math_Matrix& ConstraintDerivative (const AppDef_MultiLine& SSP, const math_Vector& Parameters, const Standard_Integer Deg, const math_Matrix& DA); - + Standard_EXPORT const math_Matrix& ConstraintDerivative(const AppDef_MultiLine& SSP, + const math_Vector& Parameters, + const Standard_Integer Deg, + const math_Matrix& DA); + //! returns the Inverse of Cont*Transposed(Cont), where //! Cont is the constraint matrix for the algorithm. Standard_EXPORT const math_Matrix& InverseMatrix() const; - - - protected: - - //! is used internally to create the fields. - Standard_EXPORT Standard_Integer NbConstraints (const AppDef_MultiLine& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints) const; - - //! is internally used for the fields creation. - Standard_EXPORT Standard_Integer NbColumns (const AppDef_MultiLine& SSP, const Standard_Integer Deg) const; - - + Standard_EXPORT Standard_Integer + NbConstraints(const AppDef_MultiLine& SSP, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints) const; + //! is internally used for the fields creation. + Standard_EXPORT Standard_Integer NbColumns(const AppDef_MultiLine& SSP, + const Standard_Integer Deg) const; private: - - - - Standard_Boolean Done; - Standard_Real Err; - math_Matrix Cont; - math_Matrix DeCont; - math_Vector Secont; - math_Matrix CTCinv; - math_Vector Vardua; - Standard_Integer IncPass; - Standard_Integer IncTan; - Standard_Integer IncCurv; + Standard_Boolean Done; + Standard_Real Err; + math_Matrix Cont; + math_Matrix DeCont; + math_Vector Secont; + math_Matrix CTCinv; + math_Vector Vardua; + Standard_Integer IncPass; + Standard_Integer IncTan; + Standard_Integer IncCurv; TColStd_Array1OfInteger IPas; TColStd_Array1OfInteger ITan; TColStd_Array1OfInteger ICurv; - - }; - - - - - - #endif // _AppDef_TheResol_HeaderFile diff --git a/opencascade/AppDef_Variational.hxx b/opencascade/AppDef_Variational.hxx index 3e2c7465d..9fb62020a 100644 --- a/opencascade/AppDef_Variational.hxx +++ b/opencascade/AppDef_Variational.hxx @@ -36,19 +36,16 @@ class FEmTool_Curve; class FEmTool_Assembly; class PLib_Base; - //! This class is used to smooth N points with constraints //! by minimization of quadratic criterium but also //! variational criterium in order to obtain " fair Curve " //! Computes the approximation of a Multiline by //! Variational optimization. -class AppDef_Variational +class AppDef_Variational { public: - DEFINE_STANDARD_ALLOC - //! Constructor. //! Initialization of the fields. //! warning : Nc0 : number of PassagePoint consraints @@ -62,234 +59,276 @@ public: //! //! Limitation : The MultiLine from AppDef has to be composed by //! only one Line ( Dimension 2 or 3). - Standard_EXPORT AppDef_Variational(const AppDef_MultiLine& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, const Standard_Integer MaxDegree = 14, const Standard_Integer MaxSegment = 100, const GeomAbs_Shape Continuity = GeomAbs_C2, const Standard_Boolean WithMinMax = Standard_False, const Standard_Boolean WithCutting = Standard_True, const Standard_Real Tolerance = 1.0, const Standard_Integer NbIterations = 2); - + Standard_EXPORT AppDef_Variational( + const AppDef_MultiLine& SSP, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, + const Standard_Integer MaxDegree = 14, + const Standard_Integer MaxSegment = 100, + const GeomAbs_Shape Continuity = GeomAbs_C2, + const Standard_Boolean WithMinMax = Standard_False, + const Standard_Boolean WithCutting = Standard_True, + const Standard_Real Tolerance = 1.0, + const Standard_Integer NbIterations = 2); + //! Makes the approximation with the current fields. Standard_EXPORT void Approximate(); - + //! returns True if the creation is done //! and correspond to the current fields. Standard_EXPORT Standard_Boolean IsCreated() const; - + //! returns True if the approximation is ok //! and correspond to the current fields. Standard_EXPORT Standard_Boolean IsDone() const; - + //! returns True if the problem is overconstrained //! in this case, approximation cannot be done. Standard_EXPORT Standard_Boolean IsOverConstrained() const; - + //! returns all the BSpline curves approximating the //! MultiLine from AppDef SSP after minimization of the parameter. Standard_EXPORT AppParCurves_MultiBSpCurve Value() const; - + //! returns the maximum of the distances between //! the points of the multiline and the approximation //! curves. Standard_EXPORT Standard_Real MaxError() const; - + //! returns the index of the MultiPoint of ErrorMax Standard_EXPORT Standard_Integer MaxErrorIndex() const; - + //! returns the quadratic average of the distances between //! the points of the multiline and the approximation //! curves. Standard_EXPORT Standard_Real QuadraticError() const; - + //! returns the distances between the points of the //! multiline and the approximation curves. - Standard_EXPORT void Distance (math_Matrix& mat); - + Standard_EXPORT void Distance(math_Matrix& mat); + //! returns the average error between //! the MultiLine from AppDef and the approximation. Standard_EXPORT Standard_Real AverageError() const; - + //! returns the parameters uses to the approximations Standard_EXPORT const Handle(TColStd_HArray1OfReal)& Parameters() const; - + //! returns the knots uses to the approximations Standard_EXPORT const Handle(TColStd_HArray1OfReal)& Knots() const; - + //! returns the values of the quality criterium. - Standard_EXPORT void Criterium (Standard_Real& VFirstOrder, Standard_Real& VSecondOrder, Standard_Real& VThirdOrder) const; - + Standard_EXPORT void Criterium(Standard_Real& VFirstOrder, + Standard_Real& VSecondOrder, + Standard_Real& VThirdOrder) const; + //! returns the Weights (as percent) associed to the criterium used in //! the optimization. - Standard_EXPORT void CriteriumWeight (Standard_Real& Percent1, Standard_Real& Percent2, Standard_Real& Percent3) const; - + Standard_EXPORT void CriteriumWeight(Standard_Real& Percent1, + Standard_Real& Percent2, + Standard_Real& Percent3) const; + //! returns the Maximum Degree used in the approximation Standard_EXPORT Standard_Integer MaxDegree() const; - + //! returns the Maximum of segment used in the approximation Standard_EXPORT Standard_Integer MaxSegment() const; - + //! returns the Continuity used in the approximation Standard_EXPORT GeomAbs_Shape Continuity() const; - + //! returns if the approximation search to minimize the //! maximum Error or not. Standard_EXPORT Standard_Boolean WithMinMax() const; - + //! returns if the approximation can insert new Knots or not. Standard_EXPORT Standard_Boolean WithCutting() const; - + //! returns the tolerance used in the approximation. Standard_EXPORT Standard_Real Tolerance() const; - + //! returns the number of iterations used in the approximation. Standard_EXPORT Standard_Integer NbIterations() const; - + //! Prints on the stream o information on the current state //! of the object. //! MaxError,MaxErrorIndex,AverageError,QuadraticError,Criterium //! Distances,Degre,Nombre de poles, parametres, noeuds - Standard_EXPORT void Dump (Standard_OStream& o) const; - + Standard_EXPORT void Dump(Standard_OStream& o) const; + //! Define the constraints to approximate //! If this value is incompatible with the others fields //! this method modify nothing and returns false - Standard_EXPORT Standard_Boolean SetConstraints (const Handle(AppParCurves_HArray1OfConstraintCouple)& aConstrainst); - + Standard_EXPORT Standard_Boolean + SetConstraints(const Handle(AppParCurves_HArray1OfConstraintCouple)& aConstrainst); + //! Defines the parameters used by the approximations. - Standard_EXPORT void SetParameters (const Handle(TColStd_HArray1OfReal)& param); - + Standard_EXPORT void SetParameters(const Handle(TColStd_HArray1OfReal)& param); + //! Defines the knots used by the approximations //! If this value is incompatible with the others fields //! this method modify nothing and returns false - Standard_EXPORT Standard_Boolean SetKnots (const Handle(TColStd_HArray1OfReal)& knots); - + Standard_EXPORT Standard_Boolean SetKnots(const Handle(TColStd_HArray1OfReal)& knots); + //! Define the Maximum Degree used in the approximation //! If this value is incompatible with the others fields //! this method modify nothing and returns false - Standard_EXPORT Standard_Boolean SetMaxDegree (const Standard_Integer Degree); - + Standard_EXPORT Standard_Boolean SetMaxDegree(const Standard_Integer Degree); + //! Define the maximum number of segments used in the approximation //! If this value is incompatible with the others fields //! this method modify nothing and returns false - Standard_EXPORT Standard_Boolean SetMaxSegment (const Standard_Integer NbSegment); - + Standard_EXPORT Standard_Boolean SetMaxSegment(const Standard_Integer NbSegment); + //! Define the Continuity used in the approximation //! If this value is incompatible with the others fields //! this method modify nothing and returns false - Standard_EXPORT Standard_Boolean SetContinuity (const GeomAbs_Shape C); - + Standard_EXPORT Standard_Boolean SetContinuity(const GeomAbs_Shape C); + //! Define if the approximation search to minimize the //! maximum Error or not. - Standard_EXPORT void SetWithMinMax (const Standard_Boolean MinMax); - + Standard_EXPORT void SetWithMinMax(const Standard_Boolean MinMax); + //! Define if the approximation can insert new Knots or not. //! If this value is incompatible with the others fields //! this method modify nothing and returns false - Standard_EXPORT Standard_Boolean SetWithCutting (const Standard_Boolean Cutting); - + Standard_EXPORT Standard_Boolean SetWithCutting(const Standard_Boolean Cutting); + //! define the Weights (as percent) associed to the criterium used in //! the optimization. //! //! if Percent <= 0 - Standard_EXPORT void SetCriteriumWeight (const Standard_Real Percent1, const Standard_Real Percent2, const Standard_Real Percent3); - + Standard_EXPORT void SetCriteriumWeight(const Standard_Real Percent1, + const Standard_Real Percent2, + const Standard_Real Percent3); + //! define the Weight (as percent) associed to the //! criterium Order used in the optimization : Others //! weights are updated. //! if Percent < 0 //! if Order < 1 or Order > 3 - Standard_EXPORT void SetCriteriumWeight (const Standard_Integer Order, const Standard_Real Percent); - + Standard_EXPORT void SetCriteriumWeight(const Standard_Integer Order, + const Standard_Real Percent); + //! define the tolerance used in the approximation. - Standard_EXPORT void SetTolerance (const Standard_Real Tol); - + Standard_EXPORT void SetTolerance(const Standard_Real Tol); + //! define the number of iterations used in the approximation. //! if Iter < 1 - Standard_EXPORT void SetNbIterations (const Standard_Integer Iter); - - - + Standard_EXPORT void SetNbIterations(const Standard_Integer Iter); protected: +private: + Standard_EXPORT void TheMotor(Handle(AppDef_SmoothCriterion)& J, + const Standard_Real WQuadratic, + const Standard_Real WQuality, + Handle(FEmTool_Curve)& TheCurve, + TColStd_Array1OfReal& Ecarts); + Standard_EXPORT void Adjusting(Handle(AppDef_SmoothCriterion)& J, + Standard_Real& WQuadratic, + Standard_Real& WQuality, + Handle(FEmTool_Curve)& TheCurve, + TColStd_Array1OfReal& Ecarts); + Standard_EXPORT void Optimization(Handle(AppDef_SmoothCriterion)& J, + FEmTool_Assembly& A, + const Standard_Boolean ToAssemble, + const Standard_Real EpsDeg, + Handle(FEmTool_Curve)& Curve, + const TColStd_Array1OfReal& Parameters) const; + Standard_EXPORT void Project(const Handle(FEmTool_Curve)& C, + const TColStd_Array1OfReal& Ti, + TColStd_Array1OfReal& ProjTi, + TColStd_Array1OfReal& Distance, + Standard_Integer& NumPoints, + Standard_Real& MaxErr, + Standard_Real& QuaErr, + Standard_Real& AveErr, + const Standard_Integer NbIterations = 2) const; + Standard_EXPORT void ACR(Handle(FEmTool_Curve)& Curve, + TColStd_Array1OfReal& Ti, + const Standard_Integer Decima) const; -private: + Standard_EXPORT void SplitCurve(const Handle(FEmTool_Curve)& InCurve, + const TColStd_Array1OfReal& Ti, + const Standard_Real CurveTol, + Handle(FEmTool_Curve)& OutCurve, + Standard_Boolean& iscut) const; - - Standard_EXPORT void TheMotor (Handle(AppDef_SmoothCriterion)& J, const Standard_Real WQuadratic, const Standard_Real WQuality, Handle(FEmTool_Curve)& TheCurve, TColStd_Array1OfReal& Ecarts); - - Standard_EXPORT void Adjusting (Handle(AppDef_SmoothCriterion)& J, Standard_Real& WQuadratic, Standard_Real& WQuality, Handle(FEmTool_Curve)& TheCurve, TColStd_Array1OfReal& Ecarts); - - Standard_EXPORT void Optimization (Handle(AppDef_SmoothCriterion)& J, FEmTool_Assembly& A, const Standard_Boolean ToAssemble, const Standard_Real EpsDeg, Handle(FEmTool_Curve)& Curve, const TColStd_Array1OfReal& Parameters) const; - - Standard_EXPORT void Project (const Handle(FEmTool_Curve)& C, const TColStd_Array1OfReal& Ti, TColStd_Array1OfReal& ProjTi, TColStd_Array1OfReal& Distance, Standard_Integer& NumPoints, Standard_Real& MaxErr, Standard_Real& QuaErr, Standard_Real& AveErr, const Standard_Integer NbIterations = 2) const; - - Standard_EXPORT void ACR (Handle(FEmTool_Curve)& Curve, TColStd_Array1OfReal& Ti, const Standard_Integer Decima) const; - - Standard_EXPORT void SplitCurve (const Handle(FEmTool_Curve)& InCurve, const TColStd_Array1OfReal& Ti, const Standard_Real CurveTol, Handle(FEmTool_Curve)& OutCurve, Standard_Boolean& iscut) const; - Standard_EXPORT void Init(); - + Standard_EXPORT void InitSmoothCriterion(); - - Standard_EXPORT void InitParameters (Standard_Real& Length); - - Standard_EXPORT void InitCriterionEstimations (const Standard_Real Length, Standard_Real& J1, Standard_Real& J2, Standard_Real& J3) const; - - Standard_EXPORT void EstTangent (const Standard_Integer ipnt, math_Vector& VTang) const; - - Standard_EXPORT void EstSecnd (const Standard_Integer ipnt, const math_Vector& VTang1, const math_Vector& VTang2, const Standard_Real Length, math_Vector& VScnd) const; - - Standard_EXPORT void InitCutting (const Handle(PLib_Base)& aBase, const Standard_Real CurvTol, Handle(FEmTool_Curve)& aCurve) const; - - Standard_EXPORT void AssemblingConstraints (const Handle(FEmTool_Curve)& Curve, const TColStd_Array1OfReal& Parameters, const Standard_Real CBLONG, FEmTool_Assembly& A) const; - - Standard_EXPORT Standard_Boolean InitTthetaF (const Standard_Integer ndimen, const AppParCurves_Constraint typcon, const Standard_Integer begin, const Standard_Integer jndex); - - - AppDef_MultiLine mySSP; - Standard_Integer myNbP3d; - Standard_Integer myNbP2d; - Standard_Integer myDimension; - Standard_Integer myFirstPoint; - Standard_Integer myLastPoint; - Standard_Integer myNbPoints; - Handle(TColStd_HArray1OfReal) myTabPoints; - Handle(AppParCurves_HArray1OfConstraintCouple) myConstraints; - Standard_Integer myNbConstraints; - Handle(TColStd_HArray1OfReal) myTabConstraints; - Standard_Integer myNbPassPoints; - Standard_Integer myNbTangPoints; - Standard_Integer myNbCurvPoints; - Handle(TColStd_HArray1OfInteger) myTypConstraints; - Handle(TColStd_HArray1OfReal) myTtheta; - Handle(TColStd_HArray1OfReal) myTfthet; - Standard_Integer myMaxDegree; - Standard_Integer myMaxSegment; - Standard_Integer myNbIterations; - Standard_Real myTolerance; - GeomAbs_Shape myContinuity; - Standard_Integer myNivCont; - Standard_Boolean myWithMinMax; - Standard_Boolean myWithCutting; - Standard_Real myPercent[3]; - Standard_Real myCriterium[4]; - Handle(AppDef_SmoothCriterion) mySmoothCriterion; - Handle(TColStd_HArray1OfReal) myParameters; - Handle(TColStd_HArray1OfReal) myKnots; - AppParCurves_MultiBSpCurve myMBSpCurve; - Standard_Real myMaxError; - Standard_Integer myMaxErrorIndex; - Standard_Real myAverageError; - Standard_Boolean myIsCreated; - Standard_Boolean myIsDone; - Standard_Boolean myIsOverConstr; + Standard_EXPORT void InitParameters(Standard_Real& Length); -}; + Standard_EXPORT void InitCriterionEstimations(const Standard_Real Length, + Standard_Real& J1, + Standard_Real& J2, + Standard_Real& J3) const; + Standard_EXPORT void EstTangent(const Standard_Integer ipnt, math_Vector& VTang) const; + Standard_EXPORT void EstSecnd(const Standard_Integer ipnt, + const math_Vector& VTang1, + const math_Vector& VTang2, + const Standard_Real Length, + math_Vector& VScnd) const; + Standard_EXPORT void InitCutting(const Handle(PLib_Base)& aBase, + const Standard_Real CurvTol, + Handle(FEmTool_Curve)& aCurve) const; + Standard_EXPORT void AssemblingConstraints(const Handle(FEmTool_Curve)& Curve, + const TColStd_Array1OfReal& Parameters, + const Standard_Real CBLONG, + FEmTool_Assembly& A) const; + Standard_EXPORT Standard_Boolean InitTthetaF(const Standard_Integer ndimen, + const AppParCurves_Constraint typcon, + const Standard_Integer begin, + const Standard_Integer jndex); + AppDef_MultiLine mySSP; + Standard_Integer myNbP3d; + Standard_Integer myNbP2d; + Standard_Integer myDimension; + Standard_Integer myFirstPoint; + Standard_Integer myLastPoint; + Standard_Integer myNbPoints; + Handle(TColStd_HArray1OfReal) myTabPoints; + Handle(AppParCurves_HArray1OfConstraintCouple) myConstraints; + Standard_Integer myNbConstraints; + Handle(TColStd_HArray1OfReal) myTabConstraints; + Standard_Integer myNbPassPoints; + Standard_Integer myNbTangPoints; + Standard_Integer myNbCurvPoints; + Handle(TColStd_HArray1OfInteger) myTypConstraints; + Handle(TColStd_HArray1OfReal) myTtheta; + Handle(TColStd_HArray1OfReal) myTfthet; + Standard_Integer myMaxDegree; + Standard_Integer myMaxSegment; + Standard_Integer myNbIterations; + Standard_Real myTolerance; + GeomAbs_Shape myContinuity; + Standard_Integer myNivCont; + Standard_Boolean myWithMinMax; + Standard_Boolean myWithCutting; + Standard_Real myPercent[3]; + Standard_Real myCriterium[4]; + Handle(AppDef_SmoothCriterion) mySmoothCriterion; + Handle(TColStd_HArray1OfReal) myParameters; + Handle(TColStd_HArray1OfReal) myKnots; + AppParCurves_MultiBSpCurve myMBSpCurve; + Standard_Real myMaxError; + Standard_Integer myMaxErrorIndex; + Standard_Real myAverageError; + Standard_Boolean myIsCreated; + Standard_Boolean myIsDone; + Standard_Boolean myIsOverConstr; +}; #endif // _AppDef_Variational_HeaderFile diff --git a/opencascade/AppParCurves.hxx b/opencascade/AppParCurves.hxx index 1453a6f58..8c6164650 100644 --- a/opencascade/AppParCurves.hxx +++ b/opencascade/AppParCurves.hxx @@ -29,21 +29,29 @@ class math_Matrix; //! This package gives all the algorithms used to approximate a MultiLine //! described by the tool MLineTool. //! The result of the approximation will be a MultiCurve. -class AppParCurves +class AppParCurves { public: - DEFINE_STANDARD_ALLOC - - Standard_EXPORT static void BernsteinMatrix (const Standard_Integer NbPoles, const math_Vector& U, math_Matrix& A); - - Standard_EXPORT static void Bernstein (const Standard_Integer NbPoles, const math_Vector& U, math_Matrix& A, math_Matrix& DA); - - Standard_EXPORT static void SecondDerivativeBernstein (const Standard_Real U, math_Vector& DDA); - - Standard_EXPORT static void SplineFunction (const Standard_Integer NbPoles, const Standard_Integer Degree, const math_Vector& Parameters, const math_Vector& FlatKnots, math_Matrix& A, math_Matrix& DA, math_IntegerVector& Index); + Standard_EXPORT static void BernsteinMatrix(const Standard_Integer NbPoles, + const math_Vector& U, + math_Matrix& A); + + Standard_EXPORT static void Bernstein(const Standard_Integer NbPoles, + const math_Vector& U, + math_Matrix& A, + math_Matrix& DA); + + Standard_EXPORT static void SecondDerivativeBernstein(const Standard_Real U, math_Vector& DDA); + Standard_EXPORT static void SplineFunction(const Standard_Integer NbPoles, + const Standard_Integer Degree, + const math_Vector& Parameters, + const math_Vector& FlatKnots, + math_Matrix& A, + math_Matrix& DA, + math_IntegerVector& Index); }; #endif // _AppParCurves_HeaderFile diff --git a/opencascade/AppParCurves_Array1OfConstraintCouple.hxx b/opencascade/AppParCurves_Array1OfConstraintCouple.hxx index c01643640..b3e8ef71a 100644 --- a/opencascade/AppParCurves_Array1OfConstraintCouple.hxx +++ b/opencascade/AppParCurves_Array1OfConstraintCouple.hxx @@ -22,5 +22,4 @@ typedef NCollection_Array1 AppParCurves_Array1OfConstraintCouple; - #endif diff --git a/opencascade/AppParCurves_Array1OfMultiBSpCurve.hxx b/opencascade/AppParCurves_Array1OfMultiBSpCurve.hxx index 0c7e6e95a..b7d81a5f9 100644 --- a/opencascade/AppParCurves_Array1OfMultiBSpCurve.hxx +++ b/opencascade/AppParCurves_Array1OfMultiBSpCurve.hxx @@ -22,5 +22,4 @@ typedef NCollection_Array1 AppParCurves_Array1OfMultiBSpCurve; - #endif diff --git a/opencascade/AppParCurves_Array1OfMultiCurve.hxx b/opencascade/AppParCurves_Array1OfMultiCurve.hxx index 920965afb..0fd326fcd 100644 --- a/opencascade/AppParCurves_Array1OfMultiCurve.hxx +++ b/opencascade/AppParCurves_Array1OfMultiCurve.hxx @@ -22,5 +22,4 @@ typedef NCollection_Array1 AppParCurves_Array1OfMultiCurve; - #endif diff --git a/opencascade/AppParCurves_Array1OfMultiPoint.hxx b/opencascade/AppParCurves_Array1OfMultiPoint.hxx index 48795545b..c3e2179cc 100644 --- a/opencascade/AppParCurves_Array1OfMultiPoint.hxx +++ b/opencascade/AppParCurves_Array1OfMultiPoint.hxx @@ -22,5 +22,4 @@ typedef NCollection_Array1 AppParCurves_Array1OfMultiPoint; - #endif diff --git a/opencascade/AppParCurves_BSpFunction.gxx b/opencascade/AppParCurves_BSpFunction.gxx deleted file mode 100644 index 2091432ff..000000000 --- a/opencascade/AppParCurves_BSpFunction.gxx +++ /dev/null @@ -1,325 +0,0 @@ -// Copyright (c) 1995-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -AppParCurves_BSpFunction:: - AppParCurves_BSpFunction(const MultiLine& SSP, - const Standard_Integer FirstPoint, - const Standard_Integer LastPoint, - const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, - const math_Vector& Parameters, - const TColStd_Array1OfReal& Knots, - const TColStd_Array1OfInteger& Mults, - const Standard_Integer NbPol) : - MyMultiLine(SSP), - MyMultiBSpCurve(NbPol), - myParameters(Parameters.Lower(), Parameters.Upper()), - ValGrad_F(FirstPoint, LastPoint), - MyF(FirstPoint, LastPoint, - 1, ToolLine::NbP3d(SSP)+ToolLine::NbP2d(SSP), 0.0), - PTLX(FirstPoint, LastPoint, - 1, ToolLine::NbP3d(SSP)+ToolLine::NbP2d(SSP), 0.0), - PTLY(FirstPoint, LastPoint, - 1, ToolLine::NbP3d(SSP)+ToolLine::NbP2d(SSP), 0.0), - PTLZ(FirstPoint, LastPoint, - 1, ToolLine::NbP3d(SSP)+ToolLine::NbP2d(SSP), 0.0), - A(FirstPoint, LastPoint, 1, NbPol), - DA(FirstPoint, LastPoint, 1, NbPol), - MyLeastSquare(SSP, Knots, Mults, FirstPoint, LastPoint, - FirstConstraint(TheConstraints, FirstPoint), - LastConstraint(TheConstraints, LastPoint), NbPol) -{ - Standard_Integer i; - for (i = Parameters.Lower(); i <= Parameters.Upper(); i++) - myParameters(i) = Parameters(i); - FirstP = FirstPoint; - LastP = LastPoint; - myConstraints = TheConstraints; - NbP = LastP-FirstP+1; - Adeb = FirstP; - Afin = LastP; - nbpoles = NbPol; - MyMultiBSpCurve.SetKnots(Knots); - MyMultiBSpCurve.SetMultiplicities(Mults); - Contraintes = Standard_False; - Standard_Integer myindex; - Standard_Integer low = TheConstraints->Lower(), upp= TheConstraints->Upper(); - AppParCurves_ConstraintCouple mycouple; - AppParCurves_Constraint Cons; - - for (i = low; i <= upp; i++) { - mycouple = TheConstraints->Value(i); - Cons = mycouple.Constraint(); - myindex = mycouple.Index(); - if (myindex == FirstP) { - if (Cons >= 1) Adeb = Adeb+1; - } - else if (myindex == LastP) { - if (Cons >= 1) Afin = Afin-1; - } - else { - if (Cons >= 1) Contraintes = Standard_True; - } - } - - Standard_Integer nb3d = ToolLine::NbP3d(SSP); - Standard_Integer nb2d = ToolLine::NbP2d(SSP); - Standard_Integer mynb3d= nb3d, mynb2d=nb2d; - if (nb3d == 0) mynb3d = 1; - if (nb2d == 0) mynb2d = 1; - - NbCu = nb3d+nb2d; - tabdim = new TColStd_HArray1OfInteger(0, NbCu-1); - - if (Contraintes) { - for (i = 1; i <= NbCu; i++) { - if (i <= nb3d) tabdim->SetValue(i-1, 3); - else tabdim->SetValue(i-1, 2); - } - - TColgp_Array1OfPnt TabP(1, mynb3d); - TColgp_Array1OfPnt2d TabP2d(1, mynb2d); - - for ( i = FirstP; i <= LastP; i++) { - if (nb3d != 0 && nb2d != 0) ToolLine::Value(SSP, i, TabP, TabP2d); - else if (nb3d != 0) ToolLine::Value(SSP, i, TabP); - else ToolLine::Value(SSP, i, TabP2d); - for (Standard_Integer j = 1; j <= NbCu; j++) { - if (tabdim->Value(j-1) == 3) { - TabP(j).Coord(PTLX(i, j), PTLY(i, j),PTLZ(i, j)); - } - else { - TabP2d(j).Coord(PTLX(i, j), PTLY(i, j)); - } - } - } - } -} - - -AppParCurves_Constraint AppParCurves_BSpFunction::FirstConstraint - (const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, - const Standard_Integer FirstPoint) const -{ - Standard_Integer i, myindex; - Standard_Integer low = TheConstraints->Lower(), upp= TheConstraints->Upper(); - AppParCurves_ConstraintCouple mycouple; - AppParCurves_Constraint Cons = AppParCurves_NoConstraint; - - for (i = low; i <= upp; i++) { - mycouple = TheConstraints->Value(i); - Cons = mycouple.Constraint(); - myindex = mycouple.Index(); - if (myindex == FirstPoint) { - break; - } - } - return Cons; -} - - -AppParCurves_Constraint AppParCurves_BSpFunction::LastConstraint - (const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, - const Standard_Integer LastPoint) const -{ - Standard_Integer i, myindex; - Standard_Integer low = TheConstraints->Lower(), upp= TheConstraints->Upper(); - AppParCurves_ConstraintCouple mycouple; - AppParCurves_Constraint Cons = AppParCurves_NoConstraint; - - for (i = low; i <= upp; i++) { - mycouple = TheConstraints->Value(i); - Cons = mycouple.Constraint(); - myindex = mycouple.Index(); - if (myindex == LastPoint) { - break; - } - } - return Cons; -} - - - - -Standard_Boolean AppParCurves_BSpFunction::Value (const math_Vector& X, - Standard_Real& F) { - - myParameters = X; - - // Resolution moindres carres: - // =========================== - MyLeastSquare.Perform(myParameters, mylambda1, mylambda2); - if (!(MyLeastSquare.IsDone())) { - Done = Standard_False; - return Standard_False; - } - if (!Contraintes) { - MyLeastSquare.Error(FVal, ERR3d, ERR2d); - F = FVal; - } - - // Resolution avec contraintes: - // ============================ - else { - } - return Standard_True; -} - - - - -void AppParCurves_BSpFunction::Perform(const math_Vector& X) { - Standard_Integer j; - - myParameters = X; - // Resolution moindres carres: - // =========================== - MyLeastSquare.Perform(myParameters, mylambda1, mylambda2); - - if (!(MyLeastSquare.IsDone())) { - Done = Standard_False; - return; - } - - for(j = myParameters.Lower(); j <= myParameters.Upper(); j++) { - ValGrad_F(j) = 0.0; - } - - if (!Contraintes) { - MyLeastSquare.ErrorGradient(ValGrad_F, FVal, ERR3d, ERR2d); - } - else { - } -} - - - -void AppParCurves_BSpFunction::SetFirstLambda(const Standard_Real l1) -{ - mylambda1 = l1; -} - -void AppParCurves_BSpFunction::SetLastLambda(const Standard_Real l2) -{ - mylambda2 = l2; -} - - - -Standard_Integer AppParCurves_BSpFunction::NbVariables() const{ - return NbP; -} - - -Standard_Boolean AppParCurves_BSpFunction::Gradient (const math_Vector& X, - math_Vector& G) { - - Perform(X); - G = ValGrad_F; - - return Standard_True; -} - - -Standard_Boolean AppParCurves_BSpFunction::Values (const math_Vector& X, - Standard_Real& F, - math_Vector& G) { - - - Perform(X); - F = FVal; - G = ValGrad_F; - -/* - math_Vector mygradient = G; - math_Vector myx = X; - Standard_Real myf = FVal; - Standard_Real F2 = FVal; - math_Vector G2 = ValGrad_F; - for (Standard_Integer i = 1; i <= X.Length(); i++) { - myx = X; - myx(i) = X(i) + 1.0e-10; - Value(myx, F2); - mygradient(i) = (F2 - myf)/(1.0e-10); - } - -cout << " Gradient calcule : " << G2 << endl; -cout << " Gradient interpole : " << mygradient << endl; -*/ - return Standard_True; -} - - -AppParCurves_MultiBSpCurve AppParCurves_BSpFunction::CurveValue() { - if (!Contraintes) MyMultiBSpCurve = MyLeastSquare.BSplineValue(); - return MyMultiBSpCurve; -} - - -Standard_Real AppParCurves_BSpFunction::Error(const Standard_Integer IPoint, - const Standard_Integer CurveIndex) { - const math_Matrix& DD = MyLeastSquare.Distance(); - Standard_Real d = DD.Value(IPoint, CurveIndex); - if (!Contraintes) return d; - else return Sqrt(MyF(IPoint, CurveIndex)); -} - -Standard_Real AppParCurves_BSpFunction::MaxError3d() const -{ - return ERR3d; -} - -Standard_Real AppParCurves_BSpFunction::MaxError2d() const -{ - return ERR2d; -} - - - -const math_Vector& AppParCurves_BSpFunction::NewParameters() const -{ - return myParameters; -} - - -const math_Matrix& AppParCurves_BSpFunction::FunctionMatrix() const -{ - return MyLeastSquare.FunctionMatrix(); -} - -const math_Matrix& AppParCurves_BSpFunction::DerivativeFunctionMatrix() const -{ - return MyLeastSquare.DerivativeFunctionMatrix(); -} - - -const math_IntegerVector& AppParCurves_BSpFunction::Index() const -{ - return MyLeastSquare.KIndex(); -} diff --git a/opencascade/AppParCurves_BSpGradient.gxx b/opencascade/AppParCurves_BSpGradient.gxx deleted file mode 100644 index 83953e2a5..000000000 --- a/opencascade/AppParCurves_BSpGradient.gxx +++ /dev/null @@ -1,383 +0,0 @@ -// Copyright (c) 1995-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -// lpa, le 11/09/91 - - -// Application de la methode du gradient corrige pour minimiser -// F = somme(||C(ui, Poles(ui)) - ptli||2. -// La methode de gradient conjugue est programmee dans la bibliotheque -// mathematique: math_BFGS. - - -#define No_Standard_RangeError -#define No_Standard_OutOfRange - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -static AppParCurves_Constraint FirstConstraint - (const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, - const Standard_Integer FirstPoint) -{ - Standard_Integer i, myindex; - Standard_Integer low = TheConstraints->Lower(), upp= TheConstraints->Upper(); - AppParCurves_ConstraintCouple mycouple; - AppParCurves_Constraint Cons = AppParCurves_NoConstraint; - - for (i = low; i <= upp; i++) { - mycouple = TheConstraints->Value(i); - Cons = mycouple.Constraint(); - myindex = mycouple.Index(); - if (myindex == FirstPoint) { - break; - } - } - return Cons; -} - - -static AppParCurves_Constraint LastConstraint - (const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, - const Standard_Integer LastPoint) -{ - Standard_Integer i, myindex; - Standard_Integer low = TheConstraints->Lower(), upp= TheConstraints->Upper(); - AppParCurves_ConstraintCouple mycouple; - AppParCurves_Constraint Cons = AppParCurves_NoConstraint; - - for (i = low; i <= upp; i++) { - mycouple = TheConstraints->Value(i); - Cons = mycouple.Constraint(); - myindex = mycouple.Index(); - if (myindex == LastPoint) { - break; - } - } - return Cons; -} - - - - - -AppParCurves_BSpGradient:: - AppParCurves_BSpGradient(const MultiLine& SSP, - const Standard_Integer FirstPoint, - const Standard_Integer LastPoint, - const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, - math_Vector& Parameters, - const TColStd_Array1OfReal& Knots, - const TColStd_Array1OfInteger& Mults, - const Standard_Integer Deg, - const Standard_Real Tol3d, - const Standard_Real Tol2d, - const Standard_Integer NbIterations): - ParError(FirstPoint, LastPoint,0.0), - mylambda1(0.0), - mylambda2(0.0), - myIsLambdaDefined(Standard_False) -{ - Perform(SSP, FirstPoint, LastPoint, TheConstraints, Parameters, - Knots, Mults, Deg, Tol3d, Tol2d, NbIterations); -} - - -AppParCurves_BSpGradient:: - AppParCurves_BSpGradient(const MultiLine& SSP, - const Standard_Integer FirstPoint, - const Standard_Integer LastPoint, - const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, - math_Vector& Parameters, - const TColStd_Array1OfReal& Knots, - const TColStd_Array1OfInteger& Mults, - const Standard_Integer Deg, - const Standard_Real Tol3d, - const Standard_Real Tol2d, - const Standard_Integer NbIterations, - const Standard_Real lambda1, - const Standard_Real lambda2): - ParError(FirstPoint, LastPoint,0.0), - mylambda1(lambda1), - mylambda2(lambda2), - myIsLambdaDefined(Standard_True) -{ - Perform(SSP, FirstPoint, LastPoint, TheConstraints, Parameters, - Knots, Mults, Deg, Tol3d, Tol2d, NbIterations); -} - - - - - - - -void AppParCurves_BSpGradient:: - Perform(const MultiLine& SSP, - const Standard_Integer FirstPoint, - const Standard_Integer LastPoint, - const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, - math_Vector& Parameters, - const TColStd_Array1OfReal& Knots, - const TColStd_Array1OfInteger& Mults, - const Standard_Integer Deg, - const Standard_Real Tol3d, - const Standard_Real Tol2d, - const Standard_Integer NbIterations) -{ - -// Standard_Boolean grad = Standard_True; - Standard_Integer i, j, k, i2, l; - Standard_Real UF, DU, Fval = 0.0, FU, DFU; - Standard_Integer nbP3d = ToolLine::NbP3d(SSP); - Standard_Integer nbP2d = ToolLine::NbP2d(SSP); - Standard_Integer mynbP3d=nbP3d, mynbP2d=nbP2d; - Standard_Integer nbP = nbP3d + nbP2d; -// gp_Pnt Pt, P1, P2; - gp_Pnt Pt; -// gp_Pnt2d Pt2d, P12d, P22d; - gp_Pnt2d Pt2d; -// gp_Vec V1, V2, MyV; - gp_Vec V1, MyV; -// gp_Vec2d V12d, V22d, MyV2d; - gp_Vec2d V12d, MyV2d; - Done = Standard_False; - - if (nbP3d == 0) mynbP3d = 1; - if (nbP2d == 0) mynbP2d = 1; - TColgp_Array1OfPnt TabP(1, mynbP3d); - TColgp_Array1OfPnt2d TabP2d(1, mynbP2d); - TColgp_Array1OfVec TabV(1, mynbP3d); - TColgp_Array1OfVec2d TabV2d(1, mynbP2d); - - // Calcul de la fonction F= somme(||C(ui)-Ptli||2): - // Appel a une fonction heritant de MultipleVarFunctionWithGradient - // pour calculer F et grad_F. - // ================================================================ - - Standard_Integer nbpoles = -Deg -1; - for (i = Mults.Lower() ;i <= Mults.Upper(); i++) { - nbpoles += Mults(i); - } - - TColgp_Array1OfPnt TabPole(1, nbpoles); - TColgp_Array1OfPnt2d TabPole2d(1, nbpoles); - TColgp_Array1OfPnt ThePoles(1, (nbpoles)*mynbP3d); - TColgp_Array1OfPnt2d ThePoles2d(1, (nbpoles)*mynbP2d); - - - AppParCurves_Constraint - FirstCons = FirstConstraint(TheConstraints, FirstPoint), - LastCons = LastConstraint(TheConstraints, LastPoint); - - - AppParCurves_BSpParFunction MyF(SSP, FirstPoint,LastPoint, TheConstraints, - Parameters, Knots, Mults, nbpoles); - - - - if (FirstCons >= AppParCurves_TangencyPoint || - LastCons >= AppParCurves_TangencyPoint) { - - if (!myIsLambdaDefined) { - AppParCurves_BSpParLeastSquare thefitt(SSP, Knots, Mults, FirstPoint, - LastPoint, FirstCons, LastCons, - Parameters, nbpoles); - if (FirstCons >= AppParCurves_TangencyPoint) { - mylambda1 = thefitt.FirstLambda(); - MyF.SetFirstLambda(mylambda1); - } - if (LastCons >= AppParCurves_TangencyPoint) { - mylambda2 = thefitt.LastLambda(); - MyF.SetLastLambda(mylambda2); - } - } - else { - MyF.SetFirstLambda(mylambda1); - MyF.SetLastLambda(mylambda2); - } - } - - - MyF.Value(Parameters, Fval); - MError3d = MyF.MaxError3d(); - MError2d = MyF.MaxError2d(); - SCU = MyF.CurveValue(); - - if (MError3d > Tol3d || MError2d > Tol2d) { - - // Stockage des Poles des courbes pour projeter: - // ============================================ - i2 = 0; - for (k = 1; k <= nbP3d; k++) { - SCU.Curve(k, TabPole); - for (j=1; j<=nbpoles; j++) ThePoles(j+i2) = TabPole(j); - i2 += nbpoles; - } - i2 = 0; - for (k = 1; k <= nbP2d; k++) { - SCU.Curve(nbP3d+k, TabPole2d); - for (j=1; j<=nbpoles; j++) ThePoles2d(j+i2) = TabPole2d(j); - i2 += nbpoles; - } - - // Une iteration rapide de projection est faite par la methode de - // Rogers & Fog 89, methode equivalente a Hoschek 88 qui ne necessite pas - // le calcul de D2. - - const math_Matrix& A = MyF.FunctionMatrix(); - const math_Matrix& DA = MyF.DerivativeFunctionMatrix(); - const math_IntegerVector& Index = MyF.Index(); - Standard_Real aa, da, a, b, c, d , e , f, px, py, pz; - Standard_Integer indexdeb, indexfin; - - for (j = FirstPoint+1; j <= LastPoint-1; j++) { - - UF = Parameters(j); - if (nbP3d != 0 && nbP2d != 0) ToolLine::Value(SSP, j, TabP, TabP2d); - else if (nbP2d != 0) ToolLine::Value(SSP, j, TabP2d); - else ToolLine::Value(SSP, j, TabP); - - FU = 0.0; - DFU = 0.0; - i2 = 0; - - indexdeb = Index(j) + 1; - indexfin = indexdeb + Deg; - - for (k = 1; k <= nbP3d; k++) { - a = b = c = d = e = f = 0.0; - for (l = indexdeb; l <= indexfin; l++) { - Pt = ThePoles(l+i2); - px = Pt.X(); py = Pt.Y(); pz = Pt.Z(); - aa = A(j, l); da = DA(j, l); - a += aa* px; d += da* px; - b += aa* py; e += da* py; - c += aa* pz; f += da* pz; - } - Pt.SetCoord(a, b, c); - V1.SetCoord(d, e, f); - i2 += nbpoles; - - MyV = gp_Vec(Pt, TabP(k)); - FU += MyV*V1; - DFU += V1.SquareMagnitude(); - } - i2 = 0; - for (k = 1; k <= nbP2d; k++) { - a = b = d = e = 0.0; - for (l = indexdeb; l <= indexfin; l++) { - Pt2d = ThePoles2d(l+i2); - px = Pt2d.X(); py = Pt2d.Y(); - aa = A(j, l); da = DA(j, l); - a += aa* px; d += da* px; - b += aa* py; e += da* py; - } - Pt2d.SetCoord(a, b); - V12d.SetCoord(d, e); - i2 += nbpoles; - - MyV2d = gp_Vec2d(Pt2d, TabP2d(k)); - FU += MyV2d*V12d; - DFU += V12d.SquareMagnitude(); - } - - if (DFU >= RealEpsilon()) { - DU = FU/DFU; - DU = Sign(Min(5.e-02, Abs(DU)), DU); - UF += DU; - Parameters(j) = UF; - } - } - - MyF.Value(Parameters, Fval); - MError3d = MyF.MaxError3d(); - MError2d = MyF.MaxError2d(); - } - - - if (MError3d<= Tol3d && MError2d <= Tol2d) { - Done = Standard_True; - } - else if (NbIterations != 0) { - // NbIterations de gradient conjugue: - // ================================= - Standard_Real Eps = 1.e-07; - AppParCurves_BSpGradient_BFGS FResol(MyF, Parameters, Tol3d, - Tol2d, Eps, NbIterations); - } - - SCU = MyF.CurveValue(); - - - AvError = 0.; - for (j = FirstPoint; j <= LastPoint; j++) { - Parameters(j) = MyF.NewParameters()(j); - // Recherche des erreurs maxi et moyenne a un index donne: - for (k = 1; k <= nbP; k++) { - ParError(j) = Max(ParError(j), MyF.Error(j, k)); - } - AvError += ParError(j); - } - AvError = AvError/(LastPoint-FirstPoint+1); - - - MError3d = MyF.MaxError3d(); - MError2d = MyF.MaxError2d(); - if (MError3d <= Tol3d && MError2d <= Tol2d) { - Done = Standard_True; - } - -} - - - -AppParCurves_MultiBSpCurve AppParCurves_BSpGradient::Value() const { - return SCU; -} - - -Standard_Boolean AppParCurves_BSpGradient::IsDone() const { - return Done; -} - - -Standard_Real AppParCurves_BSpGradient::Error(const Standard_Integer Index) const { - return ParError(Index); -} - -Standard_Real AppParCurves_BSpGradient::AverageError() const { - return AvError; -} - -Standard_Real AppParCurves_BSpGradient::MaxError3d() const { - return MError3d; -} - -Standard_Real AppParCurves_BSpGradient::MaxError2d() const { - return MError2d; -} - - diff --git a/opencascade/AppParCurves_BSpGradient_BFGS.gxx b/opencascade/AppParCurves_BSpGradient_BFGS.gxx deleted file mode 100644 index 05bb3f24a..000000000 --- a/opencascade/AppParCurves_BSpGradient_BFGS.gxx +++ /dev/null @@ -1,48 +0,0 @@ -// Created on: 1999-12-16 -// Created by: Atelier CAS2000 -// Copyright (c) 1999-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -// Redefinition de math_BFGS: -// ========================== - -AppParCurves_BSpGradient_BFGS::AppParCurves_BSpGradient_BFGS(math_MultipleVarFunctionWithGradient& F, - const math_Vector& StartingPoint, - const Standard_Real Tolerance3d, - const Standard_Real Tolerance2d, - const Standard_Real Eps, - const Standard_Integer NbIterations): - math_BFGS(F.NbVariables(), Eps, NbIterations, Eps), - myTol3d(Tolerance3d), - myTol2d(Tolerance2d) -{ - - Perform(F, StartingPoint); -} - -Standard_Boolean AppParCurves_BSpGradient_BFGS::IsSolutionReached(math_MultipleVarFunctionWithGradient& F) const { - Standard_Boolean Result, Result2; - AppParCurves_BSpParFunction *F1 = (AppParCurves_BSpParFunction*) &F; - - Result = (2.0 * fabs(TheMinimum - PreviousMinimum) <= - 1.e-10 * (fabs(TheMinimum) + fabs(PreviousMinimum))+1.e-12) ; - Standard_Real MErr3d = F1->MaxError3d(); - Standard_Real MErr2d = F1->MaxError2d(); - Result2 = ((MErr3d <= myTol3d) && (MErr2d <= myTol2d)); - - return (Result || Result2); -} - - - diff --git a/opencascade/AppParCurves_Constraint.hxx b/opencascade/AppParCurves_Constraint.hxx index 67f159d24..f77c092c8 100644 --- a/opencascade/AppParCurves_Constraint.hxx +++ b/opencascade/AppParCurves_Constraint.hxx @@ -17,17 +17,16 @@ #ifndef _AppParCurves_Constraint_HeaderFile #define _AppParCurves_Constraint_HeaderFile - //! - NoConstraint: this point has no constraints. //! - PassPoint: the approximation curve passes through this point. //! - TangencyPoint: this point has a tangency constraint. //! - CurvaturePoint: this point has a curvature constraint. enum AppParCurves_Constraint { -AppParCurves_NoConstraint, -AppParCurves_PassPoint, -AppParCurves_TangencyPoint, -AppParCurves_CurvaturePoint + AppParCurves_NoConstraint, + AppParCurves_PassPoint, + AppParCurves_TangencyPoint, + AppParCurves_CurvaturePoint }; #endif // _AppParCurves_Constraint_HeaderFile diff --git a/opencascade/AppParCurves_ConstraintCouple.hxx b/opencascade/AppParCurves_ConstraintCouple.hxx index 911911ee7..a77fa41d4 100644 --- a/opencascade/AppParCurves_ConstraintCouple.hxx +++ b/opencascade/AppParCurves_ConstraintCouple.hxx @@ -23,58 +23,37 @@ #include - //! associates an index and a constraint for an object. //! This couple is used by AppDef_TheVariational when performing approximations. -class AppParCurves_ConstraintCouple +class AppParCurves_ConstraintCouple { public: - DEFINE_STANDARD_ALLOC - //! returns an indefinite ConstraintCouple. Standard_EXPORT AppParCurves_ConstraintCouple(); - + //! Create a couple the object will have the //! constraint . - Standard_EXPORT AppParCurves_ConstraintCouple(const Standard_Integer TheIndex, const AppParCurves_Constraint Cons); - + Standard_EXPORT AppParCurves_ConstraintCouple(const Standard_Integer TheIndex, + const AppParCurves_Constraint Cons); + //! returns the index of the constraint object. Standard_EXPORT Standard_Integer Index() const; - + //! returns the constraint of the object. Standard_EXPORT AppParCurves_Constraint Constraint() const; - - //! Changes the index of the constraint object. - Standard_EXPORT void SetIndex (const Standard_Integer TheIndex); - - //! Changes the constraint of the object. - Standard_EXPORT void SetConstraint (const AppParCurves_Constraint Cons); - + //! Changes the index of the constraint object. + Standard_EXPORT void SetIndex(const Standard_Integer TheIndex); + //! Changes the constraint of the object. + Standard_EXPORT void SetConstraint(const AppParCurves_Constraint Cons); protected: - - - - - private: - - - - Standard_Integer myIndex; + Standard_Integer myIndex; AppParCurves_Constraint myConstraint; - - }; - - - - - - #endif // _AppParCurves_ConstraintCouple_HeaderFile diff --git a/opencascade/AppParCurves_Function.gxx b/opencascade/AppParCurves_Function.gxx deleted file mode 100644 index 92bad3f47..000000000 --- a/opencascade/AppParCurves_Function.gxx +++ /dev/null @@ -1,622 +0,0 @@ -// Copyright (c) 1995-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -// Lpa, le 20/09/91 - - -// Calcul de la valeur de F et grad_F, connaissant le parametrage. -// Cette fonction, appelee par le gradient conjugue, calcul F et -// DF(ui, Poles(ui)) ce qui implique un calcul des nouveaux poles -// a chaque appel. - -#define No_Standard_RangeError -#define No_Standard_OutOfRange - - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -AppParCurves_Function:: - AppParCurves_Function(const MultiLine& SSP, - const Standard_Integer FirstPoint, - const Standard_Integer LastPoint, - const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, - const math_Vector& Parameters, - const Standard_Integer Deg) : - MyMultiLine(SSP), - MyMultiCurve(Deg+1), - myParameters(Parameters.Lower(), Parameters.Upper()), - ValGrad_F(FirstPoint, LastPoint), - MyF(FirstPoint, LastPoint, - 1, ToolLine::NbP3d(SSP)+ToolLine::NbP2d(SSP), 0.0), - PTLX(FirstPoint, LastPoint, - 1, ToolLine::NbP3d(SSP)+ToolLine::NbP2d(SSP), 0.0), - PTLY(FirstPoint, LastPoint, - 1, ToolLine::NbP3d(SSP)+ToolLine::NbP2d(SSP), 0.0), - PTLZ(FirstPoint, LastPoint, - 1, ToolLine::NbP3d(SSP)+ToolLine::NbP2d(SSP), 0.0), - A(FirstPoint, LastPoint, 1, Deg+1), - DA(FirstPoint, LastPoint, 1, Deg+1), - MyLeastSquare(SSP, FirstPoint, LastPoint, - FirstConstraint(TheConstraints, FirstPoint), - LastConstraint(TheConstraints, LastPoint), Deg+1) -{ - Standard_Integer i; - for (i=Parameters.Lower(); i<=Parameters.Upper();i++) - myParameters(i)=Parameters(i); - FirstP = FirstPoint; - LastP = LastPoint; - myConstraints = TheConstraints; - NbP = LastP-FirstP+1; - Adeb = FirstP; - Afin = LastP; - Degre = Deg; - Contraintes = Standard_False; - Standard_Integer myindex; - Standard_Integer low = TheConstraints->Lower(), upp= TheConstraints->Upper(); - AppParCurves_ConstraintCouple mycouple; - AppParCurves_Constraint Cons; - - for (i = low; i <= upp; i++) { - mycouple = TheConstraints->Value(i); - Cons = mycouple.Constraint(); - myindex = mycouple.Index(); - if (myindex == FirstP) { - if (Cons >= 1) Adeb = Adeb+1; - } - else if (myindex == LastP) { - if (Cons >= 1) Afin = Afin-1; - } - else { - if (Cons >= 1) Contraintes = Standard_True; - } - } - - Standard_Integer nb3d = ToolLine::NbP3d(SSP); - Standard_Integer nb2d = ToolLine::NbP2d(SSP); - Standard_Integer mynb3d= nb3d, mynb2d=nb2d; - if (nb3d == 0) mynb3d = 1; - if (nb2d == 0) mynb2d = 1; - - NbCu = nb3d+nb2d; - tabdim = new TColStd_HArray1OfInteger(0, NbCu-1); - - if (Contraintes) { - for (i = 1; i <= NbCu; i++) { - if (i <= nb3d) tabdim->SetValue(i-1, 3); - else tabdim->SetValue(i-1, 2); - } - - TColgp_Array1OfPnt TabP(1, mynb3d); - TColgp_Array1OfPnt2d TabP2d(1, mynb2d); - - for ( i = FirstP; i <= LastP; i++) { - if (nb3d != 0 && nb2d != 0) ToolLine::Value(SSP, i, TabP, TabP2d); - else if (nb3d != 0) ToolLine::Value(SSP, i, TabP); - else ToolLine::Value(SSP, i, TabP2d); - for (Standard_Integer j = 1; j <= NbCu; j++) { - if (tabdim->Value(j-1) == 3) { - TabP(j).Coord(PTLX(i, j), PTLY(i, j),PTLZ(i, j)); - } - else { - TabP2d(j).Coord(PTLX(i, j), PTLY(i, j)); - } - } - } - } -} - - -AppParCurves_Constraint AppParCurves_Function::FirstConstraint - (const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, - const Standard_Integer FirstPoint) const -{ - Standard_Integer i, myindex; - Standard_Integer low = TheConstraints->Lower(), upp= TheConstraints->Upper(); - AppParCurves_ConstraintCouple mycouple; - AppParCurves_Constraint Cons = AppParCurves_NoConstraint; - - for (i = low; i <= upp; i++) { - mycouple = TheConstraints->Value(i); - Cons = mycouple.Constraint(); - myindex = mycouple.Index(); - if (myindex == FirstPoint) { - break; - } - } - return Cons; -} - - -AppParCurves_Constraint AppParCurves_Function::LastConstraint - (const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, - const Standard_Integer LastPoint) const -{ - Standard_Integer i, myindex; - Standard_Integer low = TheConstraints->Lower(), upp= TheConstraints->Upper(); - AppParCurves_ConstraintCouple mycouple; - AppParCurves_Constraint Cons = AppParCurves_NoConstraint; - - for (i = low; i <= upp; i++) { - mycouple = TheConstraints->Value(i); - Cons = mycouple.Constraint(); - myindex = mycouple.Index(); - if (myindex == LastPoint) { - break; - } - } - return Cons; -} - - - - -Standard_Boolean AppParCurves_Function::Value (const math_Vector& X, - Standard_Real& F) { - - myParameters = X; - - // Resolution moindres carres: - // =========================== - MyLeastSquare.Perform(myParameters); - if (!(MyLeastSquare.IsDone())) { - Done = Standard_False; - return Standard_False; - } - if (!Contraintes) { - MyLeastSquare.Error(FVal, ERR3d, ERR2d); - F = FVal; - } - - // Resolution avec contraintes: - // ============================ - else { - Standard_Integer Npol = Degre+1; -// Standard_Boolean Ext = Standard_True; - Standard_Integer Ci, i, j, dimen; - Standard_Real AA, BB, CC, AIJ, FX, FY, FZ, Fi; - math_Vector PTCXCI(1, Npol), PTCYCI(1, Npol), PTCZCI(1, Npol); - ERR3d = ERR2d = 0.0; - - MyMultiCurve = MyLeastSquare.BezierValue(); - - A = MyLeastSquare.FunctionMatrix(); - ResolCons Resol(MyMultiLine, MyMultiCurve, FirstP, LastP, myConstraints, - A, MyLeastSquare.DerivativeFunctionMatrix()); - if (!Resol.IsDone()) { - Done = Standard_False; - return Standard_False; - } - - // Calcul de F = Sum||C(ui)-Ptli||2 sur toutes les courbes : - // ======================================================================== - FVal = 0.0; - - for (Ci = 1; Ci <= NbCu; Ci++) { - dimen = tabdim->Value(Ci-1); - for (j = 1; j <= Npol; j++) { - if (dimen == 3){ - MyMultiCurve.Value(j).Point(Ci).Coord(PTCXCI(j),PTCYCI(j),PTCZCI(j)); - } - else{ - MyMultiCurve.Value(j).Point2d(Ci).Coord(PTCXCI(j), PTCYCI(j)); - } - } - - // Calcul de F: - // ============ - for (i = Adeb; i <= Afin; i++) { - AA = 0.0; BB = 0.0; CC = 0.0; - for (j = 1; j <= Npol; j++) { - AIJ = A(i, j); - AA += AIJ*PTCXCI(j); - BB += AIJ*PTCYCI(j); - if (dimen == 3) { - CC += AIJ*PTCZCI(j); - } - } - FX = AA-PTLX(i, Ci); - FY = BB-PTLY(i, Ci); - MyF(i,Ci) = FX*FX + FY*FY; - if (dimen == 3) { - FZ = CC-PTLZ(i,Ci); - MyF(i, Ci) += FZ*FZ; - Fi = MyF(i, Ci); - if (Sqrt(Fi) > ERR3d) ERR3d = Sqrt(Fi); - } - else { - Fi = MyF(i, Ci); - if (Sqrt(Fi) > ERR2d) ERR2d = Sqrt(Fi); - } - FVal += Fi; - } - } - F = FVal; - } - return Standard_True; -} - - - - -void AppParCurves_Function::Perform(const math_Vector& X) { - Standard_Integer j; - - myParameters = X; - // Resolution moindres carres: - // =========================== - MyLeastSquare.Perform(myParameters); - - if (!(MyLeastSquare.IsDone())) { - Done = Standard_False; - return; - } - - for(j = myParameters.Lower(); j <= myParameters.Upper(); j++) { - ValGrad_F(j) = 0.0; - } - - if (!Contraintes) { - MyLeastSquare.ErrorGradient(ValGrad_F, FVal, ERR3d, ERR2d); - } - else { - Standard_Integer Pi, Ci, i, k, dimen; - Standard_Integer Npol = Degre+1; - Standard_Real Scal, AA, BB, CC, DAA, DBB, DCC; - Standard_Real FX, FY, FZ, AIJ, DAIJ, px, py, pz, Fi; - AppParCurves_Constraint Cons=AppParCurves_NoConstraint; - math_Matrix Grad_F(FirstP, LastP, 1, NbCu, 0.0); - math_Vector PTCXCI(1, Npol), PTCYCI(1, Npol), PTCZCI(1, Npol); - math_Vector PTCOXCI(1, Npol), PTCOYCI(1, Npol), PTCOZCI(1, Npol); -// Standard_Boolean Ext = Standard_True; - ERR3d = ERR2d = 0.0; - - math_Matrix PTCOX(1, Npol, 1, NbCu), PTCOY(1, Npol, 1, NbCu), - PTCOZ(1, Npol,1, NbCu); - math_Matrix PTCX(1, Npol, 1, NbCu), PTCY(1, Npol, 1, NbCu), - PTCZ(1, Npol,1, NbCu); - Standard_Integer Inc; - - MyMultiCurve = MyLeastSquare.BezierValue(); - - for (Ci =1; Ci <= NbCu; Ci++) { - dimen = tabdim->Value(Ci-1); - for (j = 1; j <= Npol; j++) { - if (dimen == 3){ - MyMultiCurve.Value(j).Point(Ci).Coord(PTCOX(j, Ci), - PTCOY(j, Ci), - PTCOZ(j, Ci)); - } - else{ - MyMultiCurve.Value(j).Point2d(Ci).Coord(PTCOX(j, Ci), PTCOY(j, Ci)); - PTCOZ(j, Ci) = 0.0; - } - } - } - - A = MyLeastSquare.FunctionMatrix(); - DA = MyLeastSquare.DerivativeFunctionMatrix(); - - // Resolution avec contraintes: - // ============================ - - ResolCons Resol(MyMultiLine, MyMultiCurve, FirstP, LastP, - myConstraints, A, DA); - if (!Resol.IsDone()) { - Done = Standard_False; - return; - } - - - // Calcul de F = Sum||C(ui)-Ptli||2 et du gradient non contraint de F pour - // chaque point PointIndex. - // ======================================================================== - FVal = 0.0; - for(j = FirstP; j <= LastP; j++) { - ValGrad_F(j) = 0.0; - } - - math_Matrix TrA(A.LowerCol(), A.UpperCol(), A.LowerRow(), A.UpperRow()); - math_Matrix TrDA(DA.LowerCol(), DA.UpperCol(), DA.LowerRow(), DA.UpperRow()); - math_Matrix RESTM(A.LowerCol(), A.UpperCol(), A.LowerCol(), A.UpperCol()); - - const math_Matrix& K = Resol.ConstraintMatrix(); - const math_Matrix& DK = Resol.ConstraintDerivative(MyMultiLine, X, Degre, DA); - math_Matrix TK(K.LowerCol(), K.UpperCol(), K.LowerRow(), K.UpperRow()); - TK = K.Transposed(); - const math_Vector& Vardua = Resol.Duale(); - math_Matrix KK(K.LowerCol(), K.UpperCol(), Vardua.Lower(), Vardua.Upper()); - KK = (K.Transposed())*(Resol.InverseMatrix()); - math_Matrix DTK(DK.LowerCol(), DK.UpperCol(), DK.LowerRow(), DK.UpperRow()); - DTK = DK.Transposed(); - TrA = A.Transposed(); - TrDA = DA.Transposed(); - RESTM = ((A.Transposed()*A).Inverse()); - - math_Vector DPTCO(1, K.ColNumber()); - math_Matrix DPTCO1(FirstP, LastP, 1, K.ColNumber()); - math_Vector DKPTC(1, K.RowNumber()); - - - - - FVal = 0.0; - for (Ci = 1; Ci <= NbCu; Ci++) { - dimen = tabdim->Value(Ci-1); - for (j = 1; j <= Npol; j++) { - if (dimen == 3){ - MyMultiCurve.Value(j).Point(Ci).Coord(PTCX(j, Ci), - PTCY(j, Ci), - PTCZ(j, Ci)); - } - else{ - MyMultiCurve.Value(j).Point2d(Ci).Coord(PTCX(j, Ci), PTCY(j,Ci)); - PTCZ(j, Ci) = 0.0; - } - } - } - - - // Calcul du gradient sans contraintes: - // ==================================== - - for (Ci = 1; Ci <= NbCu; Ci++) { - dimen = tabdim->Value(Ci-1); - for (i = Adeb; i <= Afin; i++) { - AA = 0.0; BB = 0.0; CC = 0.0; DAA = 0.0; DBB = 0.0; DCC = 0.0; - for (j = 1; j <= Npol; j++) { - AIJ = A(i, j); DAIJ = DA(i, j); - px = PTCX(j, Ci); py = PTCY(j, Ci); - AA += AIJ*px; BB += AIJ*py; - DAA += DAIJ*px; DBB += DAIJ*py; - if (dimen == 3) { - pz = PTCZ(j, Ci); - CC += AIJ*pz; DCC += DAIJ*pz; - } - } - FX = AA-PTLX(i, Ci); - FY = BB-PTLY(i, Ci); - MyF(i,Ci) = FX*FX + FY*FY; - Grad_F(i, Ci) = 2.0*(DAA*FX + DBB*FY); - if (dimen == 3) { - FZ = CC-PTLZ(i,Ci); - MyF(i, Ci) += FZ*FZ; - Grad_F(i, Ci) += 2.0*DCC*FZ; - Fi = MyF(i, Ci); - if (Sqrt(Fi) > ERR3d) ERR3d = Sqrt(Fi); - } - else { - Fi = MyF(i, Ci); - if (Sqrt(Fi) > ERR2d) ERR2d = Sqrt(Fi); - } - FVal += Fi; - ValGrad_F(i) += Grad_F(i, Ci); - } - } - - - // Calcul de DK*PTC: - // ================= - for (i = 1; i <= K.RowNumber(); i++) { - Inc = 0; - for (Ci = 1; Ci <= NbCu; Ci++) { - dimen = tabdim->Value(Ci-1); - DKPTC(i) = 0.0; - for (j = 1; j <= Npol; j++) { - DKPTC(i) += DK(i, j+Inc)*PTCX(j, Ci)+ DK(i, j+Inc+Npol)*PTCY(j, Ci); - if (dimen == 3) { - DKPTC(i) += DK(i, j+Inc+2*Npol)*PTCZ(j, Ci); - } - } - if (dimen == 3) Inc = Inc +3*Npol; - else Inc = Inc +2*Npol; - } - } - - math_Vector DERR(DTK.LowerRow(), DTK.UpperRow()); - DERR = (DTK)*Vardua-KK* ((DKPTC) + K*(DTK)*Vardua); - - // rajout du gradient avec contraintes: - // ==================================== - // dPTCO1/duk = [d(TA)/duk*[A*PTCO-PTL] + TA*dA/duk*PTCO] - - - Inc = 0; - - math_Vector Errx(A.LowerRow(), A.UpperRow()); - math_Vector Erry(A.LowerRow(), A.UpperRow()); - math_Vector Errz(A.LowerRow(), A.UpperRow()); - math_Vector Scalx(DA.LowerRow(), DA.UpperRow()); - math_Vector Scaly(DA.LowerRow(), DA.UpperRow()); - math_Vector Scalz(DA.LowerRow(), DA.UpperRow()); - math_Vector Erruzax(PTCXCI.Lower(), PTCXCI.Upper()); - math_Vector Erruzay(PTCYCI.Lower(), PTCYCI.Upper()); - math_Vector Erruzaz(PTCZCI.Lower(), PTCZCI.Upper()); - math_Vector TrDAPI(TrDA.LowerRow(), TrDA.UpperRow()); - math_Vector TrAPI(TrA.LowerRow(), TrA.UpperRow()); - - for (Ci = 1; Ci <= NbCu; Ci++) { - dimen = tabdim->Value(Ci-1); - PTCOXCI = PTCOX.Col(Ci); - PTCOYCI = PTCOY.Col(Ci); - PTCOZCI = PTCOZ.Col(Ci); - PTCXCI = PTCX.Col(Ci); - PTCYCI = PTCY.Col(Ci); - PTCZCI = PTCZ.Col(Ci); - - - Errx = (A*PTCOXCI - PTLX.Col(Ci)); - Erry = (A*PTCOYCI - PTLY.Col(Ci)); - Errz = (A*PTCOZCI - PTLZ.Col(Ci)); - Scalx = (DA*PTCOXCI); // Scal = DA * PTCO - Scaly = (DA*PTCOYCI); - Scalz = (DA*PTCOZCI); - Erruzax = (PTCXCI - PTCOXCI); - Erruzay = (PTCYCI - PTCOYCI); - Erruzaz = (PTCZCI - PTCOZCI); - - for (Pi = FirstP; Pi <= LastP; Pi++) { - TrDAPI = (TrDA.Col(Pi)); - TrAPI = (TrA.Col(Pi)); - Standard_Real Taa = TrAPI*A.Row(Pi); - Scal = 0.0; - for (j = 1; j <= Npol; j++) { - DPTCO1(Pi, j + Inc) = (TrDAPI*Errx(Pi)+TrAPI*Scalx(Pi))(j); - DPTCO1(Pi, j + Inc+ Npol) = (TrDAPI*Erry(Pi)+TrAPI*Scaly(Pi))(j); - Scal += DPTCO1(Pi, j+Inc)* Taa*Erruzax(j) + DPTCO1(Pi, j+Inc+Npol)*Taa*Erruzay(j); - if (dimen == 3) { - DPTCO1(Pi, j + Inc+ 2*Npol) = (TrDAPI*Errz(Pi)+TrAPI*Scalz(Pi))(j); - Scal += DPTCO1(Pi, j+Inc+2*Npol)*Taa*Erruzaz(j); - } - } - ValGrad_F(Pi) = ValGrad_F(Pi) - 2*Scal; - } - if (dimen == 3) Inc = Inc + 3*Npol; - else Inc = Inc +2*Npol; - } - - - // on calcule DPTCO = - RESTM * DPTCO1: - - // Calcul de DPTCO/duk: - // dPTCO/duk = -Inv(T(A)*A)*[d(TA)/duk*[A*PTCO-PTL] + TA*dA/duk*PTCO] - - Standard_Integer low=myConstraints->Lower(), upp=myConstraints->Upper(); - Inc = 0; - for (Pi = FirstP; Pi <= LastP; Pi++) { - for (i = low; i <= upp; i++) { - if (myConstraints->Value(i).Index() == Pi) { - Cons = myConstraints->Value(i).Constraint(); - break; - } - } - if (Cons >= 1) { - Inc = 0; - for (Ci = 1; Ci <= NbCu; Ci++) { - dimen = tabdim->Value(Ci-1); - for (j = 1; j <= Npol; j++) { - DPTCO(j+Inc) = 0.0; - DPTCO(j+Inc+Npol) = 0.0; - if (dimen == 3) DPTCO(j+Inc+2*Npol) = 0.0; - for (k = 1; k <= Npol; k++) { - DPTCO(j+Inc) = DPTCO(j+Inc) -RESTM(j, k) * DPTCO1(Pi, j+Inc); - DPTCO(j+Inc+Npol)=DPTCO(j+Inc+Npol)-RESTM(j, k)*DPTCO1(Pi,j+Inc+Npol); - if (dimen == 3) { - DPTCO(j+Inc+2*Npol) = DPTCO(j+Inc+2*Npol) - -RESTM(j, k) * DPTCO1(Pi, j+Inc+2*Npol); - } - } - } - if (dimen == 3) Inc += 3*Npol; - else Inc += 2*Npol; - } - - DERR = DERR-KK*K*DPTCO; - - Inc = 0; - for (Ci = 1; Ci <= NbCu; Ci++) { - dimen = tabdim->Value(Ci-1); - PTCOXCI = PTCOX.Col(Ci); - PTCOYCI = PTCOY.Col(Ci); - PTCOZCI = PTCOZ.Col(Ci); - PTCXCI = PTCX.Col(Ci); - PTCYCI = PTCY.Col(Ci); - PTCZCI = PTCZ.Col(Ci); - Erruzax = (PTCXCI - PTCOXCI); - Erruzay = (PTCYCI - PTCOYCI); - Erruzaz = (PTCZCI - PTCOZCI); - Scal = 0.0; - - for (j = 1; j <= Npol ; j++) { - Scal = (A(Pi, j)*Erruzax(j)) * (A(Pi, j)*DERR(j+Inc)) + - (A(Pi, j)*Erruzay(j)) * (A(Pi, j)*DERR(j+Inc+Npol)); - if (dimen == 3) { - Scal += (A(Pi, j)*Erruzax(j)) * (A(Pi, j)*DERR(j+Inc+2*Npol)); - } - } - - ValGrad_F(Pi) = ValGrad_F(Pi) + 2*Scal; - if (dimen == 3) Inc = Inc +3*Npol; - else Inc = Inc + 2*Npol; - } - } - } - - } -} - - -Standard_Integer AppParCurves_Function::NbVariables() const{ - return NbP; -} - - -Standard_Boolean AppParCurves_Function::Gradient (const math_Vector& X, - math_Vector& G) { - - Perform(X); - G = ValGrad_F; - - return Standard_True; -} - - -Standard_Boolean AppParCurves_Function::Values (const math_Vector& X, - Standard_Real& F, - math_Vector& G) { - - - Perform(X); - F = FVal; - G = ValGrad_F; - return Standard_True; -} - - -const AppParCurves_MultiCurve& AppParCurves_Function::CurveValue() { - if (!Contraintes) MyMultiCurve = MyLeastSquare.BezierValue(); - return MyMultiCurve; -} - - -Standard_Real AppParCurves_Function::Error(const Standard_Integer IPoint, - const Standard_Integer CurveIndex) const { - return Sqrt(MyF(IPoint, CurveIndex)); -} - -Standard_Real AppParCurves_Function::MaxError3d() const -{ - return ERR3d; -} - -Standard_Real AppParCurves_Function::MaxError2d() const -{ - return ERR2d; -} - - - -const math_Vector& AppParCurves_Function::NewParameters() const -{ - return myParameters; -} diff --git a/opencascade/AppParCurves_Gradient.gxx b/opencascade/AppParCurves_Gradient.gxx deleted file mode 100644 index 01e3a4667..000000000 --- a/opencascade/AppParCurves_Gradient.gxx +++ /dev/null @@ -1,243 +0,0 @@ -// Copyright (c) 1995-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -// lpa, le 11/09/91 - - -// Application de la methode du gradient corrige pour minimiser -// F = somme(||C(ui, Poles(ui)) - ptli||2. -// La methode de gradient conjugue est programmee dans la bibliotheque -// mathematique: math_BFGS. -// cet algorithme doit etre appele uniquement lorsque on a affaire a un set -// de points contraints (ailleurs qu aux extremites). En effet, l appel de la -// fonction F a minimiser implique un appel a ParLeastSquare et ResConstraint. -// Si ce n est pas le cas, l appel a ResConstraint est equivalent a une -// seconde resolution par les moindres carres donc beaucoup de temps perdu. - - -#define No_Standard_RangeError -#define No_Standard_OutOfRange - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// #define AppParCurves_Gradient_BFGS BFGS_/**/AppParCurves_Gradient - - - -AppParCurves_Gradient:: - AppParCurves_Gradient(const MultiLine& SSP, - const Standard_Integer FirstPoint, - const Standard_Integer LastPoint, - const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, - math_Vector& Parameters, - const Standard_Integer Deg, - const Standard_Real Tol3d, - const Standard_Real Tol2d, - const Standard_Integer NbIterations): - ParError(FirstPoint, LastPoint,0.0), - AvError(0.0), - MError3d(0.0), - MError2d(0.0) -{ - -// Standard_Boolean grad = Standard_True; - Standard_Integer j, k, i2, l; - Standard_Real UF, DU, Fval = 0.0, FU, DFU; - Standard_Integer nbP3d = ToolLine::NbP3d(SSP); - Standard_Integer nbP2d = ToolLine::NbP2d(SSP); - Standard_Integer mynbP3d=nbP3d, mynbP2d=nbP2d; - Standard_Integer nbP = nbP3d + nbP2d; -// gp_Pnt Pt, P1, P2; - gp_Pnt Pt; -// gp_Pnt2d Pt2d, P12d, P22d; - gp_Pnt2d Pt2d; -// gp_Vec V1, V2, MyV; - gp_Vec V1, MyV; -// gp_Vec2d V12d, V22d, MyV2d; - gp_Vec2d V12d, MyV2d; - Done = Standard_False; - - if (nbP3d == 0) mynbP3d = 1; - if (nbP2d == 0) mynbP2d = 1; - TColgp_Array1OfPnt TabP(1, mynbP3d); - TColgp_Array1OfPnt2d TabP2d(1, mynbP2d); - TColgp_Array1OfVec TabV(1, mynbP3d); - TColgp_Array1OfVec2d TabV2d(1, mynbP2d); - - // Calcul de la fonction F= somme(||C(ui)-Ptli||2): - // Appel a une fonction heritant de MultipleVarFunctionWithGradient - // pour calculer F et grad_F. - // ================================================================ - - AppParCurves_ParFunction MyF(SSP, FirstPoint,LastPoint, TheConstraints, Parameters, Deg); - - - if (!MyF.Value(Parameters, Fval)) { - Done = Standard_False; - return; - } - - SCU = MyF.CurveValue(); - Standard_Integer deg = SCU.NbPoles()-1; - TColgp_Array1OfPnt TabPole(1, deg+1), TabCoef(1, deg+1); - TColgp_Array1OfPnt2d TabPole2d(1, deg+1), TabCoef2d(1, deg+1); - TColgp_Array1OfPnt TheCoef(1, (deg+1)*mynbP3d); - TColgp_Array1OfPnt2d TheCoef2d(1, (deg+1)*mynbP2d); - - - // Stockage des Poles des courbes pour projeter: - // ============================================ - i2 = 0; - for (k = 1; k <= nbP3d; k++) { - SCU.Curve(k, TabPole); - BSplCLib::PolesCoefficients(TabPole, PLib::NoWeights(), - TabCoef, PLib::NoWeights()); - for (j=1; j<=deg+1; j++) TheCoef(j+i2) = TabCoef(j); - i2 += deg+1; - } - i2 = 0; - for (k = 1; k <= nbP2d; k++) { - SCU.Curve(nbP3d+k, TabPole2d); - BSplCLib::PolesCoefficients(TabPole2d, PLib::NoWeights(), - TabCoef2d, PLib::NoWeights()); - for (j=1; j<=deg+1; j++) TheCoef2d(j+i2) = TabCoef2d(j); - i2 += deg+1; - } - - // Une iteration rapide de projection est faite par la methode de - // Rogers & Fog 89, methode equivalente a Hoschek 88 qui ne necessite pas - // le calcul de D2. - - - // Iteration de Projection: - // ======================= - for (j = FirstPoint+1; j <= LastPoint-1; j++) { - UF = Parameters(j); - if (nbP != 0 && nbP2d != 0) ToolLine::Value(SSP, j, TabP, TabP2d); - else if (nbP2d != 0) ToolLine::Value(SSP, j, TabP2d); - else ToolLine::Value(SSP, j, TabP); - - FU = 0.0; - DFU = 0.0; - i2 = 0; - for (k = 1; k <= nbP3d; k++) { - for (l=1; l<=deg+1; l++) TabCoef(l) = TheCoef(l+i2); - i2 += deg+1; - BSplCLib::CoefsD1(UF, TabCoef, BSplCLib::NoWeights(), Pt, V1); - MyV = gp_Vec(Pt, TabP(k)); - FU += MyV*V1; - DFU += V1.SquareMagnitude(); - } - i2 = 0; - for (k = 1; k <= nbP2d; k++) { - for (l=1; l<=deg+1; l++) TabCoef2d(l) = TheCoef2d(l+i2); - i2 += deg+1; - BSplCLib::CoefsD1(UF, TabCoef2d, BSplCLib::NoWeights(), Pt2d, V12d); - MyV2d = gp_Vec2d(Pt2d, TabP2d(k)); - FU += MyV2d*V12d; - DFU += V12d.SquareMagnitude(); - } - - if (DFU >= RealEpsilon()) { - DU = FU/DFU; - DU = Sign(Min(5.e-02, Abs(DU)), DU); - UF += DU; - Parameters(j) = UF; - } - } - - - if (!MyF.Value(Parameters, Fval)) { - SCU = AppParCurves_MultiCurve(); - Done = Standard_False; - return; - } - MError3d = MyF.MaxError3d(); - MError2d = MyF.MaxError2d(); - - if (MError3d<= Tol3d && MError2d <= Tol2d) { - Done = Standard_True; - SCU = MyF.CurveValue(); - } - else if (NbIterations != 0) { - // NbIterations de gradient conjugue: - // ================================= - Standard_Real Eps = 1.e-07; - AppParCurves_Gradient_BFGS FResol(MyF, Parameters, Tol3d, Tol2d, Eps, NbIterations); - Parameters = MyF.NewParameters(); - SCU = MyF.CurveValue(); - } - - - AvError = 0.; - for (j = FirstPoint; j <= LastPoint; j++) { - // Recherche des erreurs maxi et moyenne a un index donne: - for (k = 1; k <= nbP; k++) { - ParError(j) = Max(ParError(j), MyF.Error(j, k)); - } - AvError += ParError(j); - } - AvError = AvError/(LastPoint-FirstPoint+1); - - - MError3d = MyF.MaxError3d(); - MError2d = MyF.MaxError2d(); - if (MError3d <= Tol3d && MError2d <= Tol2d) { - Done = Standard_True; - } - -} - - - -AppParCurves_MultiCurve AppParCurves_Gradient::Value() const { - return SCU; -} - - -Standard_Boolean AppParCurves_Gradient::IsDone() const { - return Done; -} - - -Standard_Real AppParCurves_Gradient::Error(const Standard_Integer Index) const { - return ParError(Index); -} - -Standard_Real AppParCurves_Gradient::AverageError() const { - return AvError; -} - -Standard_Real AppParCurves_Gradient::MaxError3d() const { - return MError3d; -} - -Standard_Real AppParCurves_Gradient::MaxError2d() const { - return MError2d; -} - - diff --git a/opencascade/AppParCurves_Gradient_BFGS.gxx b/opencascade/AppParCurves_Gradient_BFGS.gxx deleted file mode 100644 index e5c460e17..000000000 --- a/opencascade/AppParCurves_Gradient_BFGS.gxx +++ /dev/null @@ -1,48 +0,0 @@ -// Created on: 1999-12-16 -// Created by: Atelier CAS2000 -// Copyright (c) 1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -// Redefinition de math_BFGS: -// ========================== - - -AppParCurves_Gradient_BFGS::AppParCurves_Gradient_BFGS(math_MultipleVarFunctionWithGradient& F, - const math_Vector& StartingPoint, - const Standard_Real Tolerance3d, - const Standard_Real Tolerance2d, - const Standard_Real Eps, - const Standard_Integer NbIterations ): - math_BFGS(F.NbVariables(), Eps, NbIterations, Eps), - myTol3d(Tolerance3d), - myTol2d(Tolerance2d) -{ - Perform(F, StartingPoint); -} - -Standard_Boolean AppParCurves_Gradient_BFGS::IsSolutionReached(math_MultipleVarFunctionWithGradient& F) const -{ - AppParCurves_ParFunction *F1 = (AppParCurves_ParFunction*) &F; - Standard_Boolean Result, Result2; - - Result = (2.0 * fabs(TheMinimum - PreviousMinimum) <= - 1.e-10 * (fabs(TheMinimum) + fabs(PreviousMinimum))+1.e-12); - Standard_Real MErr3d = F1->MaxError3d(); - Standard_Real MErr2d = F1->MaxError2d(); - - Result2 = ((MErr3d <= myTol3d) && (MErr2d <= myTol2d)); - return (Result || Result2); - } - - diff --git a/opencascade/AppParCurves_HArray1OfConstraintCouple.hxx b/opencascade/AppParCurves_HArray1OfConstraintCouple.hxx index d602cd4a0..7e9f971f3 100644 --- a/opencascade/AppParCurves_HArray1OfConstraintCouple.hxx +++ b/opencascade/AppParCurves_HArray1OfConstraintCouple.hxx @@ -22,5 +22,4 @@ DEFINE_HARRAY1(AppParCurves_HArray1OfConstraintCouple, AppParCurves_Array1OfConstraintCouple) - #endif diff --git a/opencascade/AppParCurves_HArray1OfMultiBSpCurve.hxx b/opencascade/AppParCurves_HArray1OfMultiBSpCurve.hxx index f64b6ac58..cac25aec2 100644 --- a/opencascade/AppParCurves_HArray1OfMultiBSpCurve.hxx +++ b/opencascade/AppParCurves_HArray1OfMultiBSpCurve.hxx @@ -23,5 +23,4 @@ DEFINE_HARRAY1(AppParCurves_HArray1OfMultiBSpCurve, AppParCurves_Array1OfMultiBSpCurve) - #endif diff --git a/opencascade/AppParCurves_HArray1OfMultiCurve.hxx b/opencascade/AppParCurves_HArray1OfMultiCurve.hxx index 0965a034f..2a7eedfea 100644 --- a/opencascade/AppParCurves_HArray1OfMultiCurve.hxx +++ b/opencascade/AppParCurves_HArray1OfMultiCurve.hxx @@ -23,5 +23,4 @@ DEFINE_HARRAY1(AppParCurves_HArray1OfMultiCurve, AppParCurves_Array1OfMultiCurve) - #endif diff --git a/opencascade/AppParCurves_HArray1OfMultiPoint.hxx b/opencascade/AppParCurves_HArray1OfMultiPoint.hxx index c11f82a2a..5896d775a 100644 --- a/opencascade/AppParCurves_HArray1OfMultiPoint.hxx +++ b/opencascade/AppParCurves_HArray1OfMultiPoint.hxx @@ -23,5 +23,4 @@ DEFINE_HARRAY1(AppParCurves_HArray1OfMultiPoint, AppParCurves_Array1OfMultiPoint) - #endif diff --git a/opencascade/AppParCurves_LeastSquare.gxx b/opencascade/AppParCurves_LeastSquare.gxx deleted file mode 100644 index ac24dfcf9..000000000 --- a/opencascade/AppParCurves_LeastSquare.gxx +++ /dev/null @@ -1,1695 +0,0 @@ -// Copyright (c) 1995-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -// lpa, le 27/07/91 -// pmn, 30/10/98 : Protection dans les cas surcontraint -> "isready" - -// Approximation d une MultiLine de points decrite par le tool MLineTool. -// Ce programme utilise les moindres carres pour le cas suivant: -// passage et tangences aux extremites. - - -#define No_Standard_RangeError -#define No_Standard_OutOfRange -#define No_Standard_DimensionError - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - - -static int FlatLength(const TColStd_Array1OfInteger& Mults) { - - Standard_Integer sum = 0; - for (Standard_Integer i = Mults.Lower(); i <= Mults.Upper(); i++) { - sum += Mults.Value(i); - } - return sum; -} - -//======================================================================= -//function : CheckTangents -//purpose : Checks if theArrTg3d and theArrTg2d have direction -// corresponded to the direction between theArrPt1 and theArrPt2. -// If it is not then reverses tangent vectors. -// theArrPt1 (as same as theArrPt2) is sub-set of all 3D-points in -// one multy-point (multy-point is union of sets of 2D- and 3D-points). -// -//ATTENTION!!! -// The property of correlation between Tg3d and Tg2d is used here. -// Therefore, only 3D-coinciding is checked. -//======================================================================= -static void CheckTangents(const TColgp_Array1OfPnt& theArrPt1, - const TColgp_Array1OfPnt& theArrPt2, - TColgp_Array1OfVec& theArrTg3d, - TColgp_Array1OfVec2d& theArrTg2d) -{ - if(theArrPt1.Lower() != theArrPt2.Lower()) - return; - - if(theArrPt1.Upper() != theArrPt2.Upper()) - return; - - if(theArrTg3d.Length() != theArrPt1.Length()) - return; - - Standard_Boolean isToChangeDir = Standard_False; - - for(Standard_Integer i = theArrPt1.Lower(); i <= theArrPt1.Upper(); i++) - { - const gp_Vec aV1(theArrPt1(i), theArrPt2(i)); - const gp_Vec& aV2 = theArrTg3d(i); - - if(aV1.Dot(aV2) < 0.0) - { - isToChangeDir = Standard_True; - break; - } - } - - if(!isToChangeDir) - return; - - //Change directions for every 2D- and 3D-tangents - - for(Standard_Integer i = theArrTg3d.Lower(); i <= theArrTg3d.Upper(); i++) - { - theArrTg3d(i).Reverse(); - } - - for(Standard_Integer i = theArrTg2d.Lower(); i <= theArrTg2d.Upper(); i++) - { - theArrTg2d(i).Reverse(); - } -} - -//======================================================================= -//function : CheckTangents -//purpose : Checks if theArrTg2d have direction -// corresponded to the direction between theArrPt1 and theArrPt2. -// If it is not then reverses tangent vector. -// theArrPt1 (as same as theArrPt2) is sub-set of all 2D-points in -// one multy-point (multy-point is union of sets of 2D- and 3D-points). -//======================================================================= -static void CheckTangents(const TColgp_Array1OfPnt2d& theArrPt1, - const TColgp_Array1OfPnt2d& theArrPt2, - TColgp_Array1OfVec2d& theArrTg2d) -{ - if(theArrPt1.Lower() != theArrPt2.Lower()) - return; - - if(theArrPt1.Upper() != theArrPt2.Upper()) - return; - - for(Standard_Integer i = theArrPt1.Lower(); i <= theArrPt1.Upper(); i++) - { - const gp_Vec2d aV1(theArrPt1(i), theArrPt2(i)); - const gp_Vec2d& aV2 = theArrTg2d(i); - - if(aV1.Dot(aV2) < 0.0) - { - theArrTg2d(i).Reverse(); - } - } -} - - -AppParCurves_LeastSquare:: - AppParCurves_LeastSquare(const MultiLine& SSP, - const Standard_Integer FirstPoint, - const Standard_Integer LastPoint, - const AppParCurves_Constraint FirstCons, - const AppParCurves_Constraint LastCons, - const math_Vector& Parameters, - const Standard_Integer NbPol): - SCU(NbPol), - mypoles(1, NbPol, - 1, NbBColumns(SSP)), - A(FirstPoint, LastPoint, 1, NbPol), - DA(FirstPoint, LastPoint, 1, NbPol), - B2(TheFirstPoint(FirstCons, FirstPoint), - Max(TheFirstPoint(FirstCons, FirstPoint), - TheLastPoint(LastCons, LastPoint)), - 1, NbBColumns(SSP)), - mypoints(FirstPoint, LastPoint, 1, NbBColumns(SSP)), - Vflatknots(1, 1), - Vec1t(1, NbBColumns(SSP)), - Vec1c(1, NbBColumns(SSP)), - Vec2t(1, NbBColumns(SSP)), - Vec2c(1, NbBColumns(SSP)), - theError(FirstPoint, LastPoint, - 1, ToolLine::NbP3d(SSP)+ToolLine::NbP2d(SSP), 0.0), - myindex(FirstPoint, LastPoint, 0), - nbpoles(NbPol) -{ - FirstConstraint = FirstCons; - LastConstraint = LastCons; - Init(SSP, FirstPoint, LastPoint); - Perform(Parameters); -} - - - -AppParCurves_LeastSquare:: - AppParCurves_LeastSquare(const MultiLine& SSP, - const Standard_Integer FirstPoint, - const Standard_Integer LastPoint, - const AppParCurves_Constraint FirstCons, - const AppParCurves_Constraint LastCons, - const Standard_Integer NbPol): - SCU(NbPol), - mypoles(1, NbPol, - 1, NbBColumns(SSP)), - A(FirstPoint, LastPoint, 1, NbPol), - DA(FirstPoint, LastPoint, 1, NbPol), - B2(TheFirstPoint(FirstCons, FirstPoint), - Max(TheFirstPoint(FirstCons, FirstPoint), - TheLastPoint(LastCons, LastPoint)), - 1, NbBColumns(SSP)), - mypoints(FirstPoint, LastPoint, 1, NbBColumns(SSP)), - Vflatknots(1, 1), - Vec1t(1, NbBColumns(SSP)), - Vec1c(1, NbBColumns(SSP)), - Vec2t(1, NbBColumns(SSP)), - Vec2c(1, NbBColumns(SSP)), - theError(FirstPoint, LastPoint, - 1, ToolLine::NbP3d(SSP)+ToolLine::NbP2d(SSP), 0.0), - myindex(FirstPoint, LastPoint, 0), - nbpoles(NbPol) -{ - FirstConstraint = FirstCons; - LastConstraint = LastCons; - Init(SSP, FirstPoint, LastPoint); -} - - -AppParCurves_LeastSquare:: - AppParCurves_LeastSquare(const MultiLine& SSP, - const TColStd_Array1OfReal& Knots, - const TColStd_Array1OfInteger& Mults, - const Standard_Integer FirstPoint, - const Standard_Integer LastPoint, - const AppParCurves_Constraint FirstCons, - const AppParCurves_Constraint LastCons, - const math_Vector& Parameters, - const Standard_Integer NbPol): - SCU(NbPol), - mypoles(1, NbPol, - 1, NbBColumns(SSP)), - A(FirstPoint, LastPoint, 1, NbPol), - DA(FirstPoint, LastPoint, 1, NbPol), - B2(TheFirstPoint(FirstCons, FirstPoint), - Max(TheFirstPoint(FirstCons, FirstPoint), - TheLastPoint(LastCons, LastPoint)), - 1, NbBColumns(SSP)), - mypoints(FirstPoint, LastPoint, 1, NbBColumns(SSP)), - Vflatknots(1, FlatLength(Mults)), - Vec1t(1, NbBColumns(SSP)), - Vec1c(1, NbBColumns(SSP)), - Vec2t(1, NbBColumns(SSP)), - Vec2c(1, NbBColumns(SSP)), - theError(FirstPoint, LastPoint, - 1, ToolLine::NbP3d(SSP)+ToolLine::NbP2d(SSP), 0.0), - myindex(FirstPoint, LastPoint, 0), - nbpoles(NbPol) -{ - FirstConstraint = FirstCons; - LastConstraint = LastCons; - myknots = new TColStd_HArray1OfReal(Knots.Lower(), Knots.Upper()); - myknots->ChangeArray1() = Knots; - mymults = new TColStd_HArray1OfInteger(Mults.Lower(), Mults.Upper()); - mymults->ChangeArray1() = Mults; - SCU.SetKnots(Knots); - SCU.SetMultiplicities(Mults); - Init(SSP, FirstPoint, LastPoint); - Perform(Parameters); -} - - - -AppParCurves_LeastSquare:: - AppParCurves_LeastSquare(const MultiLine& SSP, - const TColStd_Array1OfReal& Knots, - const TColStd_Array1OfInteger& Mults, - const Standard_Integer FirstPoint, - const Standard_Integer LastPoint, - const AppParCurves_Constraint FirstCons, - const AppParCurves_Constraint LastCons, - const Standard_Integer NbPol): - SCU(NbPol), - mypoles(1, NbPol, - 1, NbBColumns(SSP)), - A(FirstPoint, LastPoint, 1, NbPol), - DA(FirstPoint, LastPoint, 1, NbPol), - B2(TheFirstPoint(FirstCons, FirstPoint), - Max(TheFirstPoint(FirstCons, FirstPoint), - TheLastPoint(LastCons, LastPoint)), - 1, NbBColumns(SSP)), - mypoints(FirstPoint, LastPoint, 1, NbBColumns(SSP)), - Vflatknots(1, FlatLength(Mults)), - Vec1t(1, NbBColumns(SSP)), - Vec1c(1, NbBColumns(SSP)), - Vec2t(1, NbBColumns(SSP)), - Vec2c(1, NbBColumns(SSP)), - theError(FirstPoint, LastPoint, - 1, ToolLine::NbP3d(SSP)+ToolLine::NbP2d(SSP), 0.0), - myindex(FirstPoint, LastPoint, 0), - nbpoles(NbPol) -{ - myknots = new TColStd_HArray1OfReal(Knots.Lower(), Knots.Upper()); - myknots->ChangeArray1() = Knots; - mymults = new TColStd_HArray1OfInteger(Mults.Lower(), Mults.Upper()); - mymults->ChangeArray1() = Mults; - SCU.SetKnots(Knots); - SCU.SetMultiplicities(Mults); - FirstConstraint = FirstCons; - LastConstraint = LastCons; - Init(SSP, FirstPoint, LastPoint); -} - - - -void AppParCurves_LeastSquare::Init(const MultiLine& SSP, - const Standard_Integer FirstPoint, - const Standard_Integer LastPoint) -{ - // Variable de controle - iscalculated = Standard_False; - isready = Standard_True; - - myfirstp = FirstPoint; - mylastp = LastPoint; - FirstP = TheFirstPoint(FirstConstraint, myfirstp); - LastP = TheLastPoint(LastConstraint, mylastp); - - // Reperage des contraintes aux extremites: - // ======================================== - Standard_Integer i, j, k, i2; - - nbP2d = ToolLine::NbP2d(SSP); - nbP = ToolLine::NbP3d(SSP); - gp_Pnt Poi; - gp_Pnt2d Poi2d; -// gp_Vec V3d; -// gp_Vec2d V2d; - Standard_Integer mynbP2d = nbP2d, mynbP = nbP; - if (nbP2d == 0) mynbP2d = 1; - if (nbP == 0) mynbP = 1; - TColgp_Array1OfPnt TabP(1, mynbP); - TColgp_Array1OfPnt2d TabP2d(1, mynbP2d); - TColgp_Array1OfVec TabV(1, mynbP); - TColgp_Array1OfVec2d TabV2d(1, mynbP2d); - - - deg = nbpoles-1; - - if (!mymults.IsNull()) { - Standard_Integer sum = 0; - for (i = mymults->Lower(); i <= mymults->Upper(); i++) { - sum += mymults->Value(i); - } - deg = sum -nbpoles-1; - k = 1; - Standard_Real val; - for (i = myknots->Lower(); i <= myknots->Upper(); i++) { - for (j = 1; j <= mymults->Value(i); j++) { - val = myknots->Value(i); - Vflatknots(k) = val; - k++; - } - } - } - - - Affect(SSP, FirstPoint, FirstConstraint, Vec1t, Vec1c); - - Affect(SSP, LastPoint, LastConstraint, Vec2t, Vec2c); - - for (j = myfirstp; j <= mylastp; j++) { - i2 = 1; - if (nbP != 0 && nbP2d != 0) ToolLine::Value(SSP, j, TabP,TabP2d); - else if (nbP2d != 0) ToolLine::Value(SSP, j, TabP2d); - else ToolLine::Value(SSP, j, TabP); - for (i = 1; i <= nbP; i++) { - (TabP(i)).Coord(mypoints(j,i2),mypoints(j,i2+1),mypoints(j,i2+2)); - i2 += 3; - } - for (i = 1;i <= nbP2d; i++) { - (TabP2d(i)).Coord(mypoints(j, i2), mypoints(j, i2+1)); - i2 += 2; - } - } - - AppParCurves_MultiPoint Pole1(nbP, nbP2d), PoleN(nbP, nbP2d); - - if (FirstConstraint == AppParCurves_PassPoint || - FirstConstraint == AppParCurves_TangencyPoint || - FirstConstraint == AppParCurves_CurvaturePoint) { - i2 = 1; - for (i = 1; i <= nbP; i++) { - Poi.SetCoord(mypoints(myfirstp, i2), - mypoints(myfirstp, i2+1), - mypoints(myfirstp, i2+2)); - Pole1.SetPoint(i, Poi); - i2 += 3; - } - for (i = 1; i <= nbP2d; i++) { - Poi2d.SetCoord(mypoints(myfirstp, i2), mypoints(myfirstp, i2+1)); - Pole1.SetPoint2d(i+nbP, Poi2d); - i2 += 2; - } - for (i = 1; i <= mypoles.ColNumber(); i++) - mypoles(1, i) = mypoints(myfirstp, i); - } - - - - if (LastConstraint == AppParCurves_PassPoint || - LastConstraint == AppParCurves_TangencyPoint || - FirstConstraint == AppParCurves_CurvaturePoint) { - i2 = 1; - for (i = 1; i <= nbP; i++) { - Poi.SetCoord(mypoints(mylastp, i2), - mypoints(mylastp, i2+1), - mypoints(mylastp, i2+2)); - PoleN.SetPoint(i, Poi); - i2 += 3; - } - for (i = 1; i <= nbP2d; i++) { - Poi2d.SetCoord(mypoints(mylastp, i2), - mypoints(mylastp, i2+1)); - PoleN.SetPoint2d(i+nbP, Poi2d); - i2 += 2; - } - - for (i = 1; i <= mypoles.ColNumber(); i++) - mypoles(nbpoles, i) = mypoints(mylastp, i); - } - - - if (FirstConstraint == AppParCurves_NoConstraint) { - resinit = 1; - SCU.SetValue(1, Pole1); - if (LastConstraint == AppParCurves_NoConstraint) { - resfin = nbpoles; - } - else if (LastConstraint == AppParCurves_PassPoint) { - resfin = nbpoles-1; - SCU.SetValue(nbpoles, PoleN); - } - else if (LastConstraint == AppParCurves_TangencyPoint) { - resfin = nbpoles-2; - SCU.SetValue(nbpoles, PoleN); - } - else if (LastConstraint == AppParCurves_CurvaturePoint) { - resfin = nbpoles-3; - SCU.SetValue(nbpoles, PoleN); - } - } - else if (FirstConstraint == AppParCurves_PassPoint) { - resinit = 2; - SCU.SetValue(1, Pole1); - if (LastConstraint == AppParCurves_NoConstraint) { - resfin = nbpoles; - } - else if (LastConstraint == AppParCurves_PassPoint) { - resfin = nbpoles-1; - SCU.SetValue(nbpoles, PoleN); - } - else if (LastConstraint == AppParCurves_TangencyPoint) { - resfin = nbpoles-2; - SCU.SetValue(nbpoles, PoleN); - } - else if (LastConstraint == AppParCurves_CurvaturePoint) { - resfin = nbpoles-3; - SCU.SetValue(nbpoles, PoleN); - } - } - else if (FirstConstraint == AppParCurves_TangencyPoint) { - resinit = 3; - SCU.SetValue(1, Pole1); - if (LastConstraint == AppParCurves_NoConstraint) { - resfin = nbpoles; - } - if (LastConstraint == AppParCurves_PassPoint) { - resfin = nbpoles-1; - SCU.SetValue(nbpoles, PoleN); - } - if (LastConstraint == AppParCurves_TangencyPoint) { - resfin = nbpoles-2; - SCU.SetValue(nbpoles, PoleN); - } - else if (LastConstraint == AppParCurves_CurvaturePoint) { - resfin = nbpoles-3; - SCU.SetValue(nbpoles, PoleN); - } - } - else if (FirstConstraint == AppParCurves_CurvaturePoint) { - resinit = 4; - SCU.SetValue(1, Pole1); - if (LastConstraint == AppParCurves_NoConstraint) { - resfin = nbpoles; - } - if (LastConstraint == AppParCurves_PassPoint) { - resfin = nbpoles-1; - SCU.SetValue(nbpoles, PoleN); - } - if (LastConstraint == AppParCurves_TangencyPoint) { - resfin = nbpoles-2; - SCU.SetValue(nbpoles, PoleN); - } - else if (LastConstraint == AppParCurves_CurvaturePoint) { - resfin = nbpoles-3; - SCU.SetValue(nbpoles, PoleN); - } - } - - Standard_Integer Nincx = resfin-resinit+1; - if (Nincx<1) { //Impossible d'aller plus loin - isready = Standard_False; - return; - } - Standard_Integer Neq = LastP-FirstP+1; - - NA = 3*nbP+2*nbP2d; - Nlignes = NA*Neq; - Ninc = NA*Nincx; - if (FirstConstraint >= AppParCurves_TangencyPoint) Ninc++; - if (LastConstraint >= AppParCurves_TangencyPoint) Ninc++; -} - - - - -void AppParCurves_LeastSquare::Perform(const math_Vector& Parameters) { - - done = Standard_False; - if (!isready) { - return; - } - Standard_Integer i, j, k, Ci, i2, k1, k2; - Standard_Integer nbpol1 = nbpoles-1, Ninc1 = Ninc-1; - Standard_Real AD1, A0; -// gp_Pnt Pt; -// gp_Pnt2d Pt2d; - iscalculated = Standard_False; - - // calcul de la matrice A et DA des fonctions d approximation: - ComputeFunction(Parameters); - - if (FirstConstraint != AppParCurves_TangencyPoint && - LastConstraint != AppParCurves_TangencyPoint) { - if (FirstConstraint == AppParCurves_NoConstraint) { - if (LastConstraint == AppParCurves_NoConstraint ) { - - math_Householder HouResol(A, mypoints); - if (!(HouResol.IsDone())) { - done = Standard_False; - return; - } - done = Standard_True; - mypoles = HouResol.AllValues(); - return; - - } - else { - for (j = FirstP; j <= LastP; j++) { - AD1 = A(j, nbpoles); - for (i = 1; i <= B2.ColNumber(); i++) { - B2(j, i) = mypoints(j,i) - AD1*mypoles(nbpoles, i); - } - } - } - } - else if (FirstConstraint == AppParCurves_PassPoint) { - if (LastConstraint == AppParCurves_NoConstraint) { - for (j = FirstP; j <= LastP; j++) { - A0 = A(j, 1); - for (i = 1; i <= B2.ColNumber(); i++) { - B2(j, i) = mypoints(j, i)- A0*mypoles(1, i); - } - } - } - else if (LastConstraint == AppParCurves_PassPoint) { - for (j = FirstP; j <= LastP; j++) { - A0 = A(j, 1); - AD1 = A(j, nbpoles); - for (i = 1; i <= B2.ColNumber(); i++) { - B2(j, i) = mypoints(j, i) - A0 * mypoles(1, i) - - AD1* mypoles(nbpoles, i); - } - } - } - } - - // resolution: - - Standard_Integer Nincx = resfin-resinit+1; - if (Nincx < 1) { - done = Standard_True; - return; - } - math_IntegerVector Index(1, Nincx); - SearchIndex(Index); - math_Matrix mytab(resinit, resfin, 1, B2.ColNumber(),0.0); - math_Vector TheAA(1, Index(Nincx), 0.0); - math_Vector myTABB(1, Nincx, 0.0); - - MakeTAA(TheAA, mytab); - DACTCL_Decompose(TheAA, Index); - - Standard_Integer kk2; - for (j = 1; j <= B2.ColNumber(); j++) { - kk2 = 1; - for (i = resinit; i <= resfin; i++) { - myTABB(kk2) = mytab(i, j); - kk2++; - } - DACTCL_Solve(TheAA, myTABB, Index); - - i2 = 1; - for (k = resinit; k <= resfin; k++) { - mypoles(k, j) = myTABB.Value(i2); - i2++; - } - } - done = Standard_True; - } - - // =========================================================== - // cas de tangence: - // =========================================================== - - Standard_Integer Nincx = resfin-resinit+1; - Standard_Integer deport = 0, Nincx2 = 2*Nincx; - - math_IntegerVector InternalIndex(1, Nincx); - SearchIndex(InternalIndex); - math_IntegerVector Index(1, Ninc); - - Standard_Integer l = 1; - if (resinit <= resfin) { - for (j = 0; j <= NA-1; j++) { - deport = j*InternalIndex(Nincx); - for (i = 1; i <= Nincx; i++) { - Index(l) = InternalIndex(i) + deport; - l++; - } - } - } - - if (resinit > resfin) Index(1) = 1; - if (Ninc1 > 1) { - if (FirstConstraint >= AppParCurves_TangencyPoint && - LastConstraint >= AppParCurves_TangencyPoint) - Index(Ninc1) = Index(Ninc1 - 1) + Ninc1; - } - if (FirstConstraint >= AppParCurves_TangencyPoint || - LastConstraint >= AppParCurves_TangencyPoint) - Index(Ninc) = Index(Ninc-1) + Ninc; - - - math_Vector TheA(1, Index(Ninc), 0.0); - math_Vector myTAB(1, Ninc, 0.0); - - MakeTAA(TheA, myTAB); - - Standard_Integer Error = DACTCL_Decompose(TheA, Index); - Error = DACTCL_Solve(TheA, myTAB, Index); - - if (!Error) done = Standard_True; - - if (FirstConstraint >= AppParCurves_TangencyPoint && - LastConstraint >= AppParCurves_TangencyPoint) { - lambda1 = myTAB.Value(Ninc1); - lambda2 = myTAB.Value(Ninc); - } - else if (FirstConstraint >= AppParCurves_TangencyPoint) - lambda1 = myTAB.Value(Ninc); - else if (LastConstraint >= AppParCurves_TangencyPoint) - lambda2 = myTAB.Value(Ninc); - - - - // Les resultats sont stockes dans mypoles. - //========================================= - k = 1; - i2 = 1; - for (Ci = 1; Ci <= nbP; Ci++) { - k1 = k+1; k2 = k+2; - for (j = resinit; j <= resfin; j++) { - mypoles(j, k) = myTAB.Value(i2); - mypoles(j, k1) = myTAB.Value(i2+Nincx); - mypoles(j, k2) = myTAB.Value(i2+Nincx2); - i2++; - } - - if (FirstConstraint >= AppParCurves_TangencyPoint) { - mypoles(2, k) = mypoints(myfirstp, k) + lambda1*Vec1t(k); - mypoles(2, k1) = mypoints(myfirstp, k1) + lambda1*Vec1t(k1); - mypoles(2, k2) = mypoints(myfirstp, k2) + lambda1*Vec1t(k2); - } - if (LastConstraint >= AppParCurves_TangencyPoint) { - mypoles(nbpol1, k) = mypoints(mylastp, k) - lambda2*Vec2t(k); - mypoles(nbpol1, k1) = mypoints(mylastp, k1) - lambda2*Vec2t(k1); - mypoles(nbpol1, k2) = mypoints(mylastp, k2) - lambda2*Vec2t(k2); - } - k += 3; i2 += Nincx2; - } - - for (Ci = 1; Ci <= nbP2d; Ci++) { - k1 = k+1; k2 = k+2; - for (j = resinit; j <= resfin; j++) { - mypoles(j, k) = myTAB.Value(i2); - mypoles(j, k1) = myTAB.Value(i2+Nincx); - i2++; - } - if (FirstConstraint >= AppParCurves_TangencyPoint) { - mypoles(2, k) = mypoints(myfirstp, k) + lambda1*Vec1t(k); - mypoles(2, k1) = mypoints(myfirstp, k1) + lambda1*Vec1t(k1); - } - if (LastConstraint >= AppParCurves_TangencyPoint) { - mypoles(nbpol1, k) = mypoints(mylastp, k) - lambda2*Vec2t(k); - mypoles(nbpol1, k1) = mypoints(mylastp, k1) - lambda2*Vec2t(k1); - } - k += 2; i2 += Nincx; - } - -} - -void AppParCurves_LeastSquare::Perform(const math_Vector& Parameters, - const math_Vector& V1t, - const math_Vector& V2t, - const Standard_Real l1, - const Standard_Real l2) -{ - done = Standard_False; - if (!isready) { - return; - } - Standard_Integer i, lower1 = V1t.Lower(), lower2 = V2t.Lower(); - resinit = 3; resfin = nbpoles-2; - Standard_Integer Nincx = resfin-resinit+1; - Ninc = NA*Nincx + 2; - FirstConstraint = AppParCurves_TangencyPoint; - LastConstraint = AppParCurves_TangencyPoint; - for (i = 1; i <= Vec1t.Upper(); i++) { - Vec1t(i) = V1t(i+lower1-1); - Vec2t(i) = V2t(i+lower2-1); - } - Perform (Parameters, l1, l2); -} - - -void AppParCurves_LeastSquare::Perform(const math_Vector& Parameters, - const math_Vector& V1t, - const math_Vector& V2t, - const math_Vector& V1c, - const math_Vector& V2c, - const Standard_Real l1, - const Standard_Real l2) { - done = Standard_False; - if (!isready) { - return; - } - Standard_Integer i, lower1 = V1t.Lower(), lower2 = V2t.Lower(); - Standard_Integer lowc1 = V1c.Lower(), lowc2 = V2c.Lower(); - resinit = 4; resfin = nbpoles-3; - Standard_Integer Nincx = resfin-resinit+1; - Ninc = NA*Nincx + 2; - FirstConstraint = AppParCurves_CurvaturePoint; - LastConstraint = AppParCurves_CurvaturePoint; - - for (i = 1; i <= Vec1t.Upper(); i++) { - Vec1t(i) = V1t(i+lower1-1); - Vec2t(i) = V2t(i+lower2-1); - Vec1c(i) = V1c(i+lowc1-1); - Vec2c(i) = V2c(i+lowc2-1); - } - Perform (Parameters, l1, l2); -} - - - -void AppParCurves_LeastSquare::Perform(const math_Vector& Parameters, - const Standard_Real l1, - const Standard_Real l2) { - done = Standard_False; - if (!isready) { - return; - } - if (FirstConstraint < AppParCurves_TangencyPoint && - LastConstraint < AppParCurves_TangencyPoint) { - Perform(Parameters); - return; - } - iscalculated = Standard_False; - - lambda1 = l1; - lambda2 = l2; - Standard_Integer i, j, k, i2; - Standard_Real AD0, AD1, AD2, A0, A1, A2; -// gp_Pnt Pt, P1, P2; -// gp_Pnt2d Pt2d, P12d, P22d; - Standard_Real l11 = deg*l1, l22 = deg*l2; - - ComputeFunction(Parameters); - - if (FirstConstraint >= AppParCurves_TangencyPoint) { - for (i = 1; i <= mypoles.ColNumber(); i++) - mypoles(2, i) = mypoints(myfirstp, i) + l1*Vec1t(i); - } - - - if (FirstConstraint == AppParCurves_CurvaturePoint) { - for (i = 1; i <= mypoles.ColNumber(); i++) - mypoles(3, i) = 2*mypoles(2, i)-mypoles(1, i) - + l11*l11*Vec1c(i)/(deg*(deg-1)); - } - - - if (LastConstraint >= AppParCurves_TangencyPoint) { - for (i = 1; i <= mypoles.ColNumber(); i++) - mypoles(nbpoles-1, i) = mypoints(mylastp, i) - l2*Vec2t(i); - } - - - if (LastConstraint == AppParCurves_CurvaturePoint) { - for (i = 1; i <= mypoles.ColNumber(); i++) - mypoles(nbpoles-2, i) = 2*mypoles(nbpoles-1, i) - mypoles(nbpoles, i) - + l22*l22*Vec2c(i)/(deg*(deg-1)); - } - - if (resinit > resfin) { - done = Standard_True; - return; - } - - if (FirstConstraint == AppParCurves_NoConstraint) { - if (LastConstraint == AppParCurves_TangencyPoint) { - for (j = FirstP; j <= LastP; j++) { - AD0 = A(j, nbpoles); AD1 = A(j, nbpoles-1); - for (i = 1; i <= B2.ColNumber(); i++) { - B2(j, i) = mypoints(j, i) - AD0 * mypoles(nbpoles, i) - - AD1 * mypoles(nbpoles-1, i); - } - } - } - if (LastConstraint == AppParCurves_CurvaturePoint) { - for (j = FirstP; j <= LastP; j++) { - AD0 = A(j, nbpoles); AD1 = A(j, nbpoles-1); AD2 = A(j, nbpoles-2); - for (i = 1; i <= B2.ColNumber(); i++) { - B2(j, i) = mypoints(j, i) - AD0 * mypoles(nbpoles, i) - - AD1 * mypoles(nbpoles-1, i) - - AD2 * mypoles(nbpoles-2, i); - } - } - } - } - else if (FirstConstraint == AppParCurves_PassPoint) { - if (LastConstraint == AppParCurves_TangencyPoint) { - for (j = FirstP; j <= LastP; j++) { - A0 = A(j, 1); - AD0 = A(j, nbpoles); AD1 = A(j, nbpoles-1); - for (i = 1; i <= B2.ColNumber(); i++) { - B2(j, i) = mypoints(j, i) - A0 * mypoles(1, i) - - AD0 * mypoles(nbpoles, i) - - AD1 * mypoles(nbpoles-1, i); - } - } - } - if (LastConstraint == AppParCurves_CurvaturePoint) { - for (j = FirstP; j <= LastP; j++) { - A0 = A(j, 1); - AD0 = A(j, nbpoles); AD1 = A(j, nbpoles-1); AD2 = A(j, nbpoles-2); - for (i = 1; i <= B2.ColNumber(); i++) { - B2(j, i) = mypoints(j, i) - A0 * mypoles(1, i) - - AD0 * mypoles(nbpoles, i) - - AD1 * mypoles(nbpoles-1, i) - - AD2 * mypoles(nbpoles-2, i); - } - } - } - } - else if (FirstConstraint == AppParCurves_TangencyPoint) { - if (LastConstraint == AppParCurves_NoConstraint) { - for (j = FirstP; j <= LastP; j++) { - A0 = A(j, 1); A1 = A(j, 2); - for (i = 1; i <= B2.ColNumber(); i++) { - B2(j, i) = mypoints(j, i) - A0 * mypoles(1, i) - - A1 * mypoles(2, i); - } - } - } - else if (LastConstraint == AppParCurves_PassPoint) { - for (j = FirstP; j <= LastP; j++) { - A0 = A(j, 1); AD0 = A(j, nbpoles); A1 = A(j, 2); - for (i = 1; i <= B2.ColNumber(); i++) { - B2(j, i) = mypoints(j, i) - A0 * mypoles(1, i) - - AD0 * mypoles(nbpoles, i) - - A1 * mypoles(2, i); - } - } - } - else if (LastConstraint == AppParCurves_TangencyPoint) { - for (j = FirstP; j <= LastP; j++) { - A0 = A(j, 1); AD0 = A(j, nbpoles); A1 = A(j, 2); AD1 = A(j, nbpoles-1); - for (i = 1; i <= B2.ColNumber(); i++) { - B2(j, i) = mypoints(j, i) - A0 * mypoles(1, i) - - AD0 * mypoles(nbpoles, i) - - A1 * mypoles(2, i) - - AD1 * mypoles(nbpoles-1, i); - } - } - } - } - else if (FirstConstraint == AppParCurves_CurvaturePoint) { - if (LastConstraint == AppParCurves_NoConstraint) { - for (j = FirstP; j <= LastP; j++) { - A0 = A(j, 1); A1 = A(j, 2); A2 = A(j, 3); - for (i = 1; i <= B2.ColNumber(); i++) { - B2(j, i) = mypoints(j, i) - A0 * mypoles(1, i) - - A1 * mypoles(2, i) - - A2 * mypoles(3, i); - } - } - } - else if (LastConstraint == AppParCurves_PassPoint) { - for (j = FirstP; j <= LastP; j++) { - A0 = A(j, 1); A1 = A(j, 2); A2 = A(j, 3); AD0 = A(j, nbpoles); - for (i = 1; i <= B2.ColNumber(); i++) { - B2(j, i) = mypoints(j, i) - A0 * mypoles(1, i) - - A1 * mypoles(2, i) - - A2 * mypoles(3, i) - - AD0 * mypoles(nbpoles, i); - } - } - } - else if (LastConstraint == AppParCurves_TangencyPoint) { - for (j = FirstP; j <= LastP; j++) { - A0 = A(j, 1); A1 = A(j, 2); A2 = A(j, 3); - AD0 = A(j, nbpoles); AD1 = A(j, nbpoles-1); - for (i = 1; i <= B2.ColNumber(); i++) { - B2(j, i) = mypoints(j, i) - A0 * mypoles(1, i) - - A1 * mypoles(2, i) - - A2 * mypoles(3, i) - - AD0 * mypoles(nbpoles, i) - - AD1 * mypoles(nbpoles-1, i); - } - } - } - else if (LastConstraint == AppParCurves_CurvaturePoint) { - for (j = FirstP; j <= LastP; j++) { - A0 = A(j, 1); A1 = A(j, 2); A2 = A(j, 3); - AD0 = A(j, nbpoles); AD1 = A(j, nbpoles-1); AD2 = A(j, nbpoles-2); - for (i = 1; i <= B2.ColNumber(); i++) { - B2(j, i) = mypoints(j, i) - A0 * mypoles(1, i) - - A1 * mypoles(2, i) - - A2 * mypoles(3, i) - - AD0 * mypoles(nbpoles, i) - - AD1 * mypoles(nbpoles-1, i) - - AD2 * mypoles(nbpoles-2, i); - } - } - } - } - - Standard_Integer Nincx = resfin-resinit+1; - - math_Matrix mytab(resinit, resfin, 1, B2.ColNumber(),0.0); - math_IntegerVector Index(1, Nincx); - SearchIndex(Index); - math_Vector AA(1, Index(Nincx), 0.0); - MakeTAA(AA, mytab); - - math_Vector myTABB(1, Nincx, 0.0); - - DACTCL_Decompose(AA, Index); - - Standard_Integer kk2; - for (j = 1; j <= B2.ColNumber(); j++) { - kk2 = 1; - for (i = resinit; i <= resfin; i++) { - myTABB(kk2) = mytab(i, j); - kk2++; - } - - DACTCL_Solve(AA, myTABB, Index); - - i2 = 1; - for (k = resinit; k <= resfin; k++) { - mypoles(k, j) = myTABB.Value(i2); - i2++; - } - - } - - done = Standard_True; - -} - - - -//======================================================================= -//function : Affect -//purpose : Index is an ID of the point in MultiLine. Every point is set of -// several 3D- and 2D-points. E.g. every points of Walking-line, -// obtained in intersection algorithm, is set of one 3D points -// (nbP == 1) and two 2D-points (nbP2d == 2). -//======================================================================= -void AppParCurves_LeastSquare::Affect(const MultiLine& SSP, - const Standard_Integer Index, - AppParCurves_Constraint& Cons, - math_Vector& Vt, - math_Vector& Vc) -{ - // Vt: vector of tangent, Vc: vector of curvature. - - if (Cons >= AppParCurves_TangencyPoint) { - Standard_Integer i, i2 = 1; - Standard_Boolean Ok; - Standard_Integer mynbP2d = nbP2d, mynbP = nbP; - if (nbP2d == 0) mynbP2d = 1; - if (nbP == 0) mynbP = 1; - TColgp_Array1OfVec TabV(1, mynbP); - TColgp_Array1OfVec2d TabV2d(1, mynbP2d); - - if (Cons == AppParCurves_CurvaturePoint) - { - if (nbP != 0 && nbP2d != 0) - { - Ok = ToolLine::Curvature(SSP, Index,TabV,TabV2d); - if (!Ok) { Cons = AppParCurves_TangencyPoint;} - } - else if (nbP2d != 0) - { - Ok = ToolLine::Curvature(SSP, Index, TabV2d); - if (!Ok) { Cons = AppParCurves_TangencyPoint;} - } - else { - Ok = ToolLine::Curvature(SSP, Index, TabV); - if (!Ok) { Cons = AppParCurves_TangencyPoint;} - } - if (Ok) { - for (i = 1; i <= nbP; i++) { - (TabV(i)).Coord(Vc(i2), Vc(i2+1), Vc(i2+2)); - i2 += 3; - } - - for (i = 1; i <= nbP2d; i++) { - (TabV2d(i)).Coord(Vc(i2), Vc(i2+1)); - i2 += 2; - } - } - } - - i2 = 1; - if (Cons >= AppParCurves_TangencyPoint) { - if (nbP != 0 && nbP2d != 0) { - Ok = ToolLine::Tangency(SSP, Index, TabV, TabV2d); - if (!Ok) { Cons = AppParCurves_PassPoint;} - } - else if (nbP2d != 0) { - Ok = ToolLine::Tangency(SSP, Index, TabV2d); - if (!Ok) { Cons = AppParCurves_PassPoint;} - } - else { - Ok = ToolLine::Tangency(SSP, Index, TabV); - if (!Ok) { Cons = AppParCurves_PassPoint;} - } - - if (Ok) - { - TColgp_Array1OfPnt anArrPts3d1(1, mynbP), anArrPts3d2(1, mynbP); - - if(nbP != 0) - { - if(Index < ToolLine::LastPoint(SSP)) - { - ToolLine::Value(SSP, Index, anArrPts3d1); - ToolLine::Value(SSP, Index+1, anArrPts3d2); - } - else - {// (Index == ToolLine::LastPoint(theML)) - ToolLine::Value(SSP, Index-1, anArrPts3d1); - ToolLine::Value(SSP, Index, anArrPts3d2); - } - - CheckTangents(anArrPts3d1, anArrPts3d2, TabV, TabV2d); - } - else if(nbP2d != 0) - { - TColgp_Array1OfPnt2d anArrPts2d1(1, mynbP2d), anArrPts2d2(1, mynbP2d); - - if(Index < ToolLine::LastPoint(SSP)) - { - ToolLine::Value(SSP, Index, anArrPts3d1, anArrPts2d1); - ToolLine::Value(SSP, Index+1, anArrPts3d2, anArrPts2d2); - } - else - {// (Index == ToolLine::LastPoint(theML)) - ToolLine::Value(SSP, Index-1, anArrPts3d1, anArrPts2d1); - ToolLine::Value(SSP, Index, anArrPts3d2, anArrPts2d2); - } - - CheckTangents(anArrPts2d1, anArrPts2d2, TabV2d); - } - - for (i = 1; i <= nbP; i++) { - (TabV(i)).Coord(Vt(i2), Vt(i2+1), Vt(i2+2)); - i2 += 3; - } - - for (i = 1; i <= nbP2d; i++) { - (TabV2d(i)).Coord(Vt(i2), Vt(i2+1)); - i2 += 2; - } - } - } - } -} - - - -Standard_Integer AppParCurves_LeastSquare::NbBColumns( - const MultiLine& SSP) const -{ - Standard_Integer BCol; - BCol = (ToolLine::NbP3d(SSP))*3 + - (ToolLine::NbP2d(SSP))*2; - return BCol; -} - - -void AppParCurves_LeastSquare::Error(Standard_Real& F, - Standard_Real& MaxE3d, - Standard_Real& MaxE2d) -{ - - if (!done) {throw StdFail_NotDone();} - Standard_Integer i, j, k, i2, indexdeb, indexfin; - Standard_Integer i21, i22; - Standard_Real AA, BB, CC, Fi, FX, FY, FZ, AIJ; - MaxE3d = MaxE2d = 0.0; - F = 0.0; - i2 = 1; - math_Vector Px(1, nbpoles), Py(1, nbpoles), Pz(1, nbpoles); - - for (k = 1 ; k <= nbP+nbP2d; k++) { - i21 = i2+1; i22 = i2+2; - for (i = 1; i <= nbpoles; i++) { - Px(i) = mypoles(i, i2); - Py(i) = mypoles(i, i21); - if (k <= nbP) Pz(i) = mypoles(i, i22); - } - for (i = FirstP; i <= LastP; i++) { - AA = 0.0; BB = 0.0; CC = 0.0; - indexdeb = myindex(i) + 1; - indexfin = indexdeb + deg; - for (j = indexdeb; j <= indexfin; j++) { - AIJ = A(i, j); - AA += AIJ*Px(j); - BB += AIJ*Py(j); - if (k <= nbP) CC += AIJ*Pz(j); - } - FX = AA-mypoints(i, i2); - FY = BB-mypoints(i, i21); - Fi= FX*FX + FY*FY; - if (k <= nbP) { - FZ = CC-mypoints(i, i22); - Fi += FZ*FZ; - if (Fi > MaxE3d) MaxE3d = Fi; - } - else { - if (Fi > MaxE2d) MaxE2d = Fi; - } - theError(i, k) = Fi; - F += Fi; - } - if (k <= nbP) i2 += 3; - else i2 += 2; - } - MaxE3d = Sqrt(MaxE3d); - MaxE2d = Sqrt(MaxE2d); -} - - -void AppParCurves_LeastSquare::ErrorGradient(math_Vector& Grad, - Standard_Real& F, - Standard_Real& MaxE3d, - Standard_Real& MaxE2d) -{ - if (!done) {throw StdFail_NotDone();} - Standard_Integer i, j, k, i2, indexdeb, indexfin; - Standard_Real AA, BB, CC, Fi, FX, FY, FZ, AIJ; -// Standard_Real DAIJ, DAA, DBB, DCC, Gr, gr1= 0.0, gr2= 0.0; - Standard_Real DAIJ, DAA, DBB, DCC, Gr; - MaxE3d = MaxE2d = 0.0; -// Standard_Integer i21, i22, diff = (deg-1); - Standard_Integer i21, i22; - F = 0.0; - i2 = 1; - math_Vector Px(1, nbpoles), Py(1, nbpoles), Pz(1, nbpoles); - - for (k = Grad.Lower(); k <= Grad.Upper(); k++) Grad(k) = 0.0; - - for (k = 1 ; k <= nbP+nbP2d; k++) { - i21 = i2+1; i22 = i2+2; - for (i = 1; i <= nbpoles; i++) { - Px(i) = mypoles(i, i2); - Py(i) = mypoles(i, i21); - if (k <= nbP) Pz(i) = mypoles(i, i22); - } - for (i = FirstP; i <= LastP; i++) { - AA = 0.0; BB = 0.0; CC = 0.0; DAA = 0.0; DBB = 0.0; DCC = 0.0; - indexdeb = myindex(i) + 1; - indexfin = indexdeb + deg; - for (j = indexdeb; j <= indexfin; j++) { - AIJ = A(i, j); DAIJ = DA(i, j); - AA += AIJ*Px(j); DAA += DAIJ*Px(j); - BB += AIJ*Py(j); DBB += DAIJ*Py(j); - if (k <= nbP) { - CC += AIJ*Pz(j); - DCC += DAIJ*Pz(j); - } - } - FX = AA-mypoints(i, i2); - FY = BB-mypoints(i, i2+1); - Fi = FX*FX + FY*FY; - Gr = 2.0*(DAA*FX + DBB*FY); - - if (k <= nbP) { - FZ = CC-mypoints(i, i2+2); - Fi += FZ*FZ; - Gr += 2.0*DCC*FZ; - if (Fi > MaxE3d) MaxE3d = Fi; - } - else { - if (Fi > MaxE2d) MaxE2d = Fi; - } - theError(i, k) = Fi; - Grad(i) += Gr; - F += Fi; - } - if (k <= nbP) i2 += 3; - else i2 += 2; - } - MaxE3d = Sqrt(MaxE3d); - MaxE2d = Sqrt(MaxE2d); - -} - - -const math_Matrix& AppParCurves_LeastSquare::Distance() -{ - if (!iscalculated) { - for (Standard_Integer i = myfirstp; i <= mylastp; i++) { - for (Standard_Integer j = 1; j <= nbP+nbP2d; j++) { - theError(i, j) = Sqrt(theError(i, j)); - } - } - iscalculated = Standard_True; - } - return theError; -} - - -Standard_Real AppParCurves_LeastSquare::FirstLambda() const -{ - return lambda1; -} - -Standard_Real AppParCurves_LeastSquare::LastLambda() const -{ - return lambda2; -} - - - -Standard_Boolean AppParCurves_LeastSquare::IsDone() const -{ - return done; -} - - -AppParCurves_MultiCurve AppParCurves_LeastSquare::BezierValue() -{ - if (!myknots.IsNull()) throw Standard_NoSuchObject(); - return (AppParCurves_MultiCurve)(BSplineValue()); -} - - -const AppParCurves_MultiBSpCurve& AppParCurves_LeastSquare::BSplineValue() -{ - if (!done) {throw StdFail_NotDone();} - - Standard_Integer i, j, j2, npoints = nbP+nbP2d; - gp_Pnt Pt; - gp_Pnt2d Pt2d; - Standard_Integer ideb = resinit, ifin = resfin; - if (ideb >= 2) ideb = 2; - if (ifin <= nbpoles-1) ifin = nbpoles-1; - - // On met le resultat dans les curves correspondantes - for (i = ideb; i <= ifin; i++) { - j2 = 1; - AppParCurves_MultiPoint MPole(nbP, nbP2d); - for (j = 1; j <= nbP; j++) { - Pt.SetCoord(mypoles(i, j2), mypoles(i, j2+1), mypoles(i,j2+2)); - MPole.SetPoint(j, Pt); - j2 += 3; - } - for (j = nbP+1;j <= npoints; j++) { - Pt2d.SetCoord(mypoles(i, j2), mypoles(i, j2+1)); - MPole.SetPoint2d(j, Pt2d); - j2 += 2; - } - SCU.SetValue(i, MPole); - } - return SCU; -} - - - -const math_Matrix& AppParCurves_LeastSquare::FunctionMatrix() const -{ - if (!done) {throw StdFail_NotDone();} - return A; -} - - -const math_Matrix& AppParCurves_LeastSquare::DerivativeFunctionMatrix() const -{ - if (!done) {throw StdFail_NotDone();} - return DA; -} - - - - -Standard_Integer AppParCurves_LeastSquare:: - TheFirstPoint(const AppParCurves_Constraint FirstCons, - const Standard_Integer FirstPoint) const -{ - if (FirstCons == AppParCurves_NoConstraint) - return FirstPoint; - else - return FirstPoint + 1; -} - - - -Standard_Integer AppParCurves_LeastSquare:: - TheLastPoint(const AppParCurves_Constraint LastCons, - const Standard_Integer LastPoint) const -{ - if (LastCons == AppParCurves_NoConstraint) - return LastPoint; - else - return LastPoint - 1; -} - - -void AppParCurves_LeastSquare::ComputeFunction(const math_Vector& Parameters) -{ - if (myknots.IsNull()) { - AppParCurves::Bernstein(nbpoles, Parameters, A, DA); - } - else { - AppParCurves::SplineFunction(nbpoles, deg, Parameters, - Vflatknots, A, DA, myindex); - } -} - - - -const math_Matrix& AppParCurves_LeastSquare::Points() const -{ - return mypoints; -} - -const math_Matrix& AppParCurves_LeastSquare::Poles() const -{ - return mypoles; -} - - - -const math_IntegerVector& AppParCurves_LeastSquare::KIndex() const -{ - return myindex; -} - - - - -void AppParCurves_LeastSquare::MakeTAA(math_Vector& TheA, - math_Vector& myTAB) -{ - Standard_Integer i, j, k, Ci, i2, i21, i22; - Standard_Real xx = 0.0, yy = 0.0; - - Standard_Integer Nincx = resfin-resinit+1; - Standard_Integer Nrow, Neq = LastP-FirstP+1; - - Standard_Integer Ninc1; - - if (FirstConstraint >= AppParCurves_TangencyPoint && - LastConstraint >= AppParCurves_TangencyPoint) { - Ninc1 = Ninc-1; - } - else Ninc1 = Ninc; - - Standard_Integer myfirst = A.LowerRow(); - Standard_Integer ix, iy, iz; - Standard_Integer mylast = myfirst+Nlignes-1; - Standard_Integer k1; - Standard_Real taf1 = 0.0, taf2 = 0.0, taf3 = 0.0, - tab1 = 0.0, tab2 = 0.0; - Standard_Integer nb, inc, jinit, jfin, u; - Standard_Integer indexdeb, indexfin; - Standard_Integer NA1 = NA-1; - Standard_Real v1=0, v2=0, b; - Standard_Real Ai2, Aid, Akj; - math_Vector myB(myfirst, mylast, 0.0), - myV1(myfirst, mylast, 0.0), - myV2(myfirst, mylast, 0.0); - math_Vector TheV1(1, Ninc, 0.0), TheV2(1, Ninc, 0.0); - - - for (i = FirstP; i <= LastP; i++) { - Ai2 = A(i, 2); - Aid = A(i, nbpoles-1); - if (FirstConstraint >= AppParCurves_PassPoint) xx = A(i, 1); - if (FirstConstraint >= AppParCurves_TangencyPoint) xx += Ai2; - if (LastConstraint >= AppParCurves_PassPoint) yy = A(i, nbpoles); - if (LastConstraint >= AppParCurves_TangencyPoint) yy += Aid; - i2 = 1; - Nrow = myfirst-FirstP; - for (Ci = 1; Ci <= nbP; Ci++) { - i21 = i2+1; i22 = i2+2; - ix = i+Nrow; iy = ix+Neq; iz = iy+Neq; - if (FirstConstraint >= AppParCurves_TangencyPoint) { - myV1(ix) = Ai2*Vec1t(i2); - myV1(iy) = Ai2*Vec1t(i21); - myV1(iz) = Ai2*Vec1t(i22); - } - if (LastConstraint >= AppParCurves_TangencyPoint) { - myV2(ix) = -Aid*Vec2t(i2); - myV2(iy) = -Aid*Vec2t(i21); - myV2(iz) = -Aid*Vec2t(i22); - } - myB(ix) = mypoints(i, i2) - xx*mypoints(myfirstp, i2) - - yy*mypoints(mylastp, i2); - myB(iy) = mypoints(i, i21) - xx*mypoints(myfirstp, i21) - - yy*mypoints(mylastp, i21); - myB(iz) = mypoints(i, i22) - xx*mypoints(myfirstp, i22) - - yy*mypoints(mylastp, i22); - i2 += 3; - Nrow = Nrow + 3*Neq; - } - - for (Ci = 1; Ci <= nbP2d; Ci++) { - i21 = i2+1; i22 = i2+2; - ix = i+Nrow; iy = ix+Neq; - if (FirstConstraint >= AppParCurves_TangencyPoint) { - myV1(ix) = Ai2*Vec1t(i2); - myV1(iy) = Ai2*Vec1t(i21); - } - if (LastConstraint >= AppParCurves_TangencyPoint) { - myV2(ix) = -Aid*Vec2t(i2); - myV2(iy) = -Aid*Vec2t(i21); - } - myB(ix) = mypoints(i, i2) - xx*mypoints(myfirstp, i2) - - yy*mypoints(mylastp, i2); - myB(iy) = mypoints(i, i21) - xx*mypoints(myfirstp, i21) - - yy*mypoints(mylastp, i21); - Nrow = Nrow + 2*Neq; - i2 += 2; - } - } - - - - // Construction de TA*A et TA*B: - - for (k = FirstP; k <= LastP; k++) { - indexdeb = myindex(k)+1; - indexfin = indexdeb + deg; - jinit = Max(resinit, indexdeb); - jfin = Min(resfin, indexfin); - k1 = k + myfirst - FirstP; - for (i = 0; i <= NA1; i++) { - nb = i*Neq + k1; - if (FirstConstraint >= AppParCurves_TangencyPoint) - v1 = myV1(nb); - if (LastConstraint >= AppParCurves_TangencyPoint) - v2 = myV2(nb); - b = myB(nb); - inc = i*Nincx-resinit+1; - for (j = jinit; j <= jfin; j++) { - Akj = A(k, j); - u = j+inc; - if (FirstConstraint >= AppParCurves_TangencyPoint) - TheV1(u) += Akj*v1; - if (LastConstraint >= AppParCurves_TangencyPoint) - TheV2(u) += Akj*v2; - myTAB(u) += Akj*b; - } - if (FirstConstraint >= AppParCurves_TangencyPoint) { - taf1 += v1*v1; - tab1 += v1*b; - } - if (LastConstraint >= AppParCurves_TangencyPoint) { - taf2 += v2*v2; - tab2 += v2*b; - } - if (FirstConstraint >= AppParCurves_TangencyPoint && - LastConstraint >= AppParCurves_TangencyPoint) { - taf3 += v1*v2; - } - } - } - - - if (FirstConstraint >= AppParCurves_TangencyPoint) { - TheV1(Ninc1) = taf1; - myTAB(Ninc1) = tab1; - } - if (LastConstraint >= AppParCurves_TangencyPoint) { - TheV2(Ninc) = taf2; - myTAB(Ninc) = tab2; - } - if (FirstConstraint >= AppParCurves_TangencyPoint && - LastConstraint >= AppParCurves_TangencyPoint) { - TheV2(Ninc1) = taf3; - } - - - if (resinit <= resfin) { - math_IntegerVector Index(1, Nincx); - SearchIndex(Index); - math_Vector AA(1, Index(Nincx)); - MakeTAA(AA); - - Standard_Integer kk = 1; - for (k = 1; k <= NA; k++) { - for(i = 1; i <= AA.Length(); i++) { - TheA(kk) = AA(i); - kk++; - } - } - } - - Standard_Integer length = TheA.Length(); - - if (FirstConstraint >= AppParCurves_TangencyPoint && - LastConstraint >= AppParCurves_TangencyPoint) { - for (j = 1; j <= Ninc1; j++) - TheA(length- 2*Ninc+j+1) = TheV1(j); - for (j = 1; j <= Ninc; j++) - TheA(length- Ninc+j) = TheV2(j); - } - - - else if (FirstConstraint >= AppParCurves_TangencyPoint) { - for (j = 1; j <= Ninc; j++) - TheA(length- Ninc+j) = TheV1(j); - } - - else if (LastConstraint >= AppParCurves_TangencyPoint) { - for (j = 1; j <= Ninc; j++) - TheA(length- Ninc+j) = TheV2(j); - } -} - - - - -void AppParCurves_LeastSquare::MakeTAA(math_Vector& AA, - math_Matrix& myTAB) -{ - Standard_Integer i, j, k; - Standard_Integer indexdeb, indexfin, jinit, jfin; - Standard_Integer iinit, ifin; - Standard_Real Akj; - math_Matrix TheA(resinit, resfin, resinit, resfin); - TheA.Init(0.0); - - for (k = FirstP ; k <= LastP; k++) { - indexdeb = myindex(k)+1; - indexfin = indexdeb + deg; - jinit = Max(resinit, indexdeb); - jfin = Min(resfin, indexfin); - for (i = jinit; i <= jfin; i++) { - Akj = A(k, i); - for (j = jinit; j <= i; j++) { - TheA(i, j) += A(k, j) * Akj; - } - for (j = 1; j <= B2.ColNumber(); j++) { - myTAB(i, j) += Akj*B2(k, j); - } - } - } - - Standard_Integer len; - if (!myknots.IsNull()) len = myknots->Length(); - else len = 2; - Standard_Integer d, i2 = 1; - iinit = resinit; - jinit = resinit; - ifin = Min(resfin, deg+1); - for (k = 2; k <= len; k++) { - for (i = iinit; i <= ifin; i++) { - for (j = jinit; j <= i; j++) { - AA(i2) = TheA(i, j); - i2++; - } - } - if (!mymults.IsNull()) { - iinit = ifin+1; - d = ifin + mymults->Value(k); - ifin = Min(d, resfin); - jinit = Max(resinit, d - deg); - } - } -} - - -void AppParCurves_LeastSquare::MakeTAA(math_Vector& AA) -{ - Standard_Integer i, j, k; - Standard_Integer indexdeb, indexfin, jinit, jfin; - Standard_Integer iinit, ifin; - Standard_Real Akj; - math_Matrix TheA(resinit, resfin, resinit, resfin, 0.0); - - - for (k = FirstP ; k <= LastP; k++) { - indexdeb = myindex(k)+1; - indexfin = indexdeb + deg; - jinit = Max(resinit, indexdeb); - jfin = Min(resfin, indexfin); - for (i = jinit; i <= jfin; i++) { - Akj = A(k, i); - for (j = jinit; j <= i; j++) { - TheA(i, j) += A(k, j) * Akj; - } - } - } - - - Standard_Integer i2 = 1; - iinit = resinit; - jinit = resinit; - ifin = Min(resfin, deg+1); - Standard_Integer len, d; - if (!myknots.IsNull()) len = myknots->Length(); - else len = 2; - for (k = 2; k <= len; k++) { - for (i = iinit; i <= ifin; i++) { - for (j = jinit; j <= i; j++) { - AA(i2) = TheA(i, j); - i2++; - } - } - if (!mymults.IsNull()) { - iinit = ifin+1; - d = ifin + mymults->Value(k); - ifin = Min(d, resfin); - jinit = Max(resinit, d - deg); - } - } - -} - - - -void AppParCurves_LeastSquare::SearchIndex(math_IntegerVector& Index) -{ - Standard_Integer iinit, jinit, ifin; - Standard_Integer i, j, k, d, i2 = 1; - Standard_Integer len; - Standard_Integer Nincx = resfin-resinit+1; - Index(1) = 1; - - if (myknots.IsNull()) { - if (resinit <= resfin) { - Standard_Integer l = 1; - for (i = 2; i <= Nincx; i++) { - l++; - Index(l) = Index(l-1)+i; - } - } - - } - else { - iinit = resinit; - jinit = resinit; - ifin = Min(resfin, deg+1); - len = myknots->Length(); - - for (k = 2; k <= len; k++) { - for (i = iinit; i <= ifin; i++) { - for (j = jinit; j <= i; j++) { - if (i2 != 1) - Index(i2) = Index(i2-1) + i-jinit+1; - } - i2++; - } - iinit = ifin+1; - d = ifin + mymults->Value(k); - ifin = Min(d, resfin); - jinit = Max(resinit, d - deg); - } - } -} diff --git a/opencascade/AppParCurves_MultiBSpCurve.hxx b/opencascade/AppParCurves_MultiBSpCurve.hxx index ce7d30df1..ed65876a7 100644 --- a/opencascade/AppParCurves_MultiBSpCurve.hxx +++ b/opencascade/AppParCurves_MultiBSpCurve.hxx @@ -34,7 +34,6 @@ class gp_Pnt2d; class gp_Vec; class gp_Vec2d; - //! This class describes a MultiBSpCurve approximating a Multiline. //! Just as a Multiline is a set of a given number of lines, a MultiBSpCurve is a set //! of a specified number of bsplines defined by: @@ -58,113 +57,114 @@ class gp_Vec2d; //! MultiBSpCurves are created by the SplineValue method in the ComputeLine //! class, and by the Value method in TheVariational class. MultiBSpCurve //! provides the information required to create the BSpline defined by the approximation. -class AppParCurves_MultiBSpCurve : public AppParCurves_MultiCurve +class AppParCurves_MultiBSpCurve : public AppParCurves_MultiCurve { public: - DEFINE_STANDARD_ALLOC - //! returns an indefinite MultiBSpCurve. Standard_EXPORT AppParCurves_MultiBSpCurve(); - + //! creates a MultiBSpCurve, describing BSpline curves all //! containing the same number of MultiPoint. //! An exception is raised if Degree < 0. Standard_EXPORT AppParCurves_MultiBSpCurve(const Standard_Integer NbPol); - + //! creates a MultiBSpCurve, describing BSpline curves all //! containing the same number of MultiPoint. //! Each MultiPoint must have NbCurves Poles. - Standard_EXPORT AppParCurves_MultiBSpCurve(const AppParCurves_Array1OfMultiPoint& tabMU, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults); - + Standard_EXPORT AppParCurves_MultiBSpCurve(const AppParCurves_Array1OfMultiPoint& tabMU, + const TColStd_Array1OfReal& Knots, + const TColStd_Array1OfInteger& Mults); + //! creates a MultiBSpCurve, describing BSpline //! curves, taking control points from . - Standard_EXPORT AppParCurves_MultiBSpCurve(const AppParCurves_MultiCurve& SC, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults); - + Standard_EXPORT AppParCurves_MultiBSpCurve(const AppParCurves_MultiCurve& SC, + const TColStd_Array1OfReal& Knots, + const TColStd_Array1OfInteger& Mults); + //! Knots of the multiBSpCurve are assigned to . - Standard_EXPORT void SetKnots (const TColStd_Array1OfReal& theKnots); - + Standard_EXPORT void SetKnots(const TColStd_Array1OfReal& theKnots); + //! Multiplicities of the multiBSpCurve are assigned //! to . - Standard_EXPORT void SetMultiplicities (const TColStd_Array1OfInteger& theMults); - + Standard_EXPORT void SetMultiplicities(const TColStd_Array1OfInteger& theMults); + //! Returns an array of Reals containing //! the multiplicities of curves resulting from the approximation. Standard_EXPORT const TColStd_Array1OfReal& Knots() const; - + //! Returns an array of Reals containing the //! multiplicities of curves resulting from the approximation. Standard_EXPORT const TColStd_Array1OfInteger& Multiplicities() const; - + //! returns the degree of the curve(s). Standard_EXPORT virtual Standard_Integer Degree() const Standard_OVERRIDE; - + //! returns the value of the point with a parameter U //! on the BSpline curve number CuIndex. //! An exception is raised if CuIndex <0 or > NbCurves. //! An exception is raised if the curve dimension is 2d. - Standard_EXPORT virtual void Value (const Standard_Integer CuIndex, const Standard_Real U, gp_Pnt& Pt) const Standard_OVERRIDE; - + Standard_EXPORT virtual void Value(const Standard_Integer CuIndex, + const Standard_Real U, + gp_Pnt& Pt) const Standard_OVERRIDE; + //! returns the value of the point with a parameter U //! on the BSpline curve number CuIndex. //! An exception is raised if CuIndex <0 or > NbCurves. //! An exception is raised if the curve dimension is 3d. - Standard_EXPORT virtual void Value (const Standard_Integer CuIndex, const Standard_Real U, gp_Pnt2d& Pt) const Standard_OVERRIDE; - + Standard_EXPORT virtual void Value(const Standard_Integer CuIndex, + const Standard_Real U, + gp_Pnt2d& Pt) const Standard_OVERRIDE; + //! returns the value of the point with a parameter U //! on the BSpline curve number CuIndex. //! An exception is raised if CuIndex <0 or > NbCurves. //! An exception is raised if the curve dimension is 3d. - Standard_EXPORT virtual void D1 (const Standard_Integer CuIndex, const Standard_Real U, gp_Pnt& Pt, gp_Vec& V1) const Standard_OVERRIDE; - + Standard_EXPORT virtual void D1(const Standard_Integer CuIndex, + const Standard_Real U, + gp_Pnt& Pt, + gp_Vec& V1) const Standard_OVERRIDE; + //! returns the value of the point with a parameter U //! on the BSpline curve number CuIndex. //! An exception is raised if CuIndex <0 or > NbCurves. //! An exception is raised if the curve dimension is 2d. - Standard_EXPORT virtual void D1 (const Standard_Integer CuIndex, const Standard_Real U, gp_Pnt2d& Pt, gp_Vec2d& V1) const Standard_OVERRIDE; - + Standard_EXPORT virtual void D1(const Standard_Integer CuIndex, + const Standard_Real U, + gp_Pnt2d& Pt, + gp_Vec2d& V1) const Standard_OVERRIDE; + //! returns the value of the point with a parameter U //! on the BSpline curve number CuIndex. //! An exception is raised if CuIndex <0 or > NbCurves. //! An exception is raised if the curve dimension is 3d. - Standard_EXPORT virtual void D2 (const Standard_Integer CuIndex, const Standard_Real U, gp_Pnt& Pt, gp_Vec& V1, gp_Vec& V2) const Standard_OVERRIDE; - + Standard_EXPORT virtual void D2(const Standard_Integer CuIndex, + const Standard_Real U, + gp_Pnt& Pt, + gp_Vec& V1, + gp_Vec& V2) const Standard_OVERRIDE; + //! returns the value of the point with a parameter U //! on the BSpline curve number CuIndex. //! An exception is raised if CuIndex <0 or > NbCurves. //! An exception is raised if the curve dimension is 2d. - Standard_EXPORT virtual void D2 (const Standard_Integer CuIndex, const Standard_Real U, gp_Pnt2d& Pt, gp_Vec2d& V1, gp_Vec2d& V2) const Standard_OVERRIDE; - + Standard_EXPORT virtual void D2(const Standard_Integer CuIndex, + const Standard_Real U, + gp_Pnt2d& Pt, + gp_Vec2d& V1, + gp_Vec2d& V2) const Standard_OVERRIDE; + //! Prints on the stream o information on the current //! state of the object. //! Is used to redefine the operator <<. - Standard_EXPORT virtual void Dump (Standard_OStream& o) const Standard_OVERRIDE; - - - + Standard_EXPORT virtual void Dump(Standard_OStream& o) const Standard_OVERRIDE; protected: - - - - - private: - - - - Handle(TColStd_HArray1OfReal) myknots; + Handle(TColStd_HArray1OfReal) myknots; Handle(TColStd_HArray1OfInteger) mymults; - Standard_Integer myDegree; - - + Standard_Integer myDegree; }; - - - - - - #endif // _AppParCurves_MultiBSpCurve_HeaderFile diff --git a/opencascade/AppParCurves_MultiCurve.hxx b/opencascade/AppParCurves_MultiCurve.hxx index 9d81f0392..e458954b7 100644 --- a/opencascade/AppParCurves_MultiCurve.hxx +++ b/opencascade/AppParCurves_MultiCurve.hxx @@ -34,7 +34,6 @@ class gp_Pnt2d; class gp_Vec; class gp_Vec2d; - //! This class describes a MultiCurve approximating a Multiline. //! As a Multiline is a set of n lines, a MultiCurve is a set //! of n curves. These curves are Bezier curves. @@ -56,148 +55,159 @@ class gp_Vec2d; //! //! (Pi, Qi, ...Ri), i= 1,...NbPoles are MultiPoints. //! each MultiPoint has got NbPol Poles. -class AppParCurves_MultiCurve +class AppParCurves_MultiCurve { public: - DEFINE_STANDARD_ALLOC - //! returns an indefinite MultiCurve. Standard_EXPORT AppParCurves_MultiCurve(); - + //! creates a MultiCurve, describing Bezier curves all //! containing the same number of MultiPoint. //! An exception is raised if Degree < 0. Standard_EXPORT AppParCurves_MultiCurve(const Standard_Integer NbPol); - + //! creates a MultiCurve, describing Bezier curves all //! containing the same number of MultiPoint. //! Each MultiPoint must have NbCurves Poles. Standard_EXPORT AppParCurves_MultiCurve(const AppParCurves_Array1OfMultiPoint& tabMU); Standard_EXPORT virtual ~AppParCurves_MultiCurve(); - + //! The number of poles of the MultiCurve //! will be set to . - Standard_EXPORT void SetNbPoles (const Standard_Integer nbPoles); - + Standard_EXPORT void SetNbPoles(const Standard_Integer nbPoles); + //! sets the MultiPoint of range Index to the value //! . //! An exception is raised if Index <0 or Index >NbMPoint. - Standard_EXPORT void SetValue (const Standard_Integer Index, const AppParCurves_MultiPoint& MPoint); - + Standard_EXPORT void SetValue(const Standard_Integer Index, + const AppParCurves_MultiPoint& MPoint); + //! Returns the number of curves resulting from the //! approximation of a MultiLine. Standard_EXPORT Standard_Integer NbCurves() const; - + //! Returns the number of poles on curves resulting from the approximation of a MultiLine. Standard_EXPORT virtual Standard_Integer NbPoles() const; - + //! returns the degree of the curves. Standard_EXPORT virtual Standard_Integer Degree() const; - + //! returns the dimension of the CuIndex curve. //! An exception is raised if CuIndex<0 or CuIndex>NbCurves. - Standard_EXPORT Standard_Integer Dimension (const Standard_Integer CuIndex) const; - + Standard_EXPORT Standard_Integer Dimension(const Standard_Integer CuIndex) const; + //! returns the Pole array of the curve of range CuIndex. //! An exception is raised if the dimension of the curve //! is 2d. - Standard_EXPORT void Curve (const Standard_Integer CuIndex, TColgp_Array1OfPnt& TabPnt) const; - + Standard_EXPORT void Curve(const Standard_Integer CuIndex, TColgp_Array1OfPnt& TabPnt) const; + //! returns the Pole array of the curve of range CuIndex. //! An exception is raised if the dimension of the curve //! is 3d. - Standard_EXPORT void Curve (const Standard_Integer CuIndex, TColgp_Array1OfPnt2d& TabPnt) const; - + Standard_EXPORT void Curve(const Standard_Integer CuIndex, TColgp_Array1OfPnt2d& TabPnt) const; + //! returns the Index MultiPoint. //! An exception is raised if Index <0 or Index >Degree+1. - Standard_EXPORT const AppParCurves_MultiPoint& Value (const Standard_Integer Index) const; - + Standard_EXPORT const AppParCurves_MultiPoint& Value(const Standard_Integer Index) const; + //! returns the Nieme pole of the CuIndex curve. //! the curve must be a 3D curve. - Standard_EXPORT const gp_Pnt& Pole (const Standard_Integer CuIndex, const Standard_Integer Nieme) const; - + Standard_EXPORT const gp_Pnt& Pole(const Standard_Integer CuIndex, + const Standard_Integer Nieme) const; + //! returns the Nieme pole of the CuIndex curve. //! the curve must be a 2D curve. - Standard_EXPORT const gp_Pnt2d& Pole2d (const Standard_Integer CuIndex, const Standard_Integer Nieme) const; - + Standard_EXPORT const gp_Pnt2d& Pole2d(const Standard_Integer CuIndex, + const Standard_Integer Nieme) const; + //! Applies a transformation to the curve of range //! . //! newx = x + dx*oldx //! newy = y + dy*oldy for all points of the curve. //! newz = z + dz*oldz - Standard_EXPORT void Transform (const Standard_Integer CuIndex, const Standard_Real x, const Standard_Real dx, const Standard_Real y, const Standard_Real dy, const Standard_Real z, const Standard_Real dz); - + Standard_EXPORT void Transform(const Standard_Integer CuIndex, + const Standard_Real x, + const Standard_Real dx, + const Standard_Real y, + const Standard_Real dy, + const Standard_Real z, + const Standard_Real dz); + //! Applies a transformation to the Curve of range //! . //! newx = x + dx*oldx //! newy = y + dy*oldy for all points of the curve. - Standard_EXPORT void Transform2d (const Standard_Integer CuIndex, const Standard_Real x, const Standard_Real dx, const Standard_Real y, const Standard_Real dy); - + Standard_EXPORT void Transform2d(const Standard_Integer CuIndex, + const Standard_Real x, + const Standard_Real dx, + const Standard_Real y, + const Standard_Real dy); + //! returns the value of the point with a parameter U //! on the Bezier curve number CuIndex. //! An exception is raised if CuIndex <0 or > NbCurves. //! An exception is raised if the curve dimension is 2d. - Standard_EXPORT virtual void Value (const Standard_Integer CuIndex, const Standard_Real U, gp_Pnt& Pt) const; - + Standard_EXPORT virtual void Value(const Standard_Integer CuIndex, + const Standard_Real U, + gp_Pnt& Pt) const; + //! returns the value of the point with a parameter U //! on the Bezier curve number CuIndex. //! An exception is raised if CuIndex <0 or > NbCurves. //! An exception is raised if the curve dimension is 3d. - Standard_EXPORT virtual void Value (const Standard_Integer CuIndex, const Standard_Real U, gp_Pnt2d& Pt) const; - + Standard_EXPORT virtual void Value(const Standard_Integer CuIndex, + const Standard_Real U, + gp_Pnt2d& Pt) const; + //! returns the value of the point with a parameter U //! on the Bezier curve number CuIndex. //! An exception is raised if CuIndex <0 or > NbCurves. //! An exception is raised if the curve dimension is 3d. - Standard_EXPORT virtual void D1 (const Standard_Integer CuIndex, const Standard_Real U, gp_Pnt& Pt, gp_Vec& V1) const; - + Standard_EXPORT virtual void D1(const Standard_Integer CuIndex, + const Standard_Real U, + gp_Pnt& Pt, + gp_Vec& V1) const; + //! returns the value of the point with a parameter U //! on the Bezier curve number CuIndex. //! An exception is raised if CuIndex <0 or > NbCurves. //! An exception is raised if the curve dimension is 2d. - Standard_EXPORT virtual void D1 (const Standard_Integer CuIndex, const Standard_Real U, gp_Pnt2d& Pt, gp_Vec2d& V1) const; - + Standard_EXPORT virtual void D1(const Standard_Integer CuIndex, + const Standard_Real U, + gp_Pnt2d& Pt, + gp_Vec2d& V1) const; + //! returns the value of the point with a parameter U //! on the Bezier curve number CuIndex. //! An exception is raised if CuIndex <0 or > NbCurves. //! An exception is raised if the curve dimension is 3d. - Standard_EXPORT virtual void D2 (const Standard_Integer CuIndex, const Standard_Real U, gp_Pnt& Pt, gp_Vec& V1, gp_Vec& V2) const; - + Standard_EXPORT virtual void D2(const Standard_Integer CuIndex, + const Standard_Real U, + gp_Pnt& Pt, + gp_Vec& V1, + gp_Vec& V2) const; + //! returns the value of the point with a parameter U //! on the Bezier curve number CuIndex. //! An exception is raised if CuIndex <0 or > NbCurves. //! An exception is raised if the curve dimension is 2d. - Standard_EXPORT virtual void D2 (const Standard_Integer CuIndex, const Standard_Real U, gp_Pnt2d& Pt, gp_Vec2d& V1, gp_Vec2d& V2) const; - + Standard_EXPORT virtual void D2(const Standard_Integer CuIndex, + const Standard_Real U, + gp_Pnt2d& Pt, + gp_Vec2d& V1, + gp_Vec2d& V2) const; + //! Prints on the stream o information on the current //! state of the object. //! Is used to redefine the operator <<. - Standard_EXPORT virtual void Dump (Standard_OStream& o) const; - - - + Standard_EXPORT virtual void Dump(Standard_OStream& o) const; protected: - - - Handle(AppParCurves_HArray1OfMultiPoint) tabPoint; - private: - - - - - }; - - - - - - #endif // _AppParCurves_MultiCurve_HeaderFile diff --git a/opencascade/AppParCurves_MultiPoint.hxx b/opencascade/AppParCurves_MultiPoint.hxx index f1194f135..868ad2603 100644 --- a/opencascade/AppParCurves_MultiPoint.hxx +++ b/opencascade/AppParCurves_MultiPoint.hxx @@ -30,120 +30,112 @@ class Standard_Transient; class gp_Pnt; class gp_Pnt2d; - //! This class describes Points composing a MultiPoint. //! These points can be 2D or 3D. The user must first give the //! 3D Points and then the 2D Points. //! They are Poles of a Bezier Curve. //! This class is used either to define data input or //! results when performing the approximation of several lines in parallel. -class AppParCurves_MultiPoint +class AppParCurves_MultiPoint { public: - DEFINE_STANDARD_ALLOC - //! creates an indefinite MultiPoint. Standard_EXPORT AppParCurves_MultiPoint(); - + //! constructs a set of Points used to approximate a //! Multiline. //! These Points can be of 2 or 3 dimensions. //! Points will be initialized with SetPoint and SetPoint2d. //! NbPoints is the number of 3D Points. //! NbPoints2d is the number of 2D Points. - Standard_EXPORT AppParCurves_MultiPoint(const Standard_Integer NbPoints, const Standard_Integer NbPoints2d); - + Standard_EXPORT AppParCurves_MultiPoint(const Standard_Integer NbPoints, + const Standard_Integer NbPoints2d); + //! creates a MultiPoint only composed of 3D points. Standard_EXPORT AppParCurves_MultiPoint(const TColgp_Array1OfPnt& tabP); - + //! creates a MultiPoint only composed of 2D points. Standard_EXPORT AppParCurves_MultiPoint(const TColgp_Array1OfPnt2d& tabP2d); - + //! constructs a set of Points used to approximate a //! Multiline. //! These Points can be of 2 or 3 dimensions. //! Points will be initialized with SetPoint and SetPoint2d. //! NbPoints is the total number of Points. - Standard_EXPORT AppParCurves_MultiPoint(const TColgp_Array1OfPnt& tabP, const TColgp_Array1OfPnt2d& tabP2d); + Standard_EXPORT AppParCurves_MultiPoint(const TColgp_Array1OfPnt& tabP, + const TColgp_Array1OfPnt2d& tabP2d); Standard_EXPORT virtual ~AppParCurves_MultiPoint(); - + //! the 3d Point of range Index of this MultiPoint is //! set to . //! An exception is raised if Index < 0 or //! Index > number of 3d Points. - Standard_EXPORT void SetPoint (const Standard_Integer Index, const gp_Pnt& Point); - + Standard_EXPORT void SetPoint(const Standard_Integer Index, const gp_Pnt& Point); + //! returns the 3d Point of range Index. //! An exception is raised if Index < 0 or //! Index < number of 3d Points. - Standard_EXPORT const gp_Pnt& Point (const Standard_Integer Index) const; - + Standard_EXPORT const gp_Pnt& Point(const Standard_Integer Index) const; + //! The 2d Point of range Index is set to . //! An exception is raised if Index > 3d Points or //! Index > total number of Points. - Standard_EXPORT void SetPoint2d (const Standard_Integer Index, const gp_Pnt2d& Point); - + Standard_EXPORT void SetPoint2d(const Standard_Integer Index, const gp_Pnt2d& Point); + //! returns the 2d Point of range Index. //! An exception is raised if index <= number of //! 3d Points or Index > total number of Points. - Standard_EXPORT const gp_Pnt2d& Point2d (const Standard_Integer Index) const; - + Standard_EXPORT const gp_Pnt2d& Point2d(const Standard_Integer Index) const; + //! returns the dimension of the point of range Index. //! An exception is raised if Index <0 or Index > NbCurves. - Standard_Integer Dimension (const Standard_Integer Index) const; - + Standard_Integer Dimension(const Standard_Integer Index) const; + //! returns the number of points of dimension 3D. - Standard_Integer NbPoints() const; - + Standard_Integer NbPoints() const; + //! returns the number of points of dimension 2D. - Standard_Integer NbPoints2d() const; - + Standard_Integer NbPoints2d() const; + //! Applies a transformation to the curve of range //! . //! newx = x + dx*oldx //! newy = y + dy*oldy for all points of the curve. //! newz = z + dz*oldz - Standard_EXPORT void Transform (const Standard_Integer CuIndex, const Standard_Real x, const Standard_Real dx, const Standard_Real y, const Standard_Real dy, const Standard_Real z, const Standard_Real dz); - + Standard_EXPORT void Transform(const Standard_Integer CuIndex, + const Standard_Real x, + const Standard_Real dx, + const Standard_Real y, + const Standard_Real dy, + const Standard_Real z, + const Standard_Real dz); + //! Applies a transformation to the Curve of range //! . //! newx = x + dx*oldx //! newy = y + dy*oldy for all points of the curve. - Standard_EXPORT void Transform2d (const Standard_Integer CuIndex, const Standard_Real x, const Standard_Real dx, const Standard_Real y, const Standard_Real dy); - + Standard_EXPORT void Transform2d(const Standard_Integer CuIndex, + const Standard_Real x, + const Standard_Real dx, + const Standard_Real y, + const Standard_Real dy); + //! Prints on the stream o information on the current //! state of the object. //! Is used to redefine the operator <<. - Standard_EXPORT virtual void Dump (Standard_OStream& o) const; - - - + Standard_EXPORT virtual void Dump(Standard_OStream& o) const; protected: - - - Handle(Standard_Transient) ttabPoint; Handle(Standard_Transient) ttabPoint2d; - Standard_Integer nbP; - Standard_Integer nbP2d; - + Standard_Integer nbP; + Standard_Integer nbP2d; private: - - - - - }; - #include - - - - #endif // _AppParCurves_MultiPoint_HeaderFile diff --git a/opencascade/AppParCurves_MultiPoint.lxx b/opencascade/AppParCurves_MultiPoint.lxx index 3654130da..d3451112e 100644 --- a/opencascade/AppParCurves_MultiPoint.lxx +++ b/opencascade/AppParCurves_MultiPoint.lxx @@ -16,37 +16,34 @@ #include #include - - -inline Standard_OStream& operator<<(Standard_OStream& o, - const AppParCurves_MultiPoint& M) +inline Standard_OStream& operator<<(Standard_OStream& o, const AppParCurves_MultiPoint& M) { M.Dump(o); return o; } - - -inline Standard_Integer AppParCurves_MultiPoint::NbPoints() const { +inline Standard_Integer AppParCurves_MultiPoint::NbPoints() const +{ return nbP; } - -inline Standard_Integer AppParCurves_MultiPoint::NbPoints2d() const { +inline Standard_Integer AppParCurves_MultiPoint::NbPoints2d() const +{ return nbP2d; } - inline Standard_Integer AppParCurves_MultiPoint::Dimension(const Standard_Integer Index) const { - if (Index < 0 || Index > (nbP + nbP2d)) { + if (Index < 0 || Index > (nbP + nbP2d)) + { throw Standard_OutOfRange(); } - if (Index <= nbP) { + if (Index <= nbP) + { return 3; } - else { + else + { return 2; } } - diff --git a/opencascade/AppParCurves_ResolConstraint.gxx b/opencascade/AppParCurves_ResolConstraint.gxx deleted file mode 100644 index ec123cb62..000000000 --- a/opencascade/AppParCurves_ResolConstraint.gxx +++ /dev/null @@ -1,865 +0,0 @@ -// Copyright (c) 1995-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -// lpa, le 11/09/91 - - -// Approximation d un ensemble de points contraints (MultiLine) avec une -// solution approchee (MultiCurve). L algorithme utilise est l algorithme -// d Uzawa du package mathematique. - -#define No_Standard_RangeError -#define No_Standard_OutOfRange - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -AppParCurves_ResolConstraint:: - AppParCurves_ResolConstraint(const MultiLine& SSP, - AppParCurves_MultiCurve& SCurv, - const Standard_Integer FirstPoint, - const Standard_Integer LastPoint, - const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, - const math_Matrix& Bern, - const math_Matrix& DerivativeBern, - const Standard_Real Tolerance): - Cont(1, NbConstraints(SSP, FirstPoint, - LastPoint, TheConstraints), - 1, NbColumns(SSP, SCurv.NbPoles()-1), 0.0), - DeCont(1, NbConstraints(SSP, FirstPoint, - LastPoint, TheConstraints), - 1, NbColumns(SSP, SCurv.NbPoles()-1), 0.0), - Secont(1, NbConstraints(SSP, FirstPoint, - LastPoint, TheConstraints), 0.0), - CTCinv(1, NbConstraints(SSP, FirstPoint, - LastPoint, TheConstraints), - 1, NbConstraints(SSP, FirstPoint, - LastPoint, TheConstraints)), - Vardua(1, NbConstraints(SSP, FirstPoint, - LastPoint, TheConstraints)), - IPas(1, LastPoint-FirstPoint+1), - ITan(1, LastPoint-FirstPoint+1), - ICurv(1, LastPoint-FirstPoint+1) - { - Standard_Integer i, j, k, NbCu= SCurv.NbCurves(); - Standard_Integer Npt; - Standard_Integer Inc3, IncSec, IncCol, IP = 0, CCol; - Standard_Integer myindex, Def = SCurv.NbPoles()-1; - Standard_Integer nb3d, nb2d, Npol= Def+1, Npol2 = 2*Npol; - Standard_Real T1 = 0., T2 = 0., T3, Tmax, Daij; - gp_Vec V; - gp_Vec2d V2d; - gp_Pnt Poi; - gp_Pnt2d Poi2d; - AppParCurves_ConstraintCouple mycouple; - AppParCurves_Constraint FC = AppParCurves_NoConstraint, - LC = AppParCurves_NoConstraint, Cons; - - - - // Boucle de calcul du nombre de points de passage afin de dimensionner - // les matrices. - IncPass = 0; - IncTan = 0; - IncCurv = 0; - for (i = TheConstraints->Lower(); i <= TheConstraints->Upper(); i++) { - mycouple = TheConstraints->Value(i); - myindex = mycouple.Index(); - Cons = mycouple.Constraint(); - if (myindex == FirstPoint) FC = Cons; - if (myindex == LastPoint) LC = Cons; - if (Cons >= 1) { - IncPass++; // IncPass = nbre de points de passage. - IPas(IncPass) = myindex; - } - if (Cons >= 2) { - IncTan++; // IncTan= nbre de points de tangence. - ITan(IncTan) = myindex; - } - if (Cons == 3) { - IncCurv++; // IncCurv = nbre de pts de courbure. - ICurv(IncCurv) = myindex; - } - } - - - if (IncPass == 0) { - Done = Standard_True; - return; - } - - nb3d = ToolLine::NbP3d(SSP); - nb2d = ToolLine::NbP2d(SSP); - Standard_Integer mynb3d=nb3d, mynb2d=nb2d; - if (nb3d == 0) mynb3d = 1; - if (nb2d == 0) mynb2d = 1; - CCol = nb3d* 3 + nb2d* 2; - - - // Declaration et initialisation des matrices et vecteurs de contraintes: - math_Matrix ContInit(1, IncPass, 1, Npol); - math_Vector Start(1, CCol*Npol); - TColStd_Array2OfInteger Ibont(1, NbCu, 1, IncTan); - - - // Remplissage de Cont pour les points de passage: - // ================================================= - for (i =1; i <= IncPass; i++) { // Cette partie ne depend que de Bernstein - Npt = IPas(i); - for (j = 1; j <= Npol; j++) { - ContInit(i, j) = Bern(Npt, j); - } - } - for (i = 1; i <= CCol; i++) { - Cont.Set(IncPass*(i-1)+1, IncPass*i, Npol*(i-1)+1, Npol*i, ContInit); - } - - -// recuperation des vecteurs de depart pour Uzawa. Ce vecteur represente les -// poles de SCurv. -// Remplissage de secont et resolution. - - TColgp_Array1OfVec tabV(1, mynb3d); - TColgp_Array1OfVec2d tabV2d(1, mynb2d); - TColgp_Array1OfPnt tabP(1, mynb3d); - TColgp_Array1OfPnt2d tabP2d(1, mynb2d); - - Inc3 = CCol*IncPass +1; - IncCol = 0; - IncSec = 0; - for (k = 1; k <= NbCu; k++) { - if (k <= nb3d) { - for (i = 1; i <= IncTan; i++) { - Npt = ITan(i); - // choix du maximum de tangence pour exprimer la colinearite: - ToolLine::Tangency(SSP, Npt, tabV); - V = tabV(k); - V.Coord(T1, T2, T3); - Tmax = Abs(T1); - Ibont(k, i) = 1; - if (Abs(T2) > Tmax) { - Tmax = Abs(T2); - Ibont(k, i) = 2; - } - if (Abs(T3) > Tmax) { - Tmax = Abs(T3); - Ibont(k, i) = 3; - } - if (Ibont(k, i) == 3) { - for (j = 1; j <= Npol; j++) { - Daij = DerivativeBern(Npt, j); - Cont(Inc3, j+ Npol + IncCol) = Daij*T3/Tmax; - Cont(Inc3, j + Npol2 + IncCol) = -Daij *T2/Tmax; - Cont(Inc3+1, j+ IncCol) = Daij* T3/Tmax; - Cont(Inc3+1, j+ Npol2 + IncCol) = -Daij*T1/Tmax; - } - } - else if (Ibont(k, i) == 1) { - for (j = 1; j <= Npol; j++) { - Daij = DerivativeBern(Npt, j); - Cont(Inc3, j + IncCol) = Daij*T3/Tmax; - Cont(Inc3, j + Npol2 + IncCol) = -Daij *T1/Tmax; - Cont(Inc3+1, j+ IncCol) = Daij* T2/Tmax; - Cont(Inc3+1, j+ Npol +IncCol) = -Daij*T1/Tmax; - } - } - else if (Ibont(k, i) == 2) { - for (j = 1; j <= Def+1; j++) { - Daij = DerivativeBern(Npt, j); - Cont(Inc3, j+ Npol + IncCol) = Daij*T3/Tmax; - Cont(Inc3, j + Npol2 + IncCol) = -Daij *T2/Tmax; - Cont(Inc3+1, j+ IncCol) = Daij* T2/Tmax; - Cont(Inc3+1, j+ Npol + IncCol) = -Daij*T1/Tmax; - } - } - Inc3 = Inc3 + 2; - } - - // Remplissage du second membre: - for (i = 1; i <= IncPass; i++) { - ToolLine::Value(SSP, IPas(i), tabP); - Poi = tabP(k); - Secont(i + IncSec) = Poi.X(); - Secont(i + IncPass + IncSec) = Poi.Y(); - Secont(i + 2*IncPass + IncSec) = Poi.Z(); - } - IncSec = IncSec + 3*IncPass; - - // Vecteur de depart: - for (j =1; j <= Npol; j++) { - Poi = SCurv.Value(j).Point(k); - Start(j + IncCol) = Poi.X(); - Start(j+ Npol + IncCol) = Poi.Y(); - Start(j + Npol2 + IncCol) = Poi.Z(); - } - IncCol = IncCol + 3*Npol; - } - - - else { - for (i = 1; i <= IncTan; i++) { - Npt = ITan(i); - ToolLine::Tangency(SSP, Npt, tabV2d); - V2d = tabV2d(k-nb3d); - T1 = V2d.X(); - T2 = V2d.Y(); - Tmax = Abs(T1); - Ibont(k, i) = 1; - if (Abs(T2) > Tmax) { - Tmax = Abs(T2); - Ibont(k, i) = 2; - } - for (j = 1; j <= Npol; j++) { - Daij = DerivativeBern(Npt, j); - Cont(Inc3, j + IncCol) = Daij*T2; - Cont(Inc3, j + Npol + IncCol) = -Daij*T1; - } - Inc3 = Inc3 +1; - } - - // Remplissage du second membre: - for (i = 1; i <= IncPass; i++) { - ToolLine::Value(SSP, IPas(i), tabP2d); - Poi2d = tabP2d(i-nb3d); - Secont(i + IncSec) = Poi2d.X(); - Secont(i + IncPass + IncSec) = Poi2d.Y(); - } - IncSec = IncSec + 2*IncPass; - - // Remplissage du vecteur de depart: - for (j = 1; j <= Npol; j++) { - Poi2d = SCurv.Value(j).Point2d(k); - Start(j + IncCol) = Poi2d.X(); - Start(j + Npol + IncCol) = Poi2d.Y(); - } - IncCol = IncCol + Npol2; - } - } - - // Equations exprimant le meme rapport de tangence sur chaque courbe: - // On prend les coordonnees les plus significatives. - - --Inc3; - for (i = 1; i <= IncTan; ++i) { - IncCol = 0; - Npt = ITan(i); - for (k = 1; k <= NbCu-1; ++k) { - ++Inc3; -// Initialize first relation variable (T1) - Standard_Integer addIndex_1 = 0, aVal = Ibont(k, i); - switch (aVal) - { - case 1: //T1 ~ T1x - { - if (k <= nb3d) { - ToolLine::Tangency(SSP, Npt, tabV); - V = tabV(k); - T1 = V.X(); - IP = 3 * Npol; - } - else { - ToolLine::Tangency(SSP, Npt, tabV2d); - V2d = tabV2d(k-nb3d); - T1 = V2d.X(); - IP = 2 * Npol; - } - addIndex_1 = 0; - break; - } - case 2: //T1 ~ T1y - { - if (k <= nb3d) { - ToolLine::Tangency(SSP, Npt, tabV); - V = tabV(k); - IP = 3 * Npol; - } - else { - ToolLine::Tangency(SSP, Npt, tabV2d); - V2d = tabV2d(k-nb3d); - T1 = V2d.Y(); - IP = 2 * Npol; - } - addIndex_1 = Npol; - break; - } - case 3: //T1 ~ T1z - { - ToolLine::Tangency(SSP, Npt, tabV); - V = tabV(k); - T1 = V.Z(); - IP = 3 * Npol; - addIndex_1 = 2 * Npol; - break; - } - } - // Initialize second relation variable (T2) - Standard_Integer addIndex_2 = 0, aNextVal = Ibont(k + 1, i); - switch (aNextVal) - { - case 1: //T2 ~ T2x - { - if ((k+1) <= nb3d) { - ToolLine::Tangency(SSP, Npt, tabV); - V = tabV(k+1); - T2 = V.X(); - } - else { - ToolLine::Tangency(SSP, Npt, tabV2d); - V2d = tabV2d(k+1-nb3d); - T2 = V2d.X(); - } - addIndex_2 = 0; - break; - } - case 2: //T2 ~ T2y - { - if ((k+1) <= nb3d) { - ToolLine::Tangency(SSP, Npt, tabV); - V = tabV(k+1); - T2 = V.Y(); - } - else { - ToolLine::Tangency(SSP, Npt, tabV2d); - V2d = tabV2d(k+1-nb3d); - T2 = V2d.Y(); - } - addIndex_2 = Npol; - break; - } - case 3: //T2 ~ T2z - { - ToolLine::Tangency(SSP, Npt, tabV); - V = tabV(k+1); - T2 = V.Z(); - addIndex_2 = 2 * Npol; - break; - } - } - - // Relations between T1 and T2: - for (j = 1; j <= Npol; j++) { - Daij = DerivativeBern(Npt, j); - Cont(Inc3, j + IncCol + addIndex_1) = Daij*T2; - Cont(Inc3, j + IP + IncCol + addIndex_2) = -Daij*T1; - } - IncCol += IP; - } - } - - - - // Equations concernant la courbure: - - -/* Inc3 = Inc3 +1; - IncCol = 0; - for (k = 1; k <= NbCu; k++) { - for (i = 1; i <= IncCurv; i++) { - Npt = ICurv(i); - AppDef_MultiPointConstraint MP = SSP.Value(Npt); - DDA = SecondDerivativeBern(Parameters(Npt)); - if (SSP.Value(1).Dimension(k) == 3) { - C1 = MP.Curv(k).X(); - C2 = MP.Curv(k).Y(); - C3 = MP.Curv(k).Z(); - for (j = 1; j <= Npol; j++) { - Daij = DerivativeBern(Npt, j); - D2Aij = DDA(j); - Cont(Inc3, j + IncCol) = D2Aij; - Cont(Inc3, j + Npol2 + IncCol) = -C2*Daij; - Cont(Inc3, j + Npol + IncCol) = C3*Daij; - - Cont(Inc3+1, j + Npol + IncCol) = D2Aij; - Cont(Inc3+1, j +IncCol) = -C3*Daij; - Cont(Inc3+1, j + Npol2 + IncCol) = C1*Daij; - - Cont(Inc3+2, j + Npol2+IncCol) = D2Aij; - Cont(Inc3+2, j + Npol+IncCol) = -C1*Daij; - Cont(Inc3+2, j + IncCol) = C2*Daij; - } - Inc3 = Inc3 + 3; - } - else { // Dimension 2: - C1 = MP.Curv2d(k).X(); - C2 = MP.Curv2d(k).Y(); - for (j = 1; j <= Npol; j++) { - Daij = DerivativeBern(Npt, j); - D2Aij = DDA(j); - Cont(Inc3, j + IncCol) = D2Aij*C1; - Cont(Inc3+1, j + Npol + IncCol) = D2Aij*C2; - } - Inc3 = Inc3 + 2; - } - } - } - -*/ - // Resolution par Uzawa: - - math_Uzawa UzaResol(Cont, Secont, Start, Tolerance); - if (!(UzaResol.IsDone())) { - Done = Standard_False; - return; - } - CTCinv = UzaResol.InverseCont(); - UzaResol.Duale(Vardua); - for (i = 1; i <= CTCinv.RowNumber(); i++) { - for (j = i; j <= CTCinv.RowNumber(); j++) { - CTCinv(i, j) = CTCinv(j, i); - } - } - Done = Standard_True; - math_Vector VecPoles (1, CCol*Npol); - VecPoles = UzaResol.Value(); - - Standard_Integer polinit = 1, polfin=Npol; - if (FC >= 1) polinit = 2; - if (LC >= 1) polfin = Npol-1; - - for (i = polinit; i <= polfin; i++) { - IncCol = 0; - AppParCurves_MultiPoint MPol(nb3d, nb2d); - for (k = 1; k <= NbCu; k++) { - if (k <= nb3d) { - gp_Pnt Pol(VecPoles(IncCol + i), - VecPoles(IncCol + Npol +i), - VecPoles(IncCol + 2*Npol + i)); - MPol.SetPoint(k, Pol); - IncCol = IncCol + 3*Npol; - } - else { - gp_Pnt2d Pol2d(VecPoles(IncCol + i), - VecPoles(IncCol + Npol + i)); - MPol.SetPoint2d(k, Pol2d); - IncCol = IncCol + 2*Npol; - } - } - SCurv.SetValue(i, MPol); - } - -} - - - -Standard_Boolean AppParCurves_ResolConstraint::IsDone () const { - return Done; -} - - -Standard_Integer AppParCurves_ResolConstraint:: - NbConstraints(const MultiLine& SSP, - const Standard_Integer, - const Standard_Integer, - const Handle(AppParCurves_HArray1OfConstraintCouple)& - TheConstraints) -const -{ - // Boucle de calcul du nombre de points de passage afin de dimensionner - // les matrices. - Standard_Integer aIncPass, aIncTan, aIncCurv, aCCol; - Standard_Integer i; - AppParCurves_Constraint Cons; - - aIncPass = 0; - aIncTan = 0; - aIncCurv = 0; - - for (i = TheConstraints->Lower(); i <= TheConstraints->Upper(); i++) { - Cons = (TheConstraints->Value(i)).Constraint(); - if (Cons >= 1) { - aIncPass++; // IncPass = nbre de points de passage. - } - if (Cons >= 2) { - aIncTan++; // IncTan= nbre de points de tangence. - } - if (Cons == 3) { - aIncCurv++; // IncCurv = nbre de pts de courbure. - } - } - Standard_Integer nb3d = ToolLine::NbP3d(SSP); - Standard_Integer nb2d = ToolLine::NbP2d(SSP); - aCCol = nb3d* 3 + nb2d* 2; - - return aCCol*aIncPass + aIncTan*(aCCol-1) + 3*aIncCurv; - -} - - -Standard_Integer AppParCurves_ResolConstraint::NbColumns(const MultiLine& SSP, - const Standard_Integer Deg) -const -{ - Standard_Integer nb3d = ToolLine::NbP3d(SSP); - Standard_Integer nb2d = ToolLine::NbP2d(SSP); - Standard_Integer CCol = nb3d* 3 + nb2d* 2; - - return CCol*(Deg+1); -} - -const math_Matrix& AppParCurves_ResolConstraint::ConstraintMatrix() const -{ - return Cont; -} - -const math_Matrix& AppParCurves_ResolConstraint::InverseMatrix() const -{ - return CTCinv; -} - - -const math_Vector& AppParCurves_ResolConstraint::Duale() const -{ - return Vardua; -} - - - -const math_Matrix& AppParCurves_ResolConstraint:: - ConstraintDerivative(const MultiLine& SSP, - const math_Vector& Parameters, - const Standard_Integer Deg, - const math_Matrix& DA) -{ - Standard_Integer i, j, k, nb2d, nb3d, CCol, Inc3, IncCol, Npt; - Standard_Integer Npol, Npol2, NbCu =ToolLine::NbP3d(SSP)+ToolLine::NbP2d(SSP); - Standard_Integer IP; - Standard_Real Daij; - Npol = Deg+1; Npol2 = 2*Npol; - TColStd_Array2OfInteger Ibont(1, NbCu, 1, IncTan); - math_Matrix DeCInit(1, IncPass, 1, Npol); - math_Vector DDA(1, Npol); - gp_Vec V; - gp_Vec2d V2d; - Standard_Real T1, T2, T3, Tmax, DDaij; -// Standard_Integer FirstP = IPas(1); - nb3d = ToolLine::NbP3d(SSP); - nb2d = ToolLine::NbP2d(SSP); - Standard_Integer mynb3d = nb3d, mynb2d = nb2d; - if (nb3d == 0) mynb3d = 1; - if (nb2d == 0) mynb2d = 1; - CCol = nb3d* 3 + nb2d* 2; - - TColgp_Array1OfVec tabV(1, mynb3d); - TColgp_Array1OfVec2d tabV2d(1, mynb2d); - TColgp_Array1OfPnt tabP(1, mynb3d); - TColgp_Array1OfPnt2d tabP2d(1, mynb2d); - - for (i = 1; i <= DeCont.RowNumber(); i++) - for (j = 1; j <= DeCont.ColNumber(); j++) - DeCont(i, j) = 0.0; - - - // Remplissage de DK pour les points de passages: - - for (i =1; i <= IncPass; i++) { - Npt = IPas(i); - for (j = 1; j <= Npol; j++) DeCInit(i, j) = DA(Npt, j); - } - for (i = 1; i <= CCol; i++) { - DeCont.Set(IncPass*(i-1)+1, IncPass*i, Npol*(i-1)+1, Npol*i, DeCInit); - } - - - // Pour les points de tangence: - - Inc3 = CCol*IncPass +1; - IncCol = 0; - - for (k = 1; k <= NbCu; k++) { - if (k <= nb3d) { - for (i = 1; i <= IncTan; i++) { - Npt = ITan(i); -// MultiPoint MPoint = ToolLine::Value(SSP, Npt); - // choix du maximum de tangence pour exprimer la colinearite: - ToolLine::Tangency(SSP, Npt, tabV); - V = tabV(k); - V.Coord(T1, T2, T3); - Tmax = Abs(T1); - Ibont(k, i) = 1; - if (Abs(T2) > Tmax) { - Tmax = Abs(T2); - Ibont(k, i) = 2; - } - if (Abs(T3) > Tmax) { - Tmax = Abs(T3); - Ibont(k, i) = 3; - } - AppParCurves::SecondDerivativeBernstein(Parameters(Npt), DDA); - if (Ibont(k, i) == 3) { - for (j = 1; j <= Npol; j++) { - DDaij = DDA(j); - DeCont(Inc3, j+ Npol + IncCol) = DDaij*T3/Tmax; - DeCont(Inc3, j + Npol2 + IncCol) = -DDaij *T2/Tmax; - DeCont(Inc3+1, j+ IncCol) = DDaij* T3/Tmax; - DeCont(Inc3+1, j+ Npol2 + IncCol) = -DDaij*T1/Tmax; - } - } - else if (Ibont(k, i) == 1) { - for (j = 1; j <= Npol; j++) { - DDaij = DDA(j); - DeCont(Inc3, j + IncCol) = DDaij*T3/Tmax; - DeCont(Inc3, j + Npol2 + IncCol) = -DDaij *T1/Tmax; - DeCont(Inc3+1, j+ IncCol) = DDaij* T2/Tmax; - DeCont(Inc3+1, j+ Npol +IncCol) = -DDaij*T1/Tmax; - } - } - else if (Ibont(k, i) == 2) { - for (j = 1; j <= Npol; j++) { - DDaij = DDA(j); - DeCont(Inc3, j+ Npol + IncCol) = DDaij*T3/Tmax; - DeCont(Inc3, j + Npol2 + IncCol) = -DDaij *T2/Tmax; - DeCont(Inc3+1, j+ IncCol) = DDaij* T2/Tmax; - DeCont(Inc3+1, j+ Npol + IncCol) = -DDaij*T1/Tmax; - } - } - Inc3 = Inc3 + 2; - } - IncCol = IncCol + 3*Npol; - } - else { - for (i = 1; i <= IncTan; i++) { - Npt = ITan(i); - AppParCurves::SecondDerivativeBernstein(Parameters(Npt), DDA); - ToolLine::Tangency(SSP, Npt, tabV2d); - V2d = tabV2d(k); - V2d.Coord(T1, T2); - Tmax = Abs(T1); - Ibont(k, i) = 1; - if (Abs(T2) > Tmax) { - Tmax = Abs(T2); - Ibont(k, i) = 2; - } - for (j = 1; j <= Npol; j++) { - DDaij = DDA(j); - DeCont(Inc3, j + IncCol) = DDaij*T2; - DeCont(Inc3, j + Npol + IncCol) = -DDaij*T1; - } - Inc3 = Inc3 +1; - } - } - } - - // Equations exprimant le meme rapport de tangence sur chaque courbe: - // On prend les coordonnees les plus significatives. - - Inc3 = Inc3 -1; - for (i =1; i <= IncTan; i++) { - IncCol = 0; - Npt = ITan(i); - AppParCurves::SecondDerivativeBernstein(Parameters(Npt), DDA); -// MultiPoint MP = ToolLine::Value(SSP, Npt); - for (k = 1; k <= NbCu-1; k++) { - Inc3 = Inc3 + 1; - if (Ibont(k, i) == 1) { - if (k <= nb3d) { - ToolLine::Tangency(SSP, Npt, tabV); - V = tabV(k); - T1 = V.X(); - IP = 3*Npol; - } - else { - ToolLine::Tangency(SSP, Npt, tabV2d); - V2d = tabV2d(k); - T1 = V2d.X(); - IP = 2*Npol; - } - if (Ibont(k+1, i) == 1) { // Relations entre T1x et T2x: - if ((k+1) <= nb3d) { - ToolLine::Tangency(SSP, Npt, tabV); - V = tabV(k+1); - T2 = V.X(); - } - else { - ToolLine::Tangency(SSP, Npt, tabV2d); - V2d = tabV2d(k+1); - T2 = V2d.X(); - } - for (j = 1; j <= Npol; j++) { - Daij = DDA(j); - Cont(Inc3, j + IncCol) = Daij*T2; - Cont(Inc3, j + IP + IncCol) = -Daij*T1; - } - IncCol = IncCol + IP; - } - else if (Ibont(k+1, i) == 2) { // Relations entre T1x et T2y: - if ((k+1) <= nb3d) { - ToolLine::Tangency(SSP, Npt, tabV); - V = tabV(k+1); - T2 = V.Y(); - } - else { - ToolLine::Tangency(SSP, Npt, tabV2d); - V2d = tabV2d(k+1); - T2 = V2d.Y(); - } - for (j = 1; j <= Npol; j++) { - Daij = DDA(j); - Cont(Inc3, j + IncCol) = Daij*T2; - Cont(Inc3, j + IP + Npol + IncCol) = -Daij*T1; - } - IncCol = IncCol + IP; - } - else if (Ibont(k+1,i) == 3) { // Relations entre T1x et T2z: - ToolLine::Tangency(SSP, Npt, tabV); - V = tabV(k+1); - T2 = V.Z(); - for (j = 1; j <= Npol; j++) { - Daij = DDA(j); - Cont(Inc3, j + IncCol) = Daij*T2; - Cont(Inc3, j + IP + 2*Npol + IncCol) = -Daij*T1; - } - IncCol = IncCol + IP; - } - } - else if (Ibont(k,i) == 2) { - if (k <= nb3d) { - ToolLine::Tangency(SSP, Npt, tabV); - V = tabV(k); - T1 = V.Y(); - IP = 3*Npol; - } - else { - ToolLine::Tangency(SSP, Npt, tabV2d); - V2d = tabV2d(k); - T1 = V2d.Y(); - IP = 2*Npol; - } - if (Ibont(k+1, i) == 1) { // Relations entre T1y et T2x: - if ((k+1) <= nb3d) { - ToolLine::Tangency(SSP, Npt, tabV); - V = tabV(k+1); - T2 = V.X(); - } - else { - ToolLine::Tangency(SSP, Npt, tabV2d); - V2d = tabV2d(k+1); - T2 = V2d.X(); - } - for (j = 1; j <= Npol; j++) { - Daij = DDA( j); - Cont(Inc3, j + Npol + IncCol) = Daij*T2; - Cont(Inc3, j + IP + IncCol) = -Daij*T1; - } - IncCol = IncCol + IP; - - } - else if (Ibont(k+1, i) == 2) { // Relations entre T1y et T2y: - if ((k+1) <= nb3d) { - ToolLine::Tangency(SSP, Npt, tabV); - V = tabV(k+1); - T2 = V.Y(); - } - else { - ToolLine::Tangency(SSP, Npt, tabV2d); - V2d = tabV2d(k+1); - T2 = V2d.Y(); - } - for (j = 1; j <= Npol; j++) { - Daij = DDA(j); - Cont(Inc3, j + Npol + IncCol) = Daij*T2; - Cont(Inc3, j + IP + Npol + IncCol) = -Daij*T1; - } - IncCol = IncCol + IP; - - } - else if (Ibont(k+1,i)== 3) { // Relations entre T1y et T2z: - ToolLine::Tangency(SSP, Npt, tabV); - V = tabV(k+1); - T2 = V.Z(); - for (j = 1; j <= Npol; j++) { - Daij = DDA(j); - Cont(Inc3, j + Npol +IncCol) = Daij*T2; - Cont(Inc3, j + IP + 2*Npol + IncCol) = -Daij*T1; - } - IncCol = IncCol + IP; - } - } - - else { - ToolLine::Tangency(SSP, Npt, tabV); - V = tabV(k); - T1 = V.Z(); - IP = 3*Npol; - if (Ibont(k+1, i) == 1) { // Relations entre T1z et T2x: - if ((k+1) <= nb3d) { - ToolLine::Tangency(SSP, Npt, tabV); - V = tabV(k+1); - T2 = V.X(); - } - else { - ToolLine::Tangency(SSP, Npt, tabV2d); - V2d = tabV2d(k+1); - T2 = V2d.X(); - } - for (j = 1; j <= Npol; j++) { - Daij = DDA(j); - Cont(Inc3, j + 2*Npol +IncCol) = Daij*T2; - Cont(Inc3, j + IP + IncCol) = -Daij*T1; - } - IncCol = IncCol + IP; - } - - else if (Ibont(k+1, i) == 2) { // Relations entre T1z et T2y: - if ((k+1) <= nb3d) { - ToolLine::Tangency(SSP, Npt, tabV); - V = tabV(k+1); - T2 = V.Y(); - } - else { - ToolLine::Tangency(SSP, Npt, tabV2d); - V2d = tabV2d(k+1); - T2 = V2d.Y(); - } - for (j = 1; j <= Npol; j++) { - Daij = DDA(j); - Cont(Inc3, j + 2*Npol +IncCol) = Daij*T2; - Cont(Inc3, j + IP + Npol + IncCol) = -Daij*T1; - } - IncCol = IncCol + IP; - } - - else if (Ibont(k+1,i)==3) { // Relations entre T1z et T2z: - ToolLine::Tangency(SSP, Npt, tabV); - V = tabV(k+1); - T2 = V.Z(); - for (j = 1; j <= Npol; j++) { - Daij = DDA(j); - Cont(Inc3, j + 2*Npol + IncCol) = Daij*T2; - Cont(Inc3, j + IP + 2*Npol + IncCol) = -Daij*T1; - } - IncCol = IncCol + IP; - } - } - } - } - - return DeCont; -} diff --git a/opencascade/AppParCurves_SequenceOfMultiBSpCurve.hxx b/opencascade/AppParCurves_SequenceOfMultiBSpCurve.hxx index 84b14d21a..629f81fe6 100644 --- a/opencascade/AppParCurves_SequenceOfMultiBSpCurve.hxx +++ b/opencascade/AppParCurves_SequenceOfMultiBSpCurve.hxx @@ -22,5 +22,4 @@ typedef NCollection_Sequence AppParCurves_SequenceOfMultiBSpCurve; - #endif diff --git a/opencascade/AppParCurves_SequenceOfMultiCurve.hxx b/opencascade/AppParCurves_SequenceOfMultiCurve.hxx index cccbd3626..e2abf9f80 100644 --- a/opencascade/AppParCurves_SequenceOfMultiCurve.hxx +++ b/opencascade/AppParCurves_SequenceOfMultiCurve.hxx @@ -22,5 +22,4 @@ typedef NCollection_Sequence AppParCurves_SequenceOfMultiCurve; - #endif diff --git a/opencascade/AppStdL_Application.hxx b/opencascade/AppStdL_Application.hxx index e84100b4e..1d8515d5d 100644 --- a/opencascade/AppStdL_Application.hxx +++ b/opencascade/AppStdL_Application.hxx @@ -1,5 +1,5 @@ // Created on: 2004-06-29 -// Created by: Eugeny NAPALKOV +// Created by: Eugeny NAPALKOV // Copyright (c) 2004-2014 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. @@ -32,9 +32,9 @@ public: Standard_EXPORT Standard_CString ResourcesName() Standard_OVERRIDE; //! Dumps the content of me into the stream - Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const; + Standard_EXPORT void DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth = -1) const; - DEFINE_STANDARD_RTTIEXT(AppStdL_Application,TDocStd_Application) + DEFINE_STANDARD_RTTIEXT(AppStdL_Application, TDocStd_Application) }; #endif // _AppStdL_Application_HeaderFile diff --git a/opencascade/AppStd_Application.hxx b/opencascade/AppStd_Application.hxx index 6bb372e2a..c84915364 100644 --- a/opencascade/AppStd_Application.hxx +++ b/opencascade/AppStd_Application.hxx @@ -20,22 +20,21 @@ #include - class AppStd_Application; DEFINE_STANDARD_HANDLE(AppStd_Application, TDocStd_Application) //! Legacy class defining resources name for standard OCAF documents class AppStd_Application : public TDocStd_Application { -public: +public: //! returns the file name which contains application //! resources Standard_EXPORT Standard_CString ResourcesName() Standard_OVERRIDE; //! Dumps the content of me into the stream - Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const; + Standard_EXPORT void DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth = -1) const; - DEFINE_STANDARD_RTTIEXT(AppStd_Application,TDocStd_Application) + DEFINE_STANDARD_RTTIEXT(AppStd_Application, TDocStd_Application) }; #endif // _AppStd_Application_HeaderFile diff --git a/opencascade/ApproxInt_Approx.gxx b/opencascade/ApproxInt_Approx.gxx deleted file mode 100644 index b115781ca..000000000 --- a/opencascade/ApproxInt_Approx.gxx +++ /dev/null @@ -1,726 +0,0 @@ -// Created on: 1993-03-30 -// Created by: Laurent BUCHARD -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include -#include -#include -#include -#include -#include -#include -#include - -// If quantity of points is less than aMinNbPointsForApprox -// then interpolation is used. -const Standard_Integer aMinNbPointsForApprox = 5; - -// This constant should be removed in the future. -const Standard_Real RatioTol = 1.5 ; - -//======================================================================= -//function : ComputeTrsf3d -//purpose : -//======================================================================= -static void ComputeTrsf3d(const Handle(TheWLine)& theline, - Standard_Real& theXo, - Standard_Real& theYo, - Standard_Real& theZo) -{ - const Standard_Integer aNbPnts = theline->NbPnts(); - Standard_Real aXmin = RealLast(), aYmin = RealLast(), aZmin = RealLast(); - for(Standard_Integer i=1;i<=aNbPnts;i++) - { - const gp_Pnt P = theline->Point(i).Value(); - aXmin = Min(P.X(), aXmin); - aYmin = Min(P.Y(), aYmin); - aZmin = Min(P.Z(), aZmin); - } - - theXo = -aXmin; - theYo = -aYmin; - theZo = -aZmin; -} - -//======================================================================= -//function : ComputeTrsf2d -//purpose : -//======================================================================= -static void ComputeTrsf2d(const Handle(TheWLine)& theline, - const Standard_Boolean onFirst, - Standard_Real& theUo, - Standard_Real& theVo) -{ - const Standard_Integer aNbPnts = theline->NbPnts(); - Standard_Real aUmin = RealLast(), aVmin = RealLast(); - - // pointer to a member-function - void (IntSurf_PntOn2S::* pfunc)(Standard_Real&,Standard_Real&) const; - - if (onFirst) - pfunc = &IntSurf_PntOn2S::ParametersOnS1; - else - pfunc = &IntSurf_PntOn2S::ParametersOnS2; - - for(Standard_Integer i=1; i<=aNbPnts; i++) - { - const IntSurf_PntOn2S POn2S = theline->Point(i); - Standard_Real U,V; - (POn2S.*pfunc)(U,V); - aUmin = Min(U, aUmin); - aVmin = Min(V, aVmin); - } - - theUo = -aUmin; - theVo = -aVmin; -} - -//======================================================================= -//function : Parameters -//purpose : -//======================================================================= -void ApproxInt_Approx::Parameters(const ApproxInt_TheMultiLine& Line, - const Standard_Integer firstP, - const Standard_Integer lastP, - const Approx_ParametrizationType Par, - math_Vector& TheParameters) -{ - Standard_Integer i, j, nbP2d, nbP3d; - Standard_Real dist; - - if (Par == Approx_ChordLength || Par == Approx_Centripetal) { - nbP3d = ApproxInt_TheMultiLineTool::NbP3d(Line); - nbP2d = ApproxInt_TheMultiLineTool::NbP2d(Line); - Standard_Integer mynbP3d=nbP3d, mynbP2d=nbP2d; - if (nbP3d == 0) mynbP3d = 1; - if (nbP2d == 0) mynbP2d = 1; - - TheParameters(firstP) = 0.0; - dist = 0.0; - TColgp_Array1OfPnt tabP(1, mynbP3d); - TColgp_Array1OfPnt tabPP(1, mynbP3d); - TColgp_Array1OfPnt2d tabP2d(1, mynbP2d); - TColgp_Array1OfPnt2d tabPP2d(1, mynbP2d); - - for (i = firstP+1; i <= lastP; i++) { - if (nbP3d != 0 && nbP2d != 0) ApproxInt_TheMultiLineTool::Value(Line, i-1, tabP, tabP2d); - else if (nbP2d != 0) ApproxInt_TheMultiLineTool::Value(Line, i-1, tabP2d); - else if (nbP3d != 0) ApproxInt_TheMultiLineTool::Value(Line, i-1, tabP); - - if (nbP3d != 0 && nbP2d != 0) ApproxInt_TheMultiLineTool::Value(Line, i, tabPP, tabPP2d); - else if (nbP2d != 0) ApproxInt_TheMultiLineTool::Value(Line, i, tabPP2d); - else if (nbP3d != 0) ApproxInt_TheMultiLineTool::Value(Line, i, tabPP); - dist = 0; - for (j = 1; j <= nbP3d; j++) { - const gp_Pnt &aP1 = tabP(j), - &aP2 = tabPP(j); - dist += aP2.SquareDistance(aP1); - } - for (j = 1; j <= nbP2d; j++) { - const gp_Pnt2d &aP12d = tabP2d(j), - &aP22d = tabPP2d(j); - - dist += aP22d.SquareDistance(aP12d); - } - - dist = Sqrt(dist); - if(Par == Approx_ChordLength) - { - TheParameters(i) = TheParameters(i - 1) + dist; - } - else - {// Par == Approx_Centripetal - TheParameters(i) = TheParameters(i - 1) + Sqrt(dist); - } - } - for (i = firstP; i <= lastP; i++) TheParameters(i) /= TheParameters(lastP); - } - else { - for (i = firstP; i <= lastP; i++) { - TheParameters(i) = (Standard_Real(i)-firstP)/ - (Standard_Real(lastP)-Standard_Real(firstP)); - } - } -} - -//======================================================================= -//function : Default constructor -//purpose : -//======================================================================= -ApproxInt_Approx::ApproxInt_Approx(): - myComputeLine(4, 8, 0.001, 0.001, 5), - myComputeLineBezier(4, 8, 0.001, 0.001, 5), - myWithTangency(Standard_True), - myTol3d(0.001), - myTol2d(0.001), - myDegMin(4), - myDegMax(8), - myNbIterMax(5), - myTolReached3d(0.0), - myTolReached2d(0.0) -{ - myComputeLine.SetContinuity(2); - //myComputeLineBezier.SetContinuity(2); -} - -//======================================================================= -//function : Perform -//purpose : Build without surfaces information. -//======================================================================= -void ApproxInt_Approx::Perform(const Handle(TheWLine)& theline, - const Standard_Boolean ApproxXYZ, - const Standard_Boolean ApproxU1V1, - const Standard_Boolean ApproxU2V2, - const Standard_Integer indicemin, - const Standard_Integer indicemax) -{ - // Prepare DS. - prepareDS(ApproxXYZ, ApproxU1V1, ApproxU2V2, indicemin, indicemax); - - const Standard_Integer nbpntbez = myData.indicemax - myData.indicemin; - if(nbpntbez < aMinNbPointsForApprox) - myData.myBezierApprox = Standard_False; - else - myData.myBezierApprox = Standard_True; - - // Fill data structure. - fillData(theline); - - // Build knots. - buildKnots(theline, NULL); - if (myKnots.Length() == 2 && - indicemax - indicemin > 2 * myData.myNbPntMax) - { - // At least 3 knots for BrepApprox. - myKnots.ChangeLast() = (indicemax - indicemin) / 2; - myKnots.Append(indicemax); - } - - myComputeLine.Init (myDegMin, myDegMax, myTol3d, myTol2d, myNbIterMax, Standard_True, myData.parametrization); - myComputeLineBezier.Init(myDegMin, myDegMax, myTol3d, myTol2d, myNbIterMax, Standard_True, myData.parametrization); - - buildCurve(theline, NULL); -} - -//======================================================================= -//function : Perform -//purpose : Definition of next steps according to surface types -// (i.e. coordination algorithm). -//======================================================================= -void ApproxInt_Approx::Perform(const ThePSurface& Surf1, - const ThePSurface& Surf2, - const Handle(TheWLine)& theline, - const Standard_Boolean ApproxXYZ, - const Standard_Boolean ApproxU1V1, - const Standard_Boolean ApproxU2V2, - const Standard_Integer indicemin, - const Standard_Integer indicemax) -{ - - myTolReached3d = myTolReached2d = 0.; - - const GeomAbs_SurfaceType typeS1 = ThePSurfaceTool::GetType(Surf1); - const GeomAbs_SurfaceType typeS2 = ThePSurfaceTool::GetType(Surf2); - - const Standard_Boolean isQuadric = ((typeS1 == GeomAbs_Plane) || - (typeS1 == GeomAbs_Cylinder) || - (typeS1 == GeomAbs_Sphere) || - (typeS1 == GeomAbs_Cone) || - (typeS2 == GeomAbs_Plane) || - (typeS2 == GeomAbs_Cylinder) || - (typeS2 == GeomAbs_Sphere) || - (typeS2 == GeomAbs_Cone)); - - if(isQuadric) - { - IntSurf_Quadric Quad; - Standard_Boolean SecondIsImplicit=Standard_False; - switch (typeS1) - { - case GeomAbs_Plane: - Quad.SetValue(ThePSurfaceTool::Plane(Surf1)); - break; - - case GeomAbs_Cylinder: - Quad.SetValue(ThePSurfaceTool::Cylinder(Surf1)); - break; - - case GeomAbs_Sphere: - Quad.SetValue(ThePSurfaceTool::Sphere(Surf1)); - break; - - case GeomAbs_Cone: - Quad.SetValue(ThePSurfaceTool::Cone(Surf1)); - break; - - default: - { - SecondIsImplicit = Standard_True; - switch (typeS2) - { - case GeomAbs_Plane: - Quad.SetValue(ThePSurfaceTool::Plane(Surf2)); - break; - - case GeomAbs_Cylinder: - Quad.SetValue(ThePSurfaceTool::Cylinder(Surf2)); - break; - - case GeomAbs_Sphere: - Quad.SetValue(ThePSurfaceTool::Sphere(Surf2)); - break; - - case GeomAbs_Cone: - Quad.SetValue(ThePSurfaceTool::Cone(Surf2)); - break; - - default: - break; - }//switch (typeS2) - } - - break; - }//switch (typeS1) - - Perform(Quad, (SecondIsImplicit? Surf1: Surf2), theline, - ApproxXYZ, ApproxU1V1, ApproxU2V2, - indicemin, indicemax, !SecondIsImplicit); - - return; - } - - // Here, isQuadric == FALSE. - - // Prepare DS. - prepareDS(ApproxXYZ, ApproxU1V1, ApproxU2V2, indicemin, indicemax); - - // Non-analytical case: Param-Param perform. - ApproxInt_ThePrmPrmSvSurfaces myPrmPrmSvSurfaces(Surf1,Surf2); - - Standard_Integer nbpntbez = indicemax-indicemin; - - if(nbpntbez < aMinNbPointsForApprox) - { - myData.myBezierApprox = Standard_False; - } - else - { - myData.myBezierApprox = Standard_True; - } - - // Fill data structure. - fillData(theline); - - const Standard_Boolean cut = myData.myBezierApprox; - const Standard_Address ptrsvsurf = &myPrmPrmSvSurfaces; - - // Build knots. - buildKnots(theline, ptrsvsurf); - - myComputeLine.Init ( myDegMin, myDegMax, myTol3d, myTol2d, - myNbIterMax, cut, myData.parametrization); - myComputeLineBezier.Init( myDegMin, myDegMax, myTol3d, myTol2d, - myNbIterMax, cut, myData.parametrization); - - buildCurve(theline, ptrsvsurf); -} - -//======================================================================= -//function : Perform -//purpose : Analytic-Param perform. -//======================================================================= -void ApproxInt_Approx::Perform(const TheISurface& ISurf, - const ThePSurface& PSurf, - const Handle(TheWLine)& theline, - const Standard_Boolean ApproxXYZ, - const Standard_Boolean ApproxU1V1, - const Standard_Boolean ApproxU2V2, - const Standard_Integer indicemin, - const Standard_Integer indicemax, - const Standard_Boolean isTheQuadFirst) -{ - // Prepare DS. - prepareDS(ApproxXYZ, ApproxU1V1, ApproxU2V2, indicemin, indicemax); - - // Non-analytical case: Analytic-Param perform. - ApproxInt_TheImpPrmSvSurfaces myImpPrmSvSurfaces = - isTheQuadFirst? ApproxInt_TheImpPrmSvSurfaces(ISurf, PSurf): - ApproxInt_TheImpPrmSvSurfaces(PSurf, ISurf); - - myImpPrmSvSurfaces.SetUseSolver(Standard_False); - - const Standard_Integer nbpntbez = indicemax-indicemin; - if(nbpntbez < aMinNbPointsForApprox) - { - myData.myBezierApprox = Standard_False; - } - else - { - myData.myBezierApprox = Standard_True; - } - - const Standard_Boolean cut = myData.myBezierApprox; - const Standard_Address ptrsvsurf = &myImpPrmSvSurfaces; - - // Fill data structure. - fillData(theline); - - // Build knots. - buildKnots(theline, ptrsvsurf); - - myComputeLine.Init ( myDegMin, myDegMax, myTol3d, myTol2d, - myNbIterMax, cut, myData.parametrization); - myComputeLineBezier.Init( myDegMin, myDegMax, myTol3d, myTol2d, - myNbIterMax, cut, myData.parametrization); - - buildCurve(theline, ptrsvsurf); -} - -//======================================================================= -//function : SetParameters -//purpose : -//======================================================================= -void ApproxInt_Approx::SetParameters( const Standard_Real Tol3d, - const Standard_Real Tol2d, - const Standard_Integer DegMin, - const Standard_Integer DegMax, - const Standard_Integer NbIterMax, - const Standard_Integer NbPntMax, - const Standard_Boolean ApproxWithTangency, - const Approx_ParametrizationType Parametrization) -{ - myData.myNbPntMax = NbPntMax; - myWithTangency = ApproxWithTangency; - myTol3d = Tol3d/RatioTol; - myTol2d = Tol2d/RatioTol; - myDegMin = DegMin; - myDegMax = DegMax; - myNbIterMax = NbIterMax; - - myComputeLine.Init ( myDegMin, myDegMax, myTol3d, myTol2d, - myNbIterMax, Standard_True, Parametrization); - myComputeLineBezier.Init( myDegMin, myDegMax, myTol3d, myTol2d, - myNbIterMax, Standard_True, Parametrization); - - if(!ApproxWithTangency) - { - myComputeLine.SetConstraints(AppParCurves_PassPoint,AppParCurves_PassPoint); - myComputeLineBezier.SetConstraints(AppParCurves_PassPoint,AppParCurves_PassPoint); - } - - myData.myBezierApprox = Standard_True; -} - -//======================================================================= -//function : NbMultiCurves -//purpose : -//======================================================================= -Standard_Integer ApproxInt_Approx::NbMultiCurves() const -{ - return 1; -} - -//======================================================================= -//function : UpdateTolReached -//purpose : -//======================================================================= -void ApproxInt_Approx::UpdateTolReached() -{ - if (myData.myBezierApprox) - { - const Standard_Integer NbCurves = myComputeLineBezier.NbMultiCurves() ; - for (Standard_Integer ICur = 1 ; ICur <= NbCurves ; ICur++) - { - Standard_Real Tol3D, Tol2D ; - myComputeLineBezier.Error (ICur, Tol3D, Tol2D) ; - myTolReached3d = Max(myTolReached3d, Tol3D); - myTolReached2d = Max(myTolReached2d, Tol2D); - } - } - else - { - myComputeLine.Error (myTolReached3d, myTolReached2d); - } -} - -//======================================================================= -//function : TolReached3d -//purpose : -//======================================================================= -Standard_Real ApproxInt_Approx::TolReached3d() const -{ - return myTolReached3d * RatioTol; -} - -//======================================================================= -//function : TolReached2d -//purpose : -//======================================================================= -Standard_Real ApproxInt_Approx::TolReached2d() const -{ - return myTolReached2d * RatioTol; -} - -//======================================================================= -//function : IsDone -//purpose : -//======================================================================= -Standard_Boolean ApproxInt_Approx::IsDone() const -{ - if(myData.myBezierApprox) - { - return(myComputeLineBezier.NbMultiCurves() > 0); - } - else - { - return(myComputeLine.IsToleranceReached()); - } -} - -//======================================================================= -//function : Value -//purpose : -//======================================================================= -const AppParCurves_MultiBSpCurve& ApproxInt_Approx::Value(const Standard_Integer ) const -{ - if(myData.myBezierApprox) - { - return(myBezToBSpl.Value()); - } - else - { - return(myComputeLine.Value()); - } -} - -//======================================================================= -//function : fillData -//purpose : Fill ApproxInt data structure. -//======================================================================= -void ApproxInt_Approx::fillData(const Handle(TheWLine)& theline) -{ - if(myData.ApproxXYZ) - ComputeTrsf3d(theline, myData.Xo, myData.Yo, myData.Zo); - else - myData.Xo = myData.Yo = myData.Zo = 0.0; - - if(myData.ApproxU1V1) - ComputeTrsf2d(theline, Standard_True, myData.U1o, myData.V1o); - else - myData.U1o = myData.V1o = 0.0; - - if(myData.ApproxU2V2) - ComputeTrsf2d(theline, Standard_False, myData.U2o, myData.V2o); - else - myData.U2o = myData.V2o = 0.0; -} - -//======================================================================= -//function : prepareDS -//purpose : -//======================================================================= -void ApproxInt_Approx::prepareDS(const Standard_Boolean theApproxXYZ, - const Standard_Boolean theApproxU1V1, - const Standard_Boolean theApproxU2V2, - const Standard_Integer theIndicemin, - const Standard_Integer theIndicemax) -{ - myTolReached3d = myTolReached2d = 0.0; - myData.ApproxU1V1 = theApproxU1V1; - myData.ApproxU2V2 = theApproxU2V2; - myData.ApproxXYZ = theApproxXYZ; - myData.indicemin = theIndicemin; - myData.indicemax = theIndicemax; - myData.parametrization = myComputeLineBezier.Parametrization(); -} - -//======================================================================= -//function : buildKnots -//purpose : -//======================================================================= -void ApproxInt_Approx::buildKnots(const Handle(TheWLine)& theline, - const Standard_Address thePtrSVSurf) -{ - myKnots.Clear(); - if(!myData.myBezierApprox) - { - myKnots.Append(myData.indicemin); - myKnots.Append(myData.indicemax); - return; - } - - const ApproxInt_TheMultiLine aTestLine( theline, thePtrSVSurf, - ((myData.ApproxXYZ)? 1 : 0), - ((myData.ApproxU1V1)? 1: 0) + ((myData.ApproxU2V2)? 1: 0), - myData.ApproxU1V1, myData.ApproxU2V2, - myData.Xo, myData.Yo, myData.Zo, - myData.U1o, myData.V1o, myData.U2o, myData.V2o, - myData.ApproxU1V1, - myData.indicemin, myData.indicemax); - - const Standard_Integer nbp3d = aTestLine.NbP3d(), - nbp2d = aTestLine.NbP2d(); - TColgp_Array1OfPnt aTabPnt3d(1, Max(1, nbp3d)); - TColgp_Array1OfPnt2d aTabPnt2d(1, Max(1, nbp2d)); - TColgp_Array1OfPnt aPntXYZ(myData.indicemin, myData.indicemax); - TColgp_Array1OfPnt2d aPntU1V1(myData.indicemin, myData.indicemax); - TColgp_Array1OfPnt2d aPntU2V2(myData.indicemin, myData.indicemax); - - for(Standard_Integer i = myData.indicemin; i <= myData.indicemax; ++i) - { - if (nbp3d != 0 && nbp2d != 0) aTestLine.Value(i, aTabPnt3d, aTabPnt2d); - else if (nbp2d != 0) aTestLine.Value(i, aTabPnt2d); - else if (nbp3d != 0) aTestLine.Value(i, aTabPnt3d); - // - if(nbp3d > 0) - { - aPntXYZ(i) = aTabPnt3d(1); - } - if(nbp2d > 1) - { - aPntU1V1(i) = aTabPnt2d(1); - aPntU2V2(i) = aTabPnt2d(2); - } - else if(nbp2d > 0) - { - if(myData.ApproxU1V1) - { - aPntU1V1(i) = aTabPnt2d(1); - } - else - { - aPntU2V2(i) = aTabPnt2d(1); - } - } - } - - Standard_Integer aMinNbPnts = myData.myNbPntMax; - - // Expected parametrization. - math_Vector aPars(myData.indicemin, myData.indicemax); - Parameters(aTestLine, myData.indicemin, myData.indicemax, myData.parametrization, aPars); - - ApproxInt_KnotTools::BuildKnots(aPntXYZ, aPntU1V1, aPntU2V2, aPars, - myData.ApproxXYZ, myData.ApproxU1V1, myData.ApproxU2V2, aMinNbPnts, myKnots); -} - -//======================================================================= -//function : buildCurve -//purpose : -//======================================================================= -void ApproxInt_Approx::buildCurve(const Handle(TheWLine)& theline, - const Standard_Address thePtrSVSurf) -{ - if(myData.myBezierApprox) - { - myBezToBSpl.Reset(); - } - - Standard_Integer kind = myKnots.Lower(); - Standard_Integer imin = 0, imax = 0; - Standard_Boolean OtherInter = Standard_False; - do - { - // Base cycle: iterate over knots. - imin = myKnots(kind); - imax = myKnots(kind+1); - ApproxInt_TheMultiLine myMultiLine(theline, thePtrSVSurf, - ((myData.ApproxXYZ)? 1 : 0), - ((myData.ApproxU1V1)? 1: 0) + ((myData.ApproxU2V2)? 1: 0), - myData.ApproxU1V1, myData.ApproxU2V2, - myData.Xo, myData.Yo, myData.Zo, myData.U1o, myData.V1o, - myData.U2o, myData.V2o, myData.ApproxU1V1, imin, imax); - - if(myData.myBezierApprox) - { - myComputeLineBezier.Perform(myMultiLine); - if (myComputeLineBezier.NbMultiCurves() == 0) - return; - } - else - { - myComputeLine.Perform(myMultiLine); - } - - UpdateTolReached(); - - Standard_Integer indice3d = 1, indice2d1 = 2, indice2d2 = 3; - if(!myData.ApproxXYZ) { indice2d1--; indice2d2--; } - if(!myData.ApproxU1V1) { indice2d2--; } - if(myData.ApproxXYZ) - { - if(myData.myBezierApprox) - { - for(Standard_Integer nbmc = myComputeLineBezier.NbMultiCurves() ; nbmc>=1; nbmc--) - { - myComputeLineBezier.ChangeValue(nbmc).Transform(indice3d, -myData.Xo, 1.0, -myData.Yo, 1.0, -myData.Zo, 1.0); - } - } - else - { - myComputeLine.ChangeValue().Transform(indice3d, -myData.Xo, 1.0, -myData.Yo, 1.0, -myData.Zo, 1.0); - } - } - if(myData.ApproxU1V1) - { - if(myData.myBezierApprox) { - for(Standard_Integer nbmc = myComputeLineBezier.NbMultiCurves() ; nbmc>=1; nbmc--) - { - myComputeLineBezier.ChangeValue(nbmc).Transform2d(indice2d1, -myData.U1o, 1.0, -myData.V1o, 1.0); - } - } - else - { - myComputeLine.ChangeValue().Transform2d(indice2d1, -myData.U1o, 1.0, -myData.V1o, 1.0); - } - } - if(myData.ApproxU2V2) - { - if(myData.myBezierApprox) - { - for(Standard_Integer nbmc = myComputeLineBezier.NbMultiCurves() ; nbmc>=1; nbmc--) - { - myComputeLineBezier.ChangeValue(nbmc).Transform2d(indice2d2, -myData.U2o, 1.0, -myData.V2o, 1.0); - } - } - else - { - myComputeLine.ChangeValue().Transform2d(indice2d2, -myData.U2o, 1.0, -myData.V2o, 1.0); - } - } - - OtherInter = Standard_False; - if(myData.myBezierApprox) - { - for(Standard_Integer nbmc = 1; - nbmc <= myComputeLineBezier.NbMultiCurves(); - nbmc++) - { - myBezToBSpl.Append(myComputeLineBezier.Value(nbmc)); - } - kind++; - if(kind < myKnots.Upper()) - { - OtherInter = Standard_True; - } - } - } - while(OtherInter); - - if(myData.myBezierApprox) - { - myBezToBSpl.Perform(); - } -} diff --git a/opencascade/ApproxInt_ImpPrmSvSurfaces.gxx b/opencascade/ApproxInt_ImpPrmSvSurfaces.gxx deleted file mode 100644 index 2aa215b58..000000000 --- a/opencascade/ApproxInt_ImpPrmSvSurfaces.gxx +++ /dev/null @@ -1,929 +0,0 @@ -// Created on: 1993-03-17 -// Created by: Laurent BUCHARD -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include -#include -#include -#include -#include -#include - -//======================================================================= -//function : IsSingular -//purpose : Returns TRUE if vectors theDU || theDV or if at least one -// of them has null-magnitude. -// theSqLinTol is square of linear tolerance. -// theAngTol is angular tolerance. -//======================================================================= -static Standard_Boolean IsSingular( const gp_Vec& theDU, - const gp_Vec& theDV, - const Standard_Real theSqLinTol, - const Standard_Real theAngTol) -{ - gp_Vec aDU(theDU), aDV(theDV); - - const Standard_Real aSqMagnDU = aDU.SquareMagnitude(), - aSqMagnDV = aDV.SquareMagnitude(); - - if(aSqMagnDU < theSqLinTol) - return Standard_True; - - aDU.Divide(sqrt(aSqMagnDU)); - - if(aSqMagnDV < theSqLinTol) - return Standard_True; - - aDV.Divide(sqrt(aSqMagnDV)); - - //Here aDU and aDV vectors have magnitude 1.0. - - if(aDU.Crossed(aDV).SquareMagnitude() < theAngTol*theAngTol) - return Standard_True; - - return Standard_False; -} - -//======================================================================= -//function : SingularProcessing -//purpose : Computes 2D-representation (in UV-coordinates) of -// theTg3D vector on the surface in case when -// theDU.Crossed(theDV).Magnitude() == 0.0. Stores result in -// theTg2D variable. -// theDU and theDV are vectors of 1st derivative -// (with respect to U and V variables correspondingly). -// If theIsTo3DTgCompute == TRUE then theTg3D has not been -// defined yet (it should be computed). -// theLinTol is SQUARE of the tolerance. -// -//Algorithm: -// Condition -// Tg=theDU*theTg2D.X()+theDV*theTg2D.Y() -// has to be satisfied strictly. -// More over, vector Tg has to be NORMALIZED -// (if theIsTo3DTgCompute == TRUE then new computed vector will -// always have magnitude 1.0). -//======================================================================= -static Standard_Boolean SingularProcessing( const gp_Vec& theDU, - const gp_Vec& theDV, - const Standard_Boolean theIsTo3DTgCompute, - const Standard_Real theLinTol, - const Standard_Real theAngTol, - gp_Vec& theTg3D, - gp_Vec2d& theTg2D) -{ - //Attention: @ \sin theAngTol \approx theAngTol @ (for cross-product) - - //Really, vector theTg3D has to be normalized (if theIsTo3DTgCompute == FALSE). - const Standard_Real aSQTan = theTg3D.SquareMagnitude(); - - const Standard_Real aSqMagnDU = theDU.SquareMagnitude(), - aSqMagnDV = theDV.SquareMagnitude(); - - //There are some reasons of singularity - - //1. - if((aSqMagnDU < theLinTol) && (aSqMagnDV < theLinTol)) - { - //For future, this case can be processed as same as in case of - //osculating surfaces (expanding in Taylor series). Here, - //we return only. - - return Standard_False; - } - - //2. - if(aSqMagnDU < theLinTol) - { - //In this case, theTg3D vector will be parallel with theDV. - //Its true direction shall be precised later (the algorithm is - //based on array of Walking-points). - - if(theIsTo3DTgCompute) - { - //theTg3D will be normalized. Its magnitude is - const Standard_Real aTgMagn = 1.0; - - const Standard_Real aNorm = sqrt(aSqMagnDV); - theTg3D = theDV.Divided(aNorm); - theTg2D.SetCoord(0.0, aTgMagn/aNorm); - } - else - { - //theTg3D is already defined. - //Here we check only, if this tangent is parallel to theDV. - - if(theDV.Crossed(theTg3D).SquareMagnitude() < - theAngTol*theAngTol*aSqMagnDV*aSQTan) - { - //theTg3D is parallel to theDV - - //Use sign "+" if theTg3D and theDV are codirectional - //and sign "-" if opposite - const Standard_Real aDP = theTg3D.Dot(theDV); - theTg2D.SetCoord(0.0, Sign(sqrt(aSQTan/aSqMagnDV), aDP)); - } - else - { - //theTg3D is not parallel to theDV - //It is abnormal - - return Standard_False; - } - } - - return Standard_True; - } - - //3. - if(aSqMagnDV < theLinTol) - { - //In this case, theTg3D vector will be parallel with theDU. - //Its true direction shall be precised later (the algorithm is - //based on array of Walking-points). - - if(theIsTo3DTgCompute) - { - //theTg3D will be normalized. Its magnitude is - const Standard_Real aTgMagn = 1.0; - - const Standard_Real aNorm = sqrt(aSqMagnDU); - theTg3D = theDU.Divided(aNorm); - theTg2D.SetCoord(aTgMagn/aNorm, 0.0); - } - else - { - //theTg3D is already defined. - //Here we check only, if this tangent is parallel to theDU. - - if(theDU.Crossed(theTg3D).SquareMagnitude() < - theAngTol*theAngTol*aSqMagnDU*aSQTan) - { - //theTg3D is parallel to theDU - - //Use sign "+" if theTg3D and theDU are codirectional - //and sign "-" if opposite - const Standard_Real aDP = theTg3D.Dot(theDU); - theTg2D.SetCoord(Sign(sqrt(aSQTan/aSqMagnDU), aDP), 0.0); - } - else - { - //theTg3D is not parallel to theDU - //It is abnormal - - return Standard_False; - } - } - - return Standard_True; - } - - //4. If aSqMagnDU > 0.0 && aSqMagnDV > 0.0 but theDV || theDU. - - const Standard_Real aLenU = sqrt(aSqMagnDU), - aLenV = sqrt(aSqMagnDV); - - //aLenSum > 0.0 definitely - const Standard_Real aLenSum = aLenU + aLenV; - - if(theDV.Dot(theDU) > 0.0) - { - //Vectors theDV and theDU are codirectional. - - if(theIsTo3DTgCompute) - { - theTg2D.SetCoord(1.0/aLenSum, 1.0/aLenSum); - theTg3D = theDU*theTg2D.X() + theDV*theTg2D.Y(); - } - else - { - //theTg3D is already defined. - //Here we check only, if this tangent is parallel to theDU - //(and theDV together). - - if(theDU.Crossed(theTg3D).SquareMagnitude() < - theAngTol*theAngTol*aSqMagnDU*aSQTan) - { - //theTg3D is parallel to theDU - - const Standard_Real aDP = theTg3D.Dot(theDU); - const Standard_Real aLenTg = Sign(sqrt(aSQTan), aDP); - theTg2D.SetCoord(aLenTg/aLenSum, aLenTg/aLenSum); - } - else - { - //theTg3D is not parallel to theDU - //It is abnormal - - return Standard_False; - } - } - } - else - { - //Vectors theDV and theDU are opposite. - - if(theIsTo3DTgCompute) - { - //Here we chose theDU as direction of theTg3D. - //True direction shall be precised later (the algorithm is - //based on array of Walking-points). - - theTg2D.SetCoord(1.0/aLenSum, -1.0/aLenSum); - theTg3D = theDU*theTg2D.X() + theDV*theTg2D.Y(); - } - else - { - //theTg3D is already defined. - //Here we check only, if this tangent is parallel to theDU - //(and theDV together). - - if(theDU.Crossed(theTg3D).SquareMagnitude() < - theAngTol*theAngTol*aSqMagnDU*aSQTan) - { - //theTg3D is parallel to theDU - - const Standard_Real aDP = theTg3D.Dot(theDU); - const Standard_Real aLenTg = Sign(sqrt(aSQTan), aDP); - theTg2D.SetCoord(aLenTg/aLenSum, -aLenTg/aLenSum); - } - else - { - //theTg3D is not parallel to theDU - //It is abnormal - - return Standard_False; - } - } - } - - return Standard_True; -} - -//======================================================================= -//function : NonSingularProcessing -//purpose : Computes 2D-representation (in UV-coordinates) of -// theTg3D vector on the surface in case when -// theDU.Crossed(theDV).Magnitude() > 0.0. Stores result in -// theTg2D variable. -// theDU and theDV are vectors of 1st derivative -// (with respect to U and V variables correspondingly). -// theLinTol is SQUARE of the tolerance. -// -//Algorithm: -// Condition -// Tg=theDU*theTg2D.X()+theDV*theTg2D.Y() -// has to be satisfied strictly. -// More over, vector Tg has always to be NORMALIZED. -//======================================================================= -static Standard_Boolean NonSingularProcessing(const gp_Vec& theDU, - const gp_Vec& theDV, - const gp_Vec& theTg3D, - const Standard_Real theLinTol, - const Standard_Real theAngTol, - gp_Vec2d& theTg2D) -{ - const gp_Vec aNormal = theDU.Crossed(theDV); - const Standard_Real aSQMagn = aNormal.SquareMagnitude(); - - if(IsSingular(theDU, theDV, theLinTol, theAngTol)) - { - gp_Vec aTg(theTg3D); - return - SingularProcessing(theDU, theDV, Standard_False, - theLinTol, theAngTol, aTg, theTg2D); - } - - //If @\vec{T}=\vec{A}*U+\vec{B}*V@ then - - // \left\{\begin{matrix} - // \vec{A} \times \vec{T} = (\vec{A} \times \vec{B})*V - // \vec{B} \times \vec{T} = (\vec{B} \times \vec{A})*U - // \end{matrix}\right. - - //From here, values of U and V can be found very easily - //(if @\left \| \vec{A} \times \vec{B} \right \| > 0.0 @, - //else it is singular case). - - const gp_Vec aTgU(theTg3D.Crossed(theDU)), aTgV(theTg3D.Crossed(theDV)); - const Standard_Real aDeltaU = aTgV.SquareMagnitude()/aSQMagn; - const Standard_Real aDeltaV = aTgU.SquareMagnitude()/aSQMagn; - - theTg2D.SetCoord(Sign(sqrt(aDeltaU), aTgV.Dot(aNormal)), -Sign(sqrt(aDeltaV), aTgU.Dot(aNormal))); - - return Standard_True; -} - -//-------------------------------------------------------------------------------- -ApproxInt_ImpPrmSvSurfaces::ApproxInt_ImpPrmSvSurfaces( const TheISurface& ISurf - ,const ThePSurface& PSurf): - MyIsTangent(Standard_False), - MyHasBeenComputed(Standard_False), - MyIsTangentbis(Standard_False), - MyHasBeenComputedbis(Standard_False), - MyImplicitFirst(Standard_True), - MyZerImpFunc(PSurf,ISurf) -{ - SetUseSolver(Standard_True); -} -//-------------------------------------------------------------------------------- -ApproxInt_ImpPrmSvSurfaces::ApproxInt_ImpPrmSvSurfaces( const ThePSurface& PSurf - ,const TheISurface& ISurf): - MyIsTangent(Standard_False), - MyHasBeenComputed(Standard_False), - MyIsTangentbis(Standard_False), - MyHasBeenComputedbis(Standard_False), - MyImplicitFirst(Standard_False), - MyZerImpFunc(PSurf,ISurf) -{ - SetUseSolver(Standard_True); -} -//-------------------------------------------------------------------------------- -void ApproxInt_ImpPrmSvSurfaces::Pnt(const Standard_Real u1, - const Standard_Real v1, - const Standard_Real u2, - const Standard_Real v2, - gp_Pnt& P) { - gp_Pnt aP; - gp_Vec aT; - gp_Vec2d aTS1,aTS2; - Standard_Real tu1=u1; - Standard_Real tu2=u2; - Standard_Real tv1=v1; - Standard_Real tv2=v2; - this->Compute(tu1,tv1,tu2,tv2,aP,aT,aTS1,aTS2); - P=MyPnt; -} -//-------------------------------------------------------------------------------- -Standard_Boolean ApproxInt_ImpPrmSvSurfaces::Tangency(const Standard_Real u1, - const Standard_Real v1, - const Standard_Real u2, - const Standard_Real v2, - gp_Vec& T) { - gp_Pnt aP; - gp_Vec aT; - gp_Vec2d aTS1,aTS2; - Standard_Real tu1=u1; - Standard_Real tu2=u2; - Standard_Real tv1=v1; - Standard_Real tv2=v2; - Standard_Boolean t=this->Compute(tu1,tv1,tu2,tv2,aP,aT,aTS1,aTS2); - T=MyTg; - return(t); -} -//-------------------------------------------------------------------------------- -Standard_Boolean ApproxInt_ImpPrmSvSurfaces::TangencyOnSurf1(const Standard_Real u1, - const Standard_Real v1, - const Standard_Real u2, - const Standard_Real v2, - gp_Vec2d& T) { - gp_Pnt aP; - gp_Vec aT; - gp_Vec2d aTS1,aTS2; - Standard_Real tu1=u1; - Standard_Real tu2=u2; - Standard_Real tv1=v1; - Standard_Real tv2=v2; - Standard_Boolean t=this->Compute(tu1,tv1,tu2,tv2,aP,aT,aTS1,aTS2); - T=MyTguv1; - return(t); -} -//-------------------------------------------------------------------------------- -Standard_Boolean ApproxInt_ImpPrmSvSurfaces::TangencyOnSurf2(const Standard_Real u1, - const Standard_Real v1, - const Standard_Real u2, - const Standard_Real v2, - gp_Vec2d& T) { - gp_Pnt aP; - gp_Vec aT; - gp_Vec2d aTS1,aTS2; - Standard_Real tu1=u1; - Standard_Real tu2=u2; - Standard_Real tv1=v1; - Standard_Real tv2=v2; - Standard_Boolean t=this->Compute(tu1,tv1,tu2,tv2,aP,aT,aTS1,aTS2); - T=MyTguv2; - return(t); -} - -//======================================================================= -//function : Compute -//purpose : Computes point on curve, 3D and 2D-tangents of a curve and -// parameters on the surfaces. -//======================================================================= -Standard_Boolean ApproxInt_ImpPrmSvSurfaces::Compute( Standard_Real& u1, - Standard_Real& v1, - Standard_Real& u2, - Standard_Real& v2, - gp_Pnt& P, - gp_Vec& Tg, - gp_Vec2d& Tguv1, - gp_Vec2d& Tguv2) -{ - const IntSurf_Quadric& aQSurf = MyZerImpFunc.ISurface(); - const ThePSurface& aPSurf = MyZerImpFunc.PSurface(); - gp_Vec2d& aQuadTg = MyImplicitFirst ? Tguv1 : Tguv2; - gp_Vec2d& aPrmTg = MyImplicitFirst ? Tguv2 : Tguv1; - - //for square - const Standard_Real aNullValue = Precision::Approximation()* - Precision::Approximation(), - anAngTol = Precision::Angular(); - - Standard_Real tu1=u1; - Standard_Real tu2=u2; - Standard_Real tv1=v1; - Standard_Real tv2=v2; - - if(MyHasBeenComputed) { - if( (MyParOnS1.X()==u1)&&(MyParOnS1.Y()==v1) - &&(MyParOnS2.X()==u2)&&(MyParOnS2.Y()==v2)) { - return(MyIsTangent); - } - else if(MyHasBeenComputedbis == Standard_False) { - MyTgbis = MyTg; - MyTguv1bis = MyTguv1; - MyTguv2bis = MyTguv2; - MyPntbis = MyPnt; - MyParOnS1bis = MyParOnS1; - MyParOnS2bis = MyParOnS2; - MyIsTangentbis = MyIsTangent; - MyHasBeenComputedbis = MyHasBeenComputed; - } - } - - if(MyHasBeenComputedbis) { - if( (MyParOnS1bis.X()==u1)&&(MyParOnS1bis.Y()==v1) - &&(MyParOnS2bis.X()==u2)&&(MyParOnS2bis.Y()==v2)) { - - gp_Vec TV(MyTg); - gp_Vec2d TV1(MyTguv1); - gp_Vec2d TV2(MyTguv2); - gp_Pnt TP(MyPnt); - gp_Pnt2d TP1(MyParOnS1); - gp_Pnt2d TP2(MyParOnS2); - Standard_Boolean TB=MyIsTangent; - - MyTg = MyTgbis; - MyTguv1 = MyTguv1bis; - MyTguv2 = MyTguv2bis; - MyPnt = MyPntbis; - MyParOnS1 = MyParOnS1bis; - MyParOnS2 = MyParOnS2bis; - MyIsTangent = MyIsTangentbis; - - MyTgbis = TV; - MyTguv1bis = TV1; - MyTguv2bis = TV2; - MyPntbis = TP; - MyParOnS1bis = TP1; - MyParOnS2bis = TP2; - MyIsTangentbis = TB; - - return(MyIsTangent); - } - } - - math_Vector X(1,2); - math_Vector BornInf(1,2), BornSup(1,2), Tolerance(1,2); - //--- ThePSurfaceTool::GetResolution(aPSurf,Tolerance(1),Tolerance(2)); - Tolerance(1) = 1.0e-8; Tolerance(2) = 1.0e-8; - Standard_Real binfu,bsupu,binfv,bsupv; - binfu = ThePSurfaceTool::FirstUParameter(aPSurf); - binfv = ThePSurfaceTool::FirstVParameter(aPSurf); - bsupu = ThePSurfaceTool::LastUParameter(aPSurf); - bsupv = ThePSurfaceTool::LastVParameter(aPSurf); - BornInf(1) = binfu; BornSup(1) = bsupu; - BornInf(2) = binfv; BornSup(2) = bsupv; - Standard_Real TranslationU = 0., TranslationV = 0.; - - if (!FillInitialVectorOfSolution(u1, v1, u2, v2, - binfu, bsupu, binfv, bsupv, - X, - TranslationU, TranslationV)) - { - MyIsTangent=MyIsTangentbis=Standard_False; - MyHasBeenComputed = MyHasBeenComputedbis = Standard_False; - return(Standard_False); - } - - Standard_Boolean aRsnldIsDone = Standard_False; - Standard_Real PourTesterU = X(1); - Standard_Real PourTesterV = X(2); - if (GetUseSolver()) - { - math_FunctionSetRoot Rsnld(MyZerImpFunc); - Rsnld.SetTolerance(Tolerance); - Rsnld.Perform(MyZerImpFunc, X, BornInf, BornSup); - aRsnldIsDone = Rsnld.IsDone(); - if (aRsnldIsDone) - Rsnld.Root(X); - } - if(aRsnldIsDone || !GetUseSolver()) - { - MyHasBeenComputed = Standard_True; - - Standard_Real DistAvantApresU = Abs(PourTesterU-X(1)); - Standard_Real DistAvantApresV = Abs(PourTesterV-X(2)); - - MyPnt = P = ThePSurfaceTool::Value(aPSurf, X(1), X(2)); - - if( (DistAvantApresV <= 0.001 ) && - (DistAvantApresU <= 0.001 )) - { - gp_Vec aD1uPrm,aD1vPrm; - gp_Vec aD1uQuad,aD1vQuad; - - if(MyImplicitFirst) - { - u2 = X(1)-TranslationU; - v2 = X(2)-TranslationV; - - if(aQSurf.TypeQuadric() != GeomAbs_Plane) - { - while(u1-tu1>M_PI) u1-=M_PI+M_PI; - while(tu1-u1>M_PI) u1+=M_PI+M_PI; - } - - MyParOnS1.SetCoord(tu1,tv1); - MyParOnS2.SetCoord(tu2,tv2); - - gp_Pnt aP2; - - ThePSurfaceTool::D1(aPSurf, X(1), X(2), P, aD1uPrm, aD1vPrm); - aQSurf.D1(u1,v1, aP2, aD1uQuad, aD1vQuad); - - //Middle-point of P-P2 segment - P.BaryCenter(1.0, aP2, 1.0); - } - else - { - u1 = X(1)-TranslationU; - v1 = X(2)-TranslationV; - //aQSurf.Parameters(P, u2, v2); - if(aQSurf.TypeQuadric() != GeomAbs_Plane) - { - while(u2-tu2>M_PI) u2-=M_PI+M_PI; - while(tu2-u2>M_PI) u2+=M_PI+M_PI; - } - - MyParOnS1.SetCoord(tu1,tv1); - MyParOnS2.SetCoord(tu2,tu2); - - gp_Pnt aP2; - ThePSurfaceTool::D1(aPSurf, X(1), X(2), P, aD1uPrm, aD1vPrm); - - aQSurf.D1(u2, v2, aP2, aD1uQuad, aD1vQuad); - - //Middle-point of P-P2 segment - P.BaryCenter(1.0, aP2, 1.0); - } - - MyPnt = P; - - //Normals to the surfaces - gp_Vec aNormalPrm(aD1uPrm.Crossed(aD1vPrm)), - aNormalImp(aQSurf.Normale(MyPnt)); - - const Standard_Real aSQMagnPrm = aNormalPrm.SquareMagnitude(), - aSQMagnImp = aNormalImp.SquareMagnitude(); - - Standard_Boolean isPrmSingular = Standard_False, - isImpSingular = Standard_False; - - if(IsSingular(aD1uPrm, aD1vPrm, aNullValue, anAngTol)) - { - isPrmSingular = Standard_True; - if(!SingularProcessing(aD1uPrm, aD1vPrm, Standard_True, - aNullValue, anAngTol, Tg, aPrmTg)) - { - MyIsTangent = Standard_False; - MyHasBeenComputed = MyHasBeenComputedbis = Standard_False; - return Standard_False; - } - - MyTg = Tg; - } - else - { - aNormalPrm.Divide(sqrt(aSQMagnPrm)); - } - - //Analogically for implicit surface - if(aSQMagnImp < aNullValue) - { - isImpSingular = Standard_True; - - if(!SingularProcessing(aD1uQuad, aD1vQuad, !isPrmSingular, - aNullValue, anAngTol, Tg, aQuadTg)) - { - MyIsTangent = Standard_False; - MyHasBeenComputed = MyHasBeenComputedbis = Standard_False; - return Standard_False; - } - - MyTg = Tg; - } - else - { - aNormalImp.Divide(sqrt(aSQMagnImp)); - } - - if(isImpSingular && isPrmSingular) - { - //All is OK. All abnormal cases were processed above. - - MyTguv1 = Tguv1; - MyTguv2 = Tguv2; - - MyIsTangent=Standard_True; - return MyIsTangent; - } - else if(!(isImpSingular || isPrmSingular)) - { - //Processing pure non-singular case - //(3D- and 2D-tangents are still not defined) - - //Ask to pay attention to the fact that here - //aNormalImp and aNormalPrm are normalized. - //Therefore, @ \left \| \vec{Tg} \right \| = 0.0 @ - //if and only if (aNormalImp || aNormalPrm). - Tg = aNormalImp.Crossed(aNormalPrm); - } - - const Standard_Real aSQMagnTg = Tg.SquareMagnitude(); - - if(aSQMagnTg < aNullValue) - { - MyIsTangent = Standard_False; - MyHasBeenComputed = MyHasBeenComputedbis = Standard_False; - return Standard_False; - } - - //Normalize Tg vector - Tg.Divide(sqrt(aSQMagnTg)); - MyTg = Tg; - - if(!isPrmSingular) - { - //If isPrmSingular==TRUE then aPrmTg has already been computed. - - if(!NonSingularProcessing(aD1uPrm, aD1vPrm, Tg, aNullValue, anAngTol, aPrmTg)) - { - MyIsTangent = Standard_False; - MyHasBeenComputed = MyHasBeenComputedbis = Standard_False; - return Standard_False; - } - } - - if(!isImpSingular) - { - //If isImpSingular==TRUE then aQuadTg has already been computed. - - if(!NonSingularProcessing(aD1uQuad, aD1vQuad, Tg, aNullValue, anAngTol, aQuadTg)) - { - MyIsTangent = Standard_False; - MyHasBeenComputed = MyHasBeenComputedbis = Standard_False; - return Standard_False; - } - } - - MyTguv1 = Tguv1; - MyTguv2 = Tguv2; - - MyIsTangent=Standard_True; - -#ifdef OCCT_DEBUG - //cout << "+++++++++++++++++ ApproxInt_ImpPrmSvSurfaces::Compute(...) ++++++++++" << endl; - //printf( "P2d_1(%+10.20f, %+10.20f); P2d_2(%+10.20f, %+10.20f)\n" - // "P(%+10.20f, %+10.20f, %+10.20f);\n" - // "Tg = {%+10.20f, %+10.20f, %+10.20f};\n" - // "Tguv1 = {%+10.20f, %+10.20f};\n" - // "Tguv2 = {%+10.20f, %+10.20f}\n", - // u1, v1, u2, v2, - // P.X(), P.Y(), P.Z(), - // Tg.X(), Tg.Y(), Tg.Z(), - // Tguv1.X(), Tguv1.Y(), Tguv2.X(), Tguv2.Y()); - //cout << "-----------------------------------------------------------------------" << endl; -#endif - - return Standard_True; - } - else { - //-- cout<<" ApproxInt_ImpImpSvSurfaces.gxx : Distance apres recadrage Trop Grande "< u1)? -1 : 1; - while (Abs(u1 - NewU1) > M_PI) - NewU1 += sign*(M_PI+M_PI); - } - } - else - { - NewU1 = X(1)-TranslationU; - NewV1 = X(2)-TranslationV; - - aQSurf.Parameters(MyPnt, NewU2, NewV2); - //adjust U - if (aQSurf.TypeQuadric() != GeomAbs_Plane) - { - Standard_Real sign = (NewU2 > u2)? -1 : 1; - while (Abs(u2 - NewU2) > M_PI) - NewU2 += sign*(M_PI+M_PI); - } - } - } - else - return Standard_False; - - Point.SetValue(MyPnt, NewU1, NewV1, NewU2, NewV2); - return Standard_True; -} -//-------------------------------------------------------------------------------- - -Standard_Boolean -ApproxInt_ImpPrmSvSurfaces::FillInitialVectorOfSolution(const Standard_Real u1, - const Standard_Real v1, - const Standard_Real u2, - const Standard_Real v2, - const Standard_Real binfu, - const Standard_Real bsupu, - const Standard_Real binfv, - const Standard_Real bsupv, - math_Vector& X, - Standard_Real& TranslationU, - Standard_Real& TranslationV) -{ - const ThePSurface& aPSurf = MyZerImpFunc.PSurface(); - - math_Vector F(1,1); - - TranslationU = 0.0; - TranslationV = 0.0; - - if(MyImplicitFirst) { - if(u2bsupu+0.0000000001) { - if(ThePSurfaceTool::IsUPeriodic(aPSurf)) { - Standard_Real d = ThePSurfaceTool::UPeriod(aPSurf); - do { TranslationU-=d; } while(u2+TranslationU > bsupu); - } - else - return(Standard_False); - } - if(v2bsupv+0.0000000001) { - if(ThePSurfaceTool::IsVPeriodic(aPSurf)) { - Standard_Real d = ThePSurfaceTool::VPeriod(aPSurf); - do { TranslationV-=d; } while(v2+TranslationV > bsupv); - } - else - return(Standard_False); - } - X(1) = u2+TranslationU; - X(2) = v2+TranslationV; - } - else { - if(u1bsupu+0.0000000001) { - if(ThePSurfaceTool::IsUPeriodic(aPSurf)) { - Standard_Real d = ThePSurfaceTool::UPeriod(aPSurf); - do { TranslationU-=d; } while(u1+TranslationU > bsupu); - } - else - return(Standard_False); - } - if(v1bsupv+0.0000000001) { - if(ThePSurfaceTool::IsVPeriodic(aPSurf)) { - Standard_Real d = ThePSurfaceTool::VPeriod(aPSurf); - do { TranslationV-=d; } while(v1+TranslationV > bsupv); - } - else - return(Standard_False); - } - X(1) = u1+TranslationU; - X(2) = v1+TranslationV; - } - - //---------------------------------------------------- - //Make a small step from boundaries in order to avoid - //finding "outboundaried" solution (Rsnld -> NotDone). - if (GetUseSolver()) - { - Standard_Real du = Max(Precision::Confusion(), ThePSurfaceTool::UResolution(aPSurf, Precision::Confusion())); - Standard_Real dv = Max(Precision::Confusion(), ThePSurfaceTool::VResolution(aPSurf, Precision::Confusion())); - if (X(1) - 0.0000000001 <= binfu) X(1) = X(1) + du; - if (X(1) + 0.0000000001 >= bsupu) X(1) = X(1) - du; - if (X(2) - 0.0000000001 <= binfv) X(2) = X(2) + dv; - if (X(2) + 0.0000000001 >= bsupv) X(2) = X(2) - dv; - } - - return Standard_True; -} diff --git a/opencascade/ApproxInt_KnotTools.hxx b/opencascade/ApproxInt_KnotTools.hxx index b2bfa6c6b..5a23977e1 100644 --- a/opencascade/ApproxInt_KnotTools.hxx +++ b/opencascade/ApproxInt_KnotTools.hxx @@ -14,28 +14,29 @@ #ifndef _ApproxInt_KnotTools_HeaderFile #define _ApproxInt_KnotTools_HeaderFile +#include +#include +#include +#include +#include +#include #include +#include #include -#include #include -#include +#include +#include #include -#include -#include #include -#include -#include -#include -#include -#include class IntPatch_WLine; // Corresponds for debug information output. // Debug information is also printed when OCCT_DEBUG defined. -//#define APPROXINT_KNOTTOOLS_DEBUG +// #define APPROXINT_KNOTTOOLS_DEBUG -//! This class intended to build knots sequence on discrete set of points for further approximation into bspline curve. +//! This class intended to build knots sequence on discrete set of points for further approximation +//! into bspline curve. //! //! Short description of algorithm: //! 1) Build discrete curvature on points set. @@ -47,7 +48,6 @@ class IntPatch_WLine; class ApproxInt_KnotTools { public: - DEFINE_STANDARD_ALLOC //! Main function to build optimal knot sequence. @@ -61,34 +61,33 @@ public: //! @param theApproxU2V2 - Flag existence of second 2d set. //! @param theMinNbPnts - Minimal number of points per knot interval. //! @param theKnots - output knots sequence. - Standard_EXPORT static void BuildKnots(const TColgp_Array1OfPnt& thePntsXYZ, - const TColgp_Array1OfPnt2d& thePntsU1V1, - const TColgp_Array1OfPnt2d& thePntsU2V2, - const math_Vector& thePars, - const Standard_Boolean theApproxXYZ, - const Standard_Boolean theApproxU1V1, - const Standard_Boolean theApproxU2V2, - const Standard_Integer theMinNbPnts, + Standard_EXPORT static void BuildKnots(const TColgp_Array1OfPnt& thePntsXYZ, + const TColgp_Array1OfPnt2d& thePntsU1V1, + const TColgp_Array1OfPnt2d& thePntsU2V2, + const math_Vector& thePars, + const Standard_Boolean theApproxXYZ, + const Standard_Boolean theApproxU1V1, + const Standard_Boolean theApproxU2V2, + const Standard_Integer theMinNbPnts, NCollection_Vector& theKnots); //! Builds discrete curvature - Standard_EXPORT static void BuildCurvature( - const NCollection_LocalArray& theCoords, - const Standard_Integer theDim, - const math_Vector& thePars, - TColStd_Array1OfReal& theCurv, - Standard_Real& theMaxCurv); - - //! Defines preferable parametrization type for theWL - Standard_EXPORT static Approx_ParametrizationType DefineParType(const Handle(IntPatch_WLine)& theWL, - const Standard_Integer theFpar, const Standard_Integer theLpar, - const Standard_Boolean theApproxXYZ, - const Standard_Boolean theApproxU1V1, - const Standard_Boolean theApproxU2V2); + Standard_EXPORT static void BuildCurvature(const NCollection_LocalArray& theCoords, + const Standard_Integer theDim, + const math_Vector& thePars, + TColStd_Array1OfReal& theCurv, + Standard_Real& theMaxCurv); + //! Defines preferable parametrization type for theWL + Standard_EXPORT static Approx_ParametrizationType DefineParType( + const Handle(IntPatch_WLine)& theWL, + const Standard_Integer theFpar, + const Standard_Integer theLpar, + const Standard_Boolean theApproxXYZ, + const Standard_Boolean theApproxU1V1, + const Standard_Boolean theApproxU2V2); private: - //! Compute indices of knots: //! //! I: Build discrete curvature in points set, @@ -100,25 +99,25 @@ private: //! //! IV: Put additional knots near extrema points. static void ComputeKnotInds(const NCollection_LocalArray& theCoords, - const Standard_Integer theDim, - const math_Vector& thePars, - NCollection_Sequence& theInds); + const Standard_Integer theDim, + const math_Vector& thePars, + NCollection_Sequence& theInds); //! Insert knots before index I. //! //! I: Check curvature change: - //! if ( maxCurvature / minCurvature ) of current interval greater than + //! if ( maxCurvature / minCurvature ) of current interval greater than //! threshold value, then stop and use upper index as knot. //! //! II: Check midpoint criteria: //! If exist point between two knot indices with angle greater than //! threshold value, then stop and put this index as knot. - static Standard_Boolean InsKnotBefI(const Standard_Integer theI, - const TColStd_Array1OfReal& theCurv, + static Standard_Boolean InsKnotBefI(const Standard_Integer theI, + const TColStd_Array1OfReal& theCurv, const NCollection_LocalArray& theCoords, - const Standard_Integer theDim, - NCollection_Sequence& theInds, - const Standard_Boolean ChkCurv); + const Standard_Integer theDim, + NCollection_Sequence& theInds, + const Standard_Boolean ChkCurv); //! Perform knots filtration. //! @@ -127,9 +126,9 @@ private: //! II: Filter points with too small amount of points per knot interval. //! //! III: Fill Last Knot. - static void FilterKnots(NCollection_Sequence& theInds, - const Standard_Integer theMinNbPnts, - NCollection_Vector& theLKnots); + static void FilterKnots(NCollection_Sequence& theInds, + const Standard_Integer theMinNbPnts, + NCollection_Vector& theLKnots); }; #endif diff --git a/opencascade/ApproxInt_MultiLine.gxx b/opencascade/ApproxInt_MultiLine.gxx deleted file mode 100644 index 45225b136..000000000 --- a/opencascade/ApproxInt_MultiLine.gxx +++ /dev/null @@ -1,755 +0,0 @@ -// Created on: 1993-03-22 -// Created by: Laurent BUCHARD -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef DRAW -#include -#endif - -//======================================================================= -//function : Constructor -//purpose : -//======================================================================= -ApproxInt_MultiLine::ApproxInt_MultiLine() -{ - PtrOnmySvSurfaces = NULL; - myLine = NULL; - indicemin = 0; - indicemax = 0; - nbp3d = 0; - nbp2d = 0; - myApproxU1V1 = Standard_False; - myApproxU2V2 = Standard_False; - p2donfirst = Standard_True; - Xo = 0.; - Yo = 0.; - Zo = 0.; - U1o = 0.; - V1o = 0.; - U2o = 0.; - V2o = 0.; -} - -//======================================================================= -//function : Constructor -//purpose : -//======================================================================= -ApproxInt_MultiLine:: - ApproxInt_MultiLine(const Handle_TheLine& line, - const Standard_Address svsurf, - const Standard_Integer NbP3d, - const Standard_Integer NbP2d, - const Standard_Boolean ApproxU1V1, - const Standard_Boolean ApproxU2V2, - const Standard_Real xo, - const Standard_Real yo, - const Standard_Real zo, - const Standard_Real u1o, - const Standard_Real v1o, - const Standard_Real u2o, - const Standard_Real v2o, - const Standard_Boolean P2DOnFirst, - const Standard_Integer IndMin, - const Standard_Integer IndMax): PtrOnmySvSurfaces(svsurf), - myLine(line), - indicemin(Min(IndMin, IndMax)), - indicemax(Max(IndMin, IndMax)), - nbp3d(NbP3d), nbp2d(NbP2d), - myApproxU1V1(ApproxU1V1), - myApproxU2V2(ApproxU2V2), - p2donfirst(P2DOnFirst), - Xo(xo), Yo(yo), Zo(zo), - U1o(u1o), V1o(v1o), - U2o(u2o), V2o(v2o) - -{ -#ifdef OCCT_DEBUG - //if(indicemin == indicemax) - //{ - // cout<<"ApproxInt_MultiLine: indicemin = indicemax = " << indicemin << endl; - //} -#endif -} - -//======================================================================= -//function : Constructor -//purpose : -//======================================================================= -ApproxInt_MultiLine:: - ApproxInt_MultiLine(const Handle_TheLine& line, - const Standard_Integer NbP3d, - const Standard_Integer NbP2d, - const Standard_Boolean ApproxU1V1, - const Standard_Boolean ApproxU2V2, - const Standard_Real xo, - const Standard_Real yo, - const Standard_Real zo, - const Standard_Real u1o, - const Standard_Real v1o, - const Standard_Real u2o, - const Standard_Real v2o, - const Standard_Boolean P2DOnFirst, - const Standard_Integer IndMin, - const Standard_Integer IndMax): PtrOnmySvSurfaces(0), - myLine(line), - indicemin(Min(IndMin, IndMax)), - indicemax(Max(IndMin, IndMax)), - nbp3d(NbP3d), nbp2d(NbP2d), - myApproxU1V1(ApproxU1V1), - myApproxU2V2(ApproxU2V2), - p2donfirst(P2DOnFirst), - Xo(xo), Yo(yo), Zo(zo), - U1o(u1o), V1o(v1o), - U2o(u2o), V2o(v2o) -{ -#ifdef OCCT_DEBUG - //if(indicemin == indicemax) - //{ - // cout<<"ApproxInt_MultiLine: indicemin = indicemax = " << indicemin << endl; - //} -#endif -} - -//-------------------------------------------------------------------------------- -Standard_Integer ApproxInt_MultiLine::FirstPoint() const { - return indicemin; -} -//-------------------------------------------------------------------------------- -Standard_Integer ApproxInt_MultiLine::LastPoint() const { - return indicemax; -} -//-------------------------------------------------------------------------------- -Approx_Status ApproxInt_MultiLine::WhatStatus() const { - if(PtrOnmySvSurfaces) - return Approx_PointsAdded; - else - return Approx_NoPointsAdded; -} -//-------------------------------------------------------------------------------- -Standard_Integer ApproxInt_MultiLine::NbP3d() const { - return nbp3d; -} -//-------------------------------------------------------------------------------- -Standard_Integer ApproxInt_MultiLine::NbP2d() const { - return nbp2d; -} -//================================================================================ -void ApproxInt_MultiLine::Value(const Standard_Integer Index, - TColgp_Array1OfPnt& TabPnt) const -{ - const gp_Pnt aP = myLine->Point(Index).Value(); - TabPnt(1).SetCoord(aP.X()+Xo, aP.Y()+Yo, aP.Z()+Zo); -} - -//======================================================================= -//function : Value -//purpose : -//======================================================================= -void ApproxInt_MultiLine::Value(const Standard_Integer Index, - TColgp_Array1OfPnt2d& TabPnt2d) const -{ - IntSurf_PntOn2S POn2S(myLine->Point(Index)); - Standard_Real u1 = 0.0, u2 = 0.0, v1 = 0.0, v2 = 0.0; - POn2S.Parameters(u1, v1, u2, v2); - if(nbp2d==1) - { - if(p2donfirst) - { - TabPnt2d(1).SetCoord(u1+U1o, v1+V1o); - } - else - { - TabPnt2d(1).SetCoord(u2+U2o, v2+V2o); - } - } - else - { - TabPnt2d(1).SetCoord(u1+U1o, v1+V1o); - if(TabPnt2d.Length() >= 2) - { - TabPnt2d(2).SetCoord(u2+U2o, v2+V2o); - } - } -} - -//======================================================================= -//function : Value -//purpose : -//======================================================================= -void ApproxInt_MultiLine::Value(const Standard_Integer Index, - TColgp_Array1OfPnt& TabPnt, - TColgp_Array1OfPnt2d& TabPnt2d) const -{ - Value(Index, TabPnt); - Value(Index, TabPnt2d); -} - -//======================================================================= -//function : Tangency -//purpose : -//======================================================================= -Standard_Boolean ApproxInt_MultiLine::Tangency( const Standard_Integer Index, - TColgp_Array1OfVec& TabVec) const -{ - if(PtrOnmySvSurfaces==NULL) - return Standard_False; - - const IntSurf_PntOn2S& POn2S = myLine->Point(Index); - Standard_Real u1 = 0.0, u2 = 0.0, v1 = 0.0, v2 = 0.0; - POn2S.Parameters(u1,v1,u2,v2); - - Standard_Boolean ret= - ((TheSvSurfaces *)PtrOnmySvSurfaces)->Tangency(u1, v1, u2, v2, TabVec(1)); - if(!ret) - { - TabVec(1).SetCoord(0.0, 0.0, 0.0); - } - - return ret; -} - -//======================================================================= -//function : Tangency -//purpose : -//======================================================================= -Standard_Boolean ApproxInt_MultiLine::Tangency( const Standard_Integer Index, - TColgp_Array1OfVec2d& TabVec2d) const -{ - if(PtrOnmySvSurfaces==NULL) - return Standard_False; - - const IntSurf_PntOn2S& POn2S = myLine->Point(Index); - Standard_Real u1 = 0.0, u2 = 0.0, v1 = 0.0, v2 = 0.0; - POn2S.Parameters(u1,v1,u2,v2); - - Standard_Boolean ret = Standard_False; - if(nbp2d==1) - { - if(p2donfirst) - { - ret=((TheSvSurfaces *)PtrOnmySvSurfaces)->TangencyOnSurf1(u1, v1, u2, v2, TabVec2d(1)); - } - else - { - ret=((TheSvSurfaces *)PtrOnmySvSurfaces)->TangencyOnSurf2(u1, v1, u2, v2, TabVec2d(1)); - } - } - else - { - ret=((TheSvSurfaces *)PtrOnmySvSurfaces)->TangencyOnSurf1(u1, v1, u2, v2, TabVec2d(1)); - if(ret) - { - if(TabVec2d.Length()>=2) - { - ret = - (ret && - ((TheSvSurfaces *)PtrOnmySvSurfaces)-> - TangencyOnSurf2(u1, v1, u2, v2, TabVec2d(2))); - } - } - } - - if(!ret) - { - TabVec2d(1) = gp_Vec2d(0.0, 0.0); - if(TabVec2d.Length() >= 2) - { - TabVec2d(2) = gp_Vec2d(0.0,0.0); - } - } - - return ret; -} - -//======================================================================= -//function : Tangency -//purpose : -//======================================================================= -Standard_Boolean ApproxInt_MultiLine::Tangency( const Standard_Integer Index, - TColgp_Array1OfVec& TabVec, - TColgp_Array1OfVec2d& TabVec2d) const -{ - return (Tangency(Index, TabVec) && Tangency(Index, TabVec2d)); -} - -//======================================================================= -//function : MakeMLBetween -//purpose : -//======================================================================= -ApproxInt_MultiLine - ApproxInt_MultiLine::MakeMLBetween( const Standard_Integer Low, - const Standard_Integer High, - const Standard_Integer aNbPntsToInsert) const -{ - if(PtrOnmySvSurfaces==NULL) { - //-- cout<<"\n Erreur dans : ApproxInt_MultiLine ApproxInt_MultiLine::MakeMLBetween "<GetUseSolver(); - if (!aSaveUseSolver) - { - ((TheSvSurfaces *)PtrOnmySvSurfaces)->SetUseSolver(Standard_True); - } - Standard_Integer NbPntsToInsert=aNbPntsToInsert; - if(NbPntsToInsert<(High-Low)) NbPntsToInsert=(High-Low); - Standard_Integer NbPnts = NbPntsToInsert + High - Low + 1; - Standard_Integer NbPntsmin = High-Low; - NbPntsmin+=NbPntsmin; - - if(NbPntsPoint(Low).Parameters(u1,v1,u2,v2); - U1(Low) = u1; - V1(Low) = v1; - U2(Low) = u2; - V2(Low) = v2; - AC(Low) =0.0; - -#if 0 - for( i=Low+1; i<=High; i++) { - myLine->Point(i).Parameters(u1,v1,u2,v2); - U1(i) = u1; - V1(i) = v1; - U2(i) = u2; - V2(i) = v2; - - Standard_Real du1=u1-U1(i-1); - Standard_Real dv1=v1-V1(i-1); - - AC(i) = AC(i-1) + sqrt((du1*du1)+(dv1*dv1)); - } -#else - //-- Essai du 19 juin 96 (parametrage selon abs curv en XYZ) - for( i=Low+1; i<=High; i++) { - myLine->Point(i).Parameters(u1,v1,u2,v2); - U1(i) = u1; - V1(i) = v1; - U2(i) = u2; - V2(i) = v2; - AC(i) = AC(i-1) + (myLine->Point(i-1).Value()).Distance(myLine->Point(i).Value()); - } - -#endif - //------------------------------------------------------------- - //-- Creation des structures contenant les resultats - - Handle(IntSurf_LineOn2S) ResultPntOn2SLine = new IntSurf_LineOn2S(); - - IntSurf_PntOn2S StartPOn2S; - TColStd_Array1OfReal StartParams(1,4); - - ds = AC(High) / (NbPnts-1); - Standard_Integer Indice = Low; - Standard_Boolean HasBeenInserted = Standard_False; - Standard_Real dsmin = ds*0.3; - Standard_Real smax = AC(High); - - for(i=2,s=ds; (s < smax && Indice <= High-1); i++,s+=ds) { - //---------------------------------------------------------- - //-- Recherche des indices des points -- - //-- Point : 2 i NbPnts-1 -- - //-- s s -- - //-- Current Indice tel que AC(Indice)<= s < AC(Indice+1) -- - //---------------------------------------------------------- - while(AC(Indice+1) <= s) - { - if(!HasBeenInserted) - ResultPntOn2SLine->Add(myLine->Point(Indice)); - - HasBeenInserted = Standard_False; - Indice++; - if (Indice == High) - break; - } - - if (Indice == High) - break; - - if(!HasBeenInserted && AC(Indice) <= s) - { - ResultPntOn2SLine->Add(myLine->Point(Indice)); - HasBeenInserted = Standard_True; - } - - Standard_Real a = s - AC(Indice); - Standard_Real b = AC(Indice+1) - s; - Standard_Real nab = 1.0/(a+b); - - //---------------------------------------------------------- - //-- Verification : Si Dist au prochain point < dsmin -- - //-- Si Dist au precedent point < dsmin -- - //-- -- - //---------------------------------------------------------- - if((a>dsmin) && (b>dsmin)) - { - u1 = (U1(Indice) * b + U1(Indice+1) * a) * nab; - v1 = (V1(Indice) * b + V1(Indice+1) * a) * nab; - u2 = (U2(Indice) * b + U2(Indice+1) * a) * nab; - v2 = (V2(Indice) * b + V2(Indice+1) * a) * nab; - - if(((TheSvSurfaces *)PtrOnmySvSurfaces)->Compute(u1,v1,u2,v2,P,T,TS1,TS2)) - { - StartPOn2S.SetValue(P,u1,v1,u2,v2); - //-- cout<<" Insertion du point calcule : "<Add(StartPOn2S); - } - else - { - //-- cout<<" Probleme Non Traite ds ApproxInt_ApproxIntIntersection "<Add(myLine->Point(Indice)); - - //-- cout<<" Insertion du point :"<Add(myLine->Point(Indice)); - HasBeenInserted = Standard_True; - } - } - else - { - s+= (dsmin - ds); - } - } - } - - ResultPntOn2SLine->Add(myLine->Point(High)); //-- Point NbPnts - Handle(TheLine) temp = new TheLine(ResultPntOn2SLine,Standard_False); - - //-- Verification a posteriori - //-- On verifie qu il n y a pas de virage trop important en 2d et en 3d - - temp->Point(1).Parameters(u1,v1,u2,v2); - gp_Pnt2d P1A(u1,v1); - gp_Pnt2d P2A(u2,v2); - - temp->Point(2).Parameters(u1,v1,u2,v2); - gp_Pnt2d P1B(u1,v1); - gp_Pnt2d P2B(u2,v2); - - gp_Pnt2d P1C,P2C; - - Standard_Integer CodeErreur=0; - - for(i=3,NbPnts=temp->NbPnts();CodeErreur==0 && i<=NbPnts; i++) - { - Standard_Real d,du,dv,duv2; - temp->Point(i).Parameters(u1,v1,u2,v2); - //-- Virage P1A P1B P1C - P1C.SetCoord(u1,v1); - du = P1B.X()-P1A.X(); - dv = P1B.Y()-P1A.Y(); - duv2= 0.25*(du*du+dv*dv); - u1 = P1B.X() + du; - v1 = P1B.Y() + dv; - du = P1C.X() - u1; - dv = P1C.Y() - v1; - d = du*du+dv*dv; - if(d>duv2) - { - CodeErreur = 1; - CodeErreur = 1; - break; - } - - //-- Virage P2A P2B P2C - P2C.SetCoord(u2,v2); - du = P2B.X()-P2A.X(); - dv = P2B.Y()-P2A.Y(); - duv2= 0.25*(du*du+dv*dv); - u2 = P2B.X() + du; - v2 = P2B.Y() + dv; - du = P2C.X() - u2; - dv = P2C.Y() - v2; - d = du*du+dv*dv; - if(d>duv2) - { - CodeErreur = 2; - break; - } - - P1A=P1B; - P2A=P2B; - P1B=P1C; - P2B=P2C; - } - -#ifdef OCCT_DEBUG - //if (temp->NbPnts() < NbPntsToInsert + High - Low + 1) - //{ - // cout<<" *** Pas assez de points entre :"<< - // Low<<" et "< "<NbPnts()<NbPnts() >= NbPntsToInsert + High - Low + 1) && (CodeErreur==0)) - { - ((TheSvSurfaces *)PtrOnmySvSurfaces)->SetUseSolver(aSaveUseSolver); - return (ApproxInt_MultiLine( temp, - (High-Low>10)? PtrOnmySvSurfaces : NULL, - nbp3d, - nbp2d, - myApproxU1V1, myApproxU2V2, - Xo,Yo,Zo, - U1o,V1o, - U2o,V2o, - p2donfirst, - 1,ResultPntOn2SLine->NbPoints())); - } - else - { - //-- cout<<" ApproxInt_MultiLine "<SetUseSolver(aSaveUseSolver); - theNewMultiLine = ApproxInt_MultiLine( temp, - PtrOnmySvSurfaces, - nbp3d, - nbp2d, - myApproxU1V1, - myApproxU2V2, - Xo,Yo,Zo, - U1o,V1o, - U2o,V2o, - p2donfirst, - 1,ResultPntOn2SLine->NbPoints()); - return Standard_True; -} - -//======================================================================= -//function : Dump -//purpose : -//======================================================================= -void ApproxInt_MultiLine::Dump() const -{ - TColgp_Array1OfPnt anArr1(1, 1); - TColgp_Array1OfPnt2d anArr2(1, 2); - - const Standard_Integer anIndF = FirstPoint(), - anIndL = LastPoint(); - - for(Standard_Integer ind = anIndF; ind <= anIndL; ind++) - { - Value(ind, anArr1, anArr2); - printf("%4d [%+10.20f %+10.20f %+10.20f] " - "[%+10.20f %+10.20f] [%+10.20f %+10.20f]\n", - ind, anArr1(1).X(), anArr1(1).Y(), anArr1(1).Z(), anArr2(1).X(), - anArr2(1).Y(),anArr2(2).X(),anArr2(2).Y()); - } -} - diff --git a/opencascade/ApproxInt_MultiLineTool.lxx b/opencascade/ApproxInt_MultiLineTool.lxx index c047e781a..1a69839e0 100644 --- a/opencascade/ApproxInt_MultiLineTool.lxx +++ b/opencascade/ApproxInt_MultiLineTool.lxx @@ -23,110 +23,163 @@ #include -//================================================================================ -inline Standard_Integer ApproxInt_MultiLineTool::NbP2d(const TheMultiLine& ML) { - return(ML.NbP2d()); -} -//-------------------------------------------------------------------------------- -inline Standard_Integer ApproxInt_MultiLineTool::NbP3d(const TheMultiLine& ML) { - return(ML.NbP3d()); -} -//-------------------------------------------------------------------------------- -inline Standard_Integer ApproxInt_MultiLineTool::FirstPoint(const TheMultiLine& ML) { - return(ML.FirstPoint()); -} -//-------------------------------------------------------------------------------- -inline Standard_Integer ApproxInt_MultiLineTool::LastPoint(const TheMultiLine& ML) { - return(ML.LastPoint()); -} -//-------------------------------------------------------------------------------- -inline void ApproxInt_MultiLineTool::Value( const TheMultiLine& ML - ,const Standard_Integer Index - ,TColgp_Array1OfPnt& TabPnt) { - ML.Value(Index,TabPnt); -} -//-------------------------------------------------------------------------------- -inline void ApproxInt_MultiLineTool::Value( const TheMultiLine& ML - ,const Standard_Integer Index - ,TColgp_Array1OfPnt2d& TabPnt2d) { - ML.Value(Index,TabPnt2d); -} -//-------------------------------------------------------------------------------- -inline void ApproxInt_MultiLineTool::Value( const TheMultiLine& ML - ,const Standard_Integer Index - ,TColgp_Array1OfPnt& TabPnt - ,TColgp_Array1OfPnt2d& TabPnt2d) { - ML.Value(Index,TabPnt,TabPnt2d); -} -//-------------------------------------------------------------------------------- -inline Standard_Boolean ApproxInt_MultiLineTool::Tangency( const TheMultiLine& ML - ,const Standard_Integer Index - ,TColgp_Array1OfVec& TabVec) { - return(ML.Tangency(Index,TabVec)); -} -//-------------------------------------------------------------------------------- -inline Standard_Boolean ApproxInt_MultiLineTool::Tangency( const TheMultiLine& ML - ,const Standard_Integer Index - ,TColgp_Array1OfVec2d& TabVec2d) { - return(ML.Tangency(Index,TabVec2d)); -} -//-------------------------------------------------------------------------------- -inline Standard_Boolean ApproxInt_MultiLineTool::Tangency( const TheMultiLine& ML - ,const Standard_Integer Index - ,TColgp_Array1OfVec& TabVec - ,TColgp_Array1OfVec2d& TabVec2d) { - return(ML.Tangency(Index,TabVec,TabVec2d)); -} - -//-------------------------------------------------------------------------------- -inline Standard_Boolean ApproxInt_MultiLineTool::Curvature( const TheMultiLine& //ML - ,const Standard_Integer //Index - ,TColgp_Array1OfVec& ) { //TabVec +//================================================================================================= + +inline Standard_Integer ApproxInt_MultiLineTool::NbP2d(const TheMultiLine& ML) +{ + return (ML.NbP2d()); +} + +//================================================================================================= + +inline Standard_Integer ApproxInt_MultiLineTool::NbP3d(const TheMultiLine& ML) +{ + return (ML.NbP3d()); +} + +//================================================================================================= + +inline Standard_Integer ApproxInt_MultiLineTool::FirstPoint(const TheMultiLine& ML) +{ + return (ML.FirstPoint()); +} + +//================================================================================================= + +inline Standard_Integer ApproxInt_MultiLineTool::LastPoint(const TheMultiLine& ML) +{ + return (ML.LastPoint()); +} + +//================================================================================================= + +inline void ApproxInt_MultiLineTool::Value(const TheMultiLine& ML, + const Standard_Integer Index, + TColgp_Array1OfPnt& TabPnt) +{ + ML.Value(Index, TabPnt); +} + +//================================================================================================= + +inline void ApproxInt_MultiLineTool::Value(const TheMultiLine& ML, + const Standard_Integer Index, + TColgp_Array1OfPnt2d& TabPnt2d) +{ + ML.Value(Index, TabPnt2d); +} + +//================================================================================================= + +inline void ApproxInt_MultiLineTool::Value(const TheMultiLine& ML, + const Standard_Integer Index, + TColgp_Array1OfPnt& TabPnt, + TColgp_Array1OfPnt2d& TabPnt2d) +{ + ML.Value(Index, TabPnt, TabPnt2d); +} + +//================================================================================================= + +inline Standard_Boolean ApproxInt_MultiLineTool::Tangency(const TheMultiLine& ML, + const Standard_Integer Index, + TColgp_Array1OfVec& TabVec) +{ + return (ML.Tangency(Index, TabVec)); +} + +//================================================================================================= + +inline Standard_Boolean ApproxInt_MultiLineTool::Tangency(const TheMultiLine& ML, + const Standard_Integer Index, + TColgp_Array1OfVec2d& TabVec2d) +{ + return (ML.Tangency(Index, TabVec2d)); +} + +//================================================================================================= + +inline Standard_Boolean ApproxInt_MultiLineTool::Tangency(const TheMultiLine& ML, + const Standard_Integer Index, + TColgp_Array1OfVec& TabVec, + TColgp_Array1OfVec2d& TabVec2d) +{ + return (ML.Tangency(Index, TabVec, TabVec2d)); +} + +//================================================================================================= + +inline Standard_Boolean ApproxInt_MultiLineTool::Curvature(const TheMultiLine& // ML + , + const Standard_Integer // Index + , + TColgp_Array1OfVec&) +{ // TabVec return Standard_False; } -//-------------------------------------------------------------------------------- -inline Standard_Boolean ApproxInt_MultiLineTool::Curvature( const TheMultiLine& //ML - ,const Standard_Integer //Index - ,TColgp_Array1OfVec2d& ) { //TabVec2d + +//================================================================================================= + +inline Standard_Boolean ApproxInt_MultiLineTool::Curvature(const TheMultiLine& // ML + , + const Standard_Integer // Index + , + TColgp_Array1OfVec2d&) +{ // TabVec2d return Standard_False; } -//-------------------------------------------------------------------------------- -inline Standard_Boolean ApproxInt_MultiLineTool::Curvature( const TheMultiLine& //ML - ,const Standard_Integer //Index - ,TColgp_Array1OfVec& //TabVec - ,TColgp_Array1OfVec2d& ) { //TabVec2d + +//================================================================================================= + +inline Standard_Boolean ApproxInt_MultiLineTool::Curvature(const TheMultiLine& // ML + , + const Standard_Integer // Index + , + TColgp_Array1OfVec& // TabVec + , + TColgp_Array1OfVec2d&) +{ // TabVec2d return Standard_False; } -//-------------------------------------------------------------------------------- -inline Approx_Status ApproxInt_MultiLineTool::WhatStatus(const TheMultiLine& ML - ,const Standard_Integer - ,const Standard_Integer) { + +//================================================================================================= + +inline Approx_Status ApproxInt_MultiLineTool::WhatStatus(const TheMultiLine& ML, + const Standard_Integer, + const Standard_Integer) +{ //-- PointsAdded, //-- NoPointsAdded, //-- NoApproximation //-- Approx_PointsAdded - return(ML.WhatStatus()); -} -//-------------------------------------------------------------------------------- -inline TheMultiLine ApproxInt_MultiLineTool::MakeMLBetween(const TheMultiLine& ML, - const Standard_Integer I1, - const Standard_Integer I2, - const Standard_Integer NbPMin) { - - return(ML.MakeMLBetween(I1,I2,NbPMin)); -} -//-------------------------------------------------------------------------------- -inline Standard_Boolean ApproxInt_MultiLineTool::MakeMLOneMorePoint(const TheMultiLine& ML, + return (ML.WhatStatus()); +} + +//================================================================================================= + +inline TheMultiLine ApproxInt_MultiLineTool::MakeMLBetween(const TheMultiLine& ML, + const Standard_Integer I1, + const Standard_Integer I2, + const Standard_Integer NbPMin) +{ + + return (ML.MakeMLBetween(I1, I2, NbPMin)); +} + +//================================================================================================= + +inline Standard_Boolean ApproxInt_MultiLineTool::MakeMLOneMorePoint(const TheMultiLine& ML, const Standard_Integer I1, const Standard_Integer I2, const Standard_Integer indbad, TheMultiLine& OtherLine) -{ - return (ML.MakeMLOneMorePoint(I1,I2,indbad,OtherLine)); +{ + return (ML.MakeMLOneMorePoint(I1, I2, indbad, OtherLine)); } inline void ApproxInt_MultiLineTool::Dump(const TheMultiLine& ML) -{ +{ ML.Dump(); } -//================================================================================ + +//================================================================================================= diff --git a/opencascade/ApproxInt_PrmPrmSvSurfaces.gxx b/opencascade/ApproxInt_PrmPrmSvSurfaces.gxx deleted file mode 100644 index 3678c8fd5..000000000 --- a/opencascade/ApproxInt_PrmPrmSvSurfaces.gxx +++ /dev/null @@ -1,353 +0,0 @@ -// Created on: 1993-03-17 -// Created by: Laurent BUCHARD -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#define TOLTANGENCY 0.0000000001 - - -#include -#include -#include - -#define Debug(expr) std::cout<<" expr :"<Compute(tu1,tv1,tu2,tv2,aP,aT,aTS1,aTS2); - P=MyPnt; -} - -//======================================================================= -//function : SeekPoint -//purpose : Computes point on curve and -// parameters on the surfaces. -//======================================================================= -Standard_Boolean ApproxInt_PrmPrmSvSurfaces::SeekPoint(const Standard_Real u1, - const Standard_Real v1, - const Standard_Real u2, - const Standard_Real v2, - IntSurf_PntOn2S& Point) -{ - gp_Pnt aP; - gp_Vec aT; - gp_Vec2d aTS1,aTS2; - Standard_Real tu1=u1; - Standard_Real tu2=u2; - Standard_Real tv1=v1; - Standard_Real tv2=v2; - if (!Compute(tu1,tv1,tu2,tv2,aP,aT,aTS1,aTS2)) - return Standard_False; - - Point.SetValue(aP, tu1,tv1,tu2,tv2); - return Standard_True; -} -//-------------------------------------------------------------------------------- -Standard_Boolean ApproxInt_PrmPrmSvSurfaces::Tangency(const Standard_Real u1, - const Standard_Real v1, - const Standard_Real u2, - const Standard_Real v2, - gp_Vec& T) { - gp_Pnt aP; - gp_Vec aT; - gp_Vec2d aTS1,aTS2; - Standard_Real tu1=u1; - Standard_Real tu2=u2; - Standard_Real tv1=v1; - Standard_Real tv2=v2; - Standard_Boolean t=this->Compute(tu1,tv1,tu2,tv2,aP,aT,aTS1,aTS2); - T=MyTg; - return(t); -} -//-------------------------------------------------------------------------------- -Standard_Boolean ApproxInt_PrmPrmSvSurfaces::TangencyOnSurf1(const Standard_Real u1, - const Standard_Real v1, - const Standard_Real u2, - const Standard_Real v2, - gp_Vec2d& T) { - gp_Pnt aP; - gp_Vec aT; - gp_Vec2d aTS1,aTS2; - Standard_Real tu1=u1; - Standard_Real tu2=u2; - Standard_Real tv1=v1; - Standard_Real tv2=v2; - Standard_Boolean t=this->Compute(tu1,tv1,tu2,tv2,aP,aT,aTS1,aTS2); - T=MyTguv1; - return(t); -} -//-------------------------------------------------------------------------------- -Standard_Boolean ApproxInt_PrmPrmSvSurfaces::TangencyOnSurf2(const Standard_Real u1, - const Standard_Real v1, - const Standard_Real u2, - const Standard_Real v2, - gp_Vec2d& T) { - gp_Pnt aP; - gp_Vec aT; - gp_Vec2d aTS1,aTS2; - Standard_Real tu1=u1; - Standard_Real tu2=u2; - Standard_Real tv1=v1; - Standard_Real tv2=v2; - Standard_Boolean t=this->Compute(tu1,tv1,tu2,tv2,aP,aT,aTS1,aTS2); - T=MyTguv2; - return(t); -} -//-------------------------------------------------------------------------------- - - - - -#if 0 - //------------------------------------------------------------ - //-- Calcul de Tguv1 - //-- - ThePSurfaceTool::D1(MySurf1,u1,v1,P,TU,TV); - - TUTV = TU.Dot(TV); - TgTU = Tg.Dot(TU); - TgTV = Tg.Dot(TV); - UmTUTV2 = 1.0 - TUTV * TUTV; - - DeltaU = (TgTU - TgTV * TUTV ) / UmTUTV2 ; - DeltaV = (TgTV - TgTU * TUTV ) / UmTUTV2 ; - - Delta = 1.0 / Sqrt(DeltaU * DeltaU + DeltaV * DeltaV); - - Tguv1.Multiplied(Delta); MyTguv1 = Tguv1; - - //------------------------------------------------------------ - //-- Calcul de Tguv2 - //-- - ThePSurfaceTool::D1(MySurf2,u2,v2,P,TU,TV); - - TUTV = TU.Dot(TV); - TgTU = Tg.Dot(TU); - TgTV = Tg.Dot(TV); - UmTUTV2 = 1.0 - TUTV * TUTV; - - DeltaU = (TgTU - TgTV * TUTV ) / UmTUTV2 ; - DeltaV = (TgTV - TgTU * TUTV ) / UmTUTV2 ; - - Delta = 1.0 / Sqrt(DeltaU * DeltaU + DeltaV * DeltaV); - - Tguv2.Multiplied(Delta); MyTguv2 = Tguv2; - - return(Standard_True); -} -#endif - - - - diff --git a/opencascade/ApproxInt_SvSurfaces.hxx b/opencascade/ApproxInt_SvSurfaces.hxx index 89509550b..7a8b4e5e9 100644 --- a/opencascade/ApproxInt_SvSurfaces.hxx +++ b/opencascade/ApproxInt_SvSurfaces.hxx @@ -28,72 +28,74 @@ class gp_Vec; class gp_Vec2d; class IntSurf_PntOn2S; -//! This class is root class for classes dedicated to calculate +//! This class is root class for classes dedicated to calculate //! 2d and 3d points and tangents of intersection lines of two surfaces of different types //! for given u, v parameters of intersection point on two surfaces. -//! +//! //! The field myUseSolver is used to manage type of calculation: -//! if myUseSolver = true, input parameters u1, v1, u2, v2 are considered as first approximation of -//! exact intersection point, then coordinates u1, v1, u2, v2 are refined with help of +//! if myUseSolver = true, input parameters u1, v1, u2, v2 are considered as first approximation of +//! exact intersection point, then coordinates u1, v1, u2, v2 are refined with help of //! the solver used in intersection algorithm and required values are calculated. -//! if myUseSolver = false, u1, v1, u2, v2 are considered as "exact" intersection points on two surfaces -//! and required values are calculated directly using u1, v1, u2, v2 +//! if myUseSolver = false, u1, v1, u2, v2 are considered as "exact" intersection points on two +//! surfaces and required values are calculated directly using u1, v1, u2, v2 class ApproxInt_SvSurfaces { public: - DEFINE_STANDARD_ALLOC - ApproxInt_SvSurfaces() : myUseSolver (false) {} + ApproxInt_SvSurfaces() + : myUseSolver(false) + { + } //! returns True if Tg,Tguv1 Tguv2 can be computed. - Standard_EXPORT virtual Standard_Boolean Compute (Standard_Real& u1, Standard_Real& v1, - Standard_Real& u2, Standard_Real& v2, - gp_Pnt& Pt, - gp_Vec& Tg, - gp_Vec2d& Tguv1, - gp_Vec2d& Tguv2) = 0; - - Standard_EXPORT virtual void Pnt (const Standard_Real u1, const Standard_Real v1, - const Standard_Real u2, const Standard_Real v2, - gp_Pnt& P) = 0; + Standard_EXPORT virtual Standard_Boolean Compute(Standard_Real& u1, + Standard_Real& v1, + Standard_Real& u2, + Standard_Real& v2, + gp_Pnt& Pt, + gp_Vec& Tg, + gp_Vec2d& Tguv1, + gp_Vec2d& Tguv2) = 0; + + Standard_EXPORT virtual void Pnt(const Standard_Real u1, + const Standard_Real v1, + const Standard_Real u2, + const Standard_Real v2, + gp_Pnt& P) = 0; //! computes point on curve and parameters on the surfaces - Standard_EXPORT virtual Standard_Boolean SeekPoint(const Standard_Real u1, const Standard_Real v1, - const Standard_Real u2, const Standard_Real v2, - IntSurf_PntOn2S& Point) = 0; - - Standard_EXPORT virtual Standard_Boolean Tangency (const Standard_Real u1, const Standard_Real v1, - const Standard_Real u2, const Standard_Real v2, - gp_Vec& Tg) = 0; - - Standard_EXPORT virtual Standard_Boolean TangencyOnSurf1 (const Standard_Real u1, - const Standard_Real v1, - const Standard_Real u2, - const Standard_Real v2, - gp_Vec2d& Tg) = 0; - - Standard_EXPORT virtual Standard_Boolean TangencyOnSurf2 (const Standard_Real u1, - const Standard_Real v1, - const Standard_Real u2, - const Standard_Real v2, - gp_Vec2d& Tg) = 0; + Standard_EXPORT virtual Standard_Boolean SeekPoint(const Standard_Real u1, + const Standard_Real v1, + const Standard_Real u2, + const Standard_Real v2, + IntSurf_PntOn2S& Point) = 0; + + Standard_EXPORT virtual Standard_Boolean Tangency(const Standard_Real u1, + const Standard_Real v1, + const Standard_Real u2, + const Standard_Real v2, + gp_Vec& Tg) = 0; + + Standard_EXPORT virtual Standard_Boolean TangencyOnSurf1(const Standard_Real u1, + const Standard_Real v1, + const Standard_Real u2, + const Standard_Real v2, + gp_Vec2d& Tg) = 0; + + Standard_EXPORT virtual Standard_Boolean TangencyOnSurf2(const Standard_Real u1, + const Standard_Real v1, + const Standard_Real u2, + const Standard_Real v2, + gp_Vec2d& Tg) = 0; Standard_EXPORT virtual ~ApproxInt_SvSurfaces(); - void SetUseSolver (const Standard_Boolean theUseSol) - { - myUseSolver = theUseSol; - } + void SetUseSolver(const Standard_Boolean theUseSol) { myUseSolver = theUseSol; } - virtual Standard_Boolean GetUseSolver() const - { - return myUseSolver; - } + virtual Standard_Boolean GetUseSolver() const { return myUseSolver; } private: - Standard_Boolean myUseSolver; - }; #endif // _ApproxInt_SvSurfaces_HeaderFile diff --git a/opencascade/Approx_Array1OfAdHSurface.hxx b/opencascade/Approx_Array1OfAdHSurface.hxx index ba7d26d1a..5c5ea5a37 100644 --- a/opencascade/Approx_Array1OfAdHSurface.hxx +++ b/opencascade/Approx_Array1OfAdHSurface.hxx @@ -22,5 +22,4 @@ typedef NCollection_Array1 Approx_Array1OfAdHSurface; - #endif diff --git a/opencascade/Approx_Array1OfGTrsf2d.hxx b/opencascade/Approx_Array1OfGTrsf2d.hxx index df098802a..5b90de5b9 100644 --- a/opencascade/Approx_Array1OfGTrsf2d.hxx +++ b/opencascade/Approx_Array1OfGTrsf2d.hxx @@ -17,10 +17,9 @@ #ifndef Approx_Array1OfGTrsf2d_HeaderFile #define Approx_Array1OfGTrsf2d_HeaderFile -#include #include +#include typedef NCollection_Array1 Approx_Array1OfGTrsf2d; - #endif diff --git a/opencascade/Approx_BSplComputeLine.gxx b/opencascade/Approx_BSplComputeLine.gxx deleted file mode 100644 index 36930088e..000000000 --- a/opencascade/Approx_BSplComputeLine.gxx +++ /dev/null @@ -1,1439 +0,0 @@ -// Copyright (c) 1995-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include Approx_BSpParLeastSquareOfMyBSplGradient_hxx - -#if defined(OCCT_DEBUG) && defined( DRAW ) && !defined( WNT ) - -static Standard_Boolean mydebug = Standard_False; - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -static void DUMP(const MultiLine& Line) -{ - Standard_Integer i, j, nbP2d, nbP3d, firstP, lastP; - firstP = LineTool::FirstPoint(Line); - lastP = LineTool::LastPoint(Line); - - nbP3d = LineTool::NbP3d(Line); - nbP2d = LineTool::NbP2d(Line); - Standard_Integer mynbP3d = nbP3d, mynbP2d = nbP2d; - if (nbP3d == 0) mynbP3d = 1; - if (nbP2d == 0) mynbP2d = 1; - - TColgp_Array1OfPnt tabP(1, mynbP3d); - TColgp_Array1OfPnt2d tabP2d(1, mynbP2d); - TColgp_Array1OfVec TabV(1, mynbP3d); - TColgp_Array1OfVec2d TabV2d(1, mynbP2d); - Standard_Boolean Ok; - Handle(Geom_Line) L3d; - Handle(Geom2d_Line) L2d; - Handle(Geom_TrimmedCurve) L3dt; - Handle(Geom2d_TrimmedCurve) L2dt; - Handle(Draw_Text2D) T2D; - Handle(Draw_Text3D) T3D; - - char solname[100]; - char mytext[10]; - - for (i = firstP; i <= lastP; i++) { - if (nbP3d != 0 && nbP2d != 0) LineTool::Value(Line, i, tabP, tabP2d); - else if (nbP2d != 0) LineTool::Value(Line, i, tabP2d); - else if (nbP3d != 0) LineTool::Value(Line, i, tabP); - - for (j = 1; j <= nbP3d; j++) { - sprintf(solname, "%s%i%s_%i", "p", j, "3d", i); - char* Temp = solname; - DrawTrSurf::Set(Temp, tabP(j)); - // DrawTrSurf::Set(solname, tabP(j)); - if (i == firstP || i == lastP) { - sprintf(mytext, "%s%i", " ", i); - T3D = new Draw_Text3D(tabP(j), mytext, Draw_vert); - dout << T3D; - } - } - for (j = 1; j <= nbP2d; j++) { - sprintf(solname, "%s%i%s_%i", "p", j, "2d", i); - char* Temp = solname; - DrawTrSurf::Set(Temp, tabP2d(j)); - // DrawTrSurf::Set(solname, tabP2d(j)); - if (i == firstP || i == lastP) { - sprintf(mytext, "%s%i", " ", i); - T2D = new Draw_Text2D(tabP2d(j), mytext, Draw_vert); - dout << T2D; - } - } - - // le cas des tangentes aux extremites: - if (i == firstP || i == lastP) { - if (nbP3d != 0 && nbP2d != 0) - Ok = LineTool::Tangency(Line, i, TabV, TabV2d); - else if (nbP2d != 0) - Ok = LineTool::Tangency(Line, i, TabV2d); - else if (nbP3d != 0) - Ok = LineTool::Tangency(Line, i, TabV); - - if (Ok) { - for (j = 1; j <= nbP3d; j++) { - sprintf(solname, "%s%i%s_%i", "t", j, "3d", i); - L3d = new Geom_Line(tabP(j), gp_Dir(TabV(j))); - L3dt = new Geom_TrimmedCurve(L3d, 0.0, 0.3); - char* Temp = solname; - DrawTrSurf::Set(Temp, L3dt); - // DrawTrSurf::Set(solname, L3dt); - } - for (j = 1; j <= nbP2d; j++) { - sprintf(solname, "%s%i%s_%i", "t", j, "2d", i); - L2d = new Geom2d_Line(tabP2d(j), gp_Dir2d(TabV2d(j))); - L2dt = new Geom2d_TrimmedCurve(L2d, 0.0, 0.3); - char* Temp = solname; - DrawTrSurf::Set(Temp, L2dt); - // DrawTrSurf::Set(solname, L2dt); - } - } - } - } - dout.Flush(); -} - - -static void DUMP(const AppParCurves_MultiBSpCurve& C) -{ - static Standard_Integer nbappel = 0; - Standard_Integer i, j, nbP2d, nbP3d; - Standard_Integer nbpoles = C.NbPoles(); - Standard_Integer deg = C.Degree(); - const TColStd_Array1OfReal& Knots = C.Knots(); - const TColStd_Array1OfInteger& Mults = C.Multiplicities(); - - Handle(Geom_BSplineCurve) BSp; - Handle(Geom2d_BSplineCurve) BSp2d; - - TColgp_Array1OfPnt tabPoles(1, nbpoles); - TColgp_Array1OfPnt2d tabPoles2d(1, nbpoles); - char solname[100]; - - nbappel++; - for (i = 1; i <= C.NbCurves(); i++) { - if (C.Dimension(i) == 3) { - C.Curve(i, tabPoles); - BSp = new Geom_BSplineCurve(tabPoles, Knots, Mults, deg); - sprintf(solname, "%s%i%s_%i", "c", i, "3d", nbappel); - char* Temp = solname; - DrawTrSurf::Set(Temp, BSp); - // DrawTrSurf::Set(solname, BSp); - } - else { - C.Curve(i, tabPoles2d); - BSp2d = new Geom2d_BSplineCurve(tabPoles2d, Knots, Mults, deg); - sprintf(solname, "%s%i%s_%i", "c", i, "2d", nbappel); - char* Temp = solname; - DrawTrSurf::Set(Temp, BSp2d); - // DrawTrSurf::Set(solname, BSp2d); - } - } - dout.Flush(); -} - - -#endif - - - - -//======================================================================= -//function : FirstTangencyVector -//purpose : -//======================================================================= -void Approx_BSplComputeLine::FirstTangencyVector(const MultiLine& Line, - const Standard_Integer index, - math_Vector& V) - const { - - Standard_Integer i, j, nbP2d, nbP3d; - nbP3d = LineTool::NbP3d(Line); - nbP2d = LineTool::NbP2d(Line); - Standard_Integer mynbP3d = nbP3d, mynbP2d = nbP2d; - if (nbP3d == 0) mynbP3d = 1; - if (nbP2d == 0) mynbP2d = 1; - Standard_Boolean Ok = Standard_False; - TColgp_Array1OfVec TabV(1, mynbP3d); - TColgp_Array1OfVec2d TabV2d(1, mynbP2d); - - if (nbP3d != 0 && nbP2d != 0) - Ok = LineTool::Tangency(Line, index, TabV, TabV2d); - else if (nbP2d != 0) - Ok = LineTool::Tangency(Line, index, TabV2d); - else if (nbP3d != 0) - Ok = LineTool::Tangency(Line, index, TabV); - - if (Ok) { - if (nbP3d != 0) { - j = 1; - for (i = TabV.Lower(); i <= TabV.Upper(); i++) { - V(j) = TabV(i).X(); - V(j + 1) = TabV(i).Y(); - V(j + 2) = TabV(i).Z(); - j += 3; - } - } - if (nbP2d != 0) { - j = nbP3d * 3 + 1; - for (i = TabV2d.Lower(); i <= TabV2d.Upper(); i++) { - V(j) = TabV2d(i).X(); - V(j + 1) = TabV2d(i).Y(); - j += 2; - } - } - } - else { - - // recherche d un vecteur tangent par construction d une parabole: - AppParCurves_Constraint firstC, lastC; - firstC = lastC = AppParCurves_PassPoint; - Standard_Integer nbpoles = 3; - math_Vector mypar(index, index + 2); - Parameters(Line, index, index + 2, mypar); - Approx_BSpParLeastSquareOfMyBSplGradient - LSQ(Line, index, index + 2, firstC, lastC, mypar, nbpoles); - AppParCurves_MultiCurve C = LSQ.BezierValue(); - - gp_Pnt myP; - gp_Vec myV; - gp_Pnt2d myP2d; - gp_Vec2d myV2d; - j = 1; - for (i = 1; i <= nbP3d; i++) { - C.D1(i, 0.0, myP, myV); - V(j) = myV.X(); - V(j + 1) = myV.Y(); - V(j + 2) = myV.Z(); - j += 3; - } - j = nbP3d * 3 + 1; - for (i = nbP3d + 1; i <= nbP3d + nbP2d; i++) { - C.D1(i, 0.0, myP2d, myV2d); - V(j) = myV2d.X(); - V(j + 1) = myV2d.Y(); - j += 2; - } - } - -} - - -//======================================================================= -//function : LastTangencyVector -//purpose : -//======================================================================= -void Approx_BSplComputeLine::LastTangencyVector(const MultiLine& Line, - const Standard_Integer index, - math_Vector& V) - const { - Standard_Integer i, j, nbP2d, nbP3d; - nbP3d = LineTool::NbP3d(Line); - nbP2d = LineTool::NbP2d(Line); - Standard_Integer mynbP3d = nbP3d, mynbP2d = nbP2d; - if (nbP3d == 0) mynbP3d = 1; - if (nbP2d == 0) mynbP2d = 1; - Standard_Boolean Ok = Standard_False; - TColgp_Array1OfVec TabV(1, mynbP3d); - TColgp_Array1OfVec2d TabV2d(1, mynbP2d); - - - if (nbP3d != 0 && nbP2d != 0) - Ok = LineTool::Tangency(Line, index, TabV, TabV2d); - else if (nbP2d != 0) - Ok = LineTool::Tangency(Line, index, TabV2d); - else if (nbP3d != 0) - Ok = LineTool::Tangency(Line, index, TabV); - - if (Ok) { - if (nbP3d != 0) { - j = 1; - for (i = TabV.Lower(); i <= TabV.Upper(); i++) { - V(j) = TabV(i).X(); - V(j + 1) = TabV(i).Y(); - V(j + 2) = TabV(i).Z(); - j += 3; - } - } - if (nbP2d != 0) { - j = nbP3d * 3 + 1; - for (i = TabV2d.Lower(); i <= TabV2d.Upper(); i++) { - V(j) = TabV2d(i).X(); - V(j + 1) = TabV2d(i).Y(); - j += 2; - } - } - } - else { - - // recherche d un vecteur tangent par construction d une parabole: - AppParCurves_Constraint firstC, lastC; - firstC = lastC = AppParCurves_PassPoint; - Standard_Integer nbpoles = 3; - math_Vector mypar(index - 2, index); - Parameters(Line, index - 2, index, mypar); - Approx_BSpParLeastSquareOfMyBSplGradient - LSQ(Line, index - 2, index, firstC, lastC, mypar, nbpoles); - AppParCurves_MultiCurve C = LSQ.BezierValue(); - - gp_Pnt myP; - gp_Vec myV; - gp_Pnt2d myP2d; - gp_Vec2d myV2d; - j = 1; - for (i = 1; i <= nbP3d; i++) { - C.D1(i, 1.0, myP, myV); - V(j) = myV.X(); - V(j + 1) = myV.Y(); - V(j + 2) = myV.Z(); - j += 3; - } - j = nbP3d * 3 + 1; - for (i = nbP3d + 1; i <= nbP3d + nbP2d; i++) { - C.D1(i, 1.0, myP2d, myV2d); - V(j) = myV2d.X(); - V(j + 1) = myV2d.Y(); - j += 2; - } - } - -} - - - -//======================================================================= -//function : SearchFirstLambda -//purpose : -//======================================================================= -Standard_Real Approx_BSplComputeLine:: -SearchFirstLambda(const MultiLine& Line, - const math_Vector& aPar, - const TColStd_Array1OfReal& Theknots, - const math_Vector& V, - const Standard_Integer index) const { - - // dq/dw = lambda* V = (p2-p1)/(u2-u1) - - Standard_Integer nbP2d, nbP3d; - gp_Pnt P1, P2; - gp_Pnt2d P12d, P22d; - nbP3d = LineTool::NbP3d(Line); - nbP2d = LineTool::NbP2d(Line); - Standard_Integer mynbP3d = nbP3d, mynbP2d = nbP2d; - if (nbP3d == 0) mynbP3d = 1; - if (nbP2d == 0) mynbP2d = 1; - TColgp_Array1OfPnt tabP1(1, mynbP3d), tabP2(1, mynbP3d); - TColgp_Array1OfPnt2d tabP12d(1, mynbP2d), tabP22d(1, mynbP2d); - - - if (nbP3d != 0 && nbP2d != 0) LineTool::Value(Line, index, tabP1, tabP12d); - else if (nbP2d != 0) LineTool::Value(Line, index, tabP12d); - else if (nbP3d != 0) LineTool::Value(Line, index, tabP1); - - if (nbP3d != 0 && nbP2d != 0) LineTool::Value(Line, index + 1, tabP2, tabP22d); - else if (nbP2d != 0) LineTool::Value(Line, index + 1, tabP22d); - else if (nbP3d != 0) LineTool::Value(Line, index + 1, tabP2); - - - Standard_Real U1 = aPar(index), U2 = aPar(index + 1); - Standard_Real lambda, S; - Standard_Integer low = V.Lower(); - Standard_Integer nbknots = Theknots.Length(); - - if (nbP3d != 0) { - P1 = tabP1(1); - P2 = tabP2(1); - gp_Vec P1P2(P1, P2), myV; - myV.SetCoord(V(low), V(low + 1), V(low + 2)); - lambda = (P1P2.Magnitude()) / (myV.Magnitude()*(U2 - U1)); - S = (P1P2.Dot(myV) > 0.0) ? 1.0 : -1.0; - } - else { - P12d = tabP12d(1); - P22d = tabP22d(1); - gp_Vec2d P1P2(P12d, P22d), myV; - myV.SetCoord(V(low), V(low + 1)); - lambda = (P1P2.Magnitude()) / (myV.Magnitude()*(U2 - U1)); - S = (P1P2.Dot(myV) > 0.0) ? 1.0 : -1.0; - } - return ((S*lambda)*(Theknots(2) - Theknots(1)) / (Theknots(nbknots) - Theknots(1))); - -} - - -//======================================================================= -//function : SearchLastLambda -//purpose : -//======================================================================= -Standard_Real Approx_BSplComputeLine:: -SearchLastLambda(const MultiLine& Line, - const math_Vector& aPar, - const TColStd_Array1OfReal& Theknots, - const math_Vector& V, - const Standard_Integer index) const - -{ - // dq/dw = lambda* V = (p2-p1)/(u2-u1) - - Standard_Integer nbP2d, nbP3d; - gp_Pnt P1, P2; - gp_Pnt2d P12d, P22d; - nbP3d = LineTool::NbP3d(Line); - nbP2d = LineTool::NbP2d(Line); - Standard_Integer mynbP3d = nbP3d, mynbP2d = nbP2d; - if (nbP3d == 0) mynbP3d = 1; - if (nbP2d == 0) mynbP2d = 1; - TColgp_Array1OfPnt tabP(1, mynbP3d), tabP2(1, mynbP3d); - TColgp_Array1OfPnt2d tabP2d(1, mynbP2d), tabP22d(1, mynbP2d); - - if (nbP3d != 0 && nbP2d != 0) LineTool::Value(Line, index - 1, tabP, tabP2d); - else if (nbP2d != 0) LineTool::Value(Line, index - 1, tabP2d); - else if (nbP3d != 0) LineTool::Value(Line, index - 1, tabP); - - if (nbP3d != 0 && nbP2d != 0) LineTool::Value(Line, index, tabP2, tabP22d); - else if (nbP2d != 0) LineTool::Value(Line, index, tabP22d); - else if (nbP3d != 0) LineTool::Value(Line, index, tabP2); - - - Standard_Real U1 = aPar(index - 1), U2 = aPar(index); - Standard_Real lambda, S; - Standard_Integer low = V.Lower(); - Standard_Integer nbknots = Theknots.Length(); - if (nbP3d != 0) { - P1 = tabP(1); - P2 = tabP2(1); - gp_Vec P1P2(P1, P2), myV; - myV.SetCoord(V(low), V(low + 1), V(low + 2)); - lambda = (P1P2.Magnitude()) / (myV.Magnitude()*(U2 - U1)); - S = (P1P2.Dot(myV) > 0.0) ? 1.0 : -1.0; - } - else { - P12d = tabP2d(1); - P22d = tabP22d(1); - gp_Vec2d P1P2(P12d, P22d), myV; - myV.SetCoord(V(low), V(low + 1)); - lambda = (P1P2.Magnitude()) / (myV.Magnitude()*(U2 - U1)); - S = (P1P2.Dot(myV) > 0.0) ? 1.0 : -1.0; - } - - return ((S*lambda)*(Theknots(nbknots) - Theknots(nbknots - 1)) - / (Theknots(nbknots) - Theknots(1))); -} - - - -//======================================================================= -//function : Approx_BSplComputeLine -//purpose : -//======================================================================= -Approx_BSplComputeLine::Approx_BSplComputeLine -(const MultiLine& Line, - const math_Vector& Parameters, - const Standard_Integer degreemin, - const Standard_Integer degreemax, - const Standard_Real Tolerance3d, - const Standard_Real Tolerance2d, - const Standard_Integer NbIterations, - const Standard_Boolean cutting, - const Standard_Boolean Squares) -{ - myfirstParam = new TColStd_HArray1OfReal(Parameters.Lower(), - Parameters.Upper()); - for (Standard_Integer i = Parameters.Lower(); i <= Parameters.Upper(); i++) { - myfirstParam->SetValue(i, Parameters(i)); - } - myConstraints = new AppParCurves_HArray1OfConstraintCouple(1, 2); - Par = Approx_IsoParametric; - myPeriodic = Standard_False; - mydegremin = degreemin; - mydegremax = degreemax; - mytol3d = Tolerance3d; - mytol2d = Tolerance2d; - mysquares = Squares; - mycut = cutting; - myitermax = NbIterations; - alldone = Standard_False; - mycont = -1; - myfirstC = AppParCurves_TangencyPoint; - mylastC = AppParCurves_TangencyPoint; - myhasknots = Standard_False; - myhasmults = Standard_False; - currenttol3d = currenttol2d = RealLast(); - tolreached = Standard_False; - Perform(Line); -} - - -//======================================================================= -//function : Approx_BSplComputeLine -//purpose : -//======================================================================= -Approx_BSplComputeLine::Approx_BSplComputeLine -(const math_Vector& Parameters, - const Standard_Integer degreemin, - const Standard_Integer degreemax, - const Standard_Real Tolerance3d, - const Standard_Real Tolerance2d, - const Standard_Integer NbIterations, - const Standard_Boolean cutting, - const Standard_Boolean Squares) -{ - myfirstParam = new TColStd_HArray1OfReal(Parameters.Lower(), - Parameters.Upper()); - for (Standard_Integer i = Parameters.Lower(); i <= Parameters.Upper(); i++) { - myfirstParam->SetValue(i, Parameters(i)); - } - myfirstC = AppParCurves_TangencyPoint; - mylastC = AppParCurves_TangencyPoint; - myConstraints = new AppParCurves_HArray1OfConstraintCouple(1, 2); - Par = Approx_IsoParametric; - myPeriodic = Standard_False; - mydegremin = degreemin; - mydegremax = degreemax; - mytol3d = Tolerance3d; - mytol2d = Tolerance2d; - mysquares = Squares; - mycut = cutting; - myitermax = NbIterations; - alldone = Standard_False; - myhasknots = Standard_False; - myhasmults = Standard_False; - mycont = -1; - currenttol3d = currenttol2d = RealLast(); - tolreached = Standard_False; -} - -//======================================================================= -//function : Approx_BSplComputeLine -//purpose : -//======================================================================= -Approx_BSplComputeLine::Approx_BSplComputeLine -(const Standard_Integer degreemin, - const Standard_Integer degreemax, - const Standard_Real Tolerance3d, - const Standard_Real Tolerance2d, - const Standard_Integer NbIterations, - const Standard_Boolean cutting, - const Approx_ParametrizationType parametrization, - const Standard_Boolean Squares) -{ - myConstraints = new AppParCurves_HArray1OfConstraintCouple(1, 2); - Par = parametrization; - myPeriodic = Standard_False; - mydegremin = degreemin; - mydegremax = degreemax; - mytol3d = Tolerance3d; - mytol2d = Tolerance2d; - mysquares = Squares; - mycut = cutting; - myitermax = NbIterations; - myfirstC = AppParCurves_TangencyPoint; - mylastC = AppParCurves_TangencyPoint; - alldone = Standard_False; - myhasknots = Standard_False; - myhasmults = Standard_False; - mycont = -1; - currenttol3d = currenttol2d = RealLast(); - tolreached = Standard_False; -} - - -//======================================================================= -//function : Approx_BSplComputeLine -//purpose : -//======================================================================= -Approx_BSplComputeLine::Approx_BSplComputeLine -(const MultiLine& Line, - const Standard_Integer degreemin, - const Standard_Integer degreemax, - const Standard_Real Tolerance3d, - const Standard_Real Tolerance2d, - const Standard_Integer NbIterations, - const Standard_Boolean cutting, - const Approx_ParametrizationType parametrization, - const Standard_Boolean Squares) -{ - myConstraints = new AppParCurves_HArray1OfConstraintCouple(1, 2); - alldone = Standard_False; - mydegremin = degreemin; - mydegremax = degreemax; - mytol3d = Tolerance3d; - mytol2d = Tolerance2d; - mysquares = Squares; - mycut = cutting; - myitermax = NbIterations; - Par = parametrization; - myPeriodic = Standard_False; - myfirstC = AppParCurves_TangencyPoint; - mylastC = AppParCurves_TangencyPoint; - myhasknots = Standard_False; - myhasmults = Standard_False; - mycont = -1; - currenttol3d = currenttol2d = RealLast(); - tolreached = Standard_False; - Perform(Line); -} - - - -//======================================================================= -//function : Perform -//purpose : -//======================================================================= -void Approx_BSplComputeLine::Perform(const MultiLine& Line) -{ - -#if defined(OCCT_DEBUG) && defined( DRAW ) && !defined( WNT ) - if (mydebug) DUMP(Line); -#endif - - Standard_Integer i, Thefirstpt, Thelastpt; - Standard_Boolean Finish = Standard_False, begin = Standard_True; - - // recherche des vraies contraintes donnees par la Line: - FindRealConstraints(Line); - - Thefirstpt = LineTool::FirstPoint(Line); - Thelastpt = LineTool::LastPoint(Line); - Standard_Integer myfirstpt = Thefirstpt; - Standard_Integer mylastpt = Thelastpt; - - AppParCurves_ConstraintCouple myCouple1(myfirstpt, realfirstC); - AppParCurves_ConstraintCouple myCouple2(mylastpt, reallastC); - myConstraints->SetValue(1, myCouple1); - myConstraints->SetValue(2, myCouple2); - - math_Vector TheParam(Thefirstpt, Thelastpt, 0.0); - if (myfirstParam.IsNull()) { - Parameters(Line, Thefirstpt, Thelastpt, TheParam); - } - else { - for (i = myfirstParam->Lower(); i <= myfirstParam->Upper(); i++) { - TheParam(i + Thefirstpt - 1) = myfirstParam->Value(i); - } - } - - myParameters = new TColStd_HArray1OfReal(TheParam.Lower(), TheParam.Upper()); - for (i = TheParam.Lower(); i <= TheParam.Upper(); i++) { - myParameters->SetValue(i, TheParam(i)); - } - Standard_Integer nbknots = 2; - Standard_Real l; - alldone = Standard_False; - - if (!mycut) { - - // cas ou on ne desire pas de noeuds supplementaires. - // ================================================== - - if (!myhasknots) { - TColStd_Array1OfReal theknots(1, 2); - TColStd_Array1OfInteger themults(1, 2); - theknots(1) = 0.0; - theknots(2) = 1.0; - alldone = Compute(Line, myfirstpt, mylastpt, TheParam, theknots, themults); - } - else { - if (!myhasmults) { - TColStd_Array1OfInteger themults(1, myknots->Length()); - alldone = Compute(Line, myfirstpt, mylastpt, TheParam, - myknots->Array1(), themults); - } - else { - alldone = Compute(Line, myfirstpt, mylastpt, TheParam, - myknots->Array1(), mymults->ChangeArray1()); - } - } - } - else { - - // cas ou on va iterer a partir de noeuds donnes par l''utilisateur - // ou a partir d''une bezier. - // ================================================================ - - while (!Finish) { - - currenttol3d = currenttol2d = RealLast(); - - if (myhasknots && begin) { - - if (!myhasmults) { - - // 1er cas: l''utilisateur donne des noeuds de depart mais - // a nous de fixer les multiplicites en fonction de la - // continuite desiree. - // ======================================================== - - TColStd_Array1OfInteger TheMults(1, myknots->Length()); - alldone = Compute(Line, myfirstpt, mylastpt, TheParam, - myknots->Array1(), TheMults); - } - else { - - // 2eme cas: l''utilisateur donne des noeuds de depart - // avec leurs multiplicites. - // =================================================== - - alldone = Compute(Line, myfirstpt, mylastpt, TheParam, - myknots->Array1(), mymults->ChangeArray1()); - } - begin = Standard_False; - } - - else { - - // 3eme cas: l''utilisateur ne donne aucun noeuds de depart - // ======================================================== - - TColStd_Array1OfReal Theknots(1, nbknots); - TColStd_Array1OfInteger TheMults(1, nbknots); - Theknots(1) = 0.0; - Theknots(nbknots) = 1.0; - for (i = 2; i <= nbknots - 1; i++) { - - l = (mylastpt - myfirstpt)*Standard_Real(i - 1) - / Standard_Real(nbknots - 1); - Standard_Integer ll = (Standard_Integer)(l); - Standard_Real a = l - ll; - Standard_Real p1 = TheParam(ll + myfirstpt); - Standard_Real p2 = TheParam(ll + 1 + myfirstpt); - Theknots(i) = (1. - a)*p1 + a*p2; - } - - alldone = Compute(Line, myfirstpt, mylastpt, TheParam, Theknots, TheMults); - - } - - if (!alldone) nbknots++; - else Finish = Standard_True; - } - } - -#if defined(OCCT_DEBUG) && defined( DRAW ) && !defined( WNT ) - if (mydebug) DUMP(TheMultiBSpCurve); -#endif - -} - - - - -//======================================================================= -//function : Parameters -//purpose : -//======================================================================= -const TColStd_Array1OfReal& Approx_BSplComputeLine::Parameters() const -{ - return myParameters->Array1(); -} - - - -//======================================================================= -//function : Value -//purpose : -//======================================================================= -const AppParCurves_MultiBSpCurve& Approx_BSplComputeLine::Value() const -{ - return TheMultiBSpCurve; -} - -//======================================================================= -//function : ChangeValue -//purpose : -//======================================================================= -AppParCurves_MultiBSpCurve& Approx_BSplComputeLine::ChangeValue() -{ - return TheMultiBSpCurve; -} - -//======================================================================= -//function : Parameters -//purpose : -//======================================================================= - -void Approx_BSplComputeLine::Parameters(const MultiLine& Line, - const Standard_Integer firstP, - const Standard_Integer lastP, - math_Vector& TheParameters) const -{ - Standard_Integer i, j, nbP2d, nbP3d; - Standard_Real dist; - const Standard_Integer aNbp = lastP - firstP + 1; - - - // The first parameter should always be zero according to all the logic below, - // so division by any value will give zero anyway, so it should never be scaled - // to avoid case when there is only one parameter in the array thus division by zero happens. - TheParameters(firstP) = 0.0; - if (aNbp == 2) { - TheParameters(lastP) = 1.0; - } - else if (Par == Approx_ChordLength || Par == Approx_Centripetal) - { - nbP3d = LineTool::NbP3d(Line); - nbP2d = LineTool::NbP2d(Line); - Standard_Integer mynbP3d = nbP3d, mynbP2d = nbP2d; - if (nbP3d == 0) mynbP3d = 1; - if (nbP2d == 0) mynbP2d = 1; - - dist = 0.0; - TColgp_Array1OfPnt tabP(1, mynbP3d); - TColgp_Array1OfPnt tabPP(1, mynbP3d); - TColgp_Array1OfPnt2d tabP2d(1, mynbP2d); - TColgp_Array1OfPnt2d tabPP2d(1, mynbP2d); - - for (i = firstP + 1; i <= lastP; i++) - { - if (nbP3d != 0 && nbP2d != 0) LineTool::Value(Line, i - 1, tabP, tabP2d); - else if (nbP2d != 0) LineTool::Value(Line, i - 1, tabP2d); - else if (nbP3d != 0) LineTool::Value(Line, i - 1, tabP); - - if (nbP3d != 0 && nbP2d != 0) LineTool::Value(Line, i, tabPP, tabPP2d); - else if (nbP2d != 0) LineTool::Value(Line, i, tabPP2d); - else if (nbP3d != 0) LineTool::Value(Line, i, tabPP); - dist = 0.0; - for (j = 1; j <= nbP3d; j++) - { - const gp_Pnt &aP1 = tabP(j), - &aP2 = tabPP(j); - dist += aP2.SquareDistance(aP1); - } - for (j = 1; j <= nbP2d; j++) - { - const gp_Pnt2d &aP12d = tabP2d(j), - &aP22d = tabPP2d(j); - - dist += aP22d.SquareDistance(aP12d); - } - - dist = Sqrt(dist); - if (Par == Approx_ChordLength) - { - TheParameters(i) = TheParameters(i - 1) + dist; - } - else - {// Par == Approx_Centripetal - TheParameters(i) = TheParameters(i - 1) + Sqrt(dist); - } - } - for (i = firstP + 1; i <= lastP; i++) TheParameters(i) /= TheParameters(lastP); - } - else { - for (i = firstP + 1; i <= lastP; i++) { - TheParameters(i) = (Standard_Real(i) - firstP) / - (Standard_Real(lastP - Standard_Real(firstP))); - } - } -} - - -//======================================================================= -//function : Compute -//purpose : -//======================================================================= -Standard_Boolean Approx_BSplComputeLine::Compute(const MultiLine& Line, - const Standard_Integer fpt, - const Standard_Integer lpt, - math_Vector& Para, - const TColStd_Array1OfReal& Knots, - TColStd_Array1OfInteger& Mults) -{ - Standard_Integer i, deg, nbpoles, multinter; - Standard_Boolean mydone; - Standard_Real Fv, TheTol3d, TheTol2d, l1, l2; - Standard_Integer nbp = lpt - fpt + 1; - mylambda1 = 0.0; - mylambda2 = 0.0; - - math_Vector aParams(Para.Lower(), Para.Upper()); - - for (deg = mydegremin; deg <= mydegremax; deg++) { - - aParams = Para; - - if (!myhasmults) { - Mults(Mults.Lower()) = deg + 1; - Mults(Mults.Upper()) = deg + 1; - nbpoles = deg + 1; - if (mycont == -1) multinter = 1; - else multinter = Max(1, deg - mycont); - for (i = Mults.Lower() + 1; i <= Mults.Upper() - 1; i++) { - Mults(i) = multinter; - nbpoles += multinter; - } - } - else { - nbpoles = -deg - 1; - for (i = Mults.Lower(); i <= Mults.Upper(); i++) { - nbpoles += Mults.Value(i); - } - } - - Standard_Integer nbpolestocompare = nbpoles; - if (realfirstC == AppParCurves_TangencyPoint) nbpolestocompare++; - if (reallastC == AppParCurves_TangencyPoint) nbpolestocompare++; - if (realfirstC == AppParCurves_CurvaturePoint) nbpolestocompare++; - if (reallastC == AppParCurves_CurvaturePoint) nbpolestocompare++; - if (nbpolestocompare > nbp) { - Interpol(Line); - tolreached = Standard_True; - return Standard_True; - } - - AppParCurves_MultiBSpCurve mySCU(nbpoles); - - if (mysquares) { - Approx_BSpParLeastSquareOfMyBSplGradient SQ(Line, Knots, Mults, fpt, lpt, - realfirstC, reallastC, aParams, nbpoles); - mydone = SQ.IsDone(); - if (mydone) { - mySCU = SQ.BSplineValue(); - SQ.Error(Fv, TheTol3d, TheTol2d); - } - else continue; - } - else { - if (nbpoles != deg + 1) { - - if (deg == mydegremin && (realfirstC >= AppParCurves_TangencyPoint || - reallastC >= AppParCurves_TangencyPoint)) { - Approx_BSpParLeastSquareOfMyBSplGradient - thefitt(Line, Knots, Mults, fpt, lpt, realfirstC, reallastC, aParams, nbpoles); - mylambda1 = thefitt.FirstLambda()*deg; - mylambda2 = thefitt.LastLambda()*deg; - - } - l1 = mylambda1 / deg; - l2 = mylambda2 / deg; - - Approx_MyBSplGradient GRAD(Line, fpt, lpt, myConstraints, - aParams, Knots, Mults, deg, mytol3d, - mytol2d, myitermax, l1, l2); - - mydone = GRAD.IsDone(); - if (mydone) { - mySCU = GRAD.Value(); - TheTol3d = GRAD.MaxError3d(); - TheTol2d = GRAD.MaxError2d(); - } - else continue; - } - else { - Approx_MyGradientbis GRAD2(Line, fpt, lpt, myConstraints, - aParams, deg, mytol3d, - mytol2d, myitermax); - mydone = GRAD2.IsDone(); - if (mydone) { - if (GRAD2.Value().NbCurves() == 0) - continue; - mySCU = AppParCurves_MultiBSpCurve(GRAD2.Value(), Knots, Mults); - TheTol3d = GRAD2.MaxError3d(); - TheTol2d = GRAD2.MaxError2d(); - } - else continue; - } - } - Standard_Boolean save = Standard_True; - - for (i = aParams.Lower(); i <= aParams.Upper(); i++) { - if (aParams(i) <= -0.000001 || aParams(i) >= 1.000001) { - save = Standard_False; - break; - } - } - - if (mydone) { - if (TheTol3d <= mytol3d && TheTol2d <= mytol2d) { - // Stockage de la multicurve approximee. - tolreached = Standard_True; - TheMultiBSpCurve = mySCU; - currenttol3d = TheTol3d; - currenttol2d = TheTol2d; - if (save) { - for (i = aParams.Lower(); i <= aParams.Upper(); i++) { - myParameters->SetValue(i, aParams(i)); - } - } - return Standard_True; - } - } - - if (TheTol3d <= currenttol3d && TheTol2d <= currenttol2d) { - TheMultiBSpCurve = mySCU; - currenttol3d = TheTol3d; - currenttol2d = TheTol2d; - if (save) { - for (i = aParams.Lower(); i <= aParams.Upper(); i++) { - myParameters->SetValue(i, aParams(i)); - } - } - } - - } - - return Standard_False; -} - - - -//======================================================================= -//function : SetParameters -//purpose : -//======================================================================= -void Approx_BSplComputeLine::SetParameters(const math_Vector& ThePar) -{ - myfirstParam = new TColStd_HArray1OfReal(ThePar.Lower(), - ThePar.Upper()); - for (Standard_Integer i = ThePar.Lower(); i <= ThePar.Upper(); i++) { - myfirstParam->SetValue(i, ThePar(i)); - } -} - - -//======================================================================= -//function : SetKnots -//purpose : -//======================================================================= -void Approx_BSplComputeLine::SetKnots(const TColStd_Array1OfReal& Knots) -{ - myhasknots = Standard_True; - myknots = new TColStd_HArray1OfReal(Knots.Lower(), Knots.Upper()); - for (Standard_Integer i = Knots.Lower(); i <= Knots.Upper(); i++) { - myknots->SetValue(i, Knots(i)); - } -} - - -//======================================================================= -//function : SetKnotsAndMultiplicities -//purpose : -//======================================================================= -void Approx_BSplComputeLine::SetKnotsAndMultiplicities -(const TColStd_Array1OfReal& Knots, - const TColStd_Array1OfInteger& Mults) -{ - myhasknots = Standard_True; - myhasmults = Standard_True; - Standard_Integer i; - myknots = new TColStd_HArray1OfReal(Knots.Lower(), Knots.Upper()); - for (i = Knots.Lower(); i <= Knots.Upper(); i++) { - myknots->SetValue(i, Knots(i)); - } - mymults = new TColStd_HArray1OfInteger(Mults.Lower(), Mults.Upper()); - for (i = Mults.Lower(); i <= Mults.Upper(); i++) { - mymults->SetValue(i, Mults(i)); - } -} - -//======================================================================= -//function : Init -//purpose : -//======================================================================= -void Approx_BSplComputeLine::Init(const Standard_Integer degreemin, - const Standard_Integer degreemax, - const Standard_Real Tolerance3d, - const Standard_Real Tolerance2d, - const Standard_Integer NbIterations, - const Standard_Boolean cutting, - const Approx_ParametrizationType parametrization, - const Standard_Boolean Squares) -{ - mydegremin = degreemin; - mydegremax = degreemax; - mytol3d = Tolerance3d; - mytol2d = Tolerance2d; - Par = parametrization; - mysquares = Squares; - mycut = cutting; - myitermax = NbIterations; -} - - - -//======================================================================= -//function : SetDegrees -//purpose : -//======================================================================= -void Approx_BSplComputeLine::SetDegrees(const Standard_Integer degreemin, - const Standard_Integer degreemax) -{ - mydegremin = degreemin; - mydegremax = degreemax; -} - - -//======================================================================= -//function : SetTolerances -//purpose : -//======================================================================= -void Approx_BSplComputeLine::SetTolerances(const Standard_Real Tolerance3d, - const Standard_Real Tolerance2d) -{ - mytol3d = Tolerance3d; - mytol2d = Tolerance2d; -} - - -//======================================================================= -//function : SetConstraints -//purpose : -//======================================================================= -void Approx_BSplComputeLine::SetConstraints(const AppParCurves_Constraint FirstC, - const AppParCurves_Constraint LastC) -{ - myfirstC = FirstC; - mylastC = LastC; -} - -//======================================================================= -//function : SetPeriodic -//purpose : -//======================================================================= -void Approx_BSplComputeLine::SetPeriodic(const Standard_Boolean thePeriodic) -{ - myPeriodic = thePeriodic; -} - - -//======================================================================= -//function : IsAllApproximated -//purpose : -//======================================================================= -Standard_Boolean Approx_BSplComputeLine::IsAllApproximated() const -{ - return alldone; -} - -//======================================================================= -//function : IsToleranceReached -//purpose : -//======================================================================= -Standard_Boolean Approx_BSplComputeLine::IsToleranceReached() const -{ - return tolreached; -} - -//======================================================================= -//function : Error -//purpose : -//======================================================================= -void Approx_BSplComputeLine::Error(Standard_Real& tol3d, - Standard_Real& tol2d) const -{ - tol3d = currenttol3d; - tol2d = currenttol2d; -} - - - -//======================================================================= -//function : SetContinuity -//purpose : -//======================================================================= -void Approx_BSplComputeLine::SetContinuity(const Standard_Integer C) -{ - mycont = C; -} - - - -//======================================================================= -//function : FindRealConstraints -//purpose : -//======================================================================= -void Approx_BSplComputeLine::FindRealConstraints(const MultiLine& Line) -{ - realfirstC = myfirstC; - reallastC = mylastC; - Standard_Integer nbP2d, nbP3d; - nbP3d = LineTool::NbP3d(Line); - nbP2d = LineTool::NbP2d(Line); - Standard_Boolean Ok = Standard_False; - TColgp_Array1OfVec TabV(1, Max(1, nbP3d)); - TColgp_Array1OfVec2d TabV2d(1, Max(1, nbP2d)); - Standard_Integer Thefirstpt = LineTool::FirstPoint(Line); - Standard_Integer Thelastpt = LineTool::LastPoint(Line); - - if (myfirstC >= AppParCurves_TangencyPoint) { - - if (nbP3d != 0 && nbP2d != 0) - Ok = LineTool::Tangency(Line, Thefirstpt, TabV, TabV2d); - else if (nbP2d != 0) - Ok = LineTool::Tangency(Line, Thefirstpt, TabV2d); - else if (nbP3d != 0) - Ok = LineTool::Tangency(Line, Thefirstpt, TabV); - - realfirstC = AppParCurves_PassPoint; - if (Ok) { - realfirstC = AppParCurves_TangencyPoint; - if (myfirstC == AppParCurves_CurvaturePoint) { - if (nbP3d != 0 && nbP2d != 0) - Ok = LineTool::Tangency(Line, Thefirstpt, TabV, TabV2d); - else if (nbP2d != 0) - Ok = LineTool::Tangency(Line, Thefirstpt, TabV2d); - else if (nbP3d != 0) - Ok = LineTool::Tangency(Line, Thefirstpt, TabV); - if (Ok) { - realfirstC = AppParCurves_CurvaturePoint; - } - } - } - } - - - if (mylastC >= AppParCurves_TangencyPoint) { - - if (nbP3d != 0 && nbP2d != 0) - Ok = LineTool::Tangency(Line, Thelastpt, TabV, TabV2d); - else if (nbP2d != 0) - Ok = LineTool::Tangency(Line, Thelastpt, TabV2d); - else if (nbP3d != 0) - Ok = LineTool::Tangency(Line, Thelastpt, TabV); - - reallastC = AppParCurves_PassPoint; - if (Ok) { - reallastC = AppParCurves_TangencyPoint; - if (mylastC == AppParCurves_CurvaturePoint) { - if (nbP3d != 0 && nbP2d != 0) - Ok = LineTool::Tangency(Line, Thelastpt, TabV, TabV2d); - else if (nbP2d != 0) - Ok = LineTool::Tangency(Line, Thelastpt, TabV2d); - else if (nbP3d != 0) - Ok = LineTool::Tangency(Line, Thelastpt, TabV); - if (Ok) { - reallastC = AppParCurves_CurvaturePoint; - } - } - } - } - -} - - - - -//======================================================================= -//function : Interpol -//purpose : -//======================================================================= -void Approx_BSplComputeLine::Interpol(const MultiLine& Line) -{ - Standard_Integer i, Thefirstpt, Thelastpt, deg = 3; - mycont = 2; - Thefirstpt = LineTool::FirstPoint(Line); - Thelastpt = LineTool::LastPoint(Line); - math_Vector TheParam(Thefirstpt, Thelastpt, 0.0); - //Par = Approx_ChordLength; - if (myfirstParam.IsNull()) { - Parameters(Line, Thefirstpt, Thelastpt, TheParam); - } - else { - for (i = myfirstParam->Lower(); i <= myfirstParam->Upper(); i++) { - TheParam(i + Thefirstpt - 1) = myfirstParam->Value(i); - } - } - AppParCurves_Constraint Cons = AppParCurves_TangencyPoint; - Standard_Real lambda1, lambda2; - Standard_Real Fv; - - // Recherche du nombre de noeuds. - Standard_Integer nbknots, nbpoles, nbpoints; - nbpoints = Thelastpt - Thefirstpt + 1; - - if (nbpoints == 2) { - Cons = AppParCurves_NoConstraint; - Standard_Integer mydeg = 1; - Approx_BSpParLeastSquareOfMyBSplGradient - LSQ(Line, Thefirstpt, Thelastpt, Cons, Cons, TheParam, mydeg + 1); - alldone = LSQ.IsDone(); - TColStd_Array1OfReal TheKnots(1, 2); - TColStd_Array1OfInteger TheMults(1, 2); - TheKnots(1) = TheParam(Thefirstpt); TheKnots(2) = TheParam(Thelastpt); - TheMults(1) = TheMults(2) = mydeg + 1; - TheMultiBSpCurve = - AppParCurves_MultiBSpCurve(LSQ.BezierValue(), TheKnots, TheMults); - LSQ.Error(Fv, currenttol3d, currenttol2d); - - } - else { - nbpoles = nbpoints + 2; - nbknots = nbpoints; - - // Resolution: - TColStd_Array1OfReal Theknots(1, nbknots); - Theknots(1) = TheParam(Thefirstpt); - Theknots(nbknots) = TheParam(Thelastpt); - TColStd_Array1OfInteger TheMults(1, nbknots); - TheMults(1) = deg + 1; - TheMults(nbknots) = deg + 1; - - Standard_Integer low = TheParam.Lower(); - for (i = 2; i <= nbknots - 1; i++) { - Theknots(i) = TheParam(i + low - 1); - TheMults(i) = 1; - } - - - Standard_Integer nbP = 3 * LineTool::NbP3d(Line) + 2 * LineTool::NbP2d(Line); - math_Vector V1(1, nbP), V2(1, nbP); - - if (nbpoints == 3 || nbpoints == 4) { - FirstTangencyVector(Line, Thefirstpt, V1); - lambda1 = SearchFirstLambda(Line, TheParam, Theknots, V1, Thefirstpt); - - LastTangencyVector(Line, Thelastpt, V2); - lambda2 = SearchLastLambda(Line, TheParam, Theknots, V2, Thelastpt); - - lambda1 = lambda1 / deg; - lambda2 = lambda2 / deg; - } - else { - Standard_Integer nnpol, nnp = Min(nbpoints, 9); - nnpol = nnp; - Standard_Integer lastp = Min(Thelastpt, Thefirstpt + nnp - 1); - Standard_Real U; - Approx_BSpParLeastSquareOfMyBSplGradient - SQ1(Line, Thefirstpt, lastp, Cons, Cons, nnpol); - - math_Vector P1(Thefirstpt, lastp); - for (i = Thefirstpt; i <= lastp; i++) P1(i) = TheParam(i); - SQ1.Perform(P1); - const AppParCurves_MultiCurve& C1 = SQ1.BezierValue(); - U = 0.0; - TangencyVector(Line, C1, U, V1); - - Standard_Integer firstp = Max(Thefirstpt, Thelastpt - nnp + 1); - - if (firstp == Thefirstpt && lastp == Thelastpt) { - U = 1.0; - TangencyVector(Line, C1, U, V2); - } - else { - Approx_BSpParLeastSquareOfMyBSplGradient - SQ2(Line, firstp, Thelastpt, Cons, Cons, nnpol); - - math_Vector P2(firstp, Thelastpt); - for (i = firstp; i <= Thelastpt; i++) P2(i) = TheParam(i); - SQ2.Perform(P2); - const AppParCurves_MultiCurve& C2 = SQ2.BezierValue(); - U = 1.0; - TangencyVector(Line, C2, U, V2); - } - - - lambda1 = 1. / deg; - lambda1 = lambda1*(Theknots(2) - Theknots(1)) - / (Theknots(nbknots) - Theknots(1)); - lambda2 = 1. / deg; - lambda2 = lambda2*(Theknots(nbknots) - Theknots(nbknots - 1)) - / (Theknots(nbknots) - Theknots(1)); - - } - - if (myPeriodic) - { - V1 = 0.5 * (V1 + V2); - V2 = V1; - } - - Approx_BSpParLeastSquareOfMyBSplGradient - SQ(Line, Theknots, TheMults, Thefirstpt, Thelastpt, - Cons, Cons, nbpoles); - - SQ.Perform(TheParam, V1, V2, lambda1, lambda2); - alldone = SQ.IsDone(); - TheMultiBSpCurve = SQ.BSplineValue(); - SQ.Error(Fv, currenttol3d, currenttol2d); - tolreached = Standard_True; - } - myParameters = new TColStd_HArray1OfReal(TheParam.Lower(), TheParam.Upper()); - for (i = TheParam.Lower(); i <= TheParam.Upper(); i++) { - myParameters->SetValue(i, TheParam(i)); - } -} - - -//======================================================================= -//function : TangencyVector -//purpose : -//======================================================================= -void Approx_BSplComputeLine::TangencyVector( - const MultiLine& Line, - const AppParCurves_MultiCurve& C, - const Standard_Real U, - math_Vector& V) const -{ - - Standard_Integer i, j, nbP2d, nbP3d; - nbP3d = LineTool::NbP3d(Line); - nbP2d = LineTool::NbP2d(Line); - - gp_Pnt myP; - gp_Vec myV; - gp_Pnt2d myP2d; - gp_Vec2d myV2d; - j = 1; - for (i = 1; i <= nbP3d; i++) { - C.D1(i, U, myP, myV); - V(j) = myV.X(); - V(j + 1) = myV.Y(); - V(j + 2) = myV.Z(); - j += 3; - } - j = nbP3d * 3 + 1; - for (i = nbP3d + 1; i <= nbP3d + nbP2d; i++) { - C.D1(i, U, myP2d, myV2d); - V(j) = myV2d.X(); - V(j + 1) = myV2d.Y(); - j += 2; - } - -} - diff --git a/opencascade/Approx_ComputeCLine.gxx b/opencascade/Approx_ComputeCLine.gxx deleted file mode 100644 index a788375de..000000000 --- a/opencascade/Approx_ComputeCLine.gxx +++ /dev/null @@ -1,495 +0,0 @@ -// Copyright (c) 1995-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -// modified by Edward AGAPOV (eap) Tue Apr 2 2002 (occ265) -// -- stop cutting an interval to approximate if next decisions -// -- get worse on and on - - - -#include -#include -#include -#include -#include -#include - -const static Standard_Integer MAXSEGM = 1000; - -//======================================================================= -//function : Approx_ComputeCLine -//purpose : The MultiLine will be approximated until tolerances -// will be reached. -// The approximation will be done from degreemin to degreemax -// with a cutting if the corresponding boolean is True. -//======================================================================= - -Approx_ComputeCLine::Approx_ComputeCLine -(const MultiLine& Line, -const Standard_Integer degreemin, -const Standard_Integer degreemax, -const Standard_Real Tolerance3d, -const Standard_Real Tolerance2d, -const Standard_Boolean cutting, -const AppParCurves_Constraint FirstC, -const AppParCurves_Constraint LastC) -{ - mydegremin = degreemin; - mydegremax = degreemax; - mytol3d = Tolerance3d; - mytol2d = Tolerance2d; - mycut = cutting; - myfirstC = FirstC; - mylastC = LastC; - myMaxSegments = MAXSEGM; - myInvOrder = Standard_True; - myHangChecking = Standard_True; - alldone = Standard_False; - tolreached = Standard_False; - currenttol3d = 0.0; - currenttol2d = 0.0; - Perform(Line); -} - -//======================================================================= -//function : Approx_ComputeCLine -//purpose : Initializes the fields of the algorithm. -//======================================================================= - -Approx_ComputeCLine::Approx_ComputeCLine -(const Standard_Integer degreemin, -const Standard_Integer degreemax, -const Standard_Real Tolerance3d, -const Standard_Real Tolerance2d, -const Standard_Boolean cutting, -const AppParCurves_Constraint FirstC, -const AppParCurves_Constraint LastC) -{ - alldone = Standard_False; - mydegremin = degreemin; - mydegremax = degreemax; - mytol3d = Tolerance3d; - mytol2d = Tolerance2d; - mycut = cutting; - myfirstC = FirstC; - mylastC = LastC; - myMaxSegments = MAXSEGM; - myInvOrder = Standard_True; - myHangChecking = Standard_True; - tolreached = Standard_False; - currenttol3d = 0.0; - currenttol2d = 0.0; -} - -//======================================================================= -//function : Perform -//purpose : runs the algorithm after having initialized the fields. -//======================================================================= - -void Approx_ComputeCLine::Perform(const MultiLine& Line) -{ - Standard_Real UFirst, ULast; - Standard_Boolean Finish = Standard_False, - begin = Standard_True, Ok = Standard_False; - Standard_Real thetol3d = Precision::Confusion(), thetol2d = Precision::Confusion(); - UFirst = Line.FirstParameter(); - ULast = Line.LastParameter(); - Standard_Real TolU = 0.; - if (myHangChecking) - { - TolU = Max((ULast - UFirst)*1.e-03, Precision::Confusion()); - } - else - { - TolU = Max((ULast - UFirst)*1.e-05, Precision::PApproximation()); - } - Standard_Real myfirstU = UFirst; - Standard_Real mylastU = ULast; - Standard_Integer aMaxSegments = 0; - Standard_Integer aMaxSegments1 = myMaxSegments - 1; - Standard_Integer aNbCut = 0, aNbImp = 0, aNbComp = 10; - - if (!mycut) - { - alldone = Compute(Line, UFirst, ULast, thetol3d, thetol2d); - if (!alldone) - { - tolreached = Standard_False; - myfirstparam.Append(UFirst); - mylastparam.Append(ULast); - myMultiCurves.Append(TheMultiCurve); - Tolers3d.Append(currenttol3d); - Tolers2d.Append(currenttol2d); - } - } - else - { - - // previous decision to be taken if we get worse with next cut (eap) - AppParCurves_MultiCurve KeptMultiCurve; - Standard_Real KeptUfirst = 0., KeptUlast = 0., KeptT3d = RealLast(), KeptT2d = 0.; - - while (!Finish) - { - - // Gestion du decoupage de la multiline pour approximer: - if (!begin) - { - if (Ok) - { - // Calcul de la partie a approximer. - myfirstU = mylastU; - mylastU = ULast; - aNbCut = 0; - aNbImp = 0; - if (Abs(ULast - myfirstU) <= RealEpsilon() - || aMaxSegments >= myMaxSegments) - { - Finish = Standard_True; - alldone = Standard_True; - return; - } - KeptT3d = RealLast(); KeptT2d = 0; - KeptUfirst = myfirstU; - KeptUlast = mylastU; - } - else - { - // keep best decision - if ((thetol3d + thetol2d) < (KeptT3d + KeptT2d)) - { - KeptMultiCurve = TheMultiCurve; - KeptUfirst = myfirstU; - KeptUlast = mylastU; - KeptT3d = thetol3d; - KeptT2d = thetol2d; - aNbImp++; - } - - // cut an interval - mylastU = (myfirstU + mylastU) / 2; - aNbCut++; - } - } - - // Calcul des parametres sur ce nouvel intervalle. - Ok = Compute(Line, myfirstU, mylastU, thetol3d, thetol2d); - if (Ok) - { - aMaxSegments++; - } - - //cout << myfirstU << " - " << mylastU << " tol : " << thetol3d << " " << thetol2d << endl; - Standard_Boolean aStopCutting = Standard_False; - if (myHangChecking && aNbCut >= aNbComp) - { - if (aNbCut > aNbImp + 1) - { - aStopCutting = Standard_True; - } - aNbCut = 0; - aNbImp = 0; - } - // is new decision better? - if (!Ok && (Abs(myfirstU - mylastU) <= TolU || aMaxSegments >= aMaxSegments1 || aStopCutting )) - { - Ok = Standard_True; // stop interval cutting, approx the rest part - - if ((thetol3d + thetol2d) < (KeptT3d + KeptT2d)) - { - KeptMultiCurve = TheMultiCurve; - KeptUfirst = myfirstU; - KeptUlast = mylastU; - KeptT3d = thetol3d; - KeptT2d = thetol2d; - } - - mylastU = KeptUlast; - - tolreached = Standard_False; // helas - myMultiCurves.Append(KeptMultiCurve); - aMaxSegments++; - Tolers3d.Append(KeptT3d); - Tolers2d.Append(KeptT2d); - myfirstparam.Append(KeptUfirst); - mylastparam.Append(KeptUlast); - } - - begin = Standard_False; - } // while (!Finish) - } -} - -//======================================================================= -//function : NbMultiCurves -//purpose : Returns the number of MultiCurve doing the approximation -// of the MultiLine. -//======================================================================= - -Standard_Integer Approx_ComputeCLine::NbMultiCurves()const -{ - return myMultiCurves.Length(); -} - -//======================================================================= -//function : Value -//purpose : returns the approximation MultiCurve of range . -//======================================================================= - -AppParCurves_MultiCurve Approx_ComputeCLine::Value(const Standard_Integer Index) -const -{ - return myMultiCurves.Value(Index); -} - -//======================================================================= -//function : Compute -//purpose : is internally used by the algorithms. -//======================================================================= - -Standard_Boolean Approx_ComputeCLine::Compute(const MultiLine& Line, - const Standard_Real Ufirst, - const Standard_Real Ulast, - Standard_Real& TheTol3d, - Standard_Real& TheTol2d) -{ - - - const Standard_Integer NbPointsMax = 24; - const Standard_Real aMinRatio = 0.05; - const Standard_Integer aMaxDeg = 8; - // - Standard_Integer deg, NbPoints; - Standard_Boolean mydone; - Standard_Real Fv; - - AppParCurves_MultiCurve aPrevCurve; - Standard_Real aPrevTol3d = RealLast(), aPrevTol2d = RealLast(); - Standard_Boolean aPrevIsOk = Standard_False; - Standard_Boolean anInvOrder = myInvOrder; - if (anInvOrder && mydegremax > aMaxDeg) - { - if ((Ulast - Ufirst) / (Line.LastParameter() - Line.FirstParameter()) < aMinRatio) - { - anInvOrder = Standard_False; - } - } - if (anInvOrder) - { - for (deg = mydegremax; deg >= mydegremin; deg--) { - NbPoints = Min(2 * deg + 1, NbPointsMax); - AppCont_LeastSquare LSquare(Line, Ufirst, Ulast, myfirstC, mylastC, deg, NbPoints); - mydone = LSquare.IsDone(); - if (mydone) - { - LSquare.Error(Fv, TheTol3d, TheTol2d); - if (TheTol3d <= mytol3d && TheTol2d <= mytol2d) - { - if (deg == mydegremin) - { - // Stockage de la multicurve approximee. - tolreached = Standard_True; - myMultiCurves.Append(LSquare.Value()); - myfirstparam.Append(Ufirst); - mylastparam.Append(Ulast); - Tolers3d.Append(TheTol3d); - Tolers2d.Append(TheTol2d); - return Standard_True; - } - aPrevTol3d = TheTol3d; - aPrevTol2d = TheTol2d; - aPrevCurve = LSquare.Value(); - aPrevIsOk = Standard_True; - continue; - } - else if (aPrevIsOk) - { - // Stockage de la multicurve approximee. - tolreached = Standard_True; - TheTol3d = aPrevTol3d; - TheTol2d = aPrevTol2d; - myMultiCurves.Append(aPrevCurve); - myfirstparam.Append(Ufirst); - mylastparam.Append(Ulast); - Tolers3d.Append(aPrevTol3d); - Tolers2d.Append(aPrevTol2d); - return Standard_True; - } - } - else if (aPrevIsOk) - { - // Stockage de la multicurve approximee. - tolreached = Standard_True; - TheTol3d = aPrevTol3d; - TheTol2d = aPrevTol2d; - myMultiCurves.Append(aPrevCurve); - myfirstparam.Append(Ufirst); - mylastparam.Append(Ulast); - Tolers3d.Append(aPrevTol3d); - Tolers2d.Append(aPrevTol2d); - return Standard_True; - } - if (!aPrevIsOk && deg == mydegremax) - { - TheMultiCurve = LSquare.Value(); - currenttol3d = TheTol3d; - currenttol2d = TheTol2d; - aPrevTol3d = TheTol3d; - aPrevTol2d = TheTol2d; - aPrevCurve = TheMultiCurve; - break; - } - } - } - else - { - for (deg = mydegremin; deg <= mydegremax; deg++) { - NbPoints = Min(2 * deg + 1, NbPointsMax); - AppCont_LeastSquare LSquare(Line, Ufirst, Ulast, myfirstC, mylastC, deg, NbPoints); - mydone = LSquare.IsDone(); - if (mydone) { - LSquare.Error(Fv, TheTol3d, TheTol2d); - if (TheTol3d <= mytol3d && TheTol2d <= mytol2d) { - // Stockage de la multicurve approximee. - tolreached = Standard_True; - myMultiCurves.Append(LSquare.Value()); - myfirstparam.Append(Ufirst); - mylastparam.Append(Ulast); - Tolers3d.Append(TheTol3d); - Tolers2d.Append(TheTol2d); - return Standard_True; - } - } - if (deg == mydegremax) { - TheMultiCurve = LSquare.Value(); - currenttol3d = TheTol3d; - currenttol2d = TheTol2d; - } - } - } - return Standard_False; -} - -//======================================================================= -//function : Parameters -//purpose : returns the first and last parameters of the -// MultiCurve. -//======================================================================= - -void Approx_ComputeCLine::Parameters(const Standard_Integer Index, - Standard_Real& firstpar, - Standard_Real& lastpar) const -{ - firstpar = myfirstparam.Value(Index); - lastpar = mylastparam.Value(Index); -} - -//======================================================================= -//function : SetDegrees -//purpose : changes the degrees of the approximation. -//======================================================================= - -void Approx_ComputeCLine::SetDegrees(const Standard_Integer degreemin, - const Standard_Integer degreemax) -{ - mydegremin = degreemin; - mydegremax = degreemax; -} - -//======================================================================= -//function : SetTolerances -//purpose : Changes the tolerances of the approximation. -//======================================================================= - -void Approx_ComputeCLine::SetTolerances(const Standard_Real Tolerance3d, - const Standard_Real Tolerance2d) -{ - mytol3d = Tolerance3d; - mytol2d = Tolerance2d; -} - -//======================================================================= -//function : SetConstraints -//purpose : Changes the constraints of the approximation. -//======================================================================= - -void Approx_ComputeCLine::SetConstraints(const AppParCurves_Constraint FirstC, - const AppParCurves_Constraint LastC) -{ - myfirstC = FirstC; - mylastC = LastC; -} - -//======================================================================= -//function : SetMaxSegments -//purpose : Changes the max number of segments, which is allowed for cutting. -//======================================================================= - -void Approx_ComputeCLine::SetMaxSegments(const Standard_Integer theMaxSegments) -{ - myMaxSegments = theMaxSegments; -} - -//======================================================================= -//function : SetInvOrder -//purpose : -//======================================================================= -void Approx_ComputeCLine::SetInvOrder(const Standard_Boolean theInvOrder) -{ - myInvOrder = theInvOrder; -} - -//======================================================================= -//function : SetHangChecking -//purpose : -//======================================================================= -void Approx_ComputeCLine::SetHangChecking(const Standard_Boolean theHangChecking) -{ - myHangChecking = theHangChecking; -} - -//======================================================================= -//function : IsAllApproximated -//purpose : returns False if at a moment of the approximation, -// the status NoApproximation has been sent by the user -// when more points were needed. -//======================================================================= - -Standard_Boolean Approx_ComputeCLine::IsAllApproximated() -const { - return alldone; -} - -//======================================================================= -//function : IsToleranceReached -//purpose : returns False if the status NoPointsAdded has been sent. -//======================================================================= - -Standard_Boolean Approx_ComputeCLine::IsToleranceReached() -const { - return tolreached; -} - -//======================================================================= -//function : Error -//purpose : returns the tolerances 2d and 3d of the MultiCurve. -//======================================================================= - -void Approx_ComputeCLine::Error(const Standard_Integer Index, - Standard_Real& tol3d, - Standard_Real& tol2d) const -{ - tol3d = Tolers3d.Value(Index); - tol2d = Tolers2d.Value(Index); -} diff --git a/opencascade/Approx_ComputeLine.gxx b/opencascade/Approx_ComputeLine.gxx deleted file mode 100644 index 9e63eb95a..000000000 --- a/opencascade/Approx_ComputeLine.gxx +++ /dev/null @@ -1,1670 +0,0 @@ -// Copyright (c) 1995-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#ifdef OCCT_DEBUG -static Standard_Boolean mydebug = Standard_False; - -#include -#include -#ifdef DRAW -#include -#include -#include -#endif - -static void DUMP(const MultiLine& Line) -{ - Standard_Integer i, j, nbP2d, nbP3d, firstP, lastP; - gp_Pnt P1; - gp_Pnt2d P12d; - - firstP = LineTool::FirstPoint(Line); - lastP = LineTool::LastPoint(Line); - - nbP3d = LineTool::NbP3d(Line); - nbP2d = LineTool::NbP2d(Line); - Standard_Integer mynbP3d=nbP3d, mynbP2d=nbP2d; - if (nbP3d == 0) mynbP3d = 1; - if (nbP2d == 0) mynbP2d = 1; - - TColgp_Array1OfPnt tabP(1, mynbP3d); - TColgp_Array1OfPnt2d tabP2d(1, mynbP2d); - - std::cout <<"DUMP de la MultiLine entre "< 1) //only simple cases are analysed - return Standard_True; - - const Standard_Real MinScalProd = -0.9; - const Standard_Real SqTol3d = Precision::SquareConfusion(); - - theIndbad = 0; - Standard_Integer indbads [4]; - indbads[1] = indbads[2] = indbads[3] = 0; - - Standard_Integer NbCur = theMultiCurve.NbCurves(); - Standard_Boolean LoopFound = Standard_False; - - Standard_Integer aNbP3d = Max(nbp3d, 1); - Standard_Integer aNbP2d = Max(nbp2d, 1); - - TColgp_Array1OfPnt tabP(1, aNbP3d); - TColgp_Array1OfPnt2d tabP2d(1, aNbP2d); - -#ifdef DRAW - char* name = new char[100]; - Standard_Integer nbbc = 1; - Standard_Integer indc = 1; -#endif - if (theMultiCurve.Dimension(1) == 3 /*myNbP3d == 1*/) - { - TColgp_Array1OfPnt aPoles(1, theMultiCurve.NbPoles()); - theMultiCurve.Curve(1, aPoles); -#ifdef DRAW - Handle(Geom_Curve) theBezier = new Geom_BezierCurve(aPoles); - sprintf(name, "bc3d_%d_%d", indc, nbbc); - DrawTrSurf::Set(name, theBezier); -#endif - gp_Vec FirstVec, SecondVec; - Standard_Integer indp = 2; - while (indp <= aPoles.Upper()) - { - FirstVec = gp_Vec(aPoles(1), aPoles(indp++)); - Standard_Real aLength = FirstVec.Magnitude(); - if (aLength > gp::Resolution()) - { - FirstVec /= aLength; - break; - } - } - gp_Pnt MidPnt = aPoles(indp-1); - //for (Standard_Integer k = 3; k <= aPoles.Upper(); k++) - while (indp <= aPoles.Upper()) - { - SecondVec = gp_Vec(MidPnt, aPoles(indp)); - Standard_Real aLength = SecondVec.Magnitude(); - if (aLength <= gp::Resolution()) - { - indp++; - continue; - } - SecondVec /= aLength; - Standard_Real ScalProd = FirstVec * SecondVec; - if (ScalProd < MinScalProd) - { -#ifdef DRAW - std::cout<<"ScalProd("< - Standard_Real MaxSqDist = 0.; - Standard_Real MinSqDist = RealLast(); - for (Standard_Integer k = theIndfirst+1; k <= theIndlast; k++) - { - LineTool::Value(theLine, k-1, tabP); - gp_Pnt PrevPnt = tabP(1); - LineTool::Value(theLine, k, tabP); - gp_Pnt CurPnt = tabP(1); - Standard_Real aSqDist = PrevPnt.SquareDistance(CurPnt); - if (aSqDist > MaxSqDist) - { - MaxSqDist = aSqDist; - indbads[1] = k; - } - if (aSqDist > gp::Resolution() && - aSqDist < MinSqDist) - MinSqDist = aSqDist; - } - Standard_Real Relation = MaxSqDist / MinSqDist; - if (Relation < coeff) - LoopFound = Standard_False; - else - for (Standard_Integer indcur = 2; indcur <= NbCur; indcur++) - { - MaxSqDist = 0.; - for (Standard_Integer k = theIndfirst+1; k <= theIndlast; k++) - { - LineTool::Value(theLine, k-1, tabP2d); - gp_Pnt2d PrevPnt = tabP2d(indcur-1); - LineTool::Value(theLine, k, tabP2d); - gp_Pnt2d CurPnt = tabP2d(indcur-1); - Standard_Real aSqDist = PrevPnt.SquareDistance(CurPnt); - if (aSqDist > MaxSqDist) - { - MaxSqDist = aSqDist; - indbads[indcur] = k; - } - } - } - } - } //if (myNbP3d == 1) - else //2d case - { - TColgp_Array1OfPnt2d aPoles2d(1, theMultiCurve.NbPoles()); - theMultiCurve.Curve(1, aPoles2d); -#ifdef DRAW - Handle(Geom2d_Curve) theBezier2d = new Geom2d_BezierCurve(aPoles2d); - sprintf(name, "bc2d_%d_%d", indc, nbbc); - DrawTrSurf::Set(name, theBezier2d); -#endif - const Standard_Real aSqNormToler = Epsilon(1.0)*Epsilon(1.0); - gp_Vec2d FirstVec(aPoles2d(1), aPoles2d(2)), SecondVec; - Standard_Real aVecSqNorm = FirstVec.SquareMagnitude(); - if (aVecSqNorm < aSqNormToler) - { - theIndbad = theIndfirst + 1; - return Standard_False; - } - - FirstVec /= Sqrt(aSqNormToler); - gp_Pnt2d MidPnt = aPoles2d(2); - for (Standard_Integer k = 3; k <= aPoles2d.Upper(); k++) - { - SecondVec.SetXY(aPoles2d(k).XY() - MidPnt.XY()); - aVecSqNorm = SecondVec.SquareMagnitude(); - if (aVecSqNorm < aSqNormToler) - { - theIndbad = theIndfirst + k - 1; - return Standard_False; - } - - SecondVec /= Sqrt(aVecSqNorm); - Standard_Real ScalProd = FirstVec * SecondVec; - if (ScalProd < MinScalProd) - { -#ifdef DRAW - std::cout<<"ScalProd("< - for (Standard_Integer indcur = 1; indcur <= NbCur; indcur++) - { - Standard_Real MaxSqDist = 0.; - Standard_Real MinSqDist = RealLast(); - for (Standard_Integer k = theIndfirst+1; k <= theIndlast; k++) - { - LineTool::Value(theLine, k-1, tabP2d); - gp_Pnt2d PrevPnt = tabP2d(indcur); - LineTool::Value(theLine, k, tabP2d); - gp_Pnt2d CurPnt = tabP2d(indcur); - Standard_Real aSqDist = PrevPnt.SquareDistance(CurPnt); - if (aSqDist > MaxSqDist) - { - MaxSqDist = aSqDist; - indbads[indcur] = k; - } - if (aSqDist > gp::Resolution() && - aSqDist < MinSqDist) - MinSqDist = aSqDist; - } - Standard_Real Relation = MaxSqDist / MinSqDist; - if (Relation < coeff) - LoopFound = Standard_False; - } - } - } - - //Define - for (Standard_Integer i = 1; i <= 3; i++) - if (indbads[i] != 0) - { - theIndbad = indbads[i]; - break; - } - - if (!LoopFound) - theIndbad = 0; - - return (!LoopFound); -} - -void Approx_ComputeLine::FirstTangencyVector(const MultiLine& Line, - const Standard_Integer index, - math_Vector& V) const -{ - - Standard_Integer i, j, nbP2d, nbP3d; - nbP3d = LineTool::NbP3d(Line); - nbP2d = LineTool::NbP2d(Line); - Standard_Integer mynbP3d=nbP3d, mynbP2d=nbP2d; - if (nbP3d == 0) mynbP3d = 1; - if (nbP2d == 0) mynbP2d = 1; - Standard_Boolean Ok=Standard_False; - TColgp_Array1OfVec TabV(1, mynbP3d); - TColgp_Array1OfVec2d TabV2d(1, mynbP2d); - - if (nbP3d != 0 && nbP2d != 0) - Ok = LineTool::Tangency(Line, index, TabV, TabV2d); - else if (nbP2d != 0) - Ok = LineTool::Tangency(Line, index, TabV2d); - else if (nbP3d != 0) - Ok = LineTool::Tangency(Line, index, TabV); - - if (Ok) { - if (nbP3d != 0) { - j = 1; - for (i = TabV.Lower(); i <= TabV.Upper(); i++) { - V(j) = TabV(i).X(); - V(j+1) = TabV(i).Y(); - V(j+2) = TabV(i).Z(); - j += 3; - } - } - if (nbP2d != 0) { - j = nbP3d*3+1; - for (i = TabV2d.Lower(); i <= TabV2d.Upper(); i++) { - V(j) = TabV2d(i).X(); - V(j+1) = TabV2d(i).Y(); - j += 2; - } - } - } - else { - - // recherche d un vecteur tangent par construction d une parabole: - AppParCurves_Constraint firstC, lastC; - firstC = lastC = AppParCurves_PassPoint; - Standard_Integer nbpoles = 3; - math_Vector mypar(index, index+2); - Parameters(Line, index, index+2, mypar); - Approx_ParLeastSquareOfMyGradient - LSQ(Line, index, index+2, firstC, lastC, mypar, nbpoles); - AppParCurves_MultiCurve C = LSQ.BezierValue(); - - gp_Pnt myP; - gp_Vec myV; - gp_Pnt2d myP2d; - gp_Vec2d myV2d; - j = 1; - for (i = 1; i <= nbP3d; i++) { - C.D1(i, 0.0, myP, myV); - V(j) = myV.X(); - V(j+1) = myV.Y(); - V(j+2) = myV.Z(); - j += 3; - } - j = nbP3d*3+1; - for (i = nbP3d+1; i <= nbP3d+nbP2d; i++) { - C.D1(i, 0.0, myP2d, myV2d); - V(j) = myV2d.X(); - V(j+1) = myV2d.Y(); - j += 2; - } - } -} - - -void Approx_ComputeLine::LastTangencyVector(const MultiLine& Line, - const Standard_Integer index, - math_Vector& V) const -{ - Standard_Integer i, j, nbP2d, nbP3d; - nbP3d = LineTool::NbP3d(Line); - nbP2d = LineTool::NbP2d(Line); - Standard_Integer mynbP3d=nbP3d, mynbP2d=nbP2d; - if (nbP3d == 0) mynbP3d = 1; - if (nbP2d == 0) mynbP2d = 1; - Standard_Boolean Ok=Standard_False; - TColgp_Array1OfVec TabV(1, mynbP3d); - TColgp_Array1OfVec2d TabV2d(1, mynbP2d); - - - if (nbP3d != 0 && nbP2d != 0) - Ok = LineTool::Tangency(Line, index, TabV, TabV2d); - else if (nbP2d != 0) - Ok = LineTool::Tangency(Line, index, TabV2d); - else if (nbP3d != 0) - Ok = LineTool::Tangency(Line, index, TabV); - - if (Ok) { - if (nbP3d != 0) { - j = 1; - for (i = TabV.Lower(); i <= TabV.Upper(); i++) { - V(j) = TabV(i).X(); - V(j+1) = TabV(i).Y(); - V(j+2) = TabV(i).Z(); - j += 3; - } - } - if (nbP2d != 0) { - j = nbP3d*3+1; - for (i = TabV2d.Lower(); i <= TabV2d.Upper(); i++) { - V(j) = TabV2d(i).X(); - V(j+1) = TabV2d(i).Y(); - j += 2; - } - } - } - else { - - // recherche d un vecteur tangent par construction d une parabole: - AppParCurves_Constraint firstC, lastC; - firstC = lastC = AppParCurves_PassPoint; - Standard_Integer nbpoles = 3; - math_Vector mypar(index-2, index); - Parameters(Line, index-2, index, mypar); - Approx_ParLeastSquareOfMyGradient - LSQ(Line, index-2, index, firstC, lastC, mypar, nbpoles); - AppParCurves_MultiCurve C = LSQ.BezierValue(); - - gp_Pnt myP; - gp_Vec myV; - gp_Pnt2d myP2d; - gp_Vec2d myV2d; - j = 1; - for (i = 1; i <= nbP3d; i++) { - C.D1(i, 1.0, myP, myV); - V(j) = myV.X(); - V(j+1) = myV.Y(); - V(j+2) = myV.Z(); - j += 3; - } - j = nbP3d*3+1; - for (i = nbP3d+1; i <= nbP3d+nbP2d; i++) { - C.D1(i, 1.0, myP2d, myV2d); - V(j) = myV2d.X(); - V(j+1) = myV2d.Y(); - j += 2; - } - } - -} - - - -Standard_Real Approx_ComputeLine:: - SearchFirstLambda(const MultiLine& Line, - const math_Vector& TheParam, - const math_Vector& V, - const Standard_Integer index) const -{ - - // dq/dw = lambda* V = (p2-p1)/(u2-u1) - - Standard_Integer nbP2d, nbP3d; - gp_Pnt P1, P2; - gp_Pnt2d P12d, P22d; - nbP3d = LineTool::NbP3d(Line); - nbP2d = LineTool::NbP2d(Line); - Standard_Integer mynbP3d=nbP3d, mynbP2d=nbP2d; - if (nbP3d == 0) mynbP3d = 1; - if (nbP2d == 0) mynbP2d = 1; - TColgp_Array1OfPnt tabP1(1, mynbP3d), tabP2(1, mynbP3d); - TColgp_Array1OfPnt2d tabP12d(1, mynbP2d), tabP22d(1, mynbP2d); - - - if (nbP3d != 0 && nbP2d != 0) LineTool::Value(Line, index, tabP1, tabP12d); - else if (nbP2d != 0) LineTool::Value(Line, index, tabP12d); - else if (nbP3d != 0) LineTool::Value(Line, index, tabP1); - - if (nbP3d != 0 && nbP2d != 0) LineTool::Value(Line, index+1, tabP2, tabP22d); - else if (nbP2d != 0) LineTool::Value(Line, index+1, tabP22d); - else if (nbP3d != 0) LineTool::Value(Line, index+1, tabP2); - - - Standard_Real U1 = TheParam(index), U2 = TheParam(index+1); - Standard_Real lambda, S; - Standard_Integer low = V.Lower(); - - if (nbP3d != 0) { - P1 = tabP1(1); - P2 = tabP2(1); - gp_Vec P1P2(P1, P2), myV; - myV.SetCoord(V(low), V(low+1), V(low+2)); - lambda = (P1P2.Magnitude())/(myV.Magnitude()*(U2-U1)); - S = (P1P2.Dot(myV)> 0.0) ? 1.0 : -1.0; - } - else { - P12d = tabP12d(1); - P22d = tabP22d(1); - gp_Vec2d P1P2(P12d, P22d), myV; - myV.SetCoord(V(low), V(low+1)); - lambda = (P1P2.Magnitude())/(myV.Magnitude()*(U2-U1)); - S = (P1P2.Dot(myV)> 0.0) ? 1.0 : -1.0; - } - return (S*lambda); - -} - - -Standard_Real Approx_ComputeLine:: - SearchLastLambda(const MultiLine& Line, - const math_Vector& TheParam, - const math_Vector& V, - const Standard_Integer index) const -{ - // dq/dw = lambda* V = (p2-p1)/(u2-u1) - - Standard_Integer nbP2d, nbP3d; - gp_Pnt P1, P2; - gp_Pnt2d P12d, P22d; - nbP3d = LineTool::NbP3d(Line); - nbP2d = LineTool::NbP2d(Line); - Standard_Integer mynbP3d=nbP3d, mynbP2d=nbP2d; - if (nbP3d == 0) mynbP3d = 1; - if (nbP2d == 0) mynbP2d = 1; - TColgp_Array1OfPnt tabP(1, mynbP3d), tabP2(1, mynbP3d); - TColgp_Array1OfPnt2d tabP2d(1, mynbP2d), tabP22d(1, mynbP2d); - - if (nbP3d != 0 && nbP2d != 0) LineTool::Value(Line, index-1, tabP, tabP2d); - else if (nbP2d != 0) LineTool::Value(Line, index-1, tabP2d); - else if (nbP3d != 0) LineTool::Value(Line, index-1, tabP); - - if (nbP3d != 0 && nbP2d != 0) LineTool::Value(Line, index, tabP2, tabP22d); - else if (nbP2d != 0) LineTool::Value(Line, index, tabP22d); - else if (nbP3d != 0) LineTool::Value(Line, index, tabP2); - - - Standard_Real U1 = TheParam(index-1), U2 = TheParam(index); - Standard_Real lambda, S; - Standard_Integer low = V.Lower(); - - if (nbP3d != 0) { - P1 = tabP(1); - P2 = tabP2(1); - gp_Vec P1P2(P1, P2), myV; - myV.SetCoord(V(low), V(low+1), V(low+2)); - lambda = (P1P2.Magnitude())/(myV.Magnitude()*(U2-U1)); - S = (P1P2.Dot(myV)> 0.0) ? 1.0 : -1.0; - } - else { - P12d = tabP2d(1); - P22d = tabP22d(1); - gp_Vec2d P1P2(P12d, P22d), myV; - myV.SetCoord(V(low), V(low+1)); - lambda = (P1P2.Magnitude())/(myV.Magnitude()*(U2-U1)); - S = (P1P2.Dot(myV)> 0.0) ? 1.0 : -1.0; - } - - return (S*lambda); -} - - - -Approx_ComputeLine::Approx_ComputeLine - (const MultiLine& Line, - const math_Vector& Parameters, - const Standard_Integer degreemin, - const Standard_Integer degreemax, - const Standard_Real Tolerance3d, - const Standard_Real Tolerance2d, - const Standard_Integer NbIterations, - const Standard_Boolean cutting, - const Standard_Boolean Squares) -: myMultiLineNb (0), - myIsClear (Standard_False) -{ - myfirstParam = new TColStd_HArray1OfReal(Parameters.Lower(), - Parameters.Upper()); - for (Standard_Integer i = Parameters.Lower(); i <= Parameters.Upper(); i++) { - myfirstParam->SetValue(i, Parameters(i)); - } - myConstraints = new AppParCurves_HArray1OfConstraintCouple(1, 2); - Par = Approx_IsoParametric; - mydegremin = degreemin; - mydegremax = degreemax; - mytol3d = Tolerance3d; - mytol2d = Tolerance2d; - mysquares = Squares; - mycut = cutting; - myitermax = NbIterations; - alldone = Standard_False; - myfirstC = AppParCurves_TangencyPoint; - mylastC = AppParCurves_TangencyPoint; - Perform(Line); -} - - -Approx_ComputeLine::Approx_ComputeLine - (const math_Vector& Parameters, - const Standard_Integer degreemin, - const Standard_Integer degreemax, - const Standard_Real Tolerance3d, - const Standard_Real Tolerance2d, - const Standard_Integer NbIterations, - const Standard_Boolean cutting, - const Standard_Boolean Squares) -: myMultiLineNb (0), - myIsClear (Standard_False) -{ - myfirstParam = new TColStd_HArray1OfReal(Parameters.Lower(), - Parameters.Upper()); - for (Standard_Integer i = Parameters.Lower(); i <= Parameters.Upper(); i++) { - myfirstParam->SetValue(i, Parameters(i)); - } - myfirstC = AppParCurves_TangencyPoint; - mylastC = AppParCurves_TangencyPoint; - myConstraints = new AppParCurves_HArray1OfConstraintCouple(1, 2); - Par = Approx_IsoParametric; - mydegremin = degreemin; - mydegremax = degreemax; - mytol3d = Tolerance3d; - mytol2d = Tolerance2d; - mysquares = Squares; - mycut = cutting; - myitermax = NbIterations; - alldone = Standard_False; -} - -Approx_ComputeLine::Approx_ComputeLine - (const Standard_Integer degreemin, - const Standard_Integer degreemax, - const Standard_Real Tolerance3d, - const Standard_Real Tolerance2d, - const Standard_Integer NbIterations, - const Standard_Boolean cutting, - const Approx_ParametrizationType parametrization, - const Standard_Boolean Squares) -: myMultiLineNb (0), - myIsClear (Standard_False) -{ - myConstraints = new AppParCurves_HArray1OfConstraintCouple(1, 2); - Par = parametrization; - mydegremin = degreemin; - mydegremax = degreemax; - mytol3d = Tolerance3d; - mytol2d = Tolerance2d; - mysquares = Squares; - mycut = cutting; - myitermax = NbIterations; - myfirstC = AppParCurves_TangencyPoint; - mylastC = AppParCurves_TangencyPoint; - alldone = Standard_False; -} - - -Approx_ComputeLine::Approx_ComputeLine - (const MultiLine& Line, - const Standard_Integer degreemin, - const Standard_Integer degreemax, - const Standard_Real Tolerance3d, - const Standard_Real Tolerance2d, - const Standard_Integer NbIterations, - const Standard_Boolean cutting, - const Approx_ParametrizationType parametrization, - const Standard_Boolean Squares) -: myMultiLineNb (0), - myIsClear (Standard_False) -{ - myConstraints = new AppParCurves_HArray1OfConstraintCouple(1, 2); - alldone = Standard_False; - mydegremin = degreemin; - mydegremax = degreemax; - mytol3d = Tolerance3d; - mytol2d = Tolerance2d; - mysquares = Squares; - mycut = cutting; - myitermax = NbIterations; - Par = parametrization; - myfirstC = AppParCurves_TangencyPoint; - mylastC = AppParCurves_TangencyPoint; - - Perform(Line); -} - - - -void Approx_ComputeLine::Perform(const MultiLine& Line) -{ -#ifdef OCCT_DEBUG - if (mydebug) DUMP(Line); -#endif - if (!myIsClear) - { - myMultiCurves.Clear(); - myPar.Clear(); - Tolers3d.Clear(); - Tolers2d.Clear(); - myMultiLineNb = 0; - } - else myIsClear = Standard_False; - - Standard_Integer i, nbp, Thefirstpt, Thelastpt, oldlastpt; - Standard_Boolean Finish = Standard_False, - begin = Standard_True, Ok = Standard_False, - GoUp = Standard_False, Interpol; - Standard_Real thetol3d, thetol2d; - Approx_Status MyStatus; -// gp_Vec V13d, V23d; -// gp_Vec2d V2d; - Thefirstpt = LineTool::FirstPoint(Line); - Thelastpt = LineTool::LastPoint(Line); - Standard_Integer myfirstpt = Thefirstpt; - Standard_Integer mylastpt = Thelastpt; - - AppParCurves_ConstraintCouple myCouple1(myfirstpt, myfirstC); - AppParCurves_ConstraintCouple myCouple2(mylastpt, mylastC); - myConstraints->SetValue(1, myCouple1); - myConstraints->SetValue(2, myCouple2); - - math_Vector TheParam(Thefirstpt, Thelastpt); - - - if (!mycut) { - if(myfirstParam.IsNull()) { - Parameters(Line, Thefirstpt, Thelastpt, TheParam); - } - else { - for (i = myfirstParam->Lower(); i <= myfirstParam->Upper(); i++) { - TheParam(i+Thefirstpt-1) = myfirstParam->Value(i); - } - } - TheMultiCurve = AppParCurves_MultiCurve(); - MultiLine anOtherLine0; - Standard_Boolean isOtherLine0Made = Standard_False; - Standard_Integer indbad = 0; - alldone = Compute(Line, myfirstpt, mylastpt, TheParam, thetol3d, thetol2d, indbad); - if (indbad != 0) - { - isOtherLine0Made = LineTool::MakeMLOneMorePoint(Line, myfirstpt, mylastpt, indbad, anOtherLine0); - } - if (isOtherLine0Made) - { - myIsClear = Standard_True; - //++myMultiLineNb; - Perform(anOtherLine0); - alldone = Standard_True; - } - if(!alldone && TheMultiCurve.NbCurves() > 0) { -#ifdef OCCT_DEBUG - if (mydebug) DUMP(TheMultiCurve); -#endif - myMultiCurves.Append(TheMultiCurve); - Tolers3d.Append(currenttol3d); - Tolers2d.Append(currenttol2d); - Standard_Integer mylen = mylastpt-myfirstpt+1; - Standard_Integer myParLen = myParameters->Length(); - Standard_Integer aLen = (myParLen > mylen)? myParLen : mylen; - Handle(TColStd_HArray1OfReal) ThePar = - new TColStd_HArray1OfReal(myfirstpt, myfirstpt+aLen-1); - for (i = 0; i < aLen; i++) - ThePar->SetValue(myfirstpt+i, myParameters->Value(myParameters->Lower()+i)); - myPar.Append(ThePar); - } - } - else { - while (!Finish) { - oldlastpt = mylastpt; - // Gestion du decoupage de la multiline pour approximer: - if(!begin) { - if (!GoUp) { - if (Ok) { - // Calcul de la partie a approximer. - myfirstpt = mylastpt; - mylastpt = Thelastpt; - if (myfirstpt == Thelastpt) { - Finish = Standard_True; - alldone = Standard_True; - return; - } - } - else { - nbp = mylastpt - myfirstpt + 1; - MyStatus = LineTool::WhatStatus(Line, myfirstpt, mylastpt); - if (MyStatus == Approx_NoPointsAdded && nbp <= mydegremax+1) { - Interpol = ComputeCurve(Line, myfirstpt, mylastpt); - if (Interpol) { - if (mylastpt == Thelastpt) { - Finish = Standard_True; - alldone = Standard_True; - return; - } - } - } - mylastpt = Standard_Integer((myfirstpt + mylastpt)/2); - } - } - GoUp = Standard_False; - } - - // Verification du nombre de points restants par rapport au degre - // demande. - // ============================================================== - nbp = mylastpt - myfirstpt + 1; - MyStatus = LineTool::WhatStatus(Line, myfirstpt, mylastpt); - if (nbp <= mydegremax+5 ) { - // Rajout necessaire de points si possible. - // ======================================== - GoUp = Standard_False; - Ok = Standard_True; - if (MyStatus == Approx_PointsAdded) { - // Appel recursif du decoupage: - GoUp = Standard_True; - - MultiLine anOtherLine1 = LineTool::MakeMLBetween(Line, myfirstpt, mylastpt, nbp-1); - - Standard_Integer nbpdsotherligne = LineTool::FirstPoint (anOtherLine1) - LineTool::LastPoint (anOtherLine1); - - //-- Si MakeML a echoue on retourne une ligne vide - if ((nbpdsotherligne == 0) || myMultiLineNb >= 3) - { - //-- cout<<" ** ApproxComputeLine MakeML Echec ** LBR lbr "<SetValue(1, myCouple1); - myConstraints->SetValue(2, myCouple2); - - math_Vector Param(myfirstpt, mylastpt); - Approx_ParametrizationType SavePar = Par; - Par = Approx_IsoParametric; - Parameters(Line, myfirstpt, mylastpt, Param); - TheMultiCurve = AppParCurves_MultiCurve(); - MultiLine anOtherLine2; - Standard_Boolean isOtherLine2Made = Standard_False; - Standard_Integer indbad = 0; - Ok = Compute(Line, myfirstpt, mylastpt, Param, thetol3d, thetol2d, indbad); - if (indbad != 0) - { - isOtherLine2Made = LineTool::MakeMLOneMorePoint(Line, myfirstpt, mylastpt, indbad, anOtherLine2); - } - if (isOtherLine2Made) - { - myIsClear = Standard_True; - //++myMultiLineNb; - Par = SavePar; - Perform(anOtherLine2); - Ok = Standard_True; - } - - if (!Ok) { - Standard_Real tt3d = currenttol3d, tt2d = currenttol2d; - Handle(TColStd_HArray1OfReal) saveParameters = myParameters; - AppParCurves_MultiCurve saveMultiCurve = TheMultiCurve; - - if(SavePar != Approx_IsoParametric) - Par = SavePar; - else - Par = Approx_ChordLength; - - Parameters(Line, myfirstpt, mylastpt, Param); - isOtherLine2Made = Standard_False; - indbad = 0; - Ok = Compute(Line, myfirstpt, mylastpt, Param, thetol3d, thetol2d, indbad); - if (indbad != 0) - { - isOtherLine2Made = LineTool::MakeMLOneMorePoint (Line, myfirstpt, mylastpt, indbad, anOtherLine2); - } - if (isOtherLine2Made) - { - myIsClear = Standard_True; - //++myMultiLineNb; - Perform (anOtherLine2); - Ok = Standard_True; - } - - if (!Ok && tt3d <= currenttol3d && tt2d <= currenttol2d) { - currenttol3d = tt3d; currenttol2d = tt2d; - myParameters = saveParameters; - TheMultiCurve = saveMultiCurve; - } - } - Par = SavePar; - if (myfirstpt == Thelastpt) - { - Finish = Standard_True; - alldone = Standard_True; - return; - } - - oldlastpt = mylastpt; - if (!Ok) { - tolreached = Standard_False; - if (TheMultiCurve.NbCurves() == 0) { - myMultiCurves.Clear(); - return; - } -#ifdef OCCT_DEBUG - if (mydebug) DUMP(TheMultiCurve); -#endif - MultiLine anOtherLine3; - Standard_Boolean isOtherLine3Made = Standard_False; - Standard_Integer indbad2 = 0; - if (!CheckMultiCurve(TheMultiCurve, Line, - myfirstpt, mylastpt, - indbad2)) - { - isOtherLine3Made = LineTool::MakeMLOneMorePoint (Line, myfirstpt, mylastpt, indbad2, anOtherLine3); - } - if (isOtherLine3Made) - { - myIsClear = Standard_True; - //++myMultiLineNb; - Perform(anOtherLine3); - myfirstpt = mylastpt; - mylastpt = Thelastpt; - } - else - { - myMultiCurves.Append(TheMultiCurve); - Tolers3d.Append(currenttol3d); - Tolers2d.Append(currenttol2d); - Standard_Integer mylen = oldlastpt-myfirstpt+1; - Standard_Integer myParLen = myParameters->Length(); - Standard_Integer aLen = (myParLen > mylen)? myParLen : mylen; - Handle(TColStd_HArray1OfReal) ThePar = - new TColStd_HArray1OfReal(myfirstpt, myfirstpt+aLen-1); - for (i = 0; i < aLen; i++) - ThePar->SetValue(myfirstpt+i, myParameters->Value(myParameters->Lower()+i)); - myPar.Append(ThePar); - } - } - myfirstpt = oldlastpt; - mylastpt = Thelastpt; - - } - else - { - myIsClear = Standard_True; - ++myMultiLineNb; - Perform(anOtherLine1); - myfirstpt = mylastpt; - mylastpt = Thelastpt; - } - } - - if (MyStatus == Approx_NoPointsAdded && !begin) { - // On rend la meilleure approximation obtenue precedemment. - // ======================================================== - GoUp = Standard_True; - tolreached = Standard_False; - if (TheMultiCurve.NbCurves() == 0) { - myMultiCurves.Clear(); - return; - } -#ifdef OCCT_DEBUG - if (mydebug) DUMP(TheMultiCurve); -#endif - myMultiCurves.Append(TheMultiCurve); - Tolers3d.Append(currenttol3d); - Tolers2d.Append(currenttol2d); - Standard_Integer mylen = oldlastpt-myfirstpt+1; - Standard_Integer myParLen = myParameters->Length(); - Standard_Integer aLen = (myParLen > mylen)? myParLen : mylen; - Handle(TColStd_HArray1OfReal) ThePar = - new TColStd_HArray1OfReal(myfirstpt, myfirstpt+aLen-1); - for (i = 0; i < aLen; i++) - ThePar->SetValue(myfirstpt+i, myParameters->Value(myParameters->Lower()+i)); - myPar.Append(ThePar); - - myfirstpt = oldlastpt; - mylastpt = Thelastpt; - } - - else if (MyStatus == Approx_NoApproximation) { - // On ne fait pas d approximation entre myfirstpt et mylastpt. - // =========================================================== - // On stocke pour pouvoir en informer l utilisateur. - GoUp = Standard_True; - myfirstpt = mylastpt; - mylastpt = Thelastpt; - } - } - - if (myfirstpt == Thelastpt) { - Finish = Standard_True; - alldone = Standard_True; - return; - } - if (!GoUp) { - if (myfirstpt == mylastpt) break; // Pour etre sur de ne pas - // planter la station !! - myCouple1.SetIndex(myfirstpt); - myCouple2.SetIndex(mylastpt); - myConstraints->SetValue(1, myCouple1); - myConstraints->SetValue(2, myCouple2); - - // Calcul des parametres sur ce nouvel intervalle. - // On recupere les parametres initiaux lors du decoupage. - - math_Vector Param(myfirstpt, mylastpt); - if (begin) { - if(myfirstParam.IsNull()) { - Parameters(Line, myfirstpt, mylastpt, Param); - } - else { - for (i = myfirstParam->Lower(); i <= myfirstParam->Upper(); i++) { - Param(i) = myfirstParam->Value(i); - } - myfirstParam.Nullify(); - } - TheParam = Param; - begin = Standard_False; - } - else { - Standard_Real pfirst = TheParam.Value(myfirstpt); - Standard_Real plast = TheParam.Value(mylastpt); - for (i = myfirstpt; i <= mylastpt; i++) { - Param(i) = (TheParam.Value(i)-pfirst)/(plast-pfirst); - } - } - - TheMultiCurve = AppParCurves_MultiCurve(); - Standard_Integer indbad = 0; - Ok = Compute(Line, myfirstpt, mylastpt, Param, thetol3d, thetol2d, indbad); - if (myfirstpt == Thelastpt) - { - Finish = Standard_True; - alldone = Standard_True; - return; - } - } - } - } -} - - - -const TColStd_Array1OfReal& Approx_ComputeLine::Parameters(const Standard_Integer Index) const -{ - return (myPar.Value(Index))->Array1(); -} - - -Standard_Integer Approx_ComputeLine::NbMultiCurves()const -{ - return myMultiCurves.Length(); -} - -AppParCurves_MultiCurve& Approx_ComputeLine::ChangeValue(const Standard_Integer Index) -{ - return myMultiCurves.ChangeValue(Index); -} - - -const AppParCurves_MultiCurve& Approx_ComputeLine::Value(const Standard_Integer Index) -const -{ - return myMultiCurves.Value(Index); -} - - -const AppParCurves_MultiBSpCurve& Approx_ComputeLine::SplineValue() -{ - Approx_MCurvesToBSpCurve Trans; - Trans.Perform(myMultiCurves); - myspline = Trans.Value(); - return myspline; -} - - - - - -void Approx_ComputeLine::Parameters(const MultiLine& Line, - const Standard_Integer firstP, - const Standard_Integer lastP, - math_Vector& TheParameters) const -{ - Standard_Integer i, j, nbP2d, nbP3d; - Standard_Real dist; - - if(Par == Approx_ChordLength || Par == Approx_Centripetal) - { - nbP3d = LineTool::NbP3d(Line); - nbP2d = LineTool::NbP2d(Line); - Standard_Integer mynbP3d = nbP3d, mynbP2d = nbP2d; - if(nbP3d == 0) mynbP3d = 1; - if(nbP2d == 0) mynbP2d = 1; - - TheParameters(firstP) = 0.0; - dist = 0.0; - TColgp_Array1OfPnt tabP(1, mynbP3d); - TColgp_Array1OfPnt tabPP(1, mynbP3d); - TColgp_Array1OfPnt2d tabP2d(1, mynbP2d); - TColgp_Array1OfPnt2d tabPP2d(1, mynbP2d); - - for(i = firstP + 1; i <= lastP; i++) - { - if(nbP3d != 0 && nbP2d != 0) LineTool::Value(Line, i - 1, tabP, tabP2d); - else if(nbP2d != 0) LineTool::Value(Line, i - 1, tabP2d); - else if(nbP3d != 0) LineTool::Value(Line, i - 1, tabP); - - if(nbP3d != 0 && nbP2d != 0) LineTool::Value(Line, i, tabPP, tabPP2d); - else if(nbP2d != 0) LineTool::Value(Line, i, tabPP2d); - else if(nbP3d != 0) LineTool::Value(Line, i, tabPP); - dist = 0; - for(j = 1; j <= nbP3d; j++) - { - const gp_Pnt &aP1 = tabP(j), - &aP2 = tabPP(j); - dist += aP2.SquareDistance(aP1); - } - for(j = 1; j <= nbP2d; j++) - { - const gp_Pnt2d &aP12d = tabP2d(j), - &aP22d = tabPP2d(j); - - dist += aP22d.SquareDistance(aP12d); - } - - dist = Sqrt(dist); - if(Par == Approx_ChordLength) - { - TheParameters(i) = TheParameters(i - 1) + dist; - } - else - {// Par == Approx_Centripetal - TheParameters(i) = TheParameters(i - 1) + Sqrt(dist); - } - } - for(i = firstP; i <= lastP; i++) TheParameters(i) /= TheParameters(lastP); - } - else { - for (i = firstP; i <= lastP; i++) { - TheParameters(i) = (Standard_Real(i)-firstP)/ - (Standard_Real(lastP)-Standard_Real(firstP)); - } - } -} - - -Standard_Boolean Approx_ComputeLine::Compute(const MultiLine& Line, - const Standard_Integer fpt, - const Standard_Integer lpt, - math_Vector& Para, - Standard_Real& TheTol3d, - Standard_Real& TheTol2d, - Standard_Integer& indbad) -{ - indbad = 0; - Standard_Integer deg, i; - Standard_Boolean mydone; - Standard_Real Fv; - Standard_Integer nbp = lpt-fpt+1; - - math_Vector ParSav(Para.Lower(), Para.Upper()); - for (i = Para.Lower(); i <= Para.Upper(); i++) { - ParSav(i) = Para(i); - } - Standard_Integer Mdegmax = mydegremax; - if(nbp < Mdegmax+5 && mycut) { - Mdegmax = nbp - 5; - } - if(Mdegmax < mydegremin) { - Mdegmax = mydegremin; - } - - currenttol3d = currenttol2d = RealLast(); - for (deg = Min(nbp-1,mydegremin); deg <= Mdegmax; deg++) { - AppParCurves_MultiCurve mySCU(deg+1); - if (mysquares) { - Approx_ParLeastSquareOfMyGradient SQ(Line, fpt, lpt, - myfirstC, mylastC, Para, deg+1); - mydone = SQ.IsDone(); - mySCU = SQ.BezierValue(); - SQ.Error(Fv, TheTol3d, TheTol2d); - } - else { - Approx_MyGradient GRAD(Line, fpt, lpt, myConstraints, - Para, deg, mytol3d, mytol2d, myitermax); - mydone = GRAD.IsDone(); - mySCU = GRAD.Value(); - if (mySCU.NbCurves() == 0) - continue; - TheTol3d = GRAD.MaxError3d(); - TheTol2d = GRAD.MaxError2d(); - } - Standard_Real uu1 = Para(Para.Lower()), uu2; - Standard_Boolean restau = Standard_False; - for ( i = Para.Lower()+1; i <= Para.Upper(); i++) { - uu2 = Para(i); - if (uu2 <= uu1) { - restau = Standard_True; -// cout << "restau = Standard_True" << endl; - break; - } - uu1 = uu2; - } - if (restau) { - for (i = Para.Lower(); i <= Para.Upper(); i++) { - Para(i) = ParSav(i); - } - } - if (mydone) { - if (TheTol3d <= mytol3d && TheTol2d <= mytol2d) { - // Stockage de la multicurve approximee. - tolreached = Standard_True; -#ifdef OCCT_DEBUG - if (mydebug) DUMP(mySCU); -#endif - if (!CheckMultiCurve(mySCU, Line, - fpt, lpt, - indbad)) - { - return Standard_False; - } - else - { - myMultiCurves.Append(mySCU); - // Stockage des parametres de la partie de MultiLine approximee: - // A ameliorer !! (bq trop de recopies) - Handle(TColStd_HArray1OfReal) ThePar = - new TColStd_HArray1OfReal(Para.Lower(), Para.Upper()); - for (i = Para.Lower(); i <= Para.Upper(); i++) { - ThePar->SetValue(i, Para(i)); - } - myPar.Append(ThePar); - Tolers3d.Append(TheTol3d); - Tolers2d.Append(TheTol2d); - return Standard_True; - } - } - } - - if (TheTol3d <= currenttol3d && TheTol2d <= currenttol2d) { - TheMultiCurve = mySCU; - currenttol3d = TheTol3d; - currenttol2d = TheTol2d; - myParameters = new TColStd_HArray1OfReal(Para.Lower(), Para.Upper()); - for (i = Para.Lower(); i <= Para.Upper(); i++) { - myParameters->SetValue(i, Para(i)); - } - } - - } - - return Standard_False; -} - - - - -Standard_Boolean Approx_ComputeLine::ComputeCurve(const MultiLine& Line, - const Standard_Integer firstpt, - const Standard_Integer lastpt) -{ - Standard_Integer i, j, nbP3d, nbP2d, deg; - gp_Vec V13d, V23d; - gp_Vec2d V12d, V22d; - gp_Pnt P1, P2; - gp_Pnt2d P12d, P22d; - Standard_Boolean Tangent1, Tangent2, mydone= Standard_False; -#ifdef OCCT_DEBUG - Standard_Boolean Parallel; -#endif - Standard_Integer myfirstpt = firstpt, mylastpt = lastpt; - Standard_Integer nbp = lastpt-firstpt+1; - math_Vector Para(firstpt, lastpt); - - Parameters(Line, firstpt, lastpt, Para); - - nbP3d = LineTool::NbP3d(Line); - nbP2d = LineTool::NbP2d(Line); - Standard_Integer mynbP3d = nbP3d, mynbP2d = nbP2d; - if (nbP3d == 0) mynbP3d = 1 ; - if (nbP2d == 0) mynbP2d = 1 ; - - - TColgp_Array1OfVec tabV1(1, mynbP3d), tabV2(1, mynbP3d); - TColgp_Array1OfPnt tabP1(1, mynbP3d), tabP2(1, mynbP3d), tabP(1, mynbP3d); - TColgp_Array1OfVec2d tabV12d(1, mynbP2d), tabV22d(1, mynbP2d); - TColgp_Array1OfPnt2d tabP12d(1, mynbP2d), tabP22d(1, mynbP2d), tabP2d(1, mynbP2d); - - if (nbP3d != 0 && nbP2d != 0) { - LineTool::Value(Line, myfirstpt,tabP1,tabP12d); - LineTool::Value(Line, mylastpt,tabP2,tabP22d); - Tangent1 = LineTool::Tangency(Line, myfirstpt,tabV1,tabV12d); - Tangent2 = LineTool::Tangency(Line, mylastpt,tabV2,tabV22d); - } - else if (nbP2d != 0) { - LineTool::Value(Line, myfirstpt,tabP12d); - LineTool::Value(Line, mylastpt,tabP22d); - Tangent1 = LineTool::Tangency(Line, myfirstpt, tabV12d); - Tangent2 = LineTool::Tangency(Line, mylastpt, tabV22d); - } - else { - LineTool::Value(Line, myfirstpt,tabP1); - LineTool::Value(Line, mylastpt,tabP2); - Tangent1 = LineTool::Tangency(Line, myfirstpt, tabV1); - Tangent2 = LineTool::Tangency(Line, mylastpt, tabV2); - } - if (nbp == 2) { - // S il n y a que 2 points, on verifie quand meme que les tangentes sont - // alignees. -#ifdef OCCT_DEBUG - Parallel = Standard_True; -#endif - if (Tangent1) { - for (i = 1; i <= nbP3d; i++) { - gp_Vec PVec(tabP1(i), tabP2(i)); - V13d = tabV1(i); - if (!PVec.IsParallel(V13d, Precision::Angular())) { -#ifdef OCCT_DEBUG - Parallel = Standard_False; -#endif - break; - } - } - for (i = 1; i <= nbP2d; i++) { - gp_Vec2d PVec2d(tabP12d(i), tabP22d(i)); - V12d = tabV12d(i); - if (!PVec2d.IsParallel(V12d, Precision::Angular())) { -#ifdef OCCT_DEBUG - Parallel = Standard_False; -#endif - break; - } - } - } - - if (Tangent2) { - for (i = 1; i <= nbP3d; i++) { - gp_Vec PVec(tabP1(i), tabP2(i)); - V23d = tabV2(i); - if (!PVec.IsParallel(V23d, Precision::Angular())) { -#ifdef OCCT_DEBUG - Parallel = Standard_False; -#endif - break; - } - } - for (i = 1; i <= nbP2d; i++) { - gp_Vec2d PVec2d(tabP12d(i), tabP22d(i)); - V22d = tabV22d(i); - if (!PVec2d.IsParallel(V22d, Precision::Angular())) { -#ifdef OCCT_DEBUG - Parallel = Standard_False; -#endif - break; - } - } - } - -#ifdef OCCT_DEBUG - if (!Parallel) { - if (mydebug) std::cout <<"droite mais tangentes pas vraiment paralleles!!"<< std::endl; - } -#endif - AppParCurves_MultiCurve mySCU(mydegremin+1); - if (nbP3d != 0 && nbP2d != 0) { - AppParCurves_MultiPoint MPole1(tabP1, tabP12d); - AppParCurves_MultiPoint MPole2(tabP2, tabP22d); - mySCU.SetValue(1, MPole1); - mySCU.SetValue(mydegremin+1, MPole2); - for (i = 2; i <= mydegremin; i++) { - for (j = 1; j<= nbP3d; j++) { - P1 = tabP1(j); - P2 = tabP2(j); - tabP(j).SetXYZ(P1.XYZ()+(i-1)*(P2.XYZ()-P1.XYZ())/mydegremin); - } - for (j = 1; j<= nbP2d; j++) { - P12d = tabP12d(j); - P22d = tabP22d(j); - tabP2d(j).SetXY(P12d.XY()+(i-1)*(P22d.XY()-P12d.XY())/mydegremin); - } - AppParCurves_MultiPoint MPole(tabP, tabP2d); - mySCU.SetValue(i, MPole); - } - - } - else if (nbP3d != 0) { - AppParCurves_MultiPoint MPole1(tabP1); - AppParCurves_MultiPoint MPole2(tabP2); - mySCU.SetValue(1, MPole1); - mySCU.SetValue(mydegremin+1, MPole2); - for (i = 2; i <= mydegremin; i++) { - for (j = 1; j<= nbP3d; j++) { - P1 = tabP1(j); - P2 = tabP2(j); - tabP(j).SetXYZ(P1.XYZ()+(i-1)*(P2.XYZ()-P1.XYZ())/mydegremin); - } - AppParCurves_MultiPoint MPole(tabP); - mySCU.SetValue(i, MPole); - } - } - else if (nbP2d != 0) { - AppParCurves_MultiPoint MPole1(tabP12d); - AppParCurves_MultiPoint MPole2(tabP22d); - mySCU.SetValue(1, MPole1); - mySCU.SetValue(mydegremin+1, MPole2); - for (i = 2; i <= mydegremin; i++) { - for (j = 1; j<= nbP2d; j++) { - P12d = tabP12d(j); - P22d = tabP22d(j); - tabP2d(j).SetXY(P12d.XY()+(i-1)*(P22d.XY()-P12d.XY())/mydegremin); - } - AppParCurves_MultiPoint MPole(tabP2d); - mySCU.SetValue(i, MPole); - } - } - mydone = Standard_True; - // Stockage de la multicurve approximee. - tolreached = Standard_True; -#ifdef OCCT_DEBUG - if (mydebug) DUMP(mySCU); -#endif - myMultiCurves.Append(mySCU); - Handle(TColStd_HArray1OfReal) ThePar = new TColStd_HArray1OfReal(Para.Lower(), Para.Upper()); - for (i = Para.Lower(); i <= Para.Upper(); i++) { - ThePar->SetValue(i, Para(i)); - } - myPar.Append(ThePar); - Tolers3d.Append(Precision::Confusion()); - Tolers2d.Append(Precision::PConfusion()); - return mydone; - } - - // avec les tangentes. - deg = nbp+1; - AppParCurves_MultiCurve mySCU(deg+1); - AppParCurves_Constraint Cons = AppParCurves_TangencyPoint; - Standard_Real lambda1, lambda2; - math_Vector V1(1, nbP3d*3+nbP2d*2); - math_Vector V2(1, nbP3d*3+nbP2d*2); - FirstTangencyVector(Line, myfirstpt, V1); - lambda1 = SearchFirstLambda(Line, Para, V1, myfirstpt); - - LastTangencyVector(Line, mylastpt, V2); - lambda2 = SearchLastLambda(Line, Para, V2, mylastpt); - - Approx_ParLeastSquareOfMyGradient - LSQ(Line, myfirstpt, mylastpt, - Cons, Cons, Para, deg+1); - - lambda1 = lambda1/deg; - lambda2 = lambda2/deg; - LSQ.Perform(Para, V1, V2, lambda1, lambda2); - mydone = LSQ.IsDone(); - mySCU = LSQ.BezierValue(); - - if (mydone) { - Standard_Real Fv, TheTol3d, TheTol2d; - LSQ.Error(Fv, TheTol3d, TheTol2d); - - // Stockage de la multicurve approximee. - tolreached = Standard_True; -#ifdef OCCT_DEBUG - if (mydebug) DUMP(mySCU); -#endif - myMultiCurves.Append(mySCU); - Handle(TColStd_HArray1OfReal) ThePar = - new TColStd_HArray1OfReal(Para.Lower(), Para.Upper()); - for (i = Para.Lower(); i <= Para.Upper(); i++) { - ThePar->SetValue(i, Para(i)); - } - myPar.Append(ThePar); - Tolers3d.Append(TheTol3d); - Tolers2d.Append(TheTol2d); - return Standard_True; - } - return mydone; -} - - - -void Approx_ComputeLine::Init(const Standard_Integer degreemin, - const Standard_Integer degreemax, - const Standard_Real Tolerance3d, - const Standard_Real Tolerance2d, - const Standard_Integer NbIterations, - const Standard_Boolean cutting, - const Approx_ParametrizationType parametrization, - const Standard_Boolean Squares) -{ - mydegremin = degreemin; - mydegremax = degreemax; - mytol3d = Tolerance3d; - mytol2d = Tolerance2d; - Par = parametrization; - mysquares = Squares; - mycut = cutting; - myitermax = NbIterations; -} - - - -void Approx_ComputeLine::SetDegrees(const Standard_Integer degreemin, - const Standard_Integer degreemax) -{ - mydegremin = degreemin; - mydegremax = degreemax; -} - - -void Approx_ComputeLine::SetTolerances(const Standard_Real Tolerance3d, - const Standard_Real Tolerance2d) -{ - mytol3d = Tolerance3d; - mytol2d = Tolerance2d; -} - - -void Approx_ComputeLine::SetConstraints(const AppParCurves_Constraint FirstC, - const AppParCurves_Constraint LastC) -{ - myfirstC = FirstC; - mylastC = LastC; -} - - - -Standard_Boolean Approx_ComputeLine::IsAllApproximated() -const { - return alldone; -} - -Standard_Boolean Approx_ComputeLine::IsToleranceReached() -const { - return tolreached; -} - -void Approx_ComputeLine::Error(const Standard_Integer Index, - Standard_Real& tol3d, - Standard_Real& tol2d) const -{ - tol3d = Tolers3d.Value(Index); - tol2d = Tolers2d.Value(Index); -} - -Approx_ParametrizationType Approx_ComputeLine::Parametrization() const -{ - return Par; -} diff --git a/opencascade/Approx_Curve2d.hxx b/opencascade/Approx_Curve2d.hxx index 9fcf2f6e5..7fcef70ae 100644 --- a/opencascade/Approx_Curve2d.hxx +++ b/opencascade/Approx_Curve2d.hxx @@ -18,37 +18,40 @@ #define _Approx_Curve2d_HeaderFile #include -#include #include +#include //! Makes an approximation for HCurve2d from Adaptor3d -class Approx_Curve2d +class Approx_Curve2d { public: - DEFINE_STANDARD_ALLOC - - Standard_EXPORT Approx_Curve2d(const Handle(Adaptor2d_Curve2d)& C2D, const Standard_Real First, const Standard_Real Last, const Standard_Real TolU, const Standard_Real TolV, const GeomAbs_Shape Continuity, const Standard_Integer MaxDegree, const Standard_Integer MaxSegments); - + Standard_EXPORT Approx_Curve2d(const Handle(Adaptor2d_Curve2d)& C2D, + const Standard_Real First, + const Standard_Real Last, + const Standard_Real TolU, + const Standard_Real TolV, + const GeomAbs_Shape Continuity, + const Standard_Integer MaxDegree, + const Standard_Integer MaxSegments); + Standard_EXPORT Standard_Boolean IsDone() const; - + Standard_EXPORT Standard_Boolean HasResult() const; - + Standard_EXPORT Handle(Geom2d_BSplineCurve) Curve() const; - + Standard_EXPORT Standard_Real MaxError2dU() const; - + Standard_EXPORT Standard_Real MaxError2dV() const; private: - Handle(Geom2d_BSplineCurve) myCurve; - Standard_Boolean myIsDone; - Standard_Boolean myHasResult; - Standard_Real myMaxError2dU; - Standard_Real myMaxError2dV; - + Standard_Boolean myIsDone; + Standard_Boolean myHasResult; + Standard_Real myMaxError2dU; + Standard_Real myMaxError2dV; }; #endif // _Approx_Curve2d_HeaderFile diff --git a/opencascade/Approx_Curve3d.hxx b/opencascade/Approx_Curve3d.hxx index 97ab07a95..453f379b7 100644 --- a/opencascade/Approx_Curve3d.hxx +++ b/opencascade/Approx_Curve3d.hxx @@ -21,42 +21,42 @@ #include #include -class Approx_Curve3d +class Approx_Curve3d { public: - DEFINE_STANDARD_ALLOC - //! Approximation of a curve with respect of the //! required tolerance Tol3D. - Standard_EXPORT Approx_Curve3d(const Handle(Adaptor3d_Curve)& Curve, const Standard_Real Tol3d, const GeomAbs_Shape Order, const Standard_Integer MaxSegments, const Standard_Integer MaxDegree); - + Standard_EXPORT Approx_Curve3d(const Handle(Adaptor3d_Curve)& Curve, + const Standard_Real Tol3d, + const GeomAbs_Shape Order, + const Standard_Integer MaxSegments, + const Standard_Integer MaxDegree); + Standard_EXPORT Handle(Geom_BSplineCurve) Curve() const; - + //! returns Standard_True if the approximation has //! been done within required tolerance Standard_EXPORT Standard_Boolean IsDone() const; - + //! returns Standard_True if the approximation did come out //! with a result that is not NECESSARELY within the required //! tolerance Standard_EXPORT Standard_Boolean HasResult() const; - + //! returns the Maximum Error (>0 when an approximation //! has been done, 0 if no approximation) Standard_EXPORT Standard_Real MaxError() const; - + //! Print on the stream o information about the object - Standard_EXPORT void Dump (Standard_OStream& o) const; + Standard_EXPORT void Dump(Standard_OStream& o) const; private: - - Standard_Boolean myIsDone; - Standard_Boolean myHasResult; + Standard_Boolean myIsDone; + Standard_Boolean myHasResult; Handle(Geom_BSplineCurve) myBSplCurve; - Standard_Real myMaxError; - + Standard_Real myMaxError; }; #endif // _Approx_Curve3d_HeaderFile diff --git a/opencascade/Approx_CurveOnSurface.hxx b/opencascade/Approx_CurveOnSurface.hxx index c3541e357..5bcea0ada 100644 --- a/opencascade/Approx_CurveOnSurface.hxx +++ b/opencascade/Approx_CurveOnSurface.hxx @@ -25,15 +25,24 @@ class Geom_BSplineCurve; class Geom2d_BSplineCurve; //! Approximation of curve on surface -class Approx_CurveOnSurface +class Approx_CurveOnSurface { public: - DEFINE_STANDARD_ALLOC //! This constructor calls perform method. This constructor is deprecated. - Standard_DEPRECATED("This constructor is deprecated. Use other constructor and perform method instead.") - Standard_EXPORT Approx_CurveOnSurface(const Handle(Adaptor2d_Curve2d)& C2D, const Handle(Adaptor3d_Surface)& Surf, const Standard_Real First, const Standard_Real Last, const Standard_Real Tol, const GeomAbs_Shape Continuity, const Standard_Integer MaxDegree, const Standard_Integer MaxSegments, const Standard_Boolean Only3d = Standard_False, const Standard_Boolean Only2d = Standard_False); + Standard_DEPRECATED( + "This constructor is deprecated. Use other constructor and perform method instead.") + Standard_EXPORT Approx_CurveOnSurface(const Handle(Adaptor2d_Curve2d)& C2D, + const Handle(Adaptor3d_Surface)& Surf, + const Standard_Real First, + const Standard_Real Last, + const Standard_Real Tol, + const GeomAbs_Shape Continuity, + const Standard_Integer MaxDegree, + const Standard_Integer MaxSegments, + const Standard_Boolean Only3d = Standard_False, + const Standard_Boolean Only2d = Standard_False); //! This constructor does not call perform method. //! @param theC2D 2D Curve to be approximated in 3D. @@ -43,22 +52,22 @@ public: //! @param theTol Computation tolerance. Standard_EXPORT Approx_CurveOnSurface(const Handle(Adaptor2d_Curve2d)& theC2D, const Handle(Adaptor3d_Surface)& theSurf, - const Standard_Real theFirst, - const Standard_Real theLast, - const Standard_Real theTol); + const Standard_Real theFirst, + const Standard_Real theLast, + const Standard_Real theTol); Standard_EXPORT Standard_Boolean IsDone() const; - + Standard_EXPORT Standard_Boolean HasResult() const; - + Standard_EXPORT Handle(Geom_BSplineCurve) Curve3d() const; - + Standard_EXPORT Standard_Real MaxError3d() const; - + Standard_EXPORT Handle(Geom2d_BSplineCurve) Curve2d() const; - + Standard_EXPORT Standard_Real MaxError2dU() const; - + //! returns the maximum errors relatively to the U component or the V component of the //! 2d Curve Standard_EXPORT Standard_Real MaxError2dV() const; @@ -70,14 +79,13 @@ public: //! @param theContinuity Resulting continuity. //! @param theOnly3d Determines building only 3D curve. //! @param theOnly2d Determines building only 2D curve. - Standard_EXPORT void Perform(const Standard_Integer theMaxSegments, - const Standard_Integer theMaxDegree, + Standard_EXPORT void Perform(const Standard_Integer theMaxSegments, + const Standard_Integer theMaxDegree, const GeomAbs_Shape theContinuity, const Standard_Boolean theOnly3d = Standard_False, const Standard_Boolean theOnly2d = Standard_False); protected: - //! Checks whether the 2d curve is a isoline. It can be represented by b-spline, bezier, //! or geometric line. This line should have natural parameterization. //! @param theC2D Trimmed curve to be checked. @@ -103,10 +111,9 @@ protected: const Standard_Boolean theIsForward); private: - Approx_CurveOnSurface& operator= (const Approx_CurveOnSurface&); + Approx_CurveOnSurface& operator=(const Approx_CurveOnSurface&); private: - //! Input curve. const Handle(Adaptor2d_Curve2d) myC2D; @@ -123,13 +130,12 @@ private: Standard_Real myTol; Handle(Geom2d_BSplineCurve) myCurve2d; - Handle(Geom_BSplineCurve) myCurve3d; - Standard_Boolean myIsDone; - Standard_Boolean myHasResult; - Standard_Real myError3d; - Standard_Real myError2dU; - Standard_Real myError2dV; - + Handle(Geom_BSplineCurve) myCurve3d; + Standard_Boolean myIsDone; + Standard_Boolean myHasResult; + Standard_Real myError3d; + Standard_Real myError2dU; + Standard_Real myError2dV; }; #endif // _Approx_CurveOnSurface_HeaderFile diff --git a/opencascade/Approx_CurvilinearParameter.hxx b/opencascade/Approx_CurvilinearParameter.hxx index bf014252d..5405c0f0f 100644 --- a/opencascade/Approx_CurvilinearParameter.hxx +++ b/opencascade/Approx_CurvilinearParameter.hxx @@ -33,65 +33,81 @@ //! @code //! 1/2(S1(C2D1(u) + S2(C2D2(u))) //! @endcode -class Approx_CurvilinearParameter +class Approx_CurvilinearParameter { public: - DEFINE_STANDARD_ALLOC - //! case of a free 3D curve - Standard_EXPORT Approx_CurvilinearParameter(const Handle(Adaptor3d_Curve)& C3D, const Standard_Real Tol, const GeomAbs_Shape Order, const Standard_Integer MaxDegree, const Standard_Integer MaxSegments); - + Standard_EXPORT Approx_CurvilinearParameter(const Handle(Adaptor3d_Curve)& C3D, + const Standard_Real Tol, + const GeomAbs_Shape Order, + const Standard_Integer MaxDegree, + const Standard_Integer MaxSegments); + //! case of a curve on one surface - Standard_EXPORT Approx_CurvilinearParameter(const Handle(Adaptor2d_Curve2d)& C2D, const Handle(Adaptor3d_Surface)& Surf, const Standard_Real Tol, const GeomAbs_Shape Order, const Standard_Integer MaxDegree, const Standard_Integer MaxSegments); - + Standard_EXPORT Approx_CurvilinearParameter(const Handle(Adaptor2d_Curve2d)& C2D, + const Handle(Adaptor3d_Surface)& Surf, + const Standard_Real Tol, + const GeomAbs_Shape Order, + const Standard_Integer MaxDegree, + const Standard_Integer MaxSegments); + //! case of a curve on two surfaces - Standard_EXPORT Approx_CurvilinearParameter(const Handle(Adaptor2d_Curve2d)& C2D1, const Handle(Adaptor3d_Surface)& Surf1, const Handle(Adaptor2d_Curve2d)& C2D2, const Handle(Adaptor3d_Surface)& Surf2, const Standard_Real Tol, const GeomAbs_Shape Order, const Standard_Integer MaxDegree, const Standard_Integer MaxSegments); - + Standard_EXPORT Approx_CurvilinearParameter(const Handle(Adaptor2d_Curve2d)& C2D1, + const Handle(Adaptor3d_Surface)& Surf1, + const Handle(Adaptor2d_Curve2d)& C2D2, + const Handle(Adaptor3d_Surface)& Surf2, + const Standard_Real Tol, + const GeomAbs_Shape Order, + const Standard_Integer MaxDegree, + const Standard_Integer MaxSegments); + Standard_EXPORT Standard_Boolean IsDone() const; - + Standard_EXPORT Standard_Boolean HasResult() const; - + //! returns the Bspline curve corresponding to the reparametrized 3D curve Standard_EXPORT Handle(Geom_BSplineCurve) Curve3d() const; - + //! returns the maximum error on the reparametrized 3D curve Standard_EXPORT Standard_Real MaxError3d() const; - + //! returns the BsplineCurve representing the reparametrized 2D curve on the //! first surface (case of a curve on one or two surfaces) Standard_EXPORT Handle(Geom2d_BSplineCurve) Curve2d1() const; - + //! returns the maximum error on the first reparametrized 2D curve Standard_EXPORT Standard_Real MaxError2d1() const; - + //! returns the BsplineCurve representing the reparametrized 2D curve on the //! second surface (case of a curve on two surfaces) Standard_EXPORT Handle(Geom2d_BSplineCurve) Curve2d2() const; - + //! returns the maximum error on the second reparametrized 2D curve Standard_EXPORT Standard_Real MaxError2d2() const; - + //! print the maximum errors(s) - Standard_EXPORT void Dump (Standard_OStream& o) const; + Standard_EXPORT void Dump(Standard_OStream& o) const; private: - - Standard_EXPORT static void ToleranceComputation (const Handle(Adaptor2d_Curve2d)& C2D, const Handle(Adaptor3d_Surface)& S, const Standard_Integer MaxNumber, const Standard_Real Tol, Standard_Real& TolV, Standard_Real& TolW); + Standard_EXPORT static void ToleranceComputation(const Handle(Adaptor2d_Curve2d)& C2D, + const Handle(Adaptor3d_Surface)& S, + const Standard_Integer MaxNumber, + const Standard_Real Tol, + Standard_Real& TolV, + Standard_Real& TolW); private: - - Standard_Integer myCase; - Standard_Boolean myDone; - Standard_Boolean myHasResult; - Handle(Geom_BSplineCurve) myCurve3d; - Standard_Real myMaxError3d; + Standard_Integer myCase; + Standard_Boolean myDone; + Standard_Boolean myHasResult; + Handle(Geom_BSplineCurve) myCurve3d; + Standard_Real myMaxError3d; Handle(Geom2d_BSplineCurve) myCurve2d1; - Standard_Real myMaxError2d1; + Standard_Real myMaxError2d1; Handle(Geom2d_BSplineCurve) myCurve2d2; - Standard_Real myMaxError2d2; - + Standard_Real myMaxError2d2; }; #endif // _Approx_CurvilinearParameter_HeaderFile diff --git a/opencascade/Approx_CurvlinFunc.hxx b/opencascade/Approx_CurvlinFunc.hxx index c97e46146..fb236ce33 100644 --- a/opencascade/Approx_CurvlinFunc.hxx +++ b/opencascade/Approx_CurvlinFunc.hxx @@ -31,112 +31,118 @@ class Approx_CurvlinFunc : public Standard_Transient { public: - - Standard_EXPORT Approx_CurvlinFunc(const Handle(Adaptor3d_Curve)& C, const Standard_Real Tol); - - Standard_EXPORT Approx_CurvlinFunc(const Handle(Adaptor2d_Curve2d)& C2D, const Handle(Adaptor3d_Surface)& S, const Standard_Real Tol); - - Standard_EXPORT Approx_CurvlinFunc(const Handle(Adaptor2d_Curve2d)& C2D1, const Handle(Adaptor2d_Curve2d)& C2D2, const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_Surface)& S2, const Standard_Real Tol); - + + Standard_EXPORT Approx_CurvlinFunc(const Handle(Adaptor2d_Curve2d)& C2D, + const Handle(Adaptor3d_Surface)& S, + const Standard_Real Tol); + + Standard_EXPORT Approx_CurvlinFunc(const Handle(Adaptor2d_Curve2d)& C2D1, + const Handle(Adaptor2d_Curve2d)& C2D2, + const Handle(Adaptor3d_Surface)& S1, + const Handle(Adaptor3d_Surface)& S2, + const Standard_Real Tol); + //! ---Purpose Update the tolerance to used - Standard_EXPORT void SetTol (const Standard_Real Tol); - + Standard_EXPORT void SetTol(const Standard_Real Tol); + Standard_EXPORT Standard_Real FirstParameter() const; - + Standard_EXPORT Standard_Real LastParameter() const; - + //! Returns the number of intervals for continuity //! . May be one if Continuity(me) >= - Standard_EXPORT Standard_Integer NbIntervals (const GeomAbs_Shape S) const; - + Standard_EXPORT Standard_Integer NbIntervals(const GeomAbs_Shape S) const; + //! Stores in the parameters bounding the intervals //! of continuity . //! //! The array must provide enough room to accommodate //! for the parameters. i.e. T.Length() > NbIntervals() - Standard_EXPORT void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const; - + Standard_EXPORT void Intervals(TColStd_Array1OfReal& T, const GeomAbs_Shape S) const; + //! if First < 0 or Last > 1 - Standard_EXPORT void Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol); - + Standard_EXPORT void Trim(const Standard_Real First, + const Standard_Real Last, + const Standard_Real Tol); + //! Computes length of the curve. Standard_EXPORT void Length(); - + //! Computes length of the curve segment. - Standard_EXPORT Standard_Real Length (Adaptor3d_Curve& C, const Standard_Real FirstU, const Standard_Real LasrU) const; - + Standard_EXPORT Standard_Real Length(Adaptor3d_Curve& C, + const Standard_Real FirstU, + const Standard_Real LasrU) const; + Standard_EXPORT Standard_Real GetLength() const; - + //! returns original parameter corresponding S. if //! Case == 1 computation is performed on myC2D1 and mySurf1, //! otherwise it is done on myC2D2 and mySurf2. - Standard_EXPORT Standard_Real GetUParameter (Adaptor3d_Curve& C, const Standard_Real S, const Standard_Integer NumberOfCurve) const; - + Standard_EXPORT Standard_Real GetUParameter(Adaptor3d_Curve& C, + const Standard_Real S, + const Standard_Integer NumberOfCurve) const; + //! returns original parameter corresponding S. - Standard_EXPORT Standard_Real GetSParameter (const Standard_Real U) const; - - //! if myCase != 1 - Standard_EXPORT Standard_Boolean EvalCase1 (const Standard_Real S, const Standard_Integer Order, TColStd_Array1OfReal& Result) const; - - //! if myCase != 2 - Standard_EXPORT Standard_Boolean EvalCase2 (const Standard_Real S, const Standard_Integer Order, TColStd_Array1OfReal& Result) const; - - //! if myCase != 3 - Standard_EXPORT Standard_Boolean EvalCase3 (const Standard_Real S, const Standard_Integer Order, TColStd_Array1OfReal& Result); + Standard_EXPORT Standard_Real GetSParameter(const Standard_Real U) const; + //! if myCase != 1 + Standard_EXPORT Standard_Boolean EvalCase1(const Standard_Real S, + const Standard_Integer Order, + TColStd_Array1OfReal& Result) const; + //! if myCase != 2 + Standard_EXPORT Standard_Boolean EvalCase2(const Standard_Real S, + const Standard_Integer Order, + TColStd_Array1OfReal& Result) const; + //! if myCase != 3 + Standard_EXPORT Standard_Boolean EvalCase3(const Standard_Real S, + const Standard_Integer Order, + TColStd_Array1OfReal& Result); - DEFINE_STANDARD_RTTIEXT(Approx_CurvlinFunc,Standard_Transient) + DEFINE_STANDARD_RTTIEXT(Approx_CurvlinFunc, Standard_Transient) protected: - - - - private: - - Standard_EXPORT void Init(); - - Standard_EXPORT void Init (Adaptor3d_Curve& C, Handle(TColStd_HArray1OfReal)& Si, Handle(TColStd_HArray1OfReal)& Ui) const; - + + Standard_EXPORT void Init(Adaptor3d_Curve& C, + Handle(TColStd_HArray1OfReal)& Si, + Handle(TColStd_HArray1OfReal)& Ui) const; + //! returns curvilinear parameter corresponding U. - Standard_EXPORT Standard_Real GetSParameter (Adaptor3d_Curve& C, const Standard_Real U, const Standard_Real Length) const; - - Standard_EXPORT Standard_Boolean EvalCurOnSur (const Standard_Real S, const Standard_Integer Order, TColStd_Array1OfReal& Result, const Standard_Integer NumberOfCurve) const; - - Handle(Adaptor3d_Curve) myC3D; - Handle(Adaptor2d_Curve2d) myC2D1; - Handle(Adaptor2d_Curve2d) myC2D2; - Handle(Adaptor3d_Surface) mySurf1; - Handle(Adaptor3d_Surface) mySurf2; - Standard_Integer myCase; - Standard_Real myFirstS; - Standard_Real myLastS; - Standard_Real myFirstU1; - Standard_Real myLastU1; - Standard_Real myFirstU2; - Standard_Real myLastU2; - Standard_Real myLength; - Standard_Real myLength1; - Standard_Real myLength2; - Standard_Real myTolLen; - Standard_Real myPrevS; - Standard_Real myPrevU; + Standard_EXPORT Standard_Real GetSParameter(Adaptor3d_Curve& C, + const Standard_Real U, + const Standard_Real Length) const; + + Standard_EXPORT Standard_Boolean EvalCurOnSur(const Standard_Real S, + const Standard_Integer Order, + TColStd_Array1OfReal& Result, + const Standard_Integer NumberOfCurve) const; + + Handle(Adaptor3d_Curve) myC3D; + Handle(Adaptor2d_Curve2d) myC2D1; + Handle(Adaptor2d_Curve2d) myC2D2; + Handle(Adaptor3d_Surface) mySurf1; + Handle(Adaptor3d_Surface) mySurf2; + Standard_Integer myCase; + Standard_Real myFirstS; + Standard_Real myLastS; + Standard_Real myFirstU1; + Standard_Real myLastU1; + Standard_Real myFirstU2; + Standard_Real myLastU2; + Standard_Real myLength; + Standard_Real myLength1; + Standard_Real myLength2; + Standard_Real myTolLen; + Standard_Real myPrevS; + Standard_Real myPrevU; Handle(TColStd_HArray1OfReal) myUi_1; Handle(TColStd_HArray1OfReal) mySi_1; Handle(TColStd_HArray1OfReal) myUi_2; Handle(TColStd_HArray1OfReal) mySi_2; - - }; - - - - - - #endif // _Approx_CurvlinFunc_HeaderFile diff --git a/opencascade/Approx_FitAndDivide.hxx b/opencascade/Approx_FitAndDivide.hxx index f5a4b24f8..761c53ead 100644 --- a/opencascade/Approx_FitAndDivide.hxx +++ b/opencascade/Approx_FitAndDivide.hxx @@ -20,47 +20,61 @@ #include #include -#include -#include +#include +#include #include +#include #include -#include -#include +#include class AppParCurves_MultiCurve; - - -class Approx_FitAndDivide +class Approx_FitAndDivide { public: - DEFINE_STANDARD_ALLOC - //! The MultiLine will be approximated until tolerances //! will be reached. //! The approximation will be done from degreemin to degreemax //! with a cutting if the corresponding boolean is True. - Standard_EXPORT Approx_FitAndDivide(const AppCont_Function& Line, const Standard_Integer degreemin = 3, const Standard_Integer degreemax = 8, const Standard_Real Tolerance3d = 1.0e-5, const Standard_Real Tolerance2d = 1.0e-5, const Standard_Boolean cutting = Standard_False, const AppParCurves_Constraint FirstC = AppParCurves_TangencyPoint, const AppParCurves_Constraint LastC = AppParCurves_TangencyPoint); - + Standard_EXPORT Approx_FitAndDivide( + const AppCont_Function& Line, + const Standard_Integer degreemin = 3, + const Standard_Integer degreemax = 8, + const Standard_Real Tolerance3d = 1.0e-5, + const Standard_Real Tolerance2d = 1.0e-5, + const Standard_Boolean cutting = Standard_False, + const AppParCurves_Constraint FirstC = AppParCurves_TangencyPoint, + const AppParCurves_Constraint LastC = AppParCurves_TangencyPoint); + //! Initializes the fields of the algorithm. - Standard_EXPORT Approx_FitAndDivide(const Standard_Integer degreemin = 3, const Standard_Integer degreemax = 8, const Standard_Real Tolerance3d = 1.0e-05, const Standard_Real Tolerance2d = 1.0e-05, const Standard_Boolean cutting = Standard_False, const AppParCurves_Constraint FirstC = AppParCurves_TangencyPoint, const AppParCurves_Constraint LastC = AppParCurves_TangencyPoint); - + Standard_EXPORT Approx_FitAndDivide( + const Standard_Integer degreemin = 3, + const Standard_Integer degreemax = 8, + const Standard_Real Tolerance3d = 1.0e-05, + const Standard_Real Tolerance2d = 1.0e-05, + const Standard_Boolean cutting = Standard_False, + const AppParCurves_Constraint FirstC = AppParCurves_TangencyPoint, + const AppParCurves_Constraint LastC = AppParCurves_TangencyPoint); + //! runs the algorithm after having initialized the fields. - Standard_EXPORT void Perform (const AppCont_Function& Line); - + Standard_EXPORT void Perform(const AppCont_Function& Line); + //! changes the degrees of the approximation. - Standard_EXPORT void SetDegrees (const Standard_Integer degreemin, const Standard_Integer degreemax); - + Standard_EXPORT void SetDegrees(const Standard_Integer degreemin, + const Standard_Integer degreemax); + //! Changes the tolerances of the approximation. - Standard_EXPORT void SetTolerances (const Standard_Real Tolerance3d, const Standard_Real Tolerance2d); - + Standard_EXPORT void SetTolerances(const Standard_Real Tolerance3d, + const Standard_Real Tolerance2d); + //! Changes the constraints of the approximation. - Standard_EXPORT void SetConstraints (const AppParCurves_Constraint FirstC, const AppParCurves_Constraint LastC); + Standard_EXPORT void SetConstraints(const AppParCurves_Constraint FirstC, + const AppParCurves_Constraint LastC); //! Changes the max number of segments, which is allowed for cutting. - Standard_EXPORT void SetMaxSegments (const Standard_Integer theMaxSegments); - + Standard_EXPORT void SetMaxSegments(const Standard_Integer theMaxSegments); + //! Set inverse order of degree selection: //! if theInvOrdr = true, current degree is chosen by inverse order - //! from maxdegree to mindegree. @@ -77,66 +91,55 @@ public: //! the status NoApproximation has been sent by the user //! when more points were needed. Standard_EXPORT Standard_Boolean IsAllApproximated() const; - + //! returns False if the status NoPointsAdded has been sent. Standard_EXPORT Standard_Boolean IsToleranceReached() const; - + //! returns the tolerances 2d and 3d of the MultiCurve. - Standard_EXPORT void Error (const Standard_Integer Index, Standard_Real& tol3d, Standard_Real& tol2d) const; - + Standard_EXPORT void Error(const Standard_Integer Index, + Standard_Real& tol3d, + Standard_Real& tol2d) const; + //! Returns the number of MultiCurve doing the approximation //! of the MultiLine. Standard_EXPORT Standard_Integer NbMultiCurves() const; - - //! returns the approximation MultiCurve of range . - Standard_EXPORT AppParCurves_MultiCurve Value (const Standard_Integer Index = 1) const; - - Standard_EXPORT void Parameters (const Standard_Integer Index, Standard_Real& firstp, Standard_Real& lastp) const; - + //! returns the approximation MultiCurve of range . + Standard_EXPORT AppParCurves_MultiCurve Value(const Standard_Integer Index = 1) const; + Standard_EXPORT void Parameters(const Standard_Integer Index, + Standard_Real& firstp, + Standard_Real& lastp) const; protected: - - - - - private: - - //! is internally used by the algorithms. - Standard_EXPORT Standard_Boolean Compute (const AppCont_Function& Line, const Standard_Real Ufirst, const Standard_Real Ulast, Standard_Real& TheTol3d, Standard_Real& TheTol2d); - + Standard_EXPORT Standard_Boolean Compute(const AppCont_Function& Line, + const Standard_Real Ufirst, + const Standard_Real Ulast, + Standard_Real& TheTol3d, + Standard_Real& TheTol2d); AppParCurves_SequenceOfMultiCurve myMultiCurves; - TColStd_SequenceOfReal myfirstparam; - TColStd_SequenceOfReal mylastparam; - AppParCurves_MultiCurve TheMultiCurve; - Standard_Boolean alldone; - Standard_Boolean tolreached; - TColStd_SequenceOfReal Tolers3d; - TColStd_SequenceOfReal Tolers2d; - Standard_Integer mydegremin; - Standard_Integer mydegremax; - Standard_Real mytol3d; - Standard_Real mytol2d; - Standard_Real currenttol3d; - Standard_Real currenttol2d; - Standard_Boolean mycut; - AppParCurves_Constraint myfirstC; - AppParCurves_Constraint mylastC; - Standard_Integer myMaxSegments; - Standard_Boolean myInvOrder; - Standard_Boolean myHangChecking; - - + TColStd_SequenceOfReal myfirstparam; + TColStd_SequenceOfReal mylastparam; + AppParCurves_MultiCurve TheMultiCurve; + Standard_Boolean alldone; + Standard_Boolean tolreached; + TColStd_SequenceOfReal Tolers3d; + TColStd_SequenceOfReal Tolers2d; + Standard_Integer mydegremin; + Standard_Integer mydegremax; + Standard_Real mytol3d; + Standard_Real mytol2d; + Standard_Real currenttol3d; + Standard_Real currenttol2d; + Standard_Boolean mycut; + AppParCurves_Constraint myfirstC; + AppParCurves_Constraint mylastC; + Standard_Integer myMaxSegments; + Standard_Boolean myInvOrder; + Standard_Boolean myHangChecking; }; - - - - - - #endif // _Approx_FitAndDivide_HeaderFile diff --git a/opencascade/Approx_FitAndDivide2d.hxx b/opencascade/Approx_FitAndDivide2d.hxx index e98a013e5..da98a33fb 100644 --- a/opencascade/Approx_FitAndDivide2d.hxx +++ b/opencascade/Approx_FitAndDivide2d.hxx @@ -20,47 +20,61 @@ #include #include -#include -#include +#include +#include #include +#include #include -#include -#include +#include class AppParCurves_MultiCurve; - - -class Approx_FitAndDivide2d +class Approx_FitAndDivide2d { public: - DEFINE_STANDARD_ALLOC - //! The MultiLine will be approximated until tolerances //! will be reached. //! The approximation will be done from degreemin to degreemax //! with a cutting if the corresponding boolean is True. - Standard_EXPORT Approx_FitAndDivide2d(const AppCont_Function& Line, const Standard_Integer degreemin = 3, const Standard_Integer degreemax = 8, const Standard_Real Tolerance3d = 1.0e-5, const Standard_Real Tolerance2d = 1.0e-5, const Standard_Boolean cutting = Standard_False, const AppParCurves_Constraint FirstC = AppParCurves_TangencyPoint, const AppParCurves_Constraint LastC = AppParCurves_TangencyPoint); - + Standard_EXPORT Approx_FitAndDivide2d( + const AppCont_Function& Line, + const Standard_Integer degreemin = 3, + const Standard_Integer degreemax = 8, + const Standard_Real Tolerance3d = 1.0e-5, + const Standard_Real Tolerance2d = 1.0e-5, + const Standard_Boolean cutting = Standard_False, + const AppParCurves_Constraint FirstC = AppParCurves_TangencyPoint, + const AppParCurves_Constraint LastC = AppParCurves_TangencyPoint); + //! Initializes the fields of the algorithm. - Standard_EXPORT Approx_FitAndDivide2d(const Standard_Integer degreemin = 3, const Standard_Integer degreemax = 8, const Standard_Real Tolerance3d = 1.0e-05, const Standard_Real Tolerance2d = 1.0e-05, const Standard_Boolean cutting = Standard_False, const AppParCurves_Constraint FirstC = AppParCurves_TangencyPoint, const AppParCurves_Constraint LastC = AppParCurves_TangencyPoint); - + Standard_EXPORT Approx_FitAndDivide2d( + const Standard_Integer degreemin = 3, + const Standard_Integer degreemax = 8, + const Standard_Real Tolerance3d = 1.0e-05, + const Standard_Real Tolerance2d = 1.0e-05, + const Standard_Boolean cutting = Standard_False, + const AppParCurves_Constraint FirstC = AppParCurves_TangencyPoint, + const AppParCurves_Constraint LastC = AppParCurves_TangencyPoint); + //! runs the algorithm after having initialized the fields. - Standard_EXPORT void Perform (const AppCont_Function& Line); - + Standard_EXPORT void Perform(const AppCont_Function& Line); + //! changes the degrees of the approximation. - Standard_EXPORT void SetDegrees (const Standard_Integer degreemin, const Standard_Integer degreemax); - + Standard_EXPORT void SetDegrees(const Standard_Integer degreemin, + const Standard_Integer degreemax); + //! Changes the tolerances of the approximation. - Standard_EXPORT void SetTolerances (const Standard_Real Tolerance3d, const Standard_Real Tolerance2d); - + Standard_EXPORT void SetTolerances(const Standard_Real Tolerance3d, + const Standard_Real Tolerance2d); + //! Changes the constraints of the approximation. - Standard_EXPORT void SetConstraints (const AppParCurves_Constraint FirstC, const AppParCurves_Constraint LastC); + Standard_EXPORT void SetConstraints(const AppParCurves_Constraint FirstC, + const AppParCurves_Constraint LastC); //! Changes the max number of segments, which is allowed for cutting. - Standard_EXPORT void SetMaxSegments (const Standard_Integer theMaxSegments); - + Standard_EXPORT void SetMaxSegments(const Standard_Integer theMaxSegments); + //! Set inverse order of degree selection: //! if theInvOrdr = true, current degree is chosen by inverse order - //! from maxdegree to mindegree. @@ -72,70 +86,60 @@ public: //! and algorithm is forced to stop. //! By default hang checking is used. Standard_EXPORT void SetHangChecking(const Standard_Boolean theHangChecking); - + //! returns False if at a moment of the approximation, //! the status NoApproximation has been sent by the user //! when more points were needed. Standard_EXPORT Standard_Boolean IsAllApproximated() const; - + //! returns False if the status NoPointsAdded has been sent. Standard_EXPORT Standard_Boolean IsToleranceReached() const; - + //! returns the tolerances 2d and 3d of the MultiCurve. - Standard_EXPORT void Error (const Standard_Integer Index, Standard_Real& tol3d, Standard_Real& tol2d) const; - + Standard_EXPORT void Error(const Standard_Integer Index, + Standard_Real& tol3d, + Standard_Real& tol2d) const; + //! Returns the number of MultiCurve doing the approximation //! of the MultiLine. Standard_EXPORT Standard_Integer NbMultiCurves() const; - - //! returns the approximation MultiCurve of range . - Standard_EXPORT AppParCurves_MultiCurve Value (const Standard_Integer Index = 1) const; - - Standard_EXPORT void Parameters (const Standard_Integer Index, Standard_Real& firstp, Standard_Real& lastp) const; - + //! returns the approximation MultiCurve of range . + Standard_EXPORT AppParCurves_MultiCurve Value(const Standard_Integer Index = 1) const; + Standard_EXPORT void Parameters(const Standard_Integer Index, + Standard_Real& firstp, + Standard_Real& lastp) const; protected: - - - - - private: - - //! is internally used by the algorithms. - Standard_EXPORT Standard_Boolean Compute (const AppCont_Function& Line, const Standard_Real Ufirst, const Standard_Real Ulast, Standard_Real& TheTol3d, Standard_Real& TheTol2d); - + Standard_EXPORT Standard_Boolean Compute(const AppCont_Function& Line, + const Standard_Real Ufirst, + const Standard_Real Ulast, + Standard_Real& TheTol3d, + Standard_Real& TheTol2d); AppParCurves_SequenceOfMultiCurve myMultiCurves; - TColStd_SequenceOfReal myfirstparam; - TColStd_SequenceOfReal mylastparam; - AppParCurves_MultiCurve TheMultiCurve; - Standard_Boolean alldone; - Standard_Boolean tolreached; - TColStd_SequenceOfReal Tolers3d; - TColStd_SequenceOfReal Tolers2d; - Standard_Integer mydegremin; - Standard_Integer mydegremax; - Standard_Real mytol3d; - Standard_Real mytol2d; - Standard_Real currenttol3d; - Standard_Real currenttol2d; - Standard_Boolean mycut; - AppParCurves_Constraint myfirstC; - AppParCurves_Constraint mylastC; - Standard_Integer myMaxSegments; - Standard_Boolean myInvOrder; - Standard_Boolean myHangChecking; - + TColStd_SequenceOfReal myfirstparam; + TColStd_SequenceOfReal mylastparam; + AppParCurves_MultiCurve TheMultiCurve; + Standard_Boolean alldone; + Standard_Boolean tolreached; + TColStd_SequenceOfReal Tolers3d; + TColStd_SequenceOfReal Tolers2d; + Standard_Integer mydegremin; + Standard_Integer mydegremax; + Standard_Real mytol3d; + Standard_Real mytol2d; + Standard_Real currenttol3d; + Standard_Real currenttol2d; + Standard_Boolean mycut; + AppParCurves_Constraint myfirstC; + AppParCurves_Constraint mylastC; + Standard_Integer myMaxSegments; + Standard_Boolean myInvOrder; + Standard_Boolean myHangChecking; }; - - - - - - #endif // _Approx_FitAndDivide2d_HeaderFile diff --git a/opencascade/Approx_HArray1OfAdHSurface.hxx b/opencascade/Approx_HArray1OfAdHSurface.hxx index c4f37f6c0..6f557ea62 100644 --- a/opencascade/Approx_HArray1OfAdHSurface.hxx +++ b/opencascade/Approx_HArray1OfAdHSurface.hxx @@ -23,5 +23,4 @@ DEFINE_HARRAY1(Approx_HArray1OfAdHSurface, Approx_Array1OfAdHSurface) - #endif diff --git a/opencascade/Approx_HArray1OfGTrsf2d.hxx b/opencascade/Approx_HArray1OfGTrsf2d.hxx index 1938e310c..b05815315 100644 --- a/opencascade/Approx_HArray1OfGTrsf2d.hxx +++ b/opencascade/Approx_HArray1OfGTrsf2d.hxx @@ -22,5 +22,4 @@ DEFINE_HARRAY1(Approx_HArray1OfGTrsf2d, Approx_Array1OfGTrsf2d) - #endif diff --git a/opencascade/Approx_MCurvesToBSpCurve.hxx b/opencascade/Approx_MCurvesToBSpCurve.hxx index 294e4bf60..9e6ec1989 100644 --- a/opencascade/Approx_MCurvesToBSpCurve.hxx +++ b/opencascade/Approx_MCurvesToBSpCurve.hxx @@ -24,55 +24,32 @@ #include class AppParCurves_MultiCurve; - - -class Approx_MCurvesToBSpCurve +class Approx_MCurvesToBSpCurve { public: - DEFINE_STANDARD_ALLOC - Standard_EXPORT Approx_MCurvesToBSpCurve(); - + Standard_EXPORT void Reset(); - - Standard_EXPORT void Append (const AppParCurves_MultiCurve& MC); - + + Standard_EXPORT void Append(const AppParCurves_MultiCurve& MC); + Standard_EXPORT void Perform(); - - Standard_EXPORT void Perform (const AppParCurves_SequenceOfMultiCurve& TheSeq); - + + Standard_EXPORT void Perform(const AppParCurves_SequenceOfMultiCurve& TheSeq); + //! return the composite MultiCurves as a MultiBSpCurve. Standard_EXPORT const AppParCurves_MultiBSpCurve& Value() const; - + //! return the composite MultiCurves as a MultiBSpCurve. Standard_EXPORT const AppParCurves_MultiBSpCurve& ChangeValue(); - - - protected: - - - - - private: - - - - AppParCurves_MultiBSpCurve mySpline; - Standard_Boolean myDone; + AppParCurves_MultiBSpCurve mySpline; + Standard_Boolean myDone; AppParCurves_SequenceOfMultiCurve myCurves; - - }; - - - - - - #endif // _Approx_MCurvesToBSpCurve_HeaderFile diff --git a/opencascade/Approx_ParametrizationType.hxx b/opencascade/Approx_ParametrizationType.hxx index 0a19d2864..2d98081fa 100644 --- a/opencascade/Approx_ParametrizationType.hxx +++ b/opencascade/Approx_ParametrizationType.hxx @@ -17,11 +17,11 @@ #ifndef _Approx_ParametrizationType_HeaderFile #define _Approx_ParametrizationType_HeaderFile - enum Approx_ParametrizationType { - Approx_ChordLength, //!< parameters of points are proportionate to distances between them - Approx_Centripetal, //!< parameters of points are proportionate to square roots of distances between them + Approx_ChordLength, //!< parameters of points are proportionate to distances between them + Approx_Centripetal, //!< parameters of points are proportionate to square roots of distances + //!< between them Approx_IsoParametric //!< parameters of points are distributed uniformly }; diff --git a/opencascade/Approx_SameParameter.hxx b/opencascade/Approx_SameParameter.hxx index 257a01933..5c1550fc3 100644 --- a/opencascade/Approx_SameParameter.hxx +++ b/opencascade/Approx_SameParameter.hxx @@ -27,90 +27,70 @@ class Geom_Surface; //! Approximation of a PCurve on a surface to make its //! parameter be the same that the parameter of a given 3d //! reference curve. -class Approx_SameParameter +class Approx_SameParameter { public: - DEFINE_STANDARD_ALLOC //! Warning: the C3D and C2D must have the same parametric domain. - Standard_EXPORT Approx_SameParameter(const Handle(Geom_Curve)& C3D, + Standard_EXPORT Approx_SameParameter(const Handle(Geom_Curve)& C3D, const Handle(Geom2d_Curve)& C2D, const Handle(Geom_Surface)& S, - const Standard_Real Tol); + const Standard_Real Tol); //! Warning: the C3D and C2D must have the same parametric domain. - Standard_EXPORT Approx_SameParameter(const Handle(Adaptor3d_Curve)& C3D, - const Handle(Geom2d_Curve)& C2D, + Standard_EXPORT Approx_SameParameter(const Handle(Adaptor3d_Curve)& C3D, + const Handle(Geom2d_Curve)& C2D, const Handle(Adaptor3d_Surface)& S, - const Standard_Real Tol); + const Standard_Real Tol); //! Warning: the C3D and C2D must have the same parametric domain. - Standard_EXPORT Approx_SameParameter(const Handle(Adaptor3d_Curve)& C3D, + Standard_EXPORT Approx_SameParameter(const Handle(Adaptor3d_Curve)& C3D, const Handle(Adaptor2d_Curve2d)& C2D, const Handle(Adaptor3d_Surface)& S, - const Standard_Real Tol); + const Standard_Real Tol); //!@Returns .false. if calculations failed, //! .true. if calculations succeed - Standard_Boolean IsDone() const - { - return myDone; - } + Standard_Boolean IsDone() const { return myDone; } //!@Returns tolerance (maximal distance) between 3d curve - //! and curve on surface, generated by 2d curve and surface. - Standard_Real TolReached() const - { - return myTolReached; - } + //! and curve on surface, generated by 2d curve and surface. + Standard_Real TolReached() const { return myTolReached; } //! Tells whether the original data had already the same //! parameter up to the tolerance : in that case nothing //! is done. - Standard_Boolean IsSameParameter() const - { - return mySameParameter; - } + Standard_Boolean IsSameParameter() const { return mySameParameter; } //! Returns the 2D curve that has the same parameter as //! the 3D curve once evaluated on the surface up to the //! specified tolerance. - Handle(Geom2d_Curve) Curve2d() const - { - return myCurve2d; - } + Handle(Geom2d_Curve) Curve2d() const { return myCurve2d; } //! Returns the 3D curve that has the same parameter as //! the 3D curve once evaluated on the surface up to the //! specified tolerance. - Handle(Adaptor3d_Curve) Curve3d() const - { - return myC3d; - } + Handle(Adaptor3d_Curve) Curve3d() const { return myC3d; } //! Returns the 3D curve on surface that has the same parameter as //! the 3D curve up to the specified tolerance. - Handle(Adaptor3d_CurveOnSurface) CurveOnSurface() const - { - return myCurveOnSurface; - } + Handle(Adaptor3d_CurveOnSurface) CurveOnSurface() const { return myCurveOnSurface; } private: - //! Internal data structure to unify access to the most actively used data. //! This structure is not intended to be class field since //! a lot of memory is used in intermediate computations. struct Approx_SameParameter_Data { - Adaptor3d_CurveOnSurface myCOnS; // Curve on surface. - Standard_Integer myNbPnt; // Number of points. - Standard_Real *myPC3d; // Parameters on 3d curve. - Standard_Real *myPC2d; // Parameters on 2d curve. + Adaptor3d_CurveOnSurface myCOnS; // Curve on surface. + Standard_Integer myNbPnt; // Number of points. + Standard_Real* myPC3d; // Parameters on 3d curve. + Standard_Real* myPC2d; // Parameters on 2d curve. // Second data arrays. Used in loop over poles. - Standard_Real *myNewPC3d; // Parameters on 3d curve. - Standard_Real *myNewPC2d; // Parameters on 2d curve. + Standard_Real* myNewPC3d; // Parameters on 3d curve. + Standard_Real* myNewPC2d; // Parameters on 2d curve. // Parameters ranges. Standard_Real myC3dPF; // Curve 3d Parameter First. @@ -124,73 +104,72 @@ private: void Swap(const Standard_Integer theNewNbPoints) { myNbPnt = theNewNbPoints; - Standard_Real * temp; + Standard_Real* temp; // 3-D - temp = myPC3d; - myPC3d = myNewPC3d; + temp = myPC3d; + myPC3d = myNewPC3d; myNewPC3d = temp; // 2-D - temp = myPC2d; - myPC2d = myNewPC2d; + temp = myPC2d; + myPC2d = myNewPC2d; myNewPC2d = temp; } }; - - Approx_SameParameter(const Approx_SameParameter &); - Approx_SameParameter& operator=(const Approx_SameParameter &); + Approx_SameParameter(const Approx_SameParameter&); + Approx_SameParameter& operator=(const Approx_SameParameter&); //! Computes the pcurve (internal use only). - Standard_EXPORT void Build (const Standard_Real Tol); + Standard_EXPORT void Build(const Standard_Real Tol); //! Computes initial point distribution. - Standard_Boolean BuildInitialDistribution(Approx_SameParameter_Data &theData) const; + Standard_Boolean BuildInitialDistribution(Approx_SameParameter_Data& theData) const; //! Increases initial number of samples in case of the C0 continuity. //! Return new number of points and corresponding data arrays. //@return true if new number of samples is good and false otherwise. - Standard_Boolean IncreaseInitialNbSamples(Approx_SameParameter_Data &theData) const; + Standard_Boolean IncreaseInitialNbSamples(Approx_SameParameter_Data& theData) const; //! Computes tangents on boundary points. //@return true if tangents are not null and false otherwise. - Standard_Boolean ComputeTangents(const Adaptor3d_CurveOnSurface & theCOnS, - Standard_Real &theFirstTangent, - Standard_Real &theLastTangent) const; + Standard_Boolean ComputeTangents(const Adaptor3d_CurveOnSurface& theCOnS, + Standard_Real& theFirstTangent, + Standard_Real& theLastTangent) const; //! Method to check same parameter state //! and build dependency between 2d and 3d curves. //@return true if 2d and 3d curves have same parameter state and false otherwise. - Standard_Boolean CheckSameParameter(Approx_SameParameter_Data &theData, - Standard_Real &theSqDist) const; + Standard_Boolean CheckSameParameter(Approx_SameParameter_Data& theData, + Standard_Real& theSqDist) const; //! Computes interpolated values. //!@Returns .false. if computations failed; - Standard_Boolean Interpolate(const Approx_SameParameter_Data & theData, - const Standard_Real aTangFirst, - const Standard_Real aTangLast, - TColStd_Array1OfReal & thePoles, - TColStd_Array1OfReal & theFlatKnots) const; + Standard_Boolean Interpolate(const Approx_SameParameter_Data& theData, + const Standard_Real aTangFirst, + const Standard_Real aTangLast, + TColStd_Array1OfReal& thePoles, + TColStd_Array1OfReal& theFlatKnots) const; //! Increases number of poles in poles loop. //@return true if poles is changed and false otherwise. - Standard_Boolean IncreaseNbPoles(const TColStd_Array1OfReal & thePoles, - const TColStd_Array1OfReal & theFlatKnots, - Approx_SameParameter_Data & theData, - Standard_Real &theBestSqTol) const; + Standard_Boolean IncreaseNbPoles(const TColStd_Array1OfReal& thePoles, + const TColStd_Array1OfReal& theFlatKnots, + Approx_SameParameter_Data& theData, + Standard_Real& theBestSqTol) const; - static const Standard_Integer myNbSamples = 22; // To be consistent with "checkshape". + static const Standard_Integer myNbSamples = 22; // To be consistent with "checkshape". static const Standard_Integer myMaxArraySize = 1000; - const Standard_Real myDeltaMin; // Initialization is allowed only for integral types. - - Standard_Boolean mySameParameter; - Standard_Boolean myDone; - Standard_Real myTolReached; - Handle(Geom2d_Curve) myCurve2d; - Handle(Adaptor2d_Curve2d) myHCurve2d; - Handle(Adaptor3d_Curve) myC3d; - Handle(Adaptor3d_Surface) mySurf; + const Standard_Real myDeltaMin; // Initialization is allowed only for integral types. + + Standard_Boolean mySameParameter; + Standard_Boolean myDone; + Standard_Real myTolReached; + Handle(Geom2d_Curve) myCurve2d; + Handle(Adaptor2d_Curve2d) myHCurve2d; + Handle(Adaptor3d_Curve) myC3d; + Handle(Adaptor3d_Surface) mySurf; Handle(Adaptor3d_CurveOnSurface) myCurveOnSurface; }; diff --git a/opencascade/Approx_SequenceOfHArray1OfReal.hxx b/opencascade/Approx_SequenceOfHArray1OfReal.hxx index 342b5a9e6..bf3436e9d 100644 --- a/opencascade/Approx_SequenceOfHArray1OfReal.hxx +++ b/opencascade/Approx_SequenceOfHArray1OfReal.hxx @@ -17,10 +17,9 @@ #ifndef Approx_SequenceOfHArray1OfReal_HeaderFile #define Approx_SequenceOfHArray1OfReal_HeaderFile -#include #include +#include typedef NCollection_Sequence Approx_SequenceOfHArray1OfReal; - #endif diff --git a/opencascade/Approx_Status.hxx b/opencascade/Approx_Status.hxx index 4827a10e6..d6184bb12 100644 --- a/opencascade/Approx_Status.hxx +++ b/opencascade/Approx_Status.hxx @@ -20,9 +20,9 @@ //! It is an auxiliary flag being used in inner computations enum Approx_Status { -Approx_PointsAdded, -Approx_NoPointsAdded, -Approx_NoApproximation + Approx_PointsAdded, + Approx_NoPointsAdded, + Approx_NoApproximation }; #endif // _Approx_Status_HeaderFile diff --git a/opencascade/Approx_SweepApproximation.hxx b/opencascade/Approx_SweepApproximation.hxx index bc3748345..04efa6036 100644 --- a/opencascade/Approx_SweepApproximation.hxx +++ b/opencascade/Approx_SweepApproximation.hxx @@ -21,30 +21,29 @@ #include #include +#include +#include +#include #include -#include -#include -#include +#include +#include +#include +#include #include -#include -#include -#include +#include +#include +#include +#include #include #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include class Approx_SweepFunction; class AdvApprox_Cutting; - //! Approximation of an Surface S(u,v) //! (and eventually associate 2d Curves) defined //! by section's law. @@ -54,15 +53,13 @@ class AdvApprox_Cutting; //! To use this algorithme, you have to implement Ft(u) //! as a derivative class of Approx_SweepFunction. //! This algorithm can be used by blending, sweeping... -class Approx_SweepApproximation +class Approx_SweepApproximation { public: - DEFINE_STANDARD_ALLOC - Standard_EXPORT Approx_SweepApproximation(const Handle(Approx_SweepFunction)& Func); - + //! Perform the Approximation //! [First, Last] : Approx_SweepApproximation.cdl //! Tol3d : Tolerance to surface approximation @@ -78,138 +75,166 @@ public: //! Segmax : The maximum number of span in v required on //! the surface //! Warning : The continuity ci can be obtained only if Ft is Ci - Standard_EXPORT void Perform (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol3d, const Standard_Real BoundTol, const Standard_Real Tol2d, const Standard_Real TolAngular, const GeomAbs_Shape Continuity = GeomAbs_C0, const Standard_Integer Degmax = 11, const Standard_Integer Segmax = 50); - + Standard_EXPORT void Perform(const Standard_Real First, + const Standard_Real Last, + const Standard_Real Tol3d, + const Standard_Real BoundTol, + const Standard_Real Tol2d, + const Standard_Real TolAngular, + const GeomAbs_Shape Continuity = GeomAbs_C0, + const Standard_Integer Degmax = 11, + const Standard_Integer Segmax = 50); + //! The EvaluatorFunction from AdvApprox; - Standard_EXPORT Standard_Integer Eval (const Standard_Real Parameter, const Standard_Integer DerivativeRequest, const Standard_Real First, const Standard_Real Last, Standard_Real& Result); - + Standard_EXPORT Standard_Integer Eval(const Standard_Real Parameter, + const Standard_Integer DerivativeRequest, + const Standard_Real First, + const Standard_Real Last, + Standard_Real& Result); + //! returns if we have an result - Standard_Boolean IsDone() const; - - Standard_EXPORT void SurfShape (Standard_Integer& UDegree, Standard_Integer& VDegree, Standard_Integer& NbUPoles, Standard_Integer& NbVPoles, Standard_Integer& NbUKnots, Standard_Integer& NbVKnots) const; - - Standard_EXPORT void Surface (TColgp_Array2OfPnt& TPoles, TColStd_Array2OfReal& TWeights, TColStd_Array1OfReal& TUKnots, TColStd_Array1OfReal& TVKnots, TColStd_Array1OfInteger& TUMults, TColStd_Array1OfInteger& TVMults) const; - - Standard_Integer UDegree() const; - - Standard_Integer VDegree() const; - - const TColgp_Array2OfPnt& SurfPoles() const; - - const TColStd_Array2OfReal& SurfWeights() const; - - const TColStd_Array1OfReal& SurfUKnots() const; - - const TColStd_Array1OfReal& SurfVKnots() const; - - const TColStd_Array1OfInteger& SurfUMults() const; - - const TColStd_Array1OfInteger& SurfVMults() const; - + Standard_Boolean IsDone() const; + + Standard_EXPORT void SurfShape(Standard_Integer& UDegree, + Standard_Integer& VDegree, + Standard_Integer& NbUPoles, + Standard_Integer& NbVPoles, + Standard_Integer& NbUKnots, + Standard_Integer& NbVKnots) const; + + Standard_EXPORT void Surface(TColgp_Array2OfPnt& TPoles, + TColStd_Array2OfReal& TWeights, + TColStd_Array1OfReal& TUKnots, + TColStd_Array1OfReal& TVKnots, + TColStd_Array1OfInteger& TUMults, + TColStd_Array1OfInteger& TVMults) const; + + Standard_Integer UDegree() const; + + Standard_Integer VDegree() const; + + const TColgp_Array2OfPnt& SurfPoles() const; + + const TColStd_Array2OfReal& SurfWeights() const; + + const TColStd_Array1OfReal& SurfUKnots() const; + + const TColStd_Array1OfReal& SurfVKnots() const; + + const TColStd_Array1OfInteger& SurfUMults() const; + + const TColStd_Array1OfInteger& SurfVMults() const; + //! returns the maximum error in the surface approximation. Standard_EXPORT Standard_Real MaxErrorOnSurf() const; - + //! returns the average error in the surface approximation. Standard_EXPORT Standard_Real AverageErrorOnSurf() const; - - Standard_Integer NbCurves2d() const; - - Standard_EXPORT void Curves2dShape (Standard_Integer& Degree, Standard_Integer& NbPoles, Standard_Integer& NbKnots) const; - - Standard_EXPORT void Curve2d (const Standard_Integer Index, TColgp_Array1OfPnt2d& TPoles, TColStd_Array1OfReal& TKnots, TColStd_Array1OfInteger& TMults) const; - - Standard_Integer Curves2dDegree() const; - - const TColgp_Array1OfPnt2d& Curve2dPoles (const Standard_Integer Index) const; - - const TColStd_Array1OfReal& Curves2dKnots() const; - - const TColStd_Array1OfInteger& Curves2dMults() const; - - //! returns the maximum error of the - //! 2d curve approximation. - Standard_EXPORT Standard_Real Max2dError (const Standard_Integer Index) const; - - //! returns the average error of the - //! 2d curve approximation. - Standard_EXPORT Standard_Real Average2dError (const Standard_Integer Index) const; - - //! returns the maximum 3d error of the - //! 2d curve approximation on the Surface. - Standard_EXPORT Standard_Real TolCurveOnSurf (const Standard_Integer Index) const; - - //! display information on approximation. - Standard_EXPORT void Dump (Standard_OStream& o) const; + Standard_Integer NbCurves2d() const; + Standard_EXPORT void Curves2dShape(Standard_Integer& Degree, + Standard_Integer& NbPoles, + Standard_Integer& NbKnots) const; + Standard_EXPORT void Curve2d(const Standard_Integer Index, + TColgp_Array1OfPnt2d& TPoles, + TColStd_Array1OfReal& TKnots, + TColStd_Array1OfInteger& TMults) const; -protected: + Standard_Integer Curves2dDegree() const; + + const TColgp_Array1OfPnt2d& Curve2dPoles(const Standard_Integer Index) const; + const TColStd_Array1OfReal& Curves2dKnots() const; + const TColStd_Array1OfInteger& Curves2dMults() const; + //! returns the maximum error of the + //! 2d curve approximation. + Standard_EXPORT Standard_Real Max2dError(const Standard_Integer Index) const; + //! returns the average error of the + //! 2d curve approximation. + Standard_EXPORT Standard_Real Average2dError(const Standard_Integer Index) const; -private: + //! returns the maximum 3d error of the + //! 2d curve approximation on the Surface. + Standard_EXPORT Standard_Real TolCurveOnSurf(const Standard_Integer Index) const; + + //! display information on approximation. + Standard_EXPORT void Dump(Standard_OStream& o) const; - - Standard_EXPORT void Approximation (const Handle(TColStd_HArray1OfReal)& OneDTol, const Handle(TColStd_HArray1OfReal)& TwoDTol, const Handle(TColStd_HArray1OfReal)& ThreeDTol, const Standard_Real BounTol, const Standard_Real First, const Standard_Real Last, const GeomAbs_Shape Continuity, const Standard_Integer Degmax, const Standard_Integer Segmax, const AdvApprox_EvaluatorFunction& TheApproxFunction, const AdvApprox_Cutting& TheCuttingTool); - - Standard_EXPORT Standard_Boolean D0 (const Standard_Real Param, const Standard_Real First, const Standard_Real Last, Standard_Real& Result); - - Standard_EXPORT Standard_Boolean D1 (const Standard_Real Param, const Standard_Real First, const Standard_Real Last, Standard_Real& Result); - - Standard_EXPORT Standard_Boolean D2 (const Standard_Real Param, const Standard_Real First, const Standard_Real Last, Standard_Real& Result); - - - Handle(Approx_SweepFunction) myFunc; - Standard_Boolean done; - Standard_Integer Num1DSS; - Standard_Integer Num2DSS; - Standard_Integer Num3DSS; - Standard_Integer udeg; - Standard_Integer vdeg; - Standard_Integer deg2d; - Handle(TColgp_HArray2OfPnt) tabPoles; - Handle(TColStd_HArray2OfReal) tabWeights; - Handle(TColStd_HArray1OfReal) tabUKnots; - Handle(TColStd_HArray1OfReal) tabVKnots; - Handle(TColStd_HArray1OfReal) tab2dKnots; +protected: +private: + Standard_EXPORT void Approximation(const Handle(TColStd_HArray1OfReal)& OneDTol, + const Handle(TColStd_HArray1OfReal)& TwoDTol, + const Handle(TColStd_HArray1OfReal)& ThreeDTol, + const Standard_Real BounTol, + const Standard_Real First, + const Standard_Real Last, + const GeomAbs_Shape Continuity, + const Standard_Integer Degmax, + const Standard_Integer Segmax, + const AdvApprox_EvaluatorFunction& TheApproxFunction, + const AdvApprox_Cutting& TheCuttingTool); + + Standard_EXPORT Standard_Boolean D0(const Standard_Real Param, + const Standard_Real First, + const Standard_Real Last, + Standard_Real& Result); + + Standard_EXPORT Standard_Boolean D1(const Standard_Real Param, + const Standard_Real First, + const Standard_Real Last, + Standard_Real& Result); + + Standard_EXPORT Standard_Boolean D2(const Standard_Real Param, + const Standard_Real First, + const Standard_Real Last, + Standard_Real& Result); + + Handle(Approx_SweepFunction) myFunc; + Standard_Boolean done; + Standard_Integer Num1DSS; + Standard_Integer Num2DSS; + Standard_Integer Num3DSS; + Standard_Integer udeg; + Standard_Integer vdeg; + Standard_Integer deg2d; + Handle(TColgp_HArray2OfPnt) tabPoles; + Handle(TColStd_HArray2OfReal) tabWeights; + Handle(TColStd_HArray1OfReal) tabUKnots; + Handle(TColStd_HArray1OfReal) tabVKnots; + Handle(TColStd_HArray1OfReal) tab2dKnots; Handle(TColStd_HArray1OfInteger) tabUMults; Handle(TColStd_HArray1OfInteger) tabVMults; Handle(TColStd_HArray1OfInteger) tab2dMults; - TColgp_SequenceOfArray1OfPnt2d seqPoles2d; - Handle(TColStd_HArray1OfReal) MError1d; - Handle(TColStd_HArray1OfReal) tab2dError; - Handle(TColStd_HArray1OfReal) MError3d; - Handle(TColStd_HArray1OfReal) AError1d; - Handle(TColStd_HArray1OfReal) Ave2dError; - Handle(TColStd_HArray1OfReal) AError3d; - Handle(Approx_HArray1OfGTrsf2d) AAffin; - Handle(TColStd_HArray1OfReal) COnSurfErr; - gp_Vec Translation; - Handle(TColgp_HArray1OfPnt) myPoles; - Handle(TColgp_HArray1OfPnt2d) myPoles2d; - Handle(TColStd_HArray1OfReal) myWeigths; - Handle(TColgp_HArray1OfVec) myDPoles; - Handle(TColgp_HArray1OfVec) myD2Poles; - Handle(TColgp_HArray1OfVec2d) myDPoles2d; - Handle(TColgp_HArray1OfVec2d) myD2Poles2d; - Handle(TColStd_HArray1OfReal) myDWeigths; - Handle(TColStd_HArray1OfReal) myD2Weigths; - Standard_Integer myOrder; - Standard_Real myParam; - Standard_Real first; - Standard_Real last; - - + TColgp_SequenceOfArray1OfPnt2d seqPoles2d; + Handle(TColStd_HArray1OfReal) MError1d; + Handle(TColStd_HArray1OfReal) tab2dError; + Handle(TColStd_HArray1OfReal) MError3d; + Handle(TColStd_HArray1OfReal) AError1d; + Handle(TColStd_HArray1OfReal) Ave2dError; + Handle(TColStd_HArray1OfReal) AError3d; + Handle(Approx_HArray1OfGTrsf2d) AAffin; + Handle(TColStd_HArray1OfReal) COnSurfErr; + gp_Vec Translation; + Handle(TColgp_HArray1OfPnt) myPoles; + Handle(TColgp_HArray1OfPnt2d) myPoles2d; + Handle(TColStd_HArray1OfReal) myWeigths; + Handle(TColgp_HArray1OfVec) myDPoles; + Handle(TColgp_HArray1OfVec) myD2Poles; + Handle(TColgp_HArray1OfVec2d) myDPoles2d; + Handle(TColgp_HArray1OfVec2d) myD2Poles2d; + Handle(TColStd_HArray1OfReal) myDWeigths; + Handle(TColStd_HArray1OfReal) myD2Weigths; + Standard_Integer myOrder; + Standard_Real myParam; + Standard_Real first; + Standard_Real last; }; - #include - - - - #endif // _Approx_SweepApproximation_HeaderFile diff --git a/opencascade/Approx_SweepApproximation.lxx b/opencascade/Approx_SweepApproximation.lxx index 3ab47f595..ed1d30907 100644 --- a/opencascade/Approx_SweepApproximation.lxx +++ b/opencascade/Approx_SweepApproximation.lxx @@ -15,113 +15,152 @@ // commercial license or contractual agreement. #include -#include -#include -#include -#include #include +#include +#include +#include +#include -inline Standard_Boolean Approx_SweepApproximation::IsDone() const +inline Standard_Boolean Approx_SweepApproximation::IsDone() const { return done; } - -inline Standard_Integer Approx_SweepApproximation::UDegree() const +inline Standard_Integer Approx_SweepApproximation::UDegree() const { - if (!done) {throw StdFail_NotDone(" Approx_SweepApproximation");} + if (!done) + { + throw StdFail_NotDone(" Approx_SweepApproximation"); + } return udeg; } - -inline Standard_Integer Approx_SweepApproximation::VDegree() const +inline Standard_Integer Approx_SweepApproximation::VDegree() const { - if (!done) {throw StdFail_NotDone(" Approx_SweepApproximation");} + if (!done) + { + throw StdFail_NotDone(" Approx_SweepApproximation"); + } return vdeg; } - inline const TColgp_Array2OfPnt& Approx_SweepApproximation::SurfPoles() const { - if (!done) {throw StdFail_NotDone(" Approx_SweepApproximation");} + if (!done) + { + throw StdFail_NotDone(" Approx_SweepApproximation"); + } return tabPoles->Array2(); } - inline const TColStd_Array2OfReal& Approx_SweepApproximation::SurfWeights() const { - if (!done) {throw StdFail_NotDone(" Approx_SweepApproximation");} + if (!done) + { + throw StdFail_NotDone(" Approx_SweepApproximation"); + } return tabWeights->Array2(); } - inline const TColStd_Array1OfReal& Approx_SweepApproximation::SurfUKnots() const { - if (!done) {throw StdFail_NotDone(" Approx_SweepApproximation");} + if (!done) + { + throw StdFail_NotDone(" Approx_SweepApproximation"); + } return tabUKnots->Array1(); } - inline const TColStd_Array1OfReal& Approx_SweepApproximation::SurfVKnots() const { - if (!done) {throw StdFail_NotDone(" Approx_SweepApproximation");} + if (!done) + { + throw StdFail_NotDone(" Approx_SweepApproximation"); + } return tabVKnots->Array1(); } - inline const TColStd_Array1OfInteger& Approx_SweepApproximation::SurfUMults() const { - if (!done) {throw StdFail_NotDone(" Approx_SweepApproximation");} + if (!done) + { + throw StdFail_NotDone(" Approx_SweepApproximation"); + } return tabUMults->Array1(); } - inline const TColStd_Array1OfInteger& Approx_SweepApproximation::SurfVMults() const { - if (!done) {throw StdFail_NotDone(" Approx_SweepApproximation");} + if (!done) + { + throw StdFail_NotDone(" Approx_SweepApproximation"); + } return tabVMults->Array1(); } - -inline Standard_Integer Approx_SweepApproximation::NbCurves2d() const +inline Standard_Integer Approx_SweepApproximation::NbCurves2d() const { - if (!done) {throw StdFail_NotDone(" Approx_SweepApproximation");} + if (!done) + { + throw StdFail_NotDone(" Approx_SweepApproximation"); + } return Num2DSS; } - -inline Standard_Integer Approx_SweepApproximation::Curves2dDegree() const +inline Standard_Integer Approx_SweepApproximation::Curves2dDegree() const { - if (!done) {throw StdFail_NotDone(" Approx_SweepApproximation");} - if (seqPoles2d.Length() == 0) {throw Standard_DomainError();} + if (!done) + { + throw StdFail_NotDone(" Approx_SweepApproximation"); + } + if (seqPoles2d.Length() == 0) + { + throw Standard_DomainError(); + } return deg2d; } - -inline const TColgp_Array1OfPnt2d& Approx_SweepApproximation::Curve2dPoles(const Standard_Integer Index) const +inline const TColgp_Array1OfPnt2d& Approx_SweepApproximation::Curve2dPoles( + const Standard_Integer Index) const { - if (!done) {throw StdFail_NotDone(" Approx_SweepApproximation");} - if (seqPoles2d.Length() == 0) {throw Standard_DomainError();} + if (!done) + { + throw StdFail_NotDone(" Approx_SweepApproximation"); + } + if (seqPoles2d.Length() == 0) + { + throw Standard_DomainError(); + } return seqPoles2d(Index)->Array1(); } - inline const TColStd_Array1OfReal& Approx_SweepApproximation::Curves2dKnots() const { - if (!done) {throw StdFail_NotDone(" Approx_SweepApproximation");} - if (seqPoles2d.Length() == 0) {throw Standard_DomainError();} + if (!done) + { + throw StdFail_NotDone(" Approx_SweepApproximation"); + } + if (seqPoles2d.Length() == 0) + { + throw Standard_DomainError(); + } return tab2dKnots->Array1(); } - inline const TColStd_Array1OfInteger& Approx_SweepApproximation::Curves2dMults() const { - if (!done) {throw StdFail_NotDone(" Approx_SweepApproximation");} - if (seqPoles2d.Length() == 0) {throw Standard_DomainError();} + if (!done) + { + throw StdFail_NotDone(" Approx_SweepApproximation"); + } + if (seqPoles2d.Length() == 0) + { + throw Standard_DomainError(); + } return tab2dMults->Array1(); } -/* +/* inline void Approx_SweepApproximation::TolReached(Standard_Real& Tol3d,Standard_Real& Tol2d) const { diff --git a/opencascade/Approx_SweepFunction.hxx b/opencascade/Approx_SweepFunction.hxx index 56c0334bc..2f6c4599d 100644 --- a/opencascade/Approx_SweepFunction.hxx +++ b/opencascade/Approx_SweepFunction.hxx @@ -19,19 +19,18 @@ #include -#include +#include +#include #include +#include +#include +#include #include #include -#include #include #include -#include -#include -#include class gp_Pnt; - class Approx_SweepFunction; DEFINE_STANDARD_HANDLE(Approx_SweepFunction, Standard_Transient) @@ -41,106 +40,120 @@ class Approx_SweepFunction : public Standard_Transient { public: - - //! compute the section for v = param - Standard_EXPORT virtual Standard_Boolean D0 (const Standard_Real Param, const Standard_Real First, const Standard_Real Last, TColgp_Array1OfPnt& Poles, TColgp_Array1OfPnt2d& Poles2d, TColStd_Array1OfReal& Weigths) = 0; - + Standard_EXPORT virtual Standard_Boolean D0(const Standard_Real Param, + const Standard_Real First, + const Standard_Real Last, + TColgp_Array1OfPnt& Poles, + TColgp_Array1OfPnt2d& Poles2d, + TColStd_Array1OfReal& Weigths) = 0; + //! compute the first derivative in v direction of the //! section for v = param //! Warning : It used only for C1 or C2 approximation - Standard_EXPORT virtual Standard_Boolean D1 (const Standard_Real Param, const Standard_Real First, const Standard_Real Last, TColgp_Array1OfPnt& Poles, TColgp_Array1OfVec& DPoles, TColgp_Array1OfPnt2d& Poles2d, TColgp_Array1OfVec2d& DPoles2d, TColStd_Array1OfReal& Weigths, TColStd_Array1OfReal& DWeigths); - + Standard_EXPORT virtual Standard_Boolean D1(const Standard_Real Param, + const Standard_Real First, + const Standard_Real Last, + TColgp_Array1OfPnt& Poles, + TColgp_Array1OfVec& DPoles, + TColgp_Array1OfPnt2d& Poles2d, + TColgp_Array1OfVec2d& DPoles2d, + TColStd_Array1OfReal& Weigths, + TColStd_Array1OfReal& DWeigths); + //! compute the second derivative in v direction of the //! section for v = param //! Warning : It used only for C2 approximation - Standard_EXPORT virtual Standard_Boolean D2 (const Standard_Real Param, const Standard_Real First, const Standard_Real Last, TColgp_Array1OfPnt& Poles, TColgp_Array1OfVec& DPoles, TColgp_Array1OfVec& D2Poles, TColgp_Array1OfPnt2d& Poles2d, TColgp_Array1OfVec2d& DPoles2d, TColgp_Array1OfVec2d& D2Poles2d, TColStd_Array1OfReal& Weigths, TColStd_Array1OfReal& DWeigths, TColStd_Array1OfReal& D2Weigths); - + Standard_EXPORT virtual Standard_Boolean D2(const Standard_Real Param, + const Standard_Real First, + const Standard_Real Last, + TColgp_Array1OfPnt& Poles, + TColgp_Array1OfVec& DPoles, + TColgp_Array1OfVec& D2Poles, + TColgp_Array1OfPnt2d& Poles2d, + TColgp_Array1OfVec2d& DPoles2d, + TColgp_Array1OfVec2d& D2Poles2d, + TColStd_Array1OfReal& Weigths, + TColStd_Array1OfReal& DWeigths, + TColStd_Array1OfReal& D2Weigths); + //! get the number of 2d curves to approximate. Standard_EXPORT virtual Standard_Integer Nb2dCurves() const = 0; - + //! get the format of an section - Standard_EXPORT virtual void SectionShape (Standard_Integer& NbPoles, Standard_Integer& NbKnots, Standard_Integer& Degree) const = 0; - + Standard_EXPORT virtual void SectionShape(Standard_Integer& NbPoles, + Standard_Integer& NbKnots, + Standard_Integer& Degree) const = 0; + //! get the Knots of the section - Standard_EXPORT virtual void Knots (TColStd_Array1OfReal& TKnots) const = 0; - + Standard_EXPORT virtual void Knots(TColStd_Array1OfReal& TKnots) const = 0; + //! get the Multplicities of the section - Standard_EXPORT virtual void Mults (TColStd_Array1OfInteger& TMults) const = 0; - - //! Returns if the sections are rationnal or not + Standard_EXPORT virtual void Mults(TColStd_Array1OfInteger& TMults) const = 0; + + //! Returns if the sections are rational or not Standard_EXPORT virtual Standard_Boolean IsRational() const = 0; - + //! Returns the number of intervals for continuity //! . //! May be one if Continuity(me) >= - Standard_EXPORT virtual Standard_Integer NbIntervals (const GeomAbs_Shape S) const = 0; - + Standard_EXPORT virtual Standard_Integer NbIntervals(const GeomAbs_Shape S) const = 0; + //! Stores in the parameters bounding the intervals //! of continuity . //! //! The array must provide enough room to accommodate //! for the parameters. i.e. T.Length() > NbIntervals() - Standard_EXPORT virtual void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const = 0; - + Standard_EXPORT virtual void Intervals(TColStd_Array1OfReal& T, const GeomAbs_Shape S) const = 0; + //! Sets the bounds of the parametric interval on //! the fonction //! This determines the derivatives in these values if the //! function is not Cn. - Standard_EXPORT virtual void SetInterval (const Standard_Real First, const Standard_Real Last) = 0; - + Standard_EXPORT virtual void SetInterval(const Standard_Real First, const Standard_Real Last) = 0; + //! Returns the resolutions in the sub-space 2d //! This information is usfull to find an good tolerance in //! 2d approximation. - Standard_EXPORT virtual void Resolution (const Standard_Integer Index, const Standard_Real Tol, Standard_Real& TolU, Standard_Real& TolV) const; - + Standard_EXPORT virtual void Resolution(const Standard_Integer Index, + const Standard_Real Tol, + Standard_Real& TolU, + Standard_Real& TolV) const; + //! Returns the tolerance to reach in approximation //! to satisfy. //! BoundTol error at the Boundary //! AngleTol tangent error at the Boundary (in radian) //! SurfTol error inside the surface. - Standard_EXPORT virtual void GetTolerance (const Standard_Real BoundTol, const Standard_Real SurfTol, const Standard_Real AngleTol, TColStd_Array1OfReal& Tol3d) const = 0; - + Standard_EXPORT virtual void GetTolerance(const Standard_Real BoundTol, + const Standard_Real SurfTol, + const Standard_Real AngleTol, + TColStd_Array1OfReal& Tol3d) const = 0; + //! Is useful, if (me) have to run numerical algorithm to perform D0, D1 or D2 - Standard_EXPORT virtual void SetTolerance (const Standard_Real Tol3d, const Standard_Real Tol2d) = 0; - + Standard_EXPORT virtual void SetTolerance(const Standard_Real Tol3d, + const Standard_Real Tol2d) = 0; + //! Get the barycentre of Surface. //! An very poor estimation is sufficient. //! This information is useful to perform well conditioned rational approximation. //! Warning: Used only if IsRational Standard_EXPORT virtual gp_Pnt BarycentreOfSurf() const; - + //! Returns the length of the greater section. //! Thisinformation is useful to G1's control. //! Warning: With an little value, approximation can be slower. Standard_EXPORT virtual Standard_Real MaximalSection() const; - + //! Compute the minimal value of weight for each poles in all sections. //! This information is useful to control error in rational approximation. //! Warning: Used only if IsRational - Standard_EXPORT virtual void GetMinimalWeight (TColStd_Array1OfReal& Weigths) const; - + Standard_EXPORT virtual void GetMinimalWeight(TColStd_Array1OfReal& Weigths) const; - - - DEFINE_STANDARD_RTTIEXT(Approx_SweepFunction,Standard_Transient) + DEFINE_STANDARD_RTTIEXT(Approx_SweepFunction, Standard_Transient) protected: - - - - private: - - - - }; - - - - - - #endif // _Approx_SweepFunction_HeaderFile diff --git a/opencascade/Aspect_AspectFillAreaDefinitionError.hxx b/opencascade/Aspect_AspectFillAreaDefinitionError.hxx index 3e1b38bfb..0656968d4 100644 --- a/opencascade/Aspect_AspectFillAreaDefinitionError.hxx +++ b/opencascade/Aspect_AspectFillAreaDefinitionError.hxx @@ -24,8 +24,9 @@ class Aspect_AspectFillAreaDefinitionError; DEFINE_STANDARD_HANDLE(Aspect_AspectFillAreaDefinitionError, Standard_OutOfRange) #if !defined No_Exception && !defined No_Aspect_AspectFillAreaDefinitionError - #define Aspect_AspectFillAreaDefinitionError_Raise_if(CONDITION, MESSAGE) \ - if (CONDITION) throw Aspect_AspectFillAreaDefinitionError(MESSAGE); + #define Aspect_AspectFillAreaDefinitionError_Raise_if(CONDITION, MESSAGE) \ + if (CONDITION) \ + throw Aspect_AspectFillAreaDefinitionError(MESSAGE); #else #define Aspect_AspectFillAreaDefinitionError_Raise_if(CONDITION, MESSAGE) #endif diff --git a/opencascade/Aspect_AspectLineDefinitionError.hxx b/opencascade/Aspect_AspectLineDefinitionError.hxx index efe40d40b..a9a2dfa19 100644 --- a/opencascade/Aspect_AspectLineDefinitionError.hxx +++ b/opencascade/Aspect_AspectLineDefinitionError.hxx @@ -24,8 +24,9 @@ class Aspect_AspectLineDefinitionError; DEFINE_STANDARD_HANDLE(Aspect_AspectLineDefinitionError, Standard_OutOfRange) #if !defined No_Exception && !defined No_Aspect_AspectLineDefinitionError - #define Aspect_AspectLineDefinitionError_Raise_if(CONDITION, MESSAGE) \ - if (CONDITION) throw Aspect_AspectLineDefinitionError(MESSAGE); + #define Aspect_AspectLineDefinitionError_Raise_if(CONDITION, MESSAGE) \ + if (CONDITION) \ + throw Aspect_AspectLineDefinitionError(MESSAGE); #else #define Aspect_AspectLineDefinitionError_Raise_if(CONDITION, MESSAGE) #endif diff --git a/opencascade/Aspect_AspectMarkerDefinitionError.hxx b/opencascade/Aspect_AspectMarkerDefinitionError.hxx index e6542ada6..bc6d391be 100644 --- a/opencascade/Aspect_AspectMarkerDefinitionError.hxx +++ b/opencascade/Aspect_AspectMarkerDefinitionError.hxx @@ -24,8 +24,9 @@ class Aspect_AspectMarkerDefinitionError; DEFINE_STANDARD_HANDLE(Aspect_AspectMarkerDefinitionError, Standard_OutOfRange) #if !defined No_Exception && !defined No_Aspect_AspectMarkerDefinitionError - #define Aspect_AspectMarkerDefinitionError_Raise_if(CONDITION, MESSAGE) \ - if (CONDITION) throw Aspect_AspectMarkerDefinitionError(MESSAGE); + #define Aspect_AspectMarkerDefinitionError_Raise_if(CONDITION, MESSAGE) \ + if (CONDITION) \ + throw Aspect_AspectMarkerDefinitionError(MESSAGE); #else #define Aspect_AspectMarkerDefinitionError_Raise_if(CONDITION, MESSAGE) #endif diff --git a/opencascade/Aspect_Background.hxx b/opencascade/Aspect_Background.hxx index 3b9b98327..8726afd03 100644 --- a/opencascade/Aspect_Background.hxx +++ b/opencascade/Aspect_Background.hxx @@ -23,54 +23,32 @@ #include - //! This class allows the definition of //! a window background. -class Aspect_Background +class Aspect_Background { public: - DEFINE_STANDARD_ALLOC - //! Creates a window background. //! Default color : NOC_MATRAGRAY. Standard_EXPORT Aspect_Background(); - + //! Creates a window background with the colour . Standard_EXPORT Aspect_Background(const Quantity_Color& AColor); - + //! Modifies the colour of the window background . - Standard_EXPORT void SetColor (const Quantity_Color& AColor); - + Standard_EXPORT void SetColor(const Quantity_Color& AColor); + //! Returns the colour of the window background . Standard_EXPORT Quantity_Color Color() const; - - //! Dumps the content of me into the stream - Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const; - - + //! Dumps the content of me into the stream + Standard_EXPORT void DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth = -1) const; protected: - - - - - private: - - - Quantity_Color MyColor; - - }; - - - - - - #endif // _Aspect_Background_HeaderFile diff --git a/opencascade/Aspect_CircularGrid.hxx b/opencascade/Aspect_CircularGrid.hxx index f507b6a5c..2dc2b39a1 100644 --- a/opencascade/Aspect_CircularGrid.hxx +++ b/opencascade/Aspect_CircularGrid.hxx @@ -20,46 +20,54 @@ #include #include - class Aspect_CircularGrid : public Aspect_Grid { DEFINE_STANDARD_RTTIEXT(Aspect_CircularGrid, Aspect_Grid) public: - //! creates a new grid. By default this grid is not //! active. - Standard_EXPORT Aspect_CircularGrid(const Standard_Real aRadiusStep, const Standard_Integer aDivisionNumber, const Standard_Real XOrigin = 0, const Standard_Real anYOrigin = 0, const Standard_Real aRotationAngle = 0); - + Standard_EXPORT Aspect_CircularGrid(const Standard_Real aRadiusStep, + const Standard_Integer aDivisionNumber, + const Standard_Real XOrigin = 0, + const Standard_Real anYOrigin = 0, + const Standard_Real aRotationAngle = 0); + //! defines the x step of the grid. - Standard_EXPORT void SetRadiusStep (const Standard_Real aStep); - + Standard_EXPORT void SetRadiusStep(const Standard_Real aStep); + //! defines the step of the grid. - Standard_EXPORT void SetDivisionNumber (const Standard_Integer aNumber); - - Standard_EXPORT void SetGridValues (const Standard_Real XOrigin, const Standard_Real YOrigin, const Standard_Real RadiusStep, const Standard_Integer DivisionNumber, const Standard_Real RotationAngle); - + Standard_EXPORT void SetDivisionNumber(const Standard_Integer aNumber); + + Standard_EXPORT void SetGridValues(const Standard_Real XOrigin, + const Standard_Real YOrigin, + const Standard_Real RadiusStep, + const Standard_Integer DivisionNumber, + const Standard_Real RotationAngle); + //! returns the point of the grid the closest to the point X,Y - Standard_EXPORT virtual void Compute (const Standard_Real X, const Standard_Real Y, Standard_Real& gridX, Standard_Real& gridY) const Standard_OVERRIDE; - + Standard_EXPORT virtual void Compute(const Standard_Real X, + const Standard_Real Y, + Standard_Real& gridX, + Standard_Real& gridY) const Standard_OVERRIDE; + //! returns the x step of the grid. Standard_EXPORT Standard_Real RadiusStep() const; - + //! returns the x step of the grid. Standard_EXPORT Standard_Integer DivisionNumber() const; - + Standard_EXPORT virtual void Init() Standard_OVERRIDE; - + //! Dumps the content of me into the stream - Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE; + Standard_EXPORT virtual void DumpJson(Standard_OStream& theOStream, + Standard_Integer theDepth = -1) const Standard_OVERRIDE; private: - - Standard_Real myRadiusStep; + Standard_Real myRadiusStep; Standard_Integer myDivisionNumber; - Standard_Real myAlpha; - Standard_Real myA1; - Standard_Real myB1; - + Standard_Real myAlpha; + Standard_Real myA1; + Standard_Real myB1; }; DEFINE_STANDARD_HANDLE(Aspect_CircularGrid, Aspect_Grid) diff --git a/opencascade/Aspect_DisplayConnection.hxx b/opencascade/Aspect_DisplayConnection.hxx index 5c1ca7984..462978629 100644 --- a/opencascade/Aspect_DisplayConnection.hxx +++ b/opencascade/Aspect_DisplayConnection.hxx @@ -27,13 +27,13 @@ struct Aspect_XVisualInfo; //! This class creates and provides connection with X server. //! Raises exception if can not connect to X server. //! On Windows and Mac OS X (in case when Cocoa used) platforms this class does nothing. -//! WARRNING: Do not close display connection manually! +//! WARNING: Do not close display connection manually! class Aspect_DisplayConnection : public Standard_Transient { DEFINE_STANDARD_RTTIEXT(Aspect_DisplayConnection, Standard_Transient) public: - - //! Default constructor. Creates connection with display name taken from "DISPLAY" environment variable + //! Default constructor. Creates connection with display name taken from "DISPLAY" environment + //! variable Standard_EXPORT Aspect_DisplayConnection(); //! Destructor. Close opened connection. @@ -41,15 +41,15 @@ public: //! Constructor. Creates connection with display specified in theDisplayName. //! Display name should be in format "hostname:number" or "hostname:number.screen_number", where: - //! hostname - Specifies the name of the host machine on which the display is physically attached. - //! number - Specifies the number of the display server on that host machine. + //! hostname - Specifies the name of the host machine on which the display is physically + //! attached. number - Specifies the number of the display server on that host machine. //! screen_number - Specifies the screen to be used on that server. Optional variable. - Standard_EXPORT Aspect_DisplayConnection (const TCollection_AsciiString& theDisplayName); + Standard_EXPORT Aspect_DisplayConnection(const TCollection_AsciiString& theDisplayName); //! Constructor wrapping existing Display instance. //! WARNING! it is a responsibility of application to keep this pointer //! valid while Aspect_DisplayConnection is alive and to close Display when it is no more needed. - Standard_EXPORT Aspect_DisplayConnection (Aspect_XDisplay* theDisplay); + Standard_EXPORT Aspect_DisplayConnection(Aspect_XDisplay* theDisplay); //! @return pointer to Display structure that serves as the connection to the X server. Aspect_XDisplay* GetDisplayAspect() { return myDisplay; } @@ -57,11 +57,9 @@ public: //! @return TRUE if X Display has been allocated by this class Standard_Boolean IsOwnDisplay() const { return myIsOwnDisplay; } - //! @return identifier(atom) for custom named property associated with windows that use current connection to X server. - uint64_t GetAtom (const Aspect_XAtom theAtom) const - { - return myAtoms.Find (theAtom); - } + //! @return identifier(atom) for custom named property associated with windows that use current + //! connection to X server. + uint64_t GetAtom(const Aspect_XAtom theAtom) const { return myAtoms.Find(theAtom); } //! @return display name for this connection. const TCollection_AsciiString& GetDisplayName() { return myDisplayName; } @@ -71,8 +69,9 @@ public: //! WARNING! When external Display is specified, it is a responsibility of application //! to keep this pointer valid while Aspect_DisplayConnection is alive //! and to close Display when it is no more needed. - //! @param theDisplay external pointer to allocated Display, or NULL if new connection should be created - Standard_EXPORT void Init (Aspect_XDisplay* theDisplay); + //! @param theDisplay external pointer to allocated Display, or NULL if new connection should be + //! created + Standard_EXPORT void Init(Aspect_XDisplay* theDisplay); //! Return default window visual or NULL when undefined. Aspect_XVisualInfo* GetDefaultVisualInfo() const { return myDefVisualInfo; } @@ -81,60 +80,53 @@ public: Aspect_FBConfig GetDefaultFBConfig() const { return myDefFBConfig; } //! Set default window visual; the visual will be deallocated using XFree(). - Standard_EXPORT void SetDefaultVisualInfo (Aspect_XVisualInfo* theVisual, - Aspect_FBConfig theFBConfig); + Standard_EXPORT void SetDefaultVisualInfo(Aspect_XVisualInfo* theVisual, + Aspect_FBConfig theFBConfig); #ifdef X_PROTOCOL //! Constructor wrapping existing Display instance. //! WARNING! it is a responsibility of application to keep this pointer //! valid while Aspect_DisplayConnection is alive and to close Display when it is no more needed. - Aspect_DisplayConnection (Display* theDisplay) - : Aspect_DisplayConnection ((Aspect_XDisplay* )theDisplay) {} + Aspect_DisplayConnection(Display* theDisplay) + : Aspect_DisplayConnection((Aspect_XDisplay*)theDisplay) + { + } //! @return pointer to Display structure that serves as the connection to the X server. - Display* GetDisplay() { return (Display* )myDisplay; } + Display* GetDisplay() { return (Display*)myDisplay; } //! Return default window visual or NULL when undefined. - XVisualInfo* GetDefaultVisualInfoX() const { return (XVisualInfo* )myDefVisualInfo; } + XVisualInfo* GetDefaultVisualInfoX() const { return (XVisualInfo*)myDefVisualInfo; } //! Set default window visual; the visual will be deallocated using XFree(). - void SetDefaultVisualInfo (XVisualInfo* theVisual, - Aspect_FBConfig theFBConfig) + void SetDefaultVisualInfo(XVisualInfo* theVisual, Aspect_FBConfig theFBConfig) { - SetDefaultVisualInfo ((Aspect_XVisualInfo* )theVisual, theFBConfig); + SetDefaultVisualInfo((Aspect_XVisualInfo*)theVisual, theFBConfig); } - //! @return identifier(atom) for custom named property associated with windows that use current connection to X server. - Atom GetAtomX (const Aspect_XAtom theAtom) const - { - return (Atom )GetAtom (theAtom); - } + //! @return identifier(atom) for custom named property associated with windows that use current + //! connection to X server. + Atom GetAtomX(const Aspect_XAtom theAtom) const { return (Atom)GetAtom(theAtom); } //! Open connection with display specified in myDisplayName class field //! or takes theDisplay parameter when it is not NULL. - void Init (Display* theDisplay) - { - Init ((Aspect_XDisplay* )theDisplay); - } + void Init(Display* theDisplay) { Init((Aspect_XDisplay*)theDisplay); } #endif private: - - Aspect_XDisplay* myDisplay; - Aspect_XVisualInfo* myDefVisualInfo; - Aspect_FBConfig myDefFBConfig; + Aspect_XDisplay* myDisplay; + Aspect_XVisualInfo* myDefVisualInfo; + Aspect_FBConfig myDefFBConfig; NCollection_DataMap myAtoms; - TCollection_AsciiString myDisplayName; - Standard_Boolean myIsOwnDisplay; + TCollection_AsciiString myDisplayName; + Standard_Boolean myIsOwnDisplay; private: - //! To protect the connection from closing copying allowed only through the handles. - Aspect_DisplayConnection (const Aspect_DisplayConnection& ); - Aspect_DisplayConnection& operator= (const Aspect_DisplayConnection& ); - + Aspect_DisplayConnection(const Aspect_DisplayConnection&); + Aspect_DisplayConnection& operator=(const Aspect_DisplayConnection&); }; -DEFINE_STANDARD_HANDLE (Aspect_DisplayConnection, Standard_Transient) +DEFINE_STANDARD_HANDLE(Aspect_DisplayConnection, Standard_Transient) #endif // _Aspect_DisplayConnection_H__ diff --git a/opencascade/Aspect_DisplayConnectionDefinitionError.hxx b/opencascade/Aspect_DisplayConnectionDefinitionError.hxx index 434769baa..27b230004 100644 --- a/opencascade/Aspect_DisplayConnectionDefinitionError.hxx +++ b/opencascade/Aspect_DisplayConnectionDefinitionError.hxx @@ -25,8 +25,9 @@ class Aspect_DisplayConnectionDefinitionError; DEFINE_STANDARD_HANDLE(Aspect_DisplayConnectionDefinitionError, Standard_OutOfRange) #if !defined No_Exception && !defined No_Aspect_DisplayConnectionDefinitionError - #define Aspect_DisplayConnectionDefinitionError_Raise_if(CONDITION, MESSAGE) \ - if (CONDITION) throw Aspect_DisplayConnectionDefinitionError(MESSAGE); + #define Aspect_DisplayConnectionDefinitionError_Raise_if(CONDITION, MESSAGE) \ + if (CONDITION) \ + throw Aspect_DisplayConnectionDefinitionError(MESSAGE); #else #define Aspect_DisplayConnectionDefinitionError_Raise_if(CONDITION, MESSAGE) #endif diff --git a/opencascade/Aspect_Drawable.hxx b/opencascade/Aspect_Drawable.hxx index 0af992e16..3cda3715b 100644 --- a/opencascade/Aspect_Drawable.hxx +++ b/opencascade/Aspect_Drawable.hxx @@ -23,9 +23,9 @@ #define _Aspect_Drawable_HeaderFile #ifdef _WIN32 - typedef void* Aspect_Drawable; /* HDC under WNT */ +typedef void* Aspect_Drawable; /* HDC under WNT */ #else - typedef unsigned long Aspect_Drawable; /* Window or Pixmap under UNIX */ +typedef unsigned long Aspect_Drawable; /* Window or Pixmap under UNIX */ #endif /* _WIN32 */ #endif /* _Aspect_Drawable_HeaderFile */ diff --git a/opencascade/Aspect_FBConfig.hxx b/opencascade/Aspect_FBConfig.hxx index 833099572..9ddf92c45 100644 --- a/opencascade/Aspect_FBConfig.hxx +++ b/opencascade/Aspect_FBConfig.hxx @@ -15,6 +15,6 @@ #define _Aspect_FBConfig_HeaderFile typedef struct __GLXFBConfigRec* GLXFBConfig; -typedef GLXFBConfig Aspect_FBConfig; +typedef GLXFBConfig Aspect_FBConfig; #endif // _Aspect_FBConfig_HeaderFile diff --git a/opencascade/Aspect_FillMethod.hxx b/opencascade/Aspect_FillMethod.hxx index ed602cc0a..7832631e2 100644 --- a/opencascade/Aspect_FillMethod.hxx +++ b/opencascade/Aspect_FillMethod.hxx @@ -20,10 +20,10 @@ //! write bitmaps in a window. enum Aspect_FillMethod { -Aspect_FM_NONE, -Aspect_FM_CENTERED, -Aspect_FM_TILED, -Aspect_FM_STRETCH + Aspect_FM_NONE, + Aspect_FM_CENTERED, + Aspect_FM_TILED, + Aspect_FM_STRETCH }; #endif // _Aspect_FillMethod_HeaderFile diff --git a/opencascade/Aspect_FrustumLRBT.hxx b/opencascade/Aspect_FrustumLRBT.hxx index 7b05cda2b..cbc875bd3 100644 --- a/opencascade/Aspect_FrustumLRBT.hxx +++ b/opencascade/Aspect_FrustumLRBT.hxx @@ -15,7 +15,7 @@ #define _Aspect_FrustumLRBT_HeaderFile //! Structure defining frustum boundaries. -template +template struct Aspect_FrustumLRBT { Elem_t Left; @@ -24,30 +24,38 @@ struct Aspect_FrustumLRBT Elem_t Top; //! Empty constructor. - Aspect_FrustumLRBT() : Left (0), Right (0), Bottom (0), Top (0) {} + Aspect_FrustumLRBT() + : Left(0), + Right(0), + Bottom(0), + Top(0) + { + } //! Copy/cast constructor. - template - explicit Aspect_FrustumLRBT (const Aspect_FrustumLRBT& theOther) - : Left (static_cast (theOther.Left)), - Right (static_cast (theOther.Right)), - Bottom(static_cast (theOther.Bottom)), - Top (static_cast (theOther.Top)) {} + template + explicit Aspect_FrustumLRBT(const Aspect_FrustumLRBT& theOther) + : Left(static_cast(theOther.Left)), + Right(static_cast(theOther.Right)), + Bottom(static_cast(theOther.Bottom)), + Top(static_cast(theOther.Top)) + { + } //! Apply multiply factor. - void Multiply (Elem_t theScale) + void Multiply(Elem_t theScale) { - Left *= theScale; - Right *= theScale; + Left *= theScale; + Right *= theScale; Bottom *= theScale; - Top *= theScale; + Top *= theScale; } //! Return multiplied frustum. - Aspect_FrustumLRBT Multiplied (Elem_t theScale) + Aspect_FrustumLRBT Multiplied(Elem_t theScale) { - Aspect_FrustumLRBT aCopy (*this); - aCopy.Multiply (theScale); + Aspect_FrustumLRBT aCopy(*this); + aCopy.Multiply(theScale); return aCopy; } }; diff --git a/opencascade/Aspect_GenId.hxx b/opencascade/Aspect_GenId.hxx index a9742638b..4ebba4dca 100644 --- a/opencascade/Aspect_GenId.hxx +++ b/opencascade/Aspect_GenId.hxx @@ -24,64 +24,56 @@ #include #include - //! This class permits the creation and control of integer identifiers. -class Aspect_GenId +class Aspect_GenId { public: - DEFINE_STANDARD_ALLOC - - //! Creates an available set of identifiers with the lower bound 0 and the upper bound INT_MAX / 2. + //! Creates an available set of identifiers with the lower bound 0 and the upper bound INT_MAX + //! / 2. Standard_EXPORT Aspect_GenId(); - + //! Creates an available set of identifiers with specified range. //! Raises IdentDefinitionError if theUpper is less than theLow. Standard_EXPORT Aspect_GenId(const Standard_Integer theLow, const Standard_Integer theUpper); - + //! Free all identifiers - make the whole range available again. Standard_EXPORT void Free(); - + //! Free specified identifier. Warning - method has no protection against double-freeing! - Standard_EXPORT void Free (const Standard_Integer theId); - + Standard_EXPORT void Free(const Standard_Integer theId); + //! Returns true if there are available identifiers in range. - Standard_Boolean HasFree() const - { - return myFreeCount > 0 - || myFreeIds.Extent() > 0; - } - + Standard_Boolean HasFree() const { return myFreeCount > 0 || myFreeIds.Extent() > 0; } + //! Returns the number of available identifiers. Standard_Integer Available() const { return myFreeCount + myFreeIds.Extent(); } - + //! Returns the lower identifier in range. Standard_Integer Lower() const { return myLowerBound; } - + //! Returns the next available identifier. //! Warning: Raises IdentDefinitionError if all identifiers are busy. Standard_EXPORT Standard_Integer Next(); //! Generates the next available identifier. - //! @param theId [out] generated identifier + //! @param[out] theId generated identifier //! @return FALSE if all identifiers are busy. - Standard_EXPORT Standard_Boolean Next (Standard_Integer& theId); - + Standard_EXPORT Standard_Boolean Next(Standard_Integer& theId); + //! Returns the upper identifier in range. Standard_Integer Upper() const { return myUpperBound; } - + //! Dumps the content of me into the stream - Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const; + Standard_EXPORT void DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth = -1) const; private: - - Standard_Integer myFreeCount; - Standard_Integer myLength; - Standard_Integer myLowerBound; - Standard_Integer myUpperBound; + Standard_Integer myFreeCount; + Standard_Integer myLength; + Standard_Integer myLowerBound; + Standard_Integer myUpperBound; TColStd_ListOfInteger myFreeIds; - }; #endif // _Aspect_GenId_HeaderFile diff --git a/opencascade/Aspect_GradientBackground.hxx b/opencascade/Aspect_GradientBackground.hxx index c204ea32d..2e2251f90 100644 --- a/opencascade/Aspect_GradientBackground.hxx +++ b/opencascade/Aspect_GradientBackground.hxx @@ -20,10 +20,9 @@ #include //! This class allows the definition of a window gradient background. -class Aspect_GradientBackground : public Aspect_Background +class Aspect_GradientBackground : public Aspect_Background { public: - DEFINE_STANDARD_ALLOC //! Creates a window gradient background. @@ -32,29 +31,29 @@ public: Standard_EXPORT Aspect_GradientBackground(); //! Creates a window gradient background with two colours. - Standard_EXPORT Aspect_GradientBackground (const Quantity_Color& theColor1, - const Quantity_Color& theColor2, - const Aspect_GradientFillMethod theMethod = Aspect_GradientFillMethod_Horizontal); + Standard_EXPORT Aspect_GradientBackground( + const Quantity_Color& theColor1, + const Quantity_Color& theColor2, + const Aspect_GradientFillMethod theMethod = Aspect_GradientFillMethod_Horizontal); //! Modifies the colours of the window gradient background. - Standard_EXPORT void SetColors (const Quantity_Color& theColor1, - const Quantity_Color& theColor2, - const Aspect_GradientFillMethod theMethod = Aspect_GradientFillMethod_Horizontal); + Standard_EXPORT void SetColors( + const Quantity_Color& theColor1, + const Quantity_Color& theColor2, + const Aspect_GradientFillMethod theMethod = Aspect_GradientFillMethod_Horizontal); //! Returns colours of the window gradient background. - Standard_EXPORT void Colors (Quantity_Color& theColor1, Quantity_Color& theColor2) const; + Standard_EXPORT void Colors(Quantity_Color& theColor1, Quantity_Color& theColor2) const; //! Returns the current gradient background fill mode. Standard_EXPORT Aspect_GradientFillMethod BgGradientFillMethod() const; //! Dumps the content of me into the stream - Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const; + Standard_EXPORT void DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth = -1) const; private: - - Quantity_Color MyColor2; + Quantity_Color MyColor2; Aspect_GradientFillMethod MyGradientMethod; - }; #endif // _Aspect_GradientBackground_HeaderFile diff --git a/opencascade/Aspect_GradientFillMethod.hxx b/opencascade/Aspect_GradientFillMethod.hxx index a3231c889..1cbc6f103 100644 --- a/opencascade/Aspect_GradientFillMethod.hxx +++ b/opencascade/Aspect_GradientFillMethod.hxx @@ -19,16 +19,19 @@ //! Defines the fill methods to write gradient background in a window. enum Aspect_GradientFillMethod { - Aspect_GradientFillMethod_None, //!< fill method not specified - Aspect_GradientFillMethod_Horizontal, //!< gradient directed from left (Color1) to right (Color2) - Aspect_GradientFillMethod_Vertical, //!< gradient directed from top (Color1) to bottom (Color2) - Aspect_GradientFillMethod_Diagonal1, //!< gradient directed from upper left corner (Color1) to lower right (Color2) - Aspect_GradientFillMethod_Diagonal2, //!< gradient directed from upper right corner (Color1) to lower left (Color2) - Aspect_GradientFillMethod_Corner1, //!< highlights upper left corner with Color1 - Aspect_GradientFillMethod_Corner2, //!< highlights upper right corner with Color1 - Aspect_GradientFillMethod_Corner3, //!< highlights lower right corner with Color1 - Aspect_GradientFillMethod_Corner4, //!< highlights lower left corner with Color1 - Aspect_GradientFillMethod_Elliptical, //!< gradient directed from center (Color1) in all directions forming an elliptic shape (Color2) + Aspect_GradientFillMethod_None, //!< fill method not specified + Aspect_GradientFillMethod_Horizontal, //!< gradient directed from left (Color1) to right (Color2) + Aspect_GradientFillMethod_Vertical, //!< gradient directed from top (Color1) to bottom (Color2) + Aspect_GradientFillMethod_Diagonal1, //!< gradient directed from upper left corner (Color1) to + //!< lower right (Color2) + Aspect_GradientFillMethod_Diagonal2, //!< gradient directed from upper right corner (Color1) to + //!< lower left (Color2) + Aspect_GradientFillMethod_Corner1, //!< highlights upper left corner with Color1 + Aspect_GradientFillMethod_Corner2, //!< highlights upper right corner with Color1 + Aspect_GradientFillMethod_Corner3, //!< highlights lower right corner with Color1 + Aspect_GradientFillMethod_Corner4, //!< highlights lower left corner with Color1 + Aspect_GradientFillMethod_Elliptical, //!< gradient directed from center (Color1) in all + //!< directions forming an elliptic shape (Color2) // obsolete aliases Aspect_GFM_NONE = Aspect_GradientFillMethod_None, diff --git a/opencascade/Aspect_GraphicDeviceDefinitionError.hxx b/opencascade/Aspect_GraphicDeviceDefinitionError.hxx index f9deefd83..23a9ff3b0 100644 --- a/opencascade/Aspect_GraphicDeviceDefinitionError.hxx +++ b/opencascade/Aspect_GraphicDeviceDefinitionError.hxx @@ -25,8 +25,9 @@ class Aspect_GraphicDeviceDefinitionError; DEFINE_STANDARD_HANDLE(Aspect_GraphicDeviceDefinitionError, Standard_OutOfRange) #if !defined No_Exception && !defined No_Aspect_GraphicDeviceDefinitionError - #define Aspect_GraphicDeviceDefinitionError_Raise_if(CONDITION, MESSAGE) \ - if (CONDITION) throw Aspect_GraphicDeviceDefinitionError(MESSAGE); + #define Aspect_GraphicDeviceDefinitionError_Raise_if(CONDITION, MESSAGE) \ + if (CONDITION) \ + throw Aspect_GraphicDeviceDefinitionError(MESSAGE); #else #define Aspect_GraphicDeviceDefinitionError_Raise_if(CONDITION, MESSAGE) #endif diff --git a/opencascade/Aspect_Grid.hxx b/opencascade/Aspect_Grid.hxx index cce171537..c32c945bb 100644 --- a/opencascade/Aspect_Grid.hxx +++ b/opencascade/Aspect_Grid.hxx @@ -27,99 +27,103 @@ class Aspect_Grid : public Standard_Transient { DEFINE_STANDARD_RTTIEXT(Aspect_Grid, Standard_Transient) public: - //! defines the x Origin of the grid. - Standard_EXPORT void SetXOrigin (const Standard_Real anOrigin); - + Standard_EXPORT void SetXOrigin(const Standard_Real anOrigin); + //! defines the y Origin of the grid. - Standard_EXPORT void SetYOrigin (const Standard_Real anOrigin); - + Standard_EXPORT void SetYOrigin(const Standard_Real anOrigin); + //! defines the orientation of the grid. - Standard_EXPORT void SetRotationAngle (const Standard_Real anAngle); - + Standard_EXPORT void SetRotationAngle(const Standard_Real anAngle); + //! Rotate the grid from a relative angle. - Standard_EXPORT void Rotate (const Standard_Real anAngle); - + Standard_EXPORT void Rotate(const Standard_Real anAngle); + //! Translate the grid from a relative distance. - Standard_EXPORT void Translate (const Standard_Real aDx, const Standard_Real aDy); - + Standard_EXPORT void Translate(const Standard_Real aDx, const Standard_Real aDy); + //! Change the colors of the grid - Standard_EXPORT virtual void SetColors (const Quantity_Color& aColor, const Quantity_Color& aTenthColor); - + Standard_EXPORT virtual void SetColors(const Quantity_Color& aColor, + const Quantity_Color& aTenthColor); + //! returns the point of the grid the closest to the point X,Y //! if the grid is active. If the grid is not active returns //! X,Y. - Standard_EXPORT void Hit (const Standard_Real X, const Standard_Real Y, Standard_Real& gridX, Standard_Real& gridY) const; - + Standard_EXPORT void Hit(const Standard_Real X, + const Standard_Real Y, + Standard_Real& gridX, + Standard_Real& gridY) const; + //! returns the point of the grid the closest to the point X,Y - Standard_EXPORT virtual void Compute (const Standard_Real X, const Standard_Real Y, Standard_Real& gridX, Standard_Real& gridY) const = 0; - + Standard_EXPORT virtual void Compute(const Standard_Real X, + const Standard_Real Y, + Standard_Real& gridX, + Standard_Real& gridY) const = 0; + //! activates the grid. The Hit method will return //! gridx and gridx computed according to the steps //! of the grid. void Activate() { myIsActive = Standard_True; } - + //! deactivates the grid. The hit method will return //! gridx and gridx as the enter value X & Y. void Deactivate() { myIsActive = Standard_False; } - + //! returns the x Origin of the grid. Standard_Real XOrigin() const { return myXOrigin; } - + //! returns the x Origin of the grid. Standard_Real YOrigin() const { return myYOrigin; } - + //! returns the x Angle of the grid. Standard_Real RotationAngle() const { return myRotationAngle; } - + //! Returns TRUE when the grid is active. Standard_Boolean IsActive() const { return myIsActive; } - + //! Returns the colors of the grid. - Standard_EXPORT void Colors (Quantity_Color& aColor, Quantity_Color& aTenthColor) const; - + Standard_EXPORT void Colors(Quantity_Color& aColor, Quantity_Color& aTenthColor) const; + //! Change the grid aspect. - Standard_EXPORT void SetDrawMode (const Aspect_GridDrawMode aDrawMode); - + Standard_EXPORT void SetDrawMode(const Aspect_GridDrawMode aDrawMode); + //! Returns the grid aspect. Aspect_GridDrawMode DrawMode() const { return myDrawMode; } //! Display the grid at screen. Standard_EXPORT virtual void Display() = 0; - + //! Erase the grid from screen. Standard_EXPORT virtual void Erase() const = 0; - + //! Returns TRUE when the grid is displayed at screen. Standard_EXPORT virtual Standard_Boolean IsDisplayed() const = 0; - + Standard_EXPORT virtual void Init() = 0; - + //! Dumps the content of me into the stream - Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const; + Standard_EXPORT virtual void DumpJson(Standard_OStream& theOStream, + Standard_Integer theDepth = -1) const; protected: - //! Creates a new grid. By default this grid is not active. - Standard_EXPORT Aspect_Grid (const Standard_Real theXOrigin = 0.0, - const Standard_Real theYOrigin = 0.0, - const Standard_Real theRotationAngle = 0, - const Quantity_Color& theColor = Quantity_NOC_GRAY50, - const Quantity_Color& theTenthColor = Quantity_NOC_GRAY70); - + Standard_EXPORT Aspect_Grid(const Standard_Real theXOrigin = 0.0, + const Standard_Real theYOrigin = 0.0, + const Standard_Real theRotationAngle = 0, + const Quantity_Color& theColor = Quantity_NOC_GRAY50, + const Quantity_Color& theTenthColor = Quantity_NOC_GRAY70); + //! Updates the grid parameters. Standard_EXPORT virtual void UpdateDisplay() = 0; protected: - - Standard_Real myRotationAngle; - Standard_Real myXOrigin; - Standard_Real myYOrigin; - Quantity_Color myColor; - Quantity_Color myTenthColor; - Standard_Boolean myIsActive; + Standard_Real myRotationAngle; + Standard_Real myXOrigin; + Standard_Real myYOrigin; + Quantity_Color myColor; + Quantity_Color myTenthColor; + Standard_Boolean myIsActive; Aspect_GridDrawMode myDrawMode; - }; DEFINE_STANDARD_HANDLE(Aspect_Grid, Standard_Transient) diff --git a/opencascade/Aspect_GridDrawMode.hxx b/opencascade/Aspect_GridDrawMode.hxx index b04ef7463..7d369306a 100644 --- a/opencascade/Aspect_GridDrawMode.hxx +++ b/opencascade/Aspect_GridDrawMode.hxx @@ -20,9 +20,9 @@ //! by using lines or points. enum Aspect_GridDrawMode { -Aspect_GDM_Lines, -Aspect_GDM_Points, -Aspect_GDM_None + Aspect_GDM_Lines, + Aspect_GDM_Points, + Aspect_GDM_None }; #endif // _Aspect_GridDrawMode_HeaderFile diff --git a/opencascade/Aspect_GridType.hxx b/opencascade/Aspect_GridType.hxx index 33a9cc95b..c53408e5b 100644 --- a/opencascade/Aspect_GridType.hxx +++ b/opencascade/Aspect_GridType.hxx @@ -19,8 +19,8 @@ //! Defines the grid type : Rectangular or Circular. enum Aspect_GridType { -Aspect_GT_Rectangular, -Aspect_GT_Circular + Aspect_GT_Rectangular, + Aspect_GT_Circular }; #endif // _Aspect_GridType_HeaderFile diff --git a/opencascade/Aspect_Handle.hxx b/opencascade/Aspect_Handle.hxx index 02d5d3bf2..099783b31 100644 --- a/opencascade/Aspect_Handle.hxx +++ b/opencascade/Aspect_Handle.hxx @@ -22,10 +22,10 @@ #define _Aspect_Handle_HeaderFile #ifdef _WIN32 - typedef void* HANDLE; - typedef HANDLE Aspect_Handle; +typedef void* HANDLE; +typedef HANDLE Aspect_Handle; #else - typedef unsigned long Aspect_Handle; +typedef unsigned long Aspect_Handle; #endif /* _WIN32 */ #endif /* _Aspect_Handle_HeaderFile */ diff --git a/opencascade/Aspect_IdentDefinitionError.hxx b/opencascade/Aspect_IdentDefinitionError.hxx index cd0d9ba64..1e37aede2 100644 --- a/opencascade/Aspect_IdentDefinitionError.hxx +++ b/opencascade/Aspect_IdentDefinitionError.hxx @@ -25,8 +25,9 @@ class Aspect_IdentDefinitionError; DEFINE_STANDARD_HANDLE(Aspect_IdentDefinitionError, Standard_OutOfRange) #if !defined No_Exception && !defined No_Aspect_IdentDefinitionError - #define Aspect_IdentDefinitionError_Raise_if(CONDITION, MESSAGE) \ - if (CONDITION) throw Aspect_IdentDefinitionError(MESSAGE); + #define Aspect_IdentDefinitionError_Raise_if(CONDITION, MESSAGE) \ + if (CONDITION) \ + throw Aspect_IdentDefinitionError(MESSAGE); #else #define Aspect_IdentDefinitionError_Raise_if(CONDITION, MESSAGE) #endif diff --git a/opencascade/Aspect_InteriorStyle.hxx b/opencascade/Aspect_InteriorStyle.hxx index 4f5a68e20..bd6018e66 100644 --- a/opencascade/Aspect_InteriorStyle.hxx +++ b/opencascade/Aspect_InteriorStyle.hxx @@ -20,7 +20,7 @@ enum Aspect_InteriorStyle { Aspect_IS_EMPTY = -1, //!< no interior - Aspect_IS_SOLID = 0, //!< normally filled surface interior + Aspect_IS_SOLID = 0, //!< normally filled surface interior Aspect_IS_HATCH, //!< hatched surface interior Aspect_IS_HIDDENLINE, //!< interior is filled with viewer background color Aspect_IS_POINT, //!< display only vertices of surface (obsolete) diff --git a/opencascade/Aspect_NeutralWindow.hxx b/opencascade/Aspect_NeutralWindow.hxx index 9dc568e20..b01d5a3c7 100644 --- a/opencascade/Aspect_NeutralWindow.hxx +++ b/opencascade/Aspect_NeutralWindow.hxx @@ -17,15 +17,14 @@ #include //! Defines a platform-neutral window. -//! This class is intended to be used in context when window management (including OpenGL context creation) -//! is performed on application side (e.g. using external framework). +//! This class is intended to be used in context when window management (including OpenGL context +//! creation) is performed on application side (e.g. using external framework). //! //! Window properties should be managed by application and assigned to this class as properties. class Aspect_NeutralWindow : public Aspect_Window { DEFINE_STANDARD_RTTIEXT(Aspect_NeutralWindow, Aspect_Window) public: - //! Empty constructor. //! Note that window is considered "mapped" by default. Standard_EXPORT Aspect_NeutralWindow(); @@ -41,19 +40,22 @@ public: //! Set native handle. //! @return true if definition has been changed - Standard_Boolean SetNativeHandle (Aspect_Drawable theWindow) { return SetNativeHandles (theWindow, 0, 0); } + Standard_Boolean SetNativeHandle(Aspect_Drawable theWindow) + { + return SetNativeHandles(theWindow, 0, 0); + } //! Set native handles. //! @return true if definition has been changed - Standard_EXPORT Standard_Boolean SetNativeHandles (Aspect_Drawable theWindow, - Aspect_Drawable theParentWindow, - Aspect_FBConfig theFbConfig); + Standard_EXPORT Standard_Boolean SetNativeHandles(Aspect_Drawable theWindow, + Aspect_Drawable theParentWindow, + Aspect_FBConfig theFbConfig); //! Return true if window is not hidden. virtual Standard_Boolean IsMapped() const Standard_OVERRIDE { return myIsMapped; } //! Change window mapped flag to TRUE. - virtual void Map() const Standard_OVERRIDE { myIsMapped = Standard_True; } + virtual void Map() const Standard_OVERRIDE { myIsMapped = Standard_True; } //! Change window mapped flag to FALSE. virtual void Unmap() const Standard_OVERRIDE { myIsMapped = Standard_False; } @@ -67,14 +69,14 @@ public: //! Returns window ratio equal to the physical width/height dimensions. virtual Standard_Real Ratio() const Standard_OVERRIDE { - return (myWidth != 0 && myHeight != 0) - ? Standard_Real(myWidth) / Standard_Real(myHeight) - : 1.0; + return (myWidth != 0 && myHeight != 0) ? Standard_Real(myWidth) / Standard_Real(myHeight) : 1.0; } //! Return the window position. - virtual void Position (Standard_Integer& theX1, Standard_Integer& theY1, - Standard_Integer& theX2, Standard_Integer& theY2) const Standard_OVERRIDE + virtual void Position(Standard_Integer& theX1, + Standard_Integer& theY1, + Standard_Integer& theX2, + Standard_Integer& theY2) const Standard_OVERRIDE { theX1 = myPosX; theX2 = myPosX + myWidth; @@ -84,17 +86,17 @@ public: //! Set the window position. //! @return true if position has been changed - Standard_EXPORT Standard_Boolean SetPosition (Standard_Integer theX1, - Standard_Integer theY1); + Standard_EXPORT Standard_Boolean SetPosition(Standard_Integer theX1, Standard_Integer theY1); //! Set the window position. //! @return true if position has been changed - Standard_EXPORT Standard_Boolean SetPosition (Standard_Integer theX1, Standard_Integer theY1, - Standard_Integer theX2, Standard_Integer theY2); + Standard_EXPORT Standard_Boolean SetPosition(Standard_Integer theX1, + Standard_Integer theY1, + Standard_Integer theX2, + Standard_Integer theY2); //! Return the window size. - virtual void Size (Standard_Integer& theWidth, - Standard_Integer& theHeight) const Standard_OVERRIDE + virtual void Size(Standard_Integer& theWidth, Standard_Integer& theHeight) const Standard_OVERRIDE { theWidth = myWidth; theHeight = myHeight; @@ -102,20 +104,18 @@ public: //! Set the window size. //! @return true if size has been changed - Standard_EXPORT Standard_Boolean SetSize (const Standard_Integer theWidth, - const Standard_Integer theHeight); + Standard_EXPORT Standard_Boolean SetSize(const Standard_Integer theWidth, + const Standard_Integer theHeight); protected: - - Aspect_Drawable myHandle; - Aspect_Drawable myParentHandle; - Aspect_FBConfig myFBConfig; - Standard_Integer myPosX; - Standard_Integer myPosY; - Standard_Integer myWidth; - Standard_Integer myHeight; + Aspect_Drawable myHandle; + Aspect_Drawable myParentHandle; + Aspect_FBConfig myFBConfig; + Standard_Integer myPosX; + Standard_Integer myPosY; + Standard_Integer myWidth; + Standard_Integer myHeight; mutable Standard_Boolean myIsMapped; - }; DEFINE_STANDARD_HANDLE(Aspect_NeutralWindow, Aspect_Window) diff --git a/opencascade/Aspect_OpenVRSession.hxx b/opencascade/Aspect_OpenVRSession.hxx index d4280d0cb..96242315c 100644 --- a/opencascade/Aspect_OpenVRSession.hxx +++ b/opencascade/Aspect_OpenVRSession.hxx @@ -21,13 +21,11 @@ class Aspect_OpenVRSession : public Aspect_XRSession { DEFINE_STANDARD_RTTIEXT(Aspect_OpenVRSession, Aspect_XRSession) public: - - //! Return TRUE if an HMD may be presented on the system (e.g. to show VR checkbox in application GUI). - //! This is fast check, and even if it returns TRUE, opening session may fail. + //! Return TRUE if an HMD may be presented on the system (e.g. to show VR checkbox in application + //! GUI). This is fast check, and even if it returns TRUE, opening session may fail. Standard_EXPORT static bool IsHmdPresent(); public: - //! Empty constructor. Standard_EXPORT Aspect_OpenVRSession(); @@ -51,12 +49,14 @@ public: //! Return transformation from eye to head. //! vr::GetEyeToHeadTransform() wrapper. - Standard_EXPORT virtual NCollection_Mat4 EyeToHeadTransform (Aspect_Eye theEye) const Standard_OVERRIDE; + Standard_EXPORT virtual NCollection_Mat4 EyeToHeadTransform(Aspect_Eye theEye) const + Standard_OVERRIDE; //! Return projection matrix. - Standard_EXPORT virtual NCollection_Mat4 ProjectionMatrix (Aspect_Eye theEye, - double theZNear, - double theZFar) const Standard_OVERRIDE; + Standard_EXPORT virtual NCollection_Mat4 ProjectionMatrix(Aspect_Eye theEye, + double theZNear, + double theZFar) const + Standard_OVERRIDE; //! Return TRUE. virtual bool HasProjectionFrustums() const Standard_OVERRIDE { return true; } @@ -65,39 +65,45 @@ public: Standard_EXPORT virtual void ProcessEvents() Standard_OVERRIDE; //! Submit texture eye to XR Composer. - //! @param theTexture [in] texture handle - //! @param theGraphicsLib [in] graphics library in which texture handle is defined - //! @param theColorSpace [in] texture color space; + //! @param[in] theTexture texture handle + //! @param[in] theGraphicsLib graphics library in which texture handle is defined + //! @param[in] theColorSpace texture color space; //! sRGB means no color conversion by composer; //! Linear means to sRGB color conversion by composer - //! @param theEye [in] eye to display + //! @param[in] theEye eye to display //! @return FALSE on error - Standard_EXPORT virtual bool SubmitEye (void* theTexture, - Aspect_GraphicsLibrary theGraphicsLib, - Aspect_ColorSpace theColorSpace, - Aspect_Eye theEye) Standard_OVERRIDE; + Standard_EXPORT virtual bool SubmitEye(void* theTexture, + Aspect_GraphicsLibrary theGraphicsLib, + Aspect_ColorSpace theColorSpace, + Aspect_Eye theEye) Standard_OVERRIDE; //! Query information. - Standard_EXPORT virtual TCollection_AsciiString GetString (InfoString theInfo) const Standard_OVERRIDE; + Standard_EXPORT virtual TCollection_AsciiString GetString(InfoString theInfo) const + Standard_OVERRIDE; //! Return index of tracked device of known role. - Standard_EXPORT virtual Standard_Integer NamedTrackedDevice (Aspect_XRTrackedDeviceRole theDevice) const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Integer NamedTrackedDevice( + Aspect_XRTrackedDeviceRole theDevice) const Standard_OVERRIDE; //! Fetch data for digital input action (like button). - Standard_EXPORT virtual Aspect_XRDigitalActionData GetDigitalActionData (const Handle(Aspect_XRAction)& theAction) const Standard_OVERRIDE; + Standard_EXPORT virtual Aspect_XRDigitalActionData GetDigitalActionData( + const Handle(Aspect_XRAction)& theAction) const Standard_OVERRIDE; //! Fetch data for analog input action (like axis). - Standard_EXPORT virtual Aspect_XRAnalogActionData GetAnalogActionData (const Handle(Aspect_XRAction)& theAction) const Standard_OVERRIDE; + Standard_EXPORT virtual Aspect_XRAnalogActionData GetAnalogActionData( + const Handle(Aspect_XRAction)& theAction) const Standard_OVERRIDE; //! Fetch data for pose input action (like fingertip position). - Standard_EXPORT virtual Aspect_XRPoseActionData GetPoseActionDataForNextFrame (const Handle(Aspect_XRAction)& theAction) const Standard_OVERRIDE; + Standard_EXPORT virtual Aspect_XRPoseActionData GetPoseActionDataForNextFrame( + const Handle(Aspect_XRAction)& theAction) const Standard_OVERRIDE; //! Set tracking origin. - Standard_EXPORT virtual void SetTrackingOrigin (TrackingUniverseOrigin theOrigin) Standard_OVERRIDE; + Standard_EXPORT virtual void SetTrackingOrigin(TrackingUniverseOrigin theOrigin) + Standard_OVERRIDE; protected: - - //! Find location of default actions manifest file (based on CSF_OCCTResourcePath or CASROOT variables). + //! Find location of default actions manifest file (based on CSF_OCCTResourcePath or CASROOT + //! variables). Standard_EXPORT TCollection_AsciiString defaultActionsManifest(); //! Release OpenVR device. @@ -110,40 +116,38 @@ protected: Standard_EXPORT virtual bool initInput(); //! Handle tracked device activation. - Standard_EXPORT virtual void onTrackedDeviceActivated (Standard_Integer theDeviceIndex); + Standard_EXPORT virtual void onTrackedDeviceActivated(Standard_Integer theDeviceIndex); //! Handle tracked device deactivation. - Standard_EXPORT virtual void onTrackedDeviceDeactivated (Standard_Integer theDeviceIndex); + Standard_EXPORT virtual void onTrackedDeviceDeactivated(Standard_Integer theDeviceIndex); //! Handle tracked device update. - Standard_EXPORT virtual void onTrackedDeviceUpdated (Standard_Integer theDeviceIndex); + Standard_EXPORT virtual void onTrackedDeviceUpdated(Standard_Integer theDeviceIndex); //! Trigger vibration. - Standard_EXPORT virtual void triggerHapticVibrationAction (const Handle(Aspect_XRAction)& theAction, - const Aspect_XRHapticActionData& theParams) Standard_OVERRIDE; + Standard_EXPORT virtual void triggerHapticVibrationAction( + const Handle(Aspect_XRAction)& theAction, + const Aspect_XRHapticActionData& theParams) Standard_OVERRIDE; //! Return model for displaying device. - Standard_EXPORT virtual Handle(Graphic3d_ArrayOfTriangles) loadRenderModel (Standard_Integer theDevice, - Standard_Boolean theToApplyUnitFactor, - Handle(Image_Texture)& theTexture) Standard_OVERRIDE; + Standard_EXPORT virtual Handle(Graphic3d_ArrayOfTriangles) loadRenderModel( + Standard_Integer theDevice, + Standard_Boolean theToApplyUnitFactor, + Handle(Image_Texture)& theTexture) Standard_OVERRIDE; protected: - //! Access vr::IVRSystem* - OpenVR session object. Standard_EXPORT void* getVRSystem() const; private: - //! Internal fields struct VRContext; class VRImagePixmap; class VRTextureSource; protected: - - VRContext* myContext; + VRContext* myContext; TCollection_AsciiString myActionsManifest; - }; #endif // _Aspect_OpenVRSession_HeaderFile diff --git a/opencascade/Aspect_PolygonOffsetMode.hxx b/opencascade/Aspect_PolygonOffsetMode.hxx index e9647c2f6..526654d18 100644 --- a/opencascade/Aspect_PolygonOffsetMode.hxx +++ b/opencascade/Aspect_PolygonOffsetMode.hxx @@ -18,16 +18,15 @@ // Enumeration for polygon offset modes -typedef enum +typedef enum { - Aspect_POM_Off = 0x00, /* all polygon offset modes disabled */ - Aspect_POM_Fill = 0x01, /* GL_POLYGON_OFFSET_FILL enabled (shaded polygons) */ - Aspect_POM_Line = 0x02, /* GL_POLYGON_OFFSET_LINE enabled (polygons as outlines) */ - Aspect_POM_Point = 0x04, /* GL_POLYGON_OFFSET_POINT enabled (polygons as vertices)*/ + Aspect_POM_Off = 0x00, /* all polygon offset modes disabled */ + Aspect_POM_Fill = 0x01, /* GL_POLYGON_OFFSET_FILL enabled (shaded polygons) */ + Aspect_POM_Line = 0x02, /* GL_POLYGON_OFFSET_LINE enabled (polygons as outlines) */ + Aspect_POM_Point = 0x04, /* GL_POLYGON_OFFSET_POINT enabled (polygons as vertices)*/ Aspect_POM_All = Aspect_POM_Fill | Aspect_POM_Line | Aspect_POM_Point, - Aspect_POM_None = 0x08, /* do not change current polygon offset mode */ - Aspect_POM_Mask = Aspect_POM_All | Aspect_POM_None + Aspect_POM_None = 0x08, /* do not change current polygon offset mode */ + Aspect_POM_Mask = Aspect_POM_All | Aspect_POM_None } Aspect_PolygonOffsetMode; #endif - diff --git a/opencascade/Aspect_RectangularGrid.hxx b/opencascade/Aspect_RectangularGrid.hxx index 870b1368a..9cb034aca 100644 --- a/opencascade/Aspect_RectangularGrid.hxx +++ b/opencascade/Aspect_RectangularGrid.hxx @@ -25,52 +25,64 @@ class Aspect_RectangularGrid : public Aspect_Grid { DEFINE_STANDARD_RTTIEXT(Aspect_RectangularGrid, Aspect_Grid) public: - //! creates a new grid. By default this grid is not //! active. //! The first angle is given relatively to the horizontal. //! The second angle is given relatively to the vertical. - Standard_EXPORT Aspect_RectangularGrid(const Standard_Real aXStep, const Standard_Real aYStep, const Standard_Real anXOrigin = 0, const Standard_Real anYOrigin = 0, const Standard_Real aFirstAngle = 0, const Standard_Real aSecondAngle = 0, const Standard_Real aRotationAngle = 0); - + Standard_EXPORT Aspect_RectangularGrid(const Standard_Real aXStep, + const Standard_Real aYStep, + const Standard_Real anXOrigin = 0, + const Standard_Real anYOrigin = 0, + const Standard_Real aFirstAngle = 0, + const Standard_Real aSecondAngle = 0, + const Standard_Real aRotationAngle = 0); + //! defines the x step of the grid. - Standard_EXPORT void SetXStep (const Standard_Real aStep); - + Standard_EXPORT void SetXStep(const Standard_Real aStep); + //! defines the y step of the grid. - Standard_EXPORT void SetYStep (const Standard_Real aStep); - + Standard_EXPORT void SetYStep(const Standard_Real aStep); + //! defines the angle of the second network //! the fist angle is given relatively to the horizontal. //! the second angle is given relatively to the vertical. - Standard_EXPORT void SetAngle (const Standard_Real anAngle1, const Standard_Real anAngle2); - - Standard_EXPORT void SetGridValues (const Standard_Real XOrigin, const Standard_Real YOrigin, const Standard_Real XStep, const Standard_Real YStep, const Standard_Real RotationAngle); - + Standard_EXPORT void SetAngle(const Standard_Real anAngle1, const Standard_Real anAngle2); + + Standard_EXPORT void SetGridValues(const Standard_Real XOrigin, + const Standard_Real YOrigin, + const Standard_Real XStep, + const Standard_Real YStep, + const Standard_Real RotationAngle); + //! returns the point of the grid the closest to the point X,Y - Standard_EXPORT virtual void Compute (const Standard_Real X, const Standard_Real Y, Standard_Real& gridX, Standard_Real& gridY) const Standard_OVERRIDE; - + Standard_EXPORT virtual void Compute(const Standard_Real X, + const Standard_Real Y, + Standard_Real& gridX, + Standard_Real& gridY) const Standard_OVERRIDE; + //! returns the x step of the grid. Standard_EXPORT Standard_Real XStep() const; - + //! returns the x step of the grid. Standard_EXPORT Standard_Real YStep() const; - + //! returns the x Angle of the grid, relatively to the horizontal. Standard_EXPORT Standard_Real FirstAngle() const; - + //! returns the y Angle of the grid, relatively to the vertical. Standard_EXPORT Standard_Real SecondAngle() const; - + Standard_EXPORT virtual void Init() Standard_OVERRIDE; - + //! Dumps the content of me into the stream - Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE; + Standard_EXPORT virtual void DumpJson(Standard_OStream& theOStream, + Standard_Integer theDepth = -1) const Standard_OVERRIDE; private: - - Standard_EXPORT Standard_Boolean CheckAngle (const Standard_Real alpha, const Standard_Real beta) const; + Standard_EXPORT Standard_Boolean CheckAngle(const Standard_Real alpha, + const Standard_Real beta) const; private: - Standard_Real myXStep; Standard_Real myYStep; Standard_Real myFirstAngle; @@ -81,7 +93,6 @@ private: Standard_Real a2; Standard_Real b2; Standard_Real c2; - }; DEFINE_STANDARD_HANDLE(Aspect_RectangularGrid, Aspect_Grid) diff --git a/opencascade/Aspect_RenderingContext.hxx b/opencascade/Aspect_RenderingContext.hxx index 7e4633878..5fa1661b9 100644 --- a/opencascade/Aspect_RenderingContext.hxx +++ b/opencascade/Aspect_RenderingContext.hxx @@ -28,23 +28,22 @@ #import #if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE #ifdef __OBJC__ - @class EAGLContext; +@class EAGLContext; #else - struct EAGLContext; +struct EAGLContext; #endif - typedef EAGLContext* Aspect_RenderingContext; +typedef EAGLContext* Aspect_RenderingContext; #else #ifdef __OBJC__ - @class NSOpenGLContext; +@class NSOpenGLContext; #else - struct NSOpenGLContext; +struct NSOpenGLContext; #endif - Standard_DISABLE_DEPRECATION_WARNINGS - typedef NSOpenGLContext* Aspect_RenderingContext; - Standard_ENABLE_DEPRECATION_WARNINGS +Standard_DISABLE_DEPRECATION_WARNINGS typedef NSOpenGLContext* Aspect_RenderingContext; +Standard_ENABLE_DEPRECATION_WARNINGS #endif #else - typedef void* Aspect_RenderingContext; // GLXContext under UNIX +typedef void* Aspect_RenderingContext; // GLXContext under UNIX #endif #endif /* _Aspect_RenderingContext_HeaderFile */ diff --git a/opencascade/Aspect_ScrollDelta.hxx b/opencascade/Aspect_ScrollDelta.hxx index cce447223..374dd846f 100644 --- a/opencascade/Aspect_ScrollDelta.hxx +++ b/opencascade/Aspect_ScrollDelta.hxx @@ -26,33 +26,36 @@ struct Aspect_ScrollDelta Aspect_VKeyFlags Flags; //!< key flags //! Return true if action has point defined. - bool HasPoint() const - { - return Point.x() >= 0 - && Point.y() >= 0; - } + bool HasPoint() const { return Point.x() >= 0 && Point.y() >= 0; } //! Reset at point. - void ResetPoint() - { - Point.SetValues (-1, -1); - } + void ResetPoint() { Point.SetValues(-1, -1); } //! Empty constructor. Aspect_ScrollDelta() - : Point (-1, -1), Delta (0.0), Flags (Aspect_VKeyFlags_NONE) {} + : Point(-1, -1), + Delta(0.0), + Flags(Aspect_VKeyFlags_NONE) + { + } //! Constructor. - Aspect_ScrollDelta (const NCollection_Vec2& thePnt, - Standard_Real theValue, - Aspect_VKeyFlags theFlags = Aspect_VKeyFlags_NONE) - : Point (thePnt), Delta (theValue), Flags (theFlags) {} + Aspect_ScrollDelta(const NCollection_Vec2& thePnt, + Standard_Real theValue, + Aspect_VKeyFlags theFlags = Aspect_VKeyFlags_NONE) + : Point(thePnt), + Delta(theValue), + Flags(theFlags) + { + } //! Constructor with undefined point. - Aspect_ScrollDelta (Standard_Real theValue, - Aspect_VKeyFlags theFlags = Aspect_VKeyFlags_NONE) - : Point (-1, -1), Delta (theValue), Flags (theFlags) {} - + Aspect_ScrollDelta(Standard_Real theValue, Aspect_VKeyFlags theFlags = Aspect_VKeyFlags_NONE) + : Point(-1, -1), + Delta(theValue), + Flags(theFlags) + { + } }; #endif // _Aspect_ScrollDelta_HeaderFile diff --git a/opencascade/Aspect_SequenceOfColor.hxx b/opencascade/Aspect_SequenceOfColor.hxx index 96f91d034..2e82600ef 100644 --- a/opencascade/Aspect_SequenceOfColor.hxx +++ b/opencascade/Aspect_SequenceOfColor.hxx @@ -21,5 +21,4 @@ typedef NCollection_Sequence Aspect_SequenceOfColor; - #endif diff --git a/opencascade/Aspect_SkydomeBackground.hxx b/opencascade/Aspect_SkydomeBackground.hxx index 52eff71c1..43b6fb5e7 100644 --- a/opencascade/Aspect_SkydomeBackground.hxx +++ b/opencascade/Aspect_SkydomeBackground.hxx @@ -26,7 +26,6 @@ class Aspect_SkydomeBackground { public: - DEFINE_STANDARD_ALLOC //! Creates a window skydome background. @@ -35,17 +34,19 @@ public: Standard_EXPORT Aspect_SkydomeBackground(); //! Creates a window skydome background with given parameters. - //! @param[in] theSunDirection direction to the sun (moon). Sun direction with negative Y component + //! @param[in] theSunDirection direction to the sun (moon). Sun direction with negative Y + //! component //! represents moon with (-X, -Y, -Z) direction. //! @param[in] theCloudiness cloud intensity, 0.0 means no clouds at all and 1.0 - high clody. - //! @param[in] theTime time parameter of simulation. Might be tweaked to slightly change appearance. + //! @param[in] theTime time parameter of simulation. Might be tweaked to slightly change + //! appearance. //! @param[in] theFogginess fog intensity, 0.0 means no fog and 1.0 - high fogginess //! @param[in] theSize size of cubemap side in pixels. - Standard_EXPORT Aspect_SkydomeBackground (const gp_Dir& theSunDirection, - Standard_ShortReal theCloudiness, - Standard_ShortReal theTime, - Standard_ShortReal theFogginess, - Standard_Integer theSize); + Standard_EXPORT Aspect_SkydomeBackground(const gp_Dir& theSunDirection, + Standard_ShortReal theCloudiness, + Standard_ShortReal theTime, + Standard_ShortReal theFogginess, + Standard_Integer theSize); //! Destructor. Standard_EXPORT ~Aspect_SkydomeBackground(); @@ -56,7 +57,7 @@ public: //! Get cloud intensity. By default this value is 0.2 //! 0.0 means no clouds at all and 1.0 - high clody. - Standard_ShortReal Cloudiness() const { return myCloudiness; } + Standard_ShortReal Cloudiness() const { return myCloudiness; } //! Get time of cloud simulation. By default this value is 0.0 //! This value might be tweaked to slightly change appearance of clouds. @@ -71,34 +72,32 @@ public: //! Set sun direction. By default this value is (0, 1, 0) //! Sun direction with negative Y component represents moon with (-X, -Y, -Z) direction. - void SetSunDirection (const gp_Dir& theSunDirection) { mySunDirection = theSunDirection; } + void SetSunDirection(const gp_Dir& theSunDirection) { mySunDirection = theSunDirection; } //! Set cloud intensity. By default this value is 0.2 //! 0.0 means no clouds at all and 1.0 - high clody. - Standard_EXPORT void SetCloudiness (Standard_ShortReal theCloudiness); + Standard_EXPORT void SetCloudiness(Standard_ShortReal theCloudiness); //! Set time of cloud simulation. By default this value is 0.0 //! This value might be tweaked to slightly change appearance of clouds. - void SetTimeParameter (Standard_ShortReal theTime) { myTime = theTime; } + void SetTimeParameter(Standard_ShortReal theTime) { myTime = theTime; } //! Set fog intensity. By default this value is 0.0 //! 0.0 means no fog and 1.0 - high fogginess - Standard_EXPORT void SetFogginess (Standard_ShortReal theFogginess); + Standard_EXPORT void SetFogginess(Standard_ShortReal theFogginess); //! Set size of cubemap. By default this value is 512 - Standard_EXPORT void SetSize (Standard_Integer theSize); + Standard_EXPORT void SetSize(Standard_Integer theSize); //! Dumps the content of me into the stream - Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const; + Standard_EXPORT void DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth = -1) const; private: - - gp_Dir mySunDirection; //!< Sun (moon) light direction. - Standard_ShortReal myCloudiness; //!< Cloud intensity. - Standard_ShortReal myTime; //!< Simulation time parameter. - Standard_ShortReal myFogginess; //!< Fog intensity - Standard_Integer mySize; //!< Size of cubemap in pixels - + gp_Dir mySunDirection; //!< Sun (moon) light direction. + Standard_ShortReal myCloudiness; //!< Cloud intensity. + Standard_ShortReal myTime; //!< Simulation time parameter. + Standard_ShortReal myFogginess; //!< Fog intensity + Standard_Integer mySize; //!< Size of cubemap in pixels }; #endif // _Aspect_SkydomeBackground_Header diff --git a/opencascade/Aspect_Touch.hxx b/opencascade/Aspect_Touch.hxx index d2d6e9f27..2d7955d28 100644 --- a/opencascade/Aspect_Touch.hxx +++ b/opencascade/Aspect_Touch.hxx @@ -20,28 +20,38 @@ class Aspect_Touch { public: - - NCollection_Vec2 From; //!< original touch position - NCollection_Vec2 To; //!< current touch position + NCollection_Vec2 From; //!< original touch position + NCollection_Vec2 To; //!< current touch position + // clang-format off Standard_Boolean IsPreciseDevice; //!< precise device input (e.g. mouse cursor, NOT emulated from touch screen) + // clang-format on //! Return values delta. NCollection_Vec2 Delta() const { return To - From; } //! Empty constructor Aspect_Touch() - : From (0.0, 0.0), To (0.0, 0.0), IsPreciseDevice (false) {} + : From(0.0, 0.0), + To(0.0, 0.0), + IsPreciseDevice(false) + { + } //! Constructor with initialization. - Aspect_Touch (const NCollection_Vec2& thePnt, - Standard_Boolean theIsPreciseDevice) - : From (thePnt), To (thePnt), IsPreciseDevice (theIsPreciseDevice) {} + Aspect_Touch(const NCollection_Vec2& thePnt, Standard_Boolean theIsPreciseDevice) + : From(thePnt), + To(thePnt), + IsPreciseDevice(theIsPreciseDevice) + { + } //! Constructor with initialization. - Aspect_Touch (Standard_Real theX, Standard_Real theY, - Standard_Boolean theIsPreciseDevice) - : From (theX, theY), To (theX, theY), IsPreciseDevice (theIsPreciseDevice) {} - + Aspect_Touch(Standard_Real theX, Standard_Real theY, Standard_Boolean theIsPreciseDevice) + : From(theX, theY), + To(theX, theY), + IsPreciseDevice(theIsPreciseDevice) + { + } }; #endif // _Aspect_Touch_HeaderFile diff --git a/opencascade/Aspect_TrackedDevicePose.hxx b/opencascade/Aspect_TrackedDevicePose.hxx index 437f95c1c..83a6598c0 100644 --- a/opencascade/Aspect_TrackedDevicePose.hxx +++ b/opencascade/Aspect_TrackedDevicePose.hxx @@ -27,7 +27,11 @@ struct Aspect_TrackedDevicePose bool IsConnectedDevice; //!< indicates connected state //! Empty constructor. - Aspect_TrackedDevicePose() : IsValidPose (false), IsConnectedDevice (false) {} + Aspect_TrackedDevicePose() + : IsValidPose(false), + IsConnectedDevice(false) + { + } }; //! Array of tracked poses. diff --git a/opencascade/Aspect_TypeOfColorScaleData.hxx b/opencascade/Aspect_TypeOfColorScaleData.hxx index 319f645fa..581f66826 100644 --- a/opencascade/Aspect_TypeOfColorScaleData.hxx +++ b/opencascade/Aspect_TypeOfColorScaleData.hxx @@ -19,8 +19,8 @@ //! Defines the using type of colors and labels enum Aspect_TypeOfColorScaleData { -Aspect_TOCSD_AUTO, -Aspect_TOCSD_USER + Aspect_TOCSD_AUTO, + Aspect_TOCSD_USER }; #endif // _Aspect_TypeOfColorScaleData_HeaderFile diff --git a/opencascade/Aspect_TypeOfColorScaleOrientation.hxx b/opencascade/Aspect_TypeOfColorScaleOrientation.hxx index 32c9c3342..133fbd45d 100644 --- a/opencascade/Aspect_TypeOfColorScaleOrientation.hxx +++ b/opencascade/Aspect_TypeOfColorScaleOrientation.hxx @@ -19,10 +19,10 @@ //! Defines the type of color scale orientation enum Aspect_TypeOfColorScaleOrientation { -Aspect_TOCSO_NONE, -Aspect_TOCSO_LEFT, -Aspect_TOCSO_RIGHT, -Aspect_TOCSO_CENTER + Aspect_TOCSO_NONE, + Aspect_TOCSO_LEFT, + Aspect_TOCSO_RIGHT, + Aspect_TOCSO_CENTER }; #endif // _Aspect_TypeOfColorScaleOrientation_HeaderFile diff --git a/opencascade/Aspect_TypeOfColorScalePosition.hxx b/opencascade/Aspect_TypeOfColorScalePosition.hxx index a74c8a77a..73ee96253 100644 --- a/opencascade/Aspect_TypeOfColorScalePosition.hxx +++ b/opencascade/Aspect_TypeOfColorScalePosition.hxx @@ -19,10 +19,10 @@ //! Defines the type of position for color scale labels enum Aspect_TypeOfColorScalePosition { -Aspect_TOCSP_NONE, -Aspect_TOCSP_LEFT, -Aspect_TOCSP_RIGHT, -Aspect_TOCSP_CENTER + Aspect_TOCSP_NONE, + Aspect_TOCSP_LEFT, + Aspect_TOCSP_RIGHT, + Aspect_TOCSP_CENTER }; #endif // _Aspect_TypeOfColorScalePosition_HeaderFile diff --git a/opencascade/Aspect_TypeOfDeflection.hxx b/opencascade/Aspect_TypeOfDeflection.hxx index 064ce365a..1a4edd0c4 100644 --- a/opencascade/Aspect_TypeOfDeflection.hxx +++ b/opencascade/Aspect_TypeOfDeflection.hxx @@ -21,8 +21,8 @@ //! of the object. enum Aspect_TypeOfDeflection { -Aspect_TOD_RELATIVE, -Aspect_TOD_ABSOLUTE + Aspect_TOD_RELATIVE, + Aspect_TOD_ABSOLUTE }; #endif // _Aspect_TypeOfDeflection_HeaderFile diff --git a/opencascade/Aspect_TypeOfFacingModel.hxx b/opencascade/Aspect_TypeOfFacingModel.hxx index 9701a9038..17a5cab4b 100644 --- a/opencascade/Aspect_TypeOfFacingModel.hxx +++ b/opencascade/Aspect_TypeOfFacingModel.hxx @@ -16,12 +16,11 @@ #ifndef _Aspect_TypeOfFacingModel_HeaderFile #define _Aspect_TypeOfFacingModel_HeaderFile - enum Aspect_TypeOfFacingModel { -Aspect_TOFM_BOTH_SIDE, -Aspect_TOFM_BACK_SIDE, -Aspect_TOFM_FRONT_SIDE + Aspect_TOFM_BOTH_SIDE, + Aspect_TOFM_BACK_SIDE, + Aspect_TOFM_FRONT_SIDE }; #endif // _Aspect_TypeOfFacingModel_HeaderFile diff --git a/opencascade/Aspect_TypeOfHighlightMethod.hxx b/opencascade/Aspect_TypeOfHighlightMethod.hxx index 0365a34c4..0402f9607 100644 --- a/opencascade/Aspect_TypeOfHighlightMethod.hxx +++ b/opencascade/Aspect_TypeOfHighlightMethod.hxx @@ -24,8 +24,8 @@ //! (default white) enum Aspect_TypeOfHighlightMethod { -Aspect_TOHM_COLOR, -Aspect_TOHM_BOUNDBOX + Aspect_TOHM_COLOR, + Aspect_TOHM_BOUNDBOX }; #endif // _Aspect_TypeOfHighlightMethod_HeaderFile diff --git a/opencascade/Aspect_TypeOfLine.hxx b/opencascade/Aspect_TypeOfLine.hxx index ff079b08f..2d06c6b77 100644 --- a/opencascade/Aspect_TypeOfLine.hxx +++ b/opencascade/Aspect_TypeOfLine.hxx @@ -20,7 +20,7 @@ enum Aspect_TypeOfLine { Aspect_TOL_EMPTY = -1, //!< hidden - Aspect_TOL_SOLID = 0, //!< continuous + Aspect_TOL_SOLID = 0, //!< continuous Aspect_TOL_DASH, //!< dashed 2.0,1.0 (MM) Aspect_TOL_DOT, //!< dotted 0.2,0.5 (MM) Aspect_TOL_DOTDASH, //!< mixed 10.0,1.0,2.0,1.0 (MM) diff --git a/opencascade/Aspect_TypeOfMarker.hxx b/opencascade/Aspect_TypeOfMarker.hxx index 06836fb72..e303a4619 100644 --- a/opencascade/Aspect_TypeOfMarker.hxx +++ b/opencascade/Aspect_TypeOfMarker.hxx @@ -19,21 +19,21 @@ //! Definition of types of markers enum Aspect_TypeOfMarker { - Aspect_TOM_EMPTY = -1, //!< hidden - Aspect_TOM_POINT = 0, //!< point . - Aspect_TOM_PLUS, //!< plus + - Aspect_TOM_STAR, //!< star * - Aspect_TOM_X, //!< cross x - Aspect_TOM_O, //!< circle O - Aspect_TOM_O_POINT, //!< a point in a circle - Aspect_TOM_O_PLUS, //!< a plus in a circle - Aspect_TOM_O_STAR, //!< a star in a circle - Aspect_TOM_O_X, //!< a cross in a circle - Aspect_TOM_RING1, //!< a large ring - Aspect_TOM_RING2, //!< a medium ring - Aspect_TOM_RING3, //!< a small ring - Aspect_TOM_BALL, //!< a ball with 1 color and different saturations - Aspect_TOM_USERDEFINED //!< defined by Users (custom image) + Aspect_TOM_EMPTY = -1, //!< hidden + Aspect_TOM_POINT = 0, //!< point . + Aspect_TOM_PLUS, //!< plus + + Aspect_TOM_STAR, //!< star * + Aspect_TOM_X, //!< cross x + Aspect_TOM_O, //!< circle O + Aspect_TOM_O_POINT, //!< a point in a circle + Aspect_TOM_O_PLUS, //!< a plus in a circle + Aspect_TOM_O_STAR, //!< a star in a circle + Aspect_TOM_O_X, //!< a cross in a circle + Aspect_TOM_RING1, //!< a large ring + Aspect_TOM_RING2, //!< a medium ring + Aspect_TOM_RING3, //!< a small ring + Aspect_TOM_BALL, //!< a ball with 1 color and different saturations + Aspect_TOM_USERDEFINED //!< defined by Users (custom image) }; #endif // _Aspect_TypeOfMarker_HeaderFile diff --git a/opencascade/Aspect_TypeOfResize.hxx b/opencascade/Aspect_TypeOfResize.hxx index 4792fbbc7..2416e1e58 100644 --- a/opencascade/Aspect_TypeOfResize.hxx +++ b/opencascade/Aspect_TypeOfResize.hxx @@ -20,16 +20,16 @@ //! by the user. enum Aspect_TypeOfResize { -Aspect_TOR_UNKNOWN, -Aspect_TOR_NO_BORDER, -Aspect_TOR_TOP_BORDER, -Aspect_TOR_RIGHT_BORDER, -Aspect_TOR_BOTTOM_BORDER, -Aspect_TOR_LEFT_BORDER, -Aspect_TOR_TOP_AND_RIGHT_BORDER, -Aspect_TOR_RIGHT_AND_BOTTOM_BORDER, -Aspect_TOR_BOTTOM_AND_LEFT_BORDER, -Aspect_TOR_LEFT_AND_TOP_BORDER + Aspect_TOR_UNKNOWN, + Aspect_TOR_NO_BORDER, + Aspect_TOR_TOP_BORDER, + Aspect_TOR_RIGHT_BORDER, + Aspect_TOR_BOTTOM_BORDER, + Aspect_TOR_LEFT_BORDER, + Aspect_TOR_TOP_AND_RIGHT_BORDER, + Aspect_TOR_RIGHT_AND_BOTTOM_BORDER, + Aspect_TOR_BOTTOM_AND_LEFT_BORDER, + Aspect_TOR_LEFT_AND_TOP_BORDER }; #endif // _Aspect_TypeOfResize_HeaderFile diff --git a/opencascade/Aspect_TypeOfStyleText.hxx b/opencascade/Aspect_TypeOfStyleText.hxx index 68623079a..f4901dd8e 100644 --- a/opencascade/Aspect_TypeOfStyleText.hxx +++ b/opencascade/Aspect_TypeOfStyleText.hxx @@ -25,8 +25,8 @@ //! over the other object according to the priority. enum Aspect_TypeOfStyleText { -Aspect_TOST_NORMAL, -Aspect_TOST_ANNOTATION + Aspect_TOST_NORMAL, + Aspect_TOST_ANNOTATION }; #endif // _Aspect_TypeOfStyleText_HeaderFile diff --git a/opencascade/Aspect_TypeOfTriedronPosition.hxx b/opencascade/Aspect_TypeOfTriedronPosition.hxx index 987e95e08..eb70e7e91 100644 --- a/opencascade/Aspect_TypeOfTriedronPosition.hxx +++ b/opencascade/Aspect_TypeOfTriedronPosition.hxx @@ -20,20 +20,15 @@ //! It is defined as a bitmask to simplify handling vertical and horizontal alignment independently. enum Aspect_TypeOfTriedronPosition { - Aspect_TOTP_CENTER = 0x0000, //!< at the center of the view - Aspect_TOTP_TOP = 0x0001, //!< at the middle of the top side - Aspect_TOTP_BOTTOM = 0x0002, //!< at the middle of the bottom side - Aspect_TOTP_LEFT = 0x0004, //!< at the middle of the left side - Aspect_TOTP_RIGHT = 0x0008, //!< at the middle of the right side - Aspect_TOTP_LEFT_LOWER = Aspect_TOTP_BOTTOM - | Aspect_TOTP_LEFT, //!< at the left lower corner - Aspect_TOTP_LEFT_UPPER = Aspect_TOTP_TOP - | Aspect_TOTP_LEFT, //!< at the left upper corner - Aspect_TOTP_RIGHT_LOWER = Aspect_TOTP_BOTTOM - | Aspect_TOTP_RIGHT, //!< at the right lower corner - Aspect_TOTP_RIGHT_UPPER = Aspect_TOTP_TOP - | Aspect_TOTP_RIGHT, //!< at the right upper corner - + Aspect_TOTP_CENTER = 0x0000, //!< at the center of the view + Aspect_TOTP_TOP = 0x0001, //!< at the middle of the top side + Aspect_TOTP_BOTTOM = 0x0002, //!< at the middle of the bottom side + Aspect_TOTP_LEFT = 0x0004, //!< at the middle of the left side + Aspect_TOTP_RIGHT = 0x0008, //!< at the middle of the right side + Aspect_TOTP_LEFT_LOWER = Aspect_TOTP_BOTTOM | Aspect_TOTP_LEFT, //!< at the left lower corner + Aspect_TOTP_LEFT_UPPER = Aspect_TOTP_TOP | Aspect_TOTP_LEFT, //!< at the left upper corner + Aspect_TOTP_RIGHT_LOWER = Aspect_TOTP_BOTTOM | Aspect_TOTP_RIGHT, //!< at the right lower corner + Aspect_TOTP_RIGHT_UPPER = Aspect_TOTP_TOP | Aspect_TOTP_RIGHT, //!< at the right upper corner }; #endif // _Aspect_TypeOfTriedronPosition_HeaderFile diff --git a/opencascade/Aspect_Units.hxx b/opencascade/Aspect_Units.hxx index dcfd44133..a767a2b7a 100644 --- a/opencascade/Aspect_Units.hxx +++ b/opencascade/Aspect_Units.hxx @@ -28,8 +28,8 @@ #define METER *1000. #define CENTIMETER *10. -#define TOCENTIMETER(v) (v)/10. -#define FROMCENTIMETER(v) (v)*10. +#define TOCENTIMETER(v) (v) / 10. +#define FROMCENTIMETER(v) (v) * 10. #define MILLIMETER *1. #define TOMILLIMETER(v) v #define FROMMILLIMETER(v) v diff --git a/opencascade/Aspect_VKey.hxx b/opencascade/Aspect_VKey.hxx index 4b55efa10..2e2dde653 100644 --- a/opencascade/Aspect_VKey.hxx +++ b/opencascade/Aspect_VKey.hxx @@ -19,7 +19,8 @@ //! Define virtual key as integer number to allow extensions. typedef unsigned int Aspect_VKey; -//! Enumeration defining virtual keys irrelevant to current keyboard layout for simplified hot-keys management logic. +//! Enumeration defining virtual keys irrelevant to current keyboard layout for simplified hot-keys +//! management logic. enum Aspect_VKeyBasic { Aspect_VKey_UNKNOWN = 0, @@ -81,9 +82,9 @@ enum Aspect_VKeyBasic Aspect_VKey_Down, Aspect_VKey_Left, Aspect_VKey_Right, - Aspect_VKey_Plus, //!< '+' - Aspect_VKey_Minus, //!< '-' - Aspect_VKey_Equal, //!< '=+' + Aspect_VKey_Plus, //!< '+' + Aspect_VKey_Minus, //!< '-' + Aspect_VKey_Equal, //!< '=+' Aspect_VKey_PageUp, Aspect_VKey_PageDown, Aspect_VKey_Home, @@ -160,53 +161,60 @@ enum Aspect_VKeyBasic Aspect_VKey_Menu, Aspect_VKey_Meta, - // virtual navigation keys, @sa Aspect_VKey_NavigationKeysLower and Aspect_VKey_NavigationKeysUpper below - Aspect_VKey_NavInteract, //!< interact - Aspect_VKey_NavForward, //!< go forward - Aspect_VKey_NavBackward, //!< go backward - Aspect_VKey_NavSlideLeft, //!< sidewalk, left - Aspect_VKey_NavSlideRight, //!< sidewalk, right - Aspect_VKey_NavSlideUp, //!< lift up - Aspect_VKey_NavSlideDown, //!< fall down - Aspect_VKey_NavRollCCW, //!< bank left (roll counter-clockwise) - Aspect_VKey_NavRollCW, //!< bank right (roll clockwise) - Aspect_VKey_NavLookLeft, //!< look left (yaw counter-clockwise) - Aspect_VKey_NavLookRight, //!< look right (yaw clockwise) - Aspect_VKey_NavLookUp, //!< look up (pitch clockwise) - Aspect_VKey_NavLookDown, //!< look down (pitch counter-clockwise) - Aspect_VKey_NavCrouch, //!< crouch walking - Aspect_VKey_NavJump, //!< jump - Aspect_VKey_NavThrustForward, //!< increase continuous velocity in forward direction - Aspect_VKey_NavThrustBackward, //!< increase continuous velocity in reversed direction - Aspect_VKey_NavThrustStop, //!< reset continuous velocity - Aspect_VKey_NavSpeedIncrease, //!< increase navigation speed - Aspect_VKey_NavSpeedDecrease, //!< decrease navigation speed + // virtual navigation keys, @sa Aspect_VKey_NavigationKeysLower and + // Aspect_VKey_NavigationKeysUpper below + Aspect_VKey_NavInteract, //!< interact + Aspect_VKey_NavForward, //!< go forward + Aspect_VKey_NavBackward, //!< go backward + Aspect_VKey_NavSlideLeft, //!< sidewalk, left + Aspect_VKey_NavSlideRight, //!< sidewalk, right + Aspect_VKey_NavSlideUp, //!< lift up + Aspect_VKey_NavSlideDown, //!< fall down + Aspect_VKey_NavRollCCW, //!< bank left (roll counter-clockwise) + Aspect_VKey_NavRollCW, //!< bank right (roll clockwise) + Aspect_VKey_NavLookLeft, //!< look left (yaw counter-clockwise) + Aspect_VKey_NavLookRight, //!< look right (yaw clockwise) + Aspect_VKey_NavLookUp, //!< look up (pitch clockwise) + Aspect_VKey_NavLookDown, //!< look down (pitch counter-clockwise) + Aspect_VKey_NavCrouch, //!< crouch walking + Aspect_VKey_NavJump, //!< jump + Aspect_VKey_NavThrustForward, //!< increase continuous velocity in forward direction + Aspect_VKey_NavThrustBackward, //!< increase continuous velocity in reversed direction + Aspect_VKey_NavThrustStop, //!< reset continuous velocity + Aspect_VKey_NavSpeedIncrease, //!< increase navigation speed + Aspect_VKey_NavSpeedDecrease, //!< decrease navigation speed }; //! Auxiliary ranges. enum { - Aspect_VKey_Lower = 0, + Aspect_VKey_Lower = 0, Aspect_VKey_ModifiersLower = Aspect_VKey_Shift, Aspect_VKey_ModifiersUpper = Aspect_VKey_Meta, Aspect_VKey_NavigationKeysLower = Aspect_VKey_NavInteract, Aspect_VKey_NavigationKeysUpper = Aspect_VKey_NavSpeedDecrease, - Aspect_VKey_Upper = Aspect_VKey_NavSpeedDecrease, - Aspect_VKey_NB = Aspect_VKey_Upper - Aspect_VKey_Lower + 1, - Aspect_VKey_MAX = 255 + Aspect_VKey_Upper = Aspect_VKey_NavSpeedDecrease, + Aspect_VKey_NB = Aspect_VKey_Upper - Aspect_VKey_Lower + 1, + Aspect_VKey_MAX = 255 }; //! Return modifier flags for specified modifier key. -inline Aspect_VKeyFlags Aspect_VKey2Modifier (Aspect_VKey theKey) +inline Aspect_VKeyFlags Aspect_VKey2Modifier(Aspect_VKey theKey) { switch (theKey) { - case Aspect_VKey_Shift: return Aspect_VKeyFlags_SHIFT; - case Aspect_VKey_Control: return Aspect_VKeyFlags_CTRL; - case Aspect_VKey_Alt: return Aspect_VKeyFlags_ALT; - case Aspect_VKey_Menu: return Aspect_VKeyFlags_MENU; - case Aspect_VKey_Meta: return Aspect_VKeyFlags_META; - default: return 0; + case Aspect_VKey_Shift: + return Aspect_VKeyFlags_SHIFT; + case Aspect_VKey_Control: + return Aspect_VKeyFlags_CTRL; + case Aspect_VKey_Alt: + return Aspect_VKeyFlags_ALT; + case Aspect_VKey_Menu: + return Aspect_VKeyFlags_MENU; + case Aspect_VKey_Meta: + return Aspect_VKeyFlags_META; + default: + return 0; } } diff --git a/opencascade/Aspect_VKeyFlags.hxx b/opencascade/Aspect_VKeyFlags.hxx index 865fb71ae..9678f67e3 100644 --- a/opencascade/Aspect_VKeyFlags.hxx +++ b/opencascade/Aspect_VKeyFlags.hxx @@ -20,15 +20,16 @@ typedef unsigned int Aspect_VKeyFlags; //! Key modifier, for combining with general key from Aspect_VKey. enum { - Aspect_VKeyFlags_NONE = 0, + Aspect_VKeyFlags_NONE = 0, // reserve first 8 bits to combine value with Aspect_VKey - Aspect_VKeyFlags_SHIFT = 1 << 8, //!< Aspect_VKey_Shift - Aspect_VKeyFlags_CTRL = 1 << 9, //!< Aspect_VKey_Control + Aspect_VKeyFlags_SHIFT = 1 << 8, //!< Aspect_VKey_Shift + Aspect_VKeyFlags_CTRL = 1 << 9, //!< Aspect_VKey_Control Aspect_VKeyFlags_ALT = 1 << 10, //!< Aspect_VKey_Alt Aspect_VKeyFlags_MENU = 1 << 11, //!< Aspect_VKey_Menu Aspect_VKeyFlags_META = 1 << 12, //!< Aspect_VKey_Meta - Aspect_VKeyFlags_ALL = Aspect_VKeyFlags_SHIFT | Aspect_VKeyFlags_CTRL | Aspect_VKeyFlags_ALT | Aspect_VKeyFlags_MENU | Aspect_VKeyFlags_META + Aspect_VKeyFlags_ALL = Aspect_VKeyFlags_SHIFT | Aspect_VKeyFlags_CTRL | Aspect_VKeyFlags_ALT + | Aspect_VKeyFlags_MENU | Aspect_VKeyFlags_META }; //! Mouse buttons, for combining with Aspect_VKey and Aspect_VKeyFlags. @@ -37,13 +38,14 @@ typedef unsigned int Aspect_VKeyMouse; //! Mouse button bitmask enum { - Aspect_VKeyMouse_NONE = 0, //!< no buttons + Aspect_VKeyMouse_NONE = 0, //!< no buttons Aspect_VKeyMouse_LeftButton = 1 << 13, //!< mouse left button Aspect_VKeyMouse_MiddleButton = 1 << 14, //!< mouse middle button (scroll) Aspect_VKeyMouse_RightButton = 1 << 15, //!< mouse right button - Aspect_VKeyMouse_MainButtons = Aspect_VKeyMouse_LeftButton | Aspect_VKeyMouse_MiddleButton | Aspect_VKeyMouse_RightButton + Aspect_VKeyMouse_MainButtons = + Aspect_VKeyMouse_LeftButton | Aspect_VKeyMouse_MiddleButton | Aspect_VKeyMouse_RightButton }; #endif // _Aspect_VKeyFlags_HeaderFile diff --git a/opencascade/Aspect_VKeySet.hxx b/opencascade/Aspect_VKeySet.hxx index 6c9d51013..eceeb1cae 100644 --- a/opencascade/Aspect_VKeySet.hxx +++ b/opencascade/Aspect_VKeySet.hxx @@ -26,42 +26,41 @@ class Aspect_VKeySet : public Standard_Transient { DEFINE_STANDARD_RTTIEXT(Aspect_VKeySet, Standard_Transient) public: - //! Main constructor. Standard_EXPORT Aspect_VKeySet(); //! Return active modifiers. Aspect_VKeyFlags Modifiers() const { - Standard_Mutex::Sentry aLock (myLock); + Standard_Mutex::Sentry aLock(myLock); return myModifiers; } //! Return timestamp of press event. - double DownTime (Aspect_VKey theKey) const + double DownTime(Aspect_VKey theKey) const { - Standard_Mutex::Sentry aLock (myLock); + Standard_Mutex::Sentry aLock(myLock); return myKeys[theKey].TimeDown; } //! Return timestamp of release event. - double TimeUp (Aspect_VKey theKey) const + double TimeUp(Aspect_VKey theKey) const { - Standard_Mutex::Sentry aLock (myLock); + Standard_Mutex::Sentry aLock(myLock); return myKeys[theKey].TimeUp; } //! Return TRUE if key is in Free state. - bool IsFreeKey (Aspect_VKey theKey) const + bool IsFreeKey(Aspect_VKey theKey) const { - Standard_Mutex::Sentry aLock (myLock); + Standard_Mutex::Sentry aLock(myLock); return myKeys[theKey].KStatus == KeyStatus_Free; } //! Return TRUE if key is in Pressed state. - bool IsKeyDown (Aspect_VKey theKey) const + bool IsKeyDown(Aspect_VKey theKey) const { - Standard_Mutex::Sentry aLock (myLock); + Standard_Mutex::Sentry aLock(myLock); return myKeys[theKey].KStatus == KeyStatus_Pressed; } @@ -71,40 +70,34 @@ public: Standard_Mutex& Mutex() { return myLock; } public: - //! Reset the key state into unpressed state. Standard_EXPORT void Reset(); //! Press key. //! @param theKey key pressed //! @param theTime event timestamp - Standard_EXPORT void KeyDown (Aspect_VKey theKey, - double theTime, - double thePressure = 1.0); + Standard_EXPORT void KeyDown(Aspect_VKey theKey, double theTime, double thePressure = 1.0); //! Release key. //! @param theKey key pressed //! @param theTime event timestamp - Standard_EXPORT void KeyUp (Aspect_VKey theKey, - double theTime); + Standard_EXPORT void KeyUp(Aspect_VKey theKey, double theTime); //! Simulate key up/down events from axis value. - Standard_EXPORT void KeyFromAxis (Aspect_VKey theNegative, - Aspect_VKey thePositive, - double theTime, - double thePressure); + Standard_EXPORT void KeyFromAxis(Aspect_VKey theNegative, + Aspect_VKey thePositive, + double theTime, + double thePressure); //! Return duration of the button in pressed state. //! @param theKey key to check //! @param theTime current time (for computing duration from key down time) //! @param theDuration key press duration //! @return TRUE if key was in pressed state - bool HoldDuration (Aspect_VKey theKey, - double theTime, - double& theDuration) + bool HoldDuration(Aspect_VKey theKey, double theTime, double& theDuration) { double aPressure = -1.0; - return HoldDuration (theKey, theTime, theDuration, aPressure); + return HoldDuration(theKey, theTime, theDuration, aPressure); } //! Return duration of the button in pressed state. @@ -113,13 +106,12 @@ public: //! @param theDuration key press duration //! @param thePressure key pressure //! @return TRUE if key was in pressed state - Standard_EXPORT bool HoldDuration (Aspect_VKey theKey, - double theTime, - double& theDuration, - double& thePressure); + Standard_EXPORT bool HoldDuration(Aspect_VKey theKey, + double theTime, + double& theDuration, + double& thePressure); private: - //! Key state. enum KeyStatus { @@ -131,10 +123,17 @@ private: //! Structure defining key state. struct KeyState { - KeyState() : TimeDown (0.0), TimeUp (0.0), Pressure (1.0), KStatus (KeyStatus_Free) {} + KeyState() + : TimeDown(0.0), + TimeUp(0.0), + Pressure(1.0), + KStatus(KeyStatus_Free) + { + } + void Reset() { - KStatus = KeyStatus_Free; + KStatus = KeyStatus_Free; TimeDown = 0.0; TimeUp = 0.0; Pressure = 1.0; @@ -147,11 +146,9 @@ private: }; private: - NCollection_Array1 myKeys; //!< keys state mutable Standard_Mutex myLock; //!< mutex for thread-safe updates Aspect_VKeyFlags myModifiers; //!< active modifiers - }; #endif // _Aspect_VKeySet_HeaderFile diff --git a/opencascade/Aspect_WidthOfLine.hxx b/opencascade/Aspect_WidthOfLine.hxx index e8eb03133..37e6dfee8 100644 --- a/opencascade/Aspect_WidthOfLine.hxx +++ b/opencascade/Aspect_WidthOfLine.hxx @@ -25,11 +25,11 @@ //! WOL_USERDEFINED defined by Users enum Aspect_WidthOfLine { -Aspect_WOL_THIN, -Aspect_WOL_MEDIUM, -Aspect_WOL_THICK, -Aspect_WOL_VERYTHICK, -Aspect_WOL_USERDEFINED + Aspect_WOL_THIN, + Aspect_WOL_MEDIUM, + Aspect_WOL_THICK, + Aspect_WOL_VERYTHICK, + Aspect_WOL_USERDEFINED }; #endif // _Aspect_WidthOfLine_HeaderFile diff --git a/opencascade/Aspect_Window.hxx b/opencascade/Aspect_Window.hxx index a849aaea7..7f8096e08 100644 --- a/opencascade/Aspect_Window.hxx +++ b/opencascade/Aspect_Window.hxx @@ -39,18 +39,17 @@ class Aspect_Window : public Standard_Transient { DEFINE_STANDARD_RTTIEXT(Aspect_Window, Standard_Transient) public: - //! Returns True if the window is virtual Standard_EXPORT Standard_Boolean IsVirtual() const; //! Setup the virtual state - Standard_EXPORT void SetVirtual (const Standard_Boolean theVirtual); + Standard_EXPORT void SetVirtual(const Standard_Boolean theVirtual); //! Returns window top-left corner. Graphic3d_Vec2i TopLeft() const { Graphic3d_Vec2i aTopLeft, aBotRight; - Position (aTopLeft.x(), aTopLeft.y(), aBotRight.x(), aBotRight.y()); + Position(aTopLeft.x(), aTopLeft.y(), aBotRight.x(), aBotRight.y()); return aTopLeft; } @@ -58,7 +57,7 @@ public: Graphic3d_Vec2i Dimensions() const { Graphic3d_Vec2i aSize; - Size (aSize.x(), aSize.y()); + Size(aSize.x(), aSize.y()); return aSize; } @@ -75,19 +74,20 @@ public: Standard_EXPORT Aspect_GradientBackground GradientBackground() const; //! Modifies the window background. - Standard_EXPORT void SetBackground (const Aspect_Background& theBack); + Standard_EXPORT void SetBackground(const Aspect_Background& theBack); //! Modifies the window background. - Standard_EXPORT void SetBackground (const Quantity_Color& theColor); + Standard_EXPORT void SetBackground(const Quantity_Color& theColor); //! Modifies the window gradient background. - Standard_EXPORT void SetBackground (const Aspect_GradientBackground& theBackground); + Standard_EXPORT void SetBackground(const Aspect_GradientBackground& theBackground); //! Modifies the window gradient background. - Standard_EXPORT void SetBackground (const Quantity_Color& theFirstColor, const Quantity_Color& theSecondColor, const Aspect_GradientFillMethod theFillMethod); + Standard_EXPORT void SetBackground(const Quantity_Color& theFirstColor, + const Quantity_Color& theSecondColor, + const Aspect_GradientFillMethod theFillMethod); public: - //! Returns True if the window is opened //! and False if the window is closed. Standard_EXPORT virtual Standard_Boolean IsMapped() const = 0; @@ -110,10 +110,13 @@ public: Standard_EXPORT virtual Standard_Real Ratio() const = 0; //! Returns The Window POSITION in PIXEL - Standard_EXPORT virtual void Position (Standard_Integer& X1, Standard_Integer& Y1, Standard_Integer& X2, Standard_Integer& Y2) const = 0; + Standard_EXPORT virtual void Position(Standard_Integer& X1, + Standard_Integer& Y1, + Standard_Integer& X2, + Standard_Integer& Y2) const = 0; //! Returns The Window SIZE in PIXEL - Standard_EXPORT virtual void Size (Standard_Integer& Width, Standard_Integer& Height) const = 0; + Standard_EXPORT virtual void Size(Standard_Integer& Width, Standard_Integer& Height) const = 0; //! Returns native Window handle (HWND on Windows, Window with Xlib, and so on) Standard_EXPORT virtual Aspect_Drawable NativeHandle() const = 0; @@ -125,7 +128,7 @@ public: Standard_EXPORT virtual Aspect_FBConfig NativeFBConfig() const = 0; //! Sets window title. - virtual void SetTitle (const TCollection_AsciiString& theTitle) { (void )theTitle; } + virtual void SetTitle(const TCollection_AsciiString& theTitle) { (void)theTitle; } //! Invalidate entire window content. //! @@ -135,43 +138,38 @@ public: //! Optional display argument should be passed when called from non-GUI thread //! on platforms implementing thread-unsafe connections to display. //! NULL can be passed instead otherwise. - virtual void InvalidateContent (const Handle(Aspect_DisplayConnection)& theDisp) { (void )theDisp; } + virtual void InvalidateContent(const Handle(Aspect_DisplayConnection)& theDisp) { (void)theDisp; } public: - //! Return device pixel ratio (logical to backing store scale factor). virtual Standard_Real DevicePixelRatio() const { return 1.0; } //! Convert point from logical units into backing store units. - virtual Graphic3d_Vec2d ConvertPointToBacking (const Graphic3d_Vec2d& thePnt) const + virtual Graphic3d_Vec2d ConvertPointToBacking(const Graphic3d_Vec2d& thePnt) const { return thePnt * DevicePixelRatio(); } //! Convert point from backing store units to logical units. - virtual Graphic3d_Vec2d ConvertPointFromBacking (const Graphic3d_Vec2d& thePnt) const + virtual Graphic3d_Vec2d ConvertPointFromBacking(const Graphic3d_Vec2d& thePnt) const { return thePnt / DevicePixelRatio(); } public: - //! Dumps the content of me into the stream - Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const; + Standard_EXPORT void DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth = -1) const; protected: - //! Initializes the data of a Window. Standard_EXPORT Aspect_Window(); protected: - Handle(Aspect_DisplayConnection) myDisplay; //!< Display connection - Aspect_Background MyBackground; - Aspect_GradientBackground MyGradientBackground; - Aspect_FillMethod MyBackgroundFillMethod; - Standard_Boolean MyIsVirtual; - + Aspect_Background MyBackground; + Aspect_GradientBackground MyGradientBackground; + Aspect_FillMethod MyBackgroundFillMethod; + Standard_Boolean MyIsVirtual; }; #endif // _Aspect_Window_HeaderFile diff --git a/opencascade/Aspect_WindowDefinitionError.hxx b/opencascade/Aspect_WindowDefinitionError.hxx index 572675a1f..48598082d 100644 --- a/opencascade/Aspect_WindowDefinitionError.hxx +++ b/opencascade/Aspect_WindowDefinitionError.hxx @@ -25,8 +25,9 @@ class Aspect_WindowDefinitionError; DEFINE_STANDARD_HANDLE(Aspect_WindowDefinitionError, Standard_OutOfRange) #if !defined No_Exception && !defined No_Aspect_WindowDefinitionError - #define Aspect_WindowDefinitionError_Raise_if(CONDITION, MESSAGE) \ - if (CONDITION) throw Aspect_WindowDefinitionError(MESSAGE); + #define Aspect_WindowDefinitionError_Raise_if(CONDITION, MESSAGE) \ + if (CONDITION) \ + throw Aspect_WindowDefinitionError(MESSAGE); #else #define Aspect_WindowDefinitionError_Raise_if(CONDITION, MESSAGE) #endif diff --git a/opencascade/Aspect_WindowError.hxx b/opencascade/Aspect_WindowError.hxx index 6c7a49426..aa9bb9343 100644 --- a/opencascade/Aspect_WindowError.hxx +++ b/opencascade/Aspect_WindowError.hxx @@ -25,8 +25,9 @@ class Aspect_WindowError; DEFINE_STANDARD_HANDLE(Aspect_WindowError, Standard_OutOfRange) #if !defined No_Exception && !defined No_Aspect_WindowError - #define Aspect_WindowError_Raise_if(CONDITION, MESSAGE) \ - if (CONDITION) throw Aspect_WindowError(MESSAGE); + #define Aspect_WindowError_Raise_if(CONDITION, MESSAGE) \ + if (CONDITION) \ + throw Aspect_WindowError(MESSAGE); #else #define Aspect_WindowError_Raise_if(CONDITION, MESSAGE) #endif diff --git a/opencascade/Aspect_WindowInputListener.hxx b/opencascade/Aspect_WindowInputListener.hxx index d4b5e1128..5bb9e24c6 100644 --- a/opencascade/Aspect_WindowInputListener.hxx +++ b/opencascade/Aspect_WindowInputListener.hxx @@ -25,9 +25,8 @@ class WNT_HIDSpaceMouse; class Aspect_WindowInputListener { public: - ///DEFINE_STANDARD_ALLOC + /// DEFINE_STANDARD_ALLOC public: - //! Destructor. Standard_EXPORT virtual ~Aspect_WindowInputListener(); @@ -38,19 +37,18 @@ public: virtual void ProcessExpose() = 0; //! Handle window resize event. - virtual void ProcessConfigure (bool theIsResized) = 0; + virtual void ProcessConfigure(bool theIsResized) = 0; //! Handle window input event immediately (flush input buffer or ignore). virtual void ProcessInput() = 0; //! Handle focus event. - virtual void ProcessFocus (bool theIsActivated) = 0; + virtual void ProcessFocus(bool theIsActivated) = 0; //! Handle window close event. virtual void ProcessClose() = 0; public: //! @name keyboard input - //! Return keyboard state. const Aspect_VKeySet& Keys() const { return myKeys; } @@ -61,31 +59,29 @@ public: //! @name keyboard input //! Default implementation updates internal cache. //! @param theKey key pressed //! @param theTime event timestamp - Standard_EXPORT virtual void KeyDown (Aspect_VKey theKey, - double theTime, - double thePressure = 1.0) = 0; + Standard_EXPORT virtual void KeyDown(Aspect_VKey theKey, + double theTime, + double thePressure = 1.0) = 0; //! Release key. //! Default implementation updates internal cache. //! @param theKey key pressed //! @param theTime event timestamp - Standard_EXPORT virtual void KeyUp (Aspect_VKey theKey, - double theTime) = 0; + Standard_EXPORT virtual void KeyUp(Aspect_VKey theKey, double theTime) = 0; //! Simulate key up/down events from axis value. //! Default implementation updates internal cache. - Standard_EXPORT virtual void KeyFromAxis (Aspect_VKey theNegative, - Aspect_VKey thePositive, - double theTime, - double thePressure) = 0; + Standard_EXPORT virtual void KeyFromAxis(Aspect_VKey theNegative, + Aspect_VKey thePositive, + double theTime, + double thePressure) = 0; public: //! @name mouse input - //! Update mouse scroll event. //! This method is expected to be called from UI thread. //! @param theDelta mouse cursor position and delta //! @return TRUE if new event has been created or FALSE if existing one has been updated - virtual bool UpdateMouseScroll (const Aspect_ScrollDelta& theDelta) = 0; + virtual bool UpdateMouseScroll(const Aspect_ScrollDelta& theDelta) = 0; //! Handle mouse button press/release event. //! This method is expected to be called from UI thread. @@ -95,10 +91,10 @@ public: //! @name mouse input //! @param theIsEmulated if TRUE then mouse event comes NOT from real mouse //! but emulated from non-precise input like touch on screen //! @return TRUE if window content should be redrawn - virtual bool UpdateMouseButtons (const Graphic3d_Vec2i& thePoint, - Aspect_VKeyMouse theButtons, - Aspect_VKeyFlags theModifiers, - bool theIsEmulated) = 0; + virtual bool UpdateMouseButtons(const Graphic3d_Vec2i& thePoint, + Aspect_VKeyMouse theButtons, + Aspect_VKeyFlags theModifiers, + bool theIsEmulated) = 0; //! Handle mouse cursor movement event. //! This method is expected to be called from UI thread. @@ -109,10 +105,10 @@ public: //! @name mouse input //! @param theIsEmulated if TRUE then mouse event comes NOT from real mouse //! but emulated from non-precise input like touch on screen //! @return TRUE if window content should be redrawn - virtual bool UpdateMousePosition (const Graphic3d_Vec2i& thePoint, - Aspect_VKeyMouse theButtons, - Aspect_VKeyFlags theModifiers, - bool theIsEmulated) = 0; + virtual bool UpdateMousePosition(const Graphic3d_Vec2i& thePoint, + Aspect_VKeyMouse theButtons, + Aspect_VKeyFlags theModifiers, + bool theIsEmulated) = 0; //! Handle mouse button press event. //! This method is expected to be called from UI thread. @@ -123,12 +119,12 @@ public: //! @name mouse input //! @param theIsEmulated if TRUE then mouse event comes NOT from real mouse //! but emulated from non-precise input like touch on screen //! @return TRUE if window content should be redrawn - bool PressMouseButton (const Graphic3d_Vec2i& thePoint, - Aspect_VKeyMouse theButton, - Aspect_VKeyFlags theModifiers, - bool theIsEmulated) + bool PressMouseButton(const Graphic3d_Vec2i& thePoint, + Aspect_VKeyMouse theButton, + Aspect_VKeyFlags theModifiers, + bool theIsEmulated) { - return UpdateMouseButtons (thePoint, myMousePressed | theButton, theModifiers, theIsEmulated); + return UpdateMouseButtons(thePoint, myMousePressed | theButton, theModifiers, theIsEmulated); } //! Handle mouse button release event. @@ -140,13 +136,13 @@ public: //! @name mouse input //! @param theIsEmulated if TRUE then mouse event comes NOT from real mouse //! but emulated from non-precise input like touch on screen //! @return TRUE if window content should be redrawn - bool ReleaseMouseButton (const Graphic3d_Vec2i& thePoint, - Aspect_VKeyMouse theButton, - Aspect_VKeyFlags theModifiers, - bool theIsEmulated) + bool ReleaseMouseButton(const Graphic3d_Vec2i& thePoint, + Aspect_VKeyMouse theButton, + Aspect_VKeyFlags theModifiers, + bool theIsEmulated) { Aspect_VKeyMouse aButtons = myMousePressed & (~theButton); - return UpdateMouseButtons (thePoint, aButtons, theModifiers, theIsEmulated); + return UpdateMouseButtons(thePoint, aButtons, theModifiers, theIsEmulated); } //! Return currently pressed mouse buttons. @@ -159,7 +155,6 @@ public: //! @name mouse input const Graphic3d_Vec2i& LastMousePosition() const { return myMousePositionLast; } public: //! @name multi-touch input - //! Return TRUE if touches map is not empty. bool HasTouchPoints() const { return !myTouchPoints.IsEmpty(); } @@ -171,45 +166,43 @@ public: //! @name multi-touch input //! @param theId touch unique identifier //! @param thePnt touch coordinates //! @param theClearBefore if TRUE previously registered touches will be removed - Standard_EXPORT virtual void AddTouchPoint (Standard_Size theId, - const Graphic3d_Vec2d& thePnt, - Standard_Boolean theClearBefore = false); + Standard_EXPORT virtual void AddTouchPoint(Standard_Size theId, + const Graphic3d_Vec2d& thePnt, + Standard_Boolean theClearBefore = false); //! Remove touch point with the given ID. //! This method is expected to be called from UI thread. //! @param theId touch unique identifier //! @param theClearSelectPnts if TRUE will initiate clearing of selection points //! @return TRUE if point has been removed - Standard_EXPORT virtual bool RemoveTouchPoint (Standard_Size theId, - Standard_Boolean theClearSelectPnts = false); + Standard_EXPORT virtual bool RemoveTouchPoint(Standard_Size theId, + Standard_Boolean theClearSelectPnts = false); //! Update touch point with the given ID. //! If point with specified ID was not registered before, it will be added. //! This method is expected to be called from UI thread. //! @param theId touch unique identifier //! @param thePnt touch coordinates - Standard_EXPORT virtual void UpdateTouchPoint (Standard_Size theId, - const Graphic3d_Vec2d& thePnt); + Standard_EXPORT virtual void UpdateTouchPoint(Standard_Size theId, const Graphic3d_Vec2d& thePnt); public: //! @name 3d mouse input - //! Return acceleration ratio for translation event; 2.0 by default. float Get3dMouseTranslationScale() const { return my3dMouseAccelTrans; } //! Set acceleration ratio for translation event. - void Set3dMouseTranslationScale (float theScale) { my3dMouseAccelTrans = theScale; } + void Set3dMouseTranslationScale(float theScale) { my3dMouseAccelTrans = theScale; } //! Return acceleration ratio for rotation event; 4.0 by default. float Get3dMouseRotationScale() const { return my3dMouseAccelRotate; } //! Set acceleration ratio for rotation event. - void Set3dMouseRotationScale (float theScale) { my3dMouseAccelRotate = theScale; } + void Set3dMouseRotationScale(float theScale) { my3dMouseAccelRotate = theScale; } //! Return quadric acceleration flag; TRUE by default. bool To3dMousePreciseInput() const { return my3dMouseIsQuadric; } //! Set quadric acceleration flag. - void Set3dMousePreciseInput (bool theIsQuadric) { my3dMouseIsQuadric = theIsQuadric; } + void Set3dMousePreciseInput(bool theIsQuadric) { my3dMouseIsQuadric = theIsQuadric; } //! Return 3d mouse rotation axes (tilt/roll/spin) ignore flag; (FALSE, FALSE, FALSE) by default. const NCollection_Vec3& Get3dMouseIsNoRotate() const { return my3dMouseNoRotate; } @@ -224,49 +217,42 @@ public: //! @name 3d mouse input NCollection_Vec3& Change3dMouseToReverse() { return my3dMouseToReverse; } //! Process 3d mouse input event (redirects to translation, rotation and keys). - virtual bool Update3dMouse (const WNT_HIDSpaceMouse& theEvent) = 0; + virtual bool Update3dMouse(const WNT_HIDSpaceMouse& theEvent) = 0; //! Process 3d mouse input translation event. - Standard_EXPORT virtual bool update3dMouseTranslation (const WNT_HIDSpaceMouse& theEvent); + Standard_EXPORT virtual bool update3dMouseTranslation(const WNT_HIDSpaceMouse& theEvent); //! Process 3d mouse input rotation event. - Standard_EXPORT virtual bool update3dMouseRotation (const WNT_HIDSpaceMouse& theEvent); + Standard_EXPORT virtual bool update3dMouseRotation(const WNT_HIDSpaceMouse& theEvent); //! Process 3d mouse input keys event. - Standard_EXPORT virtual bool update3dMouseKeys (const WNT_HIDSpaceMouse& theEvent); + Standard_EXPORT virtual bool update3dMouseKeys(const WNT_HIDSpaceMouse& theEvent); protected: - //! Empty constructor. Standard_EXPORT Aspect_WindowInputListener(); protected: + OSD_Timer myEventTimer; //!< timer for timestamping events - OSD_Timer myEventTimer; //!< timer for timestamping events - -protected: //! @name keyboard input variables - - Aspect_VKeySet myKeys; //!< keyboard state - -protected: //! @name mouse input variables +protected: //! @name keyboard input variables + Aspect_VKeySet myKeys; //!< keyboard state +protected: //! @name mouse input variables Graphic3d_Vec2i myMousePositionLast; //!< last mouse position Aspect_VKeyMouse myMousePressed; //!< active mouse buttons Aspect_VKeyFlags myMouseModifiers; //!< active key modifiers passed with last mouse event protected: - - Aspect_TouchMap myTouchPoints; //!< map of active touches - -protected: //! @name 3d mouse input variables - - bool my3dMouseButtonState[32];//!< cached button state - NCollection_Vec3 my3dMouseNoRotate; //!< ignore 3d mouse rotation axes - NCollection_Vec3 my3dMouseToReverse; //!< reverse 3d mouse rotation axes - float my3dMouseAccelTrans; //!< acceleration ratio for translation event - float my3dMouseAccelRotate; //!< acceleration ratio for rotation event - bool my3dMouseIsQuadric; //!< quadric acceleration - + Aspect_TouchMap myTouchPoints; //!< map of active touches + +protected: //! @name 3d mouse input variables + bool my3dMouseButtonState[32]; //!< cached button state + NCollection_Vec3 my3dMouseNoRotate; //!< ignore 3d mouse rotation axes + NCollection_Vec3 my3dMouseToReverse; //!< reverse 3d mouse rotation axes + float my3dMouseAccelTrans; //!< acceleration ratio for translation event + float my3dMouseAccelRotate; //!< acceleration ratio for rotation event + bool my3dMouseIsQuadric; //!< quadric acceleration }; #endif // _Aspect_WindowInputListener_HeaderFile diff --git a/opencascade/Aspect_XAtom.hxx b/opencascade/Aspect_XAtom.hxx index cb6f7eaf9..5634f97b0 100644 --- a/opencascade/Aspect_XAtom.hxx +++ b/opencascade/Aspect_XAtom.hxx @@ -21,7 +21,7 @@ //! Category: Instantiated classes enum Aspect_XAtom { -Aspect_XA_DELETE_WINDOW + Aspect_XA_DELETE_WINDOW }; #endif // _Aspect_XAtom_HeaderFile diff --git a/opencascade/Aspect_XRAction.hxx b/opencascade/Aspect_XRAction.hxx index 84b9299b3..d6adfbb4e 100644 --- a/opencascade/Aspect_XRAction.hxx +++ b/opencascade/Aspect_XRAction.hxx @@ -25,7 +25,6 @@ class Aspect_XRAction : public Standard_Transient { DEFINE_STANDARD_RTTIEXT(Aspect_XRAction, Standard_Transient) public: - //! Return action id. const TCollection_AsciiString& Id() const { return myId; } @@ -39,12 +38,15 @@ public: uint64_t RawHandle() const { return myRawHandle; } //! Set action handle. - void SetRawHandle (uint64_t theHande) { myRawHandle = theHande; } + void SetRawHandle(uint64_t theHande) { myRawHandle = theHande; } //! Main constructor. - Aspect_XRAction (const TCollection_AsciiString& theId, - const Aspect_XRActionType theType) - : myId (theId), myRawHandle (0), myType (theType) {} + Aspect_XRAction(const TCollection_AsciiString& theId, const Aspect_XRActionType theType) + : myId(theId), + myRawHandle(0), + myType(theType) + { + } protected: TCollection_AsciiString myId; //!< action id @@ -53,6 +55,7 @@ protected: }; //! Map of actions with action Id as a key. -typedef NCollection_IndexedDataMap Aspect_XRActionMap; +typedef NCollection_IndexedDataMap + Aspect_XRActionMap; #endif // _Aspect_XRAction_HeaderFile diff --git a/opencascade/Aspect_XRActionSet.hxx b/opencascade/Aspect_XRActionSet.hxx index 9bbf8b970..d854dfb61 100644 --- a/opencascade/Aspect_XRActionSet.hxx +++ b/opencascade/Aspect_XRActionSet.hxx @@ -21,7 +21,6 @@ class Aspect_XRActionSet : public Standard_Transient { DEFINE_STANDARD_RTTIEXT(Aspect_XRActionSet, Standard_Transient) public: - //! Return action id. const TCollection_AsciiString& Id() const { return myId; } @@ -29,20 +28,23 @@ public: uint64_t RawHandle() const { return myRawHandle; } //! Set action handle. - void SetRawHandle (uint64_t theHande) { myRawHandle = theHande; } + void SetRawHandle(uint64_t theHande) { myRawHandle = theHande; } //! Add action. - void AddAction (const Handle(Aspect_XRAction)& theAction) + void AddAction(const Handle(Aspect_XRAction)& theAction) { - myActions.Add (theAction->Id(), theAction); + myActions.Add(theAction->Id(), theAction); } //! Return map of actions. const Aspect_XRActionMap& Actions() const { return myActions; } //! Main constructor. - Aspect_XRActionSet (const TCollection_AsciiString& theId) - : myId (theId), myRawHandle (0) {} + Aspect_XRActionSet(const TCollection_AsciiString& theId) + : myId(theId), + myRawHandle(0) + { + } protected: TCollection_AsciiString myId; //!< action set id @@ -50,6 +52,7 @@ protected: Aspect_XRActionMap myActions; //!< map of actions }; -typedef NCollection_IndexedDataMap Aspect_XRActionSetMap; +typedef NCollection_IndexedDataMap + Aspect_XRActionSetMap; #endif // _Aspect_XRActionSet_HeaderFile diff --git a/opencascade/Aspect_XRAnalogActionData.hxx b/opencascade/Aspect_XRAnalogActionData.hxx index bd6cf03a2..ffa698681 100644 --- a/opencascade/Aspect_XRAnalogActionData.hxx +++ b/opencascade/Aspect_XRAnalogActionData.hxx @@ -19,17 +19,24 @@ //! Analog input XR action data. struct Aspect_XRAnalogActionData { - uint64_t ActiveOrigin; //!< The origin that caused this action's current state + uint64_t ActiveOrigin; //!< The origin that caused this action's current state + // clang-format off float UpdateTime; //!< Time relative to now when this event happened. Will be negative to indicate a past time NCollection_Vec3 VecXYZ; //!< the current state of this action NCollection_Vec3 DeltaXYZ; //!< deltas since the previous update bool IsActive; //!< whether or not this action is currently available to be bound in the active action set + // clang-format on //! Return TRUE if delta is non-zero. - bool IsChanged() { return !DeltaXYZ.IsEqual (NCollection_Vec3 (0.0f, 0.0f, 0.0f)); } + bool IsChanged() { return !DeltaXYZ.IsEqual(NCollection_Vec3(0.0f, 0.0f, 0.0f)); } //! Empty constructor. - Aspect_XRAnalogActionData() : ActiveOrigin (0), UpdateTime (0.0f), IsActive (false) {} + Aspect_XRAnalogActionData() + : ActiveOrigin(0), + UpdateTime(0.0f), + IsActive(false) + { + } }; #endif // _Aspect_XRAnalogActionData_HeaderFile diff --git a/opencascade/Aspect_XRDigitalActionData.hxx b/opencascade/Aspect_XRDigitalActionData.hxx index a72bff539..2793ebe31 100644 --- a/opencascade/Aspect_XRDigitalActionData.hxx +++ b/opencascade/Aspect_XRDigitalActionData.hxx @@ -20,13 +20,22 @@ struct Aspect_XRDigitalActionData { uint64_t ActiveOrigin; //!< The origin that caused this action's current state + // clang-format off float UpdateTime; //!< Time relative to now when this event happened. Will be negative to indicate a past time bool IsActive; //!< whether or not this action is currently available to be bound in the active action set bool IsPressed; //!< Aspect_InputActionType_Digital state - The current state of this action; will be true if currently pressed bool IsChanged; //!< Aspect_InputActionType_Digital state - this is true if the state has changed since the last frame + // clang-format on //! Empty constructor. - Aspect_XRDigitalActionData() : ActiveOrigin (0), UpdateTime (0.0f), IsActive (false), IsPressed (false), IsChanged (false) {} + Aspect_XRDigitalActionData() + : ActiveOrigin(0), + UpdateTime(0.0f), + IsActive(false), + IsPressed(false), + IsChanged(false) + { + } }; #endif // _Aspect_XRDigitalActionData_HeaderFile diff --git a/opencascade/Aspect_XRGenericAction.hxx b/opencascade/Aspect_XRGenericAction.hxx index 0d2d682c8..1e18195f2 100644 --- a/opencascade/Aspect_XRGenericAction.hxx +++ b/opencascade/Aspect_XRGenericAction.hxx @@ -17,16 +17,17 @@ //! Generic XR action. enum Aspect_XRGenericAction { - Aspect_XRGenericAction_IsHeadsetOn, //!< headset is on/off head - Aspect_XRGenericAction_InputAppMenu, //!< application menu button pressed/released - Aspect_XRGenericAction_InputSysMenu, //!< system menu button pressed/released - Aspect_XRGenericAction_InputTriggerPull, //!< trigger squeezing [0..1], 1 to click - Aspect_XRGenericAction_InputTriggerClick, //!< trigger clicked/released - Aspect_XRGenericAction_InputGripClick, //!< grip state on/off - Aspect_XRGenericAction_InputTrackPadPosition, //!< trackpad 2D position [-1,+1] with X and Y axes - Aspect_XRGenericAction_InputTrackPadTouch, //!< trackpad touched/untouched - Aspect_XRGenericAction_InputTrackPadClick, //!< trackpad clicked/released - Aspect_XRGenericAction_InputThumbstickPosition, //!< thumbstick 2D position [-1,+1] with X and Y axes + Aspect_XRGenericAction_IsHeadsetOn, //!< headset is on/off head + Aspect_XRGenericAction_InputAppMenu, //!< application menu button pressed/released + Aspect_XRGenericAction_InputSysMenu, //!< system menu button pressed/released + Aspect_XRGenericAction_InputTriggerPull, //!< trigger squeezing [0..1], 1 to click + Aspect_XRGenericAction_InputTriggerClick, //!< trigger clicked/released + Aspect_XRGenericAction_InputGripClick, //!< grip state on/off + Aspect_XRGenericAction_InputTrackPadPosition, //!< trackpad 2D position [-1,+1] with X and Y axes + Aspect_XRGenericAction_InputTrackPadTouch, //!< trackpad touched/untouched + Aspect_XRGenericAction_InputTrackPadClick, //!< trackpad clicked/released + Aspect_XRGenericAction_InputThumbstickPosition, //!< thumbstick 2D position [-1,+1] with X and Y + //!< axes Aspect_XRGenericAction_InputThumbstickTouch, //!< thumbstick touched/untouched Aspect_XRGenericAction_InputThumbstickClick, //!< thumbstick clicked/released Aspect_XRGenericAction_InputPoseBase, //!< base position of hand @@ -35,6 +36,10 @@ enum Aspect_XRGenericAction Aspect_XRGenericAction_InputPoseFingerTip, //!< position of main fingertip Aspect_XRGenericAction_OutputHaptic //!< haptic output (vibration) }; -enum { Aspect_XRGenericAction_NB = Aspect_XRGenericAction_OutputHaptic + 1 }; + +enum +{ + Aspect_XRGenericAction_NB = Aspect_XRGenericAction_OutputHaptic + 1 +}; #endif // _Aspect_XRGenericAction_HeaderFile diff --git a/opencascade/Aspect_XRHapticActionData.hxx b/opencascade/Aspect_XRHapticActionData.hxx index 49da6ea44..4b612fabb 100644 --- a/opencascade/Aspect_XRHapticActionData.hxx +++ b/opencascade/Aspect_XRHapticActionData.hxx @@ -25,14 +25,17 @@ struct Aspect_XRHapticActionData //! Return TRUE if data is not empty. bool IsValid() const { - return Duration > 0.0f - && Amplitude > 0.0f - && Frequency > 0.0f - && Delay >= 0.0f; + return Duration > 0.0f && Amplitude > 0.0f && Frequency > 0.0f && Delay >= 0.0f; } //! Empty constructor. - Aspect_XRHapticActionData() : Delay (0.0f), Duration (0.0f), Frequency (0.0f), Amplitude (0.0f) {} + Aspect_XRHapticActionData() + : Delay(0.0f), + Duration(0.0f), + Frequency(0.0f), + Amplitude(0.0f) + { + } }; #endif // _Aspect_XRHapticActionData_HeaderFile diff --git a/opencascade/Aspect_XRPoseActionData.hxx b/opencascade/Aspect_XRPoseActionData.hxx index 568278417..866ab4696 100644 --- a/opencascade/Aspect_XRPoseActionData.hxx +++ b/opencascade/Aspect_XRPoseActionData.hxx @@ -22,10 +22,16 @@ struct Aspect_XRPoseActionData { Aspect_TrackedDevicePose Pose; //!< pose state uint64_t ActiveOrigin; //!< The origin that caused this action's current state + // clang-format off bool IsActive; //!< whether or not this action is currently available to be bound in the active action set + // clang-format on //! Empty constructor. - Aspect_XRPoseActionData() : ActiveOrigin (0), IsActive (false) {} + Aspect_XRPoseActionData() + : ActiveOrigin(0), + IsActive(false) + { + } }; #endif // _Aspect_XRPoseActionData_HeaderFile diff --git a/opencascade/Aspect_XRSession.hxx b/opencascade/Aspect_XRSession.hxx index 059093757..db208742a 100644 --- a/opencascade/Aspect_XRSession.hxx +++ b/opencascade/Aspect_XRSession.hxx @@ -36,16 +36,16 @@ class Aspect_XRSession : public Standard_Transient { DEFINE_STANDARD_RTTIEXT(Aspect_XRSession, Standard_Transient) public: - - //! Identifies which style of tracking origin the application wants to use for the poses it is requesting. + //! Identifies which style of tracking origin the application wants to use for the poses it is + //! requesting. enum TrackingUniverseOrigin { TrackingUniverseOrigin_Seated, //! poses are provided relative to the seated zero pose - TrackingUniverseOrigin_Standing, //! poses are provided relative to the safe bounds configured by the user + TrackingUniverseOrigin_Standing, //! poses are provided relative to the safe bounds configured + //! by the user }; public: - //! Return TRUE if session is opened. virtual bool IsOpen() const = 0; @@ -62,45 +62,46 @@ public: virtual NCollection_Vec2 RecommendedViewport() const = 0; //! Return transformation from eye to head. - virtual NCollection_Mat4 EyeToHeadTransform (Aspect_Eye theEye) const = 0; + virtual NCollection_Mat4 EyeToHeadTransform(Aspect_Eye theEye) const = 0; //! Return transformation from head to eye. - NCollection_Mat4 HeadToEyeTransform (Aspect_Eye theEye) const + NCollection_Mat4 HeadToEyeTransform(Aspect_Eye theEye) const { NCollection_Mat4 aMat; - EyeToHeadTransform (theEye).Inverted (aMat); + EyeToHeadTransform(theEye).Inverted(aMat); return aMat; } //! Return projection matrix. - virtual NCollection_Mat4 ProjectionMatrix (Aspect_Eye theEye, - double theZNear, - double theZFar) const = 0; + virtual NCollection_Mat4 ProjectionMatrix(Aspect_Eye theEye, + double theZNear, + double theZFar) const = 0; - //! Return FALSE if projection frustums are unsupported and general 4x4 projection matrix should be fetched instead + //! Return FALSE if projection frustums are unsupported and general 4x4 projection matrix should + //! be fetched instead virtual bool HasProjectionFrustums() const = 0; //! Receive XR events. virtual void ProcessEvents() = 0; //! Submit texture eye to XR Composer. - //! @param theTexture [in] texture handle - //! @param theGraphicsLib [in] graphics library in which texture handle is defined - //! @param theColorSpace [in] texture color space; + //! @param[in] theTexture texture handle + //! @param[in] theGraphicsLib graphics library in which texture handle is defined + //! @param[in] theColorSpace texture color space; //! sRGB means no color conversion by composer; //! Linear means to sRGB color conversion by composer - //! @param theEye [in] eye to display + //! @param[in] theEye eye to display //! @return FALSE on error - virtual bool SubmitEye (void* theTexture, - Aspect_GraphicsLibrary theGraphicsLib, - Aspect_ColorSpace theColorSpace, - Aspect_Eye theEye) = 0; + virtual bool SubmitEye(void* theTexture, + Aspect_GraphicsLibrary theGraphicsLib, + Aspect_ColorSpace theColorSpace, + Aspect_Eye theEye) = 0; //! Return unit scale factor defined as scale factor for m (meters); 1.0 by default. Standard_Real UnitFactor() const { return myUnitFactor; } //! Set unit scale factor. - void SetUnitFactor (Standard_Real theFactor) { myUnitFactor = theFactor; } + void SetUnitFactor(Standard_Real theFactor) { myUnitFactor = theFactor; } //! Return aspect ratio. Standard_Real Aspect() const { return myAspect; } @@ -117,7 +118,7 @@ public: //! Return projection frustum. //! @sa HasProjectionFrustums(). - const Aspect_FrustumLRBT& ProjectionFrustum (Aspect_Eye theEye) const + const Aspect_FrustumLRBT& ProjectionFrustum(Aspect_Eye theEye) const { return theEye == Aspect_Eye_Right ? myFrustumR : myFrustumL; } @@ -130,16 +131,16 @@ public: const gp_Trsf& HeadPose() const { return myHeadPose; } //! Return left hand orientation. - gp_Trsf LeftHandPose() const + gp_Trsf LeftHandPose() const { - const Standard_Integer aDevice = NamedTrackedDevice (Aspect_XRTrackedDeviceRole_LeftHand); + const Standard_Integer aDevice = NamedTrackedDevice(Aspect_XRTrackedDeviceRole_LeftHand); return aDevice != -1 ? myTrackedPoses[aDevice].Orientation : gp_Trsf(); } //! Return right hand orientation. gp_Trsf RightHandPose() const { - const Standard_Integer aDevice = NamedTrackedDevice (Aspect_XRTrackedDeviceRole_RightHand); + const Standard_Integer aDevice = NamedTrackedDevice(Aspect_XRTrackedDeviceRole_RightHand); return aDevice != -1 ? myTrackedPoses[aDevice].Orientation : gp_Trsf(); } @@ -147,69 +148,74 @@ public: const Aspect_TrackedDevicePoseArray& TrackedPoses() const { return myTrackedPoses; } //! Return TRUE if device orientation is defined. - bool HasTrackedPose (Standard_Integer theDevice) const { return myTrackedPoses[theDevice].IsValidPose; } + bool HasTrackedPose(Standard_Integer theDevice) const + { + return myTrackedPoses[theDevice].IsValidPose; + } //! Return index of tracked device of known role, or -1 if undefined. - virtual Standard_Integer NamedTrackedDevice (Aspect_XRTrackedDeviceRole theDevice) const = 0; + virtual Standard_Integer NamedTrackedDevice(Aspect_XRTrackedDeviceRole theDevice) const = 0; //! Load model for displaying device. - //! @param theDevice [in] device index - //! @param theTexture [out] texture source + //! @param[in] theDevice device index + //! @param[out] theTexture texture source //! @return model triangulation or NULL if not found - Handle(Graphic3d_ArrayOfTriangles) LoadRenderModel (Standard_Integer theDevice, - Handle(Image_Texture)& theTexture) + Handle(Graphic3d_ArrayOfTriangles) LoadRenderModel(Standard_Integer theDevice, + Handle(Image_Texture)& theTexture) { - return loadRenderModel (theDevice, true, theTexture); + return loadRenderModel(theDevice, true, theTexture); } //! Load model for displaying device. - //! @param theDevice [in] device index - //! @param theToApplyUnitFactor [in] flag to apply unit scale factor - //! @param theTexture [out] texture source + //! @param[in] theDevice device index + //! @param[in] theToApplyUnitFactor flag to apply unit scale factor + //! @param[out] theTexture texture source //! @return model triangulation or NULL if not found - Handle(Graphic3d_ArrayOfTriangles) LoadRenderModel (Standard_Integer theDevice, - Standard_Boolean theToApplyUnitFactor, - Handle(Image_Texture)& theTexture) + Handle(Graphic3d_ArrayOfTriangles) LoadRenderModel(Standard_Integer theDevice, + Standard_Boolean theToApplyUnitFactor, + Handle(Image_Texture)& theTexture) { - return loadRenderModel (theDevice, theToApplyUnitFactor, theTexture); + return loadRenderModel(theDevice, theToApplyUnitFactor, theTexture); } //! Fetch data for digital input action (like button). - //! @param theAction [in] action of Aspect_XRActionType_InputDigital type - virtual Aspect_XRDigitalActionData GetDigitalActionData (const Handle(Aspect_XRAction)& theAction) const = 0; + //! @param[in] theAction action of Aspect_XRActionType_InputDigital type + virtual Aspect_XRDigitalActionData GetDigitalActionData( + const Handle(Aspect_XRAction)& theAction) const = 0; //! Fetch data for digital input action (like axis). - //! @param theAction [in] action of Aspect_XRActionType_InputAnalog type - virtual Aspect_XRAnalogActionData GetAnalogActionData (const Handle(Aspect_XRAction)& theAction) const = 0; + //! @param[in] theAction action of Aspect_XRActionType_InputAnalog type + virtual Aspect_XRAnalogActionData GetAnalogActionData( + const Handle(Aspect_XRAction)& theAction) const = 0; //! Fetch data for pose input action (like fingertip position). //! The returned values will match the values returned by the last call to WaitPoses(). - //! @param theAction [in] action of Aspect_XRActionType_InputPose type - virtual Aspect_XRPoseActionData GetPoseActionDataForNextFrame (const Handle(Aspect_XRAction)& theAction) const = 0; + //! @param[in] theAction action of Aspect_XRActionType_InputPose type + virtual Aspect_XRPoseActionData GetPoseActionDataForNextFrame( + const Handle(Aspect_XRAction)& theAction) const = 0; //! Trigger vibration. - Standard_EXPORT void TriggerHapticVibrationAction (const Handle(Aspect_XRAction)& theAction, - const Aspect_XRHapticActionData& theParams); + Standard_EXPORT void TriggerHapticVibrationAction(const Handle(Aspect_XRAction)& theAction, + const Aspect_XRHapticActionData& theParams); //! Abort vibration. - Standard_EXPORT void AbortHapticVibrationAction (const Handle(Aspect_XRAction)& theAction); + Standard_EXPORT void AbortHapticVibrationAction(const Handle(Aspect_XRAction)& theAction); //! Return tracking origin. TrackingUniverseOrigin TrackingOrigin() const { return myTrackOrigin; } //! Set tracking origin. - virtual void SetTrackingOrigin (TrackingUniverseOrigin theOrigin) { myTrackOrigin = theOrigin; } + virtual void SetTrackingOrigin(TrackingUniverseOrigin theOrigin) { myTrackOrigin = theOrigin; } //! Return generic action for specific hand or NULL if undefined. - const Handle(Aspect_XRAction)& GenericAction (Aspect_XRTrackedDeviceRole theDevice, - Aspect_XRGenericAction theAction) const + const Handle(Aspect_XRAction)& GenericAction(Aspect_XRTrackedDeviceRole theDevice, + Aspect_XRGenericAction theAction) const { const NCollection_Array1& anActions = myRoleActions[theDevice]; return anActions[theAction]; } public: - //! Info string enumeration. enum InfoString { @@ -220,29 +226,28 @@ public: }; //! Query information. - virtual TCollection_AsciiString GetString (InfoString theInfo) const = 0; + virtual TCollection_AsciiString GetString(InfoString theInfo) const = 0; protected: - //! Empty constructor. Standard_EXPORT Aspect_XRSession(); //! Load model for displaying device. - //! @param theDevice [in] device index - //! @param theToApplyUnitFactor [in] flag to apply unit scale factor - //! @param theTexture [out] texture source + //! @param[in] theDevice device index + //! @param[in] theToApplyUnitFactor flag to apply unit scale factor + //! @param[out] theTexture texture source //! @return model triangulation or NULL if not found - virtual Handle(Graphic3d_ArrayOfTriangles) loadRenderModel (Standard_Integer theDevice, - Standard_Boolean theToApplyUnitFactor, - Handle(Image_Texture)& theTexture) = 0; + virtual Handle(Graphic3d_ArrayOfTriangles) loadRenderModel(Standard_Integer theDevice, + Standard_Boolean theToApplyUnitFactor, + Handle(Image_Texture)& theTexture) = 0; //! Trigger vibration. - virtual void triggerHapticVibrationAction (const Handle(Aspect_XRAction)& theAction, - const Aspect_XRHapticActionData& theParams) = 0; + virtual void triggerHapticVibrationAction(const Handle(Aspect_XRAction)& theAction, + const Aspect_XRHapticActionData& theParams) = 0; protected: - NCollection_Array1 + // clang-format off myRoleActions[Aspect_XRTrackedDeviceRole_NB]; //!< generic actions Aspect_XRActionSetMap myActionSets; //!< actions sets TrackingUniverseOrigin myTrackOrigin; //!< tracking origin @@ -252,11 +257,11 @@ protected: Aspect_FrustumLRBT myFrustumL; //!< left eye projection frustum Aspect_FrustumLRBT myFrustumR; //!< right eye projection frustum Standard_Real myUnitFactor; //!< unit scale factor defined as scale factor for m (meters) - Standard_Real myAspect; //!< aspect ratio - Standard_Real myFieldOfView; //!< field of view - Standard_Real myIod; //!< intra-ocular distance in meters - Standard_ShortReal myDispFreq; //!< display frequency - + // clang-format on + Standard_Real myAspect; //!< aspect ratio + Standard_Real myFieldOfView; //!< field of view + Standard_Real myIod; //!< intra-ocular distance in meters + Standard_ShortReal myDispFreq; //!< display frequency }; #endif // _Aspect_XRSession_HeaderFile diff --git a/opencascade/Aspect_XRTrackedDeviceRole.hxx b/opencascade/Aspect_XRTrackedDeviceRole.hxx index d0890ce93..4af1de76c 100644 --- a/opencascade/Aspect_XRTrackedDeviceRole.hxx +++ b/opencascade/Aspect_XRTrackedDeviceRole.hxx @@ -22,6 +22,10 @@ enum Aspect_XRTrackedDeviceRole Aspect_XRTrackedDeviceRole_RightHand, //!< right hand Aspect_XRTrackedDeviceRole_Other, //!< other devices }; -enum { Aspect_XRTrackedDeviceRole_NB = Aspect_XRTrackedDeviceRole_Other + 1 }; + +enum +{ + Aspect_XRTrackedDeviceRole_NB = Aspect_XRTrackedDeviceRole_Other + 1 +}; #endif // _Aspect_XRTrackedDeviceRole_HeaderFile diff --git a/opencascade/BOPAlgo_Algo.hxx b/opencascade/BOPAlgo_Algo.hxx index d65caf187..b77ae5c9b 100644 --- a/opencascade/BOPAlgo_Algo.hxx +++ b/opencascade/BOPAlgo_Algo.hxx @@ -32,15 +32,14 @@ class BOPAlgo_PISteps; class BOPAlgo_Algo : public BOPAlgo_Options { public: - DEFINE_STANDARD_ALLOC //! The main method to implement the operation //! Providing the range allows to enable Progress indicator User break functionalities. - Standard_EXPORT virtual void Perform(const Message_ProgressRange& theRange = Message_ProgressRange()) = 0; + Standard_EXPORT virtual void Perform( + const Message_ProgressRange& theRange = Message_ProgressRange()) = 0; protected: - //! Default constructor Standard_EXPORT BOPAlgo_Algo(); Standard_EXPORT virtual ~BOPAlgo_Algo(); @@ -54,7 +53,6 @@ protected: Standard_EXPORT virtual void CheckResult(); protected: //! @name Analyzing operations to fill progress indicator - //! Analyze progress steps of the whole operation. //! @param theWhole - sum of progress of all operations. //! @oaram theSteps - steps of the operations supported by PI @@ -63,13 +61,15 @@ protected: //! @name Analyzing operations to fill progress indicator //! * fillPIConstants - method filling values for constant operations. //! * fillPISteps - method filling steps for the rest of operations. Standard_EXPORT void analyzeProgress(const Standard_Real theWhole, - BOPAlgo_PISteps& theSteps) const; + BOPAlgo_PISteps& theSteps) const; - //! Fills the values for constant operations - the operations having constant relative running time. - //! @param theWhole - sum of all operations supported by PI, i.e. the value to normalize the steps to, if necessary. + //! Fills the values for constant operations - the operations having constant relative running + //! time. + //! @param theWhole - sum of all operations supported by PI, i.e. the value to normalize the steps + //! to, if necessary. //! @param theSteps - steps of the operations supported by PI Standard_EXPORT virtual void fillPIConstants(const Standard_Real theWhole, - BOPAlgo_PISteps& theSteps) const; + BOPAlgo_PISteps& theSteps) const; //! Fills the values for the operations dependent on the inputs. //! Filled values may not be normalized to represent percentage of total running time. @@ -95,10 +95,7 @@ public: public: //! Sets the range for a single run - void SetProgressRange(const Message_ProgressRange& theRange) - { - myProgressRange = theRange; - } + void SetProgressRange(const Message_ProgressRange& theRange) { myProgressRange = theRange; } private: //! Disable the range enabled method @@ -115,13 +112,14 @@ class BOPAlgo_PISteps public: //! Constructor BOPAlgo_PISteps(const Standard_Integer theNbOp) - : mySteps(0, theNbOp - 1) + : mySteps(0, theNbOp - 1) { mySteps.Init(0); } //! Returns the steps const TColStd_Array1OfReal& Steps() const { return mySteps; } + //! Returns modifiable steps TColStd_Array1OfReal& ChangeSteps() { return mySteps; } diff --git a/opencascade/BOPAlgo_ArgumentAnalyzer.hxx b/opencascade/BOPAlgo_ArgumentAnalyzer.hxx index 854215817..4ef2ca5b2 100644 --- a/opencascade/BOPAlgo_ArgumentAnalyzer.hxx +++ b/opencascade/BOPAlgo_ArgumentAnalyzer.hxx @@ -26,134 +26,122 @@ #include #include - //! check the validity of argument(s) for Boolean Operations -class BOPAlgo_ArgumentAnalyzer : public BOPAlgo_Algo +class BOPAlgo_ArgumentAnalyzer : public BOPAlgo_Algo { public: - DEFINE_STANDARD_ALLOC - //! empty constructor Standard_EXPORT BOPAlgo_ArgumentAnalyzer(); -Standard_EXPORT virtual ~BOPAlgo_ArgumentAnalyzer(); - + Standard_EXPORT virtual ~BOPAlgo_ArgumentAnalyzer(); + //! sets object shape - Standard_EXPORT void SetShape1 (const TopoDS_Shape& TheShape); - + Standard_EXPORT void SetShape1(const TopoDS_Shape& TheShape); + //! sets tool shape - Standard_EXPORT void SetShape2 (const TopoDS_Shape& TheShape); - + Standard_EXPORT void SetShape2(const TopoDS_Shape& TheShape); + //! returns object shape; Standard_EXPORT const TopoDS_Shape& GetShape1() const; - + //! returns tool shape Standard_EXPORT const TopoDS_Shape& GetShape2() const; - + //! returns ref Standard_EXPORT BOPAlgo_Operation& OperationType(); - + //! returns ref Standard_EXPORT Standard_Boolean& StopOnFirstFaulty(); - + //! Returns (modifiable) mode //! that means checking types of shapes. - Standard_Boolean& ArgumentTypeMode(); - + Standard_Boolean& ArgumentTypeMode(); + //! Returns (modifiable) mode that means //! checking of self-intersection of shapes. - Standard_Boolean& SelfInterMode(); - + Standard_Boolean& SelfInterMode(); + //! Returns (modifiable) mode that means //! checking of small edges. - Standard_Boolean& SmallEdgeMode(); - + Standard_Boolean& SmallEdgeMode(); + //! Returns (modifiable) mode that means //! checking of possibility to split or rebuild faces. - Standard_Boolean& RebuildFaceMode(); - + Standard_Boolean& RebuildFaceMode(); + //! Returns (modifiable) mode that means //! checking of tangency between subshapes. - Standard_Boolean& TangentMode(); - + Standard_Boolean& TangentMode(); + //! Returns (modifiable) mode that means //! checking of problem of merging vertices. - Standard_Boolean& MergeVertexMode(); - + Standard_Boolean& MergeVertexMode(); + //! Returns (modifiable) mode that means //! checking of problem of merging edges. - Standard_Boolean& MergeEdgeMode(); - + Standard_Boolean& MergeEdgeMode(); + //! Returns (modifiable) mode that means //! checking of problem of continuity of the shape. - Standard_Boolean& ContinuityMode(); - + Standard_Boolean& ContinuityMode(); + //! Returns (modifiable) mode that means //! checking of problem of invalid curve on surface. - Standard_Boolean& CurveOnSurfaceMode(); - + Standard_Boolean& CurveOnSurfaceMode(); + //! performs analysis Standard_EXPORT void Perform(const Message_ProgressRange& theRange = Message_ProgressRange()); - + //! result of test Standard_EXPORT Standard_Boolean HasFaulty() const; - + //! returns a result of test Standard_EXPORT const BOPAlgo_ListOfCheckResult& GetCheckResult() const; - protected: - - //! Prepares data; Standard_EXPORT void Prepare(); - + Standard_EXPORT void TestTypes(); - + Standard_EXPORT void TestSelfInterferences(const Message_ProgressRange& theRange); - + Standard_EXPORT void TestSmallEdge(); - + Standard_EXPORT void TestRebuildFace(); - + Standard_EXPORT void TestTangent(); - - Standard_EXPORT void TestMergeSubShapes (const TopAbs_ShapeEnum theType); - + + Standard_EXPORT void TestMergeSubShapes(const TopAbs_ShapeEnum theType); + Standard_EXPORT void TestMergeVertex(); - + Standard_EXPORT void TestMergeEdge(); - + Standard_EXPORT void TestContinuity(); - + Standard_EXPORT void TestCurveOnSurface(); - private: - - - TopoDS_Shape myShape1; - TopoDS_Shape myShape2; - Standard_Boolean myStopOnFirst; - BOPAlgo_Operation myOperation; - Standard_Boolean myArgumentTypeMode; - Standard_Boolean mySelfInterMode; - Standard_Boolean mySmallEdgeMode; - Standard_Boolean myRebuildFaceMode; - Standard_Boolean myTangentMode; - Standard_Boolean myMergeVertexMode; - Standard_Boolean myMergeEdgeMode; - Standard_Boolean myContinuityMode; - Standard_Boolean myCurveOnSurfaceMode; - Standard_Boolean myEmpty1; - Standard_Boolean myEmpty2; + TopoDS_Shape myShape1; + TopoDS_Shape myShape2; + Standard_Boolean myStopOnFirst; + BOPAlgo_Operation myOperation; + Standard_Boolean myArgumentTypeMode; + Standard_Boolean mySelfInterMode; + Standard_Boolean mySmallEdgeMode; + Standard_Boolean myRebuildFaceMode; + Standard_Boolean myTangentMode; + Standard_Boolean myMergeVertexMode; + Standard_Boolean myMergeEdgeMode; + Standard_Boolean myContinuityMode; + Standard_Boolean myCurveOnSurfaceMode; + Standard_Boolean myEmpty1; + Standard_Boolean myEmpty2; BOPAlgo_ListOfCheckResult myResult; - }; - #include - #endif // _BOPAlgo_ArgumentAnalyzer_HeaderFile diff --git a/opencascade/BOPAlgo_ArgumentAnalyzer.lxx b/opencascade/BOPAlgo_ArgumentAnalyzer.lxx index d5102f030..7005d6f28 100644 --- a/opencascade/BOPAlgo_ArgumentAnalyzer.lxx +++ b/opencascade/BOPAlgo_ArgumentAnalyzer.lxx @@ -11,57 +11,52 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -inline Standard_Boolean& BOPAlgo_ArgumentAnalyzer::ArgumentTypeMode() +inline Standard_Boolean& BOPAlgo_ArgumentAnalyzer::ArgumentTypeMode() { return myArgumentTypeMode; } - -inline Standard_Boolean& BOPAlgo_ArgumentAnalyzer::SelfInterMode() +inline Standard_Boolean& BOPAlgo_ArgumentAnalyzer::SelfInterMode() { return mySelfInterMode; } - -inline Standard_Boolean& BOPAlgo_ArgumentAnalyzer::SmallEdgeMode() +inline Standard_Boolean& BOPAlgo_ArgumentAnalyzer::SmallEdgeMode() { return mySmallEdgeMode; } - -inline Standard_Boolean& BOPAlgo_ArgumentAnalyzer::RebuildFaceMode() +inline Standard_Boolean& BOPAlgo_ArgumentAnalyzer::RebuildFaceMode() { return myRebuildFaceMode; } - -inline Standard_Boolean& BOPAlgo_ArgumentAnalyzer::TangentMode() +inline Standard_Boolean& BOPAlgo_ArgumentAnalyzer::TangentMode() { return myTangentMode; } - -inline Standard_Boolean& BOPAlgo_ArgumentAnalyzer::MergeVertexMode() +inline Standard_Boolean& BOPAlgo_ArgumentAnalyzer::MergeVertexMode() { return myMergeVertexMode; } - -inline Standard_Boolean& BOPAlgo_ArgumentAnalyzer::MergeEdgeMode() +inline Standard_Boolean& BOPAlgo_ArgumentAnalyzer::MergeEdgeMode() { return myMergeEdgeMode; } -inline Standard_Boolean& BOPAlgo_ArgumentAnalyzer::ContinuityMode() +inline Standard_Boolean& BOPAlgo_ArgumentAnalyzer::ContinuityMode() { return myContinuityMode; } -inline Standard_Boolean& BOPAlgo_ArgumentAnalyzer::CurveOnSurfaceMode() +inline Standard_Boolean& BOPAlgo_ArgumentAnalyzer::CurveOnSurfaceMode() { return myCurveOnSurfaceMode; } -// inline Standard_Boolean& BOPAlgo_ArgumentAnalyzer::MergeFaceMode() + +// inline Standard_Boolean& BOPAlgo_ArgumentAnalyzer::MergeFaceMode() // { // return myMergeFaceMode; // } diff --git a/opencascade/BOPAlgo_BOP.hxx b/opencascade/BOPAlgo_BOP.hxx index ea63fa527..f0f9f617f 100644 --- a/opencascade/BOPAlgo_BOP.hxx +++ b/opencascade/BOPAlgo_BOP.hxx @@ -10,7 +10,7 @@ // distribution for complete text of the license and disclaimer of any warranty. // // Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. +// commercial license or contractual agreement. #ifndef _BOPAlgo_BOP_HeaderFile #define _BOPAlgo_BOP_HeaderFile @@ -60,45 +60,44 @@ class BOPAlgo_PaveFiller; //! - *BOPAlgo_AlertSolidBuilderFailed* - in case the BuilderSolid algorithm failed to //! produce the Fused solid. //! -class BOPAlgo_BOP : public BOPAlgo_ToolsProvider +class BOPAlgo_BOP : public BOPAlgo_ToolsProvider { public: - DEFINE_STANDARD_ALLOC - //! Empty constructor Standard_EXPORT BOPAlgo_BOP(); Standard_EXPORT virtual ~BOPAlgo_BOP(); - + Standard_EXPORT BOPAlgo_BOP(const Handle(NCollection_BaseAllocator)& theAllocator); - + //! Clears internal fields and arguments Standard_EXPORT virtual void Clear() Standard_OVERRIDE; - - Standard_EXPORT void SetOperation (const BOPAlgo_Operation theOperation); - + + Standard_EXPORT void SetOperation(const BOPAlgo_Operation theOperation); + Standard_EXPORT BOPAlgo_Operation Operation() const; - - Standard_EXPORT virtual void Perform(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; + + Standard_EXPORT virtual void Perform( + const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; protected: - Standard_EXPORT virtual void CheckData() Standard_OVERRIDE; - + //! Performs calculations using prepared Filler //! object - Standard_EXPORT virtual void PerformInternal1 (const BOPAlgo_PaveFiller& thePF, - const Message_ProgressRange& theRange) Standard_OVERRIDE; + Standard_EXPORT virtual void PerformInternal1(const BOPAlgo_PaveFiller& thePF, + const Message_ProgressRange& theRange) + Standard_OVERRIDE; + + Standard_EXPORT virtual void BuildResult(const TopAbs_ShapeEnum theType) Standard_OVERRIDE; - Standard_EXPORT virtual void BuildResult (const TopAbs_ShapeEnum theType) Standard_OVERRIDE; - Standard_EXPORT void BuildShape(const Message_ProgressRange& theRange); - + Standard_EXPORT void BuildRC(const Message_ProgressRange& theRange); - + Standard_EXPORT void BuildSolid(const Message_ProgressRange& theRange); - + //! Treatment of the cases with empty shapes.
//! It returns TRUE if there is nothing to do, i.e. //! all shapes in one of the groups are empty shapes. @@ -111,7 +110,6 @@ protected: Standard_EXPORT virtual Standard_Boolean CheckArgsForOpenSolid(); protected: - //! Extend list of operations to be supported by the Progress Indicator enum BOPAlgo_PIOperation { @@ -120,10 +118,10 @@ protected: }; //! Fill PI steps - Standard_EXPORT virtual void fillPIConstants(const Standard_Real theWhole, BOPAlgo_PISteps& theSteps) const Standard_OVERRIDE; + Standard_EXPORT virtual void fillPIConstants(const Standard_Real theWhole, + BOPAlgo_PISteps& theSteps) const Standard_OVERRIDE; protected: - BOPAlgo_Operation myOperation; Standard_Integer myDims[2]; TopoDS_Shape myRC; diff --git a/opencascade/BOPAlgo_Builder.hxx b/opencascade/BOPAlgo_Builder.hxx index 402c0855e..1bec334a7 100644 --- a/opencascade/BOPAlgo_Builder.hxx +++ b/opencascade/BOPAlgo_Builder.hxx @@ -54,23 +54,26 @@ class TopoDS_Shape; //! on the special cases, in which some sub-shapes are coinciding.
//! - *Disabling the check for inverted solids* - Disables/Enables the check of the input solids //! for inverted status (holes in the space). The default value is TRUE, -//! i.e. the check is performed. Setting this flag to FALSE for inverted solids, -//! most likely will lead to incorrect results. +//! i.e. the check is performed. Setting this flag to FALSE for inverted +//! solids, most likely will lead to incorrect results. //! //! The algorithm returns the following warnings: -//! - *BOPAlgo_AlertUnableToOrientTheShape* - in case the check on the orientation of the split shape -//! to match the orientation of the original shape has failed. +//! - *BOPAlgo_AlertUnableToOrientTheShape* - in case the check on the orientation of the split +//! shape +//! to match the orientation of the original shape has +//! failed. //! //! The algorithm returns the following Error statuses: -//! - *BOPAlgo_AlertTooFewArguments* - in case there are no enough arguments to perform the operation; +//! - *BOPAlgo_AlertTooFewArguments* - in case there are no enough arguments to perform the +//! operation; //! - *BOPAlgo_AlertNoFiller* - in case the intersection tool has not been created; //! - *BOPAlgo_AlertIntersectionFailed* - in case the intersection of the arguments has failed; -//! - *BOPAlgo_AlertBuilderFailed* - in case building splits of arguments has failed with some unexpected error. +//! - *BOPAlgo_AlertBuilderFailed* - in case building splits of arguments has failed with some +//! unexpected error. //! -class BOPAlgo_Builder : public BOPAlgo_BuilderShape +class BOPAlgo_Builder : public BOPAlgo_BuilderShape { public: - DEFINE_STANDARD_ALLOC //! Empty constructor. @@ -83,98 +86,64 @@ public: Standard_EXPORT virtual void Clear() Standard_OVERRIDE; //! Returns the PaveFiller, algorithm for sub-shapes intersection. - BOPAlgo_PPaveFiller PPaveFiller() - { - return myPaveFiller; - } + BOPAlgo_PPaveFiller PPaveFiller() { return myPaveFiller; } //! Returns the Data Structure, holder of intersection information. - BOPDS_PDS PDS() - { - return myDS; - } + BOPDS_PDS PDS() { return myDS; } //! Returns the Context, tool for cashing heavy algorithms. - Handle(IntTools_Context) Context() const - { - return myContext; - } - + Handle(IntTools_Context) Context() const { return myContext; } public: //! @name Arguments - //! Adds the argument to the operation. - Standard_EXPORT virtual void AddArgument (const TopoDS_Shape& theShape); + Standard_EXPORT virtual void AddArgument(const TopoDS_Shape& theShape); //! Sets the list of arguments for the operation. - Standard_EXPORT virtual void SetArguments (const TopTools_ListOfShape& theLS); + Standard_EXPORT virtual void SetArguments(const TopTools_ListOfShape& theLS); //! Returns the list of arguments. - const TopTools_ListOfShape& Arguments() const - { - return myArguments; - } + const TopTools_ListOfShape& Arguments() const { return myArguments; } public: //! @name Options - //! Sets the flag that defines the mode of treatment. //! In non-destructive mode the argument shapes are not modified. Instead //! a copy of a sub-shape is created in the result if it is needed to be updated. //! This flag is taken into account if internal PaveFiller is used only. //! In the case of calling PerformWithFiller the corresponding flag of that PaveFiller //! is in force. - void SetNonDestructive(const Standard_Boolean theFlag) - { - myNonDestructive = theFlag; - } + void SetNonDestructive(const Standard_Boolean theFlag) { myNonDestructive = theFlag; } //! Returns the flag that defines the mode of treatment. //! In non-destructive mode the argument shapes are not modified. Instead //! a copy of a sub-shape is created in the result if it is needed to be updated. - Standard_Boolean NonDestructive() const - { - return myNonDestructive; - } + Standard_Boolean NonDestructive() const { return myNonDestructive; } //! Sets the glue option for the algorithm - void SetGlue(const BOPAlgo_GlueEnum theGlue) - { - myGlue = theGlue; - } + void SetGlue(const BOPAlgo_GlueEnum theGlue) { myGlue = theGlue; } //! Returns the glue option of the algorithm - BOPAlgo_GlueEnum Glue() const - { - return myGlue; - } + BOPAlgo_GlueEnum Glue() const { return myGlue; } //! Enables/Disables the check of the input solids for inverted status - void SetCheckInverted(const Standard_Boolean theCheck) - { - myCheckInverted = theCheck; - } + void SetCheckInverted(const Standard_Boolean theCheck) { myCheckInverted = theCheck; } //! Returns the flag defining whether the check for input solids on inverted status //! should be performed or not. - Standard_Boolean CheckInverted() const - { - return myCheckInverted; - } - + Standard_Boolean CheckInverted() const { return myCheckInverted; } public: //! @name Performing the operation - //! Performs the operation. //! The intersection will be performed also. - Standard_EXPORT virtual void Perform(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; + Standard_EXPORT virtual void Perform( + const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; //! Performs the operation with the prepared filler. //! The intersection will not be performed in this case. - Standard_EXPORT virtual void PerformWithFiller (const BOPAlgo_PaveFiller& theFiller, const Message_ProgressRange& theRange = Message_ProgressRange()); - + Standard_EXPORT virtual void PerformWithFiller( + const BOPAlgo_PaveFiller& theFiller, + const Message_ProgressRange& theRange = Message_ProgressRange()); public: //! @name BOPs on open solids - //! Builds the result shape according to the given states for the objects //! and tools. These states can be unambiguously converted into the Boolean operation type. //! Thus, it performs the Boolean operation on the given groups of shapes. @@ -250,32 +219,27 @@ public: //! @name BOPs on open solids TopAbs_State anObjState, aToolsState; switch (theOperation) { - case BOPAlgo_COMMON: - { + case BOPAlgo_COMMON: { anObjState = TopAbs_IN; aToolsState = TopAbs_IN; break; } - case BOPAlgo_FUSE: - { + case BOPAlgo_FUSE: { anObjState = TopAbs_OUT; aToolsState = TopAbs_OUT; break; } - case BOPAlgo_CUT: - { + case BOPAlgo_CUT: { anObjState = TopAbs_OUT; aToolsState = TopAbs_IN; break; } - case BOPAlgo_CUT21: - { + case BOPAlgo_CUT21: { anObjState = TopAbs_IN; aToolsState = TopAbs_OUT; break; } - default: - { + default: { anObjState = TopAbs_UNKNOWN; aToolsState = TopAbs_UNKNOWN; break; @@ -285,7 +249,6 @@ public: //! @name BOPs on open solids } protected: //! @name History methods - //! Prepare information for history support. Standard_EXPORT void PrepareHistory(const Message_ProgressRange& theRange); @@ -296,16 +259,16 @@ protected: //! @name History methods //! boundaries. In this case each split should be linked to the unified shape. //! //! To have correct history information, the method should be redefined in each operation - //! where such additional modification is possible. The input shape should be the one from arguments, - //! and the returning list should contain all final elements to which the input shape has evolved, - //! including those not contained in the result shape. + //! where such additional modification is possible. The input shape should be the one from + //! arguments, and the returning list should contain all final elements to which the input shape + //! has evolved, including those not contained in the result shape. //! //! The method returns pointer to the list of modified elements. //! NULL pointer means that the shape has not been modified at all. //! //! The General Fuse operation does not perform any other modification than splitting the input - //! shapes basing on their intersection information. This information is contained in myImages map. - //! Thus, here the method returns only splits (if any) contained in this map. + //! shapes basing on their intersection information. This information is contained in myImages + //! map. Thus, here the method returns only splits (if any) contained in this map. Standard_EXPORT virtual const TopTools_ListOfShape* LocModified(const TopoDS_Shape& theS); //! Returns the list of shapes generated from the shape theS. @@ -314,28 +277,17 @@ protected: //! @name History methods Standard_EXPORT virtual const TopTools_ListOfShape& LocGenerated(const TopoDS_Shape& theS); public: //! @name Images/Origins - //! Returns the map of images. - const TopTools_DataMapOfShapeListOfShape& Images() const - { - return myImages; - } + const TopTools_DataMapOfShapeListOfShape& Images() const { return myImages; } //! Returns the map of origins. - const TopTools_DataMapOfShapeListOfShape& Origins() const - { - return myOrigins; - } + const TopTools_DataMapOfShapeListOfShape& Origins() const { return myOrigins; } //! Returns the map of Same Domain (SD) shapes - coinciding shapes //! from different arguments. - const TopTools_DataMapOfShapeShape& ShapesSD() const - { - return myShapesSD; - } - -protected://! @name Analyze progress of the operation + const TopTools_DataMapOfShapeShape& ShapesSD() const { return myShapesSD; } +protected: //! @name Analyze progress of the operation //! List of operations to be supported by the Progress Indicator enum BOPAlgo_PIOperation { @@ -352,7 +304,6 @@ protected://! @name Analyze progress of the operation PIOperation_Last }; - //! Auxiliary structure to get information about number of shapes //! of each type participated in operation. class NbShapes @@ -366,58 +317,71 @@ protected://! @name Analyze progress of the operation } } - Standard_Integer NbVertices() const { return myNbShapesArr[0]; } - Standard_Integer NbEdges() const { return myNbShapesArr[1]; } - Standard_Integer NbWires() const { return myNbShapesArr[2]; } - Standard_Integer NbFaces() const { return myNbShapesArr[3]; } - Standard_Integer NbShells() const { return myNbShapesArr[4]; } - Standard_Integer NbSolids() const { return myNbShapesArr[5]; } + Standard_Integer NbVertices() const { return myNbShapesArr[0]; } + + Standard_Integer NbEdges() const { return myNbShapesArr[1]; } + + Standard_Integer NbWires() const { return myNbShapesArr[2]; } + + Standard_Integer NbFaces() const { return myNbShapesArr[3]; } + + Standard_Integer NbShells() const { return myNbShapesArr[4]; } + + Standard_Integer NbSolids() const { return myNbShapesArr[5]; } + Standard_Integer NbCompsolids() const { return myNbShapesArr[6]; } - Standard_Integer NbCompounds() const { return myNbShapesArr[7]; } - - Standard_Integer& NbVertices() { return myNbShapesArr[0]; } - Standard_Integer& NbEdges() { return myNbShapesArr[1]; } - Standard_Integer& NbWires() { return myNbShapesArr[2]; } - Standard_Integer& NbFaces() { return myNbShapesArr[3]; } - Standard_Integer& NbShells() { return myNbShapesArr[4]; } - Standard_Integer& NbSolids() { return myNbShapesArr[5]; } + + Standard_Integer NbCompounds() const { return myNbShapesArr[7]; } + + Standard_Integer& NbVertices() { return myNbShapesArr[0]; } + + Standard_Integer& NbEdges() { return myNbShapesArr[1]; } + + Standard_Integer& NbWires() { return myNbShapesArr[2]; } + + Standard_Integer& NbFaces() { return myNbShapesArr[3]; } + + Standard_Integer& NbShells() { return myNbShapesArr[4]; } + + Standard_Integer& NbSolids() { return myNbShapesArr[5]; } + Standard_Integer& NbCompsolids() { return myNbShapesArr[6]; } - Standard_Integer& NbCompounds() { return myNbShapesArr[7]; } + + Standard_Integer& NbCompounds() { return myNbShapesArr[7]; } private: Standard_Integer myNbShapesArr[8]; }; protected: - //! Compute number of shapes of certain type participating in operation Standard_EXPORT NbShapes getNbShapes() const; //! Filling steps for constant operations - Standard_EXPORT void fillPIConstants(const Standard_Real theWhole, BOPAlgo_PISteps& theSteps) const Standard_OVERRIDE; + Standard_EXPORT void fillPIConstants(const Standard_Real theWhole, + BOPAlgo_PISteps& theSteps) const Standard_OVERRIDE; //! Filling steps for all other operations Standard_EXPORT void fillPISteps(BOPAlgo_PISteps& theSteps) const Standard_OVERRIDE; protected: //! @name Methods for building the result - //! Performs the building of the result. //! The method calls the PerformInternal1() method surrounded by a try-catch block. - Standard_EXPORT virtual void PerformInternal (const BOPAlgo_PaveFiller& thePF, const Message_ProgressRange& theRange); + Standard_EXPORT virtual void PerformInternal(const BOPAlgo_PaveFiller& thePF, + const Message_ProgressRange& theRange); //! Performs the building of the result. //! To build the result of any other operation //! it will be necessary to override this method. - Standard_EXPORT virtual void PerformInternal1 (const BOPAlgo_PaveFiller& thePF, const Message_ProgressRange& theRange); + Standard_EXPORT virtual void PerformInternal1(const BOPAlgo_PaveFiller& thePF, + const Message_ProgressRange& theRange); //! Builds the result of operation. //! The method is called for each of the arguments type and //! adds into the result the splits of the arguments of that type. - Standard_EXPORT virtual void BuildResult (const TopAbs_ShapeEnum theType); - + Standard_EXPORT virtual void BuildResult(const TopAbs_ShapeEnum theType); protected: //! @name Checking input arguments - //! Checks the input data. Standard_EXPORT virtual void CheckData() Standard_OVERRIDE; @@ -427,31 +391,25 @@ protected: //! @name Checking input arguments //! Prepares the result shape by making it empty compound. Standard_EXPORT virtual void Prepare(); - protected: //! @name Fill Images of VERTICES - //! Fills the images of vertices. Standard_EXPORT void FillImagesVertices(const Message_ProgressRange& theRange); - protected: //! @name Fill Images of EDGES - //! Fills the images of edges. Standard_EXPORT void FillImagesEdges(const Message_ProgressRange& theRange); - protected: //! @name Fill Images of CONTAINERS - //! Fills the images of containers (WIRES/SHELLS/COMPSOLID). - Standard_EXPORT void FillImagesContainers (const TopAbs_ShapeEnum theType, const Message_ProgressRange& theRange); + Standard_EXPORT void FillImagesContainers(const TopAbs_ShapeEnum theType, + const Message_ProgressRange& theRange); //! Builds the image of the given container using the splits //! of its sub-shapes. - Standard_EXPORT void FillImagesContainer (const TopoDS_Shape& theS, const TopAbs_ShapeEnum theType); - + Standard_EXPORT void FillImagesContainer(const TopoDS_Shape& theS, + const TopAbs_ShapeEnum theType); protected: //! @name Fill Images of FACES - //! Fills the images of faces. //! The method consists of three steps: //! 1. Build the splits of faces; @@ -471,9 +429,7 @@ protected: //! @name Fill Images of FACES //! and adds them as INTERNAL into the splits. Standard_EXPORT void FillInternalVertices(const Message_ProgressRange& theRange); - protected: //! @name Fill Images of SOLIDS - //! Fills the images of solids. //! The method consists of four steps: //! 1. Build the draft solid - just rebuild the solid using the splits of faces; @@ -484,43 +440,39 @@ protected: //! @name Fill Images of SOLIDS //! Builds the draft solid by rebuilding the shells of the solid //! with the splits of faces. - Standard_EXPORT void BuildDraftSolid (const TopoDS_Shape& theSolid, - TopoDS_Shape& theDraftSolid, - TopTools_ListOfShape& theLIF); + Standard_EXPORT void BuildDraftSolid(const TopoDS_Shape& theSolid, + TopoDS_Shape& theDraftSolid, + TopTools_ListOfShape& theLIF); //! Finds faces located inside each solid. Standard_EXPORT virtual void FillIn3DParts(TopTools_DataMapOfShapeShape& theDraftSolids, - const Message_ProgressRange& theRange); + const Message_ProgressRange& theRange); //! Builds the splits of the solids using their draft versions //! and faces located inside. Standard_EXPORT void BuildSplitSolids(TopTools_DataMapOfShapeShape& theDraftSolids, - const Message_ProgressRange& theRange); + const Message_ProgressRange& theRange); //! Classifies the vertices and edges from the arguments relatively //! splits of solids and makes them INTERNAL for solids. Standard_EXPORT void FillInternalShapes(const Message_ProgressRange& theRange); - protected: //! @name Fill Images of COMPOUNDS - //! Fills the images of compounds. Standard_EXPORT void FillImagesCompounds(const Message_ProgressRange& theRange); //! Builds the image of the given compound. - Standard_EXPORT void FillImagesCompound (const TopoDS_Shape& theS, - TopTools_MapOfShape& theMF); + Standard_EXPORT void FillImagesCompound(const TopoDS_Shape& theS, TopTools_MapOfShape& theMF); protected: //! @name Post treatment - //! Post treatment of the result of the operation. //! The method checks validity of the sub-shapes of the result //! and updates the tolerances to make them valid. Standard_EXPORT virtual void PostTreat(const Message_ProgressRange& theRange); -protected: //! @name Fields - - TopTools_ListOfShape myArguments; //!< Arguments of the operation +protected: //! @name Fields + TopTools_ListOfShape myArguments; //!< Arguments of the operation + // clang-format off TopTools_MapOfShape myMapFence; //!< Fence map providing the uniqueness of the shapes in the list of arguments BOPAlgo_PPaveFiller myPaveFiller; //!< Pave Filler - algorithm for sub-shapes intersection BOPDS_PDS myDS; //!< Data Structure - holder of intersection information @@ -533,7 +485,7 @@ protected: //! @name Fields Standard_Boolean myNonDestructive; //!< Safe processing option allows avoiding modification of the input shapes BOPAlgo_GlueEnum myGlue; //!< Gluing option allows speeding up the intersection of the input shapes Standard_Boolean myCheckInverted; //!< Check inverted option allows disabling the check of input solids on inverted status - + // clang-format on }; #endif // _BOPAlgo_Builder_HeaderFile diff --git a/opencascade/BOPAlgo_BuilderArea.hxx b/opencascade/BOPAlgo_BuilderArea.hxx index 5f12f43cb..e1194ea39 100644 --- a/opencascade/BOPAlgo_BuilderArea.hxx +++ b/opencascade/BOPAlgo_BuilderArea.hxx @@ -28,77 +28,61 @@ #include class IntTools_Context; - //! The root class for algorithms to build //! faces/solids from set of edges/faces -class BOPAlgo_BuilderArea : public BOPAlgo_Algo +class BOPAlgo_BuilderArea : public BOPAlgo_Algo { public: - DEFINE_STANDARD_ALLOC //! Sets the context for the algorithms - void SetContext (const Handle(IntTools_Context)& theContext) { - myContext = theContext; - } + void SetContext(const Handle(IntTools_Context)& theContext) { myContext = theContext; } //! Returns the input shapes - const TopTools_ListOfShape& Shapes() const { - return myShapes; - } + const TopTools_ListOfShape& Shapes() const { return myShapes; } //! Sets the shapes for building areas - void SetShapes(const TopTools_ListOfShape& theLS) { - myShapes = theLS; - } + void SetShapes(const TopTools_ListOfShape& theLS) { myShapes = theLS; } //! Returns the found loops - const TopTools_ListOfShape& Loops() const { - return myLoops; - } + const TopTools_ListOfShape& Loops() const { return myLoops; } //! Returns the found areas - const TopTools_ListOfShape& Areas() const { - return myAreas; - } + const TopTools_ListOfShape& Areas() const { return myAreas; } //! Defines the preventing of addition of internal parts into result. //! The default value is FALSE, i.e. the internal parts are added into result. - void SetAvoidInternalShapes(const Standard_Boolean theAvoidInternal) { + void SetAvoidInternalShapes(const Standard_Boolean theAvoidInternal) + { myAvoidInternalShapes = theAvoidInternal; } //! Returns the AvoidInternalShapes flag - Standard_Boolean IsAvoidInternalShapes() const { - return myAvoidInternalShapes; - } + Standard_Boolean IsAvoidInternalShapes() const { return myAvoidInternalShapes; } protected: - Standard_EXPORT BOPAlgo_BuilderArea(); Standard_EXPORT virtual ~BOPAlgo_BuilderArea(); - + Standard_EXPORT BOPAlgo_BuilderArea(const Handle(NCollection_BaseAllocator)& theAllocator); - + virtual void PerformShapesToAvoid(const Message_ProgressRange& theRange) = 0; - + virtual void PerformLoops(const Message_ProgressRange& theRange) = 0; - + virtual void PerformAreas(const Message_ProgressRange& theRange) = 0; - - virtual void PerformInternalShapes(const Message_ProgressRange& theRange) = 0; + virtual void PerformInternalShapes(const Message_ProgressRange& theRange) = 0; - Handle(IntTools_Context) myContext; - TopTools_ListOfShape myShapes; - TopTools_ListOfShape myLoops; - TopTools_ListOfShape myLoopsInternal; - TopTools_ListOfShape myAreas; + Handle(IntTools_Context) myContext; + TopTools_ListOfShape myShapes; + TopTools_ListOfShape myLoops; + TopTools_ListOfShape myLoopsInternal; + TopTools_ListOfShape myAreas; TopTools_IndexedMapOfOrientedShape myShapesToAvoid; - Standard_Boolean myAvoidInternalShapes; + Standard_Boolean myAvoidInternalShapes; private: - }; #endif // _BOPAlgo_BuilderArea_HeaderFile diff --git a/opencascade/BOPAlgo_BuilderFace.hxx b/opencascade/BOPAlgo_BuilderFace.hxx index 9cbc032be..54a953871 100644 --- a/opencascade/BOPAlgo_BuilderFace.hxx +++ b/opencascade/BOPAlgo_BuilderFace.hxx @@ -27,61 +27,61 @@ #include #include - //! The algorithm to build new faces from the given faces and //! set of edges lying on this face. //! //! The algorithm returns the following Error statuses: //! - *BOPAlgo_AlertNullInputShapes* - in case the given face is a null shape. //! -class BOPAlgo_BuilderFace : public BOPAlgo_BuilderArea +class BOPAlgo_BuilderFace : public BOPAlgo_BuilderArea { public: - DEFINE_STANDARD_ALLOC - Standard_EXPORT BOPAlgo_BuilderFace(); -Standard_EXPORT virtual ~BOPAlgo_BuilderFace(); - + Standard_EXPORT virtual ~BOPAlgo_BuilderFace(); + Standard_EXPORT BOPAlgo_BuilderFace(const Handle(NCollection_BaseAllocator)& theAllocator); - + //! Sets the face generatix - Standard_EXPORT void SetFace (const TopoDS_Face& theFace); - + Standard_EXPORT void SetFace(const TopoDS_Face& theFace); + //! Returns the face generatix Standard_EXPORT const TopoDS_Face& Face() const; - + //! Performs the algorithm - Standard_EXPORT virtual void Perform(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; - + Standard_EXPORT virtual void Perform( + const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; + Standard_EXPORT TopAbs_Orientation Orientation() const; protected: - //! Collect the edges that //! a) are internal //! b) are the same and have different orientation - Standard_EXPORT virtual void PerformShapesToAvoid(const Message_ProgressRange& theRange) Standard_OVERRIDE; - + Standard_EXPORT virtual void PerformShapesToAvoid(const Message_ProgressRange& theRange) + Standard_OVERRIDE; + //! Build draft wires //! a)myLoops - draft wires that consist of //! boundary edges //! b)myLoopsInternal - draft wires that contains //! inner edges - Standard_EXPORT virtual void PerformLoops(const Message_ProgressRange& theRange) Standard_OVERRIDE; - + Standard_EXPORT virtual void PerformLoops(const Message_ProgressRange& theRange) + Standard_OVERRIDE; + //! Build draft faces that contains boundary edges - Standard_EXPORT virtual void PerformAreas(const Message_ProgressRange& theRange) Standard_OVERRIDE; - + Standard_EXPORT virtual void PerformAreas(const Message_ProgressRange& theRange) + Standard_OVERRIDE; + //! Build finalized faces with internals - Standard_EXPORT virtual void PerformInternalShapes(const Message_ProgressRange& theRange) Standard_OVERRIDE; - + Standard_EXPORT virtual void PerformInternalShapes(const Message_ProgressRange& theRange) + Standard_OVERRIDE; + Standard_EXPORT virtual void CheckData() Standard_OVERRIDE; protected: - - TopoDS_Face myFace; + TopoDS_Face myFace; TopAbs_Orientation myOrientation; }; diff --git a/opencascade/BOPAlgo_BuilderShape.hxx b/opencascade/BOPAlgo_BuilderShape.hxx index 4b66dd7d1..8e8de7f69 100644 --- a/opencascade/BOPAlgo_BuilderShape.hxx +++ b/opencascade/BOPAlgo_BuilderShape.hxx @@ -40,17 +40,13 @@ class TopoDS_Shape; class BOPAlgo_BuilderShape : public BOPAlgo_Algo { public: - DEFINE_STANDARD_ALLOC public: //! @name Getting the result - //! Returns the result of algorithm const TopoDS_Shape& Shape() const { return myShape; } - public: //! @name History methods - //! Returns the list of shapes Modified from the shape theS. const TopTools_ListOfShape& Modified(const TopoDS_Shape& theS) { @@ -101,10 +97,10 @@ public: //! @name History methods if (myFillHistory) { if (myHistory.IsNull()) - // It seems the algorithm has exited with error before filling - // the history. Initialize the History tool to return the empty - // History instead of NULL. - myHistory = new BRepTools_History(); + // It seems the algorithm has exited with error before filling + // the history. Initialize the History tool to return the empty + // History instead of NULL. + myHistory = new BRepTools_History(); return myHistory; } @@ -116,7 +112,6 @@ public: //! @name History methods } public: //! @name Enabling/Disabling the history collection. - //! Allows disabling the history collection void SetToFillHistory(const Standard_Boolean theHistFlag) { myFillHistory = theHistFlag; } @@ -124,24 +119,21 @@ public: //! @name Enabling/Disabling the history collection. Standard_Boolean HasHistory() const { return myFillHistory; } protected: //! @name Constructors - //! Empty constructor BOPAlgo_BuilderShape() - : - BOPAlgo_Algo(), - myFillHistory(Standard_True) - {} + : BOPAlgo_Algo(), + myFillHistory(Standard_True) + { + } //! Constructor with allocator BOPAlgo_BuilderShape(const Handle(NCollection_BaseAllocator)& theAllocator) - : - BOPAlgo_Algo(theAllocator), - myFillHistory(Standard_True) - {} - + : BOPAlgo_Algo(theAllocator), + myFillHistory(Standard_True) + { + } protected: //! @name Clearing - //! Clears the content of the algorithm. virtual void Clear() Standard_OVERRIDE { @@ -150,16 +142,14 @@ protected: //! @name Clearing myMapShape.Clear(); } -protected: //! @name Fields - +protected: //! @name Fields TopoDS_Shape myShape; //!< Result of the operation - TopTools_ListOfShape myHistShapes; //!< Storer for the history shapes - TopTools_MapOfShape myMapShape; //!< cached map of all arguments shapes - - Standard_Boolean myFillHistory; //!< Controls the history filling - Handle(BRepTools_History) myHistory; //!< History tool + TopTools_ListOfShape myHistShapes; //!< Storer for the history shapes + TopTools_MapOfShape myMapShape; //!< cached map of all arguments shapes + Standard_Boolean myFillHistory; //!< Controls the history filling + Handle(BRepTools_History) myHistory; //!< History tool }; #endif // _BOPAlgo_BuilderShape_HeaderFile diff --git a/opencascade/BOPAlgo_BuilderSolid.hxx b/opencascade/BOPAlgo_BuilderSolid.hxx index 1a8e3cea8..2a5b0ce3b 100644 --- a/opencascade/BOPAlgo_BuilderSolid.hxx +++ b/opencascade/BOPAlgo_BuilderSolid.hxx @@ -26,7 +26,6 @@ #include #include - //! Solid Builder is the algorithm for building solids from set of faces. //! The given faces should be non-intersecting, i.e. all coinciding parts //! of the faces should be shared among them. @@ -56,8 +55,8 @@ //! Example of usage of the algorithm: //! ~~~~ //! const TopTools_ListOfShape& aFaces = ...; // Faces to build the solids -//! Standard_Boolean isAvoidInternals = ...; // Flag which defines whether to create the internal shells or not -//! BOPAlgo_BuilderSolid aBS; // Solid Builder tool +//! Standard_Boolean isAvoidInternals = ...; // Flag which defines whether to create the +//! internal shells or not BOPAlgo_BuilderSolid aBS; // Solid Builder tool //! aBS.SetShapes(aFaces); // Set the faces //! aBS.SetAvoidInternalShapes(isAvoidInternals); // Set the AvoidInternalShapesFlag //! aBS.Perform(); // Perform the operation @@ -78,14 +77,12 @@ //! const TopTools_ListOfShape& aSolids = aBS.Areas(); // Obtaining the result solids //! ~~~~ //! -class BOPAlgo_BuilderSolid : public BOPAlgo_BuilderArea +class BOPAlgo_BuilderSolid : public BOPAlgo_BuilderArea { public: - DEFINE_STANDARD_ALLOC public: //! @name Constructors - //! Empty constructor Standard_EXPORT BOPAlgo_BuilderSolid(); Standard_EXPORT virtual ~BOPAlgo_BuilderSolid(); @@ -94,48 +91,45 @@ public: //! @name Constructors Standard_EXPORT BOPAlgo_BuilderSolid(const Handle(NCollection_BaseAllocator)& theAllocator); public: //! @name Performing the operation - //! Performs the construction of the solids from the given faces - Standard_EXPORT virtual void Perform(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; + Standard_EXPORT virtual void Perform( + const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; public: //! @name Getting the bounding boxes of the created solids - //! For classification purposes the algorithm builds the bounding boxes //! for all created solids. This method returns the data map of solid - box pairs. - const TopTools_DataMapOfShapeBox& GetBoxesMap() const - { - return myBoxes; - } + const TopTools_DataMapOfShapeBox& GetBoxesMap() const { return myBoxes; } protected: //! @name Protected methods performing the operation - //! Collect the faces: //! - with INTERNAL orientation; //! - that are alone but given twice with different orientation. //! These faces will be put into the map *myShapesToAvoid* and will be //! avoided in shells construction, but will be classified later on. - Standard_EXPORT virtual void PerformShapesToAvoid(const Message_ProgressRange& theRange) Standard_OVERRIDE; + Standard_EXPORT virtual void PerformShapesToAvoid(const Message_ProgressRange& theRange) + Standard_OVERRIDE; //! Build all possible closed shells from the given faces. //! The method fills the following maps: //! - myLoops - Created closed shells; //! - myLoopsInternal - The shells created from unused faces. - Standard_EXPORT virtual void PerformLoops(const Message_ProgressRange& theRange) Standard_OVERRIDE; + Standard_EXPORT virtual void PerformLoops(const Message_ProgressRange& theRange) + Standard_OVERRIDE; //! Classifies the created shells on the Holes and Growths. //! Creates the solids from the Growths shells. //! Puts the Hole shells into the closest Growths solids. - Standard_EXPORT virtual void PerformAreas(const Message_ProgressRange& theRange) Standard_OVERRIDE; + Standard_EXPORT virtual void PerformAreas(const Message_ProgressRange& theRange) + Standard_OVERRIDE; //! Classifies the unused faces relatively the created solids. //! Puts the classified faces into the closest solids as internal shells. //! Warns the user about unclassified faces if any. - Standard_EXPORT virtual void PerformInternalShapes(const Message_ProgressRange& theRange) Standard_OVERRIDE; + Standard_EXPORT virtual void PerformInternalShapes(const Message_ProgressRange& theRange) + Standard_OVERRIDE; private: - TopTools_DataMapOfShapeBox myBoxes; // Boxes of the produced solids - }; #endif // _BOPAlgo_BuilderSolid_HeaderFile diff --git a/opencascade/BOPAlgo_CellsBuilder.hxx b/opencascade/BOPAlgo_CellsBuilder.hxx index ea922c888..d706b496c 100644 --- a/opencascade/BOPAlgo_CellsBuilder.hxx +++ b/opencascade/BOPAlgo_CellsBuilder.hxx @@ -12,7 +12,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. - #ifndef _BOPAlgo_CellsBuilder_HeaderFile #define _BOPAlgo_CellsBuilder_HeaderFile @@ -44,36 +43,34 @@ //! //! Results: //! -//! The result of the algorithm is compound containing selected parts of the basic types (VERTEX, EDGE, FACE or SOLID). -//! The default result is empty compound. -//! It is possible to add any split part to the result by using the methods AddToRessult() and AddAllToResult(). -//! It is also possible to remove any part from the result by using methods RemoveFromResult() and RemoveAllFromResult(). +//! The result of the algorithm is compound containing selected parts of the basic types (VERTEX, +//! EDGE, FACE or SOLID). The default result is empty compound. It is possible to add any split part +//! to the result by using the methods AddToRessult() and AddAllToResult(). It is also possible to +//! remove any part from the result by using methods RemoveFromResult() and RemoveAllFromResult(). //! The method RemoveAllFromResult() is also suitable for clearing the result. //! //! To remove Internal boundaries it is necessary to set the same material to the -//! parts between which the boundaries should be removed and call the method RemoveInternalBoundaries(). -//! The material should not be equal to 0, as this is default material value. -//! The boundaries between parts with this value will not be removed. -//! One part cannot be added with the different materials. -//! It is also possible to remove the boundaries during combining the result. -//! To do this it is necessary to set the material for parts (not equal to 0) and set the flag bUpdate to TRUE. -//! For the arguments of the types FACE or EDGE it is recommended +//! parts between which the boundaries should be removed and call the method +//! RemoveInternalBoundaries(). The material should not be equal to 0, as this is default material +//! value. The boundaries between parts with this value will not be removed. One part cannot be +//! added with the different materials. It is also possible to remove the boundaries during +//! combining the result. To do this it is necessary to set the material for parts (not equal to 0) +//! and set the flag bUpdate to TRUE. For the arguments of the types FACE or EDGE it is recommended //! to remove the boundaries in the end when the result is completely built. //! It will help to avoid self-intersections in the result. //! //! Note, that if the result contains the parts with same material but of different //! dimension the boundaries between such parts will not be removed. -//! Currently, the removal of the internal boundaries between multi-dimensional shapes is not supported. +//! Currently, the removal of the internal boundaries between multi-dimensional shapes is not +//! supported. //! -//! It is possible to create typed Containers from the parts added to result by using method MakeContainers(). -//! The type of the containers will depend on the type of the arguments: -//! WIRES for EEDGE, SHELLS for FACES and COMPSOLIDS for SOLIDS. -//! The result will be compound containing containers. -//! Adding of the parts to such result will not update containers. -//! The result compound will contain the containers and new added parts (of basic type). -//! Removing of the parts from such result may affect some containers if -//! the parts that should be removed is in container. -//! In this case this container will be rebuilt without that part. +//! It is possible to create typed Containers from the parts added to result by using method +//! MakeContainers(). The type of the containers will depend on the type of the arguments: WIRES for +//! EEDGE, SHELLS for FACES and COMPSOLIDS for SOLIDS. The result will be compound containing +//! containers. Adding of the parts to such result will not update containers. The result compound +//! will contain the containers and new added parts (of basic type). Removing of the parts from such +//! result may affect some containers if the parts that should be removed is in container. In this +//! case this container will be rebuilt without that part. //! //! History: //! @@ -95,8 +92,8 @@ //! - BOPAlgo_AlertRemovalOfIBForEdgesFailed //! - BOPAlgo_AlertRemovalOfIBForSolidsFailed //! -//! The Warning status can be checked with HasWarnings() method or printed with the DumpWarnings() method. -//! If warnings are recorded, the result may be not as expected. +//! The Warning status can be checked with HasWarnings() method or printed with the DumpWarnings() +//! method. If warnings are recorded, the result may be not as expected. //! //! Examples: //! @@ -169,8 +166,7 @@ //! @endcode class BOPAlgo_CellsBuilder : public BOPAlgo_Builder { - public: - +public: DEFINE_STANDARD_ALLOC Standard_EXPORT BOPAlgo_CellsBuilder(); @@ -188,7 +184,7 @@ class BOPAlgo_CellsBuilder : public BOPAlgo_Builder //! defines the arguments which parts should not be taken into result;
//! To be taken into result the part must be IN for all shapes from the list //! and must be OUT of all shapes from the list .
- //! + //! //! To remove internal boundaries between any cells in the result //! variable should be used. The boundaries between //! cells with the same material will be removed. Default value is 0.
@@ -196,14 +192,14 @@ class BOPAlgo_CellsBuilder : public BOPAlgo_Builder //! parameter defines whether to remove boundaries now or not. Standard_EXPORT void AddToResult(const TopTools_ListOfShape& theLSToTake, const TopTools_ListOfShape& theLSToAvoid, - const Standard_Integer theMaterial = 0, - const Standard_Boolean theUpdate = Standard_False); + const Standard_Integer theMaterial = 0, + const Standard_Boolean theUpdate = Standard_False); //! Add all split parts to result.
//! defines the removal of internal boundaries;
//! parameter defines whether to remove boundaries now or not. Standard_EXPORT void AddAllToResult(const Standard_Integer theMaterial = 0, - const Standard_Boolean theUpdate = Standard_False); + const Standard_Boolean theUpdate = Standard_False); //! Removing the parts from result.
//! The parts are defined by two lists of shapes:
@@ -220,7 +216,7 @@ class BOPAlgo_CellsBuilder : public BOPAlgo_Builder //! Removes internal boundaries between cells with the same material.
//! If the result contains the cells with same material but of different dimension //! the removal of internal boundaries between these cells will not be performed.
- //! In case of some errors during the removal the method will set the appropriate warning + //! In case of some errors during the removal the method will set the appropriate warning //! status - use GetReport() to access them. Standard_EXPORT void RemoveInternalBoundaries(); @@ -230,15 +226,17 @@ class BOPAlgo_CellsBuilder : public BOPAlgo_Builder //! Makes the Containers of proper type from the parts added to result. Standard_EXPORT void MakeContainers(); - protected: - +protected: //! Prepare information for history support taking into account //! local modification map of unified elements - myMapModified. - Standard_EXPORT virtual const TopTools_ListOfShape* LocModified(const TopoDS_Shape& theS) Standard_OVERRIDE; + Standard_EXPORT virtual const TopTools_ListOfShape* LocModified(const TopoDS_Shape& theS) + Standard_OVERRIDE; //! Redefined method PerformInternal1 - makes all split parts, //! nullifies the result , and index all parts. - Standard_EXPORT virtual void PerformInternal1 (const BOPAlgo_PaveFiller& thePF, const Message_ProgressRange& theRange) Standard_OVERRIDE; + Standard_EXPORT virtual void PerformInternal1(const BOPAlgo_PaveFiller& thePF, + const Message_ProgressRange& theRange) + Standard_OVERRIDE; //! Indexes the parts for quick access to the arguments. Standard_EXPORT void IndexParts(); @@ -246,20 +244,23 @@ class BOPAlgo_CellsBuilder : public BOPAlgo_Builder //! Looking for the parts defined by two lists. Standard_EXPORT void FindParts(const TopTools_ListOfShape& theLSToTake, const TopTools_ListOfShape& theLSToAvoid, - TopTools_ListOfShape& theParts); + TopTools_ListOfShape& theParts); //! Removes internal boundaries between cells with the same material.
//! Returns TRUE if any internal boundaries have been removed. - Standard_EXPORT Standard_Boolean RemoveInternals(const TopTools_ListOfShape& theLS, - TopTools_ListOfShape& theLSNew, - const TopTools_MapOfShape& theMapKeepBnd = TopTools_MapOfShape()); + Standard_EXPORT Standard_Boolean + RemoveInternals(const TopTools_ListOfShape& theLS, + TopTools_ListOfShape& theLSNew, + const TopTools_MapOfShape& theMapKeepBnd = TopTools_MapOfShape()); // fields - TopoDS_Shape myAllParts; //!< All split parts of the arguments + TopoDS_Shape myAllParts; //!< All split parts of the arguments + // clang-format off TopTools_IndexedDataMapOfShapeListOfShape myIndex; //!< Connection map from all splits parts to the argument shapes from which they were created TopTools_DataMapOfIntegerListOfShape myMaterials; //!< Map of assigned materials (material -> list of shape) TopTools_DataMapOfShapeInteger myShapeMaterial; //!< Map of assigned materials (shape -> material) TopTools_DataMapOfShapeShape myMapModified; //!< Local modification map to track unification of the splits + // clang-format on }; #endif //_BOPAlgo_CellsBuilder_HeaderFile diff --git a/opencascade/BOPAlgo_CheckResult.hxx b/opencascade/BOPAlgo_CheckResult.hxx index 8234d3973..aa57e1bc5 100644 --- a/opencascade/BOPAlgo_CheckResult.hxx +++ b/opencascade/BOPAlgo_CheckResult.hxx @@ -24,103 +24,81 @@ #include #include - //! contains information about faulty shapes and faulty types //! can't be processed by Boolean Operations -class BOPAlgo_CheckResult +class BOPAlgo_CheckResult { public: - DEFINE_STANDARD_ALLOC - //! empty constructor Standard_EXPORT BOPAlgo_CheckResult(); - + //! sets ancestor shape (object) for faulty sub-shapes - Standard_EXPORT void SetShape1 (const TopoDS_Shape& TheShape); - + Standard_EXPORT void SetShape1(const TopoDS_Shape& TheShape); + //! adds faulty sub-shapes from object to a list - Standard_EXPORT void AddFaultyShape1 (const TopoDS_Shape& TheShape); - + Standard_EXPORT void AddFaultyShape1(const TopoDS_Shape& TheShape); + //! sets ancestor shape (tool) for faulty sub-shapes - Standard_EXPORT void SetShape2 (const TopoDS_Shape& TheShape); - + Standard_EXPORT void SetShape2(const TopoDS_Shape& TheShape); + //! adds faulty sub-shapes from tool to a list - Standard_EXPORT void AddFaultyShape2 (const TopoDS_Shape& TheShape); - + Standard_EXPORT void AddFaultyShape2(const TopoDS_Shape& TheShape); + //! returns ancestor shape (object) for faulties Standard_EXPORT const TopoDS_Shape& GetShape1() const; - + //! returns ancestor shape (tool) for faulties Standard_EXPORT const TopoDS_Shape& GetShape2() const; - + //! returns list of faulty shapes for object Standard_EXPORT const TopTools_ListOfShape& GetFaultyShapes1() const; - + //! returns list of faulty shapes for tool Standard_EXPORT const TopTools_ListOfShape& GetFaultyShapes2() const; - + //! set status of faulty - Standard_EXPORT void SetCheckStatus (const BOPAlgo_CheckStatus TheStatus); - + Standard_EXPORT void SetCheckStatus(const BOPAlgo_CheckStatus TheStatus); + //! gets status of faulty Standard_EXPORT BOPAlgo_CheckStatus GetCheckStatus() const; - + //! Sets max distance for the first shape - Standard_EXPORT void SetMaxDistance1 (const Standard_Real theDist); - + Standard_EXPORT void SetMaxDistance1(const Standard_Real theDist); + //! Sets max distance for the second shape - Standard_EXPORT void SetMaxDistance2 (const Standard_Real theDist); - + Standard_EXPORT void SetMaxDistance2(const Standard_Real theDist); + //! Sets the parameter for the first shape - Standard_EXPORT void SetMaxParameter1 (const Standard_Real thePar); - + Standard_EXPORT void SetMaxParameter1(const Standard_Real thePar); + //! Sets the parameter for the second shape - Standard_EXPORT void SetMaxParameter2 (const Standard_Real thePar); - + Standard_EXPORT void SetMaxParameter2(const Standard_Real thePar); + //! Returns the distance for the first shape Standard_EXPORT Standard_Real GetMaxDistance1() const; - + //! Returns the distance for the second shape Standard_EXPORT Standard_Real GetMaxDistance2() const; - + //! Returns the parameter for the fircst shape Standard_EXPORT Standard_Real GetMaxParameter1() const; - + //! Returns the parameter for the second shape Standard_EXPORT Standard_Real GetMaxParameter2() const; - - - protected: - - - - - private: - - - - TopoDS_Shape myShape1; - TopoDS_Shape myShape2; - BOPAlgo_CheckStatus myStatus; + TopoDS_Shape myShape1; + TopoDS_Shape myShape2; + BOPAlgo_CheckStatus myStatus; TopTools_ListOfShape myFaulty1; TopTools_ListOfShape myFaulty2; - Standard_Real myMaxDist1; - Standard_Real myMaxDist2; - Standard_Real myMaxPar1; - Standard_Real myMaxPar2; - - + Standard_Real myMaxDist1; + Standard_Real myMaxDist2; + Standard_Real myMaxPar1; + Standard_Real myMaxPar2; }; - - - - - - #endif // _BOPAlgo_CheckResult_HeaderFile diff --git a/opencascade/BOPAlgo_CheckStatus.hxx b/opencascade/BOPAlgo_CheckStatus.hxx index d0fdf811e..08e8737ff 100644 --- a/opencascade/BOPAlgo_CheckStatus.hxx +++ b/opencascade/BOPAlgo_CheckStatus.hxx @@ -15,21 +15,20 @@ #ifndef _BOPAlgo_CheckStatus_HeaderFile #define _BOPAlgo_CheckStatus_HeaderFile - enum BOPAlgo_CheckStatus { -BOPAlgo_CheckUnknown, -BOPAlgo_BadType, -BOPAlgo_SelfIntersect, -BOPAlgo_TooSmallEdge, -BOPAlgo_NonRecoverableFace, -BOPAlgo_IncompatibilityOfVertex, -BOPAlgo_IncompatibilityOfEdge, -BOPAlgo_IncompatibilityOfFace, -BOPAlgo_OperationAborted, -BOPAlgo_GeomAbs_C0, -BOPAlgo_InvalidCurveOnSurface, -BOPAlgo_NotValid + BOPAlgo_CheckUnknown, + BOPAlgo_BadType, + BOPAlgo_SelfIntersect, + BOPAlgo_TooSmallEdge, + BOPAlgo_NonRecoverableFace, + BOPAlgo_IncompatibilityOfVertex, + BOPAlgo_IncompatibilityOfEdge, + BOPAlgo_IncompatibilityOfFace, + BOPAlgo_OperationAborted, + BOPAlgo_GeomAbs_C0, + BOPAlgo_InvalidCurveOnSurface, + BOPAlgo_NotValid }; #endif // _BOPAlgo_CheckStatus_HeaderFile diff --git a/opencascade/BOPAlgo_CheckerSI.hxx b/opencascade/BOPAlgo_CheckerSI.hxx index ba2f853d9..97becc041 100644 --- a/opencascade/BOPAlgo_CheckerSI.hxx +++ b/opencascade/BOPAlgo_CheckerSI.hxx @@ -24,28 +24,26 @@ #include - //! Checks the shape on self-interference. //! //! The algorithm can set the following errors: //! - *BOPAlgo_AlertMultipleArguments* - The number of the input arguments is not one; -//! - *BOPALgo_ErrorIntersectionFailed* - The check has been aborted during intersection of sub-shapes. -//! In case the error has occurred during intersection of sub-shapes, i.e. -//! in BOPAlgo_PaveFiller::PerformInternal() method, the errors from this method -//! directly will be returned. +//! - *BOPALgo_ErrorIntersectionFailed* - The check has been aborted during intersection of +//! sub-shapes. In case the error has occurred during intersection of sub-shapes, i.e. in +//! BOPAlgo_PaveFiller::PerformInternal() method, the errors from this method directly will be +//! returned. -class BOPAlgo_CheckerSI : public BOPAlgo_PaveFiller +class BOPAlgo_CheckerSI : public BOPAlgo_PaveFiller { public: - DEFINE_STANDARD_ALLOC - Standard_EXPORT BOPAlgo_CheckerSI(); Standard_EXPORT virtual ~BOPAlgo_CheckerSI(); - - Standard_EXPORT virtual void Perform(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; - + + Standard_EXPORT virtual void Perform( + const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; + //! Sets the level of checking shape on self-interference.
//! It defines which interferences will be checked:
//! 0 - only V/V;
@@ -58,10 +56,9 @@ public: //! 7 - V/V, V/E, E/E, V/F, E/F, F/F, V/S and E/S;
//! 8 - V/V, V/E, E/E, V/F, E/F, F/F, V/S, E/S and F/S;
//! 9 - V/V, V/E, E/E, V/F, E/F, F/F, V/S, E/S, F/S and S/S - all interferences (Default value) - Standard_EXPORT void SetLevelOfCheck (const Standard_Integer theLevel); + Standard_EXPORT void SetLevelOfCheck(const Standard_Integer theLevel); protected: - Standard_EXPORT virtual void Init(const Message_ProgressRange& theRange) Standard_OVERRIDE; //! Treats the intersection results @@ -84,12 +81,12 @@ protected: Standard_EXPORT virtual void PerformZZ(const Message_ProgressRange& theRange); //! Used for intersection of edges and faces with solids - Standard_EXPORT virtual void PerformSZ(const TopAbs_ShapeEnum aTS, const Message_ProgressRange& theRange); + Standard_EXPORT virtual void PerformSZ(const TopAbs_ShapeEnum aTS, + const Message_ProgressRange& theRange); Standard_Integer myLevelOfCheck; private: - }; #endif // _BOPAlgo_CheckerSI_HeaderFile diff --git a/opencascade/BOPAlgo_GlueEnum.hxx b/opencascade/BOPAlgo_GlueEnum.hxx index 0a80dd058..b9b2019bb 100644 --- a/opencascade/BOPAlgo_GlueEnum.hxx +++ b/opencascade/BOPAlgo_GlueEnum.hxx @@ -42,8 +42,9 @@ //! The performance improvement in gluing mode is achieved by excluding //! the most time consuming computations according to the given Gluing parameter:
//! 1. Computation of FACE/FACE intersections for partial coincidence;
-//! 2. And computation of VERTEX/FACE, EDGE/FACE and FACE/FACE intersections for full coincidence.
-//! +//! 2. And computation of VERTEX/FACE, EDGE/FACE and FACE/FACE intersections for full +//! coincidence.
+//! //! By setting the Gluing option for the operation user should guarantee //! that the arguments are really coinciding. The algorithms do not check this itself. //! Setting inappropriate option for the operation is likely to lead to incorrect result.
diff --git a/opencascade/BOPAlgo_ListOfCheckResult.hxx b/opencascade/BOPAlgo_ListOfCheckResult.hxx index a72a0583c..a1310678d 100644 --- a/opencascade/BOPAlgo_ListOfCheckResult.hxx +++ b/opencascade/BOPAlgo_ListOfCheckResult.hxx @@ -14,9 +14,9 @@ #ifndef BOPAlgo_ListOfCheckResult_HeaderFile #define BOPAlgo_ListOfCheckResult_HeaderFile -#include +#include -typedef NCollection_List BOPAlgo_ListOfCheckResult; -typedef BOPAlgo_ListOfCheckResult::Iterator BOPAlgo_ListIteratorOfListOfCheckResult; +typedef NCollection_List BOPAlgo_ListOfCheckResult; +typedef BOPAlgo_ListOfCheckResult::Iterator BOPAlgo_ListIteratorOfListOfCheckResult; #endif diff --git a/opencascade/BOPAlgo_MakeConnected.hxx b/opencascade/BOPAlgo_MakeConnected.hxx index 733b4c705..f87e92526 100644 --- a/opencascade/BOPAlgo_MakeConnected.hxx +++ b/opencascade/BOPAlgo_MakeConnected.hxx @@ -27,7 +27,6 @@ #include - //! BOPAlgo_MakeConnected is the algorithm for making the touching //! shapes connected or glued, i.e. for making the coinciding geometries //! be topologically shared among the shapes. @@ -113,8 +112,8 @@ //! } //! //! // Making the connected shape periodic -//! BOPAlgo_MakePeriodic::PeriodicityParams aParams = ...; // Options for periodicity of the connected shape -//! aMC.MakePeriodic(aParams); +//! BOPAlgo_MakePeriodic::PeriodicityParams aParams = ...; // Options for periodicity of the +//! connected shape aMC.MakePeriodic(aParams); //! //! // Shape repetition after making it periodic //! // Check if the shape has been made periodic successfully @@ -132,57 +131,42 @@ class BOPAlgo_MakeConnected : public BOPAlgo_Options { public: - DEFINE_STANDARD_ALLOC public: //! @name Constructor - //! Empty constructor - BOPAlgo_MakeConnected() : BOPAlgo_Options() + BOPAlgo_MakeConnected() + : BOPAlgo_Options() { } - public: //! @name Setters for the shapes to make connected - //! Sets the shape for making them connected. - //! @param theArgs [in] The arguments for the operation. - void SetArguments(const TopTools_ListOfShape& theArgs) - { - myArguments = theArgs; - } + //! @param[in] theArgs The arguments for the operation. + void SetArguments(const TopTools_ListOfShape& theArgs) { myArguments = theArgs; } //! Adds the shape to the arguments. - //! @param theS [in] One of the argument shapes. - void AddArgument(const TopoDS_Shape& theS) - { - myArguments.Append(theS); - } + //! @param[in] theS One of the argument shapes. + void AddArgument(const TopoDS_Shape& theS) { myArguments.Append(theS); } //! Returns the list of arguments of the operation. - const TopTools_ListOfShape& Arguments() const - { - return myArguments; - } + const TopTools_ListOfShape& Arguments() const { return myArguments; } public: //! @name Performing the operations - //! Performs the operation, i.e. makes the input shapes connected. Standard_EXPORT void Perform(); - public: //! @name Shape periodicity & repetition - //! Makes the connected shape periodic. //! Repeated calls of this method overwrite the previous calls //! working with the basis connected shape. - //! @param theParams [in] Periodic options. + //! @param[in] theParams Periodic options. Standard_EXPORT void MakePeriodic(const BOPAlgo_MakePeriodic::PeriodicityParams& theParams); //! Performs repetition of the periodic shape in specified direction //! required number of times. - //! @param theDirectionID [in] The direction's ID (0 for X, 1 for Y, 2 for Z); - //! @param theTimes [in] Requested number of repetitions (sign of the value defines + //! @param[in] theDirectionID The direction's ID (0 for X, 1 for Y, 2 for Z); + //! @param[in] theTimes Requested number of repetitions (sign of the value defines //! the side of the repetition direction (positive or negative)). Standard_EXPORT void RepeatShape(const Standard_Integer theDirectionID, const Standard_Integer theTimes); @@ -192,17 +176,12 @@ public: //! @name Shape periodicity & repetition Standard_EXPORT void ClearRepetitions(); //! Returns the periodicity tool. - const BOPAlgo_MakePeriodic& PeriodicityTool() const - { - return myPeriodicityMaker; - } - + const BOPAlgo_MakePeriodic& PeriodicityTool() const { return myPeriodicityMaker; } public: //! @name Material transitions - //! Returns the original shapes which images contain the //! the given shape with FORWARD orientation. - //! @param theS [in] The shape for which the materials are necessary. + //! @param[in] theS The shape for which the materials are necessary. const TopTools_ListOfShape& MaterialsOnPositiveSide(const TopoDS_Shape& theS) { const TopTools_ListOfShape* pLM = myMaterials.Seek(theS.Oriented(TopAbs_FORWARD)); @@ -211,55 +190,40 @@ public: //! @name Material transitions //! Returns the original shapes which images contain the //! the given shape with REVERSED orientation. - //! @param theS [in] The shape for which the materials are necessary. + //! @param[in] theS The shape for which the materials are necessary. const TopTools_ListOfShape& MaterialsOnNegativeSide(const TopoDS_Shape& theS) { const TopTools_ListOfShape* pLM = myMaterials.Seek(theS.Oriented(TopAbs_REVERSED)); return (pLM ? *pLM : EmptyList()); } - public: //! @name History methods - //! Returns the history of operations - const Handle(BRepTools_History)& History() const - { - return myHistory; - } + const Handle(BRepTools_History)& History() const { return myHistory; } //! Returns the list of shapes modified from the given shape. - //! @param theS [in] The shape for which the modified shapes are necessary. + //! @param[in] theS The shape for which the modified shapes are necessary. const TopTools_ListOfShape& GetModified(const TopoDS_Shape& theS) { return (myHistory.IsNull() ? EmptyList() : myHistory->Modified(theS)); } //! Returns the list of original shapes from which the current shape has been created. - //! @param theS [in] The shape for which the origins are necessary. + //! @param[in] theS The shape for which the origins are necessary. const TopTools_ListOfShape& GetOrigins(const TopoDS_Shape& theS) { const TopTools_ListOfShape* pLOr = myOrigins.Seek(theS); return (pLOr ? *pLOr : EmptyList()); } - public: //! @name Getting the result shapes - //! Returns the resulting connected shape - const TopoDS_Shape& Shape() const - { - return myGlued; - } + const TopoDS_Shape& Shape() const { return myGlued; } //! Returns the resulting periodic & repeated shape - const TopoDS_Shape& PeriodicShape() const - { - return myShape; - } - + const TopoDS_Shape& PeriodicShape() const { return myShape; } public: //! @name Clearing the contents of the algorithm from previous runs - //! Clears the contents of the algorithm. void Clear() { @@ -277,9 +241,7 @@ public: //! @name Clearing the contents of the algorithm from previous runs myShape.Nullify(); } - protected: //! @name Protected methods performing the operation - //! Checks the validity of input data. Standard_EXPORT void CheckData(); @@ -300,7 +262,6 @@ protected: //! @name Protected methods performing the operation Standard_EXPORT void Update(); private: - //! Returns an empty list. const TopTools_ListOfShape& EmptyList() { @@ -309,28 +270,27 @@ private: } protected: //! @name Fields - // Inputs - TopTools_ListOfShape myArguments; //!< Input shapes for making them connected + TopTools_ListOfShape myArguments; //!< Input shapes for making them connected TopTools_IndexedMapOfShape myAllInputsMap; //!< Map of all BRep sub-elements of the input shapes // Tools - BOPAlgo_MakePeriodic myPeriodicityMaker; //!< Tool for making the shape periodic + BOPAlgo_MakePeriodic myPeriodicityMaker; //!< Tool for making the shape periodic // Results - NCollection_DataMap - myMaterials; //!< Map of the materials associations - //! for the border elements - TopTools_DataMapOfShapeListOfShape myOrigins; //!< Map of origins - //! (allows tracking the shape's ancestors) - - Handle(BRepTools_History) myGlueHistory; //!< Gluing History - Handle(BRepTools_History) myHistory; //!< Final History of shapes modifications - //! (including making the shape periodic and repetitions) - - TopoDS_Shape myGlued; //!< The resulting connected (glued) shape - TopoDS_Shape myShape; //!< The resulting shape + NCollection_DataMap + myMaterials; //!< Map of the materials associations + //! for the border elements + TopTools_DataMapOfShapeListOfShape myOrigins; //!< Map of origins + //! (allows tracking the shape's ancestors) + + Handle(BRepTools_History) myGlueHistory; //!< Gluing History + Handle(BRepTools_History) myHistory; //!< Final History of shapes modifications + //! (including making the shape periodic and repetitions) + + TopoDS_Shape myGlued; //!< The resulting connected (glued) shape + TopoDS_Shape myShape; //!< The resulting shape }; #endif // _BOPAlgo_MakeConnected_HeaderFile diff --git a/opencascade/BOPAlgo_MakePeriodic.hxx b/opencascade/BOPAlgo_MakePeriodic.hxx index 8385dfff0..5a34101d8 100644 --- a/opencascade/BOPAlgo_MakePeriodic.hxx +++ b/opencascade/BOPAlgo_MakePeriodic.hxx @@ -84,20 +84,21 @@ //! Example of usage of the algorithm: //! ~~~~ //! TopoDS_Shape aShape = ...; // The shape to make periodic -//! Standard_Boolean bMakeXPeriodic = ...; // Flag for making or not the shape periodic in X direction -//! Standard_Real aXPeriod = ...; // X period for the shape -//! Standard_Boolean isXTrimmed = ...; // Flag defining whether it is necessary to trimming +//! Standard_Boolean bMakeXPeriodic = ...; // Flag for making or not the shape periodic in X +//! direction Standard_Real aXPeriod = ...; // X period for the shape Standard_Boolean +//! isXTrimmed = ...; // Flag defining whether it is necessary to trimming //! // the shape to fit to X period //! Standard_Real aXFirst = ...; // Start of the X period -//! // (really necessary only if the trimming is requested) +//! // (really necessary only if the trimming is +//! requested) //! Standard_Boolean bRunParallel = ...; // Parallel processing mode or single //! //! BOPAlgo_MakePeriodic aPeriodicityMaker; // Periodicity maker //! aPeriodicityMaker.SetShape(aShape); // Set the shape -//! aPeriodicityMaker.MakeXPeriodic(bMakePeriodic, aXPeriod); // Making the shape periodic in X direction -//! aPeriodicityMaker.SetTrimmed(isXTrimmed, aXFirst); // Trim the shape to fit X period -//! aPeriodicityMaker.SetRunParallel(bRunParallel); // Set the parallel processing mode -//! aPeriodicityMaker.Perform(); // Performing the operation +//! aPeriodicityMaker.MakeXPeriodic(bMakePeriodic, aXPeriod); // Making the shape periodic in X +//! direction aPeriodicityMaker.SetTrimmed(isXTrimmed, aXFirst); // Trim the shape to fit X +//! period aPeriodicityMaker.SetRunParallel(bRunParallel); // Set the parallel processing +//! mode aPeriodicityMaker.Perform(); // Performing the operation //! //! if (aPeriodicityMaker.HasErrors()) // Check for the errors //! { @@ -123,37 +124,26 @@ class BOPAlgo_MakePeriodic : public BOPAlgo_Options { public: - DEFINE_STANDARD_ALLOC public: //! @name Constructor - //! Empty constructor - BOPAlgo_MakePeriodic() : BOPAlgo_Options() + BOPAlgo_MakePeriodic() + : BOPAlgo_Options() { myRepeatPeriod[0] = myRepeatPeriod[1] = myRepeatPeriod[2] = 0.0; } - public: //! @name Setting the shape to make it periodic - //! Sets the shape to make it periodic. - //! @param theShape [in] The shape to make periodic. - void SetShape(const TopoDS_Shape& theShape) - { - myInputShape = theShape; - } - + //! @param[in] theShape The shape to make periodic. + void SetShape(const TopoDS_Shape& theShape) { myInputShape = theShape; } public: //! @name Definition of the structure to keep all periodicity parameters - //! Structure to keep all periodicity parameters: struct PeriodicityParams { - PeriodicityParams() - { - Clear(); - } + PeriodicityParams() { Clear(); } //! Returns all previously set parameters to default values void Clear() @@ -164,74 +154,66 @@ public: //! @name Definition of the structure to keep all periodicity parameters myPeriodFirst[0] = myPeriodFirst[1] = myPeriodFirst[2] = 0.0; } - Standard_Boolean myPeriodic[3]; //!< Array of flags defining whether the shape should be - //! periodic in XYZ directions - Standard_Real myPeriod[3]; //!< Array of XYZ period values. Defining the period for any - //! direction the corresponding flag for that direction in - //! myPeriodic should be set to true + Standard_Boolean myPeriodic[3]; //!< Array of flags defining whether the shape should be + //! periodic in XYZ directions + Standard_Real myPeriod[3]; //!< Array of XYZ period values. Defining the period for any + //! direction the corresponding flag for that direction in + //! myPeriodic should be set to true + // clang-format off Standard_Boolean myIsTrimmed[3]; //!< Array of flags defining whether the input shape has to be //! trimmed to fit the required period in the required direction Standard_Real myPeriodFirst[3]; //!< Array of start parameters of the XYZ periods: required for trimming + // clang-format on }; - public: //! @name Setters/Getters for periodicity parameters structure - //! Sets the periodicity parameters. - //! @param theParams [in] Periodicity parameters + //! @param[in] theParams Periodicity parameters void SetPeriodicityParameters(const PeriodicityParams& theParams) { myPeriodicityParams = theParams; } - const PeriodicityParams& PeriodicityParameters() const - { - return myPeriodicityParams; - } - + const PeriodicityParams& PeriodicityParameters() const { return myPeriodicityParams; } public: //! @name Methods for setting/getting periodicity info using ID as a direction - //! Sets the flag to make the shape periodic in specified direction: //! - 0 - X direction; //! - 1 - Y direction; //! - 2 - Z direction. //! - //! @param theDirectionID [in] The direction's ID; - //! @param theIsPeriodic [in] Flag defining periodicity in given direction; - //! @param thePeriod [in] Required period in given direction. + //! @param[in] theDirectionID The direction's ID; + //! @param[in] theIsPeriodic Flag defining periodicity in given direction; + //! @param[in] thePeriod Required period in given direction. void MakePeriodic(const Standard_Integer theDirectionID, const Standard_Boolean theIsPeriodic, - const Standard_Real thePeriod = 0.0) + const Standard_Real thePeriod = 0.0) { - Standard_Integer id = ToDirectionID(theDirectionID); + Standard_Integer id = ToDirectionID(theDirectionID); myPeriodicityParams.myPeriodic[id] = theIsPeriodic; - myPeriodicityParams.myPeriod[id] = theIsPeriodic ? thePeriod : 0.0; + myPeriodicityParams.myPeriod[id] = theIsPeriodic ? thePeriod : 0.0; } //! Returns the info about Periodicity of the shape in specified direction. - //! @param theDirectionID [in] The direction's ID. + //! @param[in] theDirectionID The direction's ID. Standard_Boolean IsPeriodic(const Standard_Integer theDirectionID) const { return myPeriodicityParams.myPeriodic[ToDirectionID(theDirectionID)]; } //! Returns the Period of the shape in specified direction. - //! @param theDirectionID [in] The direction's ID. + //! @param[in] theDirectionID The direction's ID. Standard_Real Period(const Standard_Integer theDirectionID) const { Standard_Integer id = ToDirectionID(theDirectionID); return myPeriodicityParams.myPeriodic[id] ? myPeriodicityParams.myPeriod[id] : 0.0; } - public: //! @name Named methods for setting/getting info about shape's periodicity - //! Sets the flag to make the shape periodic in X direction. - //! @param theIsPeriodic [in] Flag defining periodicity in X direction; - //! @param thePeriod [in] Required period in X direction. - void MakeXPeriodic(const Standard_Boolean theIsPeriodic, - const Standard_Real thePeriod = 0.0) + //! @param[in] theIsPeriodic Flag defining periodicity in X direction; + //! @param[in] thePeriod Required period in X direction. + void MakeXPeriodic(const Standard_Boolean theIsPeriodic, const Standard_Real thePeriod = 0.0) { MakePeriodic(0, theIsPeriodic, thePeriod); } @@ -243,10 +225,9 @@ public: //! @name Named methods for setting/getting info about shape's periodici Standard_Real XPeriod() const { return Period(0); } //! Sets the flag to make the shape periodic in Y direction. - //! @param theIsPeriodic [in] Flag defining periodicity in Y direction; - //! @param thePeriod [in] Required period in Y direction. - void MakeYPeriodic(const Standard_Boolean theIsPeriodic, - const Standard_Real thePeriod = 0.0) + //! @param[in] theIsPeriodic Flag defining periodicity in Y direction; + //! @param[in] thePeriod Required period in Y direction. + void MakeYPeriodic(const Standard_Boolean theIsPeriodic, const Standard_Real thePeriod = 0.0) { MakePeriodic(1, theIsPeriodic, thePeriod); } @@ -258,10 +239,9 @@ public: //! @name Named methods for setting/getting info about shape's periodici Standard_Real YPeriod() const { return Period(1); } //! Sets the flag to make the shape periodic in Z direction. - //! @param theIsPeriodic [in] Flag defining periodicity in Z direction; - //! @param thePeriod [in] Required period in Z direction. - void MakeZPeriodic(const Standard_Boolean theIsPeriodic, - const Standard_Real thePeriod = 0.0) + //! @param[in] theIsPeriodic Flag defining periodicity in Z direction; + //! @param[in] thePeriod Required period in Z direction. + void MakeZPeriodic(const Standard_Boolean theIsPeriodic, const Standard_Real thePeriod = 0.0) { MakePeriodic(2, theIsPeriodic, thePeriod); } @@ -272,9 +252,7 @@ public: //! @name Named methods for setting/getting info about shape's periodici //! Returns the ZPeriod of the shape. Standard_Real ZPeriod() const { return Period(2); } - public: //! @name Methods for setting/getting trimming info taking Direction ID as a parameter - //! Defines whether the input shape is already trimmed in specified direction //! to fit the period in this direction. //! Direction is defined by an ID: @@ -288,39 +266,37 @@ public: //! @name Methods for setting/getting trimming info taking Direction ID //! //! Before calling this method, the shape has to be set to be periodic in this direction. //! - //! @param theDirectionID [in] The direction's ID; - //! @param theIsTrimmed [in] The flag defining trimming of the shape in given direction; - //! @param theFirst [in] The first periodic parameter in the given direction. + //! @param[in] theDirectionID The direction's ID; + //! @param[in] theIsTrimmed The flag defining trimming of the shape in given direction; + //! @param[in] theFirst The first periodic parameter in the given direction. void SetTrimmed(const Standard_Integer theDirectionID, const Standard_Boolean theIsTrimmed, - const Standard_Real theFirst = 0.0) + const Standard_Real theFirst = 0.0) { Standard_Integer id = ToDirectionID(theDirectionID); if (IsPeriodic(id)) { - myPeriodicityParams.myIsTrimmed[id] = theIsTrimmed; + myPeriodicityParams.myIsTrimmed[id] = theIsTrimmed; myPeriodicityParams.myPeriodFirst[id] = !theIsTrimmed ? theFirst : 0.0; } } //! Returns whether the input shape was trimmed in the specified direction. - //! @param theDirectionID [in] The direction's ID. + //! @param[in] theDirectionID The direction's ID. Standard_Boolean IsInputTrimmed(const Standard_Integer theDirectionID) const { return myPeriodicityParams.myIsTrimmed[ToDirectionID(theDirectionID)]; } //! Returns the first periodic parameter in the specified direction. - //! @param theDirectionID [in] The direction's ID. + //! @param[in] theDirectionID The direction's ID. Standard_Real PeriodFirst(const Standard_Integer theDirectionID) const { Standard_Integer id = ToDirectionID(theDirectionID); return !myPeriodicityParams.myIsTrimmed[id] ? myPeriodicityParams.myPeriodFirst[id] : 0.0; } - public: //! @name Named methods for setting/getting trimming info - //! Defines whether the input shape is already trimmed in X direction //! to fit the X period. If the shape is not trimmed it is required //! to set the first parameter for the X period. @@ -328,26 +304,19 @@ public: //! @name Named methods for setting/getting trimming info //! //! Before calling this method, the shape has to be set to be periodic in this direction. //! - //! @param theIsTrimmed [in] Flag defining whether the shape is already trimmed + //! @param[in] theIsTrimmed Flag defining whether the shape is already trimmed //! in X direction to fit the X period; - //! @param theFirst [in] The first X periodic parameter. - void SetXTrimmed(const Standard_Boolean theIsTrimmed, - const Standard_Boolean theFirst = 0.0) + //! @param[in] theFirst The first X periodic parameter. + void SetXTrimmed(const Standard_Boolean theIsTrimmed, const Standard_Boolean theFirst = 0.0) { SetTrimmed(0, theIsTrimmed, theFirst); } //! Returns whether the input shape was already trimmed for X period. - Standard_Boolean IsInputXTrimmed() const - { - return IsInputTrimmed(0); - } + Standard_Boolean IsInputXTrimmed() const { return IsInputTrimmed(0); } //! Returns the first parameter for the X period. - Standard_Real XPeriodFirst() const - { - return PeriodFirst(0); - } + Standard_Real XPeriodFirst() const { return PeriodFirst(0); } //! Defines whether the input shape is already trimmed in Y direction //! to fit the Y period. If the shape is not trimmed it is required @@ -356,26 +325,19 @@ public: //! @name Named methods for setting/getting trimming info //! //! Before calling this method, the shape has to be set to be periodic in this direction. //! - //! @param theIsTrimmed [in] Flag defining whether the shape is already trimmed + //! @param[in] theIsTrimmed Flag defining whether the shape is already trimmed //! in Y direction to fit the Y period; - //! @param theFirst [in] The first Y periodic parameter. - void SetYTrimmed(const Standard_Boolean theIsTrimmed, - const Standard_Boolean theFirst = 0.0) + //! @param[in] theFirst The first Y periodic parameter. + void SetYTrimmed(const Standard_Boolean theIsTrimmed, const Standard_Boolean theFirst = 0.0) { SetTrimmed(1, theIsTrimmed, theFirst); } //! Returns whether the input shape was already trimmed for Y period. - Standard_Boolean IsInputYTrimmed() const - { - return IsInputTrimmed(1); - } + Standard_Boolean IsInputYTrimmed() const { return IsInputTrimmed(1); } //! Returns the first parameter for the Y period. - Standard_Real YPeriodFirst() const - { - return PeriodFirst(1); - } + Standard_Real YPeriodFirst() const { return PeriodFirst(1); } //! Defines whether the input shape is already trimmed in Z direction //! to fit the Z period. If the shape is not trimmed it is required @@ -384,43 +346,33 @@ public: //! @name Named methods for setting/getting trimming info //! //! Before calling this method, the shape has to be set to be periodic in this direction. //! - //! @param theIsTrimmed [in] Flag defining whether the shape is already trimmed + //! @param[in] theIsTrimmed Flag defining whether the shape is already trimmed //! in Z direction to fit the Z period; - //! @param theFirst [in] The first Z periodic parameter. - void SetZTrimmed(const Standard_Boolean theIsTrimmed, - const Standard_Boolean theFirst = 0.0) + //! @param[in] theFirst The first Z periodic parameter. + void SetZTrimmed(const Standard_Boolean theIsTrimmed, const Standard_Boolean theFirst = 0.0) { SetTrimmed(2, theIsTrimmed, theFirst); } //! Returns whether the input shape was already trimmed for Z period. - Standard_Boolean IsInputZTrimmed() const - { - return IsInputTrimmed(2); - } + Standard_Boolean IsInputZTrimmed() const { return IsInputTrimmed(2); } //! Returns the first parameter for the Z period. - Standard_Real ZPeriodFirst() const - { - return PeriodFirst(2); - } + Standard_Real ZPeriodFirst() const { return PeriodFirst(2); } public: //! @name Performing the operation - //! Makes the shape periodic in necessary directions Standard_EXPORT void Perform(); - public: //! @name Using the algorithm to repeat the shape - //! Performs repetition of the shape in specified direction //! required number of times. //! Negative value of times means that the repetition should //! be perform in negative direction. //! Makes the repeated shape a base for following repetitions. //! - //! @param theDirectionID [in] The direction's ID; - //! @param theTimes [in] Requested number of repetitions. + //! @param[in] theDirectionID The direction's ID; + //! @param[in] theTimes Requested number of repetitions. Standard_EXPORT const TopoDS_Shape& RepeatShape(const Standard_Integer theDirectionID, const Standard_Integer theTimes); @@ -429,37 +381,26 @@ public: //! @name Using the algorithm to repeat the shape //! perform in negative X direction. //! Makes the repeated shape a base for following repetitions. //! - //! @param theTimes [in] Requested number of repetitions. - const TopoDS_Shape& XRepeat(const Standard_Integer theTimes) - { - return RepeatShape(0, theTimes); - } + //! @param[in] theTimes Requested number of repetitions. + const TopoDS_Shape& XRepeat(const Standard_Integer theTimes) { return RepeatShape(0, theTimes); } //! Repeats the shape in Y direction specified number of times. //! Negative value of times means that the repetition should be //! perform in negative Y direction. //! Makes the repeated shape a base for following repetitions. //! - //! @param theTimes [in] Requested number of repetitions. - const TopoDS_Shape& YRepeat(const Standard_Integer theTimes) - { - return RepeatShape(1, theTimes); - } + //! @param[in] theTimes Requested number of repetitions. + const TopoDS_Shape& YRepeat(const Standard_Integer theTimes) { return RepeatShape(1, theTimes); } //! Repeats the shape in Z direction specified number of times. //! Negative value of times means that the repetition should be //! perform in negative Z direction. //! Makes the repeated shape a base for following repetitions. //! - //! @param theTimes [in] Requested number of repetitions. - const TopoDS_Shape& ZRepeat(const Standard_Integer theTimes) - { - return RepeatShape(2, theTimes); - } - + //! @param[in] theTimes Requested number of repetitions. + const TopoDS_Shape& ZRepeat(const Standard_Integer theTimes) { return RepeatShape(2, theTimes); } public: //! @name Starting the repetitions over - //! Returns the repeated shape const TopoDS_Shape& RepeatedShape() const { return myRepeatedShape; } @@ -479,18 +420,15 @@ public: //! @name Starting the repetitions over } public: //! @name Obtaining the result shape - //! Returns the resulting periodic shape const TopoDS_Shape& Shape() const { return myShape; } - public: //! @name Getting the identical shapes - //! Returns the identical shapes for the given shape located //! on the opposite periodic side. //! Returns empty list in case the shape has no twin. //! - //! @param theS [in] Shape to get the twins for. + //! @param[in] theS Shape to get the twins for. const TopTools_ListOfShape& GetTwins(const TopoDS_Shape& theS) const { static TopTools_ListOfShape empty; @@ -499,17 +437,11 @@ public: //! @name Getting the identical shapes return (aTwins ? *aTwins : empty); } - public: //! @name Getting the History of the algorithm - //! Returns the History of the algorithm - const Handle(BRepTools_History)& History() const - { - return myHistory; - } + const Handle(BRepTools_History)& History() const { return myHistory; } public: //! @name Clearing the algorithm from previous runs - //! Clears the algorithm from previous runs void Clear() { @@ -524,18 +456,14 @@ public: //! @name Clearing the algorithm from previous runs ClearRepetitions(); } - public: //! @name Conversion of the integer to ID of periodic direction - //! Converts the integer to ID of periodic direction static Standard_Integer ToDirectionID(const Standard_Integer theDirectionID) { return Abs(theDirectionID % 3); } - protected: //! @name Protected methods performing the operation - //! Checks the validity of input data Standard_EXPORT void CheckData(); @@ -559,45 +487,44 @@ protected: //! @name Protected methods performing the operation //! Splits the shape by the given tools, copying the geometry of coinciding //! parts from the given tools to the split shape. - //! @param theTools [in] The tools to split the shape and take the geometry + //! @param[in] theTools The tools to split the shape and take the geometry //! for coinciding parts. - //! @param theSplitShapeHistory [out] The history of shape split - //! @param theSplitToolsHistory [out] The history of tools modifications during the split + //! @param[out] theSplitShapeHistory The history of shape split + //! @param[out] theSplitToolsHistory The history of tools modifications during the split Standard_EXPORT void SplitShape(const TopTools_ListOfShape& theTools, - Handle(BRepTools_History) theSplitShapeHistory = NULL, - Handle(BRepTools_History) theSplitToolsHistory = NULL); + Handle(BRepTools_History) theSplitShapeHistory = NULL, + Handle(BRepTools_History) theSplitToolsHistory = NULL); //! Updates the map of twins after periodic shape repetition. - //! @param theTranslationHistory [in] The history of translation of the periodic shape. - //! @param theGluingHistory [in] The history of gluing of the repeated shapes. + //! @param[in] theTranslationHistory The history of translation of the periodic shape. + //! @param[in] theGluingHistory The history of gluing of the repeated shapes. Standard_EXPORT void UpdateTwins(const BRepTools_History& theTranslationHistory, const BRepTools_History& theGluingHistory); - protected: //! @name Fields - // Inputs - TopoDS_Shape myInputShape; //!< Input shape to make periodic + TopoDS_Shape myInputShape; //!< Input shape to make periodic PeriodicityParams myPeriodicityParams; //!< Periodicity parameters // Results - TopoDS_Shape myShape; //!< Resulting periodic shape (base for repetitions) - TopoDS_Shape myRepeatedShape; //!< Resulting shape after making repetitions of the base - Standard_Real myRepeatPeriod[3]; //!< XYZ repeat period + TopoDS_Shape myShape; //!< Resulting periodic shape (base for repetitions) + TopoDS_Shape myRepeatedShape; //!< Resulting shape after making repetitions of the base + Standard_Real myRepeatPeriod[3]; //!< XYZ repeat period + // clang-format off TopTools_DataMapOfShapeListOfShape myRepeatedTwins; //!< Map of associations of the identical sub-shapes //! after repetition of the periodic shape + // clang-format on // Twins TopTools_DataMapOfShapeListOfShape myTwins; //!< Map of associations of the identical sub-shapes //! located on the opposite sides of the shape // History - Handle(BRepTools_History) mySplitHistory; //!< Split history - history of shapes modification - //! after the split for making the shape periodic - Handle(BRepTools_History) myHistory; //!< Final history of shapes modifications - //! (to include the history of shape repetition) - + Handle(BRepTools_History) mySplitHistory; //!< Split history - history of shapes modification + //! after the split for making the shape periodic + Handle(BRepTools_History) myHistory; //!< Final history of shapes modifications + //! (to include the history of shape repetition) }; #endif // _BOPAlgo_MakePeriodic_HeaderFile diff --git a/opencascade/BOPAlgo_MakerVolume.hxx b/opencascade/BOPAlgo_MakerVolume.hxx index ee64155bc..8db8b7530 100644 --- a/opencascade/BOPAlgo_MakerVolume.hxx +++ b/opencascade/BOPAlgo_MakerVolume.hxx @@ -27,8 +27,6 @@ #include class BOPAlgo_PaveFiller; - - //! The algorithm is to build solids from set of shapes. //! It uses the BOPAlgo_Builder algorithm to intersect the given shapes //! and build the images of faces (if needed) and BOPAlgo_BuilderSolid @@ -105,10 +103,9 @@ class BOPAlgo_PaveFiller; //! } //! // //! const TopoDS_Shape& aResult = aMV.Shape(); //result of the operation -class BOPAlgo_MakerVolume : public BOPAlgo_Builder +class BOPAlgo_MakerVolume : public BOPAlgo_Builder { public: - DEFINE_STANDARD_ALLOC //! Empty constructor. @@ -137,44 +134,46 @@ public: //! Defines the preventing of addition of internal for solid parts into the result. //! By default the internal parts are added into result. - void SetAvoidInternalShapes(const Standard_Boolean theAvoidInternal) { + void SetAvoidInternalShapes(const Standard_Boolean theAvoidInternal) + { myAvoidInternalShapes = theAvoidInternal; } //! Returns the AvoidInternalShapes flag - Standard_Boolean IsAvoidInternalShapes() const { - return myAvoidInternalShapes; - } + Standard_Boolean IsAvoidInternalShapes() const { return myAvoidInternalShapes; } //! Performs the operation. - Standard_EXPORT virtual void Perform(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; + Standard_EXPORT virtual void Perform( + const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; protected: - //! Checks the data. Standard_EXPORT virtual void CheckData() Standard_OVERRIDE; //! Performs the operation. - Standard_EXPORT virtual void PerformInternal1 (const BOPAlgo_PaveFiller& thePF, const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; + Standard_EXPORT virtual void PerformInternal1( + const BOPAlgo_PaveFiller& thePF, + const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; //! Collects all faces. Standard_EXPORT void CollectFaces(); //! Makes solid box. - Standard_EXPORT void MakeBox (TopTools_MapOfShape& theBoxFaces); + Standard_EXPORT void MakeBox(TopTools_MapOfShape& theBoxFaces); //! Builds solids. - Standard_EXPORT void BuildSolids (TopTools_ListOfShape& theLSR, - const Message_ProgressRange& theRange); + Standard_EXPORT void BuildSolids(TopTools_ListOfShape& theLSR, + const Message_ProgressRange& theRange); //! Removes the covering box. - Standard_EXPORT void RemoveBox (TopTools_ListOfShape& theLSR, const TopTools_MapOfShape& theBoxFaces); + Standard_EXPORT void RemoveBox(TopTools_ListOfShape& theLSR, + const TopTools_MapOfShape& theBoxFaces); //! Fills the solids with internal shapes. - Standard_EXPORT void FillInternalShapes (const TopTools_ListOfShape& theLSR); + Standard_EXPORT void FillInternalShapes(const TopTools_ListOfShape& theLSR); //! Builds the result. - Standard_EXPORT void BuildShape (const TopTools_ListOfShape& theLSR); + Standard_EXPORT void BuildShape(const TopTools_ListOfShape& theLSR); protected: //! List of operations to be supported by the Progress Indicator. @@ -195,15 +194,13 @@ protected: Standard_EXPORT void fillPISteps(BOPAlgo_PISteps& theSteps) const Standard_OVERRIDE; protected: - - Standard_Boolean myIntersect; - Bnd_Box myBBox; - TopoDS_Solid mySBox; + Standard_Boolean myIntersect; + Bnd_Box myBBox; + TopoDS_Solid mySBox; TopTools_ListOfShape myFaces; - Standard_Boolean myAvoidInternalShapes; + Standard_Boolean myAvoidInternalShapes; private: - }; #include diff --git a/opencascade/BOPAlgo_MakerVolume.lxx b/opencascade/BOPAlgo_MakerVolume.lxx index 4c0382b08..5bc5e806b 100644 --- a/opencascade/BOPAlgo_MakerVolume.lxx +++ b/opencascade/BOPAlgo_MakerVolume.lxx @@ -13,33 +13,31 @@ // commercial license or contractual agreement. //======================================================================= -//function : BOPAlgo_MakerVolume -//purpose : +// function : BOPAlgo_MakerVolume +// purpose : //======================================================================= inline BOPAlgo_MakerVolume::BOPAlgo_MakerVolume() -: - BOPAlgo_Builder(), - myIntersect(Standard_True), - myAvoidInternalShapes(Standard_False) + : BOPAlgo_Builder(), + myIntersect(Standard_True), + myAvoidInternalShapes(Standard_False) { } //======================================================================= -//function : BOPAlgo_MakerVolume -//purpose : +// function : BOPAlgo_MakerVolume +// purpose : //======================================================================= -inline BOPAlgo_MakerVolume::BOPAlgo_MakerVolume - (const Handle(NCollection_BaseAllocator)& theAllocator) -: - BOPAlgo_Builder(theAllocator), - myIntersect(Standard_True), - myAvoidInternalShapes(Standard_False) +inline BOPAlgo_MakerVolume::BOPAlgo_MakerVolume( + const Handle(NCollection_BaseAllocator)& theAllocator) + : BOPAlgo_Builder(theAllocator), + myIntersect(Standard_True), + myAvoidInternalShapes(Standard_False) { } //======================================================================= -//function : ~BOPAlgo_MakerVolume -//purpose : +// function : ~BOPAlgo_MakerVolume +// purpose : //======================================================================= inline BOPAlgo_MakerVolume::~BOPAlgo_MakerVolume() { @@ -47,22 +45,22 @@ inline BOPAlgo_MakerVolume::~BOPAlgo_MakerVolume() } //======================================================================= -//function : Clear -//purpose : +// function : Clear +// purpose : //======================================================================= inline void BOPAlgo_MakerVolume::Clear() { BOPAlgo_Builder::Clear(); myIntersect = Standard_True; - myBBox = Bnd_Box(); + myBBox = Bnd_Box(); mySBox.Nullify(); myFaces.Clear(); myAvoidInternalShapes = Standard_False; } //======================================================================= -//function : SetIntersect -//purpose : +// function : SetIntersect +// purpose : //======================================================================= inline void BOPAlgo_MakerVolume::SetIntersect(const Standard_Boolean bIntersect) { @@ -70,28 +68,28 @@ inline void BOPAlgo_MakerVolume::SetIntersect(const Standard_Boolean bIntersect) } //======================================================================= -//function : IsIntersect -//purpose : +// function : IsIntersect +// purpose : //======================================================================= -inline Standard_Boolean BOPAlgo_MakerVolume::IsIntersect()const +inline Standard_Boolean BOPAlgo_MakerVolume::IsIntersect() const { return myIntersect; } //======================================================================= -//function : Box -//purpose : +// function : Box +// purpose : //======================================================================= -inline const TopoDS_Solid& BOPAlgo_MakerVolume::Box()const +inline const TopoDS_Solid& BOPAlgo_MakerVolume::Box() const { return mySBox; } //======================================================================= -//function : Faces -//purpose : +// function : Faces +// purpose : //======================================================================= -inline const TopTools_ListOfShape& BOPAlgo_MakerVolume::Faces()const +inline const TopTools_ListOfShape& BOPAlgo_MakerVolume::Faces() const { return myFaces; } diff --git a/opencascade/BOPAlgo_Operation.hxx b/opencascade/BOPAlgo_Operation.hxx index db8bb571c..d0f96aeda 100644 --- a/opencascade/BOPAlgo_Operation.hxx +++ b/opencascade/BOPAlgo_Operation.hxx @@ -15,15 +15,14 @@ #ifndef _BOPAlgo_Operation_HeaderFile #define _BOPAlgo_Operation_HeaderFile - enum BOPAlgo_Operation { -BOPAlgo_COMMON, -BOPAlgo_FUSE, -BOPAlgo_CUT, -BOPAlgo_CUT21, -BOPAlgo_SECTION, -BOPAlgo_UNKNOWN + BOPAlgo_COMMON, + BOPAlgo_FUSE, + BOPAlgo_CUT, + BOPAlgo_CUT21, + BOPAlgo_SECTION, + BOPAlgo_UNKNOWN }; #endif // _BOPAlgo_Operation_HeaderFile diff --git a/opencascade/BOPAlgo_Options.hxx b/opencascade/BOPAlgo_Options.hxx index 2805d4cbe..f2bf8cf25 100644 --- a/opencascade/BOPAlgo_Options.hxx +++ b/opencascade/BOPAlgo_Options.hxx @@ -24,7 +24,7 @@ class Message_ProgressScope; //! The class provides the following options for the algorithms in Boolean Component: //! - *Memory allocation tool* - tool for memory allocations; -//! - *Error and warning reporting* - allows recording warnings and errors occurred +//! - *Error and warning reporting* - allows recording warnings and errors occurred //! during the operation. //! Error means that the algorithm has failed. //! - *Parallel processing mode* - provides the possibility to perform operation in parallel mode; @@ -36,7 +36,6 @@ class Message_ProgressScope; class BOPAlgo_Options { public: - DEFINE_STANDARD_ALLOC //! Empty constructor @@ -49,59 +48,47 @@ public: Standard_EXPORT virtual ~BOPAlgo_Options(); //! Returns allocator - const Handle(NCollection_BaseAllocator)& Allocator() const - { - return myAllocator; - } + const Handle(NCollection_BaseAllocator)& Allocator() const { return myAllocator; } //! Clears all warnings and errors, and any data cached by the algorithm. //! User defined options are not cleared. - virtual void Clear() - { - myReport->Clear(); - } + virtual void Clear() { myReport->Clear(); } public: //!@name Error reporting mechanism //! Adds the alert as error (fail) - void AddError (const Handle(Message_Alert)& theAlert) + void AddError(const Handle(Message_Alert)& theAlert) { - myReport->AddAlert (Message_Fail, theAlert); + myReport->AddAlert(Message_Fail, theAlert); } //! Adds the alert as warning - void AddWarning (const Handle(Message_Alert)& theAlert) + void AddWarning(const Handle(Message_Alert)& theAlert) { - myReport->AddAlert (Message_Warning, theAlert); + myReport->AddAlert(Message_Warning, theAlert); } //! Returns true if algorithm has failed - Standard_Boolean HasErrors() const - { - return ! myReport->GetAlerts(Message_Fail).IsEmpty(); - } + Standard_Boolean HasErrors() const { return !myReport->GetAlerts(Message_Fail).IsEmpty(); } //! Returns true if algorithm has generated error of specified type - Standard_Boolean HasError (const Handle(Standard_Type)& theType) const + Standard_Boolean HasError(const Handle(Standard_Type)& theType) const { return myReport->HasAlert(theType, Message_Fail); } //! Returns true if algorithm has generated some warning alerts - Standard_Boolean HasWarnings() const - { - return ! myReport->GetAlerts(Message_Warning).IsEmpty(); - } + Standard_Boolean HasWarnings() const { return !myReport->GetAlerts(Message_Warning).IsEmpty(); } //! Returns true if algorithm has generated warning of specified type - Standard_Boolean HasWarning (const Handle(Standard_Type)& theType) const + Standard_Boolean HasWarning(const Handle(Standard_Type)& theType) const { return myReport->HasAlert(theType, Message_Warning); } //! Returns report collecting all errors and warnings - const Handle(Message_Report)& GetReport () const { return myReport; } + const Handle(Message_Report)& GetReport() const { return myReport; } //! Dumps the error status into the given stream Standard_EXPORT void DumpErrors(Standard_OStream& theOS) const; @@ -110,10 +97,7 @@ public: Standard_EXPORT void DumpWarnings(Standard_OStream& theOS) const; //! Clears the warnings of the algorithm - void ClearWarnings() - { - myReport->Clear (Message_Warning); - } + void ClearWarnings() { myReport->Clear(Message_Warning); } public: //!@name Parallel processing mode @@ -127,16 +111,10 @@ public: //! Set the flag of parallel processing //! if is true the parallel processing is switched on //! if is false the parallel processing is switched off - void SetRunParallel(const Standard_Boolean theFlag) - { - myRunParallel = theFlag; - } + void SetRunParallel(const Standard_Boolean theFlag) { myRunParallel = theFlag; } //! Returns the flag of parallel processing - Standard_Boolean RunParallel() const - { - return myRunParallel; - } + Standard_Boolean RunParallel() const { return myRunParallel; } public: //!@name Fuzzy tolerance @@ -145,39 +123,28 @@ public: Standard_EXPORT void SetFuzzyValue(const Standard_Real theFuzz); //! Returns the additional tolerance - Standard_Real FuzzyValue() const - { - return myFuzzyValue; - } + Standard_Real FuzzyValue() const { return myFuzzyValue; } public: //!@name Usage of Oriented Bounding boxes //! Enables/Disables the usage of OBB - void SetUseOBB(const Standard_Boolean theUseOBB) - { - myUseOBB = theUseOBB; - } + void SetUseOBB(const Standard_Boolean theUseOBB) { myUseOBB = theUseOBB; } //! Returns the flag defining usage of OBB - Standard_Boolean UseOBB() const - { - return myUseOBB; - } + Standard_Boolean UseOBB() const { return myUseOBB; } protected: - - //! Adds error to the report if the break signal was caught. Returns true in this case, false otherwise. + //! Adds error to the report if the break signal was caught. Returns true in this case, false + //! otherwise. Standard_EXPORT Standard_Boolean UserBreak(const Message_ProgressScope& thePS); protected: - Handle(NCollection_BaseAllocator) myAllocator; - Handle(Message_Report) myReport; - Standard_Boolean myRunParallel; - Standard_Real myFuzzyValue; - Standard_Boolean myUseOBB; - + Handle(Message_Report) myReport; + Standard_Boolean myRunParallel; + Standard_Real myFuzzyValue; + Standard_Boolean myUseOBB; }; #endif // _BOPAlgo_Options_HeaderFile diff --git a/opencascade/BOPAlgo_PaveFiller.hxx b/opencascade/BOPAlgo_PaveFiller.hxx index a2fb939ab..e2590cc19 100644 --- a/opencascade/BOPAlgo_PaveFiller.hxx +++ b/opencascade/BOPAlgo_PaveFiller.hxx @@ -84,7 +84,8 @@ class TopoDS_Face; //! cases, in which some sub-shapes are coincide.
//! //! The algorithm returns the following Warning statuses: -//! - *BOPAlgo_AlertSelfInterferingShape* - in case some of the argument shapes are self-interfering shapes; +//! - *BOPAlgo_AlertSelfInterferingShape* - in case some of the argument shapes are self-interfering +//! shapes; //! - *BOPAlgo_AlertTooSmallEdge* - in case some edges of the input shapes have no valid range; //! - *BOPAlgo_AlertNotSplittableEdge* - in case some edges of the input shapes has such a small //! valid range so it cannot be split; @@ -92,7 +93,8 @@ class TopoDS_Face; //! of small edges; //! - *BOPAlgo_AlertIntersectionOfPairOfShapesFailed* - in case intersection of some of the //! sub-shapes has failed; -//! - *BOPAlgo_AlertAcquiredSelfIntersection* - in case some sub-shapes of the argument become connected +//! - *BOPAlgo_AlertAcquiredSelfIntersection* - in case some sub-shapes of the argument become +//! connected //! through other shapes; //! - *BOPAlgo_AlertBuildingPCurveFailed* - in case building 2D curve for some of the edges //! on the faces has failed. @@ -103,116 +105,93 @@ class TopoDS_Face; //! - *BOPAlgo_AlertIntersectionFailed* - in case some unexpected error occurred;
//! - *BOPAlgo_AlertNullInputShapes* - in case some of the arguments are null shapes.
//! -class BOPAlgo_PaveFiller : public BOPAlgo_Algo +class BOPAlgo_PaveFiller : public BOPAlgo_Algo { public: - DEFINE_STANDARD_ALLOC - Standard_EXPORT BOPAlgo_PaveFiller(); Standard_EXPORT virtual ~BOPAlgo_PaveFiller(); - + Standard_EXPORT BOPAlgo_PaveFiller(const Handle(NCollection_BaseAllocator)& theAllocator); - + Standard_EXPORT const BOPDS_DS& DS(); - + Standard_EXPORT BOPDS_PDS PDS(); - + Standard_EXPORT const BOPDS_PIterator& Iterator(); - + //! Sets the arguments for operation - void SetArguments (const TopTools_ListOfShape& theLS) - { - myArguments = theLS; - } + void SetArguments(const TopTools_ListOfShape& theLS) { myArguments = theLS; } //! Adds the argument for operation - void AddArgument(const TopoDS_Shape& theShape) - { - myArguments.Append(theShape); - } + void AddArgument(const TopoDS_Shape& theShape) { myArguments.Append(theShape); } //! Returns the list of arguments - const TopTools_ListOfShape& Arguments() const - { - return myArguments; - } - + const TopTools_ListOfShape& Arguments() const { return myArguments; } + Standard_EXPORT const Handle(IntTools_Context)& Context(); - - Standard_EXPORT void SetSectionAttribute (const BOPAlgo_SectionAttribute& theSecAttr); - + + Standard_EXPORT void SetSectionAttribute(const BOPAlgo_SectionAttribute& theSecAttr); + //! Sets the flag that defines the mode of treatment. //! In non-destructive mode the argument shapes are not modified. Instead //! a copy of a sub-shape is created in the result if it is needed to be updated. Standard_EXPORT void SetNonDestructive(const Standard_Boolean theFlag); - + //! Returns the flag that defines the mode of treatment. //! In non-destructive mode the argument shapes are not modified. Instead //! a copy of a sub-shape is created in the result if it is needed to be updated. Standard_EXPORT Standard_Boolean NonDestructive() const; - Standard_EXPORT virtual void Perform(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; - - + Standard_EXPORT virtual void Perform( + const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; //! Sets the glue option for the algorithm Standard_EXPORT void SetGlue(const BOPAlgo_GlueEnum theGlue); - + //! Returns the glue option of the algorithm Standard_EXPORT BOPAlgo_GlueEnum Glue() const; //! Sets the flag to avoid building of p-curves of edges on faces - void SetAvoidBuildPCurve(const Standard_Boolean theValue) - { - myAvoidBuildPCurve = theValue; - } + void SetAvoidBuildPCurve(const Standard_Boolean theValue) { myAvoidBuildPCurve = theValue; } //! Returns the flag to avoid building of p-curves of edges on faces - Standard_Boolean IsAvoidBuildPCurve() const - { - return myAvoidBuildPCurve; - } + Standard_Boolean IsAvoidBuildPCurve() const { return myAvoidBuildPCurve; } protected: + typedef NCollection_DataMap BOPAlgo_DataMapOfPaveBlockBndBox; - typedef NCollection_DataMap - BOPAlgo_DataMapOfPaveBlockBndBox; - - typedef NCollection_DataMap - BOPAlgo_DataMapOfPaveBlockListOfInteger; + typedef NCollection_DataMap + BOPAlgo_DataMapOfPaveBlockListOfInteger; - typedef NCollection_DataMap - BOPAlgo_DataMapOfIntegerMapOfPaveBlock; + typedef NCollection_DataMap + BOPAlgo_DataMapOfIntegerMapOfPaveBlock; - //! Sets non-destructive mode automatically if an argument + //! Sets non-destructive mode automatically if an argument //! contains a locked sub-shape (see TopoDS_Shape::Locked()). Standard_EXPORT void SetNonDestructive(); - + Standard_EXPORT void SetIsPrimary(const Standard_Boolean theFlag); - + Standard_EXPORT Standard_Boolean IsPrimary() const; Standard_EXPORT virtual void PerformInternal(const Message_ProgressRange& theRange); - + Standard_EXPORT virtual void Clear() Standard_OVERRIDE; - + Standard_EXPORT virtual void Init(const Message_ProgressRange& theRange); - + Standard_EXPORT void Prepare(const Message_ProgressRange& theRange); - + Standard_EXPORT virtual void PerformVV(const Message_ProgressRange& theRange); - + Standard_EXPORT virtual void PerformVE(const Message_ProgressRange& theRange); //! Performs the intersection of the vertices with edges. Standard_EXPORT void IntersectVE(const BOPDS_IndexedDataMapOfPaveBlockListOfInteger& theVEPairs, - const Message_ProgressRange& theRange, + const Message_ProgressRange& theRange, const Standard_Boolean bAddInterfs = Standard_True); //! Splits the Pave Blocks of the given edges with the extra paves.
@@ -224,73 +203,73 @@ protected: //! If some of the Pave Blocks are forming the Common Blocks, the splits //! of the Pave Blocks will also form a Common Block. Standard_EXPORT void SplitPaveBlocks(const TColStd_MapOfInteger& theMEdges, - const Standard_Boolean theAddInterfs); + const Standard_Boolean theAddInterfs); Standard_EXPORT virtual void PerformVF(const Message_ProgressRange& theRange); - + Standard_EXPORT virtual void PerformEE(const Message_ProgressRange& theRange); - + Standard_EXPORT virtual void PerformEF(const Message_ProgressRange& theRange); - + Standard_EXPORT virtual void PerformFF(const Message_ProgressRange& theRange); - + Standard_EXPORT void TreatVerticesEE(); - + Standard_EXPORT void MakeSDVerticesFF(const TColStd_DataMapOfIntegerListOfInteger& aDMVLV, - TColStd_DataMapOfIntegerInteger& theDMNewSD); + TColStd_DataMapOfIntegerInteger& theDMNewSD); Standard_EXPORT void MakeSplitEdges(const Message_ProgressRange& theRange); - + Standard_EXPORT void MakeBlocks(const Message_ProgressRange& theRange); - + Standard_EXPORT void MakePCurves(const Message_ProgressRange& theRange); Standard_EXPORT Standard_Integer MakeSDVertices(const TColStd_ListOfInteger& theVertIndices, - const Standard_Boolean theAddInterfs = 1); - + const Standard_Boolean theAddInterfs = 1); + Standard_EXPORT void ProcessDE(const Message_ProgressRange& theRange); - - Standard_EXPORT void FillShrunkData (Handle(BOPDS_PaveBlock)& thePB); - - Standard_EXPORT void FillShrunkData (const TopAbs_ShapeEnum theType1, - const TopAbs_ShapeEnum theType2); + + Standard_EXPORT void FillShrunkData(Handle(BOPDS_PaveBlock)& thePB); + + Standard_EXPORT void FillShrunkData(const TopAbs_ShapeEnum theType1, + const TopAbs_ShapeEnum theType2); //! Analyzes the results of computation of the valid range for the //! pave block and in case of error adds the warning status, otherwise //! saves the valid range in the pave block. Standard_EXPORT void AnalyzeShrunkData(const Handle(BOPDS_PaveBlock)& thePB, - const IntTools_ShrunkRange& theSR); + const IntTools_ShrunkRange& theSR); //! Performs intersection of new vertices, obtained in E/E and E/F intersections - Standard_EXPORT void PerformNewVertices(BOPDS_IndexedDataMapOfShapeCoupleOfPaveBlocks& theMVCPB, - const Handle(NCollection_BaseAllocator)& theAllocator, - const Message_ProgressRange& theRange, - const Standard_Boolean theIsEEIntersection = Standard_True); - - Standard_EXPORT Standard_Boolean CheckFacePaves (const TopoDS_Vertex& theVnew, - const TColStd_MapOfInteger& theMIF); - - Standard_EXPORT static Standard_Boolean CheckFacePaves (const Standard_Integer theN, - const TColStd_MapOfInteger& theMIFOn, - const TColStd_MapOfInteger& theMIFIn); - - Standard_EXPORT Standard_Boolean IsExistingVertex (const gp_Pnt& theP, - const Standard_Real theTol, - const TColStd_MapOfInteger& theMVOn) const; - + Standard_EXPORT void PerformNewVertices( + BOPDS_IndexedDataMapOfShapeCoupleOfPaveBlocks& theMVCPB, + const Handle(NCollection_BaseAllocator)& theAllocator, + const Message_ProgressRange& theRange, + const Standard_Boolean theIsEEIntersection = Standard_True); + + Standard_EXPORT Standard_Boolean CheckFacePaves(const TopoDS_Vertex& theVnew, + const TColStd_MapOfInteger& theMIF); + + Standard_EXPORT static Standard_Boolean CheckFacePaves(const Standard_Integer theN, + const TColStd_MapOfInteger& theMIFOn, + const TColStd_MapOfInteger& theMIFIn); + + Standard_EXPORT Standard_Boolean IsExistingVertex(const gp_Pnt& theP, + const Standard_Real theTol, + const TColStd_MapOfInteger& theMVOn) const; //! Checks and puts paves from on the curve . //! At that, common (from theMVCommon) and not common vertices //! are processed differently. - Standard_EXPORT void PutPavesOnCurve(const TColStd_MapOfInteger& theMVOnIn, - const TColStd_MapOfInteger& theMVCommon, - BOPDS_Curve& theNC, - const TColStd_MapOfInteger& theMI, - const TColStd_MapOfInteger& theMVEF, - TColStd_DataMapOfIntegerReal& theMVTol, + Standard_EXPORT void PutPavesOnCurve(const TColStd_MapOfInteger& theMVOnIn, + const TColStd_MapOfInteger& theMVCommon, + BOPDS_Curve& theNC, + const TColStd_MapOfInteger& theMI, + const TColStd_MapOfInteger& theMVEF, + TColStd_DataMapOfIntegerReal& theMVTol, TColStd_DataMapOfIntegerListOfInteger& theDMVLV); - Standard_EXPORT void FilterPavesOnCurves(const BOPDS_VectorOfCurve& theVNC, + Standard_EXPORT void FilterPavesOnCurves(const BOPDS_VectorOfCurve& theVNC, TColStd_DataMapOfIntegerReal& theMVTol); //! Depending on the parameter aType it checks whether @@ -301,202 +280,199 @@ protected: //! 1 - checks only EE; //! 2 - checks only EF; //! other - checks both types of intersections. - Standard_EXPORT Standard_Boolean ExtendedTolerance (const Standard_Integer nV, - const TColStd_MapOfInteger& aMI, - Standard_Real& aTolVExt, - const Standard_Integer aType = 0); - - Standard_EXPORT void PutBoundPaveOnCurve(const TopoDS_Face& theF1, - const TopoDS_Face& theF2, - BOPDS_Curve& theNC, + Standard_EXPORT Standard_Boolean ExtendedTolerance(const Standard_Integer nV, + const TColStd_MapOfInteger& aMI, + Standard_Real& aTolVExt, + const Standard_Integer aType = 0); + + Standard_EXPORT void PutBoundPaveOnCurve(const TopoDS_Face& theF1, + const TopoDS_Face& theF2, + BOPDS_Curve& theNC, TColStd_ListOfInteger& theLBV); //! Checks if the given pave block (created on section curve) //! coincides with any of the pave blocks of the faces //! created the section curve. - Standard_EXPORT Standard_Boolean IsExistingPaveBlock - (const Handle(BOPDS_PaveBlock)& thePB, const BOPDS_Curve& theNC, - const Standard_Real theTolR3D, - const BOPDS_IndexedMapOfPaveBlock& theMPB, - BOPTools_BoxTree& thePBTree, - const BOPDS_MapOfPaveBlock& theMPBCommon, - Handle(BOPDS_PaveBlock)& thePBOut, Standard_Real& theTolNew); + Standard_EXPORT Standard_Boolean IsExistingPaveBlock(const Handle(BOPDS_PaveBlock)& thePB, + const BOPDS_Curve& theNC, + const Standard_Real theTolR3D, + const BOPDS_IndexedMapOfPaveBlock& theMPB, + BOPTools_BoxTree& thePBTree, + const BOPDS_MapOfPaveBlock& theMPBCommon, + Handle(BOPDS_PaveBlock)& thePBOut, + Standard_Real& theTolNew); //! Checks if the given pave block (created on section curve) //! coincides with any of the edges shared between the faces //! created the section curve. Standard_EXPORT Standard_Boolean IsExistingPaveBlock(const Handle(BOPDS_PaveBlock)& thePB, - const BOPDS_Curve& theNC, - const TColStd_ListOfInteger& theLSE, - Standard_Integer& theNEOut, - Standard_Real& theTolNew); + const BOPDS_Curve& theNC, + const TColStd_ListOfInteger& theLSE, + Standard_Integer& theNEOut, + Standard_Real& theTolNew); //! Treatment of section edges. - Standard_EXPORT void PostTreatFF (BOPDS_IndexedDataMapOfShapeCoupleOfPaveBlocks& theMSCPB, - BOPDS_DataMapOfPaveBlockListOfPaveBlock& theDMExEdges, - TColStd_DataMapOfIntegerInteger& theDMNewSD, - const BOPDS_IndexedMapOfPaveBlock& theMicroPB, - const TopTools_IndexedMapOfShape& theVertsOnRejectedPB, - const Handle(NCollection_BaseAllocator)& theAllocator, - const Message_ProgressRange& theRange); - - Standard_EXPORT void FindPaveBlocks (const Standard_Integer theV, - const Standard_Integer theF, - BOPDS_ListOfPaveBlock& theLPB); - - Standard_EXPORT void FillPaves (const Standard_Integer theV, - const Standard_Integer theE, - const Standard_Integer theF, - const BOPDS_ListOfPaveBlock& theLPB, - const Handle(BOPDS_PaveBlock)& thePB); - - Standard_EXPORT void MakeSplitEdge (const Standard_Integer theV, const Standard_Integer theF); - - Standard_EXPORT void GetEFPnts (const Standard_Integer nF1, - const Standard_Integer nF2, - IntSurf_ListOfPntOn2S& aListOfPnts); - + Standard_EXPORT void PostTreatFF(BOPDS_IndexedDataMapOfShapeCoupleOfPaveBlocks& theMSCPB, + BOPDS_DataMapOfPaveBlockListOfPaveBlock& theDMExEdges, + TColStd_DataMapOfIntegerInteger& theDMNewSD, + const BOPDS_IndexedMapOfPaveBlock& theMicroPB, + const TopTools_IndexedMapOfShape& theVertsOnRejectedPB, + const Handle(NCollection_BaseAllocator)& theAllocator, + const Message_ProgressRange& theRange); + + Standard_EXPORT void FindPaveBlocks(const Standard_Integer theV, + const Standard_Integer theF, + BOPDS_ListOfPaveBlock& theLPB); + + Standard_EXPORT void FillPaves(const Standard_Integer theV, + const Standard_Integer theE, + const Standard_Integer theF, + const BOPDS_ListOfPaveBlock& theLPB, + const Handle(BOPDS_PaveBlock)& thePB); + + Standard_EXPORT void MakeSplitEdge(const Standard_Integer theV, const Standard_Integer theF); + + Standard_EXPORT void GetEFPnts(const Standard_Integer nF1, + const Standard_Integer nF2, + IntSurf_ListOfPntOn2S& aListOfPnts); //! Checks and puts paves created in EF intersections on the curve . - Standard_EXPORT void PutEFPavesOnCurve (const BOPDS_VectorOfCurve& theVC, - const Standard_Integer theIndex, - const TColStd_MapOfInteger& theMI, - const TColStd_MapOfInteger& theMVEF, - TColStd_DataMapOfIntegerReal& theMVTol, - TColStd_DataMapOfIntegerListOfInteger& aDMVLV); - + Standard_EXPORT void PutEFPavesOnCurve(const BOPDS_VectorOfCurve& theVC, + const Standard_Integer theIndex, + const TColStd_MapOfInteger& theMI, + const TColStd_MapOfInteger& theMVEF, + TColStd_DataMapOfIntegerReal& theMVTol, + TColStd_DataMapOfIntegerListOfInteger& aDMVLV); //! Puts stick paves on the curve - Standard_EXPORT void PutStickPavesOnCurve (const TopoDS_Face& aF1, - const TopoDS_Face& aF2, - const TColStd_MapOfInteger& theMI, - const BOPDS_VectorOfCurve& theVC, - const Standard_Integer theIndex, - const TColStd_MapOfInteger& theMVStick, - TColStd_DataMapOfIntegerReal& theMVTol, - TColStd_DataMapOfIntegerListOfInteger& aDMVLV); - + Standard_EXPORT void PutStickPavesOnCurve(const TopoDS_Face& aF1, + const TopoDS_Face& aF2, + const TColStd_MapOfInteger& theMI, + const BOPDS_VectorOfCurve& theVC, + const Standard_Integer theIndex, + const TColStd_MapOfInteger& theMVStick, + TColStd_DataMapOfIntegerReal& theMVTol, + TColStd_DataMapOfIntegerListOfInteger& aDMVLV); //! Collects indices of vertices created in all intersections between //! two faces ( and ) to the map . //! Also, it collects indices of EF vertices to the map //! and indices of all subshapes of these two faces to the map. - Standard_EXPORT void GetStickVertices (const Standard_Integer nF1, - const Standard_Integer nF2, - TColStd_MapOfInteger& theMVStick, - TColStd_MapOfInteger& theMVEF, - TColStd_MapOfInteger& theMI); - + Standard_EXPORT void GetStickVertices(const Standard_Integer nF1, + const Standard_Integer nF2, + TColStd_MapOfInteger& theMVStick, + TColStd_MapOfInteger& theMVEF, + TColStd_MapOfInteger& theMI); //! Collects index nF and indices of all subshapes of the shape with index //! to the map . - Standard_EXPORT void GetFullShapeMap (const Standard_Integer nF, TColStd_MapOfInteger& theMI); - + Standard_EXPORT void GetFullShapeMap(const Standard_Integer nF, TColStd_MapOfInteger& theMI); //! Removes indices of vertices that are already on the //! curve from the map . //! It is used in PutEFPavesOnCurve and PutStickPavesOnCurve methods. - Standard_EXPORT void RemoveUsedVertices (const BOPDS_VectorOfCurve& theVC, TColStd_MapOfInteger& theMV); - + Standard_EXPORT void RemoveUsedVertices(const BOPDS_VectorOfCurve& theVC, + TColStd_MapOfInteger& theMV); //! Puts the pave nV on the curve theNC. //! Parameter aType defines whether to check the pave with //! extended tolerance: //! 0 - do not perform the check; //! other - perform the check (aType goes to ExtendedTolerance). - Standard_EXPORT void PutPaveOnCurve (const Standard_Integer nV, - const Standard_Real theTolR3D, - const BOPDS_Curve& theNC, - const TColStd_MapOfInteger& theMI, - TColStd_DataMapOfIntegerReal& theMVTol, - TColStd_DataMapOfIntegerListOfInteger& aDMVLV, - const Standard_Integer aType = 0); - + Standard_EXPORT void PutPaveOnCurve(const Standard_Integer nV, + const Standard_Real theTolR3D, + const BOPDS_Curve& theNC, + const TColStd_MapOfInteger& theMI, + TColStd_DataMapOfIntegerReal& theMVTol, + TColStd_DataMapOfIntegerListOfInteger& aDMVLV, + const Standard_Integer aType = 0); + //! Adds the existing edges for intersection with section edges //! by checking the possible intersection with the faces comparing //! pre-saved E-F distances with new tolerances. - Standard_EXPORT void ProcessExistingPaveBlocks (const Standard_Integer theInt, - const Standard_Integer theCur, - const Standard_Integer nF1, - const Standard_Integer nF2, - const TopoDS_Edge& theES, - const BOPDS_IndexedMapOfPaveBlock& theMPBOnIn, - BOPTools_BoxTree& thePBTree, - BOPDS_IndexedDataMapOfShapeCoupleOfPaveBlocks& theMSCPB, - TopTools_DataMapOfShapeInteger& theMVI, - BOPDS_ListOfPaveBlock& theLPBC, - BOPAlgo_DataMapOfPaveBlockListOfInteger& thePBFacesMap, - BOPDS_MapOfPaveBlock& theMPB); + Standard_EXPORT void ProcessExistingPaveBlocks( + const Standard_Integer theInt, + const Standard_Integer theCur, + const Standard_Integer nF1, + const Standard_Integer nF2, + const TopoDS_Edge& theES, + const BOPDS_IndexedMapOfPaveBlock& theMPBOnIn, + BOPTools_BoxTree& thePBTree, + BOPDS_IndexedDataMapOfShapeCoupleOfPaveBlocks& theMSCPB, + TopTools_DataMapOfShapeInteger& theMVI, + BOPDS_ListOfPaveBlock& theLPBC, + BOPAlgo_DataMapOfPaveBlockListOfInteger& thePBFacesMap, + BOPDS_MapOfPaveBlock& theMPB); //! Adds the existing edges from the map which interfere //! with the vertices from map to the post treatment of section edges. - Standard_EXPORT void ProcessExistingPaveBlocks (const Standard_Integer theInt, - const Standard_Integer nF1, - const Standard_Integer nF2, - const BOPDS_IndexedMapOfPaveBlock& theMPBOnIn, - BOPTools_BoxTree& thePBTree, - const TColStd_DataMapOfIntegerListOfInteger& theDMBV, - BOPDS_IndexedDataMapOfShapeCoupleOfPaveBlocks& theMSCPB, - TopTools_DataMapOfShapeInteger& theMVI, - BOPAlgo_DataMapOfPaveBlockListOfInteger& thePBFacesMap, - BOPDS_MapOfPaveBlock& theMPB); + Standard_EXPORT void ProcessExistingPaveBlocks( + const Standard_Integer theInt, + const Standard_Integer nF1, + const Standard_Integer nF2, + const BOPDS_IndexedMapOfPaveBlock& theMPBOnIn, + BOPTools_BoxTree& thePBTree, + const TColStd_DataMapOfIntegerListOfInteger& theDMBV, + BOPDS_IndexedDataMapOfShapeCoupleOfPaveBlocks& theMSCPB, + TopTools_DataMapOfShapeInteger& theMVI, + BOPAlgo_DataMapOfPaveBlockListOfInteger& thePBFacesMap, + BOPDS_MapOfPaveBlock& theMPB); //! Replaces existing pave block with new pave blocks . //! The list contains images of which were created in //! the post treatment of section edges. //! Tries to project the new edges on the faces contained in the . - Standard_EXPORT void UpdateExistingPaveBlocks(const Handle(BOPDS_PaveBlock)& thePB, - BOPDS_ListOfPaveBlock& theLPB, - const BOPAlgo_DataMapOfPaveBlockListOfInteger& thePBFacesMap); + Standard_EXPORT void UpdateExistingPaveBlocks( + const Handle(BOPDS_PaveBlock)& thePB, + BOPDS_ListOfPaveBlock& theLPB, + const BOPAlgo_DataMapOfPaveBlockListOfInteger& thePBFacesMap); //! Treatment of vertices that were created in EE intersections. - Standard_EXPORT void TreatNewVertices(const BOPDS_IndexedDataMapOfShapeCoupleOfPaveBlocks& theMVCPB, - TopTools_IndexedDataMapOfShapeListOfShape& theImages); - + Standard_EXPORT void TreatNewVertices( + const BOPDS_IndexedDataMapOfShapeCoupleOfPaveBlocks& theMVCPB, + TopTools_IndexedDataMapOfShapeListOfShape& theImages); //! Put paves on the curve in case when //! is closed 3D-curve - Standard_EXPORT void PutClosingPaveOnCurve (BOPDS_Curve& aNC); - + Standard_EXPORT void PutClosingPaveOnCurve(BOPDS_Curve& aNC); //! Keeps data for post treatment - Standard_EXPORT void PreparePostTreatFF (const Standard_Integer aInt, - const Standard_Integer aCur, - const Handle(BOPDS_PaveBlock)& aPB, - BOPDS_IndexedDataMapOfShapeCoupleOfPaveBlocks& aMSCPB, - TopTools_DataMapOfShapeInteger& aMVI, - BOPDS_ListOfPaveBlock& aLPB); + Standard_EXPORT void PreparePostTreatFF(const Standard_Integer aInt, + const Standard_Integer aCur, + const Handle(BOPDS_PaveBlock)& aPB, + BOPDS_IndexedDataMapOfShapeCoupleOfPaveBlocks& aMSCPB, + TopTools_DataMapOfShapeInteger& aMVI, + BOPDS_ListOfPaveBlock& aLPB); //! Updates the information about faces - Standard_EXPORT void UpdateFaceInfo(BOPDS_DataMapOfPaveBlockListOfPaveBlock& theDME, - const TColStd_DataMapOfIntegerInteger& theDMV, + Standard_EXPORT void UpdateFaceInfo(BOPDS_DataMapOfPaveBlockListOfPaveBlock& theDME, + const TColStd_DataMapOfIntegerInteger& theDMV, const BOPAlgo_DataMapOfPaveBlockListOfInteger& thePBFacesMap); //! Updates tolerance of vertex with index //! to make it interfere with edge. //! Returns TRUE if intersection happened. - Standard_EXPORT Standard_Boolean ForceInterfVE(const Standard_Integer nV, + Standard_EXPORT Standard_Boolean ForceInterfVE(const Standard_Integer nV, Handle(BOPDS_PaveBlock)& aPB, - TColStd_MapOfInteger& theMEdges); + TColStd_MapOfInteger& theMEdges); //! Updates tolerance of vertex with index //! to make it interfere with face with index - Standard_EXPORT Standard_Boolean ForceInterfVF (const Standard_Integer nV, const Standard_Integer nF); - + Standard_EXPORT Standard_Boolean ForceInterfVF(const Standard_Integer nV, + const Standard_Integer nF); //! Checks if there are any common or intersecting sub shapes //! between two planar faces. - Standard_EXPORT Standard_Boolean CheckPlanes (const Standard_Integer nF1, const Standard_Integer nF2) const; - + Standard_EXPORT Standard_Boolean CheckPlanes(const Standard_Integer nF1, + const Standard_Integer nF2) const; //! Creates new edge from the edge nE with vertices nV1 and nV2 //! and returns the index of that new edge in the DS. - Standard_EXPORT Standard_Integer SplitEdge (const Standard_Integer nE, - const Standard_Integer nV1, - const Standard_Real aT1, - const Standard_Integer nV2, - const Standard_Real aT2); - + Standard_EXPORT Standard_Integer SplitEdge(const Standard_Integer nE, + const Standard_Integer nV1, + const Standard_Real aT1, + const Standard_Integer nV2, + const Standard_Real aT2); //! Updates pave blocks which have the paves with indices contained //! in the map . @@ -506,22 +482,21 @@ protected: //! It always creates new vertex if nV is from arguments. //! @return DS index of updated vertex. Standard_EXPORT Standard_Integer UpdateVertex(const Standard_Integer nV, - const Standard_Real aTolNew); - + const Standard_Real aTolNew); + Standard_EXPORT void UpdatePaveBlocksWithSDVertices(); Standard_EXPORT void UpdateCommonBlocksWithSDVertices(); - + Standard_EXPORT void UpdateBlocksWithSharedVertices(); Standard_EXPORT void UpdateInterfsWithSDVertices(); Standard_EXPORT Standard_Boolean EstimatePaveOnCurve(const Standard_Integer nV, - const BOPDS_Curve& theNC, - const Standard_Real theTolR3D); - - Standard_EXPORT void UpdateEdgeTolerance(const Standard_Integer nE, - const Standard_Real aTolNew); + const BOPDS_Curve& theNC, + const Standard_Real theTolR3D); + + Standard_EXPORT void UpdateEdgeTolerance(const Standard_Integer nE, const Standard_Real aTolNew); Standard_EXPORT void RemovePaveBlocks(const TColStd_MapOfInteger& theEdges); @@ -534,8 +509,8 @@ protected: const Standard_Integer theV2, const Standard_Integer theE, const Standard_Integer theF, - Standard_Real& theTS1, - Standard_Real& theTS2); + Standard_Real& theTS1, + Standard_Real& theTS2); //! Gets the bounding box for the given Pave Block. //! If Pave Block has shrunk data it will be used to get the box, @@ -546,14 +521,14 @@ protected: //! it will be saved in the map . //! Returns FALSE in case the PB's range is less than the //! Precision::PConfusion(), otherwise returns TRUE. - Standard_EXPORT Standard_Boolean GetPBBox(const TopoDS_Edge& theE, - const Handle(BOPDS_PaveBlock)& thePB, + Standard_EXPORT Standard_Boolean GetPBBox(const TopoDS_Edge& theE, + const Handle(BOPDS_PaveBlock)& thePB, BOPAlgo_DataMapOfPaveBlockBndBox& thePBBox, - Standard_Real& theFirst, - Standard_Real& theLast, - Standard_Real& theSFirst, - Standard_Real& theSLast, - Bnd_Box& theBox); + Standard_Real& theFirst, + Standard_Real& theLast, + Standard_Real& theSFirst, + Standard_Real& theSLast, + Bnd_Box& theBox); //! Treatment of the possible common zones, not detected by the //! Face/Face intersection algorithm, by intersection of each section edge @@ -594,8 +569,8 @@ protected: //! Performs intersection of given pave blocks //! with all faces from arguments. Standard_EXPORT void ForceInterfEF(const BOPDS_IndexedMapOfPaveBlock& theMPB, - const Message_ProgressRange& theRange, - const Standard_Boolean theAddInterf); + const Message_ProgressRange& theRange, + const Standard_Boolean theAddInterf); //! When all section edges are created and no increase of the tolerance //! of vertices put on the section edges is expected, make sure that @@ -609,8 +584,9 @@ protected: //! Current check is necessary for the edges whose vertices have also //! been put on other section edges with greater tolerance, which has caused //! increase of the tolerance value of the vertices. - Standard_EXPORT void RemoveMicroSectionEdges(BOPDS_IndexedDataMapOfShapeCoupleOfPaveBlocks& theMSCPB, - BOPDS_IndexedMapOfPaveBlock& theMicroPB); + Standard_EXPORT void RemoveMicroSectionEdges( + BOPDS_IndexedDataMapOfShapeCoupleOfPaveBlocks& theMSCPB, + BOPDS_IndexedMapOfPaveBlock& theMicroPB); //! Check all edges on the micro status and remove the positive ones Standard_EXPORT void RemoveMicroEdges(); @@ -622,32 +598,35 @@ protected: Standard_Real Last; Standard_Real Distance; - EdgeRangeDistance (const Standard_Real theFirst = 0.0, - const Standard_Real theLast = 0.0, - const Standard_Real theDistance = RealLast()) - : First (theFirst), Last (theLast), Distance (theDistance) - {} + EdgeRangeDistance(const Standard_Real theFirst = 0.0, + const Standard_Real theLast = 0.0, + const Standard_Real theDistance = RealLast()) + : First(theFirst), + Last(theLast), + Distance(theDistance) + { + } }; protected: //! Analyzing Progress steps - //! Filling steps for constant operations - Standard_EXPORT void fillPIConstants(const Standard_Real theWhole, BOPAlgo_PISteps& theSteps) const Standard_OVERRIDE; + Standard_EXPORT void fillPIConstants(const Standard_Real theWhole, + BOPAlgo_PISteps& theSteps) const Standard_OVERRIDE; //! Filling steps for all other operations Standard_EXPORT void fillPISteps(BOPAlgo_PISteps& theSteps) const Standard_OVERRIDE; protected: //! Fields - - TopTools_ListOfShape myArguments; - BOPDS_PDS myDS; - BOPDS_PIterator myIterator; + TopTools_ListOfShape myArguments; + BOPDS_PDS myDS; + BOPDS_PIterator myIterator; Handle(IntTools_Context) myContext; BOPAlgo_SectionAttribute mySectionAttribute; - Standard_Boolean myNonDestructive; - Standard_Boolean myIsPrimary; - Standard_Boolean myAvoidBuildPCurve; - BOPAlgo_GlueEnum myGlue; + Standard_Boolean myNonDestructive; + Standard_Boolean myIsPrimary; + Standard_Boolean myAvoidBuildPCurve; + BOPAlgo_GlueEnum myGlue; + // clang-format off BOPAlgo_DataMapOfIntegerMapOfPaveBlock myFPBDone; //!< Fence map of intersected faces and pave blocks TColStd_MapOfInteger myIncreasedSS; //!< Sub-shapes with increased tolerance during the operation TColStd_MapOfInteger myVertsToAvoidExtension; //!< Vertices located close to E/E or E/F intersection points @@ -659,7 +638,7 @@ protected: //! Fields NCollection_List> myDistances; //!< Map to store minimal distances between shapes //! which have no real intersections - + // clang-format on }; #endif // _BOPAlgo_PaveFiller_HeaderFile diff --git a/opencascade/BOPAlgo_RemoveFeatures.hxx b/opencascade/BOPAlgo_RemoveFeatures.hxx index 1303bc857..ff8476a54 100644 --- a/opencascade/BOPAlgo_RemoveFeatures.hxx +++ b/opencascade/BOPAlgo_RemoveFeatures.hxx @@ -144,45 +144,33 @@ //! When all possible features are removed, the shape is simplified by //! removing extra edges and vertices, created during operation, from the result shape. //! -class BOPAlgo_RemoveFeatures: public BOPAlgo_BuilderShape +class BOPAlgo_RemoveFeatures : public BOPAlgo_BuilderShape { public: DEFINE_STANDARD_ALLOC public: //! @name Constructors - //! Empty constructor BOPAlgo_RemoveFeatures() - : - BOPAlgo_BuilderShape() - {} - + : BOPAlgo_BuilderShape() + { + } public: //! @name Setting input data for the algorithm - //! Sets the shape for processing. - //! @param theShape [in] The shape to remove the faces from. + //! @param[in] theShape The shape to remove the faces from. //! It should either be the SOLID, COMPSOLID or COMPOUND of Solids. - void SetShape(const TopoDS_Shape& theShape) - { - myInputShape = theShape; - } + void SetShape(const TopoDS_Shape& theShape) { myInputShape = theShape; } //! Returns the input shape - const TopoDS_Shape& InputShape() const - { - return myInputShape; - } + const TopoDS_Shape& InputShape() const { return myInputShape; } //! Adds the face to remove from the input shape. - //! @param theFace [in] The shape to extract the faces for removal. - void AddFaceToRemove(const TopoDS_Shape& theFace) - { - myFacesToRemove.Append(theFace); - } + //! @param[in] theFace The shape to extract the faces for removal. + void AddFaceToRemove(const TopoDS_Shape& theFace) { myFacesToRemove.Append(theFace); } //! Adds the faces to remove from the input shape. - //! @param theFaces [in] The list of shapes to extract the faces for removal. + //! @param[in] theFaces The list of shapes to extract the faces for removal. void AddFacesToRemove(const TopTools_ListOfShape& theFaces) { TopTools_ListIteratorOfListOfShape it(theFaces); @@ -192,20 +180,14 @@ public: //! @name Setting input data for the algorithm //! Returns the list of faces which have been requested for removal //! from the input shape. - const TopTools_ListOfShape& FacesToRemove() const - { - return myFacesToRemove; - } - + const TopTools_ListOfShape& FacesToRemove() const { return myFacesToRemove; } public: //! @name Performing the operation - //! Performs the operation - Standard_EXPORT virtual void Perform(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; - + Standard_EXPORT virtual void Perform( + const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; public: //! @name Clearing the contents of the algorithm - //! Clears the contents of the algorithm from previous run, //! allowing reusing it for following removals. virtual void Clear() Standard_OVERRIDE @@ -218,9 +200,7 @@ public: //! @name Clearing the contents of the algorithm myInputsMap.Clear(); } - protected: //! @name Protected methods performing the removal - //! Checks the input data on validity for the algorithm: //! - The input shape must be either a SOLID, COMPSOLID or COMPOUND of Solids. //! If the input shape is not a solid, the method looks for the solids @@ -238,23 +218,23 @@ protected: //! @name Protected methods performing the removal Standard_EXPORT void RemoveFeatures(const Message_ProgressRange& theRange); //! Remove the single feature from the shape. - //! @param theFeature [in] The feature to remove; - //! @param theSolids [in] The solids to be reconstructed after feature removal; - //! @param theFeatureFacesMap [in] The map of feature faces; - //! @param theHasAdjacentFaces [in] Shows whether the adjacent faces have been + //! @param[in] theFeature The feature to remove; + //! @param[in] theSolids The solids to be reconstructed after feature removal; + //! @param[in] theFeatureFacesMap The map of feature faces; + //! @param[in] theHasAdjacentFaces Shows whether the adjacent faces have been //! found for the feature or not; - //! @param theAdjFaces [in] The reconstructed adjacent faces covering the feature; - //! @param theAdjFacesHistory [in] The history of the adjacent faces reconstruction; - //! @param theSolidsHistoryNeeded [in] Defines whether the history of solids + //! @param[in] theAdjFaces The reconstructed adjacent faces covering the feature; + //! @param[in] theAdjFacesHistory The history of the adjacent faces reconstruction; + //! @param[in] theSolidsHistoryNeeded Defines whether the history of solids //! modifications should be tracked or not. - Standard_EXPORT void RemoveFeature(const TopoDS_Shape& theFeature, + Standard_EXPORT void RemoveFeature(const TopoDS_Shape& theFeature, const TopTools_IndexedMapOfShape& theSolids, - const TopTools_MapOfShape& theFeatureFacesMap, - const Standard_Boolean theHasAdjacentFaces, + const TopTools_MapOfShape& theFeatureFacesMap, + const Standard_Boolean theHasAdjacentFaces, const TopTools_IndexedDataMapOfShapeListOfShape& theAdjFaces, const Handle(BRepTools_History)& theAdjFacesHistory, - const Standard_Boolean theSolidsHistoryNeeded, - const Message_ProgressRange& theRange); + const Standard_Boolean theSolidsHistoryNeeded, + const Message_ProgressRange& theRange); //! Updates history with the removed features Standard_EXPORT void UpdateHistory(const Message_ProgressRange& theRange); @@ -267,13 +247,13 @@ protected: //! @name Protected methods performing the removal Standard_EXPORT void PostTreat(); //! Filling steps for constant operations - Standard_EXPORT void fillPIConstants(const Standard_Real theWhole, BOPAlgo_PISteps& theSteps) const Standard_OVERRIDE; + Standard_EXPORT void fillPIConstants(const Standard_Real theWhole, + BOPAlgo_PISteps& theSteps) const Standard_OVERRIDE; protected: //! @name Fields - // Inputs - TopoDS_Shape myInputShape; //!< Input shape - TopTools_ListOfShape myFacesToRemove; //!< Faces to remove + TopoDS_Shape myInputShape; //!< Input shape + TopTools_ListOfShape myFacesToRemove; //!< Faces to remove // Intermediate TopTools_ListOfShape myFeatures; //!< List of not connected features to remove diff --git a/opencascade/BOPAlgo_Section.hxx b/opencascade/BOPAlgo_Section.hxx index b1b3d08d5..0e962606b 100644 --- a/opencascade/BOPAlgo_Section.hxx +++ b/opencascade/BOPAlgo_Section.hxx @@ -10,7 +10,7 @@ // distribution for complete text of the license and disclaimer of any warranty. // // Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. +// commercial license or contractual agreement. #ifndef _BOPAlgo_Section_HeaderFile #define _BOPAlgo_Section_HeaderFile @@ -23,8 +23,6 @@ #include class BOPAlgo_PaveFiller; - - //! The algorithm to build a Section between the arguments. //! The Section consists of vertices and edges. //! The Section contains: @@ -32,10 +30,9 @@ class BOPAlgo_PaveFiller; //! 2. vertices that are subjects of V/E, V/F interferences //! 3. new edges that are subjects of F/F interferences //! 4. edges that are Common Blocks -class BOPAlgo_Section : public BOPAlgo_Builder +class BOPAlgo_Section : public BOPAlgo_Builder { public: - DEFINE_STANDARD_ALLOC //! Empty constructor @@ -46,7 +43,6 @@ public: Standard_EXPORT BOPAlgo_Section(const Handle(NCollection_BaseAllocator)& theAllocator); protected: - //! Checks the data before performing the operation Standard_EXPORT virtual void CheckData() Standard_OVERRIDE; @@ -54,10 +50,11 @@ protected: Standard_EXPORT virtual void BuildSection(const Message_ProgressRange& theRange); //! Performs calculations using prepared Filler object - Standard_EXPORT virtual void PerformInternal1(const BOPAlgo_PaveFiller& thePF, const Message_ProgressRange& theRange) Standard_OVERRIDE; + Standard_EXPORT virtual void PerformInternal1(const BOPAlgo_PaveFiller& thePF, + const Message_ProgressRange& theRange) + Standard_OVERRIDE; protected: - //! List of operations to be supported by the Progress Indicator. //! Override the whole enumeration here since the constant operations are also //! going to be overridden. @@ -72,11 +69,11 @@ protected: }; //! Filling steps for constant operations - Standard_EXPORT void fillPIConstants(const Standard_Real theWhole, BOPAlgo_PISteps& theSteps) const Standard_OVERRIDE; + Standard_EXPORT void fillPIConstants(const Standard_Real theWhole, + BOPAlgo_PISteps& theSteps) const Standard_OVERRIDE; //! Filling steps for all other operations Standard_EXPORT void fillPISteps(BOPAlgo_PISteps& theSteps) const Standard_OVERRIDE; - }; #endif // _BOPAlgo_Section_HeaderFile diff --git a/opencascade/BOPAlgo_SectionAttribute.hxx b/opencascade/BOPAlgo_SectionAttribute.hxx index 6236830be..6e7fe922d 100644 --- a/opencascade/BOPAlgo_SectionAttribute.hxx +++ b/opencascade/BOPAlgo_SectionAttribute.hxx @@ -21,65 +21,47 @@ class BOPAlgo_SectionAttribute { public: - //! Default constructor BOPAlgo_SectionAttribute() - : myApproximation(Standard_True), - myPCurve1(Standard_True), - myPCurve2(Standard_True) {} + : myApproximation(Standard_True), + myPCurve1(Standard_True), + myPCurve2(Standard_True) + { + } //! Constructor BOPAlgo_SectionAttribute(const Standard_Boolean theAproximation, const Standard_Boolean thePCurveOnS1, const Standard_Boolean thePCurveOnS2) - : myApproximation(theAproximation), - myPCurve1(thePCurveOnS1), - myPCurve2(thePCurveOnS2) {} - - //! Sets the Approximation flag - void Approximation(const Standard_Boolean theApprox) + : myApproximation(theAproximation), + myPCurve1(thePCurveOnS1), + myPCurve2(thePCurveOnS2) { - myApproximation = theApprox; } + //! Sets the Approximation flag + void Approximation(const Standard_Boolean theApprox) { myApproximation = theApprox; } + //! Sets the PCurveOnS1 flag - void PCurveOnS1(const Standard_Boolean thePCurveOnS1) - { - myPCurve1 = thePCurveOnS1; - } + void PCurveOnS1(const Standard_Boolean thePCurveOnS1) { myPCurve1 = thePCurveOnS1; } //! Sets the PCurveOnS2 flag - void PCurveOnS2(const Standard_Boolean thePCurveOnS2) - { - myPCurve2 = thePCurveOnS2; - } + void PCurveOnS2(const Standard_Boolean thePCurveOnS2) { myPCurve2 = thePCurveOnS2; } //! Returns the Approximation flag - Standard_Boolean Approximation() const - { - return myApproximation; - } + Standard_Boolean Approximation() const { return myApproximation; } //! Returns the PCurveOnS1 flag - Standard_Boolean PCurveOnS1() const - { - return myPCurve1; - } + Standard_Boolean PCurveOnS1() const { return myPCurve1; } //! Returns the PCurveOnS2 flag - Standard_Boolean PCurveOnS2() const - { - return myPCurve2; - } + Standard_Boolean PCurveOnS2() const { return myPCurve2; } protected: - private: - Standard_Boolean myApproximation; Standard_Boolean myPCurve1; Standard_Boolean myPCurve2; - }; #endif // _BOPAlgo_SectionAttribute_HeaderFile diff --git a/opencascade/BOPAlgo_ShellSplitter.hxx b/opencascade/BOPAlgo_ShellSplitter.hxx index 71a341f1d..3642f1e92 100644 --- a/opencascade/BOPAlgo_ShellSplitter.hxx +++ b/opencascade/BOPAlgo_ShellSplitter.hxx @@ -26,50 +26,43 @@ #include class TopoDS_Shape; - - //! The class provides the splitting of the set of connected faces //! on separate loops -class BOPAlgo_ShellSplitter : public BOPAlgo_Algo +class BOPAlgo_ShellSplitter : public BOPAlgo_Algo { public: - DEFINE_STANDARD_ALLOC - //! empty constructor Standard_EXPORT BOPAlgo_ShellSplitter(); -Standard_EXPORT virtual ~BOPAlgo_ShellSplitter(); - + Standard_EXPORT virtual ~BOPAlgo_ShellSplitter(); + //! constructor Standard_EXPORT BOPAlgo_ShellSplitter(const Handle(NCollection_BaseAllocator)& theAllocator); - + //! adds a face to process - Standard_EXPORT void AddStartElement (const TopoDS_Shape& theS); - + Standard_EXPORT void AddStartElement(const TopoDS_Shape& theS); + //! return the faces to process Standard_EXPORT const TopTools_ListOfShape& StartElements() const; - + //! performs the algorithm - Standard_EXPORT virtual void Perform(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; - + Standard_EXPORT virtual void Perform( + const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; + //! returns the loops Standard_EXPORT const TopTools_ListOfShape& Shells() const; - - Standard_EXPORT static void SplitBlock (BOPTools_ConnexityBlock& theCB); + Standard_EXPORT static void SplitBlock(BOPTools_ConnexityBlock& theCB); protected: - Standard_EXPORT void MakeShells(const Message_ProgressRange& theRange); - - TopTools_ListOfShape myStartShapes; - TopTools_ListOfShape myShells; + TopTools_ListOfShape myStartShapes; + TopTools_ListOfShape myShells; BOPTools_ListOfConnexityBlock myLCB; private: - }; #endif // _BOPAlgo_ShellSplitter_HeaderFile diff --git a/opencascade/BOPAlgo_Splitter.hxx b/opencascade/BOPAlgo_Splitter.hxx index bc3a08ee2..418ad5781 100644 --- a/opencascade/BOPAlgo_Splitter.hxx +++ b/opencascade/BOPAlgo_Splitter.hxx @@ -10,7 +10,7 @@ // distribution for complete text of the license and disclaimer of any warranty. // // Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. +// commercial license or contractual agreement. #ifndef _BOPAlgo_Splitter_HeaderFile #define _BOPAlgo_Splitter_HeaderFile @@ -50,7 +50,6 @@ class BOPAlgo_Splitter : public BOPAlgo_ToolsProvider { public: - DEFINE_STANDARD_ALLOC //! Empty constructor @@ -60,10 +59,10 @@ public: Standard_EXPORT BOPAlgo_Splitter(const Handle(NCollection_BaseAllocator)& theAllocator); //! Performs the operation - Standard_EXPORT virtual void Perform(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; + Standard_EXPORT virtual void Perform( + const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; protected: - //! Checks the input data Standard_EXPORT virtual void CheckData() Standard_OVERRIDE; @@ -71,7 +70,6 @@ protected: //! When called the for the last time (for compound) it rebuilds the result //! shape to avoid multiple enclosure into compounds. Standard_EXPORT virtual void BuildResult(const TopAbs_ShapeEnum theType) Standard_OVERRIDE; - }; #endif // _BOPAlgo_Splitter_HeaderFile diff --git a/opencascade/BOPAlgo_Tools.hxx b/opencascade/BOPAlgo_Tools.hxx index 465edc273..5cbb14a6c 100644 --- a/opencascade/BOPAlgo_Tools.hxx +++ b/opencascade/BOPAlgo_Tools.hxx @@ -41,33 +41,37 @@ class TopoDS_Shape; class BOPAlgo_Tools { public: - //! Makes the chains of the connected elements from the given convexity map template - static void MakeBlocks(const TheMap& theMILI, - TheList& theMBlocks, + static void MakeBlocks(const TheMap& theMILI, + TheList& theMBlocks, const Handle(NCollection_BaseAllocator)& theAllocator) { NCollection_Map aMFence; - Standard_Integer i, aNb = theMILI.Extent(); - for (i = 1; i <= aNb; ++i) { + Standard_Integer i, aNb = theMILI.Extent(); + for (i = 1; i <= aNb; ++i) + { const typename TheMap::key_type& n = theMILI.FindKey(i); if (!aMFence.Add(n)) continue; // // Start the chain - typename TheList::value_type& aChain = theMBlocks.Append(typename TheList::value_type(theAllocator)); + typename TheList::value_type& aChain = + theMBlocks.Append(typename TheList::value_type(theAllocator)); aChain.Append(n); // Look for connected elements typename TheList::value_type::Iterator aItLChain(aChain); - for (; aItLChain.More(); aItLChain.Next()) { - const typename TheMap::key_type& n1 = aItLChain.Value(); + for (; aItLChain.More(); aItLChain.Next()) + { + const typename TheMap::key_type& n1 = aItLChain.Value(); const typename TheList::value_type& aLI = theMILI.FindFromKey(n1); // Add connected elements into the chain typename TheList::value_type::Iterator aItLI(aLI); - for (; aItLI.More(); aItLI.Next()) { + for (; aItLI.More(); aItLI.Next()) + { const typename TheMap::key_type& n2 = aItLI.Value(); - if (aMFence.Add(n2)) { + if (aMFence.Add(n2)) + { aChain.Append(n2); } } @@ -77,46 +81,50 @@ public: //! Fills the map with the connected entities template - static void FillMap(const TheType& n1, - const TheType& n2, - TheMap& theMILI, + static void FillMap(const TheType& n1, + const TheType& n2, + TheMap& theMILI, const Handle(NCollection_BaseAllocator)& theAllocator) { - typename TheMap::value_type *pList1 = theMILI.ChangeSeek(n1); - if (!pList1) { + typename TheMap::value_type* pList1 = theMILI.ChangeSeek(n1); + if (!pList1) + { pList1 = &theMILI(theMILI.Add(n1, NCollection_List(theAllocator))); } pList1->Append(n2); // - typename TheMap::value_type*pList2 = theMILI.ChangeSeek(n2); - if (!pList2) { + typename TheMap::value_type* pList2 = theMILI.ChangeSeek(n2); + if (!pList2) + { pList2 = &theMILI(theMILI.Add(n2, typename TheMap::value_type(theAllocator))); } pList2->Append(n1); } - Standard_EXPORT static void FillMap(const Handle(BOPDS_PaveBlock)& thePB1, - const Standard_Integer theF, + Standard_EXPORT static void FillMap(const Handle(BOPDS_PaveBlock)& thePB1, + const Standard_Integer theF, BOPDS_IndexedDataMapOfPaveBlockListOfInteger& theMILI, - const Handle(NCollection_BaseAllocator)& theAllocator); + const Handle(NCollection_BaseAllocator)& theAllocator); //! Create Common Blocks from the groups of pave blocks of //! connection map. - Standard_EXPORT static void PerformCommonBlocks(BOPDS_IndexedDataMapOfPaveBlockListOfPaveBlock& theMBlocks, - const Handle(NCollection_BaseAllocator)& theAllocator, - BOPDS_PDS& theDS, - const Handle(IntTools_Context)& theContext = Handle(IntTools_Context)()); + Standard_EXPORT static void PerformCommonBlocks( + BOPDS_IndexedDataMapOfPaveBlockListOfPaveBlock& theMBlocks, + const Handle(NCollection_BaseAllocator)& theAllocator, + BOPDS_PDS& theDS, + const Handle(IntTools_Context)& theContext = Handle(IntTools_Context)()); //! Create Common Blocks on faces using the PB->Faces connection map . - Standard_EXPORT static void PerformCommonBlocks(const BOPDS_IndexedDataMapOfPaveBlockListOfInteger& theMBlocks, - const Handle(NCollection_BaseAllocator)& theAllocator, - BOPDS_PDS& pDS, - const Handle(IntTools_Context)& theContext = Handle(IntTools_Context)()); + Standard_EXPORT static void PerformCommonBlocks( + const BOPDS_IndexedDataMapOfPaveBlockListOfInteger& theMBlocks, + const Handle(NCollection_BaseAllocator)& theAllocator, + BOPDS_PDS& pDS, + const Handle(IntTools_Context)& theContext = Handle(IntTools_Context)()); - Standard_EXPORT static Standard_Real ComputeToleranceOfCB - (const Handle(BOPDS_CommonBlock)& theCB, - const BOPDS_PDS theDS, - const Handle(IntTools_Context)& theContext); + Standard_EXPORT static Standard_Real ComputeToleranceOfCB( + const Handle(BOPDS_CommonBlock)& theCB, + const BOPDS_PDS theDS, + const Handle(IntTools_Context)& theContext); //! Creates planar wires from the given edges.
//! The input edges are expected to be planar. And for the performance @@ -137,10 +145,11 @@ public: //! 0 - in case of success (at least one wire has been built);
//! 1 - in case there are no edges in the given shape;
//! 2 - sharing of the edges has failed.
- Standard_EXPORT static Standard_Integer EdgesToWires(const TopoDS_Shape& theEdges, - TopoDS_Shape& theWires, - const Standard_Boolean theShared = Standard_False, - const Standard_Real theAngTol = 1.e-8); + Standard_EXPORT static Standard_Integer EdgesToWires( + const TopoDS_Shape& theEdges, + TopoDS_Shape& theWires, + const Standard_Boolean theShared = Standard_False, + const Standard_Real theAngTol = 1.e-8); //! Creates planar faces from given planar wires.
//! The method does not check if the wires are really planar.
@@ -157,13 +166,14 @@ public: //! for intersection of planes in IntTools_FaceFace.
//! Method returns TRUE in case of success, i.e. at least one face has been built.
Standard_EXPORT static Standard_Boolean WiresToFaces(const TopoDS_Shape& theWires, - TopoDS_Shape& theFaces, + TopoDS_Shape& theFaces, const Standard_Real theAngTol = 1.e-8); //! Finds chains of intersecting vertices - Standard_EXPORT static void IntersectVertices(const TopTools_IndexedDataMapOfShapeReal& theVertices, - const Standard_Real theFuzzyValue, - TopTools_ListOfListOfShape& theChains); + Standard_EXPORT static void IntersectVertices( + const TopTools_IndexedDataMapOfShapeReal& theVertices, + const Standard_Real theFuzzyValue, + TopTools_ListOfListOfShape& theChains); //! Classifies the faces relatively solids . //! The IN faces for solids are stored into output data map . @@ -178,14 +188,15 @@ public: //! It is assumed that all faces and solids are already intersected and //! do not have any geometrically coinciding parts without topological //! sharing of these parts - Standard_EXPORT static void ClassifyFaces(const TopTools_ListOfShape& theFaces, - const TopTools_ListOfShape& theSolids, - const Standard_Boolean theRunParallel, - Handle(IntTools_Context)& theContext, - TopTools_IndexedDataMapOfShapeListOfShape& theInParts, - const TopTools_DataMapOfShapeBox& theShapeBoxMap = TopTools_DataMapOfShapeBox(), - const TopTools_DataMapOfShapeListOfShape& theSolidsIF = TopTools_DataMapOfShapeListOfShape(), - const Message_ProgressRange& theRange = Message_ProgressRange()); + Standard_EXPORT static void ClassifyFaces( + const TopTools_ListOfShape& theFaces, + const TopTools_ListOfShape& theSolids, + const Standard_Boolean theRunParallel, + Handle(IntTools_Context)& theContext, + TopTools_IndexedDataMapOfShapeListOfShape& theInParts, + const TopTools_DataMapOfShapeBox& theShapeBoxMap = TopTools_DataMapOfShapeBox(), + const TopTools_DataMapOfShapeListOfShape& theSolidsIF = TopTools_DataMapOfShapeListOfShape(), + const Message_ProgressRange& theRange = Message_ProgressRange()); //! Classifies the given parts relatively the given solids and //! fills the solids with the parts classified as INTERNAL. @@ -194,10 +205,10 @@ public: //! @param theParts - The parts to classify relatively solids //! @param theImages - Possible images of the parts that has to be classified //! @param theContext - cached geometrical tools to speed-up classifications - Standard_EXPORT static void FillInternals(const TopTools_ListOfShape& theSolids, - const TopTools_ListOfShape& theParts, + Standard_EXPORT static void FillInternals(const TopTools_ListOfShape& theSolids, + const TopTools_ListOfShape& theParts, const TopTools_DataMapOfShapeListOfShape& theImages, - const Handle(IntTools_Context)& theContext); + const Handle(IntTools_Context)& theContext); //! Computes the transformation needed to move the objects //! to the given point to increase the quality of computations. @@ -208,11 +219,13 @@ public: //! @param theTrsf the computed transformation //! @param thePoint the Point to compute transformation to //! @param theCriteria the Criteria to check whether thranformation is required - Standard_EXPORT static Standard_Boolean TrsfToPoint (const Bnd_Box& theBox1, - const Bnd_Box& theBox2, - gp_Trsf& theTrsf, - const gp_Pnt& thePoint = gp_Pnt (0.0, 0.0, 0.0), - const Standard_Real theCriteria = 1.e+5); + Standard_EXPORT static Standard_Boolean TrsfToPoint(const Bnd_Box& theBox1, + const Bnd_Box& theBox2, + gp_Trsf& theTrsf, + const gp_Pnt& thePoint = gp_Pnt(0.0, + 0.0, + 0.0), + const Standard_Real theCriteria = 1.e+5); }; #endif // _BOPAlgo_Tools_HeaderFile diff --git a/opencascade/BOPAlgo_ToolsProvider.hxx b/opencascade/BOPAlgo_ToolsProvider.hxx index 98d1ce89d..2d08d80d7 100644 --- a/opencascade/BOPAlgo_ToolsProvider.hxx +++ b/opencascade/BOPAlgo_ToolsProvider.hxx @@ -10,7 +10,7 @@ // distribution for complete text of the license and disclaimer of any warranty. // // Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. +// commercial license or contractual agreement. #ifndef _BOPAlgo_ToolsProvider_HeaderFile #define _BOPAlgo_ToolsProvider_HeaderFile @@ -25,7 +25,6 @@ class BOPAlgo_ToolsProvider : public BOPAlgo_Builder { public: - DEFINE_STANDARD_ALLOC //! Empty constructor @@ -43,13 +42,9 @@ public: Standard_EXPORT virtual void SetTools(const TopTools_ListOfShape& theShapes); //! Returns the Tool arguments of the operation - const TopTools_ListOfShape& Tools() const - { - return myTools; - } + const TopTools_ListOfShape& Tools() const { return myTools; } protected: - TopTools_ListOfShape myTools; TopTools_MapOfShape myMapTools; }; diff --git a/opencascade/BOPAlgo_WireEdgeSet.hxx b/opencascade/BOPAlgo_WireEdgeSet.hxx index 625f937d2..4cb540338 100644 --- a/opencascade/BOPAlgo_WireEdgeSet.hxx +++ b/opencascade/BOPAlgo_WireEdgeSet.hxx @@ -28,59 +28,38 @@ class TopoDS_Face; class TopoDS_Shape; - - -class BOPAlgo_WireEdgeSet +class BOPAlgo_WireEdgeSet { public: - DEFINE_STANDARD_ALLOC - - BOPAlgo_WireEdgeSet(); - virtual ~BOPAlgo_WireEdgeSet(); - - BOPAlgo_WireEdgeSet(const Handle(NCollection_BaseAllocator)& theAllocator); - - void Clear(); - - void SetFace (const TopoDS_Face& aF); - - const TopoDS_Face& Face() const; - - void AddStartElement (const TopoDS_Shape& sS); - - const TopTools_ListOfShape& StartElements() const; - - void AddShape (const TopoDS_Shape& sS); - - const TopTools_ListOfShape& Shapes() const; + BOPAlgo_WireEdgeSet(); + virtual ~BOPAlgo_WireEdgeSet(); + BOPAlgo_WireEdgeSet(const Handle(NCollection_BaseAllocator)& theAllocator); + void Clear(); + void SetFace(const TopoDS_Face& aF); -protected: + const TopoDS_Face& Face() const; + + void AddStartElement(const TopoDS_Shape& sS); + const TopTools_ListOfShape& StartElements() const; + void AddShape(const TopoDS_Shape& sS); - TopoDS_Face myFace; + const TopTools_ListOfShape& Shapes() const; + +protected: + TopoDS_Face myFace; TopTools_ListOfShape myStartShapes; TopTools_ListOfShape myShapes; - private: - - - - - }; - #include - - - - #endif // _BOPAlgo_WireEdgeSet_HeaderFile diff --git a/opencascade/BOPAlgo_WireEdgeSet.lxx b/opencascade/BOPAlgo_WireEdgeSet.lxx index e4fe43dce..a93507e9b 100644 --- a/opencascade/BOPAlgo_WireEdgeSet.lxx +++ b/opencascade/BOPAlgo_WireEdgeSet.lxx @@ -16,83 +16,88 @@ // commercial license or contractual agreement. //======================================================================= -//function : -//purpose : +// function : +// purpose : //======================================================================= - inline BOPAlgo_WireEdgeSet::BOPAlgo_WireEdgeSet() -{ -} +inline BOPAlgo_WireEdgeSet::BOPAlgo_WireEdgeSet() {} + //======================================================================= -//function : -//purpose : +// function : +// purpose : //======================================================================= - inline BOPAlgo_WireEdgeSet::BOPAlgo_WireEdgeSet(const Handle(NCollection_BaseAllocator)& theAllocator) -: - myStartShapes(theAllocator), - myShapes(theAllocator) +inline BOPAlgo_WireEdgeSet::BOPAlgo_WireEdgeSet( + const Handle(NCollection_BaseAllocator)& theAllocator) + : myStartShapes(theAllocator), + myShapes(theAllocator) { } + //======================================================================= -//function : ~ -//purpose : +// function : ~ +// purpose : //======================================================================= - inline BOPAlgo_WireEdgeSet::~BOPAlgo_WireEdgeSet() -{ -} +inline BOPAlgo_WireEdgeSet::~BOPAlgo_WireEdgeSet() {} + //======================================================================= -//function : Clear -//purpose : +// function : Clear +// purpose : //======================================================================= - inline void BOPAlgo_WireEdgeSet::Clear() +inline void BOPAlgo_WireEdgeSet::Clear() { myStartShapes.Clear(); myShapes.Clear(); } + //======================================================================= -//function : SetFace -//purpose : +// function : SetFace +// purpose : //======================================================================= - inline void BOPAlgo_WireEdgeSet::SetFace(const TopoDS_Face& aF) +inline void BOPAlgo_WireEdgeSet::SetFace(const TopoDS_Face& aF) { - myFace=aF; + myFace = aF; } + //======================================================================= -//function : Face -//purpose : +// function : Face +// purpose : //======================================================================= - inline const TopoDS_Face& BOPAlgo_WireEdgeSet::Face()const +inline const TopoDS_Face& BOPAlgo_WireEdgeSet::Face() const { return myFace; } + //======================================================================= -//function : AddStartElement -//purpose : +// function : AddStartElement +// purpose : //======================================================================= - inline void BOPAlgo_WireEdgeSet::AddStartElement(const TopoDS_Shape& aE) +inline void BOPAlgo_WireEdgeSet::AddStartElement(const TopoDS_Shape& aE) { myStartShapes.Append(aE); } + //======================================================================= -//function : StartElements -//purpose : +// function : StartElements +// purpose : //======================================================================= - inline const TopTools_ListOfShape& BOPAlgo_WireEdgeSet::StartElements()const +inline const TopTools_ListOfShape& BOPAlgo_WireEdgeSet::StartElements() const { return myStartShapes; } + //======================================================================= -//function : AddShape -//purpose : +// function : AddShape +// purpose : //======================================================================= - inline void BOPAlgo_WireEdgeSet::AddShape(const TopoDS_Shape& aW) +inline void BOPAlgo_WireEdgeSet::AddShape(const TopoDS_Shape& aW) { myShapes.Append(aW); } + //======================================================================= -//function : Shapes -//purpose : +// function : Shapes +// purpose : //======================================================================= - inline const TopTools_ListOfShape& BOPAlgo_WireEdgeSet::Shapes()const +inline const TopTools_ListOfShape& BOPAlgo_WireEdgeSet::Shapes() const { return myShapes; } diff --git a/opencascade/BOPAlgo_WireSplitter.hxx b/opencascade/BOPAlgo_WireSplitter.hxx index b0950eaed..3d02b5e36 100644 --- a/opencascade/BOPAlgo_WireSplitter.hxx +++ b/opencascade/BOPAlgo_WireSplitter.hxx @@ -29,26 +29,23 @@ class TopoDS_Wire; class TopoDS_Face; - //! The class is to build loops from the given set of edges. //! //! It returns the following Error statuses //! - *BOPAlgo_AlertNullInputShapes* - in case there no input edges to build the loops. //! -class BOPAlgo_WireSplitter : public BOPAlgo_Algo +class BOPAlgo_WireSplitter : public BOPAlgo_Algo { public: - DEFINE_STANDARD_ALLOC - Standard_EXPORT BOPAlgo_WireSplitter(); Standard_EXPORT virtual ~BOPAlgo_WireSplitter(); - + Standard_EXPORT BOPAlgo_WireSplitter(const Handle(NCollection_BaseAllocator)& theAllocator); - - Standard_EXPORT void SetWES (const BOPAlgo_WireEdgeSet& theWES); - + + Standard_EXPORT void SetWES(const BOPAlgo_WireEdgeSet& theWES); + Standard_EXPORT BOPAlgo_WireEdgeSet& WES(); //! Sets the context for the algorithm @@ -57,24 +54,23 @@ public: //! Returns the context Standard_EXPORT const Handle(IntTools_Context)& Context(); - Standard_EXPORT virtual void Perform(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; - + Standard_EXPORT virtual void Perform( + const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; + static void MakeWire(TopTools_ListOfShape& theLE, TopoDS_Wire& theW); - - Standard_EXPORT static void SplitBlock (const TopoDS_Face& theF, - BOPTools_ConnexityBlock& theCB, - const Handle(IntTools_Context)& theContext); -protected: + Standard_EXPORT static void SplitBlock(const TopoDS_Face& theF, + BOPTools_ConnexityBlock& theCB, + const Handle(IntTools_Context)& theContext); +protected: Standard_EXPORT virtual void CheckData() Standard_OVERRIDE; - + Standard_EXPORT void MakeWires(const Message_ProgressRange& theRange); - BOPAlgo_PWireEdgeSet myWES; + BOPAlgo_PWireEdgeSet myWES; BOPTools_ListOfConnexityBlock myLCB; - Handle(IntTools_Context) myContext; - + Handle(IntTools_Context) myContext; }; #include diff --git a/opencascade/BOPAlgo_WireSplitter.lxx b/opencascade/BOPAlgo_WireSplitter.lxx index e6510a471..90b201370 100644 --- a/opencascade/BOPAlgo_WireSplitter.lxx +++ b/opencascade/BOPAlgo_WireSplitter.lxx @@ -18,92 +18,80 @@ #include //======================================================================= -//function : BOPAlgo_EdgeInfo -//purpose : +// function : BOPAlgo_EdgeInfo +// purpose : //======================================================================= -class BOPAlgo_EdgeInfo { - public: +class BOPAlgo_EdgeInfo +{ +public: // - BOPAlgo_EdgeInfo() : - myPassed(Standard_False), - myInFlag(Standard_False), - myIsInside (Standard_False), - myAngle (-1.) - { - }; + BOPAlgo_EdgeInfo() + : myPassed(Standard_False), + myInFlag(Standard_False), + myIsInside(Standard_False), + myAngle(-1.) {}; + // - void SetEdge(const TopoDS_Edge& theE) { - myEdge=theE; - }; + void SetEdge(const TopoDS_Edge& theE) { myEdge = theE; }; + // - const TopoDS_Edge& Edge() const{ - return myEdge; - }; + const TopoDS_Edge& Edge() const { return myEdge; }; + // - void SetPassed(const Standard_Boolean theFlag) { - myPassed=theFlag; - }; + void SetPassed(const Standard_Boolean theFlag) { myPassed = theFlag; }; + // - Standard_Boolean Passed()const { - return myPassed; - }; + Standard_Boolean Passed() const { return myPassed; }; + // - void SetInFlag(const Standard_Boolean theFlag) { - myInFlag=theFlag; - }; + void SetInFlag(const Standard_Boolean theFlag) { myInFlag = theFlag; }; + // - Standard_Boolean IsIn()const { - return myInFlag; - }; + Standard_Boolean IsIn() const { return myInFlag; }; + // - void SetAngle(const Standard_Real theAngle) { - myAngle=theAngle; - }; + void SetAngle(const Standard_Real theAngle) { myAngle = theAngle; }; + // - Standard_Real Angle()const { - return myAngle; - }; + Standard_Real Angle() const { return myAngle; }; + // - Standard_Boolean IsInside() const { - return myIsInside; - }; + Standard_Boolean IsInside() const { return myIsInside; }; + // - void SetIsInside (const Standard_Boolean theIsInside) { - myIsInside = theIsInside; - }; + void SetIsInside(const Standard_Boolean theIsInside) { myIsInside = theIsInside; }; + // - protected: - TopoDS_Edge myEdge; +protected: + TopoDS_Edge myEdge; Standard_Boolean myPassed; Standard_Boolean myInFlag; Standard_Boolean myIsInside; - Standard_Real myAngle; + Standard_Real myAngle; }; - -#include -typedef NCollection_List BOPAlgo_ListOfEdgeInfo; -typedef BOPAlgo_ListOfEdgeInfo::Iterator BOPAlgo_ListIteratorOfListOfEdgeInfo; +#include +typedef NCollection_List BOPAlgo_ListOfEdgeInfo; +typedef BOPAlgo_ListOfEdgeInfo::Iterator BOPAlgo_ListIteratorOfListOfEdgeInfo; #include #include -typedef NCollection_IndexedDataMap BOPAlgo_IndexedDataMapOfShapeListOfEdgeInfo; +typedef NCollection_IndexedDataMap + BOPAlgo_IndexedDataMapOfShapeListOfEdgeInfo; //======================================================================= -//function : MakeWire -//purpose : +// function : MakeWire +// purpose : //======================================================================= - inline void BOPAlgo_WireSplitter::MakeWire(TopTools_ListOfShape& aLE, - TopoDS_Wire& aWire) +inline void BOPAlgo_WireSplitter::MakeWire(TopTools_ListOfShape& aLE, TopoDS_Wire& aWire) { BRep_Builder aBB; aBB.MakeWire(aWire); // TopTools_ListIteratorOfListOfShape aIt(aLE); - for (; aIt.More(); aIt.Next()){ + for (; aIt.More(); aIt.Next()) + { aBB.Add(aWire, aIt.Value()); } aWire.Closed(BRep_Tool::IsClosed(aWire)); diff --git a/opencascade/BOPDS_CommonBlock.hxx b/opencascade/BOPDS_CommonBlock.hxx index 953b2cb6b..d504f0e11 100644 --- a/opencascade/BOPDS_CommonBlock.hxx +++ b/opencascade/BOPDS_CommonBlock.hxx @@ -25,11 +25,9 @@ #include class BOPDS_PaveBlock; - class BOPDS_CommonBlock; DEFINE_STANDARD_HANDLE(BOPDS_CommonBlock, Standard_Transient) - //! The class BOPDS_CommonBlock is to store the information //! about pave blocks that have geometrical coincidence //! (in terms of a tolerance) with:
@@ -41,40 +39,32 @@ class BOPDS_CommonBlock : public Standard_Transient { public: - - - //! Empty constructor Standard_EXPORT BOPDS_CommonBlock(); - //! Constructor //! @param theAllocator the allocator to manage the memory Standard_EXPORT BOPDS_CommonBlock(const Handle(NCollection_BaseAllocator)& theAllocator); - //! Modifier //! Adds the pave block to the list of pave blocks //! of the common block - Standard_EXPORT void AddPaveBlock (const Handle(BOPDS_PaveBlock)& aPB); - + Standard_EXPORT void AddPaveBlock(const Handle(BOPDS_PaveBlock)& aPB); //! Modifier //! Sets the list of pave blocks for the common block - Standard_EXPORT void SetPaveBlocks (const BOPDS_ListOfPaveBlock& aLPB); - + Standard_EXPORT void SetPaveBlocks(const BOPDS_ListOfPaveBlock& aLPB); //! Modifier //! Adds the index of the face //! to the list of indices of faces //! of the common block - Standard_EXPORT void AddFace (const Standard_Integer aF); - + Standard_EXPORT void AddFace(const Standard_Integer aF); //! Modifier //! Sets the list of indices of faces //! of the common block - Standard_EXPORT void SetFaces (const TColStd_ListOfInteger& aLF); + Standard_EXPORT void SetFaces(const TColStd_ListOfInteger& aLF); //! Modifier //! Appends the list of indices of faces @@ -82,68 +72,58 @@ public: //! of the common block (the input list is emptied) Standard_EXPORT void AppendFaces(TColStd_ListOfInteger& aLF); - //! Selector //! Returns the list of pave blocks //! of the common block Standard_EXPORT const BOPDS_ListOfPaveBlock& PaveBlocks() const; - //! Selector //! Returns the list of indices of faces //! of the common block Standard_EXPORT const TColStd_ListOfInteger& Faces() const; - //! Selector //! Returns the first pave block //! of the common block Standard_EXPORT const Handle(BOPDS_PaveBlock)& PaveBlock1() const; - //! Selector //! Returns the pave block that belongs //! to the edge with index - Standard_EXPORT Handle(BOPDS_PaveBlock)& PaveBlockOnEdge (const Standard_Integer theIndex); - + Standard_EXPORT Handle(BOPDS_PaveBlock)& PaveBlockOnEdge(const Standard_Integer theIndex); //! Query //! Returns true if the common block contains //! a pave block that belongs //! to the face with index - Standard_EXPORT Standard_Boolean IsPaveBlockOnFace (const Standard_Integer theIndex) const; - + Standard_EXPORT Standard_Boolean IsPaveBlockOnFace(const Standard_Integer theIndex) const; //! Query //! Returns true if the common block contains //! a pave block that belongs //! to the edge with index - Standard_EXPORT Standard_Boolean IsPaveBlockOnEdge (const Standard_Integer theIndex) const; - + Standard_EXPORT Standard_Boolean IsPaveBlockOnEdge(const Standard_Integer theIndex) const; //! Query //! Returns true if the common block contains //! a pave block that is equal to - Standard_EXPORT Standard_Boolean Contains (const Handle(BOPDS_PaveBlock)& thePB) const; - + Standard_EXPORT Standard_Boolean Contains(const Handle(BOPDS_PaveBlock)& thePB) const; //! Query //! Returns true if the common block contains //! the face with index equal to - Standard_EXPORT Standard_Boolean Contains (const Standard_Integer theF) const; - + Standard_EXPORT Standard_Boolean Contains(const Standard_Integer theF) const; //! Modifier //! Assign the index as the edge index //! to all pave blocks of the common block - Standard_EXPORT void SetEdge (const Standard_Integer theEdge); - + Standard_EXPORT void SetEdge(const Standard_Integer theEdge); //! Selector //! Returns the index of the edge //! of all pave blocks of the common block Standard_EXPORT Standard_Integer Edge() const; - + Standard_EXPORT void Dump() const; //! Moves the pave blocks in the list to make the given @@ -152,27 +132,19 @@ public: Standard_EXPORT void SetRealPaveBlock(const Handle(BOPDS_PaveBlock)& thePB); //! Sets the tolerance for the common block - void SetTolerance(const Standard_Real theTol) - { - myTolerance = theTol; - } + void SetTolerance(const Standard_Real theTol) { myTolerance = theTol; } //! Return the tolerance of common block - Standard_Real Tolerance() const - { - return myTolerance; - } + Standard_Real Tolerance() const { return myTolerance; } - DEFINE_STANDARD_RTTIEXT(BOPDS_CommonBlock,Standard_Transient) + DEFINE_STANDARD_RTTIEXT(BOPDS_CommonBlock, Standard_Transient) protected: - BOPDS_ListOfPaveBlock myPaveBlocks; //!< Pave blocks of the common block TColStd_ListOfInteger myFaces; //!< Faces on which the pave blocks are lying - Standard_Real myTolerance; //!< Tolerance of the common block + Standard_Real myTolerance; //!< Tolerance of the common block private: - }; #endif // _BOPDS_CommonBlock_HeaderFile diff --git a/opencascade/BOPDS_CoupleOfPaveBlocks.hxx b/opencascade/BOPDS_CoupleOfPaveBlocks.hxx index 259c34ad1..21cb89e0a 100644 --- a/opencascade/BOPDS_CoupleOfPaveBlocks.hxx +++ b/opencascade/BOPDS_CoupleOfPaveBlocks.hxx @@ -19,24 +19,27 @@ /** * The Class BOPDS_CoupleOfPaveBlocks is to store - * the information about two pave blocks - * and some satellite information + * the information about two pave blocks + * and some satellite information * -*/ + */ //======================================================================= -//class : BOPDS_CoupleOfPaveBlocks -//purpose : +// class : BOPDS_CoupleOfPaveBlocks +// purpose : //======================================================================= -class BOPDS_CoupleOfPaveBlocks { - public: +class BOPDS_CoupleOfPaveBlocks +{ +public: /** * Constructor */ - BOPDS_CoupleOfPaveBlocks() : - myIndexInterf(-1), - myIndex(-1), - myTolerance(0) - {} + BOPDS_CoupleOfPaveBlocks() + : myIndexInterf(-1), + myIndex(-1), + myTolerance(0) + { + } + // /** * Constructor @@ -46,136 +49,128 @@ class BOPDS_CoupleOfPaveBlocks { * secondt pave block */ BOPDS_CoupleOfPaveBlocks(const Handle(BOPDS_PaveBlock)& thePB1, - const Handle(BOPDS_PaveBlock)& thePB2) : - myIndexInterf(-1), - myIndex(-1), - myTolerance(0) + const Handle(BOPDS_PaveBlock)& thePB2) + : myIndexInterf(-1), + myIndex(-1), + myTolerance(0) { SetPaveBlocks(thePB1, thePB2); } + // /** * Destructor */ - ~BOPDS_CoupleOfPaveBlocks() { - } + ~BOPDS_CoupleOfPaveBlocks() {} + // /** * Sets an index * @param theIndex * index */ - void SetIndex(const Standard_Integer theIndex) { - myIndex=theIndex; - } + void SetIndex(const Standard_Integer theIndex) { myIndex = theIndex; } + // /** * Returns the index - * @return + * @return * index */ - Standard_Integer Index()const { - return myIndex; - } - // + Standard_Integer Index() const { return myIndex; } + + // /** - * Sets an index of an interference + * Sets an index of an interference * @param theIndex - * index of an interference - */ - void SetIndexInterf(const Standard_Integer theIndex) { - myIndexInterf=theIndex; - } + * index of an interference + */ + void SetIndexInterf(const Standard_Integer theIndex) { myIndexInterf = theIndex; } + // /** - * Returns the index of an interference - * @return - * index of an interference + * Returns the index of an interference + * @return + * index of an interference */ - Standard_Integer IndexInterf()const { - return myIndexInterf; - } - // + Standard_Integer IndexInterf() const { return myIndexInterf; } + + // /** * Sets pave blocks * @param thePB1 * first pave block * @param thePB2 * secondt pave block - */ - void SetPaveBlocks(const Handle(BOPDS_PaveBlock)& thePB1, - const Handle(BOPDS_PaveBlock)& thePB2) { - myPB[0]=thePB1; - myPB[1]=thePB2; - } - // + */ + void SetPaveBlocks(const Handle(BOPDS_PaveBlock)& thePB1, const Handle(BOPDS_PaveBlock)& thePB2) + { + myPB[0] = thePB1; + myPB[1] = thePB2; + } + + // /** * Returns pave blocks * @param thePB1 * the first pave block * @param thePB2 * the second pave block - */ - void PaveBlocks(Handle(BOPDS_PaveBlock)& thePB1, - Handle(BOPDS_PaveBlock)& thePB2) const { - thePB1=myPB[0]; - thePB2=myPB[1]; + */ + void PaveBlocks(Handle(BOPDS_PaveBlock)& thePB1, Handle(BOPDS_PaveBlock)& thePB2) const + { + thePB1 = myPB[0]; + thePB2 = myPB[1]; } - // + + // /** * Sets the first pave block * @param thePB * the first pave block - */ - void SetPaveBlock1(const Handle(BOPDS_PaveBlock)& thePB) { - myPB[0]=thePB; - } + */ + void SetPaveBlock1(const Handle(BOPDS_PaveBlock)& thePB) { myPB[0] = thePB; } + /** * Returns the first pave block - * @return + * @return * the first pave block - */ - const Handle(BOPDS_PaveBlock)& PaveBlock1()const { - return myPB[0]; - } + */ + const Handle(BOPDS_PaveBlock)& PaveBlock1() const { return myPB[0]; } + // /** * Sets the second pave block * @param thePB * the second pave block - */ - void SetPaveBlock2(const Handle(BOPDS_PaveBlock)& thePB) { - myPB[1]=thePB; - } + */ + void SetPaveBlock2(const Handle(BOPDS_PaveBlock)& thePB) { myPB[1] = thePB; } + // /** * Returns the second pave block - * @return + * @return * the second pave block - */ - const Handle(BOPDS_PaveBlock)& PaveBlock2()const { - return myPB[1]; - } + */ + const Handle(BOPDS_PaveBlock)& PaveBlock2() const { return myPB[1]; } /** - * Sets the tolerance associated with this couple - */ - void SetTolerance(const Standard_Real theTol) { - myTolerance = theTol; - } + * Sets the tolerance associated with this couple + */ + void SetTolerance(const Standard_Real theTol) { myTolerance = theTol; } + // /** - * Returns the tolerance associated with this couple - */ - Standard_Real Tolerance()const { - return myTolerance; - } + * Returns the tolerance associated with this couple + */ + Standard_Real Tolerance() const { return myTolerance; } - protected: - Standard_Integer myIndexInterf; - Standard_Integer myIndex; +protected: + Standard_Integer myIndexInterf; + Standard_Integer myIndex; Handle(BOPDS_PaveBlock) myPB[2]; - Standard_Real myTolerance; + Standard_Real myTolerance; }; + // #endif diff --git a/opencascade/BOPDS_Curve.hxx b/opencascade/BOPDS_Curve.hxx index 819275497..f374d8f70 100644 --- a/opencascade/BOPDS_Curve.hxx +++ b/opencascade/BOPDS_Curve.hxx @@ -28,125 +28,96 @@ class IntTools_Curve; class Bnd_Box; class BOPDS_PaveBlock; - - //! The class BOPDS_Curve is to store //! the information about intersection curve -class BOPDS_Curve +class BOPDS_Curve { public: - DEFINE_STANDARD_ALLOC - - //! Empty constructor BOPDS_Curve(); virtual ~BOPDS_Curve(); - //! Constructor //! @param theAllocator the allocator to manage the memory BOPDS_Curve(const Handle(NCollection_BaseAllocator)& theAllocator); - //! Modifier //! Sets the curve - void SetCurve (const IntTools_Curve& theC); - + void SetCurve(const IntTools_Curve& theC); //! Selector //! Returns the curve - const IntTools_Curve& Curve() const; - + const IntTools_Curve& Curve() const; //! Modifier //! Sets the bounding box of the curve - void SetBox (const Bnd_Box& theBox); - + void SetBox(const Bnd_Box& theBox); //! Selector //! Returns the bounding box of the curve - const Bnd_Box& Box() const; - + const Bnd_Box& Box() const; //! Selector/Modifier //! Returns the bounding box of the curve - Bnd_Box& ChangeBox(); - - void SetPaveBlocks (const BOPDS_ListOfPaveBlock& theLPB); - + Bnd_Box& ChangeBox(); + + void SetPaveBlocks(const BOPDS_ListOfPaveBlock& theLPB); //! Selector //! Returns the list of pave blocks //! of the curve - const BOPDS_ListOfPaveBlock& PaveBlocks() const; - + const BOPDS_ListOfPaveBlock& PaveBlocks() const; //! Selector/Modifier //! Returns the list of pave blocks //! of the curve - BOPDS_ListOfPaveBlock& ChangePaveBlocks(); - + BOPDS_ListOfPaveBlock& ChangePaveBlocks(); //! Creates initial pave block //! of the curve - void InitPaveBlock1(); - + void InitPaveBlock1(); //! Selector/Modifier //! Returns initial pave block //! of the curve - Handle(BOPDS_PaveBlock)& ChangePaveBlock1(); - + Handle(BOPDS_PaveBlock)& ChangePaveBlock1(); //! Selector //! Returns list of indices of technologic vertices //! of the curve - const TColStd_ListOfInteger& TechnoVertices() const; - + const TColStd_ListOfInteger& TechnoVertices() const; //! Selector/Modifier //! Returns list of indices of technologic vertices //! of the curve - TColStd_ListOfInteger& ChangeTechnoVertices(); - + TColStd_ListOfInteger& ChangeTechnoVertices(); //! Query //! Returns true if at least one pave block of the curve //! has edge - Standard_Boolean HasEdge() const; + Standard_Boolean HasEdge() const; //! Sets the tolerance for the curve. - void SetTolerance(const Standard_Real theTol) - { - myTolerance = theTol; - } + void SetTolerance(const Standard_Real theTol) { myTolerance = theTol; } //! Returns the tolerance of the curve - Standard_Real Tolerance() const - { - return myTolerance; - } + Standard_Real Tolerance() const { return myTolerance; } //! Returns the tangential tolerance of the curve - Standard_Real TangentialTolerance() const - { - return myCurve.TangentialTolerance(); - } + Standard_Real TangentialTolerance() const { return myCurve.TangentialTolerance(); } protected: - Handle(NCollection_BaseAllocator) myAllocator; - IntTools_Curve myCurve; - BOPDS_ListOfPaveBlock myPaveBlocks; - TColStd_ListOfInteger myTechnoVertices; - Bnd_Box myBox; - Standard_Real myTolerance; + IntTools_Curve myCurve; + BOPDS_ListOfPaveBlock myPaveBlocks; + TColStd_ListOfInteger myTechnoVertices; + Bnd_Box myBox; + Standard_Real myTolerance; private: - }; #include diff --git a/opencascade/BOPDS_Curve.lxx b/opencascade/BOPDS_Curve.lxx index 0c4213f99..7accf9139 100644 --- a/opencascade/BOPDS_Curve.lxx +++ b/opencascade/BOPDS_Curve.lxx @@ -15,157 +15,172 @@ #include //======================================================================= -//function : -//purpose : -//======================================================================= - inline BOPDS_Curve::BOPDS_Curve() -: - myAllocator(NCollection_BaseAllocator::CommonBaseAllocator()), - myPaveBlocks(myAllocator), - myTechnoVertices(myAllocator), - myTolerance(0.) +// function : +// purpose : +//======================================================================= +inline BOPDS_Curve::BOPDS_Curve() + : myAllocator(NCollection_BaseAllocator::CommonBaseAllocator()), + myPaveBlocks(myAllocator), + myTechnoVertices(myAllocator), + myTolerance(0.) { } + //======================================================================= -//function : -//purpose : +// function : +// purpose : //======================================================================= - inline BOPDS_Curve::BOPDS_Curve(const Handle(NCollection_BaseAllocator)& theAllocator) -: - myAllocator(theAllocator), - myPaveBlocks(myAllocator), - myTechnoVertices(myAllocator), - myTolerance(0.) +inline BOPDS_Curve::BOPDS_Curve(const Handle(NCollection_BaseAllocator)& theAllocator) + : myAllocator(theAllocator), + myPaveBlocks(myAllocator), + myTechnoVertices(myAllocator), + myTolerance(0.) { } + //======================================================================= -//function : -//purpose : +// function : +// purpose : //======================================================================= - inline BOPDS_Curve::~BOPDS_Curve() -{ -} +inline BOPDS_Curve::~BOPDS_Curve() {} + //======================================================================= -//function : SetCurve -//purpose : +// function : SetCurve +// purpose : //======================================================================= - inline void BOPDS_Curve::SetCurve(const IntTools_Curve& theCurve) +inline void BOPDS_Curve::SetCurve(const IntTools_Curve& theCurve) { - myCurve=theCurve; + myCurve = theCurve; } + //======================================================================= -//function : Curve -//purpose : +// function : Curve +// purpose : //======================================================================= - inline const IntTools_Curve& BOPDS_Curve::Curve()const +inline const IntTools_Curve& BOPDS_Curve::Curve() const { return myCurve; } + //======================================================================= -//function : SetPaveBlocks -//purpose : +// function : SetPaveBlocks +// purpose : //======================================================================= - inline void BOPDS_Curve::SetPaveBlocks(const BOPDS_ListOfPaveBlock& theLPB) +inline void BOPDS_Curve::SetPaveBlocks(const BOPDS_ListOfPaveBlock& theLPB) { BOPDS_ListIteratorOfListOfPaveBlock aIt; // myPaveBlocks.Clear(); aIt.Initialize(theLPB); - for (; aIt.More(); aIt.Next()) { + for (; aIt.More(); aIt.Next()) + { myPaveBlocks.Append(aIt.Value()); } } + //======================================================================= -//function : PaveBlocks -//purpose : +// function : PaveBlocks +// purpose : //======================================================================= - inline const BOPDS_ListOfPaveBlock& BOPDS_Curve::PaveBlocks()const +inline const BOPDS_ListOfPaveBlock& BOPDS_Curve::PaveBlocks() const { return myPaveBlocks; } + //======================================================================= -//function : ChangePaveBlocks -//purpose : +// function : ChangePaveBlocks +// purpose : //======================================================================= - inline BOPDS_ListOfPaveBlock& BOPDS_Curve::ChangePaveBlocks() +inline BOPDS_ListOfPaveBlock& BOPDS_Curve::ChangePaveBlocks() { return myPaveBlocks; } + //======================================================================= -//function : InitPaveBlock1 -//purpose : +// function : InitPaveBlock1 +// purpose : //======================================================================= - inline void BOPDS_Curve::InitPaveBlock1() +inline void BOPDS_Curve::InitPaveBlock1() { - if (!myPaveBlocks.Extent()) { - Handle(BOPDS_PaveBlock) aPB=new BOPDS_PaveBlock; + if (!myPaveBlocks.Extent()) + { + Handle(BOPDS_PaveBlock) aPB = new BOPDS_PaveBlock; myPaveBlocks.Append(aPB); } } + //======================================================================= -//function : ChangePaveBlock1 -//purpose : +// function : ChangePaveBlock1 +// purpose : //======================================================================= - inline Handle(BOPDS_PaveBlock)& BOPDS_Curve::ChangePaveBlock1() +inline Handle(BOPDS_PaveBlock)& BOPDS_Curve::ChangePaveBlock1() { - Handle(BOPDS_PaveBlock)* pPB=(Handle(BOPDS_PaveBlock)*)&myPaveBlocks.First(); + Handle(BOPDS_PaveBlock)* pPB = (Handle(BOPDS_PaveBlock)*)&myPaveBlocks.First(); return *pPB; } + //======================================================================= -//function : TechnoVertices -//purpose : +// function : TechnoVertices +// purpose : //======================================================================= - inline const TColStd_ListOfInteger& BOPDS_Curve::TechnoVertices()const +inline const TColStd_ListOfInteger& BOPDS_Curve::TechnoVertices() const { return myTechnoVertices; } + //======================================================================= -//function : ChangeTechnoVertices -//purpose : +// function : ChangeTechnoVertices +// purpose : //======================================================================= - inline TColStd_ListOfInteger& BOPDS_Curve::ChangeTechnoVertices() +inline TColStd_ListOfInteger& BOPDS_Curve::ChangeTechnoVertices() { return myTechnoVertices; } + //======================================================================= -//function : SetBox -//purpose : +// function : SetBox +// purpose : //======================================================================= - inline void BOPDS_Curve::SetBox(const Bnd_Box& theBox) +inline void BOPDS_Curve::SetBox(const Bnd_Box& theBox) { - myBox=theBox; + myBox = theBox; } + //======================================================================= -//function : Box -//purpose : +// function : Box +// purpose : //======================================================================= - inline const Bnd_Box& BOPDS_Curve::Box()const +inline const Bnd_Box& BOPDS_Curve::Box() const { return myBox; } + //======================================================================= -//function : ChangeBox -//purpose : +// function : ChangeBox +// purpose : //======================================================================= - inline Bnd_Box& BOPDS_Curve::ChangeBox() +inline Bnd_Box& BOPDS_Curve::ChangeBox() { return myBox; } + //======================================================================= -//function : HasEdge -//purpose : +// function : HasEdge +// purpose : //======================================================================= - inline Standard_Boolean BOPDS_Curve::HasEdge()const +inline Standard_Boolean BOPDS_Curve::HasEdge() const { - Standard_Boolean bFlag; + Standard_Boolean bFlag; BOPDS_ListIteratorOfListOfPaveBlock aItPB; // - bFlag=Standard_False; + bFlag = Standard_False; aItPB.Initialize(myPaveBlocks); - for (; aItPB.More(); aItPB.Next()) { - const Handle(BOPDS_PaveBlock)& aPB=aItPB.Value(); - bFlag=aPB->HasEdge(); - if (bFlag) { + for (; aItPB.More(); aItPB.Next()) + { + const Handle(BOPDS_PaveBlock)& aPB = aItPB.Value(); + bFlag = aPB->HasEdge(); + if (bFlag) + { break; } } diff --git a/opencascade/BOPDS_DS.hxx b/opencascade/BOPDS_DS.hxx index 38d0f33e8..005e51ef5 100644 --- a/opencascade/BOPDS_DS.hxx +++ b/opencascade/BOPDS_DS.hxx @@ -56,8 +56,6 @@ class BOPDS_CommonBlock; class BOPDS_FaceInfo; class Bnd_Box; - - //! The class BOPDS_DS provides the control //! of data structure for the algorithms in the //! Boolean Component such as General Fuse, Boolean operations, @@ -75,14 +73,11 @@ class Bnd_Box; //! 6 the collection of same domain shapes [myShapesSD];
//! 7 the collection of interferences [myInterfTB, //! myInterfVV,..myInterfFF] -class BOPDS_DS +class BOPDS_DS { public: - DEFINE_STANDARD_ALLOC - - //! Empty constructor Standard_EXPORT BOPDS_DS(); @@ -91,219 +86,187 @@ public: //! Constructor //! @param theAllocator the allocator to manage the memory Standard_EXPORT BOPDS_DS(const Handle(NCollection_BaseAllocator)& theAllocator); - //! Clears the contents Standard_EXPORT void Clear(); - //! Selector Standard_EXPORT const Handle(NCollection_BaseAllocator)& Allocator() const; - //! Modifier //! Sets the arguments [theLS] of an operation - Standard_EXPORT void SetArguments (const TopTools_ListOfShape& theLS); - + Standard_EXPORT void SetArguments(const TopTools_ListOfShape& theLS); //! Selector //! Returns the arguments of an operation Standard_EXPORT const TopTools_ListOfShape& Arguments() const; - //! Initializes the data structure for //! the arguments Standard_EXPORT void Init(const Standard_Real theFuzz = Precision::Confusion()); - //! Selector //! Returns the total number of shapes stored Standard_EXPORT Standard_Integer NbShapes() const; - //! Selector //! Returns the total number of source shapes stored Standard_EXPORT Standard_Integer NbSourceShapes() const; - //! Selector //! Returns the number of index ranges Standard_EXPORT Standard_Integer NbRanges() const; - //! Selector //! Returns the index range "i" - Standard_EXPORT const BOPDS_IndexRange& Range (const Standard_Integer theIndex) const; - + Standard_EXPORT const BOPDS_IndexRange& Range(const Standard_Integer theIndex) const; //! Selector //! Returns the rank of the shape of index "i" - Standard_EXPORT Standard_Integer Rank (const Standard_Integer theIndex) const; - + Standard_EXPORT Standard_Integer Rank(const Standard_Integer theIndex) const; //! Returns true if the shape of index "i" is not //! the source shape/sub-shape - Standard_EXPORT Standard_Boolean IsNewShape (const Standard_Integer theIndex) const; - + Standard_EXPORT Standard_Boolean IsNewShape(const Standard_Integer theIndex) const; //! Modifier //! Appends the information about the shape [theSI] //! to the data structure //! Returns the index of theSI in the data structure - Standard_EXPORT Standard_Integer Append (const BOPDS_ShapeInfo& theSI); - + Standard_EXPORT Standard_Integer Append(const BOPDS_ShapeInfo& theSI); //! Modifier //! Appends the default information about the shape [theS] //! to the data structure //! Returns the index of theS in the data structure - Standard_EXPORT Standard_Integer Append (const TopoDS_Shape& theS); - + Standard_EXPORT Standard_Integer Append(const TopoDS_Shape& theS); //! Selector //! Returns the information about the shape //! with index theIndex - Standard_EXPORT const BOPDS_ShapeInfo& ShapeInfo (const Standard_Integer theIndex) const; - + Standard_EXPORT const BOPDS_ShapeInfo& ShapeInfo(const Standard_Integer theIndex) const; //! Selector/Modifier //! Returns the information about the shape //! with index theIndex - Standard_EXPORT BOPDS_ShapeInfo& ChangeShapeInfo (const Standard_Integer theIndex); - + Standard_EXPORT BOPDS_ShapeInfo& ChangeShapeInfo(const Standard_Integer theIndex); //! Selector //! Returns the shape //! with index theIndex - Standard_EXPORT const TopoDS_Shape& Shape (const Standard_Integer theIndex) const; - + Standard_EXPORT const TopoDS_Shape& Shape(const Standard_Integer theIndex) const; //! Selector //! Returns the index of the shape theS - Standard_EXPORT Standard_Integer Index (const TopoDS_Shape& theS) const; - + Standard_EXPORT Standard_Integer Index(const TopoDS_Shape& theS) const; //! Selector //! Returns the information about pave blocks on source edges Standard_EXPORT const BOPDS_VectorOfListOfPaveBlock& PaveBlocksPool() const; - //! Selector/Modifier //! Returns the information about pave blocks on source edges Standard_EXPORT BOPDS_VectorOfListOfPaveBlock& ChangePaveBlocksPool(); - //! Query //! Returns true if the shape with index theIndex has the //! information about pave blocks - Standard_EXPORT Standard_Boolean HasPaveBlocks (const Standard_Integer theIndex) const; - + Standard_EXPORT Standard_Boolean HasPaveBlocks(const Standard_Integer theIndex) const; //! Selector //! Returns the pave blocks for the shape with index theIndex - Standard_EXPORT const BOPDS_ListOfPaveBlock& PaveBlocks (const Standard_Integer theIndex) const; - + Standard_EXPORT const BOPDS_ListOfPaveBlock& PaveBlocks(const Standard_Integer theIndex) const; //! Selector/Modifier //! Returns the pave blocks for the shape with index theIndex - Standard_EXPORT BOPDS_ListOfPaveBlock& ChangePaveBlocks (const Standard_Integer theIndex); - + Standard_EXPORT BOPDS_ListOfPaveBlock& ChangePaveBlocks(const Standard_Integer theIndex); //! Update the pave blocks for the all shapes in data structure Standard_EXPORT void UpdatePaveBlocks(); - //! Update the pave block thePB - Standard_EXPORT void UpdatePaveBlock (const Handle(BOPDS_PaveBlock)& thePB); - + Standard_EXPORT void UpdatePaveBlock(const Handle(BOPDS_PaveBlock)& thePB); //! Update the common block theCB - Standard_EXPORT void UpdateCommonBlock (const Handle(BOPDS_CommonBlock)& theCB, - const Standard_Real theFuzz); - + Standard_EXPORT void UpdateCommonBlock(const Handle(BOPDS_CommonBlock)& theCB, + const Standard_Real theFuzz); //! Query //! Returns true if the pave block is common block - Standard_EXPORT Standard_Boolean IsCommonBlock (const Handle(BOPDS_PaveBlock)& thePB) const; - + Standard_EXPORT Standard_Boolean IsCommonBlock(const Handle(BOPDS_PaveBlock)& thePB) const; //! Selector //! Returns the common block - Standard_EXPORT Handle(BOPDS_CommonBlock) CommonBlock (const Handle(BOPDS_PaveBlock)& thePB) const; - + Standard_EXPORT Handle(BOPDS_CommonBlock) CommonBlock(const Handle(BOPDS_PaveBlock)& thePB) const; //! Modifier //! Sets the common block - Standard_EXPORT void SetCommonBlock (const Handle(BOPDS_PaveBlock)& thePB, const Handle(BOPDS_CommonBlock)& theCB); - + Standard_EXPORT void SetCommonBlock(const Handle(BOPDS_PaveBlock)& thePB, + const Handle(BOPDS_CommonBlock)& theCB); //! Selector //! Returns the real first pave block - Standard_EXPORT Handle(BOPDS_PaveBlock) RealPaveBlock (const Handle(BOPDS_PaveBlock)& thePB) const; - + Standard_EXPORT Handle(BOPDS_PaveBlock) RealPaveBlock(const Handle(BOPDS_PaveBlock)& thePB) const; //! Query //! Returns true if common block contains more then one pave block - Standard_EXPORT Standard_Boolean IsCommonBlockOnEdge (const Handle(BOPDS_PaveBlock)& thePB) const; - + Standard_EXPORT Standard_Boolean IsCommonBlockOnEdge(const Handle(BOPDS_PaveBlock)& thePB) const; //! Selector //! Returns the information about state of faces Standard_EXPORT const BOPDS_VectorOfFaceInfo& FaceInfoPool() const; - //! Query //! Returns true if the shape with index theIndex has the //! information about state of face - Standard_EXPORT Standard_Boolean HasFaceInfo (const Standard_Integer theIndex) const; - + Standard_EXPORT Standard_Boolean HasFaceInfo(const Standard_Integer theIndex) const; //! Selector //! Returns the state of face with index theIndex - Standard_EXPORT const BOPDS_FaceInfo& FaceInfo (const Standard_Integer theIndex) const; - + Standard_EXPORT const BOPDS_FaceInfo& FaceInfo(const Standard_Integer theIndex) const; //! Selector/Modifier //! Returns the state of face with index theIndex - Standard_EXPORT BOPDS_FaceInfo& ChangeFaceInfo (const Standard_Integer theIndex); - + Standard_EXPORT BOPDS_FaceInfo& ChangeFaceInfo(const Standard_Integer theIndex); //! Update the state In of face with index theIndex - Standard_EXPORT void UpdateFaceInfoIn (const Standard_Integer theIndex); - + Standard_EXPORT void UpdateFaceInfoIn(const Standard_Integer theIndex); + //! Update the state IN for all faces in the given map - Standard_EXPORT void UpdateFaceInfoIn (const TColStd_MapOfInteger& theFaces); + Standard_EXPORT void UpdateFaceInfoIn(const TColStd_MapOfInteger& theFaces); //! Update the state On of face with index theIndex - Standard_EXPORT void UpdateFaceInfoOn (const Standard_Integer theIndex); - + Standard_EXPORT void UpdateFaceInfoOn(const Standard_Integer theIndex); + //! Update the state ON for all faces in the given map - Standard_EXPORT void UpdateFaceInfoOn (const TColStd_MapOfInteger& theFaces); + Standard_EXPORT void UpdateFaceInfoOn(const TColStd_MapOfInteger& theFaces); //! Selector //! Returns the state On //! [theMPB,theMVP] of face with index theIndex - Standard_EXPORT void FaceInfoOn (const Standard_Integer theIndex, BOPDS_IndexedMapOfPaveBlock& theMPB, TColStd_MapOfInteger& theMVP); - + Standard_EXPORT void FaceInfoOn(const Standard_Integer theIndex, + BOPDS_IndexedMapOfPaveBlock& theMPB, + TColStd_MapOfInteger& theMVP); //! Selector //! Returns the state In //! [theMPB,theMVP] of face with index theIndex - Standard_EXPORT void FaceInfoIn (const Standard_Integer theIndex, BOPDS_IndexedMapOfPaveBlock& theMPB, TColStd_MapOfInteger& theMVP); - + Standard_EXPORT void FaceInfoIn(const Standard_Integer theIndex, + BOPDS_IndexedMapOfPaveBlock& theMPB, + TColStd_MapOfInteger& theMVP); //! Selector //! Returns the indices of alone vertices //! for the face with index theIndex - Standard_EXPORT void AloneVertices (const Standard_Integer theF, TColStd_ListOfInteger& theLI) const; - + Standard_EXPORT void AloneVertices(const Standard_Integer theF, + TColStd_ListOfInteger& theLI) const; //! Refine the state On for the all faces having //! state information //! //! ++ Standard_EXPORT void RefineFaceInfoOn(); - + //! Removes any pave block from list of having IN state if it has also the state ON. Standard_EXPORT void RefineFaceInfoIn(); @@ -312,31 +275,31 @@ public: //! @param theMVCommon the indices of common vertices for both faces //! @param thePBOnIn all On/In pave blocks from both faces //! @param theCommonPB the common pave blocks (that are shared by both faces). - Standard_EXPORT void SubShapesOnIn(const Standard_Integer theNF1, - const Standard_Integer theNF2, - TColStd_MapOfInteger& theMVOnIn, - TColStd_MapOfInteger& theMVCommon, + Standard_EXPORT void SubShapesOnIn(const Standard_Integer theNF1, + const Standard_Integer theNF2, + TColStd_MapOfInteger& theMVOnIn, + TColStd_MapOfInteger& theMVCommon, BOPDS_IndexedMapOfPaveBlock& thePBOnIn, - BOPDS_MapOfPaveBlock& theCommonPB) const; - + BOPDS_MapOfPaveBlock& theCommonPB) const; //! Returns the indices of edges that are shared //! for the faces with indices theF1, theF2 //! //! same domain shapes - Standard_EXPORT void SharedEdges (const Standard_Integer theF1, const Standard_Integer theF2, TColStd_ListOfInteger& theLI, const Handle(NCollection_BaseAllocator)& theAllocator); - + Standard_EXPORT void SharedEdges(const Standard_Integer theF1, + const Standard_Integer theF2, + TColStd_ListOfInteger& theLI, + const Handle(NCollection_BaseAllocator)& theAllocator); //! Selector //! Returns the collection same domain shapes Standard_EXPORT TColStd_DataMapOfIntegerInteger& ShapesSD(); - //! Modifier //! Adds the information about same domain shapes //! with indices theIndex, theIndexSD - Standard_EXPORT void AddShapeSD (const Standard_Integer theIndex, const Standard_Integer theIndexSD); - + Standard_EXPORT void AddShapeSD(const Standard_Integer theIndex, + const Standard_Integer theIndexSD); //! Query //! Returns true if the shape with index theIndex has the @@ -344,58 +307,48 @@ public: //! the index of same domain shape found //! //! interferences - Standard_EXPORT Standard_Boolean HasShapeSD (const Standard_Integer theIndex, Standard_Integer& theIndexSD) const; - + Standard_EXPORT Standard_Boolean HasShapeSD(const Standard_Integer theIndex, + Standard_Integer& theIndexSD) const; //! Selector/Modifier //! Returns the collection of interferences Vertex/Vertex - BOPDS_VectorOfInterfVV& InterfVV(); - + BOPDS_VectorOfInterfVV& InterfVV(); //! Selector/Modifier //! Returns the collection of interferences Vertex/Edge - BOPDS_VectorOfInterfVE& InterfVE(); - + BOPDS_VectorOfInterfVE& InterfVE(); //! Selector/Modifier //! Returns the collection of interferences Vertex/Face - BOPDS_VectorOfInterfVF& InterfVF(); - + BOPDS_VectorOfInterfVF& InterfVF(); //! Selector/Modifier //! Returns the collection of interferences Edge/Edge - BOPDS_VectorOfInterfEE& InterfEE(); - + BOPDS_VectorOfInterfEE& InterfEE(); //! Selector/Modifier //! Returns the collection of interferences Edge/Face - BOPDS_VectorOfInterfEF& InterfEF(); - + BOPDS_VectorOfInterfEF& InterfEF(); //! Selector/Modifier //! Returns the collection of interferences Face/Face - BOPDS_VectorOfInterfFF& InterfFF(); - + BOPDS_VectorOfInterfFF& InterfFF(); //! Selector/Modifier //! Returns the collection of interferences Vertex/Solid - BOPDS_VectorOfInterfVZ& InterfVZ(); - + BOPDS_VectorOfInterfVZ& InterfVZ(); //! Selector/Modifier //! Returns the collection of interferences Edge/Solid - BOPDS_VectorOfInterfEZ& InterfEZ(); - + BOPDS_VectorOfInterfEZ& InterfEZ(); //! Selector/Modifier //! Returns the collection of interferences Face/Solid - BOPDS_VectorOfInterfFZ& InterfFZ(); - + BOPDS_VectorOfInterfFZ& InterfFZ(); //! Selector/Modifier //! Returns the collection of interferences Solid/Solid - BOPDS_VectorOfInterfZZ& InterfZZ(); - + BOPDS_VectorOfInterfZZ& InterfZZ(); //! Returns the number of types of the interferences static Standard_Integer NbInterfTypes(); @@ -404,45 +357,48 @@ public: //! Adds the information about an interference between //! shapes with indices theI1, theI2 to the summary //! table of interferences - Standard_Boolean AddInterf (const Standard_Integer theI1, const Standard_Integer theI2); + Standard_Boolean AddInterf(const Standard_Integer theI1, const Standard_Integer theI2); //! Query //! Returns true if the shape with index theI //! is interferred - Standard_Boolean HasInterf (const Standard_Integer theI) const; + Standard_Boolean HasInterf(const Standard_Integer theI) const; //! Query //! Returns true if the shapes with indices theI1, theI2 //! are interferred - Standard_Boolean HasInterf (const Standard_Integer theI1, const Standard_Integer theI2) const; + Standard_Boolean HasInterf(const Standard_Integer theI1, const Standard_Integer theI2) const; //! Query //! Returns true if the shape with index theI1 is interfered //! with //! any sub-shape of the shape with index theI2 (theFlag=true) //! all sub-shapes of the shape with index theI2 (theFlag=false) - Standard_EXPORT Standard_Boolean HasInterfShapeSubShapes (const Standard_Integer theI1, const Standard_Integer theI2, const Standard_Boolean theFlag = Standard_True) const; - + Standard_EXPORT Standard_Boolean + HasInterfShapeSubShapes(const Standard_Integer theI1, + const Standard_Integer theI2, + const Standard_Boolean theFlag = Standard_True) const; //! Query //! Returns true if the shapes with indices theI1, theI2 //! have interferred sub-shapes - Standard_EXPORT Standard_Boolean HasInterfSubShapes (const Standard_Integer theI1, const Standard_Integer theI2) const; - + Standard_EXPORT Standard_Boolean HasInterfSubShapes(const Standard_Integer theI1, + const Standard_Integer theI2) const; //! Selector //! Returns the table of interferences //! //! debug - const BOPDS_MapOfPair& Interferences() const; - + const BOPDS_MapOfPair& Interferences() const; + Standard_EXPORT void Dump() const; - - Standard_EXPORT Standard_Boolean IsSubShape (const Standard_Integer theI1, const Standard_Integer theI2); - + + Standard_EXPORT Standard_Boolean IsSubShape(const Standard_Integer theI1, + const Standard_Integer theI2); + //! Fills theLP with sorted paves //! of the shape with index theIndex - Standard_EXPORT void Paves (const Standard_Integer theIndex, BOPDS_ListOfPave& theLP); + Standard_EXPORT void Paves(const Standard_Integer theIndex, BOPDS_ListOfPave& theLP); //! Update the pave blocks for all shapes in data structure Standard_EXPORT void UpdatePaveBlocksWithSDVertices(); @@ -467,70 +423,55 @@ public: //! Computes bounding box for the solid with DS-index . //! The flag enables/disables the check of the solid //! for inverted status. By default the solids will be checked. - Standard_EXPORT void BuildBndBoxSolid (const Standard_Integer theIndex, - Bnd_Box& theBox, - const Standard_Boolean theCheckInverted = Standard_True); + Standard_EXPORT void BuildBndBoxSolid(const Standard_Integer theIndex, + Bnd_Box& theBox, + const Standard_Boolean theCheckInverted = Standard_True); protected: - - - //! Initializes the pave blocks for the shape with index theIndex - Standard_EXPORT void InitPaveBlocks (const Standard_Integer theIndex); + Standard_EXPORT void InitPaveBlocks(const Standard_Integer theIndex); //! Initializes the state of face with index theIndex - Standard_EXPORT void InitFaceInfo (const Standard_Integer theIndex); + Standard_EXPORT void InitFaceInfo(const Standard_Integer theIndex); //! Initializes the FaceInfo structure for face with index theIndex with elements //! having IN state for the face - Standard_EXPORT void InitFaceInfoIn (const Standard_Integer theIndex); - - Standard_EXPORT void InitShape (const Standard_Integer theIndex, const TopoDS_Shape& theS); - - Standard_EXPORT Standard_Boolean CheckCoincidence (const Handle(BOPDS_PaveBlock)& thePB1, - const Handle(BOPDS_PaveBlock)& thePB2, - const Standard_Real theFuzz); - - - Handle(NCollection_BaseAllocator) myAllocator; - TopTools_ListOfShape myArguments; - Standard_Integer myNbShapes; - Standard_Integer myNbSourceShapes; - BOPDS_VectorOfIndexRange myRanges; - BOPDS_VectorOfShapeInfo myLines; - TopTools_DataMapOfShapeInteger myMapShapeIndex; - BOPDS_VectorOfListOfPaveBlock myPaveBlocksPool; - BOPDS_DataMapOfPaveBlockCommonBlock myMapPBCB; - BOPDS_VectorOfFaceInfo myFaceInfoPool; - TColStd_DataMapOfIntegerInteger myShapesSD; + Standard_EXPORT void InitFaceInfoIn(const Standard_Integer theIndex); + + Standard_EXPORT void InitShape(const Standard_Integer theIndex, const TopoDS_Shape& theS); + + Standard_EXPORT Standard_Boolean CheckCoincidence(const Handle(BOPDS_PaveBlock)& thePB1, + const Handle(BOPDS_PaveBlock)& thePB2, + const Standard_Real theFuzz); + + Handle(NCollection_BaseAllocator) myAllocator; + TopTools_ListOfShape myArguments; + Standard_Integer myNbShapes; + Standard_Integer myNbSourceShapes; + BOPDS_VectorOfIndexRange myRanges; + BOPDS_VectorOfShapeInfo myLines; + TopTools_DataMapOfShapeInteger myMapShapeIndex; + BOPDS_VectorOfListOfPaveBlock myPaveBlocksPool; + BOPDS_DataMapOfPaveBlockCommonBlock myMapPBCB; + BOPDS_VectorOfFaceInfo myFaceInfoPool; + TColStd_DataMapOfIntegerInteger myShapesSD; TColStd_DataMapOfIntegerListOfInteger myMapVE; - BOPDS_MapOfPair myInterfTB; - BOPDS_VectorOfInterfVV myInterfVV; - BOPDS_VectorOfInterfVE myInterfVE; - BOPDS_VectorOfInterfVF myInterfVF; - BOPDS_VectorOfInterfEE myInterfEE; - BOPDS_VectorOfInterfEF myInterfEF; - BOPDS_VectorOfInterfFF myInterfFF; - BOPDS_VectorOfInterfVZ myInterfVZ; - BOPDS_VectorOfInterfEZ myInterfEZ; - BOPDS_VectorOfInterfFZ myInterfFZ; - BOPDS_VectorOfInterfZZ myInterfZZ; - TColStd_MapOfInteger myInterfered; - + BOPDS_MapOfPair myInterfTB; + BOPDS_VectorOfInterfVV myInterfVV; + BOPDS_VectorOfInterfVE myInterfVE; + BOPDS_VectorOfInterfVF myInterfVF; + BOPDS_VectorOfInterfEE myInterfEE; + BOPDS_VectorOfInterfEF myInterfEF; + BOPDS_VectorOfInterfFF myInterfFF; + BOPDS_VectorOfInterfVZ myInterfVZ; + BOPDS_VectorOfInterfEZ myInterfEZ; + BOPDS_VectorOfInterfFZ myInterfFZ; + BOPDS_VectorOfInterfZZ myInterfZZ; + TColStd_MapOfInteger myInterfered; private: - - - - - }; - #include - - - - #endif // _BOPDS_DS_HeaderFile diff --git a/opencascade/BOPDS_DS.lxx b/opencascade/BOPDS_DS.lxx index 25634a899..3df8949b9 100644 --- a/opencascade/BOPDS_DS.lxx +++ b/opencascade/BOPDS_DS.lxx @@ -13,96 +13,108 @@ // commercial license or contractual agreement. #include + //======================================================================= -//function : InterfVV -//purpose : +// function : InterfVV +// purpose : //======================================================================= inline BOPDS_VectorOfInterfVV& BOPDS_DS::InterfVV() { return myInterfVV; } + //======================================================================= -//function : InterfVE -//purpose : +// function : InterfVE +// purpose : //======================================================================= inline BOPDS_VectorOfInterfVE& BOPDS_DS::InterfVE() { return myInterfVE; } + //======================================================================= -//function : InterfVF -//purpose : +// function : InterfVF +// purpose : //======================================================================= inline BOPDS_VectorOfInterfVF& BOPDS_DS::InterfVF() { return myInterfVF; -}//======================================================================= -//function : InterfEE -//purpose : +} //======================================================================= + +// function : InterfEE +// purpose : //======================================================================= inline BOPDS_VectorOfInterfEE& BOPDS_DS::InterfEE() { return myInterfEE; } + //======================================================================= -//function : InterfEF -//purpose : +// function : InterfEF +// purpose : //======================================================================= inline BOPDS_VectorOfInterfEF& BOPDS_DS::InterfEF() { return myInterfEF; } + //======================================================================= -//function : InterfFF -//purpose : +// function : InterfFF +// purpose : //======================================================================= inline BOPDS_VectorOfInterfFF& BOPDS_DS::InterfFF() { return myInterfFF; } + //======================================================================= -//function : InterfVZ -//purpose : +// function : InterfVZ +// purpose : //======================================================================= inline BOPDS_VectorOfInterfVZ& BOPDS_DS::InterfVZ() { return myInterfVZ; } + //======================================================================= -//function : InterfEZ -//purpose : +// function : InterfEZ +// purpose : //======================================================================= inline BOPDS_VectorOfInterfEZ& BOPDS_DS::InterfEZ() { return myInterfEZ; } + //======================================================================= -//function : InterfFZ -//purpose : +// function : InterfFZ +// purpose : //======================================================================= inline BOPDS_VectorOfInterfFZ& BOPDS_DS::InterfFZ() { return myInterfFZ; } + //======================================================================= -//function : InterfZZ -//purpose : +// function : InterfZZ +// purpose : //======================================================================= inline BOPDS_VectorOfInterfZZ& BOPDS_DS::InterfZZ() { return myInterfZZ; } + //======================================================================= -//function : NbInterfTypes -//purpose : +// function : NbInterfTypes +// purpose : //======================================================================= inline Standard_Integer BOPDS_DS::NbInterfTypes() { return 10; } + //======================================================================= -//function : AddInterf -//purpose : +// function : AddInterf +// purpose : //======================================================================= inline Standard_Boolean BOPDS_DS::AddInterf(const Standard_Integer theI1, const Standard_Integer theI2) @@ -115,30 +127,32 @@ inline Standard_Boolean BOPDS_DS::AddInterf(const Standard_Integer theI1, } return Standard_False; } + //======================================================================= -//function : HasInterf -//purpose : +// function : HasInterf +// purpose : //======================================================================= inline Standard_Boolean BOPDS_DS::HasInterf(const Standard_Integer theI) const { return myInterfered.Contains(theI); } + //======================================================================= -//function : HasInterf -//purpose : +// function : HasInterf +// purpose : //======================================================================= -inline Standard_Boolean BOPDS_DS::HasInterf - (const Standard_Integer theI1, - const Standard_Integer theI2)const +inline Standard_Boolean BOPDS_DS::HasInterf(const Standard_Integer theI1, + const Standard_Integer theI2) const { BOPDS_Pair aPK(theI1, theI2); return myInterfTB.Contains(aPK); } + //======================================================================= -//function : Interferences -//purpose : +// function : Interferences +// purpose : //======================================================================= -inline const BOPDS_MapOfPair& BOPDS_DS::Interferences()const +inline const BOPDS_MapOfPair& BOPDS_DS::Interferences() const { return myInterfTB; } diff --git a/opencascade/BOPDS_DataMapOfIntegerListOfPaveBlock.hxx b/opencascade/BOPDS_DataMapOfIntegerListOfPaveBlock.hxx index 630928f1e..38d808cf3 100644 --- a/opencascade/BOPDS_DataMapOfIntegerListOfPaveBlock.hxx +++ b/opencascade/BOPDS_DataMapOfIntegerListOfPaveBlock.hxx @@ -18,6 +18,7 @@ #include #include -typedef NCollection_DataMap BOPDS_DataMapOfIntegerListOfPaveBlock; - +typedef NCollection_DataMap + BOPDS_DataMapOfIntegerListOfPaveBlock; + #endif diff --git a/opencascade/BOPDS_DataMapOfPaveBlockCommonBlock.hxx b/opencascade/BOPDS_DataMapOfPaveBlockCommonBlock.hxx index f80527463..2ba7f43f3 100644 --- a/opencascade/BOPDS_DataMapOfPaveBlockCommonBlock.hxx +++ b/opencascade/BOPDS_DataMapOfPaveBlockCommonBlock.hxx @@ -1,4 +1,4 @@ -// Created on: 2013-05-23 +// Created on: 2013-05-23 // Created by: Eugeny MALTCHIKOV // Copyright (c) 2013-2014 OPEN CASCADE SAS // @@ -19,7 +19,9 @@ #include #include -typedef NCollection_DataMap BOPDS_DataMapOfPaveBlockCommonBlock; -typedef BOPDS_DataMapOfPaveBlockCommonBlock::Iterator BOPDS_DataMapIteratorOfDataMapOfPaveBlockCommonBlock; - +typedef NCollection_DataMap + BOPDS_DataMapOfPaveBlockCommonBlock; +typedef BOPDS_DataMapOfPaveBlockCommonBlock::Iterator + BOPDS_DataMapIteratorOfDataMapOfPaveBlockCommonBlock; + #endif diff --git a/opencascade/BOPDS_DataMapOfPaveBlockListOfInteger.hxx b/opencascade/BOPDS_DataMapOfPaveBlockListOfInteger.hxx index 96a2cdef8..b7ee15b67 100644 --- a/opencascade/BOPDS_DataMapOfPaveBlockListOfInteger.hxx +++ b/opencascade/BOPDS_DataMapOfPaveBlockListOfInteger.hxx @@ -18,7 +18,9 @@ #include #include -typedef NCollection_DataMap BOPDS_DataMapOfPaveBlockListOfInteger; -typedef BOPDS_DataMapOfPaveBlockListOfInteger::Iterator BOPDS_DataMapIteratorOfDataMapOfPaveBlockListOfInteger; +typedef NCollection_DataMap + BOPDS_DataMapOfPaveBlockListOfInteger; +typedef BOPDS_DataMapOfPaveBlockListOfInteger::Iterator + BOPDS_DataMapIteratorOfDataMapOfPaveBlockListOfInteger; #endif diff --git a/opencascade/BOPDS_DataMapOfPaveBlockListOfPaveBlock.hxx b/opencascade/BOPDS_DataMapOfPaveBlockListOfPaveBlock.hxx index 0d04eb0f5..98c76f9d9 100644 --- a/opencascade/BOPDS_DataMapOfPaveBlockListOfPaveBlock.hxx +++ b/opencascade/BOPDS_DataMapOfPaveBlockListOfPaveBlock.hxx @@ -16,10 +16,12 @@ #define BOPDS_DataMapOfPaveBlockListOfPaveBlock_HeaderFile #include -#include +#include #include -typedef NCollection_DataMap BOPDS_DataMapOfPaveBlockListOfPaveBlock; -typedef BOPDS_DataMapOfPaveBlockListOfPaveBlock::Iterator BOPDS_DataMapIteratorOfDataMapOfPaveBlockListOfPaveBlock; - +typedef NCollection_DataMap + BOPDS_DataMapOfPaveBlockListOfPaveBlock; +typedef BOPDS_DataMapOfPaveBlockListOfPaveBlock::Iterator + BOPDS_DataMapIteratorOfDataMapOfPaveBlockListOfPaveBlock; + #endif diff --git a/opencascade/BOPDS_DataMapOfShapeCoupleOfPaveBlocks.hxx b/opencascade/BOPDS_DataMapOfShapeCoupleOfPaveBlocks.hxx index b34cf3d04..67adc4393 100644 --- a/opencascade/BOPDS_DataMapOfShapeCoupleOfPaveBlocks.hxx +++ b/opencascade/BOPDS_DataMapOfShapeCoupleOfPaveBlocks.hxx @@ -20,7 +20,9 @@ #include #include -typedef NCollection_DataMap BOPDS_DataMapOfShapeCoupleOfPaveBlocks; -typedef BOPDS_DataMapOfShapeCoupleOfPaveBlocks::Iterator BOPDS_DataMapIteratorOfDataMapOfShapeCoupleOfPaveBlocks; +typedef NCollection_DataMap + BOPDS_DataMapOfShapeCoupleOfPaveBlocks; +typedef BOPDS_DataMapOfShapeCoupleOfPaveBlocks::Iterator + BOPDS_DataMapIteratorOfDataMapOfShapeCoupleOfPaveBlocks; #endif diff --git a/opencascade/BOPDS_FaceInfo.hxx b/opencascade/BOPDS_FaceInfo.hxx index 110ac9a78..ebcabca50 100644 --- a/opencascade/BOPDS_FaceInfo.hxx +++ b/opencascade/BOPDS_FaceInfo.hxx @@ -27,18 +27,13 @@ #include #include - - //! The class BOPDS_FaceInfo is to store //! handy information about state of face -class BOPDS_FaceInfo +class BOPDS_FaceInfo { public: - DEFINE_STANDARD_ALLOC - - //! Empty constructor BOPDS_FaceInfo(); @@ -47,43 +42,36 @@ public: //! Constructor //! @param theAllocator the allocator to manage the memory BOPDS_FaceInfo(const Handle(NCollection_BaseAllocator)& theAllocator); - //! Clears the contents void Clear(); - //! Modifier //! Sets the index of the face - void SetIndex (const Standard_Integer theI); - + void SetIndex(const Standard_Integer theI); //! Selector //! Returns the index of the face //! //! In - Standard_Integer Index() const; - + Standard_Integer Index() const; //! Selector //! Returns the pave blocks of the face //! that have state In - const BOPDS_IndexedMapOfPaveBlock& PaveBlocksIn() const; - + const BOPDS_IndexedMapOfPaveBlock& PaveBlocksIn() const; //! Selector/Modifier //! Returns the pave blocks //! of the face //! that have state In - BOPDS_IndexedMapOfPaveBlock& ChangePaveBlocksIn(); - + BOPDS_IndexedMapOfPaveBlock& ChangePaveBlocksIn(); //! Selector //! Returns the list of indices for vertices //! of the face //! that have state In - const TColStd_MapOfInteger& VerticesIn() const; - + const TColStd_MapOfInteger& VerticesIn() const; //! Selector/Modifier //! Returns the list of indices for vertices @@ -91,28 +79,24 @@ public: //! that have state In //! //! On - TColStd_MapOfInteger& ChangeVerticesIn(); - + TColStd_MapOfInteger& ChangeVerticesIn(); //! Selector //! Returns the pave blocks of the face //! that have state On - const BOPDS_IndexedMapOfPaveBlock& PaveBlocksOn() const; - + const BOPDS_IndexedMapOfPaveBlock& PaveBlocksOn() const; //! Selector/Modifier //! Returns the pave blocks //! of the face //! that have state On - BOPDS_IndexedMapOfPaveBlock& ChangePaveBlocksOn(); - + BOPDS_IndexedMapOfPaveBlock& ChangePaveBlocksOn(); //! Selector //! Returns the list of indices for vertices //! of the face //! that have state On - const TColStd_MapOfInteger& VerticesOn() const; - + const TColStd_MapOfInteger& VerticesOn() const; //! Selector/Modifier //! Returns the list of indices for vertices @@ -120,60 +104,40 @@ public: //! that have state On //! //! Sections - TColStd_MapOfInteger& ChangeVerticesOn(); - + TColStd_MapOfInteger& ChangeVerticesOn(); //! Selector //! Returns the pave blocks of the face //! that are pave blocks of section edges - const BOPDS_IndexedMapOfPaveBlock& PaveBlocksSc() const; - - BOPDS_IndexedMapOfPaveBlock& ChangePaveBlocksSc(); - + const BOPDS_IndexedMapOfPaveBlock& PaveBlocksSc() const; + + BOPDS_IndexedMapOfPaveBlock& ChangePaveBlocksSc(); //! Selector //! Returns the list of indices for section vertices //! of the face - const TColStd_MapOfInteger& VerticesSc() const; - + const TColStd_MapOfInteger& VerticesSc() const; //! Selector/Modifier //! Returns the list of indices for section vertices //! of the face //! //! Others - TColStd_MapOfInteger& ChangeVerticesSc(); - - - + TColStd_MapOfInteger& ChangeVerticesSc(); protected: - - - Handle(NCollection_BaseAllocator) myAllocator; - Standard_Integer myIndex; - BOPDS_IndexedMapOfPaveBlock myPaveBlocksIn; - TColStd_MapOfInteger myVerticesIn; - BOPDS_IndexedMapOfPaveBlock myPaveBlocksOn; - TColStd_MapOfInteger myVerticesOn; - BOPDS_IndexedMapOfPaveBlock myPaveBlocksSc; - TColStd_MapOfInteger myVerticesSc; - + Standard_Integer myIndex; + BOPDS_IndexedMapOfPaveBlock myPaveBlocksIn; + TColStd_MapOfInteger myVerticesIn; + BOPDS_IndexedMapOfPaveBlock myPaveBlocksOn; + TColStd_MapOfInteger myVerticesOn; + BOPDS_IndexedMapOfPaveBlock myPaveBlocksSc; + TColStd_MapOfInteger myVerticesSc; private: - - - - - }; - #include - - - - #endif // _BOPDS_FaceInfo_HeaderFile diff --git a/opencascade/BOPDS_FaceInfo.lxx b/opencascade/BOPDS_FaceInfo.lxx index bf0367a59..bf4272a60 100644 --- a/opencascade/BOPDS_FaceInfo.lxx +++ b/opencascade/BOPDS_FaceInfo.lxx @@ -16,167 +16,182 @@ // commercial license or contractual agreement. //======================================================================= -//function : -//purpose : +// function : +// purpose : //======================================================================= - inline BOPDS_FaceInfo::BOPDS_FaceInfo() -: - myAllocator(NCollection_BaseAllocator::CommonBaseAllocator()), - myIndex(-1), - myPaveBlocksIn(100, myAllocator), - myVerticesIn(100, myAllocator), - myPaveBlocksOn(100, myAllocator), - myVerticesOn(100, myAllocator), - myPaveBlocksSc(100, myAllocator), - myVerticesSc(100, myAllocator) +inline BOPDS_FaceInfo::BOPDS_FaceInfo() + : myAllocator(NCollection_BaseAllocator::CommonBaseAllocator()), + myIndex(-1), + myPaveBlocksIn(100, myAllocator), + myVerticesIn(100, myAllocator), + myPaveBlocksOn(100, myAllocator), + myVerticesOn(100, myAllocator), + myPaveBlocksSc(100, myAllocator), + myVerticesSc(100, myAllocator) { } + //======================================================================= -//function : -//purpose : +// function : +// purpose : //======================================================================= - inline BOPDS_FaceInfo::BOPDS_FaceInfo(const Handle(NCollection_BaseAllocator)& theAllocator) -: - myAllocator(theAllocator), - myIndex(-1), - myPaveBlocksIn(100, myAllocator), - myVerticesIn(100, myAllocator), - myPaveBlocksOn(100, myAllocator), - myVerticesOn(100, myAllocator), - myPaveBlocksSc(100, myAllocator), - myVerticesSc(100, myAllocator) +inline BOPDS_FaceInfo::BOPDS_FaceInfo(const Handle(NCollection_BaseAllocator)& theAllocator) + : myAllocator(theAllocator), + myIndex(-1), + myPaveBlocksIn(100, myAllocator), + myVerticesIn(100, myAllocator), + myPaveBlocksOn(100, myAllocator), + myVerticesOn(100, myAllocator), + myPaveBlocksSc(100, myAllocator), + myVerticesSc(100, myAllocator) { } + //======================================================================= -//function : ~ -//purpose : +// function : ~ +// purpose : //======================================================================= - inline BOPDS_FaceInfo::~BOPDS_FaceInfo() +inline BOPDS_FaceInfo::~BOPDS_FaceInfo() { Clear(); } + //======================================================================= -//function : Clear -//purpose : +// function : Clear +// purpose : //======================================================================= - inline void BOPDS_FaceInfo::Clear() +inline void BOPDS_FaceInfo::Clear() { myPaveBlocksIn.Clear(); myVerticesIn.Clear(); myPaveBlocksOn.Clear(); myVerticesOn.Clear(); } + //======================================================================= -//function : SetIndex -//purpose : +// function : SetIndex +// purpose : //======================================================================= - inline void BOPDS_FaceInfo::SetIndex(const Standard_Integer theI) +inline void BOPDS_FaceInfo::SetIndex(const Standard_Integer theI) { - myIndex=theI; + myIndex = theI; } + //======================================================================= -//function : Index -//purpose : +// function : Index +// purpose : //======================================================================= - inline Standard_Integer BOPDS_FaceInfo::Index()const +inline Standard_Integer BOPDS_FaceInfo::Index() const { return myIndex; } + //======================================================================= -//function : PaveBlockIn -//purpose : +// function : PaveBlockIn +// purpose : //======================================================================= - inline const BOPDS_IndexedMapOfPaveBlock& BOPDS_FaceInfo::PaveBlocksIn()const +inline const BOPDS_IndexedMapOfPaveBlock& BOPDS_FaceInfo::PaveBlocksIn() const { return myPaveBlocksIn; } + //======================================================================= -//function : ChangePaveBlocksIn -//purpose : +// function : ChangePaveBlocksIn +// purpose : //======================================================================= - inline BOPDS_IndexedMapOfPaveBlock& BOPDS_FaceInfo::ChangePaveBlocksIn() +inline BOPDS_IndexedMapOfPaveBlock& BOPDS_FaceInfo::ChangePaveBlocksIn() { return myPaveBlocksIn; } + //======================================================================= -//function : VerticesIn -//purpose : +// function : VerticesIn +// purpose : //======================================================================= - inline const TColStd_MapOfInteger& BOPDS_FaceInfo::VerticesIn()const +inline const TColStd_MapOfInteger& BOPDS_FaceInfo::VerticesIn() const { return myVerticesIn; } + //======================================================================= -//function : ChangeVerticesIn -//purpose : +// function : ChangeVerticesIn +// purpose : //======================================================================= - inline TColStd_MapOfInteger& BOPDS_FaceInfo::ChangeVerticesIn() +inline TColStd_MapOfInteger& BOPDS_FaceInfo::ChangeVerticesIn() { return myVerticesIn; } + // On //======================================================================= -//function : PaveBlocksOn -//purpose : +// function : PaveBlocksOn +// purpose : //======================================================================= - inline const BOPDS_IndexedMapOfPaveBlock& BOPDS_FaceInfo::PaveBlocksOn()const +inline const BOPDS_IndexedMapOfPaveBlock& BOPDS_FaceInfo::PaveBlocksOn() const { return myPaveBlocksOn; } + //======================================================================= -//function : ChangePaveBlocksOn -//purpose : +// function : ChangePaveBlocksOn +// purpose : //======================================================================= - inline BOPDS_IndexedMapOfPaveBlock& BOPDS_FaceInfo::ChangePaveBlocksOn() +inline BOPDS_IndexedMapOfPaveBlock& BOPDS_FaceInfo::ChangePaveBlocksOn() { return myPaveBlocksOn; } + //======================================================================= -//function : VerticesOn -//purpose : +// function : VerticesOn +// purpose : //======================================================================= - inline const TColStd_MapOfInteger& BOPDS_FaceInfo::VerticesOn()const +inline const TColStd_MapOfInteger& BOPDS_FaceInfo::VerticesOn() const { return myVerticesOn; } + //======================================================================= -//function : ChangeVerticesOn -//purpose : +// function : ChangeVerticesOn +// purpose : //======================================================================= - inline TColStd_MapOfInteger& BOPDS_FaceInfo::ChangeVerticesOn() +inline TColStd_MapOfInteger& BOPDS_FaceInfo::ChangeVerticesOn() { return myVerticesOn; } + // Sc //======================================================================= -//function : PaveBlocksSc -//purpose : +// function : PaveBlocksSc +// purpose : //======================================================================= - inline const BOPDS_IndexedMapOfPaveBlock& BOPDS_FaceInfo::PaveBlocksSc()const +inline const BOPDS_IndexedMapOfPaveBlock& BOPDS_FaceInfo::PaveBlocksSc() const { return myPaveBlocksSc; } + //======================================================================= -//function : ChangePaveBlocksSc -//purpose : +// function : ChangePaveBlocksSc +// purpose : //======================================================================= - inline BOPDS_IndexedMapOfPaveBlock& BOPDS_FaceInfo::ChangePaveBlocksSc() +inline BOPDS_IndexedMapOfPaveBlock& BOPDS_FaceInfo::ChangePaveBlocksSc() { return myPaveBlocksSc; } + //======================================================================= -//function : VerticesSc -//purpose : +// function : VerticesSc +// purpose : //======================================================================= - inline const TColStd_MapOfInteger& BOPDS_FaceInfo::VerticesSc()const +inline const TColStd_MapOfInteger& BOPDS_FaceInfo::VerticesSc() const { return myVerticesSc; } + //======================================================================= -//function : ChangeVerticesSc -//purpose : +// function : ChangeVerticesSc +// purpose : //======================================================================= - inline TColStd_MapOfInteger& BOPDS_FaceInfo::ChangeVerticesSc() +inline TColStd_MapOfInteger& BOPDS_FaceInfo::ChangeVerticesSc() { return myVerticesSc; } diff --git a/opencascade/BOPDS_IndexRange.hxx b/opencascade/BOPDS_IndexRange.hxx index 549ab9b5c..1bc4b9156 100644 --- a/opencascade/BOPDS_IndexRange.hxx +++ b/opencascade/BOPDS_IndexRange.hxx @@ -21,83 +21,55 @@ #include - - //! The class BOPDS_IndexRange is to store //! the information about range of two indices -class BOPDS_IndexRange +class BOPDS_IndexRange { public: - DEFINE_STANDARD_ALLOC - - //! Empty constructor - BOPDS_IndexRange(); + BOPDS_IndexRange(); //! Modifier //! Sets the first index of the range - void SetFirst (const Standard_Integer theI1); - + void SetFirst(const Standard_Integer theI1); //! Modifier //! Sets the second index of the range - void SetLast (const Standard_Integer theI2); - + void SetLast(const Standard_Integer theI2); //! Selector //! Returns the first index of the range - Standard_Integer First() const; - + Standard_Integer First() const; //! Selector //! Returns the second index of the range - Standard_Integer Last() const; - + Standard_Integer Last() const; //! Modifier //! Sets the first index of the range //! Sets the second index of the range - void SetIndices (const Standard_Integer theI1, const Standard_Integer theI2); - + void SetIndices(const Standard_Integer theI1, const Standard_Integer theI2); //! Selector //! Returns the first index of the range //! Returns the second index of the range - void Indices (Standard_Integer& theI1, Standard_Integer& theI2) const; - + void Indices(Standard_Integer& theI1, Standard_Integer& theI2) const; //! Query //! Returns true if the range contains - Standard_Boolean Contains (const Standard_Integer theIndex) const; - - Standard_EXPORT void Dump() const; - - + Standard_Boolean Contains(const Standard_Integer theIndex) const; + Standard_EXPORT void Dump() const; protected: - - - Standard_Integer myFirst; Standard_Integer myLast; - private: - - - - - }; - #include - - - - #endif // _BOPDS_IndexRange_HeaderFile diff --git a/opencascade/BOPDS_IndexRange.lxx b/opencascade/BOPDS_IndexRange.lxx index 9fe9f331f..b348c9c45 100644 --- a/opencascade/BOPDS_IndexRange.lxx +++ b/opencascade/BOPDS_IndexRange.lxx @@ -13,74 +13,76 @@ // commercial license or contractual agreement. //======================================================================= -//function : -//purpose : +// function : +// purpose : //======================================================================= - inline BOPDS_IndexRange::BOPDS_IndexRange() -: - myFirst(0), - myLast(0) +inline BOPDS_IndexRange::BOPDS_IndexRange() + : myFirst(0), + myLast(0) { } + //======================================================================= -//function : SetFirst -//purpose : +// function : SetFirst +// purpose : //======================================================================= - inline void BOPDS_IndexRange::SetFirst(const Standard_Integer aFirst) +inline void BOPDS_IndexRange::SetFirst(const Standard_Integer aFirst) { - myFirst=aFirst; + myFirst = aFirst; } + //======================================================================= -//function : First -//purpose : +// function : First +// purpose : //======================================================================= - inline Standard_Integer BOPDS_IndexRange::First()const +inline Standard_Integer BOPDS_IndexRange::First() const { return myFirst; } + //======================================================================= -//function : SetLast -//purpose : +// function : SetLast +// purpose : //======================================================================= - inline void BOPDS_IndexRange::SetLast(const Standard_Integer aLast) +inline void BOPDS_IndexRange::SetLast(const Standard_Integer aLast) { - myLast=aLast; + myLast = aLast; } + //======================================================================= -//function :Last -//purpose : +// function :Last +// purpose : //======================================================================= - inline Standard_Integer BOPDS_IndexRange::Last()const +inline Standard_Integer BOPDS_IndexRange::Last() const { return myLast; } + //======================================================================= -//function : SetIndices -//purpose : +// function : SetIndices +// purpose : //======================================================================= - inline void BOPDS_IndexRange::SetIndices(const Standard_Integer theI1, - const Standard_Integer theI2) +inline void BOPDS_IndexRange::SetIndices(const Standard_Integer theI1, const Standard_Integer theI2) { - myFirst=theI1; - myLast=theI2; + myFirst = theI1; + myLast = theI2; } + //======================================================================= -//function : Indices -//purpose : +// function : Indices +// purpose : //======================================================================= - inline void BOPDS_IndexRange::Indices(Standard_Integer& theI1, - Standard_Integer& theI2)const +inline void BOPDS_IndexRange::Indices(Standard_Integer& theI1, Standard_Integer& theI2) const { - theI1=myFirst; - theI2=myLast; + theI1 = myFirst; + theI2 = myLast; } //======================================================================= -//function : Contains -//purpose : +// function : Contains +// purpose : //======================================================================= -inline Standard_Boolean BOPDS_IndexRange::Contains(const Standard_Integer aIndex)const +inline Standard_Boolean BOPDS_IndexRange::Contains(const Standard_Integer aIndex) const { - return aIndex >= myFirst - && aIndex <= myLast; + return aIndex >= myFirst && aIndex <= myLast; } diff --git a/opencascade/BOPDS_IndexedDataMapOfPaveBlockListOfInteger.hxx b/opencascade/BOPDS_IndexedDataMapOfPaveBlockListOfInteger.hxx index a9bdbfe4c..f23c5f5ab 100644 --- a/opencascade/BOPDS_IndexedDataMapOfPaveBlockListOfInteger.hxx +++ b/opencascade/BOPDS_IndexedDataMapOfPaveBlockListOfInteger.hxx @@ -19,6 +19,7 @@ #include #include -typedef NCollection_IndexedDataMap BOPDS_IndexedDataMapOfPaveBlockListOfInteger; +typedef NCollection_IndexedDataMap + BOPDS_IndexedDataMapOfPaveBlockListOfInteger; #endif diff --git a/opencascade/BOPDS_IndexedDataMapOfPaveBlockListOfPaveBlock.hxx b/opencascade/BOPDS_IndexedDataMapOfPaveBlockListOfPaveBlock.hxx index 3ce09a5b2..78bff7a70 100644 --- a/opencascade/BOPDS_IndexedDataMapOfPaveBlockListOfPaveBlock.hxx +++ b/opencascade/BOPDS_IndexedDataMapOfPaveBlockListOfPaveBlock.hxx @@ -16,9 +16,10 @@ #define BOPDS_IndexedDataMapOfPaveBlockListOfPaveBlock_HeaderFile #include -#include +#include #include -typedef NCollection_IndexedDataMap BOPDS_IndexedDataMapOfPaveBlockListOfPaveBlock; +typedef NCollection_IndexedDataMap + BOPDS_IndexedDataMapOfPaveBlockListOfPaveBlock; #endif diff --git a/opencascade/BOPDS_IndexedDataMapOfShapeCoupleOfPaveBlocks.hxx b/opencascade/BOPDS_IndexedDataMapOfShapeCoupleOfPaveBlocks.hxx index dce251313..ea63259fc 100644 --- a/opencascade/BOPDS_IndexedDataMapOfShapeCoupleOfPaveBlocks.hxx +++ b/opencascade/BOPDS_IndexedDataMapOfShapeCoupleOfPaveBlocks.hxx @@ -20,6 +20,7 @@ #include #include -typedef NCollection_IndexedDataMap BOPDS_IndexedDataMapOfShapeCoupleOfPaveBlocks; +typedef NCollection_IndexedDataMap + BOPDS_IndexedDataMapOfShapeCoupleOfPaveBlocks; #endif diff --git a/opencascade/BOPDS_IndexedMapOfPaveBlock.hxx b/opencascade/BOPDS_IndexedMapOfPaveBlock.hxx index 7b990919b..1b58f9f55 100644 --- a/opencascade/BOPDS_IndexedMapOfPaveBlock.hxx +++ b/opencascade/BOPDS_IndexedMapOfPaveBlock.hxx @@ -15,8 +15,8 @@ #ifndef BOPDS_IndexedMapOfPaveBlock_HeaderFile #define BOPDS_IndexedMapOfPaveBlock_HeaderFile -#include -#include +#include +#include typedef NCollection_IndexedMap BOPDS_IndexedMapOfPaveBlock; diff --git a/opencascade/BOPDS_Interf.hxx b/opencascade/BOPDS_Interf.hxx index 601d38e6d..307981638 100644 --- a/opencascade/BOPDS_Interf.hxx +++ b/opencascade/BOPDS_Interf.hxx @@ -22,16 +22,17 @@ /** * The class BOPDS_Interf stores the information about - * the interference between two shapes. - * The class BOPDS_Interf is root class + * the interference between two shapes. + * The class BOPDS_Interf is root class * -*/ + */ //======================================================================= -//function : BOPDS_Interf -//purpose : +// function : BOPDS_Interf +// purpose : //======================================================================= -class BOPDS_Interf { - public: +class BOPDS_Interf +{ +public: // /** * Sets the indices of interferred shapes @@ -40,11 +41,12 @@ class BOPDS_Interf { * @param theIndex2 * index of the second shape */ - void SetIndices(const Standard_Integer theIndex1, - const Standard_Integer theIndex2) { - myIndex1=theIndex1; - myIndex2=theIndex2; + void SetIndices(const Standard_Integer theIndex1, const Standard_Integer theIndex2) + { + myIndex1 = theIndex1; + myIndex2 = theIndex2; } + // /** * Returns the indices of interferred shapes @@ -53,260 +55,277 @@ class BOPDS_Interf { * @param theIndex2 * index of the second shape */ - void Indices(Standard_Integer& theIndex1, - Standard_Integer& theIndex2) const { - theIndex1=myIndex1; - theIndex2=myIndex2; - } + void Indices(Standard_Integer& theIndex1, Standard_Integer& theIndex2) const + { + theIndex1 = myIndex1; + theIndex2 = myIndex2; + } + // /** * Sets the index of the first interferred shape * @param theIndex - * index of the first shape + * index of the first shape */ - void SetIndex1(const Standard_Integer theIndex) { - myIndex1=theIndex; - } + void SetIndex1(const Standard_Integer theIndex) { myIndex1 = theIndex; } + // /** * Sets the index of the second interferred shape * @param theIndex - * index of the second shape + * index of the second shape */ - void SetIndex2(const Standard_Integer theIndex) { - myIndex2=theIndex; - } + void SetIndex2(const Standard_Integer theIndex) { myIndex2 = theIndex; } + // /** * Returns the index of the first interferred shape * @return - * index of the first shape + * index of the first shape */ - Standard_Integer Index1() const { - return myIndex1; - } + Standard_Integer Index1() const { return myIndex1; } + // /** * Returns the index of the second interferred shape * @return - * index of the second shape + * index of the second shape */ - Standard_Integer Index2() const { - return myIndex2; - } + Standard_Integer Index2() const { return myIndex2; } + // /** * Returns the index of that are opposite to the given index * @param theI * the index * @return - * index of opposite shape + * index of opposite shape */ - Standard_Integer OppositeIndex(const Standard_Integer theI) const { - if (theI==myIndex1) { + Standard_Integer OppositeIndex(const Standard_Integer theI) const + { + if (theI == myIndex1) + { return myIndex2; } - else if(theI==myIndex2) { + else if (theI == myIndex2) + { return myIndex1; } - else { + else + { return -1; } } + // /** * Returns true if the interference contains given index - * @param theIndex + * @param theIndex * the index * @return * true if the interference contains given index */ - Standard_Boolean Contains(const Standard_Integer theIndex)const { - return (myIndex1==theIndex || myIndex2==theIndex); + Standard_Boolean Contains(const Standard_Integer theIndex) const + { + return (myIndex1 == theIndex || myIndex2 == theIndex); } + // /** - * Sets the index of new shape - * @param theIndex + * Sets the index of new shape + * @param theIndex * the index */ - void SetIndexNew(const Standard_Integer theIndex) { - myIndexNew=theIndex; - } + void SetIndexNew(const Standard_Integer theIndex) { myIndexNew = theIndex; } + // // /** - * Returns the index of new shape - * @return theIndex - * the index of new shape + * Returns the index of new shape + * @return theIndex + * the index of new shape */ - Standard_Integer IndexNew() const { - return myIndexNew; - } + Standard_Integer IndexNew() const { return myIndexNew; } + // /** * Returns true if the interference has index of new shape - * that is equal to the given index - * @param theIndex + * that is equal to the given index + * @param theIndex * the index * @return true if the interference has index of new shape - * that is equal to the given index + * that is equal to the given index */ - Standard_Boolean HasIndexNew(Standard_Integer& theIndex) const { - theIndex=myIndexNew; - return (myIndexNew>=0); + Standard_Boolean HasIndexNew(Standard_Integer& theIndex) const + { + theIndex = myIndexNew; + return (myIndexNew >= 0); } + // /** * Returns true if the interference has index of new shape * the index * @return true if the interference has index of new shape */ - Standard_Boolean HasIndexNew() const { - return (myIndexNew+1) != 0; - } + Standard_Boolean HasIndexNew() const { return (myIndexNew + 1) != 0; } + // - protected: - BOPDS_Interf() : - myIndex1(-1), - myIndex2(-1), - myIndexNew(-1), - myAllocator(NCollection_BaseAllocator::CommonBaseAllocator()) { +protected: + BOPDS_Interf() + : myIndex1(-1), + myIndex2(-1), + myIndexNew(-1), + myAllocator(NCollection_BaseAllocator::CommonBaseAllocator()) + { } + // - BOPDS_Interf(const Handle(NCollection_BaseAllocator)& theAllocator) : - myIndex1(-1), - myIndex2(-1), - myIndexNew(-1), - myAllocator(theAllocator) { + BOPDS_Interf(const Handle(NCollection_BaseAllocator)& theAllocator) + : myIndex1(-1), + myIndex2(-1), + myIndexNew(-1), + myAllocator(theAllocator) + { } + // - virtual ~BOPDS_Interf() { - } - - protected: - Standard_Integer myIndex1; - Standard_Integer myIndex2; - Standard_Integer myIndexNew; + virtual ~BOPDS_Interf() {} + +protected: + Standard_Integer myIndex1; + Standard_Integer myIndex2; + Standard_Integer myIndexNew; Handle(NCollection_BaseAllocator) myAllocator; }; + /** * The class BOPDS_InterfVV stores the information about - * the interference of the type vertex/vertex. -*/ + * the interference of the type vertex/vertex. + */ //======================================================================= -//function : BOPDS_InterfVV -//purpose : +// function : BOPDS_InterfVV +// purpose : //======================================================================= -class BOPDS_InterfVV : public BOPDS_Interf { - public: +class BOPDS_InterfVV : public BOPDS_Interf +{ +public: // /** * Constructor */ - BOPDS_InterfVV() : BOPDS_Interf() { + BOPDS_InterfVV() + : BOPDS_Interf() + { } + // /** * Constructor * @param theAllocator * allocator to manage the memory */ - BOPDS_InterfVV(const Handle(NCollection_BaseAllocator)& theAllocator) - : BOPDS_Interf(theAllocator) { + BOPDS_InterfVV(const Handle(NCollection_BaseAllocator)& theAllocator) + : BOPDS_Interf(theAllocator) + { } + // /** * Destructor */ - virtual ~BOPDS_InterfVV() { - } + virtual ~BOPDS_InterfVV() {} + // }; + /** * The class BOPDS_InterfVE stores the information about - * the interference of the type vertex/edge. -*/ + * the interference of the type vertex/edge. + */ //======================================================================= -//function : BOPDS_InterfVE -//purpose : +// function : BOPDS_InterfVE +// purpose : //======================================================================= -class BOPDS_InterfVE : public BOPDS_Interf { - public: +class BOPDS_InterfVE : public BOPDS_Interf +{ +public: // /** * Constructor */ - BOPDS_InterfVE() - : - BOPDS_Interf(), - myParameter(0.) { + BOPDS_InterfVE() + : BOPDS_Interf(), + myParameter(0.) + { } + // /** * Constructor * @param theAllocator * allocator to manage the memory */ - BOPDS_InterfVE(const Handle(NCollection_BaseAllocator)& theAllocator) - : - BOPDS_Interf(theAllocator), - myParameter(0.) { + BOPDS_InterfVE(const Handle(NCollection_BaseAllocator)& theAllocator) + : BOPDS_Interf(theAllocator), + myParameter(0.) + { } + // /** * Destructor */ - virtual ~BOPDS_InterfVE() { - } + virtual ~BOPDS_InterfVE() {} + // /** * Modifier - * Sets the value of parameter - * of the point of the vertex + * Sets the value of parameter + * of the point of the vertex * on the curve of the edge * @param theT - * value of parameter + * value of parameter */ - void SetParameter(const Standard_Real theT) { - myParameter=theT; - } + void SetParameter(const Standard_Real theT) { myParameter = theT; } + // /** * Selector - * Returrns the value of parameter - * of the point of the vertex + * Returrns the value of parameter + * of the point of the vertex * on the curve of the edge * @return - * value of parameter + * value of parameter */ - Standard_Real Parameter() const { - return myParameter; - } - - protected: + Standard_Real Parameter() const { return myParameter; } + +protected: Standard_Real myParameter; - }; + /** * The class BOPDS_InterfVF stores the information about - * the interference of the type vertex/face -*/ + * the interference of the type vertex/face + */ //======================================================================= -//function : BOPDS_InterfVF -//purpose : +// function : BOPDS_InterfVF +// purpose : //======================================================================= -class BOPDS_InterfVF : public BOPDS_Interf { - public: +class BOPDS_InterfVF : public BOPDS_Interf +{ +public: // /** * Constructor */ BOPDS_InterfVF() - : BOPDS_Interf(), - myU(0.), - myV(0.) { + : BOPDS_Interf(), + myU(0.), + myV(0.) + { } + // /** * Constructor @@ -314,69 +333,77 @@ class BOPDS_InterfVF : public BOPDS_Interf { * allocator to manage the memory */ BOPDS_InterfVF(const Handle(NCollection_BaseAllocator)& theAllocator) - : BOPDS_Interf(theAllocator), - myU(0.), - myV(0.) { + : BOPDS_Interf(theAllocator), + myU(0.), + myV(0.) + { } + // /** * Destructor - */ - virtual ~BOPDS_InterfVF() { - } + */ + virtual ~BOPDS_InterfVF() {} + // /** * Modifier - * Sets the value of parameters - * of the point of the vertex + * Sets the value of parameters + * of the point of the vertex * on the surface of of the face * @param theU * value of U parameter - * @param theV - * value of U parameter + * @param theV + * value of U parameter */ - void SetUV(const Standard_Real theU, - const Standard_Real theV) { - myU=theU; - myV=theV; + void SetUV(const Standard_Real theU, const Standard_Real theV) + { + myU = theU; + myV = theV; } + // /** * Selector - * Returns the value of parameters - * of the point of the vertex + * Returns the value of parameters + * of the point of the vertex * on the surface of of the face * @param theU * value of U parameter - * @param theV - * value of U parameter + * @param theV + * value of U parameter */ - void UV(Standard_Real& theU,Standard_Real& theV) const { - theU=myU; - theV=myV; + void UV(Standard_Real& theU, Standard_Real& theV) const + { + theU = myU; + theV = myV; } - - protected: + +protected: Standard_Real myU; Standard_Real myV; - }; + /** * The class BOPDS_InterfEE stores the information about - * the interference of the type edge/edge. -*/ + * the interference of the type edge/edge. + */ //======================================================================= -//function : BOPDS_InterfEE -//purpose : +// function : BOPDS_InterfEE +// purpose : //======================================================================= -class BOPDS_InterfEE : public BOPDS_Interf { - public: +class BOPDS_InterfEE : public BOPDS_Interf +{ +public: // /** * Constructor */ - BOPDS_InterfEE() : BOPDS_Interf() { + BOPDS_InterfEE() + : BOPDS_Interf() + { } + // /** * Constructor @@ -384,54 +411,58 @@ class BOPDS_InterfEE : public BOPDS_Interf { * allocator to manage the memory */ BOPDS_InterfEE(const Handle(NCollection_BaseAllocator)& theAllocator) - : BOPDS_Interf(theAllocator) { + : BOPDS_Interf(theAllocator) + { } + // /** * Destructor */ - virtual ~BOPDS_InterfEE() { - } + virtual ~BOPDS_InterfEE() {} + // /** * Modifier - * Sets the info of common part + * Sets the info of common part * @param theCP * common part */ - void SetCommonPart(const IntTools_CommonPrt& theCP) { - myCommonPart=theCP; - } + void SetCommonPart(const IntTools_CommonPrt& theCP) { myCommonPart = theCP; } + // /** * Selector - * Returns the info of common part + * Returns the info of common part * @return * common part */ - const IntTools_CommonPrt& CommonPart() const { - return myCommonPart; - } - - protected: + const IntTools_CommonPrt& CommonPart() const { return myCommonPart; } + +protected: IntTools_CommonPrt myCommonPart; }; + /** * The class BOPDS_InterfEF stores the information about - * the interference of the type edge/face. -*/ + * the interference of the type edge/face. + */ //======================================================================= -//function : BOPDS_InterfEF -//purpose : +// function : BOPDS_InterfEF +// purpose : //======================================================================= -class BOPDS_InterfEF : public BOPDS_Interf { - public: +class BOPDS_InterfEF : public BOPDS_Interf +{ +public: // /** * Constructor */ - BOPDS_InterfEF(): BOPDS_Interf() { + BOPDS_InterfEF() + : BOPDS_Interf() + { } + // /** * Constructor @@ -444,66 +475,69 @@ class BOPDS_InterfEF : public BOPDS_Interf { * allocator to manage the memory */ BOPDS_InterfEF(const Handle(NCollection_BaseAllocator)& theAllocator) - : BOPDS_Interf(theAllocator) { + : BOPDS_Interf(theAllocator) + { } + // /** * Destructor */ - virtual ~BOPDS_InterfEF() { - } + virtual ~BOPDS_InterfEF() {} + // /** * Modifier - * Sets the info of common part + * Sets the info of common part * @param theCP * common part */ - void SetCommonPart(const IntTools_CommonPrt& theCP){ - myCommonPart=theCP; - } + void SetCommonPart(const IntTools_CommonPrt& theCP) { myCommonPart = theCP; } + // /** * Selector - * Returns the info of common part + * Returns the info of common part * @return * common part */ - const IntTools_CommonPrt& CommonPart() const { - return myCommonPart; - } + const IntTools_CommonPrt& CommonPart() const { return myCommonPart; } + // - protected: +protected: IntTools_CommonPrt myCommonPart; } /** * The class BOPDS_InterfFF stores the information about - * the interference of the type face/face. -*/; + * the interference of the type face/face. + */ +; + //======================================================================= -//function : BOPDS_InterfFF -//purpose : +// function : BOPDS_InterfFF +// purpose : //======================================================================= -class BOPDS_InterfFF : public BOPDS_Interf { - public: +class BOPDS_InterfFF : public BOPDS_Interf +{ +public: // /** * Constructor */ BOPDS_InterfFF() - : - BOPDS_Interf(), - myTangentFaces(Standard_False), - myCurves(0, myAllocator), - myPoints(0, myAllocator) + : BOPDS_Interf(), + myTangentFaces(Standard_False), + myCurves(0, myAllocator), + myPoints(0, myAllocator) { } + // /** * Destructor */ - virtual ~BOPDS_InterfFF() { - } + virtual ~BOPDS_InterfFF() {} + // /** * Initializer @@ -512,211 +546,207 @@ class BOPDS_InterfFF : public BOPDS_Interf { * @param theNbPoints * number of intersection points */ - - void Init(const Standard_Integer theNbCurves, - const Standard_Integer theNbPoints) { - if (theNbCurves>0) { + + void Init(const Standard_Integer theNbCurves, const Standard_Integer theNbPoints) + { + if (theNbCurves > 0) + { myCurves.SetIncrement(theNbCurves); } - if (theNbPoints>0) { + if (theNbPoints > 0) + { myPoints.SetIncrement(theNbPoints); } } + /** * Modifier - * Sets the flag of whether the faces are tangent + * Sets the flag of whether the faces are tangent * @param theFlag - * the flag + * the flag */ - void SetTangentFaces(const Standard_Boolean theFlag) { - myTangentFaces=theFlag; - } + void SetTangentFaces(const Standard_Boolean theFlag) { myTangentFaces = theFlag; } + /** * Selector - * Returns the flag whether the faces are tangent + * Returns the flag whether the faces are tangent * @return - * the flag + * the flag */ - Standard_Boolean TangentFaces()const { - return myTangentFaces; - } + Standard_Boolean TangentFaces() const { return myTangentFaces; } + // /** * Selector - * Returns the intersection curves + * Returns the intersection curves * @return - * intersection curves + * intersection curves */ - const BOPDS_VectorOfCurve& Curves()const{ - return myCurves; - } + const BOPDS_VectorOfCurve& Curves() const { return myCurves; } + // /** * Selector/Modifier - * Returns the intersection curves + * Returns the intersection curves * @return - * intersection curves + * intersection curves */ - BOPDS_VectorOfCurve& ChangeCurves(){ - return myCurves; - } + BOPDS_VectorOfCurve& ChangeCurves() { return myCurves; } + // /** * Selector - * Returns the intersection points + * Returns the intersection points * @return * intersection points */ - const BOPDS_VectorOfPoint& Points()const{ - return myPoints; - } + const BOPDS_VectorOfPoint& Points() const { return myPoints; } + // /** * Selector/Modifier - * Returns the intersection points + * Returns the intersection points * @return * intersection points */ - BOPDS_VectorOfPoint& ChangePoints(){ - return myPoints; - } + BOPDS_VectorOfPoint& ChangePoints() { return myPoints; } + // - protected: - Standard_Boolean myTangentFaces; +protected: + Standard_Boolean myTangentFaces; BOPDS_VectorOfCurve myCurves; BOPDS_VectorOfPoint myPoints; }; /** * The class BOPDS_InterfVZ stores the information about - * the interference of the type vertex/solid. -*/ + * the interference of the type vertex/solid. + */ //======================================================================= -//function : BOPDS_InterfVZ -//purpose : +// function : BOPDS_InterfVZ +// purpose : //======================================================================= -class BOPDS_InterfVZ : public BOPDS_Interf { - public: +class BOPDS_InterfVZ : public BOPDS_Interf +{ +public: // /** * Constructor */ - BOPDS_InterfVZ() : BOPDS_Interf() { - }; + BOPDS_InterfVZ() + : BOPDS_Interf() {}; // /** * Constructor * @param theAllocator * allocator to manage the memory */ - BOPDS_InterfVZ(const Handle(NCollection_BaseAllocator)& theAllocator) - : BOPDS_Interf(theAllocator) { - }; + BOPDS_InterfVZ(const Handle(NCollection_BaseAllocator)& theAllocator) + : BOPDS_Interf(theAllocator) {}; // /** * Destructor */ - virtual ~BOPDS_InterfVZ() { - }; + virtual ~BOPDS_InterfVZ() {}; // }; + /** * The class BOPDS_InterfEZ stores the information about - * the interference of the type edge/solid. -*/ + * the interference of the type edge/solid. + */ //======================================================================= -//function : BOPDS_InterfEZ -//purpose : +// function : BOPDS_InterfEZ +// purpose : //======================================================================= -class BOPDS_InterfEZ : public BOPDS_Interf { - public: +class BOPDS_InterfEZ : public BOPDS_Interf +{ +public: // /** * Constructor */ - BOPDS_InterfEZ() : BOPDS_Interf() { - }; + BOPDS_InterfEZ() + : BOPDS_Interf() {}; // /** * Constructor * @param theAllocator * allocator to manage the memory */ - BOPDS_InterfEZ(const Handle(NCollection_BaseAllocator)& theAllocator) - : BOPDS_Interf(theAllocator) { - }; + BOPDS_InterfEZ(const Handle(NCollection_BaseAllocator)& theAllocator) + : BOPDS_Interf(theAllocator) {}; // /** * Destructor */ - virtual ~BOPDS_InterfEZ() { - }; + virtual ~BOPDS_InterfEZ() {}; // }; + /** * The class BOPDS_InterfFZ stores the information about - * the interference of the type face/solid. -*/ + * the interference of the type face/solid. + */ //======================================================================= -//function : BOPDS_InterfFZ -//purpose : +// function : BOPDS_InterfFZ +// purpose : //======================================================================= -class BOPDS_InterfFZ : public BOPDS_Interf { - public: +class BOPDS_InterfFZ : public BOPDS_Interf +{ +public: // /** * Constructor */ - BOPDS_InterfFZ() : BOPDS_Interf() { - }; + BOPDS_InterfFZ() + : BOPDS_Interf() {}; // /** * Constructor * @param theAllocator * allocator to manage the memory */ - BOPDS_InterfFZ(const Handle(NCollection_BaseAllocator)& theAllocator) - : BOPDS_Interf(theAllocator) { - }; + BOPDS_InterfFZ(const Handle(NCollection_BaseAllocator)& theAllocator) + : BOPDS_Interf(theAllocator) {}; // /** * Destructor */ - virtual ~BOPDS_InterfFZ() { - }; + virtual ~BOPDS_InterfFZ() {}; // }; + /** * The class BOPDS_InterfZZ stores the information about - * the interference of the type solid/solid. -*/ + * the interference of the type solid/solid. + */ //======================================================================= -//function : BOPDS_InterfZZ -//purpose : +// function : BOPDS_InterfZZ +// purpose : //======================================================================= -class BOPDS_InterfZZ : public BOPDS_Interf { - public: +class BOPDS_InterfZZ : public BOPDS_Interf +{ +public: // /** * Constructor */ - BOPDS_InterfZZ() : BOPDS_Interf() { - }; + BOPDS_InterfZZ() + : BOPDS_Interf() {}; // /** * Constructor * @param theAllocator * allocator to manage the memory */ - BOPDS_InterfZZ(const Handle(NCollection_BaseAllocator)& theAllocator) - : BOPDS_Interf(theAllocator) { - }; + BOPDS_InterfZZ(const Handle(NCollection_BaseAllocator)& theAllocator) + : BOPDS_Interf(theAllocator) {}; // /** * Destructor */ - virtual ~BOPDS_InterfZZ() { - }; + virtual ~BOPDS_InterfZZ() {}; // }; diff --git a/opencascade/BOPDS_Iterator.hxx b/opencascade/BOPDS_Iterator.hxx index b5004549c..77243b3be 100644 --- a/opencascade/BOPDS_Iterator.hxx +++ b/opencascade/BOPDS_Iterator.hxx @@ -37,10 +37,9 @@ class IntTools_Context; //! in terms of theirs bounding boxes //! 2.provides interface to iterate the pairs of //! intersected sub-shapes of given type -class BOPDS_Iterator +class BOPDS_Iterator { public: - DEFINE_STANDARD_ALLOC //! Empty constructor @@ -53,7 +52,7 @@ public: //! Modifier //! Sets the data structure to process - Standard_EXPORT void SetDS (const BOPDS_PDS& pDS); + Standard_EXPORT void SetDS(const BOPDS_PDS& pDS); //! Selector //! Returns the data structure @@ -62,7 +61,7 @@ public: //! Initializes the iterator //! theType1 - the first type of shape //! theType2 - the second type of shape - Standard_EXPORT void Initialize (const TopAbs_ShapeEnum theType1, const TopAbs_ShapeEnum theType2); + Standard_EXPORT void Initialize(const TopAbs_ShapeEnum theType1, const TopAbs_ShapeEnum theType2); //! Returns true if still there are pairs //! of intersected shapes @@ -74,14 +73,14 @@ public: //! Returns indices (DS) of intersected shapes //! theIndex1 - the index of the first shape //! theIndex2 - the index of the second shape - Standard_EXPORT void Value (Standard_Integer& theIndex1, - Standard_Integer& theIndex2) const; + Standard_EXPORT void Value(Standard_Integer& theIndex1, Standard_Integer& theIndex2) const; //! Perform the intersection algorithm and prepare //! the results to be used - Standard_EXPORT virtual void Prepare(const Handle(IntTools_Context)& theCtx = Handle(IntTools_Context)(), - const Standard_Boolean theCheckOBB = Standard_False, - const Standard_Real theFuzzyValue = Precision::Confusion()); + Standard_EXPORT virtual void Prepare( + const Handle(IntTools_Context)& theCtx = Handle(IntTools_Context)(), + const Standard_Boolean theCheckOBB = Standard_False, + const Standard_Real theFuzzyValue = Precision::Confusion()); //! Updates the tree of Bounding Boxes with increased boxes and //! intersects such elements with the tree. @@ -96,39 +95,35 @@ public: //! Set the flag of parallel processing //! if is true the parallel processing is switched on //! if is false the parallel processing is switched off - Standard_EXPORT void SetRunParallel (const Standard_Boolean theFlag); + Standard_EXPORT void SetRunParallel(const Standard_Boolean theFlag); //! Returns the flag of parallel processing Standard_EXPORT Standard_Boolean RunParallel() const; - public: //! @name Number of extra interfering types - // Extra lists contain only V/V, V/E, V/F interfering pairs. // Although E/E is also initialized (but never filled) for code simplicity. static Standard_Integer NbExtInterfs() { return 4; } protected: //! @name Protected methods for bounding boxes intersection - //! Intersects the Bounding boxes of sub-shapes of the arguments with the tree //! and saves the interfering pairs for further geometrical intersection. - Standard_EXPORT virtual void Intersect(const Handle(IntTools_Context)& theCtx = Handle(IntTools_Context)(), - const Standard_Boolean theCheckOBB = Standard_False, - const Standard_Real theFuzzyValue = Precision::Confusion()); - -protected: //! @name Fields + Standard_EXPORT virtual void Intersect( + const Handle(IntTools_Context)& theCtx = Handle(IntTools_Context)(), + const Standard_Boolean theCheckOBB = Standard_False, + const Standard_Real theFuzzyValue = Precision::Confusion()); +protected: //! @name Fields Handle(NCollection_BaseAllocator) myAllocator; //!< Allocator - Standard_Integer myLength; //!< Length of the intersection vector of + Standard_Integer myLength; //!< Length of the intersection vector of //! particular intersection type - BOPDS_PDS myDS; //!< Data Structure - BOPDS_VectorOfVectorOfPair myLists; //!< Pairs with interfering bounding boxes + BOPDS_PDS myDS; //!< Data Structure + BOPDS_VectorOfVectorOfPair myLists; //!< Pairs with interfering bounding boxes BOPDS_VectorOfPair::Iterator myIterator; //!< Iterator on each interfering type - Standard_Boolean myRunParallel; //!< Flag for parallel processing - BOPDS_VectorOfVectorOfPair myExtLists; //!< Extra pairs of sub-shapes found after + Standard_Boolean myRunParallel; //!< Flag for parallel processing + BOPDS_VectorOfVectorOfPair myExtLists; //!< Extra pairs of sub-shapes found after //! intersection of increased sub-shapes Standard_Boolean myUseExt; //!< Information flag for using the extra lists - }; #endif // _BOPDS_Iterator_HeaderFile diff --git a/opencascade/BOPDS_IteratorSI.hxx b/opencascade/BOPDS_IteratorSI.hxx index 9c88ae5fd..ee18bfd6f 100644 --- a/opencascade/BOPDS_IteratorSI.hxx +++ b/opencascade/BOPDS_IteratorSI.hxx @@ -26,22 +26,17 @@ #include #include - - //! The class BOPDS_IteratorSI is //! 1.to compute self-intersections between BRep sub-shapes //! of each argument of an operation (see the class BOPDS_DS) //! in terms of theirs bounding boxes //! 2.provides interface to iterare the pairs of //! intersected sub-shapes of given type -class BOPDS_IteratorSI : public BOPDS_Iterator +class BOPDS_IteratorSI : public BOPDS_Iterator { public: - DEFINE_STANDARD_ALLOC - - //! Empty constructor Standard_EXPORT BOPDS_IteratorSI(); @@ -50,7 +45,7 @@ public: //! Constructor //! @param theAllocator the allocator to manage the memory Standard_EXPORT BOPDS_IteratorSI(const Handle(NCollection_BaseAllocator)& theAllocator); - + //! Updates the lists of possible intersections //! according to the value of . //! It defines which interferferences will be checked: @@ -60,33 +55,15 @@ public: //! 3 - V/V, V/E, E/E and V/F; //! 4 - V/V, V/E, E/E, V/F and E/F; //! other - all interferences. - Standard_EXPORT void UpdateByLevelOfCheck (const Standard_Integer theLevel); - - - + Standard_EXPORT void UpdateByLevelOfCheck(const Standard_Integer theLevel); protected: - - - Standard_EXPORT virtual void Intersect(const Handle(IntTools_Context)& theCtx = Handle(IntTools_Context)(), - const Standard_Boolean theCheckOBB = Standard_False, - const Standard_Real theFuzzyValue = Precision::Confusion()) Standard_OVERRIDE; - - - + Standard_EXPORT virtual void Intersect( + const Handle(IntTools_Context)& theCtx = Handle(IntTools_Context)(), + const Standard_Boolean theCheckOBB = Standard_False, + const Standard_Real theFuzzyValue = Precision::Confusion()) Standard_OVERRIDE; private: - - - - - }; - - - - - - #endif // _BOPDS_IteratorSI_HeaderFile diff --git a/opencascade/BOPDS_ListOfPave.hxx b/opencascade/BOPDS_ListOfPave.hxx index c61089e1f..4a835678c 100644 --- a/opencascade/BOPDS_ListOfPave.hxx +++ b/opencascade/BOPDS_ListOfPave.hxx @@ -15,11 +15,10 @@ #ifndef BOPDS_ListOfPave_HeaderFile #define BOPDS_ListOfPave_HeaderFile -#include -#include - -typedef NCollection_List BOPDS_ListOfPave; -typedef BOPDS_ListOfPave::Iterator BOPDS_ListIteratorOfListOfPave; +#include +#include +typedef NCollection_List BOPDS_ListOfPave; +typedef BOPDS_ListOfPave::Iterator BOPDS_ListIteratorOfListOfPave; #endif diff --git a/opencascade/BOPDS_ListOfPaveBlock.hxx b/opencascade/BOPDS_ListOfPaveBlock.hxx index 501686356..aee744175 100644 --- a/opencascade/BOPDS_ListOfPaveBlock.hxx +++ b/opencascade/BOPDS_ListOfPaveBlock.hxx @@ -20,8 +20,7 @@ class BOPDS_PaveBlock; -typedef NCollection_List BOPDS_ListOfPaveBlock; -typedef BOPDS_ListOfPaveBlock::Iterator BOPDS_ListIteratorOfListOfPaveBlock; - +typedef NCollection_List BOPDS_ListOfPaveBlock; +typedef BOPDS_ListOfPaveBlock::Iterator BOPDS_ListIteratorOfListOfPaveBlock; #endif diff --git a/opencascade/BOPDS_MapOfCommonBlock.hxx b/opencascade/BOPDS_MapOfCommonBlock.hxx index 21dccc1cd..0e22bc313 100644 --- a/opencascade/BOPDS_MapOfCommonBlock.hxx +++ b/opencascade/BOPDS_MapOfCommonBlock.hxx @@ -15,10 +15,10 @@ #ifndef BOPDS_MapOfCommonBlock_HeaderFile #define BOPDS_MapOfCommonBlock_HeaderFile -#include -#include +#include +#include -typedef NCollection_Map BOPDS_MapOfCommonBlock; -typedef BOPDS_MapOfCommonBlock::Iterator BOPDS_MapIteratorOfMapOfCommonBlock; +typedef NCollection_Map BOPDS_MapOfCommonBlock; +typedef BOPDS_MapOfCommonBlock::Iterator BOPDS_MapIteratorOfMapOfCommonBlock; #endif diff --git a/opencascade/BOPDS_MapOfPair.hxx b/opencascade/BOPDS_MapOfPair.hxx index ac9754404..5793d9fc3 100644 --- a/opencascade/BOPDS_MapOfPair.hxx +++ b/opencascade/BOPDS_MapOfPair.hxx @@ -19,6 +19,6 @@ #include typedef NCollection_Map BOPDS_MapOfPair; -typedef BOPDS_MapOfPair::Iterator BOPDS_MapIteratorOfMapOfPair; +typedef BOPDS_MapOfPair::Iterator BOPDS_MapIteratorOfMapOfPair; #endif diff --git a/opencascade/BOPDS_MapOfPave.hxx b/opencascade/BOPDS_MapOfPave.hxx index 22f63dd62..8ee118c45 100644 --- a/opencascade/BOPDS_MapOfPave.hxx +++ b/opencascade/BOPDS_MapOfPave.hxx @@ -15,10 +15,10 @@ #ifndef BOPDS_MapOfPave_HeaderFile #define BOPDS_MapOfPave_HeaderFile -#include +#include #include -typedef NCollection_Map BOPDS_MapOfPave; -typedef BOPDS_MapOfPave::Iterator BOPDS_MapIteratorOfMapOfPave; +typedef NCollection_Map BOPDS_MapOfPave; +typedef BOPDS_MapOfPave::Iterator BOPDS_MapIteratorOfMapOfPave; #endif diff --git a/opencascade/BOPDS_MapOfPaveBlock.hxx b/opencascade/BOPDS_MapOfPaveBlock.hxx index fb75669f7..8e3ba0901 100644 --- a/opencascade/BOPDS_MapOfPaveBlock.hxx +++ b/opencascade/BOPDS_MapOfPaveBlock.hxx @@ -15,10 +15,10 @@ #ifndef BOPDS_MapOfPaveBlock_HeaderFile #define BOPDS_MapOfPaveBlock_HeaderFile -#include -#include +#include +#include -typedef NCollection_Map BOPDS_MapOfPaveBlock; -typedef BOPDS_MapOfPaveBlock::Iterator BOPDS_MapIteratorOfMapOfPaveBlock; +typedef NCollection_Map BOPDS_MapOfPaveBlock; +typedef BOPDS_MapOfPaveBlock::Iterator BOPDS_MapIteratorOfMapOfPaveBlock; #endif diff --git a/opencascade/BOPDS_Pair.hxx b/opencascade/BOPDS_Pair.hxx index 0fbd17002..feb535a6b 100644 --- a/opencascade/BOPDS_Pair.hxx +++ b/opencascade/BOPDS_Pair.hxx @@ -21,75 +21,82 @@ //! The class is to provide the pair of indices of interfering shapes. -class BOPDS_Pair { - public: - +class BOPDS_Pair +{ +public: DEFINE_STANDARD_ALLOC - BOPDS_Pair() : myIndex1(-1), myIndex2(-1) {} + BOPDS_Pair() + : myIndex1(-1), + myIndex2(-1) + { + } + // - BOPDS_Pair(const Standard_Integer theIndex1, - const Standard_Integer theIndex2) : myIndex1(theIndex1), myIndex2(theIndex2) {} - - ~BOPDS_Pair(){} + BOPDS_Pair(const Standard_Integer theIndex1, const Standard_Integer theIndex2) + : myIndex1(theIndex1), + myIndex2(theIndex2) + { + } + + ~BOPDS_Pair() {} + // //! Sets the indices - void SetIndices(const Standard_Integer theIndex1, - const Standard_Integer theIndex2) + void SetIndices(const Standard_Integer theIndex1, const Standard_Integer theIndex2) { myIndex1 = theIndex1; myIndex2 = theIndex2; } + // //! Gets the indices - void Indices(Standard_Integer& theIndex1, - Standard_Integer& theIndex2) const + void Indices(Standard_Integer& theIndex1, Standard_Integer& theIndex2) const { theIndex1 = myIndex1; theIndex2 = myIndex2; } + // //! Operator less - Standard_Boolean operator < (const BOPDS_Pair& theOther) const + Standard_Boolean operator<(const BOPDS_Pair& theOther) const { - return ((myIndex1 != theOther.myIndex1) ? - (myIndex1 < theOther.myIndex1) : (myIndex2 < theOther.myIndex2)); + return ((myIndex1 != theOther.myIndex1) ? (myIndex1 < theOther.myIndex1) + : (myIndex2 < theOther.myIndex2)); } + // //! Returns true if the Pair is equal to - Standard_Boolean IsEqual (const BOPDS_Pair& theOther) const + Standard_Boolean IsEqual(const BOPDS_Pair& theOther) const { - return (myIndex1 == theOther.myIndex1 && myIndex2 == theOther.myIndex2) || - (myIndex1 == theOther.myIndex2 && myIndex2 == theOther.myIndex1); + return (myIndex1 == theOther.myIndex1 && myIndex2 == theOther.myIndex2) + || (myIndex1 == theOther.myIndex2 && myIndex2 == theOther.myIndex1); } - bool operator==(const BOPDS_Pair& theOther) const - { - return IsEqual(theOther); - } + bool operator==(const BOPDS_Pair& theOther) const { return IsEqual(theOther); } - protected: +protected: Standard_Integer myIndex1; Standard_Integer myIndex2; }; namespace std { - template <> - struct hash +template <> +struct hash +{ + size_t operator()(const BOPDS_Pair& thePair) const noexcept { - size_t operator()(const BOPDS_Pair& thePair) const noexcept + // Combine two int values into a single hash value. + int aCombination[2]; + thePair.Indices(aCombination[0], aCombination[1]); + if (aCombination[0] > aCombination[1]) { - // Combine two int values into a single hash value. - int aCombination[2]; - thePair.Indices(aCombination[0], aCombination[1]); - if (aCombination[0] > aCombination[1]) - { - std::swap(aCombination[0], aCombination[1]); - } - return opencascade::hashBytes(aCombination, sizeof(aCombination)); + std::swap(aCombination[0], aCombination[1]); } - }; -} + return opencascade::hashBytes(aCombination, sizeof(aCombination)); + } +}; +} // namespace std #endif // _BOPDS_Pair \ No newline at end of file diff --git a/opencascade/BOPDS_Pave.hxx b/opencascade/BOPDS_Pave.hxx index 6a09d57bc..9e853ae5e 100644 --- a/opencascade/BOPDS_Pave.hxx +++ b/opencascade/BOPDS_Pave.hxx @@ -22,106 +22,75 @@ #include #include - - //! The class BOPDS_Pave is to store //! information about vertex on an edge -class BOPDS_Pave +class BOPDS_Pave { public: - DEFINE_STANDARD_ALLOC - - //! Empty constructor - BOPDS_Pave(); + BOPDS_Pave(); //! Modifier //! Sets the index of vertex - void SetIndex (const Standard_Integer theIndex); - + void SetIndex(const Standard_Integer theIndex); //! Selector //! Returns the index of vertex - Standard_Integer Index() const; - + Standard_Integer Index() const; //! Modifier //! Sets the parameter of vertex - void SetParameter (const Standard_Real theParameter); - + void SetParameter(const Standard_Real theParameter); //! Selector //! Returns the parameter of vertex - Standard_Real Parameter() const; - + Standard_Real Parameter() const; //! Selector //! Returns the index of vertex //! Returns the parameter of vertex - void Contents (Standard_Integer& theIndex, Standard_Real& theParameter) const; - + void Contents(Standard_Integer& theIndex, Standard_Real& theParameter) const; //! Query //! Returns true if thr parameter od this is less //! than the parameter of - Standard_Boolean IsLess (const BOPDS_Pave& theOther) const; - Standard_Boolean operator < (const BOPDS_Pave& theOther) const -{ - return IsLess(theOther); -} - + Standard_Boolean IsLess(const BOPDS_Pave& theOther) const; + + Standard_Boolean operator<(const BOPDS_Pave& theOther) const { return IsLess(theOther); } //! Query //! Returns true if thr parameter od this is equal //! to the parameter of - Standard_Boolean IsEqual (const BOPDS_Pave& theOther) const; - Standard_Boolean operator == (const BOPDS_Pave& theOther) const -{ - return IsEqual(theOther); -} - - Standard_EXPORT void Dump() const; - + Standard_Boolean IsEqual(const BOPDS_Pave& theOther) const; + Standard_Boolean operator==(const BOPDS_Pave& theOther) const { return IsEqual(theOther); } + Standard_EXPORT void Dump() const; protected: - - - Standard_Integer myIndex; - Standard_Real myParameter; - + Standard_Real myParameter; private: - - - - - }; namespace std { - template <> - struct hash +template <> +struct hash +{ + size_t operator()(const BOPDS_Pave& thePave) const noexcept { - size_t operator()(const BOPDS_Pave& thePave) const noexcept - { - size_t aCombination[2]; - aCombination[0] = opencascade::hash(thePave.Index()); - aCombination[1] = opencascade::hash(thePave.Parameter()); - return opencascade::hashBytes(aCombination, sizeof(aCombination)); - } - }; -} + size_t aCombination[2]; + aCombination[0] = opencascade::hash(thePave.Index()); + aCombination[1] = opencascade::hash(thePave.Parameter()); + return opencascade::hashBytes(aCombination, sizeof(aCombination)); + } +}; +} // namespace std #include - - - - #endif // _BOPDS_Pave_HeaderFile diff --git a/opencascade/BOPDS_Pave.lxx b/opencascade/BOPDS_Pave.lxx index 44a9ed762..5361d85b3 100644 --- a/opencascade/BOPDS_Pave.lxx +++ b/opencascade/BOPDS_Pave.lxx @@ -13,75 +13,78 @@ // commercial license or contractual agreement. //======================================================================= -//function : -//purpose : +// function : +// purpose : //======================================================================= - inline BOPDS_Pave::BOPDS_Pave() +inline BOPDS_Pave::BOPDS_Pave() { - myIndex=-1; - myParameter=99.; + myIndex = -1; + myParameter = 99.; } //======================================================================= -//function : SetIndex -//purpose : +// function : SetIndex +// purpose : //======================================================================= - inline void BOPDS_Pave::SetIndex(const Standard_Integer theIndex) +inline void BOPDS_Pave::SetIndex(const Standard_Integer theIndex) { - myIndex=theIndex; + myIndex = theIndex; } + //======================================================================= -//function : Index -//purpose : +// function : Index +// purpose : //======================================================================= - inline Standard_Integer BOPDS_Pave::Index()const +inline Standard_Integer BOPDS_Pave::Index() const { return myIndex; } + //======================================================================= -//function : SetParameter -//purpose : +// function : SetParameter +// purpose : //======================================================================= - inline void BOPDS_Pave::SetParameter(const Standard_Real theParameter) +inline void BOPDS_Pave::SetParameter(const Standard_Real theParameter) { - myParameter=theParameter; + myParameter = theParameter; } //======================================================================= -//function : Parameter -//purpose : +// function : Parameter +// purpose : //======================================================================= - inline Standard_Real BOPDS_Pave::Parameter()const +inline Standard_Real BOPDS_Pave::Parameter() const { return myParameter; } + //======================================================================= -//function : Contents -//purpose : +// function : Contents +// purpose : //======================================================================= - inline void BOPDS_Pave::Contents(Standard_Integer& theIndex, - Standard_Real& theParameter)const +inline void BOPDS_Pave::Contents(Standard_Integer& theIndex, Standard_Real& theParameter) const { - theIndex=myIndex; - theParameter=myParameter; + theIndex = myIndex; + theParameter = myParameter; } + //======================================================================= -//function : IsLess -//purpose : +// function : IsLess +// purpose : //======================================================================= - inline Standard_Boolean BOPDS_Pave::IsLess(const BOPDS_Pave& theOther)const +inline Standard_Boolean BOPDS_Pave::IsLess(const BOPDS_Pave& theOther) const { - return myParameter #include - class BOPDS_PaveBlock; DEFINE_STANDARD_HANDLE(BOPDS_PaveBlock, Standard_Transient) - //! The class BOPDS_PaveBlock is to store //! the information about pave block on an edge. //! Two adjacent paves on edge make up pave block. @@ -38,7 +36,6 @@ class BOPDS_PaveBlock : public Standard_Transient { public: - //! Empty constructor Standard_EXPORT BOPDS_PaveBlock(); @@ -48,96 +45,79 @@ public: //! Modifier //! Sets the first pave - Standard_EXPORT void SetPave1 (const BOPDS_Pave& thePave); - + Standard_EXPORT void SetPave1(const BOPDS_Pave& thePave); //! Selector //! Returns the first pave Standard_EXPORT const BOPDS_Pave& Pave1() const; - //! Modifier //! Sets the second pave - Standard_EXPORT void SetPave2 (const BOPDS_Pave& thePave); - + Standard_EXPORT void SetPave2(const BOPDS_Pave& thePave); //! Selector //! Returns the second pave Standard_EXPORT const BOPDS_Pave& Pave2() const; - //! Modifier //! Sets the index of edge of pave block - Standard_EXPORT void SetEdge (const Standard_Integer theEdge); - + Standard_EXPORT void SetEdge(const Standard_Integer theEdge); //! Selector //! Returns the index of edge of pave block Standard_EXPORT Standard_Integer Edge() const; - //! Query //! Returns true if the pave block has edge Standard_EXPORT Standard_Boolean HasEdge() const; - //! Query //! Returns true if the pave block has edge //! Returns the index of edge - Standard_EXPORT Standard_Boolean HasEdge (Standard_Integer& theEdge) const; - + Standard_EXPORT Standard_Boolean HasEdge(Standard_Integer& theEdge) const; //! Modifier //! Sets the index of original edge //! of the pave block - Standard_EXPORT void SetOriginalEdge (const Standard_Integer theEdge); - + Standard_EXPORT void SetOriginalEdge(const Standard_Integer theEdge); //! Selector //! Returns the index of original edge of pave block Standard_EXPORT Standard_Integer OriginalEdge() const; - //! Query //! Returns true if the edge is equal to the original edge //! of the pave block Standard_EXPORT Standard_Boolean IsSplitEdge() const; - //! Selector //! Returns the parametric range //! of the pave block - Standard_EXPORT void Range (Standard_Real& theT1, Standard_Real& theT2) const; - + Standard_EXPORT void Range(Standard_Real& theT1, Standard_Real& theT2) const; //! Query //! Returns true if the pave block has pave indices //! that equal to the pave indices of the pave block //! - Standard_EXPORT Standard_Boolean HasSameBounds (const Handle(BOPDS_PaveBlock)& theOther) const; - + Standard_EXPORT Standard_Boolean HasSameBounds(const Handle(BOPDS_PaveBlock)& theOther) const; //! Selector //! Returns the pave indices //! of the pave block - Standard_EXPORT void Indices (Standard_Integer& theIndex1, - Standard_Integer& theIndex2) const; - + Standard_EXPORT void Indices(Standard_Integer& theIndex1, Standard_Integer& theIndex2) const; //! Query //! Returns true if the pave block contains extra paves Standard_EXPORT Standard_Boolean IsToUpdate() const; - //! Modifier //! Appends extra paves Standard_EXPORT void AppendExtPave(const BOPDS_Pave& thePave); - //! Modifier //! Appends extra pave - Standard_EXPORT void AppendExtPave1 (const BOPDS_Pave& thePave); - + Standard_EXPORT void AppendExtPave1(const BOPDS_Pave& thePave); + //! Modifier //! Removes a pave with the given vertex number from extra paves Standard_EXPORT void RemoveExtPave(const Standard_Integer theVertNum); @@ -145,99 +125,76 @@ public: //! Selector //! Returns the extra paves Standard_EXPORT const BOPDS_ListOfPave& ExtPaves() const; - //! Selector / Modifier //! Returns the extra paves Standard_EXPORT BOPDS_ListOfPave& ChangeExtPaves(); - //! Modifier //! Updates the pave block. The extra paves are used //! to create new pave blocks . //! - if true, the first pave and the second //! pave are used to produce new pave blocks. - Standard_EXPORT void Update (BOPDS_ListOfPaveBlock& theLPB, - const Standard_Boolean theFlag = Standard_True); - + Standard_EXPORT void Update(BOPDS_ListOfPaveBlock& theLPB, + const Standard_Boolean theFlag = Standard_True); //! Query //! Returns true if the extra paves contain the pave //! with given value of the parameter //! - the value of the tolerance to compare //! - index of the found pave - Standard_EXPORT Standard_Boolean ContainsParameter (const Standard_Real thePrm, - const Standard_Real theTol, - Standard_Integer& theInd) const; - + Standard_EXPORT Standard_Boolean ContainsParameter(const Standard_Real thePrm, + const Standard_Real theTol, + Standard_Integer& theInd) const; //! Modifier //! Sets the shrunk data for the pave block //! , - shrunk range //! - the bounding box //! - defines whether the edge can be split - Standard_EXPORT void SetShrunkData (const Standard_Real theTS1, - const Standard_Real theTS2, - const Bnd_Box& theBox, - const Standard_Boolean theIsSplittable); - + Standard_EXPORT void SetShrunkData(const Standard_Real theTS1, + const Standard_Real theTS2, + const Bnd_Box& theBox, + const Standard_Boolean theIsSplittable); //! Selector //! Returns the shrunk data for the pave block //! , - shrunk range //! - the bounding box //! - defines whether the edge can be split - Standard_EXPORT void ShrunkData (Standard_Real& theTS1, - Standard_Real& theTS2, - Bnd_Box& theBox, - Standard_Boolean& theIsSplittable) const; - + Standard_EXPORT void ShrunkData(Standard_Real& theTS1, + Standard_Real& theTS2, + Bnd_Box& theBox, + Standard_Boolean& theIsSplittable) const; //! Query //! Returns true if the pave block contains //! the shrunk data Standard_EXPORT Standard_Boolean HasShrunkData() const; - + Standard_EXPORT void Dump() const; //! Query //! Returns FALSE if the pave block has a too short //! shrunk range and cannot be split, otherwise returns TRUE - Standard_Boolean IsSplittable() const - { - return myIsSplittable; - } + Standard_Boolean IsSplittable() const { return myIsSplittable; } - - - DEFINE_STANDARD_RTTIEXT(BOPDS_PaveBlock,Standard_Transient) + DEFINE_STANDARD_RTTIEXT(BOPDS_PaveBlock, Standard_Transient) protected: - - Handle(NCollection_BaseAllocator) myAllocator; - Standard_Integer myEdge; - Standard_Integer myOriginalEdge; - BOPDS_Pave myPave1; - BOPDS_Pave myPave2; - BOPDS_ListOfPave myExtPaves; - Standard_Real myTS1; - Standard_Real myTS2; - Bnd_Box myShrunkBox; - TColStd_MapOfInteger myMFence; - Standard_Boolean myIsSplittable; + Standard_Integer myEdge; + Standard_Integer myOriginalEdge; + BOPDS_Pave myPave1; + BOPDS_Pave myPave2; + BOPDS_ListOfPave myExtPaves; + Standard_Real myTS1; + Standard_Real myTS2; + Bnd_Box myShrunkBox; + TColStd_MapOfInteger myMFence; + Standard_Boolean myIsSplittable; private: - - - - }; - - - - - - #endif // _BOPDS_PaveBlock_HeaderFile diff --git a/opencascade/BOPDS_Point.hxx b/opencascade/BOPDS_Point.hxx index 35b8c236f..8b01d3e86 100644 --- a/opencascade/BOPDS_Point.hxx +++ b/opencascade/BOPDS_Point.hxx @@ -24,88 +24,58 @@ class gp_Pnt; class gp_Pnt2d; - - //! The class BOPDS_Point is to store //! the information about intersection point -class BOPDS_Point +class BOPDS_Point { public: - DEFINE_STANDARD_ALLOC - - //! Empty constructor - BOPDS_Point(); -virtual ~BOPDS_Point(); - + BOPDS_Point(); + virtual ~BOPDS_Point(); //! Modifier //! Sets 3D point - void SetPnt (const gp_Pnt& thePnt); - + void SetPnt(const gp_Pnt& thePnt); //! Selector //! Returns 3D point - const gp_Pnt& Pnt() const; - + const gp_Pnt& Pnt() const; //! Modifier //! Sets 2D point on the first face - void SetPnt2D1 (const gp_Pnt2d& thePnt); - + void SetPnt2D1(const gp_Pnt2d& thePnt); //! Selector //! Returns 2D point on the first face - const gp_Pnt2d& Pnt2D1() const; - + const gp_Pnt2d& Pnt2D1() const; //! Modifier //! Sets 2D point on the second face - void SetPnt2D2 (const gp_Pnt2d& thePnt); - + void SetPnt2D2(const gp_Pnt2d& thePnt); //! Selector //! Returns 2D point on the second face - const gp_Pnt2d& Pnt2D2() const; - + const gp_Pnt2d& Pnt2D2() const; //! Modifier //! Sets the index of the vertex - void SetIndex (const Standard_Integer theIndex); - + void SetIndex(const Standard_Integer theIndex); //! Selector //! Returns index of the vertex - Standard_Integer Index() const; - - - + Standard_Integer Index() const; protected: - - - - gp_Pnt myPnt; - gp_Pnt2d myPnt2D1; - gp_Pnt2d myPnt2D2; + gp_Pnt myPnt; + gp_Pnt2d myPnt2D1; + gp_Pnt2d myPnt2D2; Standard_Integer myIndex; - private: - - - - - }; - #include - - - - #endif // _BOPDS_Point_HeaderFile diff --git a/opencascade/BOPDS_Point.lxx b/opencascade/BOPDS_Point.lxx index d4ce0658e..a9d67e8e4 100644 --- a/opencascade/BOPDS_Point.lxx +++ b/opencascade/BOPDS_Point.lxx @@ -13,84 +13,91 @@ // commercial license or contractual agreement. //======================================================================= -//function : -//purpose : +// function : +// purpose : //======================================================================= - inline BOPDS_Point::BOPDS_Point() +inline BOPDS_Point::BOPDS_Point() { - myPnt.SetCoord(99.,99.,99.); - myPnt2D1.SetCoord(99.,99.); - myPnt2D2=myPnt2D1; - myIndex=-1; + myPnt.SetCoord(99., 99., 99.); + myPnt2D1.SetCoord(99., 99.); + myPnt2D2 = myPnt2D1; + myIndex = -1; } + //======================================================================= -//function : ~ -//purpose : +// function : ~ +// purpose : //======================================================================= - inline BOPDS_Point::~BOPDS_Point() -{ -} +inline BOPDS_Point::~BOPDS_Point() {} + //======================================================================= -//function : SetIndex -//purpose : +// function : SetIndex +// purpose : //======================================================================= - inline void BOPDS_Point::SetIndex(const Standard_Integer theIndex) +inline void BOPDS_Point::SetIndex(const Standard_Integer theIndex) { - myIndex=theIndex; + myIndex = theIndex; } + //======================================================================= -//function : Index -//purpose : +// function : Index +// purpose : //======================================================================= - inline Standard_Integer BOPDS_Point::Index()const +inline Standard_Integer BOPDS_Point::Index() const { return myIndex; } + //======================================================================= -//function : SetPnt -//purpose : +// function : SetPnt +// purpose : //======================================================================= - inline void BOPDS_Point::SetPnt(const gp_Pnt& thePnt) +inline void BOPDS_Point::SetPnt(const gp_Pnt& thePnt) { - myPnt=thePnt; + myPnt = thePnt; } + //======================================================================= -//function : Pnt -//purpose : +// function : Pnt +// purpose : //======================================================================= - inline const gp_Pnt& BOPDS_Point::Pnt()const +inline const gp_Pnt& BOPDS_Point::Pnt() const { return myPnt; } + //======================================================================= -//function : SetPnt2D1 -//purpose : +// function : SetPnt2D1 +// purpose : //======================================================================= - inline void BOPDS_Point::SetPnt2D1(const gp_Pnt2d& thePnt) +inline void BOPDS_Point::SetPnt2D1(const gp_Pnt2d& thePnt) { - myPnt2D1=thePnt; + myPnt2D1 = thePnt; } + //======================================================================= -//function : Pnt2D1 -//purpose : +// function : Pnt2D1 +// purpose : //======================================================================= - inline const gp_Pnt2d& BOPDS_Point::Pnt2D1()const +inline const gp_Pnt2d& BOPDS_Point::Pnt2D1() const { return myPnt2D1; } + //======================================================================= -//function : SetPnt2D2 -//purpose : +// function : SetPnt2D2 +// purpose : //======================================================================= - inline void BOPDS_Point::SetPnt2D2(const gp_Pnt2d& thePnt) +inline void BOPDS_Point::SetPnt2D2(const gp_Pnt2d& thePnt) { - myPnt2D2=thePnt; + myPnt2D2 = thePnt; } + //======================================================================= -//function : Pnt2D2 -//purpose : +// function : Pnt2D2 +// purpose : //======================================================================= - inline const gp_Pnt2d& BOPDS_Point::Pnt2D2()const +inline const gp_Pnt2d& BOPDS_Point::Pnt2D2() const { return myPnt2D2; } diff --git a/opencascade/BOPDS_ShapeInfo.hxx b/opencascade/BOPDS_ShapeInfo.hxx index 474d6a92c..b5886d14e 100644 --- a/opencascade/BOPDS_ShapeInfo.hxx +++ b/opencascade/BOPDS_ShapeInfo.hxx @@ -26,13 +26,11 @@ #include #include - //! The class BOPDS_ShapeInfo is to store //! handy information about shape -class BOPDS_ShapeInfo +class BOPDS_ShapeInfo { public: - DEFINE_STANDARD_ALLOC //! Empty constructor @@ -43,132 +41,97 @@ public: //! Constructor //! @param theAllocator the allocator to manage the memory BOPDS_ShapeInfo(const Handle(NCollection_BaseAllocator)& theAllocator); - //! Modifier //! Sets the shape - void SetShape (const TopoDS_Shape& theS); - + void SetShape(const TopoDS_Shape& theS); //! Selector //! Returns the shape - const TopoDS_Shape& Shape() const; - + const TopoDS_Shape& Shape() const; //! Modifier //! Sets the type of shape theType - void SetShapeType (const TopAbs_ShapeEnum theType); - + void SetShapeType(const TopAbs_ShapeEnum theType); //! Selector //! Returns the type of shape - TopAbs_ShapeEnum ShapeType() const; - + TopAbs_ShapeEnum ShapeType() const; //! Modifier //! Sets the boundung box of the shape theBox - void SetBox (const Bnd_Box& theBox); - + void SetBox(const Bnd_Box& theBox); //! Selector //! Returns the boundung box of the shape - const Bnd_Box& Box() const; - + const Bnd_Box& Box() const; //! Selector/Modifier //! Returns the boundung box of the shape - Bnd_Box& ChangeBox(); - + Bnd_Box& ChangeBox(); //! Selector //! Returns the list of indices of sub-shapes - const TColStd_ListOfInteger& SubShapes() const; - + const TColStd_ListOfInteger& SubShapes() const; //! Selector/ Modifier //! Returns the list of indices of sub-shapes - TColStd_ListOfInteger& ChangeSubShapes(); - + TColStd_ListOfInteger& ChangeSubShapes(); //! Query //! Returns true if the shape has sub-shape with //! index theI - Standard_Boolean HasSubShape (const Standard_Integer theI) const; - - Standard_Boolean HasReference() const; - + Standard_Boolean HasSubShape(const Standard_Integer theI) const; + + Standard_Boolean HasReference() const; //! Modifier //! Sets the index of a reference information - void SetReference (const Standard_Integer theI); - + void SetReference(const Standard_Integer theI); //! Selector //! Returns the index of a reference information - Standard_Integer Reference() const; - + Standard_Integer Reference() const; //! Query //! Returns true if the shape has boundary representation - Standard_Boolean HasBRep() const; - + Standard_Boolean HasBRep() const; //! Returns true if the shape can be participant of //! an interference //! //! Flag - Standard_Boolean IsInterfering() const; - + Standard_Boolean IsInterfering() const; //! Query //! Returns true if there is flag. - Standard_Boolean HasFlag() const; - + Standard_Boolean HasFlag() const; //! Query //! Returns true if there is flag. //! Returns the flag theFlag - Standard_Boolean HasFlag (Standard_Integer& theFlag) const; - + Standard_Boolean HasFlag(Standard_Integer& theFlag) const; //! Modifier //! Sets the flag - void SetFlag (const Standard_Integer theI); - + void SetFlag(const Standard_Integer theI); //! Returns the flag - Standard_Integer Flag() const; - - Standard_EXPORT void Dump() const; - - + Standard_Integer Flag() const; + Standard_EXPORT void Dump() const; protected: - - - - TopoDS_Shape myShape; - TopAbs_ShapeEnum myType; - Bnd_Box myBox; + TopoDS_Shape myShape; + TopAbs_ShapeEnum myType; + Bnd_Box myBox; TColStd_ListOfInteger mySubShapes; - Standard_Integer myReference; - Standard_Integer myFlag; - + Standard_Integer myReference; + Standard_Integer myFlag; private: - - - - - }; - #include - - - - #endif // _BOPDS_ShapeInfo_HeaderFile diff --git a/opencascade/BOPDS_ShapeInfo.lxx b/opencascade/BOPDS_ShapeInfo.lxx index 3acaa2b6e..45fbba584 100644 --- a/opencascade/BOPDS_ShapeInfo.lxx +++ b/opencascade/BOPDS_ShapeInfo.lxx @@ -15,88 +15,93 @@ #include //======================================================================= -//function : -//purpose : +// function : +// purpose : //======================================================================= inline BOPDS_ShapeInfo::BOPDS_ShapeInfo() -: - - myType(TopAbs_SHAPE), - myReference(-1), - myFlag(-1) + : + + myType(TopAbs_SHAPE), + myReference(-1), + myFlag(-1) { } + //======================================================================= -//function : -//purpose : +// function : +// purpose : //======================================================================= -inline BOPDS_ShapeInfo::BOPDS_ShapeInfo - (const Handle(NCollection_BaseAllocator)& theAllocator) -: - myType(TopAbs_SHAPE), - mySubShapes(theAllocator), - myReference(-1), - myFlag(-1) +inline BOPDS_ShapeInfo::BOPDS_ShapeInfo(const Handle(NCollection_BaseAllocator)& theAllocator) + : myType(TopAbs_SHAPE), + mySubShapes(theAllocator), + myReference(-1), + myFlag(-1) { } + //======================================================================= -//function : ~ -//purpose : +// function : ~ +// purpose : //======================================================================= -inline BOPDS_ShapeInfo::~BOPDS_ShapeInfo() -{ -} +inline BOPDS_ShapeInfo::~BOPDS_ShapeInfo() {} + //======================================================================= -//function : SetShape -//purpose : +// function : SetShape +// purpose : //======================================================================= inline void BOPDS_ShapeInfo::SetShape(const TopoDS_Shape& theS) { - myShape=theS; + myShape = theS; } + //======================================================================= -//function : Shape -//purpose : +// function : Shape +// purpose : //======================================================================= -inline const TopoDS_Shape& BOPDS_ShapeInfo::Shape()const +inline const TopoDS_Shape& BOPDS_ShapeInfo::Shape() const { return myShape; } + //======================================================================= -//function : SetShapeType -//purpose : +// function : SetShapeType +// purpose : //======================================================================= inline void BOPDS_ShapeInfo::SetShapeType(const TopAbs_ShapeEnum theType) { - myType=theType; + myType = theType; } + //======================================================================= -//function : ShapeType -//purpose : +// function : ShapeType +// purpose : //======================================================================= -inline TopAbs_ShapeEnum BOPDS_ShapeInfo::ShapeType()const +inline TopAbs_ShapeEnum BOPDS_ShapeInfo::ShapeType() const { return myType; } + //======================================================================= -//function : SetBox -//purpose : +// function : SetBox +// purpose : //======================================================================= inline void BOPDS_ShapeInfo::SetBox(const Bnd_Box& theBox) { - myBox=theBox; + myBox = theBox; } + //======================================================================= -//function : Box -//purpose : +// function : Box +// purpose : //======================================================================= -inline const Bnd_Box& BOPDS_ShapeInfo::Box()const +inline const Bnd_Box& BOPDS_ShapeInfo::Box() const { return myBox; } + //======================================================================= -//function : ChangeBox -//purpose : +// function : ChangeBox +// purpose : //======================================================================= inline Bnd_Box& BOPDS_ShapeInfo::ChangeBox() { @@ -104,101 +109,110 @@ inline Bnd_Box& BOPDS_ShapeInfo::ChangeBox() } //======================================================================= -//function : SubShapes -//purpose : +// function : SubShapes +// purpose : //======================================================================= -inline const TColStd_ListOfInteger& BOPDS_ShapeInfo::SubShapes()const +inline const TColStd_ListOfInteger& BOPDS_ShapeInfo::SubShapes() const { return mySubShapes; } + //======================================================================= -//function : ChangeSubShapes -//purpose : +// function : ChangeSubShapes +// purpose : //======================================================================= inline TColStd_ListOfInteger& BOPDS_ShapeInfo::ChangeSubShapes() { return mySubShapes; } + //======================================================================= -//function : HasSubShape -//purpose : +// function : HasSubShape +// purpose : //======================================================================= -inline Standard_Boolean BOPDS_ShapeInfo::HasSubShape - (const Standard_Integer theI)const +inline Standard_Boolean BOPDS_ShapeInfo::HasSubShape(const Standard_Integer theI) const { - return mySubShapes.Contains (theI); + return mySubShapes.Contains(theI); } + //======================================================================= -//function : HasReference -//purpose : +// function : HasReference +// purpose : //======================================================================= -inline Standard_Boolean BOPDS_ShapeInfo::HasReference()const +inline Standard_Boolean BOPDS_ShapeInfo::HasReference() const { - return (myReference>=0); + return (myReference >= 0); } + //======================================================================= -//function : SetReference -//purpose : +// function : SetReference +// purpose : //======================================================================= inline void BOPDS_ShapeInfo::SetReference(const Standard_Integer theI) { - myReference=theI; + myReference = theI; } + //======================================================================= -//function : Reference -//purpose : +// function : Reference +// purpose : //======================================================================= -inline Standard_Integer BOPDS_ShapeInfo::Reference()const +inline Standard_Integer BOPDS_ShapeInfo::Reference() const { return myReference; } + //======================================================================= -//function : HasBRep -//purpose : +// function : HasBRep +// purpose : //======================================================================= -inline Standard_Boolean BOPDS_ShapeInfo::HasBRep()const +inline Standard_Boolean BOPDS_ShapeInfo::HasBRep() const { return (BOPDS_Tools::HasBRep(myType)); } + //======================================================================= -//function : IsInterfering -//purpose : +// function : IsInterfering +// purpose : //======================================================================= -inline Standard_Boolean BOPDS_ShapeInfo::IsInterfering()const +inline Standard_Boolean BOPDS_ShapeInfo::IsInterfering() const { - return (HasBRep() || myType==TopAbs_SOLID); + return (HasBRep() || myType == TopAbs_SOLID); } + //======================================================================= -//function : HasFlag -//purpose : +// function : HasFlag +// purpose : //======================================================================= -inline Standard_Boolean BOPDS_ShapeInfo::HasFlag()const +inline Standard_Boolean BOPDS_ShapeInfo::HasFlag() const { - return (myFlag>=0); + return (myFlag >= 0); } + //======================================================================= -//function : HasFlag -//purpose : +// function : HasFlag +// purpose : //======================================================================= -inline Standard_Boolean BOPDS_ShapeInfo::HasFlag - (Standard_Integer& theFlag)const +inline Standard_Boolean BOPDS_ShapeInfo::HasFlag(Standard_Integer& theFlag) const { - theFlag=myFlag; - return (myFlag>=0); + theFlag = myFlag; + return (myFlag >= 0); } + //======================================================================= -//function : SetFlag -//purpose : +// function : SetFlag +// purpose : //======================================================================= inline void BOPDS_ShapeInfo::SetFlag(const Standard_Integer theFlag) { - myFlag=theFlag; + myFlag = theFlag; } + //======================================================================= -//function : Flag -//purpose : +// function : Flag +// purpose : //======================================================================= -inline Standard_Integer BOPDS_ShapeInfo::Flag()const +inline Standard_Integer BOPDS_ShapeInfo::Flag() const { return myFlag; } diff --git a/opencascade/BOPDS_SubIterator.hxx b/opencascade/BOPDS_SubIterator.hxx index df3070771..e498da6c4 100644 --- a/opencascade/BOPDS_SubIterator.hxx +++ b/opencascade/BOPDS_SubIterator.hxx @@ -25,16 +25,14 @@ #include #include - //! The class BOPDS_SubIterator is used to compute intersections between //! bounding boxes of two sub-sets of BRep sub-shapes of arguments //! of an operation (see the class BOPDS_DS). //! The class provides interface to iterate the pairs of intersected sub-shapes. -class BOPDS_SubIterator +class BOPDS_SubIterator { public: - DEFINE_STANDARD_ALLOC //! Empty constructor @@ -47,85 +45,62 @@ public: //! Sets the data structure to process. //! It is used to access the shapes and their bounding boxes. - void SetDS (const BOPDS_PDS& pDS) - { - myDS = pDS; - } + void SetDS(const BOPDS_PDS& pDS) { myDS = pDS; } //! Returns the data structure - const BOPDS_DS& DS() const - { - return *myDS; - } + const BOPDS_DS& DS() const { return *myDS; } //! Sets the first set of indices to process - void SetSubSet1 (const TColStd_ListOfInteger& theLI) + void SetSubSet1(const TColStd_ListOfInteger& theLI) { mySubSet1 = (TColStd_ListOfInteger*)&theLI; } //! Returns the first set of indices to process - const TColStd_ListOfInteger& SubSet1() const - { - return *mySubSet1; - } + const TColStd_ListOfInteger& SubSet1() const { return *mySubSet1; } //! Sets the second set of indices to process - void SetSubSet2 (const TColStd_ListOfInteger& theLI) + void SetSubSet2(const TColStd_ListOfInteger& theLI) { mySubSet2 = (TColStd_ListOfInteger*)&theLI; } //! Returns the second set of indices to process - const TColStd_ListOfInteger& SubSet2() const - { - return *mySubSet2; - } + const TColStd_ListOfInteger& SubSet2() const { return *mySubSet2; } //! Initializes the iterator Standard_EXPORT void Initialize(); //! Returns true if there are more pairs of intersected shapes - Standard_Boolean More() const - { - return myIterator.More(); - } + Standard_Boolean More() const { return myIterator.More(); } //! Moves iterations ahead - void Next() - { - myIterator.Next(); - } + void Next() { myIterator.Next(); } //! Returns indices (DS) of intersected shapes //! theIndex1 - the index of the first shape //! theIndex2 - the index of the second shape - Standard_EXPORT void Value (Standard_Integer& theIndex1, Standard_Integer& theIndex2) const; + Standard_EXPORT void Value(Standard_Integer& theIndex1, Standard_Integer& theIndex2) const; //! Perform the intersection algorithm and prepare //! the results to be used Standard_EXPORT virtual void Prepare(); //! Returns the number of interfering pairs - Standard_Integer ExpectedLength() const - { - return myList.Length(); - } + Standard_Integer ExpectedLength() const { return myList.Length(); } protected: - //! Performs intersection of bounding boxes Standard_EXPORT virtual void Intersect(); Handle(NCollection_BaseAllocator) myAllocator; - BOPDS_PDS myDS; - BOPDS_VectorOfPair myList; - BOPDS_VectorOfPair::Iterator myIterator; - TColStd_ListOfInteger* mySubSet1; - TColStd_ListOfInteger* mySubSet2; + BOPDS_PDS myDS; + BOPDS_VectorOfPair myList; + BOPDS_VectorOfPair::Iterator myIterator; + TColStd_ListOfInteger* mySubSet1; + TColStd_ListOfInteger* mySubSet2; private: - }; #endif // _BOPDS_SubIterator_HeaderFile diff --git a/opencascade/BOPDS_Tools.hxx b/opencascade/BOPDS_Tools.hxx index e83641982..f05a89043 100644 --- a/opencascade/BOPDS_Tools.hxx +++ b/opencascade/BOPDS_Tools.hxx @@ -21,60 +21,35 @@ #include #include - //! The class BOPDS_Tools contains //! a set auxiliary static functions //! of the package BOPDS -class BOPDS_Tools +class BOPDS_Tools { public: - DEFINE_STANDARD_ALLOC - - //! Converts the conmbination of two types //! of shape , //! to the one integer value, that is returned - static Standard_Integer TypeToInteger (const TopAbs_ShapeEnum theT1, const TopAbs_ShapeEnum theT2); - + static Standard_Integer TypeToInteger(const TopAbs_ShapeEnum theT1, const TopAbs_ShapeEnum theT2); //! Converts the type of shape , //! to integer value, that is returned - static Standard_Integer TypeToInteger (const TopAbs_ShapeEnum theT); - + static Standard_Integer TypeToInteger(const TopAbs_ShapeEnum theT); //! Returns true if the type correspond //! to a shape having boundary representation - static Standard_Boolean HasBRep (const TopAbs_ShapeEnum theT); - + static Standard_Boolean HasBRep(const TopAbs_ShapeEnum theT); //! Returns true if the type can be participant of //! an interference - static Standard_Boolean IsInterfering (const TopAbs_ShapeEnum theT); - - - + static Standard_Boolean IsInterfering(const TopAbs_ShapeEnum theT); protected: - - - - - private: - - - - - }; - #include - - - - #endif // _BOPDS_Tools_HeaderFile diff --git a/opencascade/BOPDS_Tools.lxx b/opencascade/BOPDS_Tools.lxx index 081776ec0..9af72a7f5 100644 --- a/opencascade/BOPDS_Tools.lxx +++ b/opencascade/BOPDS_Tools.lxx @@ -14,116 +14,119 @@ //======================================================================= // function: HasBRep -// purpose: +// purpose: //======================================================================= inline Standard_Boolean BOPDS_Tools::HasBRep(const TopAbs_ShapeEnum aTi) { - return (aTi==TopAbs_VERTEX || aTi==TopAbs_EDGE || aTi==TopAbs_FACE); + return (aTi == TopAbs_VERTEX || aTi == TopAbs_EDGE || aTi == TopAbs_FACE); } + //======================================================================= // function: IsInterfering -// purpose: +// purpose: //======================================================================= -inline Standard_Boolean BOPDS_Tools::IsInterfering - (const TopAbs_ShapeEnum aTi) +inline Standard_Boolean BOPDS_Tools::IsInterfering(const TopAbs_ShapeEnum aTi) { - return (BOPDS_Tools::HasBRep(aTi) || aTi==TopAbs_SOLID); + return (BOPDS_Tools::HasBRep(aTi) || aTi == TopAbs_SOLID); } + //======================================================================= -//function : TypeToInteger -//purpose : +// function : TypeToInteger +// purpose : //======================================================================= inline Standard_Integer BOPDS_Tools::TypeToInteger(const TopAbs_ShapeEnum aType1, - const TopAbs_ShapeEnum aType2) + const TopAbs_ShapeEnum aType2) { Standard_Integer iRet, iT1, iT2, iX; // - iRet=-1; - iT1=BOPDS_Tools::TypeToInteger(aType1); - iT2=BOPDS_Tools::TypeToInteger(aType2); + iRet = -1; + iT1 = BOPDS_Tools::TypeToInteger(aType1); + iT2 = BOPDS_Tools::TypeToInteger(aType2); // - iX=iT2*10+iT1; - switch (iX) { + iX = iT2 * 10 + iT1; + switch (iX) + { case 77: - iRet=0; // VV + iRet = 0; // VV break; case 76: case 67: - iRet=1; // VE + iRet = 1; // VE break; case 66: - iRet=2; // EE + iRet = 2; // EE break; case 74: case 47: - iRet=3; // VF + iRet = 3; // VF break; case 64: case 46: - iRet=4; // EF + iRet = 4; // EF break; case 44: - iRet=5; // FF + iRet = 5; // FF break; case 72: case 27: - iRet=6; // VZ + iRet = 6; // VZ break; case 62: case 26: - iRet=7; // EZ + iRet = 7; // EZ break; case 42: case 24: - iRet=8; // FZ + iRet = 8; // FZ break; case 22: - iRet=9; // ZZ + iRet = 9; // ZZ break; default: break; } - return iRet; + return iRet; } + //======================================================================= -//function : TypeToInteger -//purpose : +// function : TypeToInteger +// purpose : //======================================================================= inline Standard_Integer BOPDS_Tools::TypeToInteger(const TopAbs_ShapeEnum aType1) { - Standard_Integer iRet=9; + Standard_Integer iRet = 9; // - switch(aType1) { + switch (aType1) + { case TopAbs_COMPOUND: - iRet=0; + iRet = 0; break; case TopAbs_COMPSOLID: - iRet=1; + iRet = 1; break; case TopAbs_SOLID: - iRet=2; + iRet = 2; break; case TopAbs_SHELL: - iRet=3; + iRet = 3; break; case TopAbs_FACE: - iRet=4; + iRet = 4; break; case TopAbs_WIRE: - iRet=5; + iRet = 5; break; case TopAbs_EDGE: - iRet=6; + iRet = 6; break; case TopAbs_VERTEX: - iRet=7; + iRet = 7; break; case TopAbs_SHAPE: - iRet=8; + iRet = 8; break; default: break; - } + } return iRet; - } diff --git a/opencascade/BOPDS_VectorOfPoint.hxx b/opencascade/BOPDS_VectorOfPoint.hxx index 8be9e9271..76948b00c 100644 --- a/opencascade/BOPDS_VectorOfPoint.hxx +++ b/opencascade/BOPDS_VectorOfPoint.hxx @@ -20,5 +20,4 @@ typedef NCollection_Vector BOPDS_VectorOfPoint; - #endif diff --git a/opencascade/BOPTools_AlgoTools.hxx b/opencascade/BOPTools_AlgoTools.hxx index 254865cc7..a32bd31a4 100644 --- a/opencascade/BOPTools_AlgoTools.hxx +++ b/opencascade/BOPTools_AlgoTools.hxx @@ -58,11 +58,9 @@ class Message_Report; class BOPTools_AlgoTools { public: - DEFINE_STANDARD_ALLOC public: //! @name Constants - //! Additional tolerance (delta tolerance) is used in Boolean Operations //! to ensure that the tolerance of new/old entities obtained //! by intersection of two shapes is slightly bigger than the actual @@ -71,177 +69,167 @@ public: //! @name Constants static Standard_Real DTolerance() { return 1.e-12; } public: //! @name Intersection of the vertices - //! Intersects the vertex with the point with tolerance . //! Returns the error status: //! - 0 - no error, meaning that the vertex intersects the point; //! - 1 - the distance between vertex and point is grater than the sum of tolerances. Standard_EXPORT static Standard_Integer ComputeVV(const TopoDS_Vertex& theV, - const gp_Pnt& theP, - const Standard_Real theTolP); + const gp_Pnt& theP, + const Standard_Real theTolP); //! Intersects the given vertices with given fuzzy value. //! Returns the error status: //! - 0 - no error, meaning that the vertices interferes with given tolerance; //! - 1 - the distance between vertices is grater than the sum of their tolerances. - Standard_EXPORT static Standard_Integer ComputeVV(const TopoDS_Vertex& theV1, - const TopoDS_Vertex& theV2, - const Standard_Real theFuzz = Precision::Confusion()); + Standard_EXPORT static Standard_Integer ComputeVV( + const TopoDS_Vertex& theV1, + const TopoDS_Vertex& theV2, + const Standard_Real theFuzz = Precision::Confusion()); public: //! @name Vertices construction - //! Makes the vertex in the middle of given vertices with //! the tolerance covering all tolerance spheres of vertices. - Standard_EXPORT static void MakeVertex(const TopTools_ListOfShape& theLV, - TopoDS_Vertex& theV); + Standard_EXPORT static void MakeVertex(const TopTools_ListOfShape& theLV, TopoDS_Vertex& theV); //! Make a vertex using 3D-point and 3D-tolerance value - Standard_EXPORT static void MakeNewVertex(const gp_Pnt& aP1, + Standard_EXPORT static void MakeNewVertex(const gp_Pnt& aP1, const Standard_Real aTol, - TopoDS_Vertex& aNewVertex); + TopoDS_Vertex& aNewVertex); //! Make a vertex using couple of vertices Standard_EXPORT static void MakeNewVertex(const TopoDS_Vertex& aV1, const TopoDS_Vertex& aV2, - TopoDS_Vertex& aNewVertex); + TopoDS_Vertex& aNewVertex); //! Make a vertex in place of intersection between two edges //! with parameters - Standard_EXPORT static void MakeNewVertex(const TopoDS_Edge& aE1, + Standard_EXPORT static void MakeNewVertex(const TopoDS_Edge& aE1, const Standard_Real aP1, - const TopoDS_Edge& aE2, + const TopoDS_Edge& aE2, const Standard_Real aP2, - TopoDS_Vertex& aNewVertex); + TopoDS_Vertex& aNewVertex); //! Make a vertex in place of intersection between the edge //! with parameter and the face - Standard_EXPORT static void MakeNewVertex(const TopoDS_Edge& aE1, + Standard_EXPORT static void MakeNewVertex(const TopoDS_Edge& aE1, const Standard_Real aP1, - const TopoDS_Face& aF2, - TopoDS_Vertex& aNewVertex); - + const TopoDS_Face& aF2, + TopoDS_Vertex& aNewVertex); public: //! @name Updating the vertex - //! Update the tolerance value for vertex //! taking into account the fact that lays on //! the curve Standard_EXPORT static void UpdateVertex(const IntTools_Curve& aIC, - const Standard_Real aT, - const TopoDS_Vertex& aV); + const Standard_Real aT, + const TopoDS_Vertex& aV); //! Update the tolerance value for vertex //! taking into account the fact that lays on //! the edge - Standard_EXPORT static void UpdateVertex(const TopoDS_Edge& aE, - const Standard_Real aT, + Standard_EXPORT static void UpdateVertex(const TopoDS_Edge& aE, + const Standard_Real aT, const TopoDS_Vertex& aV); //! Update the tolerance value for vertex //! taking into account the fact that should //! cover tolerance zone of - Standard_EXPORT static void UpdateVertex(const TopoDS_Vertex& aVF, - const TopoDS_Vertex& aVN); - + Standard_EXPORT static void UpdateVertex(const TopoDS_Vertex& aVF, const TopoDS_Vertex& aVN); public: //! @name Edge construction - //! Makes the edge based on the given curve with given bounding vertices. Standard_EXPORT static void MakeEdge(const IntTools_Curve& theCurve, - const TopoDS_Vertex& theV1, - const Standard_Real theT1, - const TopoDS_Vertex& theV2, - const Standard_Real theT2, - const Standard_Real theTolR3D, - TopoDS_Edge& theE); + const TopoDS_Vertex& theV1, + const Standard_Real theT1, + const TopoDS_Vertex& theV2, + const Standard_Real theT2, + const Standard_Real theTolR3D, + TopoDS_Edge& theE); //! Makes a copy of with vertices. Standard_EXPORT static TopoDS_Edge CopyEdge(const TopoDS_Edge& theEdge); //! Make the edge from base edge and two vertices //! at parameters - Standard_EXPORT static void MakeSplitEdge(const TopoDS_Edge& aE1, + Standard_EXPORT static void MakeSplitEdge(const TopoDS_Edge& aE1, const TopoDS_Vertex& aV1, - const Standard_Real aP1, + const Standard_Real aP1, const TopoDS_Vertex& aV2, - const Standard_Real aP2, - TopoDS_Edge& aNewEdge); + const Standard_Real aP2, + TopoDS_Edge& aNewEdge); //! Make the edge from 3D-Curve and two vertices //! at parameters Standard_EXPORT static void MakeSectEdge(const IntTools_Curve& aIC, - const TopoDS_Vertex& aV1, - const Standard_Real aP1, - const TopoDS_Vertex& aV2, - const Standard_Real aP2, - TopoDS_Edge& aNewEdge); - + const TopoDS_Vertex& aV1, + const Standard_Real aP1, + const TopoDS_Vertex& aV2, + const Standard_Real aP2, + TopoDS_Edge& aNewEdge); public: //! @name Point/Edge/Face classification relatively solid - //! Computes the 3-D state of the point thePoint //! toward solid theSolid. //! theTol - value of precision of computation - //! theContext- cahed geometrical tools + //! theContext- cached geometrical tools //! Returns 3-D state. - Standard_EXPORT static TopAbs_State ComputeState(const gp_Pnt& thePoint, - const TopoDS_Solid& theSolid, - const Standard_Real theTol, + Standard_EXPORT static TopAbs_State ComputeState(const gp_Pnt& thePoint, + const TopoDS_Solid& theSolid, + const Standard_Real theTol, const Handle(IntTools_Context)& theContext); - + //! Computes the 3-D state of the vertex theVertex //! toward solid theSolid. //! theTol - value of precision of computation - //! theContext- cahed geometrical tools + //! theContext- cached geometrical tools //! Returns 3-D state. - Standard_EXPORT static TopAbs_State ComputeState(const TopoDS_Vertex& theVertex, - const TopoDS_Solid& theSolid, - const Standard_Real theTol, + Standard_EXPORT static TopAbs_State ComputeState(const TopoDS_Vertex& theVertex, + const TopoDS_Solid& theSolid, + const Standard_Real theTol, const Handle(IntTools_Context)& theContext); - + //! Computes the 3-D state of the edge theEdge //! toward solid theSolid. //! theTol - value of precision of computation - //! theContext- cahed geometrical tools + //! theContext- cached geometrical tools //! Returns 3-D state. - Standard_EXPORT static TopAbs_State ComputeState(const TopoDS_Edge& theEdge, - const TopoDS_Solid& theSolid, - const Standard_Real theTol, - const Handle(IntTools_Context)& theContext); - + Standard_EXPORT static TopAbs_State ComputeState(const TopoDS_Edge& theEdge, + const TopoDS_Solid& theSolid, + const Standard_Real theTol, + const Handle(IntTools_Context)& theContext); + //! Computes the 3-D state of the face theFace //! toward solid theSolid. //! theTol - value of precision of computation //! theBounds - set of edges of to avoid - //! theContext- cahed geometrical tools + //! theContext- cached geometrical tools //! Returns 3-D state. - Standard_EXPORT static TopAbs_State ComputeState(const TopoDS_Face& theFace, - const TopoDS_Solid& theSolid, - const Standard_Real theTol, + Standard_EXPORT static TopAbs_State ComputeState(const TopoDS_Face& theFace, + const TopoDS_Solid& theSolid, + const Standard_Real theTol, const TopTools_IndexedMapOfShape& theBounds, - const Handle(IntTools_Context)& theContext); - + const Handle(IntTools_Context)& theContext); + //! Computes the 3-D state of the shape theShape //! toward solid theSolid. //! theTol - value of precision of computation - //! theContext- cahed geometrical tools + //! theContext- cached geometrical tools //! Returns 3-D state. - Standard_EXPORT static TopAbs_State ComputeStateByOnePoint(const TopoDS_Shape& theShape, - const TopoDS_Solid& theSolid, - const Standard_Real theTol, - const Handle(IntTools_Context)& theContext); - + Standard_EXPORT static TopAbs_State ComputeStateByOnePoint( + const TopoDS_Shape& theShape, + const TopoDS_Solid& theSolid, + const Standard_Real theTol, + const Handle(IntTools_Context)& theContext); public: //! @name Face classification relatively solid - //! For the face theFace and its edge theEdge //! finds the face suitable to produce shell. //! theLCEF - set of faces to search. All faces //! from theLCEF must share edge theEdge - Standard_EXPORT static Standard_Boolean GetFaceOff(const TopoDS_Edge& theEdge, - const TopoDS_Face& theFace, - BOPTools_ListOfCoupleOfShape& theLCEF, - TopoDS_Face& theFaceOff, + Standard_EXPORT static Standard_Boolean GetFaceOff(const TopoDS_Edge& theEdge, + const TopoDS_Face& theFace, + BOPTools_ListOfCoupleOfShape& theLCEF, + TopoDS_Face& theFaceOff, const Handle(IntTools_Context)& theContext); //! Returns True if the face theFace is inside of the @@ -252,11 +240,12 @@ public: //! @name Face classification relatively solid //! * 0 state is not IN //! * 1 state is IN //! * 2 state can not be found by the method of angles - Standard_EXPORT static Standard_Integer IsInternalFace(const TopoDS_Face& theFace, - const TopoDS_Edge& theEdge, - const TopoDS_Face& theFace1, - const TopoDS_Face& theFace2, - const Handle(IntTools_Context)& theContext); + Standard_EXPORT static Standard_Integer IsInternalFace( + const TopoDS_Face& theFace, + const TopoDS_Edge& theEdge, + const TopoDS_Face& theFace1, + const TopoDS_Face& theFace2, + const Handle(IntTools_Context)& theContext); //! Returns True if the face theFace is inside of the //! appropriate couple of faces (from the set theLF) . @@ -265,45 +254,42 @@ public: //! @name Face classification relatively solid //! * 0 state is not IN //! * 1 state is IN //! * 2 state can not be found by the method of angles - Standard_EXPORT static Standard_Integer IsInternalFace(const TopoDS_Face& theFace, - const TopoDS_Edge& theEdge, - TopTools_ListOfShape& theLF, - const Handle(IntTools_Context)& theContext); + Standard_EXPORT static Standard_Integer IsInternalFace( + const TopoDS_Face& theFace, + const TopoDS_Edge& theEdge, + TopTools_ListOfShape& theLF, + const Handle(IntTools_Context)& theContext); //! Returns True if the face theFace is inside the //! solid theSolid. //! theMEF - Map Edge/Faces for theSolid //! theTol - value of precision of computation - //! theContext- cahed geometrical tools - Standard_EXPORT static Standard_Boolean IsInternalFace(const TopoDS_Face& theFace, - const TopoDS_Solid& theSolid, - TopTools_IndexedDataMapOfShapeListOfShape& theMEF, - const Standard_Real theTol, - const Handle(IntTools_Context)& theContext); - + //! theContext- cached geometrical tools + Standard_EXPORT static Standard_Boolean IsInternalFace( + const TopoDS_Face& theFace, + const TopoDS_Solid& theSolid, + TopTools_IndexedDataMapOfShapeListOfShape& theMEF, + const Standard_Real theTol, + const Handle(IntTools_Context)& theContext); public: //! @name PCurve construction - //! Makes 2d curve of the edge on the faces and .
//! - storage for caching the geometrical tools - Standard_EXPORT static void MakePCurve (const TopoDS_Edge& theE, - const TopoDS_Face& theF1, - const TopoDS_Face& theF2, - const IntTools_Curve& theCurve, - const Standard_Boolean thePC1, - const Standard_Boolean thePC2, - const Handle(IntTools_Context)& theContext = Handle(IntTools_Context)()); - + Standard_EXPORT static void MakePCurve( + const TopoDS_Edge& theE, + const TopoDS_Face& theF1, + const TopoDS_Face& theF2, + const IntTools_Curve& theCurve, + const Standard_Boolean thePC1, + const Standard_Boolean thePC2, + const Handle(IntTools_Context)& theContext = Handle(IntTools_Context)()); public: //! @name Wire classification relatively face - //! Checks if the wire is a hole for the face. Standard_EXPORT static Standard_Boolean IsHole(const TopoDS_Shape& theW, const TopoDS_Shape& theF); - public: //! @name Choosing correct orientation for the split shape - //! Checks if the direction of the split shape is opposite to //! the direction of the original shape. //! The method is an overload for (Edge,Edge) and (Face,Face) corresponding @@ -321,22 +307,24 @@ public: //! @name Choosing correct orientation for the split shape //! - 100 - bad types. //! In case of any error the method always returns FALSE. //! - //! @param theSplit [in] Split shape - //! @param theShape [in] Original shape - //! @param theContext [in] cached geometrical tools - //! @param theError [out] Error Status of the operation - Standard_EXPORT static Standard_Boolean IsSplitToReverse(const TopoDS_Shape& theSplit, - const TopoDS_Shape& theShape, - const Handle(IntTools_Context)& theContext, - Standard_Integer *theError = NULL); + //! @param[in] theSplit Split shape + //! @param[in] theShape Original shape + //! @param[in] theContext cached geometrical tools + //! @param[out] theError Error Status of the operation + Standard_EXPORT static Standard_Boolean IsSplitToReverse( + const TopoDS_Shape& theSplit, + const TopoDS_Shape& theShape, + const Handle(IntTools_Context)& theContext, + Standard_Integer* theError = NULL); //! Add-on for the *IsSplitToReverse()* to check for its errors //! and in case of any add the *BOPAlgo_AlertUnableToOrientTheShape* //! warning to the report. - Standard_EXPORT static Standard_Boolean IsSplitToReverseWithWarn(const TopoDS_Shape& theSplit, - const TopoDS_Shape& theShape, - const Handle(IntTools_Context)& theContext, - const Handle(Message_Report)& theReport = NULL); + Standard_EXPORT static Standard_Boolean IsSplitToReverseWithWarn( + const TopoDS_Shape& theSplit, + const TopoDS_Shape& theShape, + const Handle(IntTools_Context)& theContext, + const Handle(Message_Report)& theReport = NULL); //! Checks if the normal direction of the split face is opposite to //! the normal direction of the original face. @@ -354,14 +342,15 @@ public: //! @name Choosing correct orientation for the split shape //! - 4 - unable to compute the normal for the original face. //! In case of any error the method always returns FALSE. //! - //! @param theSplit [in] Split face - //! @param theShape [in] Original face - //! @param theContext [in] cached geometrical tools - //! @param theError [out] Error Status of the operation - Standard_EXPORT static Standard_Boolean IsSplitToReverse(const TopoDS_Face& theSplit, - const TopoDS_Face& theShape, - const Handle(IntTools_Context)& theContext, - Standard_Integer *theError = NULL); + //! @param[in] theSplit Split face + //! @param[in] theShape Original face + //! @param[in] theContext cached geometrical tools + //! @param[out] theError Error Status of the operation + Standard_EXPORT static Standard_Boolean IsSplitToReverse( + const TopoDS_Face& theSplit, + const TopoDS_Face& theShape, + const Handle(IntTools_Context)& theContext, + Standard_Integer* theError = NULL); //! Checks if the tangent vector of the split edge is opposite to //! the tangent vector of the original edge. @@ -379,14 +368,15 @@ public: //! @name Choosing correct orientation for the split shape //! - 4 - unable to compute the tangent vector for the original edge; //! In case of any error the method always returns FALSE. //! - //! @param theSplit [in] Split edge - //! @param theShape [in] Original edge - //! @param theContext [in] cached geometrical tools - //! @param theError [out] Error Status of the operation - Standard_EXPORT static Standard_Boolean IsSplitToReverse(const TopoDS_Edge& theSplit, - const TopoDS_Edge& theShape, - const Handle(IntTools_Context)& theContext, - Standard_Integer *theError = NULL); + //! @param[in] theSplit Split edge + //! @param[in] theShape Original edge + //! @param[in] theContext cached geometrical tools + //! @param[out] theError Error Status of the operation + Standard_EXPORT static Standard_Boolean IsSplitToReverse( + const TopoDS_Edge& theSplit, + const TopoDS_Edge& theShape, + const Handle(IntTools_Context)& theContext, + Standard_Integer* theError = NULL); //! Checks if the normals direction of the given faces computed near //! the shared edge coincide. @@ -394,107 +384,107 @@ public: //! @name Choosing correct orientation for the split shape //! * 0 - in case of error (shared edge not found or directions are not collinear) //! * 1 - normal directions coincide; //! * -1 - normal directions are opposite. - Standard_EXPORT static Standard_Integer Sense(const TopoDS_Face& theF1, - const TopoDS_Face& theF2, + Standard_EXPORT static Standard_Integer Sense(const TopoDS_Face& theF1, + const TopoDS_Face& theF2, const Handle(IntTools_Context)& theContext); public: //! @name Making connexity blocks - //! For the list of faces theLS build block //! theLSCB in terms of connexity by edges //! theMapAvoid - set of edges to avoid for //! the treatment - Standard_EXPORT static void MakeConnexityBlock(TopTools_ListOfShape& theLS, - TopTools_IndexedMapOfShape& theMapAvoid, - TopTools_ListOfShape& theLSCB, - const Handle(NCollection_BaseAllocator)& theAllocator); + Standard_EXPORT static void MakeConnexityBlock( + TopTools_ListOfShape& theLS, + TopTools_IndexedMapOfShape& theMapAvoid, + TopTools_ListOfShape& theLSCB, + const Handle(NCollection_BaseAllocator)& theAllocator); //! For the compound builds the blocks (compounds) of //! elements of type connected through the shapes //! of the type . //! The blocks are stored into the list . - Standard_EXPORT static void MakeConnexityBlocks(const TopoDS_Shape& theS, + Standard_EXPORT static void MakeConnexityBlocks(const TopoDS_Shape& theS, const TopAbs_ShapeEnum theConnectionType, const TopAbs_ShapeEnum theElementType, - TopTools_ListOfShape& theLCB); + TopTools_ListOfShape& theLCB); //! For the compound builds the blocks (compounds) of //! elements of type connected through the shapes //! of the type . //! The blocks are stored into the list of lists . //! Returns also the connection map , filled during operation. - Standard_EXPORT static void MakeConnexityBlocks(const TopoDS_Shape& theS, - const TopAbs_ShapeEnum theConnectionType, - const TopAbs_ShapeEnum theElementType, - TopTools_ListOfListOfShape& theLCB, - TopTools_IndexedDataMapOfShapeListOfShape& theConnectionMap); + Standard_EXPORT static void MakeConnexityBlocks( + const TopoDS_Shape& theS, + const TopAbs_ShapeEnum theConnectionType, + const TopAbs_ShapeEnum theElementType, + TopTools_ListOfListOfShape& theLCB, + TopTools_IndexedDataMapOfShapeListOfShape& theConnectionMap); //! Makes connexity blocks of elements of the given type with the given type of the //! connecting elements. The blocks are checked on regularity (multi-connectivity) //! and stored to the list of blocks . - Standard_EXPORT static void MakeConnexityBlocks(const TopTools_ListOfShape& theLS, - const TopAbs_ShapeEnum theConnectionType, - const TopAbs_ShapeEnum theElementType, + Standard_EXPORT static void MakeConnexityBlocks(const TopTools_ListOfShape& theLS, + const TopAbs_ShapeEnum theConnectionType, + const TopAbs_ShapeEnum theElementType, BOPTools_ListOfConnexityBlock& theLCB); public: //! @name Orienting elements in container - //! Correctly orients edges on the wire Standard_EXPORT static void OrientEdgesOnWire(TopoDS_Shape& theWire); //! Correctly orients faces on the shell Standard_EXPORT static void OrientFacesOnShell(TopoDS_Shape& theShell); - public: //! @name Methods for shape validation (correction) - //! Provides valid values of tolerances for the shape //! is max value of the tolerance that can be //! accepted for correction. If real value of the tolerance //! will be greater than , the correction does not //! perform. - Standard_EXPORT static void CorrectTolerances(const TopoDS_Shape& theS, - const TopTools_IndexedMapOfShape& theMapToAvoid, - const Standard_Real theTolMax = 0.0001, - const Standard_Boolean theRunParallel = Standard_False); + Standard_EXPORT static void CorrectTolerances( + const TopoDS_Shape& theS, + const TopTools_IndexedMapOfShape& theMapToAvoid, + const Standard_Real theTolMax = 0.0001, + const Standard_Boolean theRunParallel = Standard_False); //! Provides valid values of tolerances for the shape //! in terms of BRepCheck_InvalidCurveOnSurface. - Standard_EXPORT static void CorrectCurveOnSurface(const TopoDS_Shape& theS, - const TopTools_IndexedMapOfShape& theMapToAvoid, - const Standard_Real theTolMax = 0.0001, - const Standard_Boolean theRunParallel = Standard_False); + Standard_EXPORT static void CorrectCurveOnSurface( + const TopoDS_Shape& theS, + const TopTools_IndexedMapOfShape& theMapToAvoid, + const Standard_Real theTolMax = 0.0001, + const Standard_Boolean theRunParallel = Standard_False); //! Provides valid values of tolerances for the shape //! in terms of BRepCheck_InvalidPointOnCurve. - Standard_EXPORT static void CorrectPointOnCurve(const TopoDS_Shape& theS, - const TopTools_IndexedMapOfShape& theMapToAvoid, - const Standard_Real theTolMax = 0.0001, - const Standard_Boolean theRunParallel = Standard_False); + Standard_EXPORT static void CorrectPointOnCurve( + const TopoDS_Shape& theS, + const TopTools_IndexedMapOfShape& theMapToAvoid, + const Standard_Real theTolMax = 0.0001, + const Standard_Boolean theRunParallel = Standard_False); //! Corrects tolerance values of the sub-shapes of the shape if needed. - Standard_EXPORT static void CorrectShapeTolerances(const TopoDS_Shape& theS, - const TopTools_IndexedMapOfShape& theMapToAvoid, - const Standard_Boolean theRunParallel = Standard_False); - + Standard_EXPORT static void CorrectShapeTolerances( + const TopoDS_Shape& theS, + const TopTools_IndexedMapOfShape& theMapToAvoid, + const Standard_Boolean theRunParallel = Standard_False); public: //! Checking if the faces are coinciding - //! Checks if the given faces are same-domain, i.e. coincide. - Standard_EXPORT static Standard_Boolean AreFacesSameDomain(const TopoDS_Face& theF1, - const TopoDS_Face& theF2, - const Handle(IntTools_Context)& theContext, - const Standard_Real theFuzz = Precision::Confusion()); + Standard_EXPORT static Standard_Boolean AreFacesSameDomain( + const TopoDS_Face& theF1, + const TopoDS_Face& theF2, + const Handle(IntTools_Context)& theContext, + const Standard_Real theFuzz = Precision::Confusion()); public: //! @name Looking for the edge in the face - //! Returns True if the face theFace contains //! the edge theEdge but with opposite orientation. //! If the method returns True theEdgeOff is the //! edge founded Standard_EXPORT static Standard_Boolean GetEdgeOff(const TopoDS_Edge& theEdge, const TopoDS_Face& theFace, - TopoDS_Edge& theEdgeOff); + TopoDS_Edge& theEdgeOff); //! For the face theFace gets the edge theEdgeOnF //! that is the same as theEdge @@ -502,70 +492,63 @@ public: //! @name Looking for the edge in the face //! Returns False if there is no such edge Standard_EXPORT static Standard_Boolean GetEdgeOnFace(const TopoDS_Edge& theEdge, const TopoDS_Face& theFace, - TopoDS_Edge& theEdgeOnF); - + TopoDS_Edge& theEdgeOnF); public: //! @name Correction of the edges range - //! Correct shrunk range taking into account 3D-curve //! resolution and corresponding tolerance values of , - Standard_EXPORT static void CorrectRange(const TopoDS_Edge& aE1, - const TopoDS_Edge& aE2, + Standard_EXPORT static void CorrectRange(const TopoDS_Edge& aE1, + const TopoDS_Edge& aE2, const IntTools_Range& aSR, - IntTools_Range& aNewSR); - + IntTools_Range& aNewSR); //! Correct shrunk range taking into account 3D-curve //! resolution and corresponding tolerance values of , - Standard_EXPORT static void CorrectRange(const TopoDS_Edge& aE, - const TopoDS_Face& aF, + Standard_EXPORT static void CorrectRange(const TopoDS_Edge& aE, + const TopoDS_Face& aF, const IntTools_Range& aSR, - IntTools_Range& aNewSR); + IntTools_Range& aNewSR); public: //! @name Checking edge on micro status - //! Checks if it is possible to compute shrunk range for the edge - //! Flag defines whether to take into account + //! Flag defines whether to take into account //! the possibility to split the edge or not. - Standard_EXPORT static Standard_Boolean IsMicroEdge(const TopoDS_Edge& theEdge, - const Handle(IntTools_Context)& theContext, - const Standard_Boolean theCheckSplittable = Standard_True); + Standard_EXPORT static Standard_Boolean IsMicroEdge( + const TopoDS_Edge& theEdge, + const Handle(IntTools_Context)& theContext, + const Standard_Boolean theCheckSplittable = Standard_True); public: //! @name Solid classification - //! Returns true if the solid is inverted Standard_EXPORT static Standard_Boolean IsInvertedSolid(const TopoDS_Solid& theSolid); public: //! @name Edge/Face Deviation computation - //! Computes the necessary value of the tolerance for the edge Standard_EXPORT static Standard_Boolean ComputeTolerance(const TopoDS_Face& theFace, const TopoDS_Edge& theEdge, - Standard_Real& theMaxDist, - Standard_Real& theMaxPar); + Standard_Real& theMaxDist, + Standard_Real& theMaxPar); public: //! @name Other methods - //! Makes empty container of requested type - Standard_EXPORT static void MakeContainer(const TopAbs_ShapeEnum theType, - TopoDS_Shape& theShape); + Standard_EXPORT static void MakeContainer(const TopAbs_ShapeEnum theType, TopoDS_Shape& theShape); //! Compute a 3D-point on the edge at parameter - Standard_EXPORT static void PointOnEdge(const TopoDS_Edge& aEdge, + Standard_EXPORT static void PointOnEdge(const TopoDS_Edge& aEdge, const Standard_Real aPrm, - gp_Pnt& aP); + gp_Pnt& aP); //! Returns TRUE if PaveBlock lays on the face , i.e //! the is IN or ON in 2D of - Standard_EXPORT static Standard_Boolean IsBlockInOnFace(const IntTools_Range& aShR, - const TopoDS_Face& aF, - const TopoDS_Edge& aE, + Standard_EXPORT static Standard_Boolean IsBlockInOnFace(const IntTools_Range& aShR, + const TopoDS_Face& aF, + const TopoDS_Edge& aE, const Handle(IntTools_Context)& aContext); //! Returns the min and max dimensions of the shape . - Standard_EXPORT static void Dimensions (const TopoDS_Shape& theS, - Standard_Integer& theDMin, - Standard_Integer& theDMax); + Standard_EXPORT static void Dimensions(const TopoDS_Shape& theS, + Standard_Integer& theDMin, + Standard_Integer& theDMax); //! Returns dimension of the shape . //! If the shape contains elements of different dimension, -1 is returned. @@ -574,13 +557,12 @@ public: //! @name Other methods //! Collects in the output list recursively all non-compound sub-shapes of the first level //! of the given shape theS. The optional map theMap is used to avoid the duplicates in the //! output list, so it will also contain all non-compound sub-shapes. - Standard_EXPORT static void TreatCompound (const TopoDS_Shape& theS, - TopTools_ListOfShape& theList, - TopTools_MapOfShape* theMap = NULL); + Standard_EXPORT static void TreatCompound(const TopoDS_Shape& theS, + TopTools_ListOfShape& theList, + TopTools_MapOfShape* theMap = NULL); //! Returns true if the shell is open Standard_EXPORT static Standard_Boolean IsOpenShell(const TopoDS_Shell& theShell); - }; #endif // _BOPTools_AlgoTools_HeaderFile diff --git a/opencascade/BOPTools_AlgoTools2D.hxx b/opencascade/BOPTools_AlgoTools2D.hxx index 5e4e8f36f..16cf9e520 100644 --- a/opencascade/BOPTools_AlgoTools2D.hxx +++ b/opencascade/BOPTools_AlgoTools2D.hxx @@ -30,28 +30,26 @@ class Geom_Curve; class BRepAdaptor_Surface; class IntTools_Context; - - //! The class contains handy static functions //! dealing with the topology //! This is the copy of the BOPTools_AlgoTools2D.cdl -class BOPTools_AlgoTools2D +class BOPTools_AlgoTools2D { public: - DEFINE_STANDARD_ALLOC //! Compute P-Curve for the edge on the face .
//! Raises exception Standard_ConstructionError if projection algorithm fails.
//! - storage for caching the geometrical tools - Standard_EXPORT static void BuildPCurveForEdgeOnFace(const TopoDS_Edge& aE, - const TopoDS_Face& aF, - const Handle(IntTools_Context)& theContext = Handle(IntTools_Context)()); + Standard_EXPORT static void BuildPCurveForEdgeOnFace( + const TopoDS_Edge& aE, + const TopoDS_Face& aF, + const Handle(IntTools_Context)& theContext = Handle(IntTools_Context)()); //! Compute tangent for the edge [in 3D] at parameter - Standard_EXPORT static Standard_Boolean EdgeTangent(const TopoDS_Edge& anE, + Standard_EXPORT static Standard_Boolean EdgeTangent(const TopoDS_Edge& anE, const Standard_Real aT, - gp_Vec& Tau); + gp_Vec& Tau); //! Compute surface parameters of the face //! for the point from the edge at parameter .
@@ -59,23 +57,25 @@ public: //! projection and can //! raise exception Standard_ConstructionError if projection algorithm fails.
//! - storage for caching the geometrical tools - Standard_EXPORT static void PointOnSurface(const TopoDS_Edge& aE, - const TopoDS_Face& aF, - const Standard_Real aT, - Standard_Real& U, - Standard_Real& V, - const Handle(IntTools_Context)& theContext = Handle(IntTools_Context)()); + Standard_EXPORT static void PointOnSurface( + const TopoDS_Edge& aE, + const TopoDS_Face& aF, + const Standard_Real aT, + Standard_Real& U, + Standard_Real& V, + const Handle(IntTools_Context)& theContext = Handle(IntTools_Context)()); //! Get P-Curve for the edge on surface .
//! If the P-Curve does not exist, build it using Make2D().
//! [aToler] - reached tolerance //! Raises exception Standard_ConstructionError if algorithm Make2D() fails.
//! - storage for caching the geometrical tools - Standard_EXPORT static void CurveOnSurface(const TopoDS_Edge& aE, - const TopoDS_Face& aF, - Handle(Geom2d_Curve)& aC, - Standard_Real& aToler, - const Handle(IntTools_Context)& theContext = Handle(IntTools_Context)()); + Standard_EXPORT static void CurveOnSurface( + const TopoDS_Edge& aE, + const TopoDS_Face& aF, + Handle(Geom2d_Curve)& aC, + Standard_Real& aToler, + const Handle(IntTools_Context)& theContext = Handle(IntTools_Context)()); //! Get P-Curve for the edge on surface .
//! If the P-Curve does not exist, build it using Make2D().
@@ -83,25 +83,26 @@ public: //! [aToler] - reached tolerance
//! Raises exception Standard_ConstructionError if algorithm Make2D() fails.
//! - storage for caching the geometrical tools - Standard_EXPORT static void CurveOnSurface(const TopoDS_Edge& aE, - const TopoDS_Face& aF, - Handle(Geom2d_Curve)& aC, - Standard_Real& aFirst, - Standard_Real& aLast, - Standard_Real& aToler, - const Handle(IntTools_Context)& theContext = Handle(IntTools_Context)()); + Standard_EXPORT static void CurveOnSurface( + const TopoDS_Edge& aE, + const TopoDS_Face& aF, + Handle(Geom2d_Curve)& aC, + Standard_Real& aFirst, + Standard_Real& aLast, + Standard_Real& aToler, + const Handle(IntTools_Context)& theContext = Handle(IntTools_Context)()); //! Returns TRUE if the edge has P-Curve //! on surface . //! [aFirst, aLast] - range of the P-Curve //! [aToler] - reached tolerance //! If the P-Curve does not exist, aC.IsNull()=TRUE. - Standard_EXPORT static Standard_Boolean HasCurveOnSurface(const TopoDS_Edge& aE, - const TopoDS_Face& aF, + Standard_EXPORT static Standard_Boolean HasCurveOnSurface(const TopoDS_Edge& aE, + const TopoDS_Face& aF, Handle(Geom2d_Curve)& aC, - Standard_Real& aFirst, - Standard_Real& aLast, - Standard_Real& aToler); + Standard_Real& aFirst, + Standard_Real& aLast, + Standard_Real& aToler); //! Returns TRUE if the edge has P-Curve //! on surface . @@ -111,29 +112,31 @@ public: //! Adjust P-Curve (3D-curve ) on surface of the face .
//! - storage for caching the geometrical tools - Standard_EXPORT static void AdjustPCurveOnFace(const TopoDS_Face& theF, - const Handle(Geom_Curve)& theC3D, - const Handle(Geom2d_Curve)& theC2D, - Handle(Geom2d_Curve)& theC2DA, - const Handle(IntTools_Context)& theContext = Handle(IntTools_Context)()); + Standard_EXPORT static void AdjustPCurveOnFace( + const TopoDS_Face& theF, + const Handle(Geom_Curve)& theC3D, + const Handle(Geom2d_Curve)& theC2D, + Handle(Geom2d_Curve)& theC2DA, + const Handle(IntTools_Context)& theContext = Handle(IntTools_Context)()); //! Adjust P-Curve (3D-curve ) on surface .
//! [aT1, aT2] - range to adjust
//! - storage for caching the geometrical tools - Standard_EXPORT static void AdjustPCurveOnFace(const TopoDS_Face& theF, - const Standard_Real theFirst, - const Standard_Real theLast, - const Handle(Geom2d_Curve)& theC2D, - Handle(Geom2d_Curve)& theC2DA, - const Handle(IntTools_Context)& theContext = Handle(IntTools_Context)()); + Standard_EXPORT static void AdjustPCurveOnFace( + const TopoDS_Face& theF, + const Standard_Real theFirst, + const Standard_Real theLast, + const Handle(Geom2d_Curve)& theC2D, + Handle(Geom2d_Curve)& theC2DA, + const Handle(IntTools_Context)& theContext = Handle(IntTools_Context)()); //! Adjust P-Curve (3D-curve ) on surface . //! [aT1, aT2] - range to adjust - Standard_EXPORT static void AdjustPCurveOnSurf(const BRepAdaptor_Surface& aF, - const Standard_Real aT1, - const Standard_Real aT2, + Standard_EXPORT static void AdjustPCurveOnSurf(const BRepAdaptor_Surface& aF, + const Standard_Real aT1, + const Standard_Real aT2, const Handle(Geom2d_Curve)& aC2D, - Handle(Geom2d_Curve)& aC2DA); + Handle(Geom2d_Curve)& aC2DA); //! Compute intermediate value in between [aFirst, aLast] . Standard_EXPORT static Standard_Real IntermediatePoint(const Standard_Real aFirst, @@ -147,44 +150,48 @@ public: //! [aToler] - reached tolerance
//! Raises exception Standard_ConstructionError if algorithm fails.
//! - storage for caching the geometrical tools - Standard_EXPORT static void Make2D(const TopoDS_Edge& aE, - const TopoDS_Face& aF, - Handle(Geom2d_Curve)& aC, - Standard_Real& aFirst, - Standard_Real& aLast, - Standard_Real& aToler, - const Handle(IntTools_Context)& theContext = Handle(IntTools_Context)()); + Standard_EXPORT static void Make2D( + const TopoDS_Edge& aE, + const TopoDS_Face& aF, + Handle(Geom2d_Curve)& aC, + Standard_Real& aFirst, + Standard_Real& aLast, + Standard_Real& aToler, + const Handle(IntTools_Context)& theContext = Handle(IntTools_Context)()); //! Make P-Curve for the 3D-curve on surface .
//! [aToler] - reached tolerance
//! Raises exception Standard_ConstructionError if projection algorithm fails.
//! - storage for caching the geometrical tools - Standard_EXPORT static void MakePCurveOnFace(const TopoDS_Face& aF, - const Handle(Geom_Curve)& C3D, - Handle(Geom2d_Curve)& aC, - Standard_Real& aToler, - const Handle(IntTools_Context)& theContext = Handle(IntTools_Context)()); + Standard_EXPORT static void MakePCurveOnFace( + const TopoDS_Face& aF, + const Handle(Geom_Curve)& C3D, + Handle(Geom2d_Curve)& aC, + Standard_Real& aToler, + const Handle(IntTools_Context)& theContext = Handle(IntTools_Context)()); //! Make P-Curve for the 3D-curve on surface .
//! [aT1, aT2] - range to build
//! [aToler] - reached tolerance
//! Raises exception Standard_ConstructionError if projection algorithm fails.
//! - storage for caching the geometrical tools - Standard_EXPORT static void MakePCurveOnFace(const TopoDS_Face& aF, - const Handle(Geom_Curve)& C3D, - const Standard_Real aT1, - const Standard_Real aT2, - Handle(Geom2d_Curve)& aC, - Standard_Real& aToler, - const Handle(IntTools_Context)& theContext = Handle(IntTools_Context)()); + Standard_EXPORT static void MakePCurveOnFace( + const TopoDS_Face& aF, + const Handle(Geom_Curve)& C3D, + const Standard_Real aT1, + const Standard_Real aT2, + Handle(Geom2d_Curve)& aC, + Standard_Real& aToler, + const Handle(IntTools_Context)& theContext = Handle(IntTools_Context)()); //! Attach P-Curve from the edge on surface //! to the edge //! Returns 0 in case of success - Standard_EXPORT static Standard_Integer AttachExistingPCurve(const TopoDS_Edge& aEold, - const TopoDS_Edge& aEnew, - const TopoDS_Face& aF, - const Handle(IntTools_Context)& aCtx); + Standard_EXPORT static Standard_Integer AttachExistingPCurve( + const TopoDS_Edge& aEold, + const TopoDS_Edge& aEnew, + const TopoDS_Face& aF, + const Handle(IntTools_Context)& aCtx); //! Checks if CurveOnSurface of theE on theF matches with isoline of theF surface. //! Sets corresponding values for isTheUIso and isTheVIso variables. @@ -199,9 +206,8 @@ public: //! false classification some p-curves as isoline (e.g. circle on a plane). Standard_EXPORT static void IsEdgeIsoline(const TopoDS_Edge& theE, const TopoDS_Face& theF, - Standard_Boolean& isTheUIso, - Standard_Boolean& isTheVIso); - + Standard_Boolean& isTheUIso, + Standard_Boolean& isTheVIso); }; #endif // _BOPTools_AlgoTools2D_HeaderFile diff --git a/opencascade/BOPTools_AlgoTools3D.hxx b/opencascade/BOPTools_AlgoTools3D.hxx index 0af02fefd..c09b985b8 100644 --- a/opencascade/BOPTools_AlgoTools3D.hxx +++ b/opencascade/BOPTools_AlgoTools3D.hxx @@ -30,58 +30,55 @@ class IntTools_Context; class gp_Pnt2d; class TopoDS_Shape; - - //! The class contains handy static functions //! dealing with the topology //! This is the copy of BOPTools_AlgoTools3D.cdl file -class BOPTools_AlgoTools3D +class BOPTools_AlgoTools3D { public: - DEFINE_STANDARD_ALLOC - //! Makes the edge seam edge for the face basing on the surface properties (U and V periods) - Standard_EXPORT static Standard_Boolean DoSplitSEAMOnFace (const TopoDS_Edge& theESplit, - const TopoDS_Face& theFace); + //! Makes the edge seam edge for the face basing on the surface properties + //! (U and V periods) + Standard_EXPORT static Standard_Boolean DoSplitSEAMOnFace(const TopoDS_Edge& theESplit, + const TopoDS_Face& theFace); //! Makes the split edge seam edge for the face basing on the positions //! of 2d curves of the original edge . - Standard_EXPORT static Standard_Boolean DoSplitSEAMOnFace (const TopoDS_Edge& theEOrigin, - const TopoDS_Edge& theESplit, - const TopoDS_Face& theFace); + Standard_EXPORT static Standard_Boolean DoSplitSEAMOnFace(const TopoDS_Edge& theEOrigin, + const TopoDS_Edge& theESplit, + const TopoDS_Face& theFace); //! Computes normal to the face for the point on the edge //! at parameter .
//! - storage for caching the geometrical tools - Standard_EXPORT static void GetNormalToFaceOnEdge (const TopoDS_Edge& aE, - const TopoDS_Face& aF, - const Standard_Real aT, - gp_Dir& aD, - const Handle(IntTools_Context)& theContext = Handle(IntTools_Context)()); - + Standard_EXPORT static void GetNormalToFaceOnEdge( + const TopoDS_Edge& aE, + const TopoDS_Face& aF, + const Standard_Real aT, + gp_Dir& aD, + const Handle(IntTools_Context)& theContext = Handle(IntTools_Context)()); //! Computes normal to the face for the point on the edge //! at arbitrary intermediate parameter.
//! - storage for caching the geometrical tools - Standard_EXPORT static void GetNormalToFaceOnEdge (const TopoDS_Edge& aE, - const TopoDS_Face& aF, - gp_Dir& aD, - const Handle(IntTools_Context)& theContext = Handle(IntTools_Context)()); - + Standard_EXPORT static void GetNormalToFaceOnEdge( + const TopoDS_Edge& aE, + const TopoDS_Face& aF, + gp_Dir& aD, + const Handle(IntTools_Context)& theContext = Handle(IntTools_Context)()); //! Returns 1 if scalar product aNF1* aNF2>0.
//! Returns 0 if directions aNF1 aNF2 coincide
//! Returns -1 if scalar product aNF1* aNF2<0. - Standard_EXPORT static Standard_Integer SenseFlag (const gp_Dir& aNF1, - const gp_Dir& aNF2); + Standard_EXPORT static Standard_Integer SenseFlag(const gp_Dir& aNF1, const gp_Dir& aNF2); //! Compute normal to surface in point (U,V) //! Returns TRUE if directions aD1U, aD1V coincide - Standard_EXPORT static Standard_Boolean GetNormalToSurface (const Handle(Geom_Surface)& aS, - const Standard_Real U, - const Standard_Real V, - gp_Dir& aD); + Standard_EXPORT static Standard_Boolean GetNormalToSurface(const Handle(Geom_Surface)& aS, + const Standard_Real U, + const Standard_Real V, + gp_Dir& aD); //! Computes normal to the face for the 3D-point that //! belongs to the edge at parameter .
@@ -97,13 +94,14 @@ public: //! from the edge, but if this value is too big, //! the point will be computed using Hatcher (PointInFace function).
//! Returns TRUE in case of success. - Standard_EXPORT static Standard_Boolean GetApproxNormalToFaceOnEdge (const TopoDS_Edge& aE, - const TopoDS_Face& aF, - const Standard_Real aT, - gp_Pnt& aPx, - gp_Dir& aD, - const Handle(IntTools_Context)& theContext); - + Standard_EXPORT static Standard_Boolean GetApproxNormalToFaceOnEdge( + const TopoDS_Edge& aE, + const TopoDS_Face& aF, + const Standard_Real aT, + gp_Pnt& aPx, + gp_Dir& aD, + const Handle(IntTools_Context)& theContext); + //! Computes normal to the face for the 3D-point that //! belongs to the edge at parameter .
//! Output:
@@ -117,13 +115,13 @@ public: //! with the shifting value from the edge;
//! No checks on this value will be done.
//! Returns TRUE in case of success. - Standard_EXPORT static Standard_Boolean GetApproxNormalToFaceOnEdge (const TopoDS_Edge& theE, - const TopoDS_Face& theF, - const Standard_Real aT, - gp_Pnt& aP, - gp_Dir& aDNF, - const Standard_Real aDt2D); - + Standard_EXPORT static Standard_Boolean GetApproxNormalToFaceOnEdge(const TopoDS_Edge& theE, + const TopoDS_Face& theF, + const Standard_Real aT, + gp_Pnt& aP, + gp_Dir& aDNF, + const Standard_Real aDt2D); + //! Computes normal to the face for the 3D-point that //! belongs to the edge at parameter .
//! Output:
@@ -135,34 +133,35 @@ public: //! the face material (so, we'll have approx. normal);
//! The point is computed using PointNearEdge function //! with the shifting value from the edge, - //! but if this value is too big the point will be + //! but if this value is too big the point will be //! computed using Hatcher (PointInFace function).
//! Returns TRUE in case of success. - Standard_EXPORT static Standard_Boolean GetApproxNormalToFaceOnEdge (const TopoDS_Edge& theE, - const TopoDS_Face& theF, - const Standard_Real aT, - const Standard_Real aDt2D, - gp_Pnt& aP, - gp_Dir& aDNF, - const Handle(IntTools_Context)& theContext); + Standard_EXPORT static Standard_Boolean GetApproxNormalToFaceOnEdge( + const TopoDS_Edge& theE, + const TopoDS_Face& theF, + const Standard_Real aT, + const Standard_Real aDt2D, + gp_Pnt& aP, + gp_Dir& aDNF, + const Handle(IntTools_Context)& theContext); //! Compute the point , () that is near to //! the edge at parameter towards to the //! material of the face . The value of shifting in //! 2D is
- //! If the value of shifting is too big the point + //! If the value of shifting is too big the point //! will be computed using Hatcher (PointInFace function).
//! Returns error status:
//! 0 - in case of success;
//! 1 - does not have 2d curve on the face ;
//! 2 - the computed point is out of the face. - Standard_EXPORT static Standard_Integer PointNearEdge (const TopoDS_Edge& aE, - const TopoDS_Face& aF, - const Standard_Real aT, - const Standard_Real aDt2D, - gp_Pnt2d& aP2D, - gp_Pnt& aPx, - const Handle(IntTools_Context)& theContext); + Standard_EXPORT static Standard_Integer PointNearEdge(const TopoDS_Edge& aE, + const TopoDS_Face& aF, + const Standard_Real aT, + const Standard_Real aDt2D, + gp_Pnt2d& aP2D, + gp_Pnt& aPx, + const Handle(IntTools_Context)& theContext); //! Compute the point , () that is near to //! the edge at parameter towards to the @@ -171,12 +170,12 @@ public: //! Returns error status:
//! 0 - in case of success;
//! 1 - does not have 2d curve on the face . - Standard_EXPORT static Standard_Integer PointNearEdge (const TopoDS_Edge& aE, - const TopoDS_Face& aF, - const Standard_Real aT, - const Standard_Real aDt2D, - gp_Pnt2d& aP2D, - gp_Pnt& aPx); + Standard_EXPORT static Standard_Integer PointNearEdge(const TopoDS_Edge& aE, + const TopoDS_Face& aF, + const Standard_Real aT, + const Standard_Real aDt2D, + gp_Pnt2d& aP2D, + gp_Pnt& aPx); //! Computes the point , () that is near to //! the edge at parameter towards to the @@ -188,13 +187,12 @@ public: //! 0 - in case of success;
//! 1 - does not have 2d curve on the face ;
//! 2 - the computed point is out of the face. - Standard_EXPORT static Standard_Integer PointNearEdge (const TopoDS_Edge& aE, - const TopoDS_Face& aF, - const Standard_Real aT, - gp_Pnt2d& aP2D, - gp_Pnt& aPx, - const Handle(IntTools_Context)& theContext); - + Standard_EXPORT static Standard_Integer PointNearEdge(const TopoDS_Edge& aE, + const TopoDS_Face& aF, + const Standard_Real aT, + gp_Pnt2d& aP2D, + gp_Pnt& aPx, + const Handle(IntTools_Context)& theContext); //! Compute the point , () that is near to //! the edge at arbitrary parameter towards to the @@ -206,38 +204,37 @@ public: //! 0 - in case of success;
//! 1 - does not have 2d curve on the face ;
//! 2 - the computed point is out of the face. - Standard_EXPORT static Standard_Integer PointNearEdge (const TopoDS_Edge& aE, - const TopoDS_Face& aF, - gp_Pnt2d& aP2D, - gp_Pnt& aPx, - const Handle(IntTools_Context)& theContext); - + Standard_EXPORT static Standard_Integer PointNearEdge(const TopoDS_Edge& aE, + const TopoDS_Face& aF, + gp_Pnt2d& aP2D, + gp_Pnt& aPx, + const Handle(IntTools_Context)& theContext); //! Returns simple step value that is used in 2D-computations //! = 1.e-5 Standard_EXPORT static Standard_Real MinStepIn2d(); - //! Returns TRUE if the shape does not contain //! geometry information (e.g. empty compound) - Standard_EXPORT static Standard_Boolean IsEmptyShape (const TopoDS_Shape& aS); - + Standard_EXPORT static Standard_Boolean IsEmptyShape(const TopoDS_Shape& aS); //! Get the edge from the face that is the same as //! the edge - Standard_EXPORT static void OrientEdgeOnFace (const TopoDS_Edge& aE, const TopoDS_Face& aF, TopoDS_Edge& aER); - + Standard_EXPORT static void OrientEdgeOnFace(const TopoDS_Edge& aE, + const TopoDS_Face& aF, + TopoDS_Edge& aER); + //! Computes arbitrary point inside the face .
//! - 2D representation of //! on the surface of
//! Returns 0 in case of success. - Standard_EXPORT static Standard_Integer PointInFace (const TopoDS_Face& theF, - gp_Pnt& theP, - gp_Pnt2d& theP2D, - const Handle(IntTools_Context)& theContext); + Standard_EXPORT static Standard_Integer PointInFace(const TopoDS_Face& theF, + gp_Pnt& theP, + gp_Pnt2d& theP2D, + const Handle(IntTools_Context)& theContext); - //! Computes a point inside the face - //! using starting point taken by the parameter + //! Computes a point inside the face + //! using starting point taken by the parameter //! from the 2d curve of the edge on the face //! in the direction perpendicular to the tangent vector //! of the 2d curve of the edge.
@@ -245,31 +242,28 @@ public: //! - 2D representation of //! on the surface of
//! Returns 0 in case of success. - Standard_EXPORT static Standard_Integer PointInFace (const TopoDS_Face& theF, - const TopoDS_Edge& theE, - const Standard_Real theT, - const Standard_Real theDt2D, - gp_Pnt& theP, - gp_Pnt2d& theP2D, - const Handle(IntTools_Context)& theContext); + Standard_EXPORT static Standard_Integer PointInFace(const TopoDS_Face& theF, + const TopoDS_Edge& theE, + const Standard_Real theT, + const Standard_Real theDt2D, + gp_Pnt& theP, + gp_Pnt2d& theP2D, + const Handle(IntTools_Context)& theContext); - //! Computes a point inside the face + //! Computes a point inside the face //! using the line so that 2D point //! , 2D representation of //! on the surface of , lies on that line.
//! Returns 0 in case of success. - Standard_EXPORT static Standard_Integer PointInFace (const TopoDS_Face& theF, - const Handle(Geom2d_Curve)& theL, - gp_Pnt& theP, - gp_Pnt2d& theP2D, - const Handle(IntTools_Context)& theContext, - const Standard_Real theDt2D = 0.0); - + Standard_EXPORT static Standard_Integer PointInFace(const TopoDS_Face& theF, + const Handle(Geom2d_Curve)& theL, + gp_Pnt& theP, + gp_Pnt2d& theP2D, + const Handle(IntTools_Context)& theContext, + const Standard_Real theDt2D = 0.0); protected: - private: - }; #endif // _BOPTools_AlgoTools3D_HeaderFile diff --git a/opencascade/BOPTools_BoxSelector.hxx b/opencascade/BOPTools_BoxSelector.hxx index c29012e04..2ec4fe220 100644 --- a/opencascade/BOPTools_BoxSelector.hxx +++ b/opencascade/BOPTools_BoxSelector.hxx @@ -23,78 +23,67 @@ //! Template Selector for elements selection from BVH tree. template -class BOPTools_BoxSelector : - public BVH_Traverse , Standard_Boolean> +class BOPTools_BoxSelector + : public BVH_Traverse, + Standard_Boolean> { public: - typedef typename BVH::VectorType::Type BVH_VecNd; public: //! @name Constructor - //! Empty constructor BOPTools_BoxSelector() {}; public: //! @name public interfaces - //! Clears the indices - void Clear() - { - myIndices.Clear(); - } + void Clear() { myIndices.Clear(); } //! Sets the box - void SetBox (const BVH_Box & theBox) - { - myBox = theBox; - } + void SetBox(const BVH_Box& theBox) { myBox = theBox; } //! Returns the list of accepted indices - const TColStd_ListOfInteger& Indices() const - { - return myIndices; - } + const TColStd_ListOfInteger& Indices() const { return myIndices; } public: //! @name Rejection/Acceptance rules - //! Checks if the box should be rejected - virtual Standard_Boolean RejectNode (const BVH_VecNd& theCMin, - const BVH_VecNd& theCMax, - Standard_Boolean& theIsInside) const Standard_OVERRIDE + virtual Standard_Boolean RejectNode(const BVH_VecNd& theCMin, + const BVH_VecNd& theCMax, + Standard_Boolean& theIsInside) const Standard_OVERRIDE { Standard_Boolean hasOverlap; - theIsInside = myBox.Contains (theCMin, theCMax, hasOverlap); + theIsInside = myBox.Contains(theCMin, theCMax, hasOverlap); return !hasOverlap; } //! Checks if the element should be rejected - Standard_Boolean RejectElement (const Standard_Integer theIndex) + Standard_Boolean RejectElement(const Standard_Integer theIndex) { - return myBox.IsOut (this->myBVHSet->Box (theIndex)); + return myBox.IsOut(this->myBVHSet->Box(theIndex)); } //! Checks if the metric of the node may be accepted - virtual Standard_Boolean AcceptMetric (const Standard_Boolean& theIsInside) const Standard_OVERRIDE + virtual Standard_Boolean AcceptMetric(const Standard_Boolean& theIsInside) const Standard_OVERRIDE { return theIsInside; } //! Accepts the element with the index in BVH tree - virtual Standard_Boolean Accept (const Standard_Integer theIndex, - const Standard_Boolean& theIsInside) Standard_OVERRIDE + virtual Standard_Boolean Accept(const Standard_Integer theIndex, + const Standard_Boolean& theIsInside) Standard_OVERRIDE { - if (theIsInside || !RejectElement (theIndex)) + if (theIsInside || !RejectElement(theIndex)) { - myIndices.Append (this->myBVHSet->Element (theIndex)); + myIndices.Append(this->myBVHSet->Element(theIndex)); return Standard_True; } return Standard_False; } -protected: //! @name Fields - - BVH_Box myBox; //!< Selection box - TColStd_ListOfInteger myIndices; //!< Selected indices +protected: //! @name Fields + BVH_Box myBox; //!< Selection box + TColStd_ListOfInteger myIndices; //!< Selected indices }; #endif diff --git a/opencascade/BOPTools_BoxTree.hxx b/opencascade/BOPTools_BoxTree.hxx index 0f2093545..78bcdcc51 100644 --- a/opencascade/BOPTools_BoxTree.hxx +++ b/opencascade/BOPTools_BoxTree.hxx @@ -23,23 +23,25 @@ //! Redefines BoxSet to use the Linear builder by default template -class BOPTools_BoxSet : public BVH_BoxSet +class BOPTools_BoxSet : public BVH_BoxSet { public: //! @name Constructors //! Empty constructor for use the default BVH_Builder - BOPTools_BoxSet (const opencascade::handle >& theBuilder = NULL) - : BVH_BoxSet (theBuilder.IsNull() ? new BVH_LinearBuilder() : theBuilder) - {} + BOPTools_BoxSet(const opencascade::handle>& theBuilder = NULL) + : BVH_BoxSet( + theBuilder.IsNull() ? new BVH_LinearBuilder() : theBuilder) + { + } }; //! 2D definitions -typedef BOPTools_BoxSet BOPTools_Box2dTree; -typedef BOPTools_BoxSelector<2> BOPTools_Box2dTreeSelector; -typedef BOPTools_PairSelector<2> BOPTools_Box2dPairSelector; +typedef BOPTools_BoxSet BOPTools_Box2dTree; +typedef BOPTools_BoxSelector<2> BOPTools_Box2dTreeSelector; +typedef BOPTools_PairSelector<2> BOPTools_Box2dPairSelector; //! 3D definitions -typedef BOPTools_BoxSet BOPTools_BoxTree; -typedef BOPTools_BoxSelector<3> BOPTools_BoxTreeSelector; -typedef BOPTools_PairSelector<3> BOPTools_BoxPairSelector; +typedef BOPTools_BoxSet BOPTools_BoxTree; +typedef BOPTools_BoxSelector<3> BOPTools_BoxTreeSelector; +typedef BOPTools_PairSelector<3> BOPTools_BoxPairSelector; #endif diff --git a/opencascade/BOPTools_ConnexityBlock.hxx b/opencascade/BOPTools_ConnexityBlock.hxx index 423e223ae..b0e3009d4 100644 --- a/opencascade/BOPTools_ConnexityBlock.hxx +++ b/opencascade/BOPTools_ConnexityBlock.hxx @@ -19,55 +19,48 @@ #include //======================================================================= -//class : ConnexityBlock -//purpose : +// class : ConnexityBlock +// purpose : //======================================================================= -class BOPTools_ConnexityBlock { - public: - BOPTools_ConnexityBlock() : - myAllocator(NCollection_BaseAllocator::CommonBaseAllocator()), - myRegular(Standard_True), - myShapes(myAllocator), - myLoops(myAllocator) { - }; +class BOPTools_ConnexityBlock +{ +public: + BOPTools_ConnexityBlock() + : myAllocator(NCollection_BaseAllocator::CommonBaseAllocator()), + myRegular(Standard_True), + myShapes(myAllocator), + myLoops(myAllocator) {}; // - BOPTools_ConnexityBlock(const Handle(NCollection_BaseAllocator)& theAllocator): - myAllocator(theAllocator), - myRegular(Standard_True), - myShapes(myAllocator), - myLoops(myAllocator) { - }; + BOPTools_ConnexityBlock(const Handle(NCollection_BaseAllocator)& theAllocator) + : myAllocator(theAllocator), + myRegular(Standard_True), + myShapes(myAllocator), + myLoops(myAllocator) {}; + // - const TopTools_ListOfShape& Shapes()const { - return myShapes; - }; + const TopTools_ListOfShape& Shapes() const { return myShapes; }; + // - TopTools_ListOfShape& ChangeShapes() { - return myShapes; - }; + TopTools_ListOfShape& ChangeShapes() { return myShapes; }; + // - void SetRegular(const Standard_Boolean theFlag) { - myRegular=theFlag; - } + void SetRegular(const Standard_Boolean theFlag) { myRegular = theFlag; } + // - Standard_Boolean IsRegular()const { - return myRegular; - } + Standard_Boolean IsRegular() const { return myRegular; } + // - const TopTools_ListOfShape& Loops()const { - return myLoops; - }; + const TopTools_ListOfShape& Loops() const { return myLoops; }; + // - TopTools_ListOfShape& ChangeLoops() { - return myLoops; - }; + TopTools_ListOfShape& ChangeLoops() { return myLoops; }; + // - protected: +protected: Handle(NCollection_BaseAllocator) myAllocator; - Standard_Boolean myRegular; - TopTools_ListOfShape myShapes; - TopTools_ListOfShape myLoops; + Standard_Boolean myRegular; + TopTools_ListOfShape myShapes; + TopTools_ListOfShape myLoops; }; - #endif diff --git a/opencascade/BOPTools_CoupleOfShape.hxx b/opencascade/BOPTools_CoupleOfShape.hxx index 5f2c1c948..8ac9d89e8 100644 --- a/opencascade/BOPTools_CoupleOfShape.hxx +++ b/opencascade/BOPTools_CoupleOfShape.hxx @@ -18,37 +18,32 @@ #include //======================================================================= -//class : -//purpose : +// class : +// purpose : //======================================================================= -class BOPTools_CoupleOfShape { - public: - BOPTools_CoupleOfShape() { - }; +class BOPTools_CoupleOfShape +{ +public: + BOPTools_CoupleOfShape() {}; // - ~BOPTools_CoupleOfShape() { - }; + ~BOPTools_CoupleOfShape() {}; + // - void SetShape1(const TopoDS_Shape& theShape) { - myShape1=theShape; - } + void SetShape1(const TopoDS_Shape& theShape) { myShape1 = theShape; } + // - const TopoDS_Shape& Shape1()const{ - return myShape1; - } + const TopoDS_Shape& Shape1() const { return myShape1; } + // - void SetShape2(const TopoDS_Shape& theShape) { - myShape2=theShape; - } + void SetShape2(const TopoDS_Shape& theShape) { myShape2 = theShape; } + // - const TopoDS_Shape& Shape2()const{ - return myShape2; - } + const TopoDS_Shape& Shape2() const { return myShape2; } + // - protected: +protected: TopoDS_Shape myShape1; TopoDS_Shape myShape2; }; - #endif diff --git a/opencascade/BOPTools_ListOfConnexityBlock.hxx b/opencascade/BOPTools_ListOfConnexityBlock.hxx index 84fa9e42b..e84c52eee 100644 --- a/opencascade/BOPTools_ListOfConnexityBlock.hxx +++ b/opencascade/BOPTools_ListOfConnexityBlock.hxx @@ -15,11 +15,10 @@ #ifndef BOPTools_ListOfConnexityBlock_HeaderFile #define BOPTools_ListOfConnexityBlock_HeaderFile -#include +#include #include -typedef NCollection_List BOPTools_ListOfConnexityBlock; -typedef BOPTools_ListOfConnexityBlock::Iterator BOPTools_ListIteratorOfListOfConnexityBlock; - +typedef NCollection_List BOPTools_ListOfConnexityBlock; +typedef BOPTools_ListOfConnexityBlock::Iterator BOPTools_ListIteratorOfListOfConnexityBlock; #endif diff --git a/opencascade/BOPTools_ListOfCoupleOfShape.hxx b/opencascade/BOPTools_ListOfCoupleOfShape.hxx index 802e7be81..99158839a 100644 --- a/opencascade/BOPTools_ListOfCoupleOfShape.hxx +++ b/opencascade/BOPTools_ListOfCoupleOfShape.hxx @@ -15,10 +15,10 @@ #ifndef BOPTools_ListOfCoupleOfShape_HeaderFile #define BOPTools_ListOfCoupleOfShape_HeaderFile -#include +#include #include -typedef NCollection_List BOPTools_ListOfCoupleOfShape; -typedef BOPTools_ListOfCoupleOfShape::Iterator BOPTools_ListIteratorOfListOfCoupleOfShape; +typedef NCollection_List BOPTools_ListOfCoupleOfShape; +typedef BOPTools_ListOfCoupleOfShape::Iterator BOPTools_ListIteratorOfListOfCoupleOfShape; #endif diff --git a/opencascade/BOPTools_MapOfSet.hxx b/opencascade/BOPTools_MapOfSet.hxx index 0a9e80b0b..9b92ad68c 100644 --- a/opencascade/BOPTools_MapOfSet.hxx +++ b/opencascade/BOPTools_MapOfSet.hxx @@ -15,11 +15,11 @@ #ifndef BOPTools_MapOfSet_HeaderFile #define BOPTools_MapOfSet_HeaderFile -#include +#include -#include +#include -typedef NCollection_Map BOPTools_MapOfSet; -typedef BOPTools_MapOfSet::Iterator BOPTools_MapIteratorOfMapOfSet; +typedef NCollection_Map BOPTools_MapOfSet; +typedef BOPTools_MapOfSet::Iterator BOPTools_MapIteratorOfMapOfSet; #endif diff --git a/opencascade/BOPTools_PairSelector.hxx b/opencascade/BOPTools_PairSelector.hxx index fc0ab26d2..7a20a3e3b 100644 --- a/opencascade/BOPTools_PairSelector.hxx +++ b/opencascade/BOPTools_PairSelector.hxx @@ -23,23 +23,24 @@ //! Template Selector for selection of the elements from two BVH trees. template -class BOPTools_PairSelector : - public BVH_PairTraverse > +class BOPTools_PairSelector + : public BVH_PairTraverse> { public: //! @name public types - //! Auxiliary structure to keep the pair of indices struct PairIDs { - PairIDs (const Standard_Integer theId1 = -1, - const Standard_Integer theId2 = -1) - : ID1 (theId1), ID2 (theId2) - {} + PairIDs(const Standard_Integer theId1 = -1, const Standard_Integer theId2 = -1) + : ID1(theId1), + ID2(theId2) + { + } - Standard_Boolean operator< (const PairIDs& theOther) const + Standard_Boolean operator<(const PairIDs& theOther) const { - return ID1 < theOther.ID1 || - (ID1 == theOther.ID1 && ID2 < theOther.ID2); + return ID1 < theOther.ID1 || (ID1 == theOther.ID1 && ID2 < theOther.ID2); } Standard_Integer ID1; @@ -49,25 +50,18 @@ public: //! @name public types typedef typename BVH::VectorType::Type BVH_VecNd; public: //! @name Constructor - //! Empty constructor BOPTools_PairSelector() - : mySameBVHs (Standard_False) - {} + : mySameBVHs(Standard_False) + { + } public: //! @name public interfaces - //! Clears the indices - void Clear() - { - myPairs.clear(); - } + void Clear() { myPairs.clear(); } //! Sorts the indices - void Sort() - { - std::sort (myPairs.begin(), myPairs.end()); - } + void Sort() { std::sort(myPairs.begin(), myPairs.end()); } //! Tells to selector that BVH trees are the same. //! If the flag is set to true the resulting vector will contain @@ -76,55 +70,45 @@ public: //! @name public interfaces //! not contain pairs in which IDs are the same (pair (1, 1) will be rejected). //! If it is required to have a full vector of pairs even //! for the same BVH trees, just keep the false value of this flag. - void SetSame (const Standard_Boolean theIsSame) - { - mySameBVHs = theIsSame; - } + void SetSame(const Standard_Boolean theIsSame) { mySameBVHs = theIsSame; } //! Returns the list of accepted indices - const std::vector& Pairs() const - { - return myPairs; - } + const std::vector& Pairs() const { return myPairs; } public: //! @name Rejection/Acceptance rules - //! Basing on the bounding boxes of the nodes checks if the pair of nodes should be rejected. - virtual Standard_Boolean RejectNode (const BVH_VecNd& theCMin1, - const BVH_VecNd& theCMax1, - const BVH_VecNd& theCMin2, - const BVH_VecNd& theCMax2, - Standard_Real&) const Standard_OVERRIDE + virtual Standard_Boolean RejectNode(const BVH_VecNd& theCMin1, + const BVH_VecNd& theCMax1, + const BVH_VecNd& theCMin2, + const BVH_VecNd& theCMax2, + Standard_Real&) const Standard_OVERRIDE { - return BVH_Box (theCMin1, theCMax1).IsOut (theCMin2, theCMax2); + return BVH_Box(theCMin1, theCMax1).IsOut(theCMin2, theCMax2); } //! Checks if the pair of elements should be rejected. - Standard_Boolean RejectElement (const Standard_Integer theID1, - const Standard_Integer theID2) + Standard_Boolean RejectElement(const Standard_Integer theID1, const Standard_Integer theID2) { - return (mySameBVHs && theID1 >= theID2) || - this->myBVHSet1->Box (theID1).IsOut( - this->myBVHSet2->Box (theID2)); + return (mySameBVHs && theID1 >= theID2) + || this->myBVHSet1->Box(theID1).IsOut(this->myBVHSet2->Box(theID2)); } //! Checks and accepts the pair of elements. - virtual Standard_Boolean Accept (const Standard_Integer theID1, - const Standard_Integer theID2) Standard_OVERRIDE + virtual Standard_Boolean Accept(const Standard_Integer theID1, + const Standard_Integer theID2) Standard_OVERRIDE { - if (!RejectElement (theID1, theID2)) + if (!RejectElement(theID1, theID2)) { - myPairs.push_back (PairIDs (this->myBVHSet1->Element (theID1), - this->myBVHSet2->Element (theID2))); + myPairs.push_back( + PairIDs(this->myBVHSet1->Element(theID1), this->myBVHSet2->Element(theID2))); return Standard_True; } return Standard_False; } -protected: //! @name Fields - - std::vector myPairs; //!< Selected pairs of indices - Standard_Boolean mySameBVHs; //!< Selection is performed from the same BVH trees +protected: //! @name Fields + std::vector myPairs; //!< Selected pairs of indices + Standard_Boolean mySameBVHs; //!< Selection is performed from the same BVH trees }; #endif diff --git a/opencascade/BOPTools_Parallel.hxx b/opencascade/BOPTools_Parallel.hxx index de87a3a0a..0208d5c99 100644 --- a/opencascade/BOPTools_Parallel.hxx +++ b/opencascade/BOPTools_Parallel.hxx @@ -24,15 +24,18 @@ //! Implementation of Functors/Starters class BOPTools_Parallel { - template + template class Functor { public: //! Constructor. - explicit Functor(TypeSolverVector& theSolverVec) : mySolvers (theSolverVec) {} + explicit Functor(TypeSolverVector& theSolverVec) + : mySolvers(theSolverVec) + { + } //! Defines functor interface. - void operator() (const Standard_Integer theIndex) const + void operator()(const Standard_Integer theIndex) const { typename TypeSolverVector::value_type& aSolver = mySolvers[theIndex]; aSolver.Perform(); @@ -40,32 +43,34 @@ class BOPTools_Parallel private: Functor(const Functor&); - Functor& operator= (const Functor&); + Functor& operator=(const Functor&); private: TypeSolverVector& mySolvers; }; //! Functor storing map of thread id -> algorithm context - template + template class ContextFunctor { public: - //! Constructor - explicit ContextFunctor (TypeSolverVector& theVector) : mySolverVector(theVector) {} + explicit ContextFunctor(TypeSolverVector& theVector) + : mySolverVector(theVector) + { + } //! Binds main thread context - void SetContext (const opencascade::handle& theContext) + void SetContext(const opencascade::handle& theContext) { - myContextMap.Bind (OSD_Thread::Current(), theContext); + myContextMap.Bind(OSD_Thread::Current(), theContext); } //! Returns current thread context const opencascade::handle& GetThreadContext() const { const Standard_ThreadId aThreadID = OSD_Thread::Current(); - if (const opencascade::handle* aContextPtr = myContextMap.Seek (aThreadID)) + if (const opencascade::handle* aContextPtr = myContextMap.Seek(aThreadID)) { if (!aContextPtr->IsNull()) { @@ -74,18 +79,19 @@ class BOPTools_Parallel } // Create new context - opencascade::handle aContext = new TypeContext (NCollection_BaseAllocator::CommonBaseAllocator()); + opencascade::handle aContext = + new TypeContext(NCollection_BaseAllocator::CommonBaseAllocator()); - Standard_Mutex::Sentry aLocker (myMutex); - myContextMap.Bind (aThreadID, aContext); - return myContextMap (aThreadID); + Standard_Mutex::Sentry aLocker(myMutex); + myContextMap.Bind(aThreadID, aContext); + return myContextMap(aThreadID); } //! Defines functor interface - void operator()( const Standard_Integer theIndex ) const + void operator()(const Standard_Integer theIndex) const { const opencascade::handle& aContext = GetThreadContext(); - typename TypeSolverVector::value_type& aSolver = mySolverVector[theIndex]; + typename TypeSolverVector::value_type& aSolver = mySolverVector[theIndex]; aSolver.SetContext(aContext); aSolver.Perform(); @@ -93,84 +99,86 @@ class BOPTools_Parallel private: ContextFunctor(const ContextFunctor&); - ContextFunctor& operator= (const ContextFunctor&); + ContextFunctor& operator=(const ContextFunctor&); private: - TypeSolverVector& mySolverVector; + TypeSolverVector& mySolverVector; mutable NCollection_DataMap> myContextMap; - mutable Standard_Mutex myMutex; + mutable Standard_Mutex myMutex; }; //! Functor storing array of algorithm contexts per thread in pool - template + template class ContextFunctor2 { public: - //! Constructor - explicit ContextFunctor2 (TypeSolverVector& theVector, const OSD_ThreadPool::Launcher& thePoolLauncher) - : mySolverVector(theVector), - myContextArray (thePoolLauncher.LowerThreadIndex(), thePoolLauncher.UpperThreadIndex()) {} + explicit ContextFunctor2(TypeSolverVector& theVector, + const OSD_ThreadPool::Launcher& thePoolLauncher) + : mySolverVector(theVector), + myContextArray(thePoolLauncher.LowerThreadIndex(), thePoolLauncher.UpperThreadIndex()) + { + } //! Binds main thread context - void SetContext (const opencascade::handle& theContext) + void SetContext(const opencascade::handle& theContext) { + // clang-format off myContextArray.ChangeLast() = theContext; // OSD_ThreadPool::Launcher::UpperThreadIndex() is reserved for a main thread + // clang-format on } //! Defines functor interface with serialized thread index. - void operator() (int theThreadIndex, - int theIndex) const + void operator()(int theThreadIndex, int theIndex) const { - opencascade::handle& aContext = myContextArray.ChangeValue (theThreadIndex); + opencascade::handle& aContext = myContextArray.ChangeValue(theThreadIndex); if (aContext.IsNull()) { - aContext = new TypeContext (NCollection_BaseAllocator::CommonBaseAllocator()); + aContext = new TypeContext(NCollection_BaseAllocator::CommonBaseAllocator()); } typename TypeSolverVector::value_type& aSolver = mySolverVector[theIndex]; - aSolver.SetContext (aContext); + aSolver.SetContext(aContext); aSolver.Perform(); } private: ContextFunctor2(const ContextFunctor2&); - ContextFunctor2& operator= (const ContextFunctor2&); + ContextFunctor2& operator=(const ContextFunctor2&); private: - TypeSolverVector& mySolverVector; - mutable NCollection_Array1< opencascade::handle > myContextArray; + TypeSolverVector& mySolverVector; + mutable NCollection_Array1> myContextArray; }; public: - //! Pure version - template - static void Perform (Standard_Boolean theIsRunParallel, - TypeSolverVector& theSolverVector) + template + static void Perform(Standard_Boolean theIsRunParallel, TypeSolverVector& theSolverVector) { - Functor aFunctor (theSolverVector); - OSD_Parallel::For (0, theSolverVector.Length(), aFunctor, !theIsRunParallel); + Functor aFunctor(theSolverVector); + OSD_Parallel::For(0, theSolverVector.Length(), aFunctor, !theIsRunParallel); } //! Context dependent version - template - static void Perform (Standard_Boolean theIsRunParallel, - TypeSolverVector& theSolverVector, - opencascade::handle& theContext) + template + static void Perform(Standard_Boolean theIsRunParallel, + TypeSolverVector& theSolverVector, + opencascade::handle& theContext) { if (OSD_Parallel::ToUseOcctThreads()) { - const Handle(OSD_ThreadPool)& aThreadPool = OSD_ThreadPool::DefaultPool(); - OSD_ThreadPool::Launcher aPoolLauncher (*aThreadPool, theIsRunParallel ? theSolverVector.Length() : 0); - ContextFunctor2 aFunctor (theSolverVector, aPoolLauncher); - aFunctor.SetContext (theContext); - aPoolLauncher.Perform (0, theSolverVector.Length(), aFunctor); + const Handle(OSD_ThreadPool)& aThreadPool = OSD_ThreadPool::DefaultPool(); + OSD_ThreadPool::Launcher aPoolLauncher(*aThreadPool, + theIsRunParallel ? theSolverVector.Length() : 0); + ContextFunctor2 aFunctor(theSolverVector, aPoolLauncher); + aFunctor.SetContext(theContext); + aPoolLauncher.Perform(0, theSolverVector.Length(), aFunctor); } else { - ContextFunctor aFunctor (theSolverVector); - aFunctor.SetContext (theContext); - OSD_Parallel::For (0, theSolverVector.Length(), aFunctor, !theIsRunParallel); + ContextFunctor aFunctor(theSolverVector); + aFunctor.SetContext(theContext); + OSD_Parallel::For(0, theSolverVector.Length(), aFunctor, !theIsRunParallel); } } }; diff --git a/opencascade/BOPTools_Set.hxx b/opencascade/BOPTools_Set.hxx index 67cb07d82..e9485162d 100644 --- a/opencascade/BOPTools_Set.hxx +++ b/opencascade/BOPTools_Set.hxx @@ -24,68 +24,53 @@ #include #include - - -class BOPTools_Set +class BOPTools_Set { public: - DEFINE_STANDARD_ALLOC - Standard_EXPORT BOPTools_Set(); -Standard_EXPORT virtual ~BOPTools_Set(); - + Standard_EXPORT virtual ~BOPTools_Set(); + Standard_EXPORT BOPTools_Set(const Handle(NCollection_BaseAllocator)& theAllocator); //! Copy constructor. - Standard_EXPORT BOPTools_Set (const BOPTools_Set& theOther); + Standard_EXPORT BOPTools_Set(const BOPTools_Set& theOther); + + Standard_EXPORT BOPTools_Set& Assign(const BOPTools_Set& Other); + + BOPTools_Set& operator=(const BOPTools_Set& Other) { return Assign(Other); } - Standard_EXPORT BOPTools_Set& Assign (const BOPTools_Set& Other); -BOPTools_Set& operator = (const BOPTools_Set& Other) -{ - return Assign(Other); -} - Standard_EXPORT const TopoDS_Shape& Shape() const; - - Standard_EXPORT void Add (const TopoDS_Shape& theS, const TopAbs_ShapeEnum theType); - + + Standard_EXPORT void Add(const TopoDS_Shape& theS, const TopAbs_ShapeEnum theType); + Standard_EXPORT Standard_Integer NbShapes() const; - - Standard_EXPORT Standard_Boolean IsEqual (const BOPTools_Set& aOther) const; - bool operator==(const BOPTools_Set& theOther) const - { - return IsEqual(theOther); - } + Standard_EXPORT Standard_Boolean IsEqual(const BOPTools_Set& aOther) const; + + bool operator==(const BOPTools_Set& theOther) const { return IsEqual(theOther); } size_t GetSum() const { return mySum; } protected: - - Standard_EXPORT void Clear(); - Handle(NCollection_BaseAllocator) myAllocator; - TopTools_ListOfShape myShapes; - TopoDS_Shape myShape; - Standard_Integer myNbShapes; - size_t mySum; - Standard_Integer myUpper; + TopTools_ListOfShape myShapes; + TopoDS_Shape myShape; + Standard_Integer myNbShapes; + size_t mySum; + Standard_Integer myUpper; }; namespace std { - template <> - struct hash - { - size_t operator()(const BOPTools_Set& theSet) const noexcept - { - return theSet.GetSum(); - } - }; -} +template <> +struct hash +{ + size_t operator()(const BOPTools_Set& theSet) const noexcept { return theSet.GetSum(); } +}; +} // namespace std #endif // _BOPTools_Set_HeaderFile diff --git a/opencascade/BRepAdaptor_Array1OfCurve.hxx b/opencascade/BRepAdaptor_Array1OfCurve.hxx index af19ab2bf..acdfc19e6 100644 --- a/opencascade/BRepAdaptor_Array1OfCurve.hxx +++ b/opencascade/BRepAdaptor_Array1OfCurve.hxx @@ -22,5 +22,4 @@ typedef NCollection_Array1 BRepAdaptor_Array1OfCurve; - #endif diff --git a/opencascade/BRepAdaptor_CompCurve.hxx b/opencascade/BRepAdaptor_CompCurve.hxx index adacaf582..a8006b256 100644 --- a/opencascade/BRepAdaptor_CompCurve.hxx +++ b/opencascade/BRepAdaptor_CompCurve.hxx @@ -50,163 +50,166 @@ DEFINE_STANDARD_HANDLE(BRepAdaptor_CompCurve, Adaptor3d_Curve) //! Warning: With this class of curve, C0 and C1 continuities //! are not assumed. So be careful with some algorithm! //! Please note that BRepAdaptor_CompCurve cannot be -//! periodic curve at all (even if it contains single +//! periodic curve at all (even if it contains single //! periodic edge). //! //! BRepAdaptor_CompCurve can only work on valid wires where all edges are //! connected to each other to make a chain. -class BRepAdaptor_CompCurve : public Adaptor3d_Curve +class BRepAdaptor_CompCurve : public Adaptor3d_Curve { DEFINE_STANDARD_RTTIEXT(BRepAdaptor_CompCurve, Adaptor3d_Curve) public: - //! Creates an undefined Curve with no Wire loaded. Standard_EXPORT BRepAdaptor_CompCurve(); - - Standard_EXPORT BRepAdaptor_CompCurve(const TopoDS_Wire& W, const Standard_Boolean KnotByCurvilinearAbcissa = Standard_False); - + + Standard_EXPORT BRepAdaptor_CompCurve( + const TopoDS_Wire& W, + const Standard_Boolean KnotByCurvilinearAbcissa = Standard_False); + //! Creates a Curve to access the geometry of edge //! . - Standard_EXPORT BRepAdaptor_CompCurve(const TopoDS_Wire& W, const Standard_Boolean KnotByCurvilinearAbcissa, const Standard_Real First, const Standard_Real Last, const Standard_Real Tol); - + Standard_EXPORT BRepAdaptor_CompCurve(const TopoDS_Wire& W, + const Standard_Boolean KnotByCurvilinearAbcissa, + const Standard_Real First, + const Standard_Real Last, + const Standard_Real Tol); + //! Shallow copy of adaptor Standard_EXPORT virtual Handle(Adaptor3d_Curve) ShallowCopy() const Standard_OVERRIDE; //! Sets the wire . - Standard_EXPORT void Initialize (const TopoDS_Wire& W, const Standard_Boolean KnotByCurvilinearAbcissa); - + Standard_EXPORT void Initialize(const TopoDS_Wire& W, + const Standard_Boolean KnotByCurvilinearAbcissa); + //! Sets wire and trimmed parameter. - Standard_EXPORT void Initialize (const TopoDS_Wire& W, const Standard_Boolean KnotByCurvilinearAbcissa, const Standard_Real First, const Standard_Real Last, const Standard_Real Tol); - + Standard_EXPORT void Initialize(const TopoDS_Wire& W, + const Standard_Boolean KnotByCurvilinearAbcissa, + const Standard_Real First, + const Standard_Real Last, + const Standard_Real Tol); + //! Returns the wire. Standard_EXPORT const TopoDS_Wire& Wire() const; - + //! returns an edge and one parameter on them //! corresponding to the parameter U. - Standard_EXPORT void Edge (const Standard_Real U, TopoDS_Edge& E, Standard_Real& UonE) const; - + Standard_EXPORT void Edge(const Standard_Real U, TopoDS_Edge& E, Standard_Real& UonE) const; + Standard_EXPORT Standard_Real FirstParameter() const Standard_OVERRIDE; - + Standard_EXPORT Standard_Real LastParameter() const Standard_OVERRIDE; - + Standard_EXPORT GeomAbs_Shape Continuity() const Standard_OVERRIDE; - + //! Returns the number of intervals for continuity //! . May be one if Continuity(me) >= - Standard_EXPORT Standard_Integer NbIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE; - + Standard_EXPORT Standard_Integer NbIntervals(const GeomAbs_Shape S) const Standard_OVERRIDE; + //! Stores in the parameters bounding the intervals //! of continuity . //! //! The array must provide enough room to accommodate //! for the parameters. i.e. T.Length() > NbIntervals() - Standard_EXPORT void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const Standard_OVERRIDE; - + Standard_EXPORT void Intervals(TColStd_Array1OfReal& T, + const GeomAbs_Shape S) const Standard_OVERRIDE; + //! Returns a curve equivalent of between //! parameters and . is used to //! test for 3d points confusion. //! If >= - Standard_EXPORT Handle(Adaptor3d_Curve) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE; - + Standard_EXPORT Handle(Adaptor3d_Curve) Trim(const Standard_Real First, + const Standard_Real Last, + const Standard_Real Tol) const Standard_OVERRIDE; + Standard_EXPORT Standard_Boolean IsClosed() const Standard_OVERRIDE; - + Standard_EXPORT Standard_Boolean IsPeriodic() const Standard_OVERRIDE; - + Standard_EXPORT Standard_Real Period() const Standard_OVERRIDE; - + //! Computes the point of parameter U on the curve - Standard_EXPORT gp_Pnt Value (const Standard_Real U) const Standard_OVERRIDE; - + Standard_EXPORT gp_Pnt Value(const Standard_Real U) const Standard_OVERRIDE; + //! Computes the point of parameter U. - Standard_EXPORT void D0 (const Standard_Real U, gp_Pnt& P) const Standard_OVERRIDE; - + Standard_EXPORT void D0(const Standard_Real U, gp_Pnt& P) const Standard_OVERRIDE; + //! Computes the point of parameter U on the curve //! with its first derivative. //! Raised if the continuity of the current interval //! is not C1. - Standard_EXPORT void D1 (const Standard_Real U, gp_Pnt& P, gp_Vec& V) const Standard_OVERRIDE; - + Standard_EXPORT void D1(const Standard_Real U, gp_Pnt& P, gp_Vec& V) const Standard_OVERRIDE; //! Returns the point P of parameter U, the first and second //! derivatives V1 and V2. //! Raised if the continuity of the current interval //! is not C2. - Standard_EXPORT void D2 (const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2) const Standard_OVERRIDE; - + Standard_EXPORT void D2(const Standard_Real U, + gp_Pnt& P, + gp_Vec& V1, + gp_Vec& V2) const Standard_OVERRIDE; //! Returns the point P of parameter U, the first, the second //! and the third derivative. //! Raised if the continuity of the current interval //! is not C3. - Standard_EXPORT void D3 (const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, gp_Vec& V3) const Standard_OVERRIDE; - + Standard_EXPORT void D3(const Standard_Real U, + gp_Pnt& P, + gp_Vec& V1, + gp_Vec& V2, + gp_Vec& V3) const Standard_OVERRIDE; //! The returned vector gives the value of the derivative for the //! order of derivation N. //! Raised if the continuity of the current interval //! is not CN. //! Raised if N < 1. - Standard_EXPORT gp_Vec DN (const Standard_Real U, const Standard_Integer N) const Standard_OVERRIDE; - + Standard_EXPORT gp_Vec DN(const Standard_Real U, + const Standard_Integer N) const Standard_OVERRIDE; + //! returns the parametric resolution - Standard_EXPORT Standard_Real Resolution (const Standard_Real R3d) const Standard_OVERRIDE; - + Standard_EXPORT Standard_Real Resolution(const Standard_Real R3d) const Standard_OVERRIDE; + Standard_EXPORT GeomAbs_CurveType GetType() const Standard_OVERRIDE; - + Standard_EXPORT gp_Lin Line() const Standard_OVERRIDE; - + Standard_EXPORT gp_Circ Circle() const Standard_OVERRIDE; - + Standard_EXPORT gp_Elips Ellipse() const Standard_OVERRIDE; - + Standard_EXPORT gp_Hypr Hyperbola() const Standard_OVERRIDE; - + Standard_EXPORT gp_Parab Parabola() const Standard_OVERRIDE; - + Standard_EXPORT Standard_Integer Degree() const Standard_OVERRIDE; - + Standard_EXPORT Standard_Boolean IsRational() const Standard_OVERRIDE; - + Standard_EXPORT Standard_Integer NbPoles() const Standard_OVERRIDE; - - Standard_EXPORT Standard_Integer NbKnots() const Standard_OVERRIDE; - - Standard_EXPORT Handle(Geom_BezierCurve) Bezier() const Standard_OVERRIDE; - - Standard_EXPORT Handle(Geom_BSplineCurve) BSpline() const Standard_OVERRIDE; + Standard_EXPORT Standard_Integer NbKnots() const Standard_OVERRIDE; + Standard_EXPORT Handle(Geom_BezierCurve) Bezier() const Standard_OVERRIDE; + Standard_EXPORT Handle(Geom_BSplineCurve) BSpline() const Standard_OVERRIDE; protected: - - - - - private: + Standard_EXPORT void Prepare(Standard_Real& W, Standard_Real& D, Standard_Integer& ind) const; - - Standard_EXPORT void Prepare (Standard_Real& W, Standard_Real& D, Standard_Integer& ind) const; - - Standard_EXPORT void InvPrepare (const Standard_Integer ind, Standard_Real& F, Standard_Real& D) const; - + Standard_EXPORT void InvPrepare(const Standard_Integer ind, + Standard_Real& F, + Standard_Real& D) const; - TopoDS_Wire myWire; - Standard_Real TFirst; - Standard_Real TLast; - Standard_Real PTol; + TopoDS_Wire myWire; + Standard_Real TFirst; + Standard_Real TLast; + Standard_Real PTol; Handle(BRepAdaptor_HArray1OfCurve) myCurves; - Handle(TColStd_HArray1OfReal) myKnots; - Standard_Integer CurIndex; - Standard_Boolean Forward; - Standard_Boolean IsbyAC; + Handle(TColStd_HArray1OfReal) myKnots; + Standard_Integer CurIndex; + Standard_Boolean Forward; + Standard_Boolean IsbyAC; }; - - - - - - #endif // _BRepAdaptor_CompCurve_HeaderFile diff --git a/opencascade/BRepAdaptor_Curve.hxx b/opencascade/BRepAdaptor_Curve.hxx index 642ebc3ae..663dff395 100644 --- a/opencascade/BRepAdaptor_Curve.hxx +++ b/opencascade/BRepAdaptor_Curve.hxx @@ -55,18 +55,17 @@ DEFINE_STANDARD_HANDLE(BRepAdaptor_Curve, Adaptor3d_Curve) //! surface is used. It is possible to enforce using a //! curve on surface by creating or initialising with //! an Edge and a Face. -class BRepAdaptor_Curve : public Adaptor3d_Curve +class BRepAdaptor_Curve : public Adaptor3d_Curve { DEFINE_STANDARD_RTTIEXT(BRepAdaptor_Curve, Adaptor3d_Curve) public: - //! Creates an undefined Curve with no Edge loaded. Standard_EXPORT BRepAdaptor_Curve(); - + //! Creates a Curve to access the geometry of edge //! . Standard_EXPORT BRepAdaptor_Curve(const TopoDS_Edge& E); - + //! Creates a Curve to access the geometry of edge //! . The geometry will be computed using the //! parametric curve of on the face . An Error @@ -82,130 +81,136 @@ public: //! Sets the Curve to access the geometry of //! edge . - Standard_EXPORT void Initialize (const TopoDS_Edge& E); - + Standard_EXPORT void Initialize(const TopoDS_Edge& E); + //! Sets the Curve to access the geometry of //! edge . The geometry will be computed using the //! parametric curve of on the face . An Error //! is raised if the edge does not have a pcurve on //! the face. - Standard_EXPORT void Initialize (const TopoDS_Edge& E, const TopoDS_Face& F); - + Standard_EXPORT void Initialize(const TopoDS_Edge& E, const TopoDS_Face& F); + //! Returns the coordinate system of the curve. Standard_EXPORT const gp_Trsf& Trsf() const; - + //! Returns True if the edge geometry is computed from //! a 3D curve. Standard_EXPORT Standard_Boolean Is3DCurve() const; - + //! Returns True if the edge geometry is computed from //! a pcurve on a surface. Standard_EXPORT Standard_Boolean IsCurveOnSurface() const; - + //! Returns the Curve of the edge. Standard_EXPORT const GeomAdaptor_Curve& Curve() const; - + //! Returns the CurveOnSurface of the edge. Standard_EXPORT const Adaptor3d_CurveOnSurface& CurveOnSurface() const; - + //! Returns the edge. Standard_EXPORT const TopoDS_Edge& Edge() const; - + //! Returns the edge tolerance. Standard_EXPORT Standard_Real Tolerance() const; - + Standard_EXPORT Standard_Real FirstParameter() const Standard_OVERRIDE; - + Standard_EXPORT Standard_Real LastParameter() const Standard_OVERRIDE; - + Standard_EXPORT GeomAbs_Shape Continuity() const Standard_OVERRIDE; - + //! Returns the number of intervals for continuity //! . May be one if Continuity(me) >= - Standard_EXPORT Standard_Integer NbIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE; - + Standard_EXPORT Standard_Integer NbIntervals(const GeomAbs_Shape S) const Standard_OVERRIDE; + //! Stores in the parameters bounding the intervals //! of continuity . //! //! The array must provide enough room to accommodate //! for the parameters. i.e. T.Length() > NbIntervals() - Standard_EXPORT void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const Standard_OVERRIDE; - + Standard_EXPORT void Intervals(TColStd_Array1OfReal& T, + const GeomAbs_Shape S) const Standard_OVERRIDE; + //! Returns a curve equivalent of between //! parameters and . is used to //! test for 3d points confusion. //! If >= - Standard_EXPORT Handle(Adaptor3d_Curve) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE; - + Standard_EXPORT Handle(Adaptor3d_Curve) Trim(const Standard_Real First, + const Standard_Real Last, + const Standard_Real Tol) const Standard_OVERRIDE; + Standard_EXPORT Standard_Boolean IsClosed() const Standard_OVERRIDE; - + Standard_EXPORT Standard_Boolean IsPeriodic() const Standard_OVERRIDE; - + Standard_EXPORT Standard_Real Period() const Standard_OVERRIDE; - + //! Computes the point of parameter U on the curve - Standard_EXPORT gp_Pnt Value (const Standard_Real U) const Standard_OVERRIDE; - + Standard_EXPORT gp_Pnt Value(const Standard_Real U) const Standard_OVERRIDE; + //! Computes the point of parameter U. - Standard_EXPORT void D0 (const Standard_Real U, gp_Pnt& P) const Standard_OVERRIDE; - + Standard_EXPORT void D0(const Standard_Real U, gp_Pnt& P) const Standard_OVERRIDE; + //! Computes the point of parameter U on the curve //! with its first derivative. //! Raised if the continuity of the current interval //! is not C1. - Standard_EXPORT void D1 (const Standard_Real U, gp_Pnt& P, gp_Vec& V) const Standard_OVERRIDE; - + Standard_EXPORT void D1(const Standard_Real U, gp_Pnt& P, gp_Vec& V) const Standard_OVERRIDE; //! Returns the point P of parameter U, the first and second //! derivatives V1 and V2. //! Raised if the continuity of the current interval //! is not C2. - Standard_EXPORT void D2 (const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2) const Standard_OVERRIDE; - + Standard_EXPORT void D2(const Standard_Real U, + gp_Pnt& P, + gp_Vec& V1, + gp_Vec& V2) const Standard_OVERRIDE; //! Returns the point P of parameter U, the first, the second //! and the third derivative. //! Raised if the continuity of the current interval //! is not C3. - Standard_EXPORT void D3 (const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, gp_Vec& V3) const Standard_OVERRIDE; - + Standard_EXPORT void D3(const Standard_Real U, + gp_Pnt& P, + gp_Vec& V1, + gp_Vec& V2, + gp_Vec& V3) const Standard_OVERRIDE; //! The returned vector gives the value of the derivative for the //! order of derivation N. //! Raised if the continuity of the current interval //! is not CN. //! Raised if N < 1. - Standard_EXPORT gp_Vec DN (const Standard_Real U, const Standard_Integer N) const Standard_OVERRIDE; - + Standard_EXPORT gp_Vec DN(const Standard_Real U, + const Standard_Integer N) const Standard_OVERRIDE; + //! returns the parametric resolution - Standard_EXPORT Standard_Real Resolution (const Standard_Real R3d) const Standard_OVERRIDE; - + Standard_EXPORT Standard_Real Resolution(const Standard_Real R3d) const Standard_OVERRIDE; + Standard_EXPORT GeomAbs_CurveType GetType() const Standard_OVERRIDE; - + Standard_EXPORT gp_Lin Line() const Standard_OVERRIDE; - + Standard_EXPORT gp_Circ Circle() const Standard_OVERRIDE; - + Standard_EXPORT gp_Elips Ellipse() const Standard_OVERRIDE; - + Standard_EXPORT gp_Hypr Hyperbola() const Standard_OVERRIDE; - + Standard_EXPORT gp_Parab Parabola() const Standard_OVERRIDE; - + Standard_EXPORT Standard_Integer Degree() const Standard_OVERRIDE; - + Standard_EXPORT Standard_Boolean IsRational() const Standard_OVERRIDE; - + Standard_EXPORT Standard_Integer NbPoles() const Standard_OVERRIDE; - + Standard_EXPORT Standard_Integer NbKnots() const Standard_OVERRIDE; - //! Warning: //! This will make a copy of the Bezier Curve since it applies to it myTsrf. //! Be careful when using this method. Standard_EXPORT Handle(Geom_BezierCurve) Bezier() const Standard_OVERRIDE; - //! Warning: //! This will make a copy of the BSpline Curve since it applies to it myTsrf. @@ -215,12 +220,10 @@ public: Standard_EXPORT Handle(Geom_OffsetCurve) OffsetCurve() const Standard_OVERRIDE; private: - - gp_Trsf myTrsf; - GeomAdaptor_Curve myCurve; + gp_Trsf myTrsf; + GeomAdaptor_Curve myCurve; Handle(Adaptor3d_CurveOnSurface) myConSurf; - TopoDS_Edge myEdge; - + TopoDS_Edge myEdge; }; #endif // _BRepAdaptor_Curve_HeaderFile diff --git a/opencascade/BRepAdaptor_Curve2d.hxx b/opencascade/BRepAdaptor_Curve2d.hxx index 28e75f7ac..3cd0a0a2b 100644 --- a/opencascade/BRepAdaptor_Curve2d.hxx +++ b/opencascade/BRepAdaptor_Curve2d.hxx @@ -25,7 +25,6 @@ #include #include - //! The Curve2d from BRepAdaptor allows to use an Edge //! on a Face like a 2d curve. (curve in the //! parametric space). @@ -36,34 +35,31 @@ //! It is created or initialized with a Face and an //! Edge. The methods are inherited from Curve from //! Geom2dAdaptor. -class BRepAdaptor_Curve2d : public Geom2dAdaptor_Curve +class BRepAdaptor_Curve2d : public Geom2dAdaptor_Curve { DEFINE_STANDARD_RTTIEXT(BRepAdaptor_Curve2d, Geom2dAdaptor_Curve) public: - //! Creates an uninitialized curve2d. Standard_EXPORT BRepAdaptor_Curve2d(); - + //! Creates with the pcurve of on . Standard_EXPORT BRepAdaptor_Curve2d(const TopoDS_Edge& E, const TopoDS_Face& F); //! Shallow copy of adaptor Standard_EXPORT virtual Handle(Adaptor2d_Curve2d) ShallowCopy() const Standard_OVERRIDE; - + //! Initialize with the pcurve of on . - Standard_EXPORT void Initialize (const TopoDS_Edge& E, const TopoDS_Face& F); - + Standard_EXPORT void Initialize(const TopoDS_Edge& E, const TopoDS_Face& F); + //! Returns the Edge. Standard_EXPORT const TopoDS_Edge& Edge() const; - + //! Returns the Face. Standard_EXPORT const TopoDS_Face& Face() const; private: - TopoDS_Edge myEdge; TopoDS_Face myFace; - }; DEFINE_STANDARD_HANDLE(BRepAdaptor_Curve2d, Geom2dAdaptor_Curve) diff --git a/opencascade/BRepAdaptor_HArray1OfCurve.hxx b/opencascade/BRepAdaptor_HArray1OfCurve.hxx index ee026c327..28110b2de 100644 --- a/opencascade/BRepAdaptor_HArray1OfCurve.hxx +++ b/opencascade/BRepAdaptor_HArray1OfCurve.hxx @@ -22,5 +22,4 @@ DEFINE_HARRAY1(BRepAdaptor_HArray1OfCurve, BRepAdaptor_Array1OfCurve) - #endif diff --git a/opencascade/BRepAdaptor_Surface.hxx b/opencascade/BRepAdaptor_Surface.hxx index 9ac8e979d..2c7dec88d 100644 --- a/opencascade/BRepAdaptor_Surface.hxx +++ b/opencascade/BRepAdaptor_Surface.hxx @@ -50,83 +50,102 @@ DEFINE_STANDARD_HANDLE(BRepAdaptor_Surface, Adaptor3d_Surface) //! The u,v parameter range is the minmax value for //! the restriction, unless the flag restriction is //! set to false. -class BRepAdaptor_Surface : public Adaptor3d_Surface +class BRepAdaptor_Surface : public Adaptor3d_Surface { DEFINE_STANDARD_RTTIEXT(BRepAdaptor_Surface, Adaptor3d_Surface) public: - //! Creates an undefined surface with no face loaded. Standard_EXPORT BRepAdaptor_Surface(); - + //! Creates a surface to access the geometry of . //! If is true the parameter range is //! the parameter range in the UV space of the //! restriction. - Standard_EXPORT BRepAdaptor_Surface(const TopoDS_Face& F, const Standard_Boolean R = Standard_True); + Standard_EXPORT BRepAdaptor_Surface(const TopoDS_Face& F, + const Standard_Boolean R = Standard_True); //! Shallow copy of adaptor Standard_EXPORT virtual Handle(Adaptor3d_Surface) ShallowCopy() const Standard_OVERRIDE; - + //! Sets the surface to the geometry of . - Standard_EXPORT void Initialize (const TopoDS_Face& F, const Standard_Boolean Restriction = Standard_True); - + Standard_EXPORT void Initialize(const TopoDS_Face& F, + const Standard_Boolean Restriction = Standard_True); + //! Returns the surface. Standard_EXPORT const GeomAdaptor_Surface& Surface() const; - + //! Returns the surface. Standard_EXPORT GeomAdaptor_Surface& ChangeSurface(); - + //! Returns the surface coordinate system. Standard_EXPORT const gp_Trsf& Trsf() const; - + //! Returns the face. Standard_EXPORT const TopoDS_Face& Face() const; - + //! Returns the face tolerance. Standard_EXPORT Standard_Real Tolerance() const; - virtual Standard_Real FirstUParameter() const Standard_OVERRIDE { return mySurf.FirstUParameter(); } + virtual Standard_Real FirstUParameter() const Standard_OVERRIDE + { + return mySurf.FirstUParameter(); + } virtual Standard_Real LastUParameter() const Standard_OVERRIDE { return mySurf.LastUParameter(); } - virtual Standard_Real FirstVParameter() const Standard_OVERRIDE { return mySurf.FirstVParameter(); } + virtual Standard_Real FirstVParameter() const Standard_OVERRIDE + { + return mySurf.FirstVParameter(); + } virtual Standard_Real LastVParameter() const Standard_OVERRIDE { return mySurf.LastVParameter(); } virtual GeomAbs_Shape UContinuity() const Standard_OVERRIDE { return mySurf.UContinuity(); } virtual GeomAbs_Shape VContinuity() const Standard_OVERRIDE { return mySurf.VContinuity(); } - + //! If necessary, breaks the surface in U intervals of //! continuity . And returns the number of //! intervals. - virtual Standard_Integer NbUIntervals (const GeomAbs_Shape theSh) const Standard_OVERRIDE { return mySurf.NbUIntervals (theSh); } + virtual Standard_Integer NbUIntervals(const GeomAbs_Shape theSh) const Standard_OVERRIDE + { + return mySurf.NbUIntervals(theSh); + } //! If necessary, breaks the surface in V intervals of //! continuity . And returns the number of //! intervals. - virtual Standard_Integer NbVIntervals (const GeomAbs_Shape theSh) const Standard_OVERRIDE { return mySurf.NbVIntervals (theSh); } - + virtual Standard_Integer NbVIntervals(const GeomAbs_Shape theSh) const Standard_OVERRIDE + { + return mySurf.NbVIntervals(theSh); + } + //! Returns the intervals with the requested continuity //! in the U direction. - Standard_EXPORT void UIntervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const Standard_OVERRIDE; - + Standard_EXPORT void UIntervals(TColStd_Array1OfReal& T, + const GeomAbs_Shape S) const Standard_OVERRIDE; + //! Returns the intervals with the requested continuity //! in the V direction. - Standard_EXPORT void VIntervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const Standard_OVERRIDE; - + Standard_EXPORT void VIntervals(TColStd_Array1OfReal& T, + const GeomAbs_Shape S) const Standard_OVERRIDE; + //! Returns a surface trimmed in the U direction //! equivalent of between //! parameters and . is used to //! test for 3d points confusion. //! If >= - Standard_EXPORT Handle(Adaptor3d_Surface) UTrim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE; - + Standard_EXPORT Handle(Adaptor3d_Surface) UTrim(const Standard_Real First, + const Standard_Real Last, + const Standard_Real Tol) const Standard_OVERRIDE; + //! Returns a surface trimmed in the V direction between //! parameters and . is used to //! test for 3d points confusion. //! If >= - Standard_EXPORT Handle(Adaptor3d_Surface) VTrim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE; + Standard_EXPORT Handle(Adaptor3d_Surface) VTrim(const Standard_Real First, + const Standard_Real Last, + const Standard_Real Tol) const Standard_OVERRIDE; virtual Standard_Boolean IsUClosed() const Standard_OVERRIDE { return mySurf.IsUClosed(); } @@ -142,60 +161,94 @@ public: //! Computes the point of parameters U,V on the surface. //! Tip: use GeomLib::NormEstim() to calculate surface normal at specified (U, V) point. - Standard_EXPORT gp_Pnt Value (const Standard_Real U, const Standard_Real V) const Standard_OVERRIDE; + Standard_EXPORT gp_Pnt Value(const Standard_Real U, + const Standard_Real V) const Standard_OVERRIDE; //! Computes the point of parameters U,V on the surface. - Standard_EXPORT void D0 (const Standard_Real U, const Standard_Real V, gp_Pnt& P) const Standard_OVERRIDE; + Standard_EXPORT void D0(const Standard_Real U, + const Standard_Real V, + gp_Pnt& P) const Standard_OVERRIDE; //! Computes the point and the first derivatives on the surface. //! Raised if the continuity of the current intervals is not C1. //! //! Tip: use GeomLib::NormEstim() to calculate surface normal at specified (U, V) point. - Standard_EXPORT void D1 (const Standard_Real U, const Standard_Real V, gp_Pnt& P, gp_Vec& D1U, gp_Vec& D1V) const Standard_OVERRIDE; + Standard_EXPORT void D1(const Standard_Real U, + const Standard_Real V, + gp_Pnt& P, + gp_Vec& D1U, + gp_Vec& D1V) const Standard_OVERRIDE; //! Computes the point, the first and second //! derivatives on the surface. //! Raised if the continuity of the current //! intervals is not C2. - Standard_EXPORT void D2 (const Standard_Real U, const Standard_Real V, gp_Pnt& P, gp_Vec& D1U, gp_Vec& D1V, gp_Vec& D2U, gp_Vec& D2V, gp_Vec& D2UV) const Standard_OVERRIDE; - + Standard_EXPORT void D2(const Standard_Real U, + const Standard_Real V, + gp_Pnt& P, + gp_Vec& D1U, + gp_Vec& D1V, + gp_Vec& D2U, + gp_Vec& D2V, + gp_Vec& D2UV) const Standard_OVERRIDE; + //! Computes the point, the first, second and third //! derivatives on the surface. //! Raised if the continuity of the current //! intervals is not C3. - Standard_EXPORT void D3 (const Standard_Real U, const Standard_Real V, gp_Pnt& P, gp_Vec& D1U, gp_Vec& D1V, gp_Vec& D2U, gp_Vec& D2V, gp_Vec& D2UV, gp_Vec& D3U, gp_Vec& D3V, gp_Vec& D3UUV, gp_Vec& D3UVV) const Standard_OVERRIDE; - + Standard_EXPORT void D3(const Standard_Real U, + const Standard_Real V, + gp_Pnt& P, + gp_Vec& D1U, + gp_Vec& D1V, + gp_Vec& D2U, + gp_Vec& D2V, + gp_Vec& D2UV, + gp_Vec& D3U, + gp_Vec& D3V, + gp_Vec& D3UUV, + gp_Vec& D3UVV) const Standard_OVERRIDE; + //! Computes the derivative of order Nu in the direction //! U and Nv in the direction V at the point P(U, V). //! Raised if the current U interval is not not CNu //! and the current V interval is not CNv. //! Raised if Nu + Nv < 1 or Nu < 0 or Nv < 0. - Standard_EXPORT gp_Vec DN (const Standard_Real U, const Standard_Real V, const Standard_Integer Nu, const Standard_Integer Nv) const Standard_OVERRIDE; - + Standard_EXPORT gp_Vec DN(const Standard_Real U, + const Standard_Real V, + const Standard_Integer Nu, + const Standard_Integer Nv) const Standard_OVERRIDE; + //! Returns the parametric U resolution corresponding //! to the real space resolution . - virtual Standard_Real UResolution (const Standard_Real theR3d) const Standard_OVERRIDE { return mySurf.UResolution (theR3d); } - + virtual Standard_Real UResolution(const Standard_Real theR3d) const Standard_OVERRIDE + { + return mySurf.UResolution(theR3d); + } + //! Returns the parametric V resolution corresponding //! to the real space resolution . - virtual Standard_Real VResolution (const Standard_Real theR3d) const Standard_OVERRIDE { return mySurf.VResolution (theR3d); } + virtual Standard_Real VResolution(const Standard_Real theR3d) const Standard_OVERRIDE + { + return mySurf.VResolution(theR3d); + } //! Returns the type of the surface : Plane, Cylinder, //! Cone, Sphere, Torus, BezierSurface, //! BSplineSurface, SurfaceOfRevolution, //! SurfaceOfExtrusion, OtherSurface virtual GeomAbs_SurfaceType GetType() const Standard_OVERRIDE { return mySurf.GetType(); } - + Standard_EXPORT gp_Pln Plane() const Standard_OVERRIDE; - + Standard_EXPORT gp_Cylinder Cylinder() const Standard_OVERRIDE; - + Standard_EXPORT gp_Cone Cone() const Standard_OVERRIDE; - + Standard_EXPORT gp_Sphere Sphere() const Standard_OVERRIDE; - + Standard_EXPORT gp_Torus Torus() const Standard_OVERRIDE; - + virtual Standard_Integer UDegree() const Standard_OVERRIDE { return mySurf.UDegree(); } virtual Standard_Integer NbUPoles() const Standard_OVERRIDE { return mySurf.NbUPoles(); } @@ -219,27 +272,25 @@ public: //! to it the myTsrf transformation //! Be Careful when using this method Standard_EXPORT Handle(Geom_BSplineSurface) BSpline() const Standard_OVERRIDE; - + Standard_EXPORT gp_Ax1 AxeOfRevolution() const Standard_OVERRIDE; - + Standard_EXPORT gp_Dir Direction() const Standard_OVERRIDE; - + //! only for SurfaceOfExtrusion and SurfaceOfRevolution //! Warning: this will make a copy of the underlying curve //! since it applies to it the transformation //! myTrsf. Be careful when using this method. Standard_EXPORT Handle(Adaptor3d_Curve) BasisCurve() const Standard_OVERRIDE; - + Standard_EXPORT Handle(Adaptor3d_Surface) BasisSurface() const Standard_OVERRIDE; - + Standard_EXPORT Standard_Real OffsetValue() const Standard_OVERRIDE; private: - GeomAdaptor_Surface mySurf; - gp_Trsf myTrsf; - TopoDS_Face myFace; - + gp_Trsf myTrsf; + TopoDS_Face myFace; }; #endif // _BRepAdaptor_Surface_HeaderFile diff --git a/opencascade/BRepAlgo.hxx b/opencascade/BRepAlgo.hxx index 3e915d02e..77ce75b7b 100644 --- a/opencascade/BRepAlgo.hxx +++ b/opencascade/BRepAlgo.hxx @@ -24,26 +24,24 @@ class TopoDS_Edge; class TopoDS_Face; class TopoDS_Shape; - //! The BRepAlgo class provides the following tools for: //! - Checking validity of the shape; //! - Concatenation of the edges of the wire. -class BRepAlgo +class BRepAlgo { public: - //! this method makes a wire whose edges are C1 from //! a Wire whose edges could be G1. It removes a vertex //! between G1 edges. //! Option can be G1 or C1. - Standard_EXPORT static TopoDS_Wire ConcatenateWire (const TopoDS_Wire& Wire, - const GeomAbs_Shape Option, - const Standard_Real AngularTolerance = 1.0e-4); - + Standard_EXPORT static TopoDS_Wire ConcatenateWire(const TopoDS_Wire& Wire, + const GeomAbs_Shape Option, + const Standard_Real AngularTolerance = 1.0e-4); + //! this method makes an edge from a wire. //! Junction points between edges of wire may be sharp, //! resulting curve of the resulting edge may be C0. - Standard_EXPORT static TopoDS_Edge ConcatenateWireC0 (const TopoDS_Wire& Wire); + Standard_EXPORT static TopoDS_Edge ConcatenateWireC0(const TopoDS_Wire& Wire); //! Method of wire conversion, calls BRepAlgo_Approx internally. //! @param theWire @@ -56,21 +54,19 @@ public: //! The new TopoDS_Wire object consisting of edges each representing an arc //! of circle or a linear segment. The accuracy of conversion is defined //! as the maximal tolerance of edges in theWire. - static Standard_EXPORT TopoDS_Wire ConvertWire - (const TopoDS_Wire& theWire, - const Standard_Real theAngleTolerance, - const TopoDS_Face& theFace); + static Standard_EXPORT TopoDS_Wire ConvertWire(const TopoDS_Wire& theWire, + const Standard_Real theAngleTolerance, + const TopoDS_Face& theFace); //! Method of face conversion. The API corresponds to the method ConvertWire. //! This is a shortcut for calling ConvertWire() for each wire in theFace. - static Standard_EXPORT TopoDS_Face ConvertFace - (const TopoDS_Face& theFace, - const Standard_Real theAngleTolerance); - + static Standard_EXPORT TopoDS_Face ConvertFace(const TopoDS_Face& theFace, + const Standard_Real theAngleTolerance); + //! Checks if the shape is "correct". If not, returns //! , else returns . - Standard_EXPORT static Standard_Boolean IsValid (const TopoDS_Shape& S); - + Standard_EXPORT static Standard_Boolean IsValid(const TopoDS_Shape& S); + //! Checks if the Generated and Modified Faces from //! the shapes in the shape are //! "correct". The args may be empty, then all faces @@ -79,17 +75,17 @@ public: //! If is False the geometry of new //! vertices and edges are not verified and the //! auto-intersection of new wires are not searched. - Standard_EXPORT static Standard_Boolean IsValid (const TopTools_ListOfShape& theArgs, - const TopoDS_Shape& theResult, - const Standard_Boolean closedSolid = Standard_False, - const Standard_Boolean GeomCtrl = Standard_True); - + Standard_EXPORT static Standard_Boolean IsValid( + const TopTools_ListOfShape& theArgs, + const TopoDS_Shape& theResult, + const Standard_Boolean closedSolid = Standard_False, + const Standard_Boolean GeomCtrl = Standard_True); + //! Checks if the shape is "correct". //! If not, returns FALSE, else returns TRUE. //! This method differs from the previous one in the fact that no geometric controls //! (intersection of wires, pcurve validity) are performed. - Standard_EXPORT static Standard_Boolean IsTopologicallyValid (const TopoDS_Shape& S); - + Standard_EXPORT static Standard_Boolean IsTopologicallyValid(const TopoDS_Shape& S); }; #endif // _BRepAlgo_HeaderFile diff --git a/opencascade/BRepAlgoAPI_Algo.hxx b/opencascade/BRepAlgoAPI_Algo.hxx index eab8184f9..0e747260d 100644 --- a/opencascade/BRepAlgoAPI_Algo.hxx +++ b/opencascade/BRepAlgoAPI_Algo.hxx @@ -27,11 +27,9 @@ class TopoDS_Shape; //! Provides the root interface for the API algorithms -class BRepAlgoAPI_Algo : public BRepBuilderAPI_MakeShape, - protected BOPAlgo_Options +class BRepAlgoAPI_Algo : public BRepBuilderAPI_MakeShape, protected BOPAlgo_Options { public: - DEFINE_STANDARD_ALLOC //! Returns a shape built by the shape construction algorithm. @@ -41,22 +39,21 @@ public: // Provide access to methods of protected base class BOPAlgo_Options // (inherited as protected to avoid problems with SWIG wrapper) using BOPAlgo_Options::Clear; - using BOPAlgo_Options::SetRunParallel; - using BOPAlgo_Options::RunParallel; - using BOPAlgo_Options::SetFuzzyValue; - using BOPAlgo_Options::FuzzyValue; - using BOPAlgo_Options::HasErrors; - using BOPAlgo_Options::HasWarnings; - using BOPAlgo_Options::HasError; - using BOPAlgo_Options::HasWarning; + using BOPAlgo_Options::ClearWarnings; using BOPAlgo_Options::DumpErrors; using BOPAlgo_Options::DumpWarnings; - using BOPAlgo_Options::ClearWarnings; + using BOPAlgo_Options::FuzzyValue; using BOPAlgo_Options::GetReport; + using BOPAlgo_Options::HasError; + using BOPAlgo_Options::HasErrors; + using BOPAlgo_Options::HasWarning; + using BOPAlgo_Options::HasWarnings; + using BOPAlgo_Options::RunParallel; + using BOPAlgo_Options::SetFuzzyValue; + using BOPAlgo_Options::SetRunParallel; using BOPAlgo_Options::SetUseOBB; protected: - //! Empty constructor Standard_EXPORT BRepAlgoAPI_Algo(); @@ -67,7 +64,6 @@ protected: Standard_EXPORT BRepAlgoAPI_Algo(const Handle(NCollection_BaseAllocator)& theAllocator); private: - }; #endif // _BRepAlgoAPI_Algo_HeaderFile diff --git a/opencascade/BRepAlgoAPI_BooleanOperation.hxx b/opencascade/BRepAlgoAPI_BooleanOperation.hxx index 7ab0800f5..b40170fc2 100644 --- a/opencascade/BRepAlgoAPI_BooleanOperation.hxx +++ b/opencascade/BRepAlgoAPI_BooleanOperation.hxx @@ -48,93 +48,63 @@ class TopoDS_Shape; //! Additionally to the errors of the base class the algorithm returns //! the following Errors:
//! - *BOPAlgo_AlertBOPNotSet* - in case the type of Boolean Operation is not set.
-class BRepAlgoAPI_BooleanOperation : public BRepAlgoAPI_BuilderAlgo +class BRepAlgoAPI_BooleanOperation : public BRepAlgoAPI_BuilderAlgo { public: - DEFINE_STANDARD_ALLOC public: //! @name Constructors - //! Empty constructor Standard_EXPORT BRepAlgoAPI_BooleanOperation(); //! Constructor with precomputed intersections of arguments. Standard_EXPORT BRepAlgoAPI_BooleanOperation(const BOPAlgo_PaveFiller& thePF); - public: //! @name Setting/getting arguments - //! Returns the first argument involved in this Boolean operation. //! Obsolete - const TopoDS_Shape& Shape1() const - { - return myArguments.First(); - } + const TopoDS_Shape& Shape1() const { return myArguments.First(); } //! Returns the second argument involved in this Boolean operation. //! Obsolete - const TopoDS_Shape& Shape2() const - { - return myTools.First(); - } + const TopoDS_Shape& Shape2() const { return myTools.First(); } //! Sets the Tool arguments - void SetTools(const TopTools_ListOfShape& theLS) - { - myTools = theLS; - } + void SetTools(const TopTools_ListOfShape& theLS) { myTools = theLS; } //! Returns the Tools arguments - const TopTools_ListOfShape& Tools() const - { - return myTools; - } - + const TopTools_ListOfShape& Tools() const { return myTools; } public: //! @name Setting/Getting the type of Boolean operation - //! Sets the type of Boolean operation - void SetOperation(const BOPAlgo_Operation theBOP) - { - myOperation = theBOP; - } + void SetOperation(const BOPAlgo_Operation theBOP) { myOperation = theBOP; } //! Returns the type of Boolean Operation - BOPAlgo_Operation Operation() const - { - return myOperation; - } - + BOPAlgo_Operation Operation() const { return myOperation; } public: //! @name Performing the operation - //! Performs the Boolean operation. - Standard_EXPORT virtual void Build(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; - + Standard_EXPORT virtual void Build( + const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; protected: //! @name Constructors - //! Constructor to perform Boolean operation on only two arguments. //! Obsolete - Standard_EXPORT BRepAlgoAPI_BooleanOperation(const TopoDS_Shape& theS1, - const TopoDS_Shape& theS2, + Standard_EXPORT BRepAlgoAPI_BooleanOperation(const TopoDS_Shape& theS1, + const TopoDS_Shape& theS2, const BOPAlgo_Operation theOperation); //! Constructor to perform Boolean operation on only two arguments //! with precomputed intersection results. //! Obsolete - Standard_EXPORT BRepAlgoAPI_BooleanOperation(const TopoDS_Shape& theS1, - const TopoDS_Shape& theS2, + Standard_EXPORT BRepAlgoAPI_BooleanOperation(const TopoDS_Shape& theS1, + const TopoDS_Shape& theS2, const BOPAlgo_PaveFiller& thePF, - const BOPAlgo_Operation theOperation); - - -protected: //! @name Fields - - TopTools_ListOfShape myTools; //!< Tool arguments of operation - BOPAlgo_Operation myOperation; //!< Type of Boolean Operation + const BOPAlgo_Operation theOperation); +protected: //! @name Fields + TopTools_ListOfShape myTools; //!< Tool arguments of operation + BOPAlgo_Operation myOperation; //!< Type of Boolean Operation }; #endif // _BRepAlgoAPI_BooleanOperation_HeaderFile diff --git a/opencascade/BRepAlgoAPI_BuilderAlgo.hxx b/opencascade/BRepAlgoAPI_BuilderAlgo.hxx index acf9d963e..abc56d6fd 100644 --- a/opencascade/BRepAlgoAPI_BuilderAlgo.hxx +++ b/opencascade/BRepAlgoAPI_BuilderAlgo.hxx @@ -38,14 +38,15 @@ //! on the special cases, in which some sub-shapes are coinciding. //! - *Disabling the check for inverted solids* - Disables/Enables the check of the input solids //! for inverted status (holes in the space). The default value is TRUE, -//! i.e. the check is performed. Setting this flag to FALSE for inverted solids, -//! most likely will lead to incorrect results. +//! i.e. the check is performed. Setting this flag to FALSE for inverted +//! solids, most likely will lead to incorrect results. //! - *Disabling history collection* - allows disabling the collection of the history //! of shapes modifications during the operation. //! //! It returns the following Error statuses:
//! - 0 - in case of success;
-//! - *BOPAlgo_AlertTooFewArguments* - in case there are no enough arguments to perform the operation;
+//! - *BOPAlgo_AlertTooFewArguments* - in case there are no enough arguments to perform the +//! operation;
//! - *BOPAlgo_AlertIntersectionFailed* - in case the intersection of the arguments has failed;
//! - *BOPAlgo_AlertBuilderFailed* - in case building of the result shape has failed.
//! @@ -56,15 +57,12 @@ //! of the tangential edges and faces. It is performed by the method *SimplifyResult*. //! See description of this method for more details. //! -class BRepAlgoAPI_BuilderAlgo : public BRepAlgoAPI_Algo +class BRepAlgoAPI_BuilderAlgo : public BRepAlgoAPI_Algo { public: - DEFINE_STANDARD_ALLOC - public: //! @name Constructors - //! Empty constructor Standard_EXPORT BRepAlgoAPI_BuilderAlgo(); Standard_EXPORT virtual ~BRepAlgoAPI_BuilderAlgo(); @@ -72,76 +70,45 @@ public: //! @name Constructors //! Constructor with prepared Filler object Standard_EXPORT BRepAlgoAPI_BuilderAlgo(const BOPAlgo_PaveFiller& thePF); - public: //! @name Setting/Getting data for the algorithm - //! Sets the arguments - void SetArguments (const TopTools_ListOfShape& theLS) - { - myArguments = theLS; - } + void SetArguments(const TopTools_ListOfShape& theLS) { myArguments = theLS; } //! Gets the arguments - const TopTools_ListOfShape& Arguments() const - { - return myArguments; - } - + const TopTools_ListOfShape& Arguments() const { return myArguments; } public: //! @name Setting options - //! Sets the flag that defines the mode of treatment. //! In non-destructive mode the argument shapes are not modified. Instead //! a copy of a sub-shape is created in the result if it is needed to be updated. - void SetNonDestructive(const Standard_Boolean theFlag) - { - myNonDestructive = theFlag; - } + void SetNonDestructive(const Standard_Boolean theFlag) { myNonDestructive = theFlag; } //! Returns the flag that defines the mode of treatment. //! In non-destructive mode the argument shapes are not modified. Instead //! a copy of a sub-shape is created in the result if it is needed to be updated. - Standard_Boolean NonDestructive() const - { - return myNonDestructive; - } + Standard_Boolean NonDestructive() const { return myNonDestructive; } //! Sets the glue option for the algorithm, //! which allows increasing performance of the intersection //! of the input shapes. - void SetGlue(const BOPAlgo_GlueEnum theGlue) - { - myGlue = theGlue; - } + void SetGlue(const BOPAlgo_GlueEnum theGlue) { myGlue = theGlue; } //! Returns the glue option of the algorithm - BOPAlgo_GlueEnum Glue() const - { - return myGlue; - } + BOPAlgo_GlueEnum Glue() const { return myGlue; } //! Enables/Disables the check of the input solids for inverted status - void SetCheckInverted(const Standard_Boolean theCheck) - { - myCheckInverted = theCheck; - } + void SetCheckInverted(const Standard_Boolean theCheck) { myCheckInverted = theCheck; } //! Returns the flag defining whether the check for input solids on inverted status //! should be performed or not. - Standard_Boolean CheckInverted() const - { - return myCheckInverted; - } - + Standard_Boolean CheckInverted() const { return myCheckInverted; } public: //! @name Performing the operation - //! Performs the algorithm - Standard_EXPORT virtual void Build(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; - + Standard_EXPORT virtual void Build( + const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; public: //! @name Result simplification - //! Simplification of the result shape is performed by the means of //! *ShapeUpgrade_UnifySameDomain* algorithm. The result of the operation will //! be overwritten with the simplified result. @@ -169,13 +136,12 @@ public: //! @name Result simplification const Standard_Boolean theUnifyFaces = Standard_True, const Standard_Real theAngularTol = Precision::Angular()); - public: //! @name History support - //! Returns the shapes modified from the shape . //! If any, the list will contain only those splits of the //! given shape, contained in the result. - Standard_EXPORT virtual const TopTools_ListOfShape& Modified(const TopoDS_Shape& theS) Standard_OVERRIDE; + Standard_EXPORT virtual const TopTools_ListOfShape& Modified(const TopoDS_Shape& theS) + Standard_OVERRIDE; //! Returns the list of shapes generated from the shape . //! In frames of Boolean Operations algorithms only Edges and Faces @@ -183,7 +149,8 @@ public: //! @name History support //! during intersection: //! - Edges can generate new vertices; //! - Faces can generate new edges and vertices. - Standard_EXPORT virtual const TopTools_ListOfShape& Generated(const TopoDS_Shape& theS) Standard_OVERRIDE; + Standard_EXPORT virtual const TopTools_ListOfShape& Generated(const TopoDS_Shape& theS) + Standard_OVERRIDE; //! Checks if the shape has been completely removed from the result, //! i.e. the result does not contain the shape itself and any of its splits. @@ -201,68 +168,46 @@ public: //! @name History support //! but all derived operation can have. Standard_EXPORT virtual Standard_Boolean HasDeleted() const; - public: //! @name Enabling/Disabling the history collection. - //! Allows disabling the history collection void SetToFillHistory(const Standard_Boolean theHistFlag) { myFillHistory = theHistFlag; } //! Returns flag of history availability Standard_Boolean HasHistory() const { return myFillHistory; } - public: //! @name Getting the section edges - //! Returns a list of section edges. //! The edges represent the result of intersection between arguments of operation. Standard_EXPORT const TopTools_ListOfShape& SectionEdges(); - public: //! @name Getting tools performing the job - //! Returns the Intersection tool - const BOPAlgo_PPaveFiller& DSFiller() const - { - return myDSFiller; - } + const BOPAlgo_PPaveFiller& DSFiller() const { return myDSFiller; } //! Returns the Building tool - const BOPAlgo_PBuilder& Builder() const - { - return myBuilder; - } + const BOPAlgo_PBuilder& Builder() const { return myBuilder; } //! History tool - Handle(BRepTools_History) History() const - { - return myFillHistory ? myHistory : NULL; - } - + Handle(BRepTools_History) History() const { return myFillHistory ? myHistory : NULL; } protected: //! @name Setting options to the Intersection tool - //! Sets options (available in child classes) for the intersection tool. //! Here it does nothing. virtual void SetAttributes() {} - protected: //! @name Protected methods for shapes intersection and building result - //! Intersects the given shapes with the intersection tool - Standard_EXPORT void IntersectShapes(const TopTools_ListOfShape& theArgs, const Message_ProgressRange& theRange); + Standard_EXPORT void IntersectShapes(const TopTools_ListOfShape& theArgs, + const Message_ProgressRange& theRange); //! Builds the resulting shape Standard_EXPORT void BuildResult(const Message_ProgressRange& theRange = Message_ProgressRange()); - protected: //! @name Clearing the contents of the algorithm - //! Clears the algorithm from previous runs Standard_EXPORT virtual void Clear() Standard_OVERRIDE; - protected: //! @name Fields - // Inputs TopTools_ListOfShape myArguments; //!< Arguments of the operation @@ -277,7 +222,7 @@ protected: //! @name Fields //! of arguments should be performed or not BOPAlgo_PPaveFiller myDSFiller; //!< Intersection tool performs intersection of the //! argument shapes. - BOPAlgo_PBuilder myBuilder; //!< Building tool performs construction of the result + BOPAlgo_PBuilder myBuilder; //!< Building tool performs construction of the result //! basing on the results of intersection Handle(BRepTools_History) myHistory; //!< General History tool, containing all History of //! shapes modifications during the operation diff --git a/opencascade/BRepAlgoAPI_Check.hxx b/opencascade/BRepAlgoAPI_Check.hxx index e8d78b995..8e73d9beb 100644 --- a/opencascade/BRepAlgoAPI_Check.hxx +++ b/opencascade/BRepAlgoAPI_Check.hxx @@ -26,7 +26,6 @@ #include #include - //! The class Check provides a diagnostic tool for checking the validity //! of the single shape or couple of shapes. //! The shapes are checked on: @@ -48,66 +47,63 @@ class BRepAlgoAPI_Check : public BOPAlgo_Options { public: - DEFINE_STANDARD_ALLOC - public: //! @name Constructors - //! Empty constructor. Standard_EXPORT BRepAlgoAPI_Check(); Standard_EXPORT virtual ~BRepAlgoAPI_Check(); //! Constructor for checking single shape. //! - //! @param theS [in] - the shape to check; - //! @param bTestSE [in] - flag which specifies whether to check the shape + //! @param[in] theS - the shape to check; + //! @param[in] bTestSE - flag which specifies whether to check the shape //! on small edges or not; by default it is set to TRUE; - //! @param bTestSI [in] - flag which specifies whether to check the shape + //! @param[in] bTestSI - flag which specifies whether to check the shape //! on self-interference or not; by default it is set to TRUE; - //! @param theRange [in] - parameter to use progress indicator - Standard_EXPORT BRepAlgoAPI_Check(const TopoDS_Shape& theS, - const Standard_Boolean bTestSE = Standard_True, - const Standard_Boolean bTestSI = Standard_True, - const Message_ProgressRange& theRange = Message_ProgressRange()); + //! @param[in] theRange - parameter to use progress indicator + Standard_EXPORT BRepAlgoAPI_Check( + const TopoDS_Shape& theS, + const Standard_Boolean bTestSE = Standard_True, + const Standard_Boolean bTestSI = Standard_True, + const Message_ProgressRange& theRange = Message_ProgressRange()); //! Constructor for checking the couple of shapes. //! Additionally to the validity checks of each given shape, //! the types of the given shapes will be checked on validity //! for Boolean operation of given type. //! - //! @param theS1 [in] - the first shape to check; - //! @param theS2 [in] - the second shape to check; - //! @param theOp [in] - the type of Boolean Operation for which the validity + //! @param[in] theS1 - the first shape to check; + //! @param[in] theS2 - the second shape to check; + //! @param[in] theOp - the type of Boolean Operation for which the validity //! of given shapes should be checked. - //! @param bTestSE [in] - flag which specifies whether to check the shape + //! @param[in] bTestSE - flag which specifies whether to check the shape //! on small edges or not; by default it is set to TRUE; - //! @param bTestSI [in] - flag which specifies whether to check the shape + //! @param[in] bTestSI - flag which specifies whether to check the shape //! on self-interference or not; by default it is set to TRUE; - //! @param theRange [in] - parameter to use progress indicator - Standard_EXPORT BRepAlgoAPI_Check(const TopoDS_Shape& theS1, - const TopoDS_Shape& theS2, - const BOPAlgo_Operation theOp = BOPAlgo_UNKNOWN, - const Standard_Boolean bTestSE = Standard_True, - const Standard_Boolean bTestSI = Standard_True, - const Message_ProgressRange& theRange = Message_ProgressRange()); - + //! @param[in] theRange - parameter to use progress indicator + Standard_EXPORT BRepAlgoAPI_Check( + const TopoDS_Shape& theS1, + const TopoDS_Shape& theS2, + const BOPAlgo_Operation theOp = BOPAlgo_UNKNOWN, + const Standard_Boolean bTestSE = Standard_True, + const Standard_Boolean bTestSI = Standard_True, + const Message_ProgressRange& theRange = Message_ProgressRange()); public: //! @name Initializing the algorithm - //! Initializes the algorithm with single shape. //! - //! @param theS [in] - the shape to check; - //! @param bTestSE [in] - flag which specifies whether to check the shape + //! @param[in] theS - the shape to check; + //! @param[in] bTestSE - flag which specifies whether to check the shape //! on small edges or not; by default it is set to TRUE; - //! @param bTestSI [in] - flag which specifies whether to check the shape + //! @param[in] bTestSI - flag which specifies whether to check the shape //! on self-interference or not; by default it is set to TRUE; - void SetData(const TopoDS_Shape& theS, + void SetData(const TopoDS_Shape& theS, const Standard_Boolean bTestSE = Standard_True, const Standard_Boolean bTestSI = Standard_True) { - myS1 = theS; - myS2 = TopoDS_Shape(); + myS1 = theS; + myS2 = TopoDS_Shape(); myTestSE = bTestSE; myTestSI = bTestSI; myFaultyShapes.Clear(); @@ -118,62 +114,51 @@ public: //! @name Initializing the algorithm //! the types of the given shapes will be checked on validity //! for Boolean operation of given type. //! - //! @param theS1 [in] - the first shape to check; - //! @param theS2 [in] - the second shape to check; - //! @param theOp [in] - the type of Boolean Operation for which the validity + //! @param[in] theS1 - the first shape to check; + //! @param[in] theS2 - the second shape to check; + //! @param[in] theOp - the type of Boolean Operation for which the validity //! of given shapes should be checked. - //! @param bTestSE [in] - flag which specifies whether to check the shape + //! @param[in] bTestSE - flag which specifies whether to check the shape //! on small edges or not; by default it is set to TRUE; - //! @param bTestSI [in] - flag which specifies whether to check the shape + //! @param[in] bTestSI - flag which specifies whether to check the shape //! on self-interference or not; by default it is set to TRUE; - void SetData(const TopoDS_Shape& theS1, - const TopoDS_Shape& theS2, - const BOPAlgo_Operation theOp = BOPAlgo_UNKNOWN, - const Standard_Boolean bTestSE = Standard_True, - const Standard_Boolean bTestSI = Standard_True) + void SetData(const TopoDS_Shape& theS1, + const TopoDS_Shape& theS2, + const BOPAlgo_Operation theOp = BOPAlgo_UNKNOWN, + const Standard_Boolean bTestSE = Standard_True, + const Standard_Boolean bTestSI = Standard_True) { - myS1 = theS1; - myS2 = theS2; + myS1 = theS1; + myS2 = theS2; myOperation = theOp; - myTestSE = bTestSE; - myTestSI = bTestSI; + myTestSE = bTestSE; + myTestSI = bTestSI; myFaultyShapes.Clear(); } - public: //! @name Performing the operation - //! Performs the check. Standard_EXPORT void Perform(const Message_ProgressRange& theRange = Message_ProgressRange()); - public: //! @name Getting the results. - //! Shows whether shape(s) valid or not. - Standard_Boolean IsValid() - { - return myFaultyShapes.IsEmpty(); - } + Standard_Boolean IsValid() { return myFaultyShapes.IsEmpty(); } //! Returns faulty shapes. - const BOPAlgo_ListOfCheckResult& Result() - { - return myFaultyShapes; - } - + const BOPAlgo_ListOfCheckResult& Result() { return myFaultyShapes; } protected: //! @name Fields - // Inputs - TopoDS_Shape myS1; //!< The first shape - TopoDS_Shape myS2; //!< The second shape + TopoDS_Shape myS1; //!< The first shape + TopoDS_Shape myS2; //!< The second shape + // clang-format off Standard_Boolean myTestSE; //!< Flag defining whether to look for small edges in the given shapes or not Standard_Boolean myTestSI; //!< Flag defining whether to check the input edges on self-interference or not BOPAlgo_Operation myOperation; //!< Type of Boolean operation for which the validity of input shapes should be checked + // clang-format on // Results BOPAlgo_ListOfCheckResult myFaultyShapes; //!< Found faulty shapes - }; #endif // _BRepAlgoAPI_Check_HeaderFile diff --git a/opencascade/BRepAlgoAPI_Common.hxx b/opencascade/BRepAlgoAPI_Common.hxx index d10e8e69c..d7c15d66b 100644 --- a/opencascade/BRepAlgoAPI_Common.hxx +++ b/opencascade/BRepAlgoAPI_Common.hxx @@ -24,66 +24,45 @@ class BOPAlgo_PaveFiller; class TopoDS_Shape; - - //! The class provides Boolean common operation //! between arguments and tools (Boolean Intersection). -class BRepAlgoAPI_Common : public BRepAlgoAPI_BooleanOperation +class BRepAlgoAPI_Common : public BRepAlgoAPI_BooleanOperation { public: - DEFINE_STANDARD_ALLOC - //! Empty constructor Standard_EXPORT BRepAlgoAPI_Common(); -Standard_EXPORT virtual ~BRepAlgoAPI_Common(); - + Standard_EXPORT virtual ~BRepAlgoAPI_Common(); + //! Empty constructor //! - PaveFiller object that is carried out Standard_EXPORT BRepAlgoAPI_Common(const BOPAlgo_PaveFiller& PF); - + //! Constructor with two shapes //! -argument //! -tool //! - the type of the operation //! Obsolete - Standard_EXPORT BRepAlgoAPI_Common(const TopoDS_Shape& S1, - const TopoDS_Shape& S2, - const Message_ProgressRange& theRange = Message_ProgressRange()); - + Standard_EXPORT BRepAlgoAPI_Common( + const TopoDS_Shape& S1, + const TopoDS_Shape& S2, + const Message_ProgressRange& theRange = Message_ProgressRange()); + //! Constructor with two shapes //! -argument //! -tool //! - the type of the operation //! - PaveFiller object that is carried out //! Obsolete - Standard_EXPORT BRepAlgoAPI_Common(const TopoDS_Shape& S1, - const TopoDS_Shape& S2, - const BOPAlgo_PaveFiller& PF, - const Message_ProgressRange& theRange = Message_ProgressRange()); - - - + Standard_EXPORT BRepAlgoAPI_Common( + const TopoDS_Shape& S1, + const TopoDS_Shape& S2, + const BOPAlgo_PaveFiller& PF, + const Message_ProgressRange& theRange = Message_ProgressRange()); protected: - - - - - private: - - - - - }; - - - - - - #endif // _BRepAlgoAPI_Common_HeaderFile diff --git a/opencascade/BRepAlgoAPI_Cut.hxx b/opencascade/BRepAlgoAPI_Cut.hxx index 118cc2f3b..98d615418 100644 --- a/opencascade/BRepAlgoAPI_Cut.hxx +++ b/opencascade/BRepAlgoAPI_Cut.hxx @@ -24,64 +24,44 @@ class BOPAlgo_PaveFiller; class TopoDS_Shape; - - //! The class Cut provides Boolean cut operation //! between arguments and tools (Boolean Subtraction). -class BRepAlgoAPI_Cut : public BRepAlgoAPI_BooleanOperation +class BRepAlgoAPI_Cut : public BRepAlgoAPI_BooleanOperation { public: - DEFINE_STANDARD_ALLOC - //! Empty constructor Standard_EXPORT BRepAlgoAPI_Cut(); -Standard_EXPORT virtual ~BRepAlgoAPI_Cut(); - + Standard_EXPORT virtual ~BRepAlgoAPI_Cut(); + //! Empty constructor //! - PaveFiller object that is carried out Standard_EXPORT BRepAlgoAPI_Cut(const BOPAlgo_PaveFiller& PF); - + //! Constructor with two shapes //! -argument //! -tool //! - the type of the operation //! Obsolete - Standard_EXPORT BRepAlgoAPI_Cut(const TopoDS_Shape& S1, const TopoDS_Shape& S2, + Standard_EXPORT BRepAlgoAPI_Cut(const TopoDS_Shape& S1, + const TopoDS_Shape& S2, const Message_ProgressRange& theRange = Message_ProgressRange()); - + //! Constructor with two shapes //! -argument //! -tool //! - the type of the operation //! - PaveFiller object that is carried out //! Obsolete - Standard_EXPORT BRepAlgoAPI_Cut(const TopoDS_Shape& S1, const TopoDS_Shape& S2, const BOPAlgo_PaveFiller& aDSF, - const Standard_Boolean bFWD = Standard_True, + Standard_EXPORT BRepAlgoAPI_Cut(const TopoDS_Shape& S1, + const TopoDS_Shape& S2, + const BOPAlgo_PaveFiller& aDSF, + const Standard_Boolean bFWD = Standard_True, const Message_ProgressRange& theRange = Message_ProgressRange()); - - - protected: - - - - - private: - - - - - }; - - - - - - #endif // _BRepAlgoAPI_Cut_HeaderFile diff --git a/opencascade/BRepAlgoAPI_Defeaturing.hxx b/opencascade/BRepAlgoAPI_Defeaturing.hxx index a547766f7..79eb9c313 100644 --- a/opencascade/BRepAlgoAPI_Defeaturing.hxx +++ b/opencascade/BRepAlgoAPI_Defeaturing.hxx @@ -22,9 +22,8 @@ #include #include - //! The BRepAlgoAPI_Defeaturing algorithm is the API algorithm intended for -//! removal of the unwanted parts from the shape. The unwanted parts +//! removal of the unwanted parts from the shape. The unwanted parts //! (or features) can be holes, protrusions, gaps, chamfers, fillets etc. //! The shape itself is not modified, the new shape is built as the result. //! @@ -98,47 +97,34 @@ //! The algorithm preserves the type of the input shape in the result shape. Thus, //! if the input shape is a COMPSOLID, the resulting solids will also be put into a COMPSOLID. //! -class BRepAlgoAPI_Defeaturing: public BRepAlgoAPI_Algo +class BRepAlgoAPI_Defeaturing : public BRepAlgoAPI_Algo { public: - DEFINE_STANDARD_ALLOC public: //! @name Constructors - //! Empty constructor BRepAlgoAPI_Defeaturing() - : - BRepAlgoAPI_Algo(), - myFillHistory(Standard_True) - {} - + : BRepAlgoAPI_Algo(), + myFillHistory(Standard_True) + { + } public: //! @name Setting input data for the algorithm - //! Sets the shape for processing. - //! @param theShape [in] The shape to remove the features from. + //! @param[in] theShape The shape to remove the features from. //! It should either be the SOLID, COMPSOLID or COMPOUND of Solids. - void SetShape(const TopoDS_Shape& theShape) - { - myInputShape = theShape; - } + void SetShape(const TopoDS_Shape& theShape) { myInputShape = theShape; } //! Returns the input shape - const TopoDS_Shape& InputShape() const - { - return myInputShape; - } + const TopoDS_Shape& InputShape() const { return myInputShape; } //! Adds the features to remove from the input shape. - //! @param theFace [in] The shape to extract the faces for removal. - void AddFaceToRemove(const TopoDS_Shape& theFace) - { - myFacesToRemove.Append(theFace); - } + //! @param[in] theFace The shape to extract the faces for removal. + void AddFaceToRemove(const TopoDS_Shape& theFace) { myFacesToRemove.Append(theFace); } //! Adds the faces to remove from the input shape. - //! @param theFaces [in] The list of shapes to extract the faces for removal. + //! @param[in] theFaces The list of shapes to extract the faces for removal. void AddFacesToRemove(const TopTools_ListOfShape& theFaces) { TopTools_ListIteratorOfListOfShape it(theFaces); @@ -148,34 +134,27 @@ public: //! @name Setting input data for the algorithm //! Returns the list of faces which have been requested for removal //! from the input shape. - const TopTools_ListOfShape& FacesToRemove() const - { - return myFacesToRemove; - } - + const TopTools_ListOfShape& FacesToRemove() const { return myFacesToRemove; } public: //! @name Performing the operation - //! Performs the operation - Standard_EXPORT virtual void Build(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; - + Standard_EXPORT virtual void Build( + const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; public: //! @name History Methods - //! Defines whether to track the modification of the shapes or not. - void SetToFillHistory(const Standard_Boolean theFlag) - { - myFillHistory = theFlag; - } + void SetToFillHistory(const Standard_Boolean theFlag) { myFillHistory = theFlag; } //! Returns whether the history was requested or not. Standard_Boolean HasHistory() const { return myFillHistory; } //! Returns the list of shapes modified from the shape during the operation. - Standard_EXPORT virtual const TopTools_ListOfShape& Modified(const TopoDS_Shape& theS) Standard_OVERRIDE; + Standard_EXPORT virtual const TopTools_ListOfShape& Modified(const TopoDS_Shape& theS) + Standard_OVERRIDE; //! Returns the list of shapes generated from the shape during the operation. - Standard_EXPORT virtual const TopTools_ListOfShape& Generated(const TopoDS_Shape& theS) Standard_OVERRIDE; + Standard_EXPORT virtual const TopTools_ListOfShape& Generated(const TopoDS_Shape& theS) + Standard_OVERRIDE; //! Returns true if the shape has been deleted during the operation. //! It means that the shape has no any trace in the result. @@ -192,29 +171,21 @@ public: //! @name History Methods Standard_EXPORT virtual Standard_Boolean HasDeleted() const; //! Returns the History of shapes modifications - Handle(BRepTools_History) History() - { - return myFeatureRemovalTool.History(); - } - + Handle(BRepTools_History) History() { return myFeatureRemovalTool.History(); } protected: //! @name Setting the algorithm into default state - virtual void Clear() Standard_OVERRIDE { BRepAlgoAPI_Algo::Clear(); myFeatureRemovalTool.Clear(); } - -protected: //! @name Fields - - TopoDS_Shape myInputShape; //!< Input shape to remove the features from +protected: //! @name Fields + TopoDS_Shape myInputShape; //!< Input shape to remove the features from TopTools_ListOfShape myFacesToRemove; //!< Features to remove from the shape - Standard_Boolean myFillHistory; //!< Defines whether to track the history of + Standard_Boolean myFillHistory; //!< Defines whether to track the history of //! shapes modifications or not (true by default) BOPAlgo_RemoveFeatures myFeatureRemovalTool; //!< Tool for the features removal - }; #endif // _BRepAlgoAPI_Defeaturing_HeaderFile diff --git a/opencascade/BRepAlgoAPI_Fuse.hxx b/opencascade/BRepAlgoAPI_Fuse.hxx index 9a0ba7564..d87e78b89 100644 --- a/opencascade/BRepAlgoAPI_Fuse.hxx +++ b/opencascade/BRepAlgoAPI_Fuse.hxx @@ -24,63 +24,43 @@ class BOPAlgo_PaveFiller; class TopoDS_Shape; - - //! The class provides Boolean fusion operation //! between arguments and tools (Boolean Union). -class BRepAlgoAPI_Fuse : public BRepAlgoAPI_BooleanOperation +class BRepAlgoAPI_Fuse : public BRepAlgoAPI_BooleanOperation { public: - DEFINE_STANDARD_ALLOC - //! Empty constructor Standard_EXPORT BRepAlgoAPI_Fuse(); -Standard_EXPORT virtual ~BRepAlgoAPI_Fuse(); - + Standard_EXPORT virtual ~BRepAlgoAPI_Fuse(); + //! Empty constructor //! - PaveFiller object that is carried out Standard_EXPORT BRepAlgoAPI_Fuse(const BOPAlgo_PaveFiller& PF); - + //! Constructor with two shapes //! -argument //! -tool //! - the type of the operation //! Obsolete - Standard_EXPORT BRepAlgoAPI_Fuse(const TopoDS_Shape& S1, const TopoDS_Shape& S2, + Standard_EXPORT BRepAlgoAPI_Fuse(const TopoDS_Shape& S1, + const TopoDS_Shape& S2, const Message_ProgressRange& theRange = Message_ProgressRange()); - + //! Constructor with two shapes //! -argument //! -tool //! - the type of the operation //! - PaveFiller object that is carried out //! Obsolete - Standard_EXPORT BRepAlgoAPI_Fuse(const TopoDS_Shape& S1, const TopoDS_Shape& S2, const BOPAlgo_PaveFiller& aDSF, + Standard_EXPORT BRepAlgoAPI_Fuse(const TopoDS_Shape& S1, + const TopoDS_Shape& S2, + const BOPAlgo_PaveFiller& aDSF, const Message_ProgressRange& theRange = Message_ProgressRange()); - - - protected: - - - - - private: - - - - - }; - - - - - - #endif // _BRepAlgoAPI_Fuse_HeaderFile diff --git a/opencascade/BRepAlgoAPI_Section.hxx b/opencascade/BRepAlgoAPI_Section.hxx index 78e525f8b..c768bf42e 100644 --- a/opencascade/BRepAlgoAPI_Section.hxx +++ b/opencascade/BRepAlgoAPI_Section.hxx @@ -28,8 +28,6 @@ class TopoDS_Shape; class gp_Pln; class Geom_Surface; - - //! The algorithm is to build a Section operation between arguments and tools. //! The result of Section operation consists of vertices and edges. //! The result of Section operation contains: @@ -37,29 +35,29 @@ class Geom_Surface; //! 2. vertices that are subjects of V/E, V/F interferences //! 3. new edges that are subjects of F/F interferences //! 4. edges that are Common Blocks -class BRepAlgoAPI_Section : public BRepAlgoAPI_BooleanOperation +class BRepAlgoAPI_Section : public BRepAlgoAPI_BooleanOperation { public: - DEFINE_STANDARD_ALLOC - //! Empty constructor Standard_EXPORT BRepAlgoAPI_Section(); -Standard_EXPORT virtual ~BRepAlgoAPI_Section(); - + Standard_EXPORT virtual ~BRepAlgoAPI_Section(); + //! Empty constructor //! - PaveFiller object that is carried out Standard_EXPORT BRepAlgoAPI_Section(const BOPAlgo_PaveFiller& PF); - + //! Constructor with two shapes //! -argument //! -tool //! - the flag: //! if =True - the algorithm is performed immediately //! Obsolete - Standard_EXPORT BRepAlgoAPI_Section(const TopoDS_Shape& S1, const TopoDS_Shape& S2, const Standard_Boolean PerformNow = Standard_True); - + Standard_EXPORT BRepAlgoAPI_Section(const TopoDS_Shape& S1, + const TopoDS_Shape& S2, + const Standard_Boolean PerformNow = Standard_True); + //! Constructor with two shapes //! -argument //! -tool @@ -67,72 +65,82 @@ Standard_EXPORT virtual ~BRepAlgoAPI_Section(); //! - the flag: //! if =True - the algorithm is performed immediately //! Obsolete - Standard_EXPORT BRepAlgoAPI_Section(const TopoDS_Shape& S1, const TopoDS_Shape& S2, const BOPAlgo_PaveFiller& aDSF, const Standard_Boolean PerformNow = Standard_True); - + Standard_EXPORT BRepAlgoAPI_Section(const TopoDS_Shape& S1, + const TopoDS_Shape& S2, + const BOPAlgo_PaveFiller& aDSF, + const Standard_Boolean PerformNow = Standard_True); + //! Constructor with two shapes //! - argument //! - tool //! - the flag: //! if =True - the algorithm is performed immediately //! Obsolete - Standard_EXPORT BRepAlgoAPI_Section(const TopoDS_Shape& S1, const gp_Pln& Pl, const Standard_Boolean PerformNow = Standard_True); - + Standard_EXPORT BRepAlgoAPI_Section(const TopoDS_Shape& S1, + const gp_Pln& Pl, + const Standard_Boolean PerformNow = Standard_True); + //! Constructor with two shapes //! - argument //! - tool //! - the flag: //! if =True - the algorithm is performed immediately //! Obsolete - Standard_EXPORT BRepAlgoAPI_Section(const TopoDS_Shape& S1, const Handle(Geom_Surface)& Sf, const Standard_Boolean PerformNow = Standard_True); - + Standard_EXPORT BRepAlgoAPI_Section(const TopoDS_Shape& S1, + const Handle(Geom_Surface)& Sf, + const Standard_Boolean PerformNow = Standard_True); + //! Constructor with two shapes //! - argument //! - tool //! - the flag: //! if =True - the algorithm is performed immediately //! Obsolete - Standard_EXPORT BRepAlgoAPI_Section(const Handle(Geom_Surface)& Sf, const TopoDS_Shape& S2, const Standard_Boolean PerformNow = Standard_True); - + Standard_EXPORT BRepAlgoAPI_Section(const Handle(Geom_Surface)& Sf, + const TopoDS_Shape& S2, + const Standard_Boolean PerformNow = Standard_True); + //! Constructor with two shapes //! - argument //! - tool //! - the flag: //! if =True - the algorithm is performed immediately //! Obsolete - Standard_EXPORT BRepAlgoAPI_Section(const Handle(Geom_Surface)& Sf1, const Handle(Geom_Surface)& Sf2, const Standard_Boolean PerformNow = Standard_True); - + Standard_EXPORT BRepAlgoAPI_Section(const Handle(Geom_Surface)& Sf1, + const Handle(Geom_Surface)& Sf2, + const Standard_Boolean PerformNow = Standard_True); + //! initialize the argument //! - argument //! Obsolete - Standard_EXPORT void Init1 (const TopoDS_Shape& S1); - + Standard_EXPORT void Init1(const TopoDS_Shape& S1); + //! initialize the argument //! - argument //! Obsolete - Standard_EXPORT void Init1 (const gp_Pln& Pl); - + Standard_EXPORT void Init1(const gp_Pln& Pl); + //! initialize the argument //! - argument //! Obsolete - Standard_EXPORT void Init1 (const Handle(Geom_Surface)& Sf); - + Standard_EXPORT void Init1(const Handle(Geom_Surface)& Sf); + //! initialize the tool //! - tool //! Obsolete - Standard_EXPORT void Init2 (const TopoDS_Shape& S2); - + Standard_EXPORT void Init2(const TopoDS_Shape& S2); + //! initialize the tool //! - tool //! Obsolete - Standard_EXPORT void Init2 (const gp_Pln& Pl); - + Standard_EXPORT void Init2(const gp_Pln& Pl); + //! initialize the tool //! - tool //! Obsolete - Standard_EXPORT void Init2 (const Handle(Geom_Surface)& Sf); - - Standard_EXPORT void Approximation (const Standard_Boolean B); - + Standard_EXPORT void Init2(const Handle(Geom_Surface)& Sf); + + Standard_EXPORT void Approximation(const Standard_Boolean B); //! Indicates whether the P-Curve should be (or not) //! performed on the argument. @@ -142,8 +150,7 @@ Standard_EXPORT virtual ~BRepAlgoAPI_Section(); //! to attach an P-Curve in the parametric space of the argument //! to the constructed edges. //! Obsolete - Standard_EXPORT void ComputePCurveOn1 (const Standard_Boolean B); - + Standard_EXPORT void ComputePCurveOn1(const Standard_Boolean B); //! Indicates whether the P-Curve should be (or not) //! performed on the tool. @@ -153,13 +160,13 @@ Standard_EXPORT virtual ~BRepAlgoAPI_Section(); //! to attach an P-Curve in the parametric space of the tool //! to the constructed edges. //! Obsolete - Standard_EXPORT void ComputePCurveOn2 (const Standard_Boolean B); - + Standard_EXPORT void ComputePCurveOn2(const Standard_Boolean B); + //! Performs the algorithm //! Filling interference Data Structure (if it is necessary) //! Building the result of the operation. - Standard_EXPORT virtual void Build(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; - + Standard_EXPORT virtual void Build( + const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; //! get the face of the first part giving section edge . //! Returns True on the 3 following conditions : @@ -169,8 +176,8 @@ Standard_EXPORT virtual ~BRepAlgoAPI_Section(); //! is not the result of common edges) //! When False, F remains untouched. //! Obsolete - Standard_EXPORT Standard_Boolean HasAncestorFaceOn1 (const TopoDS_Shape& E, TopoDS_Shape& F) const; - + Standard_EXPORT Standard_Boolean HasAncestorFaceOn1(const TopoDS_Shape& E, TopoDS_Shape& F) const; + //! Identifies the ancestor faces of //! the intersection edge E resulting from the last //! computation performed in this framework, that is, the faces of @@ -190,23 +197,17 @@ Standard_EXPORT virtual ~BRepAlgoAPI_Section(); //! Boolean value before using the ancestor face: F is significant //! only if the returned Boolean value equals true. //! Obsolete - Standard_EXPORT Standard_Boolean HasAncestorFaceOn2 (const TopoDS_Shape& E, TopoDS_Shape& F) const; - + Standard_EXPORT Standard_Boolean HasAncestorFaceOn2(const TopoDS_Shape& E, TopoDS_Shape& F) const; protected: + Standard_EXPORT void Init(const Standard_Boolean PerformNow); - - Standard_EXPORT void Init (const Standard_Boolean PerformNow); - Standard_EXPORT virtual void SetAttributes() Standard_OVERRIDE; - private: - Standard_Boolean myApprox; Standard_Boolean myComputePCurve1; Standard_Boolean myComputePCurve2; - }; #endif // _BRepAlgoAPI_Section_HeaderFile diff --git a/opencascade/BRepAlgoAPI_Splitter.hxx b/opencascade/BRepAlgoAPI_Splitter.hxx index eed068076..dfb5c28a9 100644 --- a/opencascade/BRepAlgoAPI_Splitter.hxx +++ b/opencascade/BRepAlgoAPI_Splitter.hxx @@ -44,51 +44,38 @@ //! //! The algorithm returns the following Error statuses:
//! - 0 - in case of success;
-//! - *BOPAlgo_AlertTooFewArguments* - in case there is no enough arguments for the operation;
+//! - *BOPAlgo_AlertTooFewArguments* - in case there is no enough arguments for the +//! operation;
//! - *BOPAlgo_AlertIntersectionFailed* - in case the Intersection of the arguments has failed;
//! - *BOPAlgo_AlertBuilderFailed* - in case the Building of the result has failed. class BRepAlgoAPI_Splitter : public BRepAlgoAPI_BuilderAlgo { public: - DEFINE_STANDARD_ALLOC public: //! @name Constructors - //! Empty constructor Standard_EXPORT BRepAlgoAPI_Splitter(); //! Constructor with already prepared intersection tool - PaveFiller Standard_EXPORT BRepAlgoAPI_Splitter(const BOPAlgo_PaveFiller& thePF); - public: //! @name Setters/Getters for the Tools - //! Sets the Tool arguments - void SetTools (const TopTools_ListOfShape& theLS) - { - myTools = theLS; - } + void SetTools(const TopTools_ListOfShape& theLS) { myTools = theLS; } //! Returns the Tool arguments - const TopTools_ListOfShape& Tools() const - { - return myTools; - } - + const TopTools_ListOfShape& Tools() const { return myTools; } public: //! @name Performing the operation - //! Performs the Split operation. //! Performs the intersection of the argument shapes (both objects and tools) //! and splits objects by the tools. - Standard_EXPORT virtual void Build(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; - - -protected: //! @name Fields + Standard_EXPORT virtual void Build( + const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; +protected: //! @name Fields TopTools_ListOfShape myTools; //!< Tool arguments of the operation - }; #endif // _BRepAlgoAPI_Splitter_HeaderFile diff --git a/opencascade/BRepAlgo_AsDes.hxx b/opencascade/BRepAlgo_AsDes.hxx index 2f9d1ff5c..709e0b287 100644 --- a/opencascade/BRepAlgo_AsDes.hxx +++ b/opencascade/BRepAlgo_AsDes.hxx @@ -24,7 +24,6 @@ #include class TopoDS_Shape; - class BRepAlgo_AsDes; DEFINE_STANDARD_HANDLE(BRepAlgo_AsDes, Standard_Transient) @@ -33,58 +32,56 @@ class BRepAlgo_AsDes : public Standard_Transient { public: - //! Creates an empty AsDes. Standard_EXPORT BRepAlgo_AsDes(); - + Standard_EXPORT void Clear(); - + //! Stores as a futur subshape of . - Standard_EXPORT void Add (const TopoDS_Shape& S, const TopoDS_Shape& SS); - + Standard_EXPORT void Add(const TopoDS_Shape& S, const TopoDS_Shape& SS); + //! Stores as futurs SubShapes of . - Standard_EXPORT void Add (const TopoDS_Shape& S, const TopTools_ListOfShape& SS); - - Standard_EXPORT Standard_Boolean HasAscendant (const TopoDS_Shape& S) const; - - Standard_EXPORT Standard_Boolean HasDescendant (const TopoDS_Shape& S) const; - + Standard_EXPORT void Add(const TopoDS_Shape& S, const TopTools_ListOfShape& SS); + + Standard_EXPORT Standard_Boolean HasAscendant(const TopoDS_Shape& S) const; + + Standard_EXPORT Standard_Boolean HasDescendant(const TopoDS_Shape& S) const; + //! Returns the Shape containing . - Standard_EXPORT const TopTools_ListOfShape& Ascendant (const TopoDS_Shape& S) const; - + Standard_EXPORT const TopTools_ListOfShape& Ascendant(const TopoDS_Shape& S) const; + //! Returns futur subhapes of . - Standard_EXPORT const TopTools_ListOfShape& Descendant (const TopoDS_Shape& S) const; - + Standard_EXPORT const TopTools_ListOfShape& Descendant(const TopoDS_Shape& S) const; + //! Returns futur subhapes of . - Standard_EXPORT TopTools_ListOfShape& ChangeDescendant (const TopoDS_Shape& S); + Standard_EXPORT TopTools_ListOfShape& ChangeDescendant(const TopoDS_Shape& S); //! Replace theOldS by theNewS. //! theOldS disappear from this. - Standard_EXPORT void Replace (const TopoDS_Shape& theOldS, const TopoDS_Shape& theNewS); + Standard_EXPORT void Replace(const TopoDS_Shape& theOldS, const TopoDS_Shape& theNewS); //! Remove theS from me. - Standard_EXPORT void Remove (const TopoDS_Shape& theS); + Standard_EXPORT void Remove(const TopoDS_Shape& theS); //! Returns True if (S1> and has common //! Descendants. Stores in the Commons Descendants. - Standard_EXPORT Standard_Boolean HasCommonDescendant (const TopoDS_Shape& S1, const TopoDS_Shape& S2, TopTools_ListOfShape& LC) const; + Standard_EXPORT Standard_Boolean HasCommonDescendant(const TopoDS_Shape& S1, + const TopoDS_Shape& S2, + TopTools_ListOfShape& LC) const; - DEFINE_STANDARD_RTTIEXT(BRepAlgo_AsDes,Standard_Transient) + DEFINE_STANDARD_RTTIEXT(BRepAlgo_AsDes, Standard_Transient) private: - //! Replace theOldS by theNewS. //! theOldS disappear from this. - Standard_EXPORT void BackReplace (const TopoDS_Shape& theOldS, - const TopoDS_Shape& theNewS, - const TopTools_ListOfShape& theL, - const Standard_Boolean theInUp); + Standard_EXPORT void BackReplace(const TopoDS_Shape& theOldS, + const TopoDS_Shape& theNewS, + const TopTools_ListOfShape& theL, + const Standard_Boolean theInUp); private: - TopTools_DataMapOfShapeListOfShape up; TopTools_DataMapOfShapeListOfShape down; - }; #endif // _BRepAlgo_AsDes_HeaderFile diff --git a/opencascade/BRepAlgo_FaceRestrictor.hxx b/opencascade/BRepAlgo_FaceRestrictor.hxx index ea5c642b4..16d23d37c 100644 --- a/opencascade/BRepAlgo_FaceRestrictor.hxx +++ b/opencascade/BRepAlgo_FaceRestrictor.hxx @@ -24,87 +24,67 @@ #include class TopoDS_Wire; - //! Builds all the faces limited with a set of non //! jointing and planars wires. if //! is false The Wires must have //! correct orientations. Sinon orientation des wires //! de telle sorte que les faces ne soient pas infinies //! et qu'elles soient disjointes. -class BRepAlgo_FaceRestrictor +class BRepAlgo_FaceRestrictor { public: - DEFINE_STANDARD_ALLOC - Standard_EXPORT BRepAlgo_FaceRestrictor(); - + //! the surface of will be the surface of each new //! faces built. //! is used to update pcurves on edges if necessary. //! See Add(). - Standard_EXPORT void Init (const TopoDS_Face& F, const Standard_Boolean Proj = Standard_False, const Standard_Boolean ControlOrientation = Standard_False); - + Standard_EXPORT void Init(const TopoDS_Face& F, + const Standard_Boolean Proj = Standard_False, + const Standard_Boolean ControlOrientation = Standard_False); + //! Add the wire to the set of wires. //! //! Warning: //! The Wires must be closed. //! - //! The edges of can be modified if they have not pcurves - //! on the surface of . In this case - //! if is false the first pcurve of the edge - //! is positionned on . - //! if is True ,the Pcurve On is the - //! projection of the curve 3d on . - Standard_EXPORT void Add (TopoDS_Wire& W); - + //! The edges of can be modified if they don't have + //! pcurves on the surface of . In this case + //! if is false the first pcurve of the edge + //! is positioned on . + //! if is True, the Pcurve On is the + //! projection of the curve 3d on . + Standard_EXPORT void Add(TopoDS_Wire& W); + //! Removes all the Wires Standard_EXPORT void Clear(); - + //! Evaluate all the faces limited by the set of Wires. Standard_EXPORT void Perform(); - + Standard_EXPORT Standard_Boolean IsDone() const; - - Standard_EXPORT Standard_Boolean More() const; - - Standard_EXPORT void Next(); - - Standard_EXPORT TopoDS_Face Current() const; + Standard_EXPORT Standard_Boolean More() const; + Standard_EXPORT void Next(); + Standard_EXPORT TopoDS_Face Current() const; protected: - - - - - private: - - //! Evaluate all the faces limited by the set of Wires. Standard_EXPORT void PerformWithCorrection(); - - Standard_Boolean myDone; - Standard_Boolean modeProj; - TopoDS_Face myFace; - TopTools_ListOfShape wires; - TopTools_ListOfShape faces; - Standard_Boolean myCorrection; + Standard_Boolean myDone; + Standard_Boolean modeProj; + TopoDS_Face myFace; + TopTools_ListOfShape wires; + TopTools_ListOfShape faces; + Standard_Boolean myCorrection; TopTools_DataMapOfShapeListOfShape keyIsIn; TopTools_DataMapOfShapeListOfShape keyContains; - - }; - - - - - - #endif // _BRepAlgo_FaceRestrictor_HeaderFile diff --git a/opencascade/BRepAlgo_Image.hxx b/opencascade/BRepAlgo_Image.hxx index 10ddcb9bf..f95e23063 100644 --- a/opencascade/BRepAlgo_Image.hxx +++ b/opencascade/BRepAlgo_Image.hxx @@ -28,97 +28,75 @@ #include class TopoDS_Shape; - //! Stores link between a shape and a shape //! obtained from . is an image of . -class BRepAlgo_Image +class BRepAlgo_Image { public: - DEFINE_STANDARD_ALLOC - Standard_EXPORT BRepAlgo_Image(); - - Standard_EXPORT void SetRoot (const TopoDS_Shape& S); - + + Standard_EXPORT void SetRoot(const TopoDS_Shape& S); + //! Links as image of . - Standard_EXPORT void Bind (const TopoDS_Shape& OldS, const TopoDS_Shape& NewS); - + Standard_EXPORT void Bind(const TopoDS_Shape& OldS, const TopoDS_Shape& NewS); + //! Links as image of . - Standard_EXPORT void Bind (const TopoDS_Shape& OldS, const TopTools_ListOfShape& NewS); - + Standard_EXPORT void Bind(const TopoDS_Shape& OldS, const TopTools_ListOfShape& NewS); + //! Add to the image of . - Standard_EXPORT void Add (const TopoDS_Shape& OldS, const TopoDS_Shape& NewS); - + Standard_EXPORT void Add(const TopoDS_Shape& OldS, const TopoDS_Shape& NewS); + //! Add to the image of . - Standard_EXPORT void Add (const TopoDS_Shape& OldS, const TopTools_ListOfShape& NewS); - + Standard_EXPORT void Add(const TopoDS_Shape& OldS, const TopTools_ListOfShape& NewS); + Standard_EXPORT void Clear(); - + //! Remove to set of images. - Standard_EXPORT void Remove (const TopoDS_Shape& S); - + Standard_EXPORT void Remove(const TopoDS_Shape& S); + //! Removes the root from the list of roots and up and down maps. - Standard_EXPORT void RemoveRoot (const TopoDS_Shape& Root); + Standard_EXPORT void RemoveRoot(const TopoDS_Shape& Root); //! Replaces the with the , so all images //! of the become the images of the . //! The is removed. - Standard_EXPORT void ReplaceRoot (const TopoDS_Shape& OldRoot, const TopoDS_Shape& NewRoot); + Standard_EXPORT void ReplaceRoot(const TopoDS_Shape& OldRoot, const TopoDS_Shape& NewRoot); Standard_EXPORT const TopTools_ListOfShape& Roots() const; - - Standard_EXPORT Standard_Boolean IsImage (const TopoDS_Shape& S) const; - + + Standard_EXPORT Standard_Boolean IsImage(const TopoDS_Shape& S) const; + //! Returns the generator of - Standard_EXPORT const TopoDS_Shape& ImageFrom (const TopoDS_Shape& S) const; - + Standard_EXPORT const TopoDS_Shape& ImageFrom(const TopoDS_Shape& S) const; + //! Returns the upper generator of - Standard_EXPORT const TopoDS_Shape& Root (const TopoDS_Shape& S) const; - - Standard_EXPORT Standard_Boolean HasImage (const TopoDS_Shape& S) const; - + Standard_EXPORT const TopoDS_Shape& Root(const TopoDS_Shape& S) const; + + Standard_EXPORT Standard_Boolean HasImage(const TopoDS_Shape& S) const; + //! Returns the Image of . //! Returns in the list if HasImage(S) is false. - Standard_EXPORT const TopTools_ListOfShape& Image (const TopoDS_Shape& S) const; - + Standard_EXPORT const TopTools_ListOfShape& Image(const TopoDS_Shape& S) const; + //! Stores in the images of images of...images of . //! contains only if HasImage(S) is false. - Standard_EXPORT void LastImage (const TopoDS_Shape& S, TopTools_ListOfShape& L) const; - + Standard_EXPORT void LastImage(const TopoDS_Shape& S, TopTools_ListOfShape& L) const; + //! Keeps only the link between roots and lastimage. Standard_EXPORT void Compact(); - + //! Deletes in the images the shape of type //! which are not in . //! Warning: Compact() must be call before. - Standard_EXPORT void Filter (const TopoDS_Shape& S, const TopAbs_ShapeEnum ShapeType); - - - + Standard_EXPORT void Filter(const TopoDS_Shape& S, const TopAbs_ShapeEnum ShapeType); protected: - - - - - private: - - - - TopTools_ListOfShape roots; - TopTools_DataMapOfShapeShape up; + TopTools_ListOfShape roots; + TopTools_DataMapOfShapeShape up; TopTools_DataMapOfShapeListOfShape down; - - }; - - - - - - #endif // _BRepAlgo_Image_HeaderFile diff --git a/opencascade/BRepAlgo_Loop.hxx b/opencascade/BRepAlgo_Loop.hxx index df528d581..e0859686b 100644 --- a/opencascade/BRepAlgo_Loop.hxx +++ b/opencascade/BRepAlgo_Loop.hxx @@ -27,105 +27,82 @@ #include class TopoDS_Edge; - //! Builds the loops from a set of edges on a face. -class BRepAlgo_Loop +class BRepAlgo_Loop { public: - DEFINE_STANDARD_ALLOC - Standard_EXPORT BRepAlgo_Loop(); - + //! Init with the set of edges must have //! pcurves on . - Standard_EXPORT void Init (const TopoDS_Face& F); - + Standard_EXPORT void Init(const TopoDS_Face& F); + //! Add E with . will be copied and trim //! by vertices in . - Standard_EXPORT void AddEdge (TopoDS_Edge& E, const TopTools_ListOfShape& LV); - + Standard_EXPORT void AddEdge(TopoDS_Edge& E, const TopTools_ListOfShape& LV); + //! Add as const edge, E can be in the result. - Standard_EXPORT void AddConstEdge (const TopoDS_Edge& E); - + Standard_EXPORT void AddConstEdge(const TopoDS_Edge& E); + //! Add as a set of const edges. - Standard_EXPORT void AddConstEdges (const TopTools_ListOfShape& LE); - + Standard_EXPORT void AddConstEdges(const TopTools_ListOfShape& LE); + //! Sets the Image Vertex - Vertex - Standard_EXPORT void SetImageVV (const BRepAlgo_Image& theImageVV); - + Standard_EXPORT void SetImageVV(const BRepAlgo_Image& theImageVV); + //! Make loops. Standard_EXPORT void Perform(); - + //! Update VE map according to Image Vertex - Vertex - Standard_EXPORT void UpdateVEmap (TopTools_IndexedDataMapOfShapeListOfShape& theVEmap); - + Standard_EXPORT void UpdateVEmap(TopTools_IndexedDataMapOfShapeListOfShape& theVEmap); + //! Cut the edge in several edges on the //! vertices. - Standard_EXPORT void CutEdge (const TopoDS_Edge& E, const TopTools_ListOfShape& VonE, TopTools_ListOfShape& NE) const; - + Standard_EXPORT void CutEdge(const TopoDS_Edge& E, + const TopTools_ListOfShape& VonE, + TopTools_ListOfShape& NE) const; + //! Returns the list of wires performed. //! can be an empty list. Standard_EXPORT const TopTools_ListOfShape& NewWires() const; - + //! Build faces from the wires result. Standard_EXPORT void WiresToFaces(); - + //! Returns the list of faces. //! Warning: The method as to be called before. //! can be an empty list. Standard_EXPORT const TopTools_ListOfShape& NewFaces() const; - + //! Returns the list of new edges built from an edge //! it can be an empty list. - Standard_EXPORT const TopTools_ListOfShape& NewEdges (const TopoDS_Edge& E) const; - - //! Returns the datamap of vertices with their substitutes. - Standard_EXPORT void GetVerticesForSubstitute (TopTools_DataMapOfShapeShape& VerVerMap) const; - - Standard_EXPORT void VerticesForSubstitute (TopTools_DataMapOfShapeShape& VerVerMap); - - //! Set maximal tolerance used for comparing distaces between vertices. - void SetTolConf(const Standard_Real theTolConf) - { - myTolConf = theTolConf; - } - - //! Get maximal tolerance used for comparing distaces between vertices. - Standard_Real GetTolConf() const - { - return myTolConf; - } - -protected: + Standard_EXPORT const TopTools_ListOfShape& NewEdges(const TopoDS_Edge& E) const; + //! Returns the datamap of vertices with their substitutes. + Standard_EXPORT void GetVerticesForSubstitute(TopTools_DataMapOfShapeShape& VerVerMap) const; + Standard_EXPORT void VerticesForSubstitute(TopTools_DataMapOfShapeShape& VerVerMap); + //! Set maximal tolerance used for comparing distances between vertices. + void SetTolConf(const Standard_Real theTolConf) { myTolConf = theTolConf; } + //! Get maximal tolerance used for comparing distances between vertices. + Standard_Real GetTolConf() const { return myTolConf; } +protected: private: - - - - TopoDS_Face myFace; - TopTools_ListOfShape myConstEdges; - TopTools_ListOfShape myEdges; + TopoDS_Face myFace; + TopTools_ListOfShape myConstEdges; + TopTools_ListOfShape myEdges; TopTools_DataMapOfShapeListOfShape myVerOnEdges; - TopTools_ListOfShape myNewWires; - TopTools_ListOfShape myNewFaces; + TopTools_ListOfShape myNewWires; + TopTools_ListOfShape myNewFaces; TopTools_DataMapOfShapeListOfShape myCutEdges; - TopTools_DataMapOfShapeShape myVerticesForSubstitute; - BRepAlgo_Image myImageVV; - Standard_Real myTolConf; - - + TopTools_DataMapOfShapeShape myVerticesForSubstitute; + BRepAlgo_Image myImageVV; + Standard_Real myTolConf; }; - - - - - - #endif // _BRepAlgo_Loop_HeaderFile diff --git a/opencascade/BRepAlgo_NormalProjection.hxx b/opencascade/BRepAlgo_NormalProjection.hxx index b91fb0d97..f5508e037 100644 --- a/opencascade/BRepAlgo_NormalProjection.hxx +++ b/opencascade/BRepAlgo_NormalProjection.hxx @@ -29,25 +29,22 @@ class TopoDS_Edge; class Adaptor3d_Curve; - //! This class makes the projection of a wire on a //! shape. -class BRepAlgo_NormalProjection +class BRepAlgo_NormalProjection { public: - DEFINE_STANDARD_ALLOC - Standard_EXPORT BRepAlgo_NormalProjection(); - + Standard_EXPORT BRepAlgo_NormalProjection(const TopoDS_Shape& S); - - Standard_EXPORT void Init (const TopoDS_Shape& S); - + + Standard_EXPORT void Init(const TopoDS_Shape& S); + //! Add an edge or a wire to the list of shape to project - Standard_EXPORT void Add (const TopoDS_Shape& ToProj); - + Standard_EXPORT void Add(const TopoDS_Shape& ToProj); + //! Set the parameters used for computation //! Tol3d is the required tolerance between the 3d projected //! curve and its 2d representation @@ -55,85 +52,70 @@ public: //! used for approximation. //! MaxDeg and MaxSeg are the maximum degree and the maximum //! number of segment for BSpline resulting of an approximation. - Standard_EXPORT void SetParams (const Standard_Real Tol3D, const Standard_Real Tol2D, const GeomAbs_Shape InternalContinuity, const Standard_Integer MaxDegree, const Standard_Integer MaxSeg); - + Standard_EXPORT void SetParams(const Standard_Real Tol3D, + const Standard_Real Tol2D, + const GeomAbs_Shape InternalContinuity, + const Standard_Integer MaxDegree, + const Standard_Integer MaxSeg); + //! Set the parameters used for computation //! in their default values Standard_EXPORT void SetDefaultParams(); - + //! Sets the maximum distance between target shape and //! shape to project. If this condition is not satisfied then //! corresponding part of solution is discarded. //! if MaxDist < 0 then this method does not affect the algorithm - Standard_EXPORT void SetMaxDistance (const Standard_Real MaxDist); - + Standard_EXPORT void SetMaxDistance(const Standard_Real MaxDist); + //! if With3d = Standard_False the 3dcurve is not computed //! the initial 3dcurve is kept to build the resulting edges. - Standard_EXPORT void Compute3d (const Standard_Boolean With3d = Standard_True); - + Standard_EXPORT void Compute3d(const Standard_Boolean With3d = Standard_True); + //! Manage limitation of projected edges. - Standard_EXPORT void SetLimit (const Standard_Boolean FaceBoundaries = Standard_True); - + Standard_EXPORT void SetLimit(const Standard_Boolean FaceBoundaries = Standard_True); + //! Builds the result as a compound. Standard_EXPORT void Build(); - + Standard_EXPORT Standard_Boolean IsDone() const; - + //! returns the result Standard_EXPORT const TopoDS_Shape& Projection() const; - + //! For a resulting edge, returns the corresponding initial edge. - Standard_EXPORT const TopoDS_Shape& Ancestor (const TopoDS_Edge& E) const; - + Standard_EXPORT const TopoDS_Shape& Ancestor(const TopoDS_Edge& E) const; + //! For a projected edge, returns the corresponding initial face. - Standard_EXPORT const TopoDS_Shape& Couple (const TopoDS_Edge& E) const; - + Standard_EXPORT const TopoDS_Shape& Couple(const TopoDS_Edge& E) const; + //! Returns the list of shapes generated from the //! shape . - Standard_EXPORT const TopTools_ListOfShape& Generated (const TopoDS_Shape& S); - - Standard_EXPORT Standard_Boolean IsElementary (const Adaptor3d_Curve& C) const; - - //! build the result as a list of wire if possible in -- - //! a first returns a wire only if there is only a wire. - Standard_EXPORT Standard_Boolean BuildWire (TopTools_ListOfShape& Liste) const; - + Standard_EXPORT const TopTools_ListOfShape& Generated(const TopoDS_Shape& S); + Standard_EXPORT Standard_Boolean IsElementary(const Adaptor3d_Curve& C) const; + //! build the result as a list of wire if possible in -- + //! a first returns a wire only if there is only a wire. + Standard_EXPORT Standard_Boolean BuildWire(TopTools_ListOfShape& Liste) const; protected: - - - - - private: - - - - TopoDS_Shape myShape; - Standard_Boolean myIsDone; - Standard_Real myTol3d; - Standard_Real myTol2d; - Standard_Real myMaxDist; - Standard_Boolean myWith3d; - GeomAbs_Shape myContinuity; - Standard_Integer myMaxDegree; - Standard_Integer myMaxSeg; - Standard_Boolean myFaceBounds; - TopoDS_Shape myToProj; - TopTools_DataMapOfShapeShape myAncestorMap; - TopTools_DataMapOfShapeShape myCorresp; + TopoDS_Shape myShape; + Standard_Boolean myIsDone; + Standard_Real myTol3d; + Standard_Real myTol2d; + Standard_Real myMaxDist; + Standard_Boolean myWith3d; + GeomAbs_Shape myContinuity; + Standard_Integer myMaxDegree; + Standard_Integer myMaxSeg; + Standard_Boolean myFaceBounds; + TopoDS_Shape myToProj; + TopTools_DataMapOfShapeShape myAncestorMap; + TopTools_DataMapOfShapeShape myCorresp; TopTools_DataMapOfShapeListOfShape myDescendants; - TopoDS_Shape myRes; - - + TopoDS_Shape myRes; }; - - - - - - #endif // _BRepAlgo_NormalProjection_HeaderFile diff --git a/opencascade/BRepApprox_Approx.hxx b/opencascade/BRepApprox_Approx.hxx index f657cea66..4c0d8ba53 100644 --- a/opencascade/BRepApprox_Approx.hxx +++ b/opencascade/BRepApprox_Approx.hxx @@ -48,80 +48,98 @@ class BRepApprox_TheComputeLineBezierOfApprox; class BRepApprox_MyGradientOfTheComputeLineBezierOfApprox; class AppParCurves_MultiBSpCurve; -class BRepApprox_Approx +class BRepApprox_Approx { private: struct Approx_Data { - Approx_Data () : myBezierApprox (Standard_True), - Xo (0.0), Yo (0.0), Zo (0.0), - U1o (0.0), V1o (0.0), U2o (0.0), V2o (0.0), - ApproxXYZ (Standard_True), - ApproxU1V1 (Standard_True), - ApproxU2V2 (Standard_True), - indicemin (0), indicemax (0), - myNbPntMax (30), parametrization (Approx_ChordLength) + Approx_Data() + : myBezierApprox(Standard_True), + Xo(0.0), + Yo(0.0), + Zo(0.0), + U1o(0.0), + V1o(0.0), + U2o(0.0), + V2o(0.0), + ApproxXYZ(Standard_True), + ApproxU1V1(Standard_True), + ApproxU2V2(Standard_True), + indicemin(0), + indicemax(0), + myNbPntMax(30), + parametrization(Approx_ChordLength) { } - Standard_Boolean myBezierApprox; - Standard_Real Xo, Yo, Zo, U1o, V1o, U2o, V2o; - Standard_Boolean ApproxXYZ, ApproxU1V1, ApproxU2V2; - Standard_Integer indicemin, indicemax, myNbPntMax; + Standard_Boolean myBezierApprox; + Standard_Real Xo, Yo, Zo, U1o, V1o, U2o, V2o; + Standard_Boolean ApproxXYZ, ApproxU1V1, ApproxU2V2; + Standard_Integer indicemin, indicemax, myNbPntMax; Approx_ParametrizationType parametrization; }; - public: - DEFINE_STANDARD_ALLOC - Standard_EXPORT BRepApprox_Approx(); - - Standard_EXPORT void Perform (const BRepAdaptor_Surface& Surf1, const BRepAdaptor_Surface& Surf2, const Handle(BRepApprox_ApproxLine)& aLine, const Standard_Boolean ApproxXYZ = Standard_True, const Standard_Boolean ApproxU1V1 = Standard_True, const Standard_Boolean ApproxU2V2 = Standard_True, const Standard_Integer indicemin = 0, const Standard_Integer indicemax = 0); - - Standard_EXPORT void Perform (const Handle(BRepApprox_ApproxLine)& aLine, const Standard_Boolean ApproxXYZ = Standard_True, const Standard_Boolean ApproxU1V1 = Standard_True, const Standard_Boolean ApproxU2V2 = Standard_True, const Standard_Integer indicemin = 0, const Standard_Integer indicemax = 0); - - Standard_EXPORT - void SetParameters (const Standard_Real Tol3d, const Standard_Real Tol2d, - const Standard_Integer DegMin, - const Standard_Integer DegMax, - const Standard_Integer NbIterMax, - const Standard_Integer NbPntMax = 30, - const Standard_Boolean ApproxWithTangency = Standard_True, - const Approx_ParametrizationType - Parametrization = Approx_ChordLength); + + Standard_EXPORT void Perform(const BRepAdaptor_Surface& Surf1, + const BRepAdaptor_Surface& Surf2, + const Handle(BRepApprox_ApproxLine)& aLine, + const Standard_Boolean ApproxXYZ = Standard_True, + const Standard_Boolean ApproxU1V1 = Standard_True, + const Standard_Boolean ApproxU2V2 = Standard_True, + const Standard_Integer indicemin = 0, + const Standard_Integer indicemax = 0); + + Standard_EXPORT void Perform(const Handle(BRepApprox_ApproxLine)& aLine, + const Standard_Boolean ApproxXYZ = Standard_True, + const Standard_Boolean ApproxU1V1 = Standard_True, + const Standard_Boolean ApproxU2V2 = Standard_True, + const Standard_Integer indicemin = 0, + const Standard_Integer indicemax = 0); + + Standard_EXPORT void SetParameters( + const Standard_Real Tol3d, + const Standard_Real Tol2d, + const Standard_Integer DegMin, + const Standard_Integer DegMax, + const Standard_Integer NbIterMax, + const Standard_Integer NbPntMax = 30, + const Standard_Boolean ApproxWithTangency = Standard_True, + const Approx_ParametrizationType Parametrization = Approx_ChordLength); Standard_EXPORT void Perform(); - + Standard_EXPORT Standard_Real TolReached3d() const; - + Standard_EXPORT Standard_Real TolReached2d() const; - + Standard_EXPORT Standard_Boolean IsDone() const; - - Standard_EXPORT Standard_Integer NbMultiCurves() const; - - Standard_EXPORT const AppParCurves_MultiBSpCurve& Value (const Standard_Integer Index) const; - Standard_EXPORT static void Parameters(const BRepApprox_TheMultiLineOfApprox& Line, - const Standard_Integer firstP, - const Standard_Integer lastP, - const Approx_ParametrizationType Par, - math_Vector& TheParameters); + Standard_EXPORT Standard_Integer NbMultiCurves() const; + Standard_EXPORT const AppParCurves_MultiBSpCurve& Value(const Standard_Integer Index) const; + Standard_EXPORT static void Parameters(const BRepApprox_TheMultiLineOfApprox& Line, + const Standard_Integer firstP, + const Standard_Integer lastP, + const Approx_ParametrizationType Par, + math_Vector& TheParameters); protected: - - - - - private: - Standard_EXPORT void Perform (const IntSurf_Quadric& Surf1, const BRepAdaptor_Surface& Surf2, const Handle(BRepApprox_ApproxLine)& aLine, const Standard_Boolean ApproxXYZ, const Standard_Boolean ApproxU1V1, const Standard_Boolean ApproxU2V2, const Standard_Integer indicemin, const Standard_Integer indicemax, const Standard_Boolean isTheQuadFirst); - + Standard_EXPORT void Perform(const IntSurf_Quadric& Surf1, + const BRepAdaptor_Surface& Surf2, + const Handle(BRepApprox_ApproxLine)& aLine, + const Standard_Boolean ApproxXYZ, + const Standard_Boolean ApproxU1V1, + const Standard_Boolean ApproxU2V2, + const Standard_Integer indicemin, + const Standard_Integer indicemax, + const Standard_Boolean isTheQuadFirst); + Standard_EXPORT void UpdateTolReached(); //! Fill data structure for intersection approximation. @@ -136,32 +154,25 @@ private: //! Build knot sequence. Standard_EXPORT void buildKnots(const Handle(BRepApprox_ApproxLine)& theline, - const Standard_Address thePtrSVSurf); + const Standard_Address thePtrSVSurf); //! Build curve. Standard_EXPORT void buildCurve(const Handle(BRepApprox_ApproxLine)& theline, - const Standard_Address thePtrSVSurf); + const Standard_Address thePtrSVSurf); - BRepApprox_TheComputeLineOfApprox myComputeLine; + BRepApprox_TheComputeLineOfApprox myComputeLine; BRepApprox_TheComputeLineBezierOfApprox myComputeLineBezier; - Approx_MCurvesToBSpCurve myBezToBSpl; - Standard_Boolean myWithTangency; - Standard_Real myTol3d; - Standard_Real myTol2d; - Standard_Integer myDegMin; - Standard_Integer myDegMax; - Standard_Integer myNbIterMax; - Standard_Real myTolReached3d; - Standard_Real myTolReached2d; - Approx_Data myData; - NCollection_Vector myKnots; - + Approx_MCurvesToBSpCurve myBezToBSpl; + Standard_Boolean myWithTangency; + Standard_Real myTol3d; + Standard_Real myTol2d; + Standard_Integer myDegMin; + Standard_Integer myDegMax; + Standard_Integer myNbIterMax; + Standard_Real myTolReached3d; + Standard_Real myTolReached2d; + Approx_Data myData; + NCollection_Vector myKnots; }; - - - - - - #endif // _BRepApprox_Approx_HeaderFile diff --git a/opencascade/BRepApprox_ApproxLine.hxx b/opencascade/BRepApprox_ApproxLine.hxx index c73015290..b1b5ee208 100644 --- a/opencascade/BRepApprox_ApproxLine.hxx +++ b/opencascade/BRepApprox_ApproxLine.hxx @@ -27,52 +27,34 @@ class Geom2d_BSplineCurve; class IntSurf_LineOn2S; class IntSurf_PntOn2S; - class BRepApprox_ApproxLine; DEFINE_STANDARD_HANDLE(BRepApprox_ApproxLine, Standard_Transient) - class BRepApprox_ApproxLine : public Standard_Transient { public: + Standard_EXPORT BRepApprox_ApproxLine(const Handle(Geom_BSplineCurve)& CurveXYZ, + const Handle(Geom2d_BSplineCurve)& CurveUV1, + const Handle(Geom2d_BSplineCurve)& CurveUV2); - - Standard_EXPORT BRepApprox_ApproxLine(const Handle(Geom_BSplineCurve)& CurveXYZ, const Handle(Geom2d_BSplineCurve)& CurveUV1, const Handle(Geom2d_BSplineCurve)& CurveUV2); - - //! theTang variable has been entered only for compatibility with + //! theTang variable has been entered only for compatibility with //! the alias IntPatch_WLine. They are not used in this class. - Standard_EXPORT BRepApprox_ApproxLine(const Handle(IntSurf_LineOn2S)& lin, const Standard_Boolean theTang = Standard_False); - - Standard_EXPORT Standard_Integer NbPnts() const; - - Standard_EXPORT IntSurf_PntOn2S Point (const Standard_Integer Index); - + Standard_EXPORT BRepApprox_ApproxLine(const Handle(IntSurf_LineOn2S)& lin, + const Standard_Boolean theTang = Standard_False); + Standard_EXPORT Standard_Integer NbPnts() const; + Standard_EXPORT IntSurf_PntOn2S Point(const Standard_Integer Index); - DEFINE_STANDARD_RTTIEXT(BRepApprox_ApproxLine,Standard_Transient) + DEFINE_STANDARD_RTTIEXT(BRepApprox_ApproxLine, Standard_Transient) protected: - - - - private: - - - Handle(Geom_BSplineCurve) myCurveXYZ; + Handle(Geom_BSplineCurve) myCurveXYZ; Handle(Geom2d_BSplineCurve) myCurveUV1; Handle(Geom2d_BSplineCurve) myCurveUV2; - Handle(IntSurf_LineOn2S) myLineOn2S; - - + Handle(IntSurf_LineOn2S) myLineOn2S; }; - - - - - - #endif // _BRepApprox_ApproxLine_HeaderFile diff --git a/opencascade/BRepApprox_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfApprox.hxx b/opencascade/BRepApprox_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfApprox.hxx index 82a838b23..f707ff7c1 100644 --- a/opencascade/BRepApprox_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfApprox.hxx +++ b/opencascade/BRepApprox_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfApprox.hxx @@ -30,42 +30,26 @@ class BRepApprox_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfApprox; class BRepApprox_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfApprox; class math_MultipleVarFunctionWithGradient; - - -class BRepApprox_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfApprox : public math_BFGS +class BRepApprox_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfApprox : public math_BFGS { public: - DEFINE_STANDARD_ALLOC - - Standard_EXPORT BRepApprox_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfApprox(math_MultipleVarFunctionWithGradient& F, const math_Vector& StartingPoint, const Standard_Real Tolerance3d, const Standard_Real Tolerance2d, const Standard_Real Eps, const Standard_Integer NbIterations = 200); - - Standard_EXPORT virtual Standard_Boolean IsSolutionReached (math_MultipleVarFunctionWithGradient& F) const Standard_OVERRIDE; - - + Standard_EXPORT BRepApprox_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfApprox( + math_MultipleVarFunctionWithGradient& F, + const math_Vector& StartingPoint, + const Standard_Real Tolerance3d, + const Standard_Real Tolerance2d, + const Standard_Real Eps, + const Standard_Integer NbIterations = 200); + Standard_EXPORT virtual Standard_Boolean IsSolutionReached( + math_MultipleVarFunctionWithGradient& F) const Standard_OVERRIDE; protected: - - - - - private: - - - Standard_Real myTol3d; Standard_Real myTol2d; - - }; - - - - - - #endif // _BRepApprox_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfApprox_HeaderFile diff --git a/opencascade/BRepApprox_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfApprox.hxx b/opencascade/BRepApprox_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfApprox.hxx index 1f8cb54f8..b2135eeec 100644 --- a/opencascade/BRepApprox_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfApprox.hxx +++ b/opencascade/BRepApprox_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfApprox.hxx @@ -38,130 +38,121 @@ class BRepApprox_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfApprox; class AppParCurves_MultiBSpCurve; class math_Matrix; - - -class BRepApprox_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfApprox : public math_MultipleVarFunctionWithGradient +class BRepApprox_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfApprox + : public math_MultipleVarFunctionWithGradient { public: - DEFINE_STANDARD_ALLOC - //! initializes the fields of the function. The approximating //! curve has control points. - Standard_EXPORT BRepApprox_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfApprox(const BRepApprox_TheMultiLineOfApprox& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, const math_Vector& Parameters, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, const Standard_Integer NbPol); - + Standard_EXPORT BRepApprox_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfApprox( + const BRepApprox_TheMultiLineOfApprox& SSP, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, + const math_Vector& Parameters, + const TColStd_Array1OfReal& Knots, + const TColStd_Array1OfInteger& Mults, + const Standard_Integer NbPol); + //! returns the number of variables of the function. It //! corresponds to the number of MultiPoints. Standard_EXPORT Standard_Integer NbVariables() const; - + //! this method computes the new approximation of the //! MultiLine //! SSP and calculates F = sum (||Pui - Bi*Pi||2) for each //! point of the MultiLine. - Standard_EXPORT Standard_Boolean Value (const math_Vector& X, Standard_Real& F); - + Standard_EXPORT Standard_Boolean Value(const math_Vector& X, Standard_Real& F); + //! returns the gradient G of the sum above for the //! parameters Xi. - Standard_EXPORT Standard_Boolean Gradient (const math_Vector& X, math_Vector& G); - + Standard_EXPORT Standard_Boolean Gradient(const math_Vector& X, math_Vector& G); + //! returns the value F=sum(||Pui - Bi*Pi||)2. //! returns the value G = grad(F) for the parameters Xi. - Standard_EXPORT Standard_Boolean Values (const math_Vector& X, Standard_Real& F, math_Vector& G); - + Standard_EXPORT Standard_Boolean Values(const math_Vector& X, Standard_Real& F, math_Vector& G); + //! returns the new parameters of the MultiLine. Standard_EXPORT const math_Vector& NewParameters() const; - + //! returns the MultiBSpCurve approximating the set after //! computing the value F or Grad(F). Standard_EXPORT AppParCurves_MultiBSpCurve CurveValue(); - + //! returns the distance between the MultiPoint of range //! IPoint and the curve CurveIndex. - Standard_EXPORT Standard_Real Error (const Standard_Integer IPoint, const Standard_Integer CurveIndex); - + Standard_EXPORT Standard_Real Error(const Standard_Integer IPoint, + const Standard_Integer CurveIndex); + //! returns the maximum distance between the points //! and the MultiBSpCurve. Standard_EXPORT Standard_Real MaxError3d() const; - + //! returns the maximum distance between the points //! and the MultiBSpCurve. Standard_EXPORT Standard_Real MaxError2d() const; - + //! returns the function matrix used to approximate the //! multiline. Standard_EXPORT const math_Matrix& FunctionMatrix() const; - + //! returns the derivative function matrix used to approximate the //! multiline. Standard_EXPORT const math_Matrix& DerivativeFunctionMatrix() const; - + //! Returns the indexes of the first non null values of //! A and DA. //! The values are non null from Index(ieme point) +1 //! to Index(ieme point) + degree +1. Standard_EXPORT const math_IntegerVector& Index() const; - - Standard_EXPORT AppParCurves_Constraint FirstConstraint (const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, const Standard_Integer FirstPoint) const; - - Standard_EXPORT AppParCurves_Constraint LastConstraint (const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, const Standard_Integer LastPoint) const; - - Standard_EXPORT void SetFirstLambda (const Standard_Real l1); - - Standard_EXPORT void SetLastLambda (const Standard_Real l2); + Standard_EXPORT AppParCurves_Constraint + FirstConstraint(const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, + const Standard_Integer FirstPoint) const; + Standard_EXPORT AppParCurves_Constraint + LastConstraint(const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, + const Standard_Integer LastPoint) const; + Standard_EXPORT void SetFirstLambda(const Standard_Real l1); -protected: + Standard_EXPORT void SetLastLambda(const Standard_Real l2); - +protected: //! this method is used each time Value or Gradient is //! needed. - Standard_EXPORT void Perform (const math_Vector& X); - - - + Standard_EXPORT void Perform(const math_Vector& X); private: - - - - Standard_Boolean Done; - BRepApprox_TheMultiLineOfApprox MyMultiLine; - AppParCurves_MultiBSpCurve MyMultiBSpCurve; - Standard_Integer nbpoles; - math_Vector myParameters; - Standard_Real FVal; - math_Vector ValGrad_F; - math_Matrix MyF; - math_Matrix PTLX; - math_Matrix PTLY; - math_Matrix PTLZ; - math_Matrix A; - math_Matrix DA; + Standard_Boolean Done; + BRepApprox_TheMultiLineOfApprox MyMultiLine; + AppParCurves_MultiBSpCurve MyMultiBSpCurve; + Standard_Integer nbpoles; + math_Vector myParameters; + Standard_Real FVal; + math_Vector ValGrad_F; + math_Matrix MyF; + math_Matrix PTLX; + math_Matrix PTLY; + math_Matrix PTLZ; + math_Matrix A; + math_Matrix DA; BRepApprox_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfApprox MyLeastSquare; - Standard_Boolean Contraintes; - Standard_Integer NbP; - Standard_Integer NbCu; - Standard_Integer Adeb; - Standard_Integer Afin; - Handle(TColStd_HArray1OfInteger) tabdim; - Standard_Real ERR3d; - Standard_Real ERR2d; - Standard_Integer FirstP; - Standard_Integer LastP; - Handle(AppParCurves_HArray1OfConstraintCouple) myConstraints; - Standard_Real mylambda1; - Standard_Real mylambda2; - - + Standard_Boolean Contraintes; + Standard_Integer NbP; + Standard_Integer NbCu; + Standard_Integer Adeb; + Standard_Integer Afin; + Handle(TColStd_HArray1OfInteger) tabdim; + Standard_Real ERR3d; + Standard_Real ERR2d; + Standard_Integer FirstP; + Standard_Integer LastP; + Handle(AppParCurves_HArray1OfConstraintCouple) myConstraints; + Standard_Real mylambda1; + Standard_Real mylambda2; }; - - - - - - #endif // _BRepApprox_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfApprox_HeaderFile diff --git a/opencascade/BRepApprox_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfApprox.hxx b/opencascade/BRepApprox_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfApprox.hxx index 1575a0f2f..ec741572d 100644 --- a/opencascade/BRepApprox_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfApprox.hxx +++ b/opencascade/BRepApprox_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfApprox.hxx @@ -42,15 +42,11 @@ class AppParCurves_MultiCurve; class AppParCurves_MultiBSpCurve; class math_Matrix; - - -class BRepApprox_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfApprox +class BRepApprox_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfApprox { public: - DEFINE_STANDARD_ALLOC - //! given a MultiLine, this algorithm computes the least //! square resolution using the Householder-QR method. //! If the first and/or the last point is a constraint @@ -67,11 +63,24 @@ public: //! and is also the same for each MultiLine point because //! they are approximated in parallel(so with the same //! parameter, only the vector B changes). - Standard_EXPORT BRepApprox_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfApprox(const BRepApprox_TheMultiLineOfApprox& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const AppParCurves_Constraint FirstCons, const AppParCurves_Constraint LastCons, const math_Vector& Parameters, const Standard_Integer NbPol); - + Standard_EXPORT BRepApprox_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfApprox( + const BRepApprox_TheMultiLineOfApprox& SSP, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const AppParCurves_Constraint FirstCons, + const AppParCurves_Constraint LastCons, + const math_Vector& Parameters, + const Standard_Integer NbPol); + //! Initializes the fields of the object. - Standard_EXPORT BRepApprox_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfApprox(const BRepApprox_TheMultiLineOfApprox& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const AppParCurves_Constraint FirstCons, const AppParCurves_Constraint LastCons, const Standard_Integer NbPol); - + Standard_EXPORT BRepApprox_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfApprox( + const BRepApprox_TheMultiLineOfApprox& SSP, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const AppParCurves_Constraint FirstCons, + const AppParCurves_Constraint LastCons, + const Standard_Integer NbPol); + //! given a MultiLine, this algorithm computes the least //! square resolution using the Householder-QR method. //! If the first and/or the last point is a constraint @@ -87,171 +96,192 @@ public: //! and is also the same for each MultiLine point because //! they are approximated in parallel(so with the same //! parameter, only the vector B changes). - Standard_EXPORT BRepApprox_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfApprox(const BRepApprox_TheMultiLineOfApprox& SSP, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const AppParCurves_Constraint FirstCons, const AppParCurves_Constraint LastCons, const math_Vector& Parameters, const Standard_Integer NbPol); - + Standard_EXPORT BRepApprox_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfApprox( + const BRepApprox_TheMultiLineOfApprox& SSP, + const TColStd_Array1OfReal& Knots, + const TColStd_Array1OfInteger& Mults, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const AppParCurves_Constraint FirstCons, + const AppParCurves_Constraint LastCons, + const math_Vector& Parameters, + const Standard_Integer NbPol); + //! Initializes the fields of the object. - Standard_EXPORT BRepApprox_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfApprox(const BRepApprox_TheMultiLineOfApprox& SSP, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const AppParCurves_Constraint FirstCons, const AppParCurves_Constraint LastCons, const Standard_Integer NbPol); - + Standard_EXPORT BRepApprox_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfApprox( + const BRepApprox_TheMultiLineOfApprox& SSP, + const TColStd_Array1OfReal& Knots, + const TColStd_Array1OfInteger& Mults, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const AppParCurves_Constraint FirstCons, + const AppParCurves_Constraint LastCons, + const Standard_Integer NbPol); + //! Is used after having initialized the fields. //! The case "CurvaturePoint" is not treated in this method. - Standard_EXPORT void Perform (const math_Vector& Parameters); - + Standard_EXPORT void Perform(const math_Vector& Parameters); + //! Is used after having initialized the fields. - Standard_EXPORT void Perform (const math_Vector& Parameters, const Standard_Real l1, const Standard_Real l2); - + Standard_EXPORT void Perform(const math_Vector& Parameters, + const Standard_Real l1, + const Standard_Real l2); + //! Is used after having initialized the fields. //! is the tangent vector at the first point. //! is the tangent vector at the last point. - Standard_EXPORT void Perform (const math_Vector& Parameters, const math_Vector& V1t, const math_Vector& V2t, const Standard_Real l1, const Standard_Real l2); - + Standard_EXPORT void Perform(const math_Vector& Parameters, + const math_Vector& V1t, + const math_Vector& V2t, + const Standard_Real l1, + const Standard_Real l2); + //! Is used after having initialized the fields. //! is the tangent vector at the first point. //! is the tangent vector at the last point. //! is the tangent vector at the first point. //! is the tangent vector at the last point. - Standard_EXPORT void Perform (const math_Vector& Parameters, const math_Vector& V1t, const math_Vector& V2t, const math_Vector& V1c, const math_Vector& V2c, const Standard_Real l1, const Standard_Real l2); - + Standard_EXPORT void Perform(const math_Vector& Parameters, + const math_Vector& V1t, + const math_Vector& V2t, + const math_Vector& V1c, + const math_Vector& V2c, + const Standard_Real l1, + const Standard_Real l2); + //! returns True if all has been correctly done. Standard_EXPORT Standard_Boolean IsDone() const; - + //! returns the result of the approximation, i.e. all the //! Curves. //! An exception is raised if NotDone. Standard_EXPORT AppParCurves_MultiCurve BezierValue(); - + //! returns the result of the approximation, i.e. all the //! Curves. //! An exception is raised if NotDone. Standard_EXPORT const AppParCurves_MultiBSpCurve& BSplineValue(); - + //! returns the function matrix used to approximate the //! set. Standard_EXPORT const math_Matrix& FunctionMatrix() const; - + //! returns the derivative function matrix used //! to approximate the set. Standard_EXPORT const math_Matrix& DerivativeFunctionMatrix() const; - + //! returns the maximum errors between the MultiLine //! and the approximation curves. F is the sum of the square //! distances. Grad is the derivative vector of the //! function F. - Standard_EXPORT void ErrorGradient (math_Vector& Grad, Standard_Real& F, Standard_Real& MaxE3d, Standard_Real& MaxE2d); - + Standard_EXPORT void ErrorGradient(math_Vector& Grad, + Standard_Real& F, + Standard_Real& MaxE3d, + Standard_Real& MaxE2d); + //! returns the distances between the points of the //! multiline and the approximation curves. Standard_EXPORT const math_Matrix& Distance(); - + //! returns the maximum errors between the MultiLine //! and the approximation curves. F is the sum of the square //! distances. - Standard_EXPORT void Error (Standard_Real& F, Standard_Real& MaxE3d, Standard_Real& MaxE2d); - + Standard_EXPORT void Error(Standard_Real& F, Standard_Real& MaxE3d, Standard_Real& MaxE2d); + //! returns the value (P2 - P1)/ V1 if the first point //! was a tangency point. Standard_EXPORT Standard_Real FirstLambda() const; - + //! returns the value (PN - PN-1)/ VN if the last point //! was a tangency point. Standard_EXPORT Standard_Real LastLambda() const; - + //! returns the matrix of points value. Standard_EXPORT const math_Matrix& Points() const; - + //! returns the matrix of resulting control points value. Standard_EXPORT const math_Matrix& Poles() const; - + //! Returns the indexes of the first non null values of //! A and DA. //! The values are non null from Index(ieme point) +1 //! to Index(ieme point) + degree +1. Standard_EXPORT const math_IntegerVector& KIndex() const; - - - protected: - - //! is used by the constructors above. - Standard_EXPORT void Init (const BRepApprox_TheMultiLineOfApprox& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint); - + Standard_EXPORT void Init(const BRepApprox_TheMultiLineOfApprox& SSP, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint); + //! returns the number of second member columns. //! Is used internally to initialize the fields. - Standard_EXPORT Standard_Integer NbBColumns (const BRepApprox_TheMultiLineOfApprox& SSP) const; - + Standard_EXPORT Standard_Integer NbBColumns(const BRepApprox_TheMultiLineOfApprox& SSP) const; + //! returns the first point being fitted. - Standard_EXPORT Standard_Integer TheFirstPoint (const AppParCurves_Constraint FirstCons, const Standard_Integer FirstPoint) const; - + Standard_EXPORT Standard_Integer TheFirstPoint(const AppParCurves_Constraint FirstCons, + const Standard_Integer FirstPoint) const; + //! returns the last point being fitted. - Standard_EXPORT Standard_Integer TheLastPoint (const AppParCurves_Constraint LastCons, const Standard_Integer LastPoint) const; - - //! Affects the fields in the case of a constraint point. - Standard_EXPORT void Affect (const BRepApprox_TheMultiLineOfApprox& SSP, const Standard_Integer Index, AppParCurves_Constraint& Cons, math_Vector& Vt, math_Vector& Vc); - - Standard_EXPORT void ComputeFunction (const math_Vector& Parameters); - - Standard_EXPORT void SearchIndex (math_IntegerVector& Index); - - //! computes internal matrixes for the resolution - Standard_EXPORT void MakeTAA (math_Vector& TheA, math_Vector& TheB); - - //! computes internal matrixes for the resolution - Standard_EXPORT void MakeTAA (math_Vector& TheA); - - //! computes internal matrixes for the resolution - Standard_EXPORT void MakeTAA (math_Vector& TheA, math_Matrix& TheB); + Standard_EXPORT Standard_Integer TheLastPoint(const AppParCurves_Constraint LastCons, + const Standard_Integer LastPoint) const; + //! Affects the fields in the case of a constraint point. + Standard_EXPORT void Affect(const BRepApprox_TheMultiLineOfApprox& SSP, + const Standard_Integer Index, + AppParCurves_Constraint& Cons, + math_Vector& Vt, + math_Vector& Vc); + Standard_EXPORT void ComputeFunction(const math_Vector& Parameters); + Standard_EXPORT void SearchIndex(math_IntegerVector& Index); -private: + //! computes internal matrixes for the resolution + Standard_EXPORT void MakeTAA(math_Vector& TheA, math_Vector& TheB); + //! computes internal matrixes for the resolution + Standard_EXPORT void MakeTAA(math_Vector& TheA); + //! computes internal matrixes for the resolution + Standard_EXPORT void MakeTAA(math_Vector& TheA, math_Matrix& TheB); - AppParCurves_Constraint FirstConstraint; - AppParCurves_Constraint LastConstraint; - AppParCurves_MultiBSpCurve SCU; - Handle(TColStd_HArray1OfReal) myknots; +private: + AppParCurves_Constraint FirstConstraint; + AppParCurves_Constraint LastConstraint; + AppParCurves_MultiBSpCurve SCU; + Handle(TColStd_HArray1OfReal) myknots; Handle(TColStd_HArray1OfInteger) mymults; - math_Matrix mypoles; - math_Matrix A; - math_Matrix DA; - math_Matrix B2; - math_Matrix mypoints; - math_Vector Vflatknots; - math_Vector Vec1t; - math_Vector Vec1c; - math_Vector Vec2t; - math_Vector Vec2c; - math_Matrix theError; - math_IntegerVector myindex; - Standard_Real lambda1; - Standard_Real lambda2; - Standard_Integer FirstP; - Standard_Integer LastP; - Standard_Integer Nlignes; - Standard_Integer Ninc; - Standard_Integer NA; - Standard_Integer myfirstp; - Standard_Integer mylastp; - Standard_Integer resinit; - Standard_Integer resfin; - Standard_Integer nbP2d; - Standard_Integer nbP; - Standard_Integer nbpoles; - Standard_Integer deg; - Standard_Boolean done; - Standard_Boolean iscalculated; - Standard_Boolean isready; - - + math_Matrix mypoles; + math_Matrix A; + math_Matrix DA; + math_Matrix B2; + math_Matrix mypoints; + math_Vector Vflatknots; + math_Vector Vec1t; + math_Vector Vec1c; + math_Vector Vec2t; + math_Vector Vec2c; + math_Matrix theError; + math_IntegerVector myindex; + Standard_Real lambda1; + Standard_Real lambda2; + Standard_Integer FirstP; + Standard_Integer LastP; + Standard_Integer Nlignes; + Standard_Integer Ninc; + Standard_Integer NA; + Standard_Integer myfirstp; + Standard_Integer mylastp; + Standard_Integer resinit; + Standard_Integer resfin; + Standard_Integer nbP2d; + Standard_Integer nbP; + Standard_Integer nbpoles; + Standard_Integer deg; + Standard_Boolean done; + Standard_Boolean iscalculated; + Standard_Boolean isready; }; - - - - - - #endif // _BRepApprox_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfApprox_HeaderFile diff --git a/opencascade/BRepApprox_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfApprox.hxx b/opencascade/BRepApprox_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfApprox.hxx index c1cc26651..63ef1b5ef 100644 --- a/opencascade/BRepApprox_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfApprox.hxx +++ b/opencascade/BRepApprox_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfApprox.hxx @@ -31,42 +31,26 @@ class BRepApprox_ResConstraintOfMyGradientOfTheComputeLineBezierOfApprox; class BRepApprox_ParFunctionOfMyGradientOfTheComputeLineBezierOfApprox; class math_MultipleVarFunctionWithGradient; - - -class BRepApprox_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfApprox : public math_BFGS +class BRepApprox_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfApprox : public math_BFGS { public: - DEFINE_STANDARD_ALLOC - - Standard_EXPORT BRepApprox_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfApprox(math_MultipleVarFunctionWithGradient& F, const math_Vector& StartingPoint, const Standard_Real Tolerance3d, const Standard_Real Tolerance2d, const Standard_Real Eps, const Standard_Integer NbIterations = 200); - - Standard_EXPORT virtual Standard_Boolean IsSolutionReached (math_MultipleVarFunctionWithGradient& F) const Standard_OVERRIDE; - - + Standard_EXPORT BRepApprox_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfApprox( + math_MultipleVarFunctionWithGradient& F, + const math_Vector& StartingPoint, + const Standard_Real Tolerance3d, + const Standard_Real Tolerance2d, + const Standard_Real Eps, + const Standard_Integer NbIterations = 200); + Standard_EXPORT virtual Standard_Boolean IsSolutionReached( + math_MultipleVarFunctionWithGradient& F) const Standard_OVERRIDE; protected: - - - - - private: - - - Standard_Real myTol3d; Standard_Real myTol2d; - - }; - - - - - - #endif // _BRepApprox_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfApprox_HeaderFile diff --git a/opencascade/BRepApprox_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfApprox.hxx b/opencascade/BRepApprox_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfApprox.hxx index 679d65728..16b36b212 100644 --- a/opencascade/BRepApprox_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfApprox.hxx +++ b/opencascade/BRepApprox_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfApprox.hxx @@ -31,42 +31,26 @@ class BRepApprox_ResConstraintOfMyGradientbisOfTheComputeLineOfApprox; class BRepApprox_ParFunctionOfMyGradientbisOfTheComputeLineOfApprox; class math_MultipleVarFunctionWithGradient; - - -class BRepApprox_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfApprox : public math_BFGS +class BRepApprox_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfApprox : public math_BFGS { public: - DEFINE_STANDARD_ALLOC - - Standard_EXPORT BRepApprox_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfApprox(math_MultipleVarFunctionWithGradient& F, const math_Vector& StartingPoint, const Standard_Real Tolerance3d, const Standard_Real Tolerance2d, const Standard_Real Eps, const Standard_Integer NbIterations = 200); - - Standard_EXPORT virtual Standard_Boolean IsSolutionReached (math_MultipleVarFunctionWithGradient& F) const Standard_OVERRIDE; - - + Standard_EXPORT BRepApprox_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfApprox( + math_MultipleVarFunctionWithGradient& F, + const math_Vector& StartingPoint, + const Standard_Real Tolerance3d, + const Standard_Real Tolerance2d, + const Standard_Real Eps, + const Standard_Integer NbIterations = 200); + Standard_EXPORT virtual Standard_Boolean IsSolutionReached( + math_MultipleVarFunctionWithGradient& F) const Standard_OVERRIDE; protected: - - - - - private: - - - Standard_Real myTol3d; Standard_Real myTol2d; - - }; - - - - - - #endif // _BRepApprox_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfApprox_HeaderFile diff --git a/opencascade/BRepApprox_MyBSplGradientOfTheComputeLineOfApprox.hxx b/opencascade/BRepApprox_MyBSplGradientOfTheComputeLineOfApprox.hxx index 2a37e60fa..1862912c8 100644 --- a/opencascade/BRepApprox_MyBSplGradientOfTheComputeLineOfApprox.hxx +++ b/opencascade/BRepApprox_MyBSplGradientOfTheComputeLineOfApprox.hxx @@ -37,88 +37,99 @@ class BRepApprox_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfApprox; class BRepApprox_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfApprox; class AppParCurves_MultiBSpCurve; - - -class BRepApprox_MyBSplGradientOfTheComputeLineOfApprox +class BRepApprox_MyBSplGradientOfTheComputeLineOfApprox { public: - DEFINE_STANDARD_ALLOC - //! Tries to minimize the sum (square(||Qui - Bi*Pi||)) //! where Pui describe the approximating BSpline curves'Poles //! and Qi the MultiLine points with a parameter ui. //! In this algorithm, the parameters ui are the unknowns. //! The tolerance required on this sum is given by Tol. //! The desired degree of the resulting curve is Deg. - Standard_EXPORT BRepApprox_MyBSplGradientOfTheComputeLineOfApprox(const BRepApprox_TheMultiLineOfApprox& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, math_Vector& Parameters, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, const Standard_Integer Deg, const Standard_Real Tol3d, const Standard_Real Tol2d, const Standard_Integer NbIterations = 1); - + Standard_EXPORT BRepApprox_MyBSplGradientOfTheComputeLineOfApprox( + const BRepApprox_TheMultiLineOfApprox& SSP, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, + math_Vector& Parameters, + const TColStd_Array1OfReal& Knots, + const TColStd_Array1OfInteger& Mults, + const Standard_Integer Deg, + const Standard_Real Tol3d, + const Standard_Real Tol2d, + const Standard_Integer NbIterations = 1); + //! Tries to minimize the sum (square(||Qui - Bi*Pi||)) //! where Pui describe the approximating BSpline curves'Poles //! and Qi the MultiLine points with a parameter ui. //! In this algorithm, the parameters ui are the unknowns. //! The tolerance required on this sum is given by Tol. //! The desired degree of the resulting curve is Deg. - Standard_EXPORT BRepApprox_MyBSplGradientOfTheComputeLineOfApprox(const BRepApprox_TheMultiLineOfApprox& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, math_Vector& Parameters, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, const Standard_Integer Deg, const Standard_Real Tol3d, const Standard_Real Tol2d, const Standard_Integer NbIterations, const Standard_Real lambda1, const Standard_Real lambda2); - + Standard_EXPORT BRepApprox_MyBSplGradientOfTheComputeLineOfApprox( + const BRepApprox_TheMultiLineOfApprox& SSP, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, + math_Vector& Parameters, + const TColStd_Array1OfReal& Knots, + const TColStd_Array1OfInteger& Mults, + const Standard_Integer Deg, + const Standard_Real Tol3d, + const Standard_Real Tol2d, + const Standard_Integer NbIterations, + const Standard_Real lambda1, + const Standard_Real lambda2); + //! returns True if all has been correctly done. Standard_EXPORT Standard_Boolean IsDone() const; - + //! returns all the BSpline curves approximating the //! MultiLine SSP after minimization of the parameter. Standard_EXPORT AppParCurves_MultiBSpCurve Value() const; - + //! returns the difference between the old and the new //! approximation. //! An exception is raised if NotDone. //! An exception is raised if Index<1 or Index>NbParameters. - Standard_EXPORT Standard_Real Error (const Standard_Integer Index) const; - + Standard_EXPORT Standard_Real Error(const Standard_Integer Index) const; + //! returns the maximum difference between the old and the //! new approximation. Standard_EXPORT Standard_Real MaxError3d() const; - + //! returns the maximum difference between the old and the //! new approximation. Standard_EXPORT Standard_Real MaxError2d() const; - + //! returns the average error between the old and the //! new approximation. Standard_EXPORT Standard_Real AverageError() const; - - - protected: - - - Standard_EXPORT void Perform (const BRepApprox_TheMultiLineOfApprox& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, math_Vector& Parameters, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, const Standard_Integer Deg, const Standard_Real Tol3d, const Standard_Real Tol2d, const Standard_Integer NbIterations = 200); - - - + Standard_EXPORT void Perform(const BRepApprox_TheMultiLineOfApprox& SSP, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, + math_Vector& Parameters, + const TColStd_Array1OfReal& Knots, + const TColStd_Array1OfInteger& Mults, + const Standard_Integer Deg, + const Standard_Real Tol3d, + const Standard_Real Tol2d, + const Standard_Integer NbIterations = 200); private: - - - AppParCurves_MultiBSpCurve SCU; - math_Vector ParError; - Standard_Real AvError; - Standard_Real MError3d; - Standard_Real MError2d; - Standard_Real mylambda1; - Standard_Real mylambda2; - Standard_Boolean myIsLambdaDefined; - Standard_Boolean Done; - - + math_Vector ParError; + Standard_Real AvError; + Standard_Real MError3d; + Standard_Real MError2d; + Standard_Real mylambda1; + Standard_Real mylambda2; + Standard_Boolean myIsLambdaDefined; + Standard_Boolean Done; }; - - - - - - #endif // _BRepApprox_MyBSplGradientOfTheComputeLineOfApprox_HeaderFile diff --git a/opencascade/BRepApprox_MyGradientOfTheComputeLineBezierOfApprox.hxx b/opencascade/BRepApprox_MyGradientOfTheComputeLineBezierOfApprox.hxx index c193a09fd..9b7f34840 100644 --- a/opencascade/BRepApprox_MyGradientOfTheComputeLineBezierOfApprox.hxx +++ b/opencascade/BRepApprox_MyGradientOfTheComputeLineBezierOfApprox.hxx @@ -36,75 +36,61 @@ class BRepApprox_ParFunctionOfMyGradientOfTheComputeLineBezierOfApprox; class BRepApprox_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfApprox; class AppParCurves_MultiCurve; - - -class BRepApprox_MyGradientOfTheComputeLineBezierOfApprox +class BRepApprox_MyGradientOfTheComputeLineBezierOfApprox { public: - DEFINE_STANDARD_ALLOC - //! Tries to minimize the sum (square(||Qui - Bi*Pi||)) //! where Pui describe the approximating Bezier curves'Poles //! and Qi the MultiLine points with a parameter ui. //! In this algorithm, the parameters ui are the unknowns. //! The tolerance required on this sum is given by Tol. //! The desired degree of the resulting curve is Deg. - Standard_EXPORT BRepApprox_MyGradientOfTheComputeLineBezierOfApprox(const BRepApprox_TheMultiLineOfApprox& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, math_Vector& Parameters, const Standard_Integer Deg, const Standard_Real Tol3d, const Standard_Real Tol2d, const Standard_Integer NbIterations = 200); - + Standard_EXPORT BRepApprox_MyGradientOfTheComputeLineBezierOfApprox( + const BRepApprox_TheMultiLineOfApprox& SSP, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, + math_Vector& Parameters, + const Standard_Integer Deg, + const Standard_Real Tol3d, + const Standard_Real Tol2d, + const Standard_Integer NbIterations = 200); + //! returns True if all has been correctly done. Standard_EXPORT Standard_Boolean IsDone() const; - + //! returns all the Bezier curves approximating the //! MultiLine SSP after minimization of the parameter. Standard_EXPORT AppParCurves_MultiCurve Value() const; - + //! returns the difference between the old and the new //! approximation. //! An exception is raised if NotDone. //! An exception is raised if Index<1 or Index>NbParameters. - Standard_EXPORT Standard_Real Error (const Standard_Integer Index) const; - + Standard_EXPORT Standard_Real Error(const Standard_Integer Index) const; + //! returns the maximum difference between the old and the //! new approximation. Standard_EXPORT Standard_Real MaxError3d() const; - + //! returns the maximum difference between the old and the //! new approximation. Standard_EXPORT Standard_Real MaxError2d() const; - + //! returns the average error between the old and the //! new approximation. Standard_EXPORT Standard_Real AverageError() const; - - - protected: - - - - - private: - - - AppParCurves_MultiCurve SCU; - math_Vector ParError; - Standard_Real AvError; - Standard_Real MError3d; - Standard_Real MError2d; - Standard_Boolean Done; - - + math_Vector ParError; + Standard_Real AvError; + Standard_Real MError3d; + Standard_Real MError2d; + Standard_Boolean Done; }; - - - - - - #endif // _BRepApprox_MyGradientOfTheComputeLineBezierOfApprox_HeaderFile diff --git a/opencascade/BRepApprox_MyGradientbisOfTheComputeLineOfApprox.hxx b/opencascade/BRepApprox_MyGradientbisOfTheComputeLineOfApprox.hxx index 47b527742..e5080a481 100644 --- a/opencascade/BRepApprox_MyGradientbisOfTheComputeLineOfApprox.hxx +++ b/opencascade/BRepApprox_MyGradientbisOfTheComputeLineOfApprox.hxx @@ -36,75 +36,61 @@ class BRepApprox_ParFunctionOfMyGradientbisOfTheComputeLineOfApprox; class BRepApprox_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfApprox; class AppParCurves_MultiCurve; - - -class BRepApprox_MyGradientbisOfTheComputeLineOfApprox +class BRepApprox_MyGradientbisOfTheComputeLineOfApprox { public: - DEFINE_STANDARD_ALLOC - //! Tries to minimize the sum (square(||Qui - Bi*Pi||)) //! where Pui describe the approximating Bezier curves'Poles //! and Qi the MultiLine points with a parameter ui. //! In this algorithm, the parameters ui are the unknowns. //! The tolerance required on this sum is given by Tol. //! The desired degree of the resulting curve is Deg. - Standard_EXPORT BRepApprox_MyGradientbisOfTheComputeLineOfApprox(const BRepApprox_TheMultiLineOfApprox& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, math_Vector& Parameters, const Standard_Integer Deg, const Standard_Real Tol3d, const Standard_Real Tol2d, const Standard_Integer NbIterations = 200); - + Standard_EXPORT BRepApprox_MyGradientbisOfTheComputeLineOfApprox( + const BRepApprox_TheMultiLineOfApprox& SSP, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, + math_Vector& Parameters, + const Standard_Integer Deg, + const Standard_Real Tol3d, + const Standard_Real Tol2d, + const Standard_Integer NbIterations = 200); + //! returns True if all has been correctly done. Standard_EXPORT Standard_Boolean IsDone() const; - + //! returns all the Bezier curves approximating the //! MultiLine SSP after minimization of the parameter. Standard_EXPORT AppParCurves_MultiCurve Value() const; - + //! returns the difference between the old and the new //! approximation. //! An exception is raised if NotDone. //! An exception is raised if Index<1 or Index>NbParameters. - Standard_EXPORT Standard_Real Error (const Standard_Integer Index) const; - + Standard_EXPORT Standard_Real Error(const Standard_Integer Index) const; + //! returns the maximum difference between the old and the //! new approximation. Standard_EXPORT Standard_Real MaxError3d() const; - + //! returns the maximum difference between the old and the //! new approximation. Standard_EXPORT Standard_Real MaxError2d() const; - + //! returns the average error between the old and the //! new approximation. Standard_EXPORT Standard_Real AverageError() const; - - - protected: - - - - - private: - - - AppParCurves_MultiCurve SCU; - math_Vector ParError; - Standard_Real AvError; - Standard_Real MError3d; - Standard_Real MError2d; - Standard_Boolean Done; - - + math_Vector ParError; + Standard_Real AvError; + Standard_Real MError3d; + Standard_Real MError2d; + Standard_Boolean Done; }; - - - - - - #endif // _BRepApprox_MyGradientbisOfTheComputeLineOfApprox_HeaderFile diff --git a/opencascade/BRepApprox_ParFunctionOfMyGradientOfTheComputeLineBezierOfApprox.hxx b/opencascade/BRepApprox_ParFunctionOfMyGradientOfTheComputeLineBezierOfApprox.hxx index 3fab1fabc..d74b25cb8 100644 --- a/opencascade/BRepApprox_ParFunctionOfMyGradientOfTheComputeLineBezierOfApprox.hxx +++ b/opencascade/BRepApprox_ParFunctionOfMyGradientOfTheComputeLineBezierOfApprox.hxx @@ -35,110 +35,99 @@ class BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox; class BRepApprox_ResConstraintOfMyGradientOfTheComputeLineBezierOfApprox; class AppParCurves_MultiCurve; - - -class BRepApprox_ParFunctionOfMyGradientOfTheComputeLineBezierOfApprox : public math_MultipleVarFunctionWithGradient +class BRepApprox_ParFunctionOfMyGradientOfTheComputeLineBezierOfApprox + : public math_MultipleVarFunctionWithGradient { public: - DEFINE_STANDARD_ALLOC - //! initializes the fields of the function. The approximating //! curve has the desired degree Deg. - Standard_EXPORT BRepApprox_ParFunctionOfMyGradientOfTheComputeLineBezierOfApprox(const BRepApprox_TheMultiLineOfApprox& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, const math_Vector& Parameters, const Standard_Integer Deg); - + Standard_EXPORT BRepApprox_ParFunctionOfMyGradientOfTheComputeLineBezierOfApprox( + const BRepApprox_TheMultiLineOfApprox& SSP, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, + const math_Vector& Parameters, + const Standard_Integer Deg); + //! returns the number of variables of the function. It //! corresponds to the number of MultiPoints. Standard_EXPORT Standard_Integer NbVariables() const; - + //! this method computes the new approximation of the //! MultiLine //! SSP and calculates F = sum (||Pui - Bi*Pi||2) for each //! point of the MultiLine. - Standard_EXPORT Standard_Boolean Value (const math_Vector& X, Standard_Real& F); - + Standard_EXPORT Standard_Boolean Value(const math_Vector& X, Standard_Real& F); + //! returns the gradient G of the sum above for the //! parameters Xi. - Standard_EXPORT Standard_Boolean Gradient (const math_Vector& X, math_Vector& G); - + Standard_EXPORT Standard_Boolean Gradient(const math_Vector& X, math_Vector& G); + //! returns the value F=sum(||Pui - Bi*Pi||)2. //! returns the value G = grad(F) for the parameters Xi. - Standard_EXPORT Standard_Boolean Values (const math_Vector& X, Standard_Real& F, math_Vector& G); - + Standard_EXPORT Standard_Boolean Values(const math_Vector& X, Standard_Real& F, math_Vector& G); + //! returns the new parameters of the MultiLine. Standard_EXPORT const math_Vector& NewParameters() const; - + //! returns the MultiCurve approximating the set after //! computing the value F or Grad(F). Standard_EXPORT const AppParCurves_MultiCurve& CurveValue(); - + //! returns the distance between the MultiPoint of range //! IPoint and the curve CurveIndex. - Standard_EXPORT Standard_Real Error (const Standard_Integer IPoint, const Standard_Integer CurveIndex) const; - + Standard_EXPORT Standard_Real Error(const Standard_Integer IPoint, + const Standard_Integer CurveIndex) const; + //! returns the maximum distance between the points //! and the MultiCurve. Standard_EXPORT Standard_Real MaxError3d() const; - + //! returns the maximum distance between the points //! and the MultiCurve. Standard_EXPORT Standard_Real MaxError2d() const; - - Standard_EXPORT AppParCurves_Constraint FirstConstraint (const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, const Standard_Integer FirstPoint) const; - - Standard_EXPORT AppParCurves_Constraint LastConstraint (const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, const Standard_Integer LastPoint) const; - + Standard_EXPORT AppParCurves_Constraint + FirstConstraint(const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, + const Standard_Integer FirstPoint) const; + Standard_EXPORT AppParCurves_Constraint + LastConstraint(const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, + const Standard_Integer LastPoint) const; protected: - - //! this method is used each time Value or Gradient is //! needed. - Standard_EXPORT void Perform (const math_Vector& X); - - - + Standard_EXPORT void Perform(const math_Vector& X); private: - - - - Standard_Boolean Done; - BRepApprox_TheMultiLineOfApprox MyMultiLine; - AppParCurves_MultiCurve MyMultiCurve; - Standard_Integer Degre; - math_Vector myParameters; - Standard_Real FVal; - math_Vector ValGrad_F; - math_Matrix MyF; - math_Matrix PTLX; - math_Matrix PTLY; - math_Matrix PTLZ; - math_Matrix A; - math_Matrix DA; + Standard_Boolean Done; + BRepApprox_TheMultiLineOfApprox MyMultiLine; + AppParCurves_MultiCurve MyMultiCurve; + Standard_Integer Degre; + math_Vector myParameters; + Standard_Real FVal; + math_Vector ValGrad_F; + math_Matrix MyF; + math_Matrix PTLX; + math_Matrix PTLY; + math_Matrix PTLZ; + math_Matrix A; + math_Matrix DA; BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox MyLeastSquare; - Standard_Boolean Contraintes; - Standard_Integer NbP; - Standard_Integer NbCu; - Standard_Integer Adeb; - Standard_Integer Afin; - Handle(TColStd_HArray1OfInteger) tabdim; - Standard_Real ERR3d; - Standard_Real ERR2d; - Standard_Integer FirstP; - Standard_Integer LastP; - Handle(AppParCurves_HArray1OfConstraintCouple) myConstraints; - - + Standard_Boolean Contraintes; + Standard_Integer NbP; + Standard_Integer NbCu; + Standard_Integer Adeb; + Standard_Integer Afin; + Handle(TColStd_HArray1OfInteger) tabdim; + Standard_Real ERR3d; + Standard_Real ERR2d; + Standard_Integer FirstP; + Standard_Integer LastP; + Handle(AppParCurves_HArray1OfConstraintCouple) myConstraints; }; - - - - - - #endif // _BRepApprox_ParFunctionOfMyGradientOfTheComputeLineBezierOfApprox_HeaderFile diff --git a/opencascade/BRepApprox_ParFunctionOfMyGradientbisOfTheComputeLineOfApprox.hxx b/opencascade/BRepApprox_ParFunctionOfMyGradientbisOfTheComputeLineOfApprox.hxx index b063ac79a..6102b91ab 100644 --- a/opencascade/BRepApprox_ParFunctionOfMyGradientbisOfTheComputeLineOfApprox.hxx +++ b/opencascade/BRepApprox_ParFunctionOfMyGradientbisOfTheComputeLineOfApprox.hxx @@ -35,110 +35,99 @@ class BRepApprox_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox; class BRepApprox_ResConstraintOfMyGradientbisOfTheComputeLineOfApprox; class AppParCurves_MultiCurve; - - -class BRepApprox_ParFunctionOfMyGradientbisOfTheComputeLineOfApprox : public math_MultipleVarFunctionWithGradient +class BRepApprox_ParFunctionOfMyGradientbisOfTheComputeLineOfApprox + : public math_MultipleVarFunctionWithGradient { public: - DEFINE_STANDARD_ALLOC - //! initializes the fields of the function. The approximating //! curve has the desired degree Deg. - Standard_EXPORT BRepApprox_ParFunctionOfMyGradientbisOfTheComputeLineOfApprox(const BRepApprox_TheMultiLineOfApprox& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, const math_Vector& Parameters, const Standard_Integer Deg); - + Standard_EXPORT BRepApprox_ParFunctionOfMyGradientbisOfTheComputeLineOfApprox( + const BRepApprox_TheMultiLineOfApprox& SSP, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, + const math_Vector& Parameters, + const Standard_Integer Deg); + //! returns the number of variables of the function. It //! corresponds to the number of MultiPoints. Standard_EXPORT Standard_Integer NbVariables() const; - + //! this method computes the new approximation of the //! MultiLine //! SSP and calculates F = sum (||Pui - Bi*Pi||2) for each //! point of the MultiLine. - Standard_EXPORT Standard_Boolean Value (const math_Vector& X, Standard_Real& F); - + Standard_EXPORT Standard_Boolean Value(const math_Vector& X, Standard_Real& F); + //! returns the gradient G of the sum above for the //! parameters Xi. - Standard_EXPORT Standard_Boolean Gradient (const math_Vector& X, math_Vector& G); - + Standard_EXPORT Standard_Boolean Gradient(const math_Vector& X, math_Vector& G); + //! returns the value F=sum(||Pui - Bi*Pi||)2. //! returns the value G = grad(F) for the parameters Xi. - Standard_EXPORT Standard_Boolean Values (const math_Vector& X, Standard_Real& F, math_Vector& G); - + Standard_EXPORT Standard_Boolean Values(const math_Vector& X, Standard_Real& F, math_Vector& G); + //! returns the new parameters of the MultiLine. Standard_EXPORT const math_Vector& NewParameters() const; - + //! returns the MultiCurve approximating the set after //! computing the value F or Grad(F). Standard_EXPORT const AppParCurves_MultiCurve& CurveValue(); - + //! returns the distance between the MultiPoint of range //! IPoint and the curve CurveIndex. - Standard_EXPORT Standard_Real Error (const Standard_Integer IPoint, const Standard_Integer CurveIndex) const; - + Standard_EXPORT Standard_Real Error(const Standard_Integer IPoint, + const Standard_Integer CurveIndex) const; + //! returns the maximum distance between the points //! and the MultiCurve. Standard_EXPORT Standard_Real MaxError3d() const; - + //! returns the maximum distance between the points //! and the MultiCurve. Standard_EXPORT Standard_Real MaxError2d() const; - - Standard_EXPORT AppParCurves_Constraint FirstConstraint (const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, const Standard_Integer FirstPoint) const; - - Standard_EXPORT AppParCurves_Constraint LastConstraint (const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, const Standard_Integer LastPoint) const; - + Standard_EXPORT AppParCurves_Constraint + FirstConstraint(const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, + const Standard_Integer FirstPoint) const; + Standard_EXPORT AppParCurves_Constraint + LastConstraint(const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, + const Standard_Integer LastPoint) const; protected: - - //! this method is used each time Value or Gradient is //! needed. - Standard_EXPORT void Perform (const math_Vector& X); - - - + Standard_EXPORT void Perform(const math_Vector& X); private: - - - - Standard_Boolean Done; - BRepApprox_TheMultiLineOfApprox MyMultiLine; - AppParCurves_MultiCurve MyMultiCurve; - Standard_Integer Degre; - math_Vector myParameters; - Standard_Real FVal; - math_Vector ValGrad_F; - math_Matrix MyF; - math_Matrix PTLX; - math_Matrix PTLY; - math_Matrix PTLZ; - math_Matrix A; - math_Matrix DA; + Standard_Boolean Done; + BRepApprox_TheMultiLineOfApprox MyMultiLine; + AppParCurves_MultiCurve MyMultiCurve; + Standard_Integer Degre; + math_Vector myParameters; + Standard_Real FVal; + math_Vector ValGrad_F; + math_Matrix MyF; + math_Matrix PTLX; + math_Matrix PTLY; + math_Matrix PTLZ; + math_Matrix A; + math_Matrix DA; BRepApprox_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox MyLeastSquare; - Standard_Boolean Contraintes; - Standard_Integer NbP; - Standard_Integer NbCu; - Standard_Integer Adeb; - Standard_Integer Afin; - Handle(TColStd_HArray1OfInteger) tabdim; - Standard_Real ERR3d; - Standard_Real ERR2d; - Standard_Integer FirstP; - Standard_Integer LastP; - Handle(AppParCurves_HArray1OfConstraintCouple) myConstraints; - - + Standard_Boolean Contraintes; + Standard_Integer NbP; + Standard_Integer NbCu; + Standard_Integer Adeb; + Standard_Integer Afin; + Handle(TColStd_HArray1OfInteger) tabdim; + Standard_Real ERR3d; + Standard_Real ERR2d; + Standard_Integer FirstP; + Standard_Integer LastP; + Handle(AppParCurves_HArray1OfConstraintCouple) myConstraints; }; - - - - - - #endif // _BRepApprox_ParFunctionOfMyGradientbisOfTheComputeLineOfApprox_HeaderFile diff --git a/opencascade/BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox.hxx b/opencascade/BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox.hxx index 0989b7e7c..d3fd10ee2 100644 --- a/opencascade/BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox.hxx +++ b/opencascade/BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox.hxx @@ -42,15 +42,11 @@ class AppParCurves_MultiCurve; class AppParCurves_MultiBSpCurve; class math_Matrix; - - -class BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox +class BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox { public: - DEFINE_STANDARD_ALLOC - //! given a MultiLine, this algorithm computes the least //! square resolution using the Householder-QR method. //! If the first and/or the last point is a constraint @@ -67,11 +63,24 @@ public: //! and is also the same for each MultiLine point because //! they are approximated in parallel(so with the same //! parameter, only the vector B changes). - Standard_EXPORT BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox(const BRepApprox_TheMultiLineOfApprox& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const AppParCurves_Constraint FirstCons, const AppParCurves_Constraint LastCons, const math_Vector& Parameters, const Standard_Integer NbPol); - + Standard_EXPORT BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox( + const BRepApprox_TheMultiLineOfApprox& SSP, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const AppParCurves_Constraint FirstCons, + const AppParCurves_Constraint LastCons, + const math_Vector& Parameters, + const Standard_Integer NbPol); + //! Initializes the fields of the object. - Standard_EXPORT BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox(const BRepApprox_TheMultiLineOfApprox& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const AppParCurves_Constraint FirstCons, const AppParCurves_Constraint LastCons, const Standard_Integer NbPol); - + Standard_EXPORT BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox( + const BRepApprox_TheMultiLineOfApprox& SSP, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const AppParCurves_Constraint FirstCons, + const AppParCurves_Constraint LastCons, + const Standard_Integer NbPol); + //! given a MultiLine, this algorithm computes the least //! square resolution using the Householder-QR method. //! If the first and/or the last point is a constraint @@ -87,171 +96,192 @@ public: //! and is also the same for each MultiLine point because //! they are approximated in parallel(so with the same //! parameter, only the vector B changes). - Standard_EXPORT BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox(const BRepApprox_TheMultiLineOfApprox& SSP, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const AppParCurves_Constraint FirstCons, const AppParCurves_Constraint LastCons, const math_Vector& Parameters, const Standard_Integer NbPol); - + Standard_EXPORT BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox( + const BRepApprox_TheMultiLineOfApprox& SSP, + const TColStd_Array1OfReal& Knots, + const TColStd_Array1OfInteger& Mults, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const AppParCurves_Constraint FirstCons, + const AppParCurves_Constraint LastCons, + const math_Vector& Parameters, + const Standard_Integer NbPol); + //! Initializes the fields of the object. - Standard_EXPORT BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox(const BRepApprox_TheMultiLineOfApprox& SSP, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const AppParCurves_Constraint FirstCons, const AppParCurves_Constraint LastCons, const Standard_Integer NbPol); - + Standard_EXPORT BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox( + const BRepApprox_TheMultiLineOfApprox& SSP, + const TColStd_Array1OfReal& Knots, + const TColStd_Array1OfInteger& Mults, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const AppParCurves_Constraint FirstCons, + const AppParCurves_Constraint LastCons, + const Standard_Integer NbPol); + //! Is used after having initialized the fields. //! The case "CurvaturePoint" is not treated in this method. - Standard_EXPORT void Perform (const math_Vector& Parameters); - + Standard_EXPORT void Perform(const math_Vector& Parameters); + //! Is used after having initialized the fields. - Standard_EXPORT void Perform (const math_Vector& Parameters, const Standard_Real l1, const Standard_Real l2); - + Standard_EXPORT void Perform(const math_Vector& Parameters, + const Standard_Real l1, + const Standard_Real l2); + //! Is used after having initialized the fields. //! is the tangent vector at the first point. //! is the tangent vector at the last point. - Standard_EXPORT void Perform (const math_Vector& Parameters, const math_Vector& V1t, const math_Vector& V2t, const Standard_Real l1, const Standard_Real l2); - + Standard_EXPORT void Perform(const math_Vector& Parameters, + const math_Vector& V1t, + const math_Vector& V2t, + const Standard_Real l1, + const Standard_Real l2); + //! Is used after having initialized the fields. //! is the tangent vector at the first point. //! is the tangent vector at the last point. //! is the tangent vector at the first point. //! is the tangent vector at the last point. - Standard_EXPORT void Perform (const math_Vector& Parameters, const math_Vector& V1t, const math_Vector& V2t, const math_Vector& V1c, const math_Vector& V2c, const Standard_Real l1, const Standard_Real l2); - + Standard_EXPORT void Perform(const math_Vector& Parameters, + const math_Vector& V1t, + const math_Vector& V2t, + const math_Vector& V1c, + const math_Vector& V2c, + const Standard_Real l1, + const Standard_Real l2); + //! returns True if all has been correctly done. Standard_EXPORT Standard_Boolean IsDone() const; - + //! returns the result of the approximation, i.e. all the //! Curves. //! An exception is raised if NotDone. Standard_EXPORT AppParCurves_MultiCurve BezierValue(); - + //! returns the result of the approximation, i.e. all the //! Curves. //! An exception is raised if NotDone. Standard_EXPORT const AppParCurves_MultiBSpCurve& BSplineValue(); - + //! returns the function matrix used to approximate the //! set. Standard_EXPORT const math_Matrix& FunctionMatrix() const; - + //! returns the derivative function matrix used //! to approximate the set. Standard_EXPORT const math_Matrix& DerivativeFunctionMatrix() const; - + //! returns the maximum errors between the MultiLine //! and the approximation curves. F is the sum of the square //! distances. Grad is the derivative vector of the //! function F. - Standard_EXPORT void ErrorGradient (math_Vector& Grad, Standard_Real& F, Standard_Real& MaxE3d, Standard_Real& MaxE2d); - + Standard_EXPORT void ErrorGradient(math_Vector& Grad, + Standard_Real& F, + Standard_Real& MaxE3d, + Standard_Real& MaxE2d); + //! returns the distances between the points of the //! multiline and the approximation curves. Standard_EXPORT const math_Matrix& Distance(); - + //! returns the maximum errors between the MultiLine //! and the approximation curves. F is the sum of the square //! distances. - Standard_EXPORT void Error (Standard_Real& F, Standard_Real& MaxE3d, Standard_Real& MaxE2d); - + Standard_EXPORT void Error(Standard_Real& F, Standard_Real& MaxE3d, Standard_Real& MaxE2d); + //! returns the value (P2 - P1)/ V1 if the first point //! was a tangency point. Standard_EXPORT Standard_Real FirstLambda() const; - + //! returns the value (PN - PN-1)/ VN if the last point //! was a tangency point. Standard_EXPORT Standard_Real LastLambda() const; - + //! returns the matrix of points value. Standard_EXPORT const math_Matrix& Points() const; - + //! returns the matrix of resulting control points value. Standard_EXPORT const math_Matrix& Poles() const; - + //! Returns the indexes of the first non null values of //! A and DA. //! The values are non null from Index(ieme point) +1 //! to Index(ieme point) + degree +1. Standard_EXPORT const math_IntegerVector& KIndex() const; - - - protected: - - //! is used by the constructors above. - Standard_EXPORT void Init (const BRepApprox_TheMultiLineOfApprox& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint); - + Standard_EXPORT void Init(const BRepApprox_TheMultiLineOfApprox& SSP, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint); + //! returns the number of second member columns. //! Is used internally to initialize the fields. - Standard_EXPORT Standard_Integer NbBColumns (const BRepApprox_TheMultiLineOfApprox& SSP) const; - + Standard_EXPORT Standard_Integer NbBColumns(const BRepApprox_TheMultiLineOfApprox& SSP) const; + //! returns the first point being fitted. - Standard_EXPORT Standard_Integer TheFirstPoint (const AppParCurves_Constraint FirstCons, const Standard_Integer FirstPoint) const; - + Standard_EXPORT Standard_Integer TheFirstPoint(const AppParCurves_Constraint FirstCons, + const Standard_Integer FirstPoint) const; + //! returns the last point being fitted. - Standard_EXPORT Standard_Integer TheLastPoint (const AppParCurves_Constraint LastCons, const Standard_Integer LastPoint) const; - - //! Affects the fields in the case of a constraint point. - Standard_EXPORT void Affect (const BRepApprox_TheMultiLineOfApprox& SSP, const Standard_Integer Index, AppParCurves_Constraint& Cons, math_Vector& Vt, math_Vector& Vc); - - Standard_EXPORT void ComputeFunction (const math_Vector& Parameters); - - Standard_EXPORT void SearchIndex (math_IntegerVector& Index); - - //! computes internal matrixes for the resolution - Standard_EXPORT void MakeTAA (math_Vector& TheA, math_Vector& TheB); - - //! computes internal matrixes for the resolution - Standard_EXPORT void MakeTAA (math_Vector& TheA); - - //! computes internal matrixes for the resolution - Standard_EXPORT void MakeTAA (math_Vector& TheA, math_Matrix& TheB); + Standard_EXPORT Standard_Integer TheLastPoint(const AppParCurves_Constraint LastCons, + const Standard_Integer LastPoint) const; + //! Affects the fields in the case of a constraint point. + Standard_EXPORT void Affect(const BRepApprox_TheMultiLineOfApprox& SSP, + const Standard_Integer Index, + AppParCurves_Constraint& Cons, + math_Vector& Vt, + math_Vector& Vc); + Standard_EXPORT void ComputeFunction(const math_Vector& Parameters); + Standard_EXPORT void SearchIndex(math_IntegerVector& Index); -private: + //! computes internal matrixes for the resolution + Standard_EXPORT void MakeTAA(math_Vector& TheA, math_Vector& TheB); + //! computes internal matrixes for the resolution + Standard_EXPORT void MakeTAA(math_Vector& TheA); + //! computes internal matrixes for the resolution + Standard_EXPORT void MakeTAA(math_Vector& TheA, math_Matrix& TheB); - AppParCurves_Constraint FirstConstraint; - AppParCurves_Constraint LastConstraint; - AppParCurves_MultiBSpCurve SCU; - Handle(TColStd_HArray1OfReal) myknots; +private: + AppParCurves_Constraint FirstConstraint; + AppParCurves_Constraint LastConstraint; + AppParCurves_MultiBSpCurve SCU; + Handle(TColStd_HArray1OfReal) myknots; Handle(TColStd_HArray1OfInteger) mymults; - math_Matrix mypoles; - math_Matrix A; - math_Matrix DA; - math_Matrix B2; - math_Matrix mypoints; - math_Vector Vflatknots; - math_Vector Vec1t; - math_Vector Vec1c; - math_Vector Vec2t; - math_Vector Vec2c; - math_Matrix theError; - math_IntegerVector myindex; - Standard_Real lambda1; - Standard_Real lambda2; - Standard_Integer FirstP; - Standard_Integer LastP; - Standard_Integer Nlignes; - Standard_Integer Ninc; - Standard_Integer NA; - Standard_Integer myfirstp; - Standard_Integer mylastp; - Standard_Integer resinit; - Standard_Integer resfin; - Standard_Integer nbP2d; - Standard_Integer nbP; - Standard_Integer nbpoles; - Standard_Integer deg; - Standard_Boolean done; - Standard_Boolean iscalculated; - Standard_Boolean isready; - - + math_Matrix mypoles; + math_Matrix A; + math_Matrix DA; + math_Matrix B2; + math_Matrix mypoints; + math_Vector Vflatknots; + math_Vector Vec1t; + math_Vector Vec1c; + math_Vector Vec2t; + math_Vector Vec2c; + math_Matrix theError; + math_IntegerVector myindex; + Standard_Real lambda1; + Standard_Real lambda2; + Standard_Integer FirstP; + Standard_Integer LastP; + Standard_Integer Nlignes; + Standard_Integer Ninc; + Standard_Integer NA; + Standard_Integer myfirstp; + Standard_Integer mylastp; + Standard_Integer resinit; + Standard_Integer resfin; + Standard_Integer nbP2d; + Standard_Integer nbP; + Standard_Integer nbpoles; + Standard_Integer deg; + Standard_Boolean done; + Standard_Boolean iscalculated; + Standard_Boolean isready; }; - - - - - - #endif // _BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox_HeaderFile diff --git a/opencascade/BRepApprox_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox.hxx b/opencascade/BRepApprox_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox.hxx index 604d6ccba..504609164 100644 --- a/opencascade/BRepApprox_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox.hxx +++ b/opencascade/BRepApprox_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox.hxx @@ -42,15 +42,11 @@ class AppParCurves_MultiCurve; class AppParCurves_MultiBSpCurve; class math_Matrix; - - -class BRepApprox_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox +class BRepApprox_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox { public: - DEFINE_STANDARD_ALLOC - //! given a MultiLine, this algorithm computes the least //! square resolution using the Householder-QR method. //! If the first and/or the last point is a constraint @@ -67,11 +63,24 @@ public: //! and is also the same for each MultiLine point because //! they are approximated in parallel(so with the same //! parameter, only the vector B changes). - Standard_EXPORT BRepApprox_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox(const BRepApprox_TheMultiLineOfApprox& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const AppParCurves_Constraint FirstCons, const AppParCurves_Constraint LastCons, const math_Vector& Parameters, const Standard_Integer NbPol); - + Standard_EXPORT BRepApprox_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox( + const BRepApprox_TheMultiLineOfApprox& SSP, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const AppParCurves_Constraint FirstCons, + const AppParCurves_Constraint LastCons, + const math_Vector& Parameters, + const Standard_Integer NbPol); + //! Initializes the fields of the object. - Standard_EXPORT BRepApprox_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox(const BRepApprox_TheMultiLineOfApprox& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const AppParCurves_Constraint FirstCons, const AppParCurves_Constraint LastCons, const Standard_Integer NbPol); - + Standard_EXPORT BRepApprox_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox( + const BRepApprox_TheMultiLineOfApprox& SSP, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const AppParCurves_Constraint FirstCons, + const AppParCurves_Constraint LastCons, + const Standard_Integer NbPol); + //! given a MultiLine, this algorithm computes the least //! square resolution using the Householder-QR method. //! If the first and/or the last point is a constraint @@ -87,171 +96,192 @@ public: //! and is also the same for each MultiLine point because //! they are approximated in parallel(so with the same //! parameter, only the vector B changes). - Standard_EXPORT BRepApprox_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox(const BRepApprox_TheMultiLineOfApprox& SSP, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const AppParCurves_Constraint FirstCons, const AppParCurves_Constraint LastCons, const math_Vector& Parameters, const Standard_Integer NbPol); - + Standard_EXPORT BRepApprox_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox( + const BRepApprox_TheMultiLineOfApprox& SSP, + const TColStd_Array1OfReal& Knots, + const TColStd_Array1OfInteger& Mults, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const AppParCurves_Constraint FirstCons, + const AppParCurves_Constraint LastCons, + const math_Vector& Parameters, + const Standard_Integer NbPol); + //! Initializes the fields of the object. - Standard_EXPORT BRepApprox_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox(const BRepApprox_TheMultiLineOfApprox& SSP, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const AppParCurves_Constraint FirstCons, const AppParCurves_Constraint LastCons, const Standard_Integer NbPol); - + Standard_EXPORT BRepApprox_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox( + const BRepApprox_TheMultiLineOfApprox& SSP, + const TColStd_Array1OfReal& Knots, + const TColStd_Array1OfInteger& Mults, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const AppParCurves_Constraint FirstCons, + const AppParCurves_Constraint LastCons, + const Standard_Integer NbPol); + //! Is used after having initialized the fields. //! The case "CurvaturePoint" is not treated in this method. - Standard_EXPORT void Perform (const math_Vector& Parameters); - + Standard_EXPORT void Perform(const math_Vector& Parameters); + //! Is used after having initialized the fields. - Standard_EXPORT void Perform (const math_Vector& Parameters, const Standard_Real l1, const Standard_Real l2); - + Standard_EXPORT void Perform(const math_Vector& Parameters, + const Standard_Real l1, + const Standard_Real l2); + //! Is used after having initialized the fields. //! is the tangent vector at the first point. //! is the tangent vector at the last point. - Standard_EXPORT void Perform (const math_Vector& Parameters, const math_Vector& V1t, const math_Vector& V2t, const Standard_Real l1, const Standard_Real l2); - + Standard_EXPORT void Perform(const math_Vector& Parameters, + const math_Vector& V1t, + const math_Vector& V2t, + const Standard_Real l1, + const Standard_Real l2); + //! Is used after having initialized the fields. //! is the tangent vector at the first point. //! is the tangent vector at the last point. //! is the tangent vector at the first point. //! is the tangent vector at the last point. - Standard_EXPORT void Perform (const math_Vector& Parameters, const math_Vector& V1t, const math_Vector& V2t, const math_Vector& V1c, const math_Vector& V2c, const Standard_Real l1, const Standard_Real l2); - + Standard_EXPORT void Perform(const math_Vector& Parameters, + const math_Vector& V1t, + const math_Vector& V2t, + const math_Vector& V1c, + const math_Vector& V2c, + const Standard_Real l1, + const Standard_Real l2); + //! returns True if all has been correctly done. Standard_EXPORT Standard_Boolean IsDone() const; - + //! returns the result of the approximation, i.e. all the //! Curves. //! An exception is raised if NotDone. Standard_EXPORT AppParCurves_MultiCurve BezierValue(); - + //! returns the result of the approximation, i.e. all the //! Curves. //! An exception is raised if NotDone. Standard_EXPORT const AppParCurves_MultiBSpCurve& BSplineValue(); - + //! returns the function matrix used to approximate the //! set. Standard_EXPORT const math_Matrix& FunctionMatrix() const; - + //! returns the derivative function matrix used //! to approximate the set. Standard_EXPORT const math_Matrix& DerivativeFunctionMatrix() const; - + //! returns the maximum errors between the MultiLine //! and the approximation curves. F is the sum of the square //! distances. Grad is the derivative vector of the //! function F. - Standard_EXPORT void ErrorGradient (math_Vector& Grad, Standard_Real& F, Standard_Real& MaxE3d, Standard_Real& MaxE2d); - + Standard_EXPORT void ErrorGradient(math_Vector& Grad, + Standard_Real& F, + Standard_Real& MaxE3d, + Standard_Real& MaxE2d); + //! returns the distances between the points of the //! multiline and the approximation curves. Standard_EXPORT const math_Matrix& Distance(); - + //! returns the maximum errors between the MultiLine //! and the approximation curves. F is the sum of the square //! distances. - Standard_EXPORT void Error (Standard_Real& F, Standard_Real& MaxE3d, Standard_Real& MaxE2d); - + Standard_EXPORT void Error(Standard_Real& F, Standard_Real& MaxE3d, Standard_Real& MaxE2d); + //! returns the value (P2 - P1)/ V1 if the first point //! was a tangency point. Standard_EXPORT Standard_Real FirstLambda() const; - + //! returns the value (PN - PN-1)/ VN if the last point //! was a tangency point. Standard_EXPORT Standard_Real LastLambda() const; - + //! returns the matrix of points value. Standard_EXPORT const math_Matrix& Points() const; - + //! returns the matrix of resulting control points value. Standard_EXPORT const math_Matrix& Poles() const; - + //! Returns the indexes of the first non null values of //! A and DA. //! The values are non null from Index(ieme point) +1 //! to Index(ieme point) + degree +1. Standard_EXPORT const math_IntegerVector& KIndex() const; - - - protected: - - //! is used by the constructors above. - Standard_EXPORT void Init (const BRepApprox_TheMultiLineOfApprox& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint); - + Standard_EXPORT void Init(const BRepApprox_TheMultiLineOfApprox& SSP, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint); + //! returns the number of second member columns. //! Is used internally to initialize the fields. - Standard_EXPORT Standard_Integer NbBColumns (const BRepApprox_TheMultiLineOfApprox& SSP) const; - + Standard_EXPORT Standard_Integer NbBColumns(const BRepApprox_TheMultiLineOfApprox& SSP) const; + //! returns the first point being fitted. - Standard_EXPORT Standard_Integer TheFirstPoint (const AppParCurves_Constraint FirstCons, const Standard_Integer FirstPoint) const; - + Standard_EXPORT Standard_Integer TheFirstPoint(const AppParCurves_Constraint FirstCons, + const Standard_Integer FirstPoint) const; + //! returns the last point being fitted. - Standard_EXPORT Standard_Integer TheLastPoint (const AppParCurves_Constraint LastCons, const Standard_Integer LastPoint) const; - - //! Affects the fields in the case of a constraint point. - Standard_EXPORT void Affect (const BRepApprox_TheMultiLineOfApprox& SSP, const Standard_Integer Index, AppParCurves_Constraint& Cons, math_Vector& Vt, math_Vector& Vc); - - Standard_EXPORT void ComputeFunction (const math_Vector& Parameters); - - Standard_EXPORT void SearchIndex (math_IntegerVector& Index); - - //! computes internal matrixes for the resolution - Standard_EXPORT void MakeTAA (math_Vector& TheA, math_Vector& TheB); - - //! computes internal matrixes for the resolution - Standard_EXPORT void MakeTAA (math_Vector& TheA); - - //! computes internal matrixes for the resolution - Standard_EXPORT void MakeTAA (math_Vector& TheA, math_Matrix& TheB); + Standard_EXPORT Standard_Integer TheLastPoint(const AppParCurves_Constraint LastCons, + const Standard_Integer LastPoint) const; + //! Affects the fields in the case of a constraint point. + Standard_EXPORT void Affect(const BRepApprox_TheMultiLineOfApprox& SSP, + const Standard_Integer Index, + AppParCurves_Constraint& Cons, + math_Vector& Vt, + math_Vector& Vc); + Standard_EXPORT void ComputeFunction(const math_Vector& Parameters); + Standard_EXPORT void SearchIndex(math_IntegerVector& Index); -private: + //! computes internal matrixes for the resolution + Standard_EXPORT void MakeTAA(math_Vector& TheA, math_Vector& TheB); + //! computes internal matrixes for the resolution + Standard_EXPORT void MakeTAA(math_Vector& TheA); + //! computes internal matrixes for the resolution + Standard_EXPORT void MakeTAA(math_Vector& TheA, math_Matrix& TheB); - AppParCurves_Constraint FirstConstraint; - AppParCurves_Constraint LastConstraint; - AppParCurves_MultiBSpCurve SCU; - Handle(TColStd_HArray1OfReal) myknots; +private: + AppParCurves_Constraint FirstConstraint; + AppParCurves_Constraint LastConstraint; + AppParCurves_MultiBSpCurve SCU; + Handle(TColStd_HArray1OfReal) myknots; Handle(TColStd_HArray1OfInteger) mymults; - math_Matrix mypoles; - math_Matrix A; - math_Matrix DA; - math_Matrix B2; - math_Matrix mypoints; - math_Vector Vflatknots; - math_Vector Vec1t; - math_Vector Vec1c; - math_Vector Vec2t; - math_Vector Vec2c; - math_Matrix theError; - math_IntegerVector myindex; - Standard_Real lambda1; - Standard_Real lambda2; - Standard_Integer FirstP; - Standard_Integer LastP; - Standard_Integer Nlignes; - Standard_Integer Ninc; - Standard_Integer NA; - Standard_Integer myfirstp; - Standard_Integer mylastp; - Standard_Integer resinit; - Standard_Integer resfin; - Standard_Integer nbP2d; - Standard_Integer nbP; - Standard_Integer nbpoles; - Standard_Integer deg; - Standard_Boolean done; - Standard_Boolean iscalculated; - Standard_Boolean isready; - - + math_Matrix mypoles; + math_Matrix A; + math_Matrix DA; + math_Matrix B2; + math_Matrix mypoints; + math_Vector Vflatknots; + math_Vector Vec1t; + math_Vector Vec1c; + math_Vector Vec2t; + math_Vector Vec2c; + math_Matrix theError; + math_IntegerVector myindex; + Standard_Real lambda1; + Standard_Real lambda2; + Standard_Integer FirstP; + Standard_Integer LastP; + Standard_Integer Nlignes; + Standard_Integer Ninc; + Standard_Integer NA; + Standard_Integer myfirstp; + Standard_Integer mylastp; + Standard_Integer resinit; + Standard_Integer resfin; + Standard_Integer nbP2d; + Standard_Integer nbP; + Standard_Integer nbpoles; + Standard_Integer deg; + Standard_Boolean done; + Standard_Boolean iscalculated; + Standard_Boolean isready; }; - - - - - - #endif // _BRepApprox_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox_HeaderFile diff --git a/opencascade/BRepApprox_ResConstraintOfMyGradientOfTheComputeLineBezierOfApprox.hxx b/opencascade/BRepApprox_ResConstraintOfMyGradientOfTheComputeLineBezierOfApprox.hxx index 9810f75be..3c6482fc6 100644 --- a/opencascade/BRepApprox_ResConstraintOfMyGradientOfTheComputeLineBezierOfApprox.hxx +++ b/opencascade/BRepApprox_ResConstraintOfMyGradientOfTheComputeLineBezierOfApprox.hxx @@ -33,15 +33,11 @@ class BRepApprox_TheMultiLineToolOfApprox; class AppParCurves_MultiCurve; class math_Matrix; - - -class BRepApprox_ResConstraintOfMyGradientOfTheComputeLineBezierOfApprox +class BRepApprox_ResConstraintOfMyGradientOfTheComputeLineBezierOfApprox { public: - DEFINE_STANDARD_ALLOC - //! Given a MultiLine SSP with constraints points, this //! algorithm finds the best curve solution to approximate it. //! The poles from SCurv issued for example from the least @@ -52,67 +48,65 @@ public: //! and DA is the derivative bernstein matrix.(They can come //! from an approximation with ParLeastSquare.) //! The MultiCurve is modified. New MultiPoles are given. - Standard_EXPORT BRepApprox_ResConstraintOfMyGradientOfTheComputeLineBezierOfApprox(const BRepApprox_TheMultiLineOfApprox& SSP, AppParCurves_MultiCurve& SCurv, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const Handle(AppParCurves_HArray1OfConstraintCouple)& Constraints, const math_Matrix& Bern, const math_Matrix& DerivativeBern, const Standard_Real Tolerance = 1.0e-10); - + Standard_EXPORT BRepApprox_ResConstraintOfMyGradientOfTheComputeLineBezierOfApprox( + const BRepApprox_TheMultiLineOfApprox& SSP, + AppParCurves_MultiCurve& SCurv, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const Handle(AppParCurves_HArray1OfConstraintCouple)& Constraints, + const math_Matrix& Bern, + const math_Matrix& DerivativeBern, + const Standard_Real Tolerance = 1.0e-10); + //! returns True if all has been correctly done. Standard_EXPORT Standard_Boolean IsDone() const; - + //! returns the maximum difference value between the curve //! and the given points. Standard_EXPORT Standard_Real Error() const; - + Standard_EXPORT const math_Matrix& ConstraintMatrix() const; - + //! returns the duale variables of the system. Standard_EXPORT const math_Vector& Duale() const; - + //! Returns the derivative of the constraint matrix. - Standard_EXPORT const math_Matrix& ConstraintDerivative (const BRepApprox_TheMultiLineOfApprox& SSP, const math_Vector& Parameters, const Standard_Integer Deg, const math_Matrix& DA); - + Standard_EXPORT const math_Matrix& ConstraintDerivative( + const BRepApprox_TheMultiLineOfApprox& SSP, + const math_Vector& Parameters, + const Standard_Integer Deg, + const math_Matrix& DA); + //! returns the Inverse of Cont*Transposed(Cont), where //! Cont is the constraint matrix for the algorithm. Standard_EXPORT const math_Matrix& InverseMatrix() const; - - - protected: - - //! is used internally to create the fields. - Standard_EXPORT Standard_Integer NbConstraints (const BRepApprox_TheMultiLineOfApprox& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints) const; - - //! is internally used for the fields creation. - Standard_EXPORT Standard_Integer NbColumns (const BRepApprox_TheMultiLineOfApprox& SSP, const Standard_Integer Deg) const; - - + Standard_EXPORT Standard_Integer + NbConstraints(const BRepApprox_TheMultiLineOfApprox& SSP, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints) const; + //! is internally used for the fields creation. + Standard_EXPORT Standard_Integer NbColumns(const BRepApprox_TheMultiLineOfApprox& SSP, + const Standard_Integer Deg) const; private: - - - - Standard_Boolean Done; - Standard_Real Err; - math_Matrix Cont; - math_Matrix DeCont; - math_Vector Secont; - math_Matrix CTCinv; - math_Vector Vardua; - Standard_Integer IncPass; - Standard_Integer IncTan; - Standard_Integer IncCurv; + Standard_Boolean Done; + Standard_Real Err; + math_Matrix Cont; + math_Matrix DeCont; + math_Vector Secont; + math_Matrix CTCinv; + math_Vector Vardua; + Standard_Integer IncPass; + Standard_Integer IncTan; + Standard_Integer IncCurv; TColStd_Array1OfInteger IPas; TColStd_Array1OfInteger ITan; TColStd_Array1OfInteger ICurv; - - }; - - - - - - #endif // _BRepApprox_ResConstraintOfMyGradientOfTheComputeLineBezierOfApprox_HeaderFile diff --git a/opencascade/BRepApprox_ResConstraintOfMyGradientbisOfTheComputeLineOfApprox.hxx b/opencascade/BRepApprox_ResConstraintOfMyGradientbisOfTheComputeLineOfApprox.hxx index 2ab4d1597..c0420edf3 100644 --- a/opencascade/BRepApprox_ResConstraintOfMyGradientbisOfTheComputeLineOfApprox.hxx +++ b/opencascade/BRepApprox_ResConstraintOfMyGradientbisOfTheComputeLineOfApprox.hxx @@ -33,15 +33,11 @@ class BRepApprox_TheMultiLineToolOfApprox; class AppParCurves_MultiCurve; class math_Matrix; - - -class BRepApprox_ResConstraintOfMyGradientbisOfTheComputeLineOfApprox +class BRepApprox_ResConstraintOfMyGradientbisOfTheComputeLineOfApprox { public: - DEFINE_STANDARD_ALLOC - //! Given a MultiLine SSP with constraints points, this //! algorithm finds the best curve solution to approximate it. //! The poles from SCurv issued for example from the least @@ -52,67 +48,65 @@ public: //! and DA is the derivative bernstein matrix.(They can come //! from an approximation with ParLeastSquare.) //! The MultiCurve is modified. New MultiPoles are given. - Standard_EXPORT BRepApprox_ResConstraintOfMyGradientbisOfTheComputeLineOfApprox(const BRepApprox_TheMultiLineOfApprox& SSP, AppParCurves_MultiCurve& SCurv, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const Handle(AppParCurves_HArray1OfConstraintCouple)& Constraints, const math_Matrix& Bern, const math_Matrix& DerivativeBern, const Standard_Real Tolerance = 1.0e-10); - + Standard_EXPORT BRepApprox_ResConstraintOfMyGradientbisOfTheComputeLineOfApprox( + const BRepApprox_TheMultiLineOfApprox& SSP, + AppParCurves_MultiCurve& SCurv, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const Handle(AppParCurves_HArray1OfConstraintCouple)& Constraints, + const math_Matrix& Bern, + const math_Matrix& DerivativeBern, + const Standard_Real Tolerance = 1.0e-10); + //! returns True if all has been correctly done. Standard_EXPORT Standard_Boolean IsDone() const; - + //! returns the maximum difference value between the curve //! and the given points. Standard_EXPORT Standard_Real Error() const; - + Standard_EXPORT const math_Matrix& ConstraintMatrix() const; - + //! returns the duale variables of the system. Standard_EXPORT const math_Vector& Duale() const; - + //! Returns the derivative of the constraint matrix. - Standard_EXPORT const math_Matrix& ConstraintDerivative (const BRepApprox_TheMultiLineOfApprox& SSP, const math_Vector& Parameters, const Standard_Integer Deg, const math_Matrix& DA); - + Standard_EXPORT const math_Matrix& ConstraintDerivative( + const BRepApprox_TheMultiLineOfApprox& SSP, + const math_Vector& Parameters, + const Standard_Integer Deg, + const math_Matrix& DA); + //! returns the Inverse of Cont*Transposed(Cont), where //! Cont is the constraint matrix for the algorithm. Standard_EXPORT const math_Matrix& InverseMatrix() const; - - - protected: - - //! is used internally to create the fields. - Standard_EXPORT Standard_Integer NbConstraints (const BRepApprox_TheMultiLineOfApprox& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints) const; - - //! is internally used for the fields creation. - Standard_EXPORT Standard_Integer NbColumns (const BRepApprox_TheMultiLineOfApprox& SSP, const Standard_Integer Deg) const; - - + Standard_EXPORT Standard_Integer + NbConstraints(const BRepApprox_TheMultiLineOfApprox& SSP, + const Standard_Integer FirstPoint, + const Standard_Integer LastPoint, + const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints) const; + //! is internally used for the fields creation. + Standard_EXPORT Standard_Integer NbColumns(const BRepApprox_TheMultiLineOfApprox& SSP, + const Standard_Integer Deg) const; private: - - - - Standard_Boolean Done; - Standard_Real Err; - math_Matrix Cont; - math_Matrix DeCont; - math_Vector Secont; - math_Matrix CTCinv; - math_Vector Vardua; - Standard_Integer IncPass; - Standard_Integer IncTan; - Standard_Integer IncCurv; + Standard_Boolean Done; + Standard_Real Err; + math_Matrix Cont; + math_Matrix DeCont; + math_Vector Secont; + math_Matrix CTCinv; + math_Vector Vardua; + Standard_Integer IncPass; + Standard_Integer IncTan; + Standard_Integer IncCurv; TColStd_Array1OfInteger IPas; TColStd_Array1OfInteger ITan; TColStd_Array1OfInteger ICurv; - - }; - - - - - - #endif // _BRepApprox_ResConstraintOfMyGradientbisOfTheComputeLineOfApprox_HeaderFile diff --git a/opencascade/BRepApprox_SurfaceTool.hxx b/opencascade/BRepApprox_SurfaceTool.hxx index b41da2a54..c7381e4d4 100644 --- a/opencascade/BRepApprox_SurfaceTool.hxx +++ b/opencascade/BRepApprox_SurfaceTool.hxx @@ -34,115 +34,141 @@ class Geom_BezierSurface; class Geom_BSplineSurface; -class BRepApprox_SurfaceTool +class BRepApprox_SurfaceTool { public: - DEFINE_STANDARD_ALLOC - - static Standard_Real FirstUParameter (const BRepAdaptor_Surface& S); - - static Standard_Real FirstVParameter (const BRepAdaptor_Surface& S); - - static Standard_Real LastUParameter (const BRepAdaptor_Surface& S); - - static Standard_Real LastVParameter (const BRepAdaptor_Surface& S); - - static Standard_Integer NbUIntervals (const BRepAdaptor_Surface& S, const GeomAbs_Shape Sh); - - static Standard_Integer NbVIntervals (const BRepAdaptor_Surface& S, const GeomAbs_Shape Sh); - - static void UIntervals (const BRepAdaptor_Surface& S, TColStd_Array1OfReal& T, const GeomAbs_Shape Sh); - - static void VIntervals (const BRepAdaptor_Surface& S, TColStd_Array1OfReal& T, const GeomAbs_Shape Sh); - + static Standard_Real FirstUParameter(const BRepAdaptor_Surface& S); + + static Standard_Real FirstVParameter(const BRepAdaptor_Surface& S); + + static Standard_Real LastUParameter(const BRepAdaptor_Surface& S); + + static Standard_Real LastVParameter(const BRepAdaptor_Surface& S); + + static Standard_Integer NbUIntervals(const BRepAdaptor_Surface& S, const GeomAbs_Shape Sh); + + static Standard_Integer NbVIntervals(const BRepAdaptor_Surface& S, const GeomAbs_Shape Sh); + + static void UIntervals(const BRepAdaptor_Surface& S, + TColStd_Array1OfReal& T, + const GeomAbs_Shape Sh); + + static void VIntervals(const BRepAdaptor_Surface& S, + TColStd_Array1OfReal& T, + const GeomAbs_Shape Sh); + //! If >= - static Handle(Adaptor3d_Surface) UTrim (const BRepAdaptor_Surface& S, const Standard_Real First, const Standard_Real Last, const Standard_Real Tol); - + static Handle(Adaptor3d_Surface) UTrim(const BRepAdaptor_Surface& S, + const Standard_Real First, + const Standard_Real Last, + const Standard_Real Tol); + //! If >= - static Handle(Adaptor3d_Surface) VTrim (const BRepAdaptor_Surface& S, const Standard_Real First, const Standard_Real Last, const Standard_Real Tol); - - static Standard_Boolean IsUClosed (const BRepAdaptor_Surface& S); - - static Standard_Boolean IsVClosed (const BRepAdaptor_Surface& S); - - static Standard_Boolean IsUPeriodic (const BRepAdaptor_Surface& S); - - static Standard_Real UPeriod (const BRepAdaptor_Surface& S); - - static Standard_Boolean IsVPeriodic (const BRepAdaptor_Surface& S); - - static Standard_Real VPeriod (const BRepAdaptor_Surface& S); - - static gp_Pnt Value (const BRepAdaptor_Surface& S, const Standard_Real u, const Standard_Real v); - - static void D0 (const BRepAdaptor_Surface& S, const Standard_Real u, const Standard_Real v, gp_Pnt& P); - - static void D1 (const BRepAdaptor_Surface& S, const Standard_Real u, const Standard_Real v, gp_Pnt& P, gp_Vec& D1u, gp_Vec& D1v); - - static void D2 (const BRepAdaptor_Surface& S, const Standard_Real u, const Standard_Real v, gp_Pnt& P, gp_Vec& D1U, gp_Vec& D1V, gp_Vec& D2U, gp_Vec& D2V, gp_Vec& D2UV); - - static void D3 (const BRepAdaptor_Surface& S, const Standard_Real u, const Standard_Real v, gp_Pnt& P, gp_Vec& D1U, gp_Vec& D1V, gp_Vec& D2U, gp_Vec& D2V, gp_Vec& D2UV, gp_Vec& D3U, gp_Vec& D3V, gp_Vec& D3UUV, gp_Vec& D3UVV); - - static gp_Vec DN (const BRepAdaptor_Surface& S, const Standard_Real u, const Standard_Real v, const Standard_Integer Nu, const Standard_Integer Nv); - - static Standard_Real UResolution (const BRepAdaptor_Surface& S, const Standard_Real R3d); - - static Standard_Real VResolution (const BRepAdaptor_Surface& S, const Standard_Real R3d); - - static GeomAbs_SurfaceType GetType (const BRepAdaptor_Surface& S); - - static gp_Pln Plane (const BRepAdaptor_Surface& S); - - static gp_Cylinder Cylinder (const BRepAdaptor_Surface& S); - - static gp_Cone Cone (const BRepAdaptor_Surface& S); - - static gp_Torus Torus (const BRepAdaptor_Surface& S); - - static gp_Sphere Sphere (const BRepAdaptor_Surface& S); - - static Handle(Geom_BezierSurface) Bezier (const BRepAdaptor_Surface& S); - - static Handle(Geom_BSplineSurface) BSpline (const BRepAdaptor_Surface& S); - - static gp_Ax1 AxeOfRevolution (const BRepAdaptor_Surface& S); - - static gp_Dir Direction (const BRepAdaptor_Surface& S); - - static Handle(Adaptor3d_Curve) BasisCurve (const BRepAdaptor_Surface& S); - - Standard_EXPORT static Standard_Integer NbSamplesU (const BRepAdaptor_Surface& S); - - Standard_EXPORT static Standard_Integer NbSamplesV (const BRepAdaptor_Surface& S); - - Standard_EXPORT static Standard_Integer NbSamplesU (const BRepAdaptor_Surface& S, const Standard_Real u1, const Standard_Real u2); - - Standard_EXPORT static Standard_Integer NbSamplesV (const BRepAdaptor_Surface& S, const Standard_Real v1, const Standard_Real v2); + static Handle(Adaptor3d_Surface) VTrim(const BRepAdaptor_Surface& S, + const Standard_Real First, + const Standard_Real Last, + const Standard_Real Tol); + static Standard_Boolean IsUClosed(const BRepAdaptor_Surface& S); + static Standard_Boolean IsVClosed(const BRepAdaptor_Surface& S); + static Standard_Boolean IsUPeriodic(const BRepAdaptor_Surface& S); -protected: + static Standard_Real UPeriod(const BRepAdaptor_Surface& S); + static Standard_Boolean IsVPeriodic(const BRepAdaptor_Surface& S); + static Standard_Real VPeriod(const BRepAdaptor_Surface& S); + static gp_Pnt Value(const BRepAdaptor_Surface& S, const Standard_Real u, const Standard_Real v); + static void D0(const BRepAdaptor_Surface& S, + const Standard_Real u, + const Standard_Real v, + gp_Pnt& P); -private: + static void D1(const BRepAdaptor_Surface& S, + const Standard_Real u, + const Standard_Real v, + gp_Pnt& P, + gp_Vec& D1u, + gp_Vec& D1v); + static void D2(const BRepAdaptor_Surface& S, + const Standard_Real u, + const Standard_Real v, + gp_Pnt& P, + gp_Vec& D1U, + gp_Vec& D1V, + gp_Vec& D2U, + gp_Vec& D2V, + gp_Vec& D2UV); + static void D3(const BRepAdaptor_Surface& S, + const Standard_Real u, + const Standard_Real v, + gp_Pnt& P, + gp_Vec& D1U, + gp_Vec& D1V, + gp_Vec& D2U, + gp_Vec& D2V, + gp_Vec& D2UV, + gp_Vec& D3U, + gp_Vec& D3V, + gp_Vec& D3UUV, + gp_Vec& D3UVV); + static gp_Vec DN(const BRepAdaptor_Surface& S, + const Standard_Real u, + const Standard_Real v, + const Standard_Integer Nu, + const Standard_Integer Nv); + static Standard_Real UResolution(const BRepAdaptor_Surface& S, const Standard_Real R3d); -}; + static Standard_Real VResolution(const BRepAdaptor_Surface& S, const Standard_Real R3d); + static GeomAbs_SurfaceType GetType(const BRepAdaptor_Surface& S); -#include + static gp_Pln Plane(const BRepAdaptor_Surface& S); + + static gp_Cylinder Cylinder(const BRepAdaptor_Surface& S); + static gp_Cone Cone(const BRepAdaptor_Surface& S); + static gp_Torus Torus(const BRepAdaptor_Surface& S); + static gp_Sphere Sphere(const BRepAdaptor_Surface& S); + static Handle(Geom_BezierSurface) Bezier(const BRepAdaptor_Surface& S); + + static Handle(Geom_BSplineSurface) BSpline(const BRepAdaptor_Surface& S); + + static gp_Ax1 AxeOfRevolution(const BRepAdaptor_Surface& S); + + static gp_Dir Direction(const BRepAdaptor_Surface& S); + + static Handle(Adaptor3d_Curve) BasisCurve(const BRepAdaptor_Surface& S); + + Standard_EXPORT static Standard_Integer NbSamplesU(const BRepAdaptor_Surface& S); + + Standard_EXPORT static Standard_Integer NbSamplesV(const BRepAdaptor_Surface& S); + + Standard_EXPORT static Standard_Integer NbSamplesU(const BRepAdaptor_Surface& S, + const Standard_Real u1, + const Standard_Real u2); + + Standard_EXPORT static Standard_Integer NbSamplesV(const BRepAdaptor_Surface& S, + const Standard_Real v1, + const Standard_Real v2); + +protected: +private: +}; + +#include #endif // _BRepApprox_SurfaceTool_HeaderFile diff --git a/opencascade/BRepApprox_SurfaceTool.lxx b/opencascade/BRepApprox_SurfaceTool.lxx index 56daedd75..41e72709c 100644 --- a/opencascade/BRepApprox_SurfaceTool.lxx +++ b/opencascade/BRepApprox_SurfaceTool.lxx @@ -28,51 +28,68 @@ #include #include -inline Standard_Real BRepApprox_SurfaceTool::FirstUParameter(const BRepAdaptor_Surface& Surf){ return Surf.FirstUParameter(); } -inline Standard_Real BRepApprox_SurfaceTool::FirstVParameter(const BRepAdaptor_Surface& Surf){ return Surf.FirstVParameter();} -inline Standard_Real BRepApprox_SurfaceTool::LastUParameter(const BRepAdaptor_Surface& Surf){ return Surf.LastUParameter();} -inline Standard_Real BRepApprox_SurfaceTool::LastVParameter(const BRepAdaptor_Surface& Surf){ return Surf.LastVParameter();} +inline Standard_Real BRepApprox_SurfaceTool::FirstUParameter(const BRepAdaptor_Surface& Surf) +{ + return Surf.FirstUParameter(); +} + +inline Standard_Real BRepApprox_SurfaceTool::FirstVParameter(const BRepAdaptor_Surface& Surf) +{ + return Surf.FirstVParameter(); +} + +inline Standard_Real BRepApprox_SurfaceTool::LastUParameter(const BRepAdaptor_Surface& Surf) +{ + return Surf.LastUParameter(); +} + +inline Standard_Real BRepApprox_SurfaceTool::LastVParameter(const BRepAdaptor_Surface& Surf) +{ + return Surf.LastVParameter(); +} inline Standard_Integer BRepApprox_SurfaceTool::NbUIntervals(const BRepAdaptor_Surface& Surf, - const GeomAbs_Shape S){ + const GeomAbs_Shape S) +{ return Surf.NbUIntervals(S); } inline Standard_Integer BRepApprox_SurfaceTool::NbVIntervals(const BRepAdaptor_Surface& Surf, - const GeomAbs_Shape S){ + const GeomAbs_Shape S) +{ return Surf.NbVIntervals(S); } -inline void BRepApprox_SurfaceTool::UIntervals(const BRepAdaptor_Surface& Surf, - TColStd_Array1OfReal& Tab, - const GeomAbs_Shape S){ - Surf.UIntervals(Tab,S); +inline void BRepApprox_SurfaceTool::UIntervals(const BRepAdaptor_Surface& Surf, + TColStd_Array1OfReal& Tab, + const GeomAbs_Shape S) +{ + Surf.UIntervals(Tab, S); } -inline void BRepApprox_SurfaceTool::VIntervals(const BRepAdaptor_Surface& Surf, - TColStd_Array1OfReal& Tab, - const GeomAbs_Shape S){ - Surf.VIntervals(Tab,S); +inline void BRepApprox_SurfaceTool::VIntervals(const BRepAdaptor_Surface& Surf, + TColStd_Array1OfReal& Tab, + const GeomAbs_Shape S) +{ + Surf.VIntervals(Tab, S); } - -inline Handle(Adaptor3d_Surface) BRepApprox_SurfaceTool::UTrim(const BRepAdaptor_Surface& Surf, - const Standard_Real F, - const Standard_Real L, - const Standard_Real Tol) { - return Surf.UTrim(F,L,Tol); +inline Handle(Adaptor3d_Surface) BRepApprox_SurfaceTool::UTrim(const BRepAdaptor_Surface& Surf, + const Standard_Real F, + const Standard_Real L, + const Standard_Real Tol) +{ + return Surf.UTrim(F, L, Tol); } inline Handle(Adaptor3d_Surface) BRepApprox_SurfaceTool::VTrim(const BRepAdaptor_Surface& Surf, - const Standard_Real F, - const Standard_Real L, - const Standard_Real Tol) { - return Surf.VTrim(F,L,Tol); + const Standard_Real F, + const Standard_Real L, + const Standard_Real Tol) +{ + return Surf.VTrim(F, L, Tol); } - - - inline Standard_Boolean BRepApprox_SurfaceTool::IsUClosed(const BRepAdaptor_Surface& S) { return S.IsUClosed(); @@ -104,82 +121,82 @@ inline Standard_Real BRepApprox_SurfaceTool::VPeriod(const BRepAdaptor_Surface& } inline gp_Pnt BRepApprox_SurfaceTool::Value(const BRepAdaptor_Surface& S, - const Standard_Real U, - const Standard_Real V ) + const Standard_Real U, + const Standard_Real V) { - return S.Value(U,V); + return S.Value(U, V); } inline void BRepApprox_SurfaceTool::D0(const BRepAdaptor_Surface& S, - const Standard_Real U, - const Standard_Real V, - gp_Pnt& P) + const Standard_Real U, + const Standard_Real V, + gp_Pnt& P) { - S.D0(U,V,P); + S.D0(U, V, P); } inline void BRepApprox_SurfaceTool::D1(const BRepAdaptor_Surface& S, - const Standard_Real U, - const Standard_Real V, - gp_Pnt& P, - gp_Vec& D1U, - gp_Vec& D1V) + const Standard_Real U, + const Standard_Real V, + gp_Pnt& P, + gp_Vec& D1U, + gp_Vec& D1V) { - S.D1(U,V,P,D1U,D1V); + S.D1(U, V, P, D1U, D1V); } inline void BRepApprox_SurfaceTool::D2(const BRepAdaptor_Surface& S, - const Standard_Real U, - const Standard_Real V, - gp_Pnt& P, - gp_Vec& D1U, - gp_Vec& D1V, - gp_Vec& D2U, - gp_Vec& D2V, - gp_Vec& D2UV) + const Standard_Real U, + const Standard_Real V, + gp_Pnt& P, + gp_Vec& D1U, + gp_Vec& D1V, + gp_Vec& D2U, + gp_Vec& D2V, + gp_Vec& D2UV) { - S.D2(U,V,P,D1U,D1V,D2U,D2V,D2UV); + S.D2(U, V, P, D1U, D1V, D2U, D2V, D2UV); } inline void BRepApprox_SurfaceTool::D3(const BRepAdaptor_Surface& S, - const Standard_Real U, - const Standard_Real V, - gp_Pnt& P, - gp_Vec& D1U, - gp_Vec& D1V, - gp_Vec& D2U, - gp_Vec& D2V, - gp_Vec& D2UV, - gp_Vec& D3U, - gp_Vec& D3V, - gp_Vec& D3UUV, - gp_Vec& D3UVV) -{ - S.D3(U,V,P,D1U,D1V,D2U,D2V,D2UV,D3U,D3V,D3UUV,D3UVV); + const Standard_Real U, + const Standard_Real V, + gp_Pnt& P, + gp_Vec& D1U, + gp_Vec& D1V, + gp_Vec& D2U, + gp_Vec& D2V, + gp_Vec& D2UV, + gp_Vec& D3U, + gp_Vec& D3V, + gp_Vec& D3UUV, + gp_Vec& D3UVV) +{ + S.D3(U, V, P, D1U, D1V, D2U, D2V, D2UV, D3U, D3V, D3UUV, D3UVV); } inline gp_Vec BRepApprox_SurfaceTool::DN(const BRepAdaptor_Surface& S, - const Standard_Real U, - const Standard_Real V, - const Standard_Integer Nu, - const Standard_Integer Nv) + const Standard_Real U, + const Standard_Real V, + const Standard_Integer Nu, + const Standard_Integer Nv) { - return S.DN(U,V,Nu,Nv); + return S.DN(U, V, Nu, Nv); } inline Standard_Real BRepApprox_SurfaceTool::UResolution(const BRepAdaptor_Surface& S, - const Standard_Real R3d) + const Standard_Real R3d) { return S.UResolution(R3d); } inline Standard_Real BRepApprox_SurfaceTool::VResolution(const BRepAdaptor_Surface& S, - const Standard_Real R3d) + const Standard_Real R3d) { return S.VResolution(R3d); } -inline GeomAbs_SurfaceType BRepApprox_SurfaceTool::GetType(const BRepAdaptor_Surface& S ) +inline GeomAbs_SurfaceType BRepApprox_SurfaceTool::GetType(const BRepAdaptor_Surface& S) { return S.GetType(); } @@ -189,44 +206,47 @@ inline gp_Pln BRepApprox_SurfaceTool::Plane(const BRepAdaptor_Surface& S) return S.Plane(); } -inline gp_Cylinder BRepApprox_SurfaceTool::Cylinder(const BRepAdaptor_Surface& S) +inline gp_Cylinder BRepApprox_SurfaceTool::Cylinder(const BRepAdaptor_Surface& S) { return S.Cylinder(); } -inline gp_Cone BRepApprox_SurfaceTool::Cone(const BRepAdaptor_Surface& S) +inline gp_Cone BRepApprox_SurfaceTool::Cone(const BRepAdaptor_Surface& S) { return S.Cone(); } -inline gp_Sphere BRepApprox_SurfaceTool::Sphere(const BRepAdaptor_Surface& S) +inline gp_Sphere BRepApprox_SurfaceTool::Sphere(const BRepAdaptor_Surface& S) { return S.Sphere(); } -inline gp_Torus BRepApprox_SurfaceTool::Torus(const BRepAdaptor_Surface& S) +inline gp_Torus BRepApprox_SurfaceTool::Torus(const BRepAdaptor_Surface& S) { return S.Torus(); } - -inline Handle(Geom_BezierSurface) BRepApprox_SurfaceTool::Bezier(const BRepAdaptor_Surface& S) { - return(S.Bezier()); +inline Handle(Geom_BezierSurface) BRepApprox_SurfaceTool::Bezier(const BRepAdaptor_Surface& S) +{ + return (S.Bezier()); } -inline Handle(Geom_BSplineSurface) BRepApprox_SurfaceTool::BSpline(const BRepAdaptor_Surface& S) { - return(S.BSpline()); +inline Handle(Geom_BSplineSurface) BRepApprox_SurfaceTool::BSpline(const BRepAdaptor_Surface& S) +{ + return (S.BSpline()); } - -inline gp_Ax1 BRepApprox_SurfaceTool::AxeOfRevolution(const BRepAdaptor_Surface& S) { - return(S.AxeOfRevolution()); +inline gp_Ax1 BRepApprox_SurfaceTool::AxeOfRevolution(const BRepAdaptor_Surface& S) +{ + return (S.AxeOfRevolution()); } -inline gp_Dir BRepApprox_SurfaceTool::Direction(const BRepAdaptor_Surface& S) { - return(S.Direction()); +inline gp_Dir BRepApprox_SurfaceTool::Direction(const BRepAdaptor_Surface& S) +{ + return (S.Direction()); } -inline Handle(Adaptor3d_Curve) BRepApprox_SurfaceTool::BasisCurve(const BRepAdaptor_Surface& S) { - return(S.BasisCurve()); +inline Handle(Adaptor3d_Curve) BRepApprox_SurfaceTool::BasisCurve(const BRepAdaptor_Surface& S) +{ + return (S.BasisCurve()); } diff --git a/opencascade/BRepApprox_TheComputeLineBezierOfApprox.hxx b/opencascade/BRepApprox_TheComputeLineBezierOfApprox.hxx index 297853fc0..5bb169746 100644 --- a/opencascade/BRepApprox_TheComputeLineBezierOfApprox.hxx +++ b/opencascade/BRepApprox_TheComputeLineBezierOfApprox.hxx @@ -43,149 +43,190 @@ class BRepApprox_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfApprox; class AppParCurves_MultiCurve; class AppParCurves_MultiBSpCurve; - - -class BRepApprox_TheComputeLineBezierOfApprox +class BRepApprox_TheComputeLineBezierOfApprox { public: - DEFINE_STANDARD_ALLOC - //! The MultiLine will be approximated until tolerances //! will be reached. //! The approximation will be done from degreemin to degreemax //! with a cutting if the corresponding boolean is True. //! If is True, the computation will be done with //! no iteration at all. - Standard_EXPORT BRepApprox_TheComputeLineBezierOfApprox(const BRepApprox_TheMultiLineOfApprox& Line, const Standard_Integer degreemin = 4, const Standard_Integer degreemax = 8, const Standard_Real Tolerance3d = 1.0e-3, const Standard_Real Tolerance2d = 1.0e-6, const Standard_Integer NbIterations = 5, const Standard_Boolean cutting = Standard_True, const Approx_ParametrizationType parametrization = Approx_ChordLength, const Standard_Boolean Squares = Standard_False); - + Standard_EXPORT BRepApprox_TheComputeLineBezierOfApprox( + const BRepApprox_TheMultiLineOfApprox& Line, + const Standard_Integer degreemin = 4, + const Standard_Integer degreemax = 8, + const Standard_Real Tolerance3d = 1.0e-3, + const Standard_Real Tolerance2d = 1.0e-6, + const Standard_Integer NbIterations = 5, + const Standard_Boolean cutting = Standard_True, + const Approx_ParametrizationType parametrization = Approx_ChordLength, + const Standard_Boolean Squares = Standard_False); + //! The MultiLine will be approximated until tolerances //! will be reached. //! The approximation will be done from degreemin to degreemax //! with a cutting if the corresponding boolean is True. //! If is True, the computation will be done with //! no iteration at all. - Standard_EXPORT BRepApprox_TheComputeLineBezierOfApprox(const BRepApprox_TheMultiLineOfApprox& Line, const math_Vector& Parameters, const Standard_Integer degreemin = 4, const Standard_Integer degreemax = 8, const Standard_Real Tolerance3d = 1.0e-03, const Standard_Real Tolerance2d = 1.0e-06, const Standard_Integer NbIterations = 5, const Standard_Boolean cutting = Standard_True, const Standard_Boolean Squares = Standard_False); - + Standard_EXPORT BRepApprox_TheComputeLineBezierOfApprox( + const BRepApprox_TheMultiLineOfApprox& Line, + const math_Vector& Parameters, + const Standard_Integer degreemin = 4, + const Standard_Integer degreemax = 8, + const Standard_Real Tolerance3d = 1.0e-03, + const Standard_Real Tolerance2d = 1.0e-06, + const Standard_Integer NbIterations = 5, + const Standard_Boolean cutting = Standard_True, + const Standard_Boolean Squares = Standard_False); + //! Initializes the fields of the algorithm. - Standard_EXPORT BRepApprox_TheComputeLineBezierOfApprox(const math_Vector& Parameters, const Standard_Integer degreemin = 4, const Standard_Integer degreemax = 8, const Standard_Real Tolerance3d = 1.0e-03, const Standard_Real Tolerance2d = 1.0e-06, const Standard_Integer NbIterations = 5, const Standard_Boolean cutting = Standard_True, const Standard_Boolean Squares = Standard_False); - + Standard_EXPORT BRepApprox_TheComputeLineBezierOfApprox( + const math_Vector& Parameters, + const Standard_Integer degreemin = 4, + const Standard_Integer degreemax = 8, + const Standard_Real Tolerance3d = 1.0e-03, + const Standard_Real Tolerance2d = 1.0e-06, + const Standard_Integer NbIterations = 5, + const Standard_Boolean cutting = Standard_True, + const Standard_Boolean Squares = Standard_False); + //! Initializes the fields of the algorithm. - Standard_EXPORT BRepApprox_TheComputeLineBezierOfApprox(const Standard_Integer degreemin = 4, const Standard_Integer degreemax = 8, const Standard_Real Tolerance3d = 1.0e-03, const Standard_Real Tolerance2d = 1.0e-06, const Standard_Integer NbIterations = 5, const Standard_Boolean cutting = Standard_True, const Approx_ParametrizationType parametrization = Approx_ChordLength, const Standard_Boolean Squares = Standard_False); - + Standard_EXPORT BRepApprox_TheComputeLineBezierOfApprox( + const Standard_Integer degreemin = 4, + const Standard_Integer degreemax = 8, + const Standard_Real Tolerance3d = 1.0e-03, + const Standard_Real Tolerance2d = 1.0e-06, + const Standard_Integer NbIterations = 5, + const Standard_Boolean cutting = Standard_True, + const Approx_ParametrizationType parametrization = Approx_ChordLength, + const Standard_Boolean Squares = Standard_False); + //! Initializes the fields of the algorithm. - Standard_EXPORT void Init (const Standard_Integer degreemin = 4, const Standard_Integer degreemax = 8, const Standard_Real Tolerance3d = 1.0e-03, const Standard_Real Tolerance2d = 1.0e-06, const Standard_Integer NbIterations = 5, const Standard_Boolean cutting = Standard_True, const Approx_ParametrizationType parametrization = Approx_ChordLength, const Standard_Boolean Squares = Standard_False); - + Standard_EXPORT void Init(const Standard_Integer degreemin = 4, + const Standard_Integer degreemax = 8, + const Standard_Real Tolerance3d = 1.0e-03, + const Standard_Real Tolerance2d = 1.0e-06, + const Standard_Integer NbIterations = 5, + const Standard_Boolean cutting = Standard_True, + const Approx_ParametrizationType parametrization = Approx_ChordLength, + const Standard_Boolean Squares = Standard_False); + //! runs the algorithm after having initialized the fields. - Standard_EXPORT void Perform (const BRepApprox_TheMultiLineOfApprox& Line); - + Standard_EXPORT void Perform(const BRepApprox_TheMultiLineOfApprox& Line); + //! changes the degrees of the approximation. - Standard_EXPORT void SetDegrees (const Standard_Integer degreemin, const Standard_Integer degreemax); - + Standard_EXPORT void SetDegrees(const Standard_Integer degreemin, + const Standard_Integer degreemax); + //! Changes the tolerances of the approximation. - Standard_EXPORT void SetTolerances (const Standard_Real Tolerance3d, const Standard_Real Tolerance2d); - + Standard_EXPORT void SetTolerances(const Standard_Real Tolerance3d, + const Standard_Real Tolerance2d); + //! changes the first and the last constraint points. - Standard_EXPORT void SetConstraints (const AppParCurves_Constraint firstC, const AppParCurves_Constraint lastC); - + Standard_EXPORT void SetConstraints(const AppParCurves_Constraint firstC, + const AppParCurves_Constraint lastC); + //! returns False if at a moment of the approximation, //! the status NoApproximation has been sent by the user //! when more points were needed. Standard_EXPORT Standard_Boolean IsAllApproximated() const; - + //! returns False if the status NoPointsAdded has been sent. Standard_EXPORT Standard_Boolean IsToleranceReached() const; - + //! returns the tolerances 2d and 3d of the MultiCurve. - Standard_EXPORT void Error (const Standard_Integer Index, Standard_Real& tol3d, Standard_Real& tol2d) const; - + Standard_EXPORT void Error(const Standard_Integer Index, + Standard_Real& tol3d, + Standard_Real& tol2d) const; + //! Returns the number of MultiCurve doing the approximation //! of the MultiLine. Standard_EXPORT Standard_Integer NbMultiCurves() const; - + //! returns the result of the approximation. - Standard_EXPORT const AppParCurves_MultiCurve& Value (const Standard_Integer Index = 1) const; - + Standard_EXPORT const AppParCurves_MultiCurve& Value(const Standard_Integer Index = 1) const; + //! returns the result of the approximation. - Standard_EXPORT AppParCurves_MultiCurve& ChangeValue (const Standard_Integer Index = 1); - + Standard_EXPORT AppParCurves_MultiCurve& ChangeValue(const Standard_Integer Index = 1); + //! returns the result of the approximation. Standard_EXPORT const AppParCurves_MultiBSpCurve& SplineValue(); - + //! returns the type of parametrization - Standard_EXPORT Approx_ParametrizationType Parametrization () const; - + Standard_EXPORT Approx_ParametrizationType Parametrization() const; + //! returns the new parameters of the approximation //! corresponding to the points of the multicurve . - Standard_EXPORT const TColStd_Array1OfReal& Parameters (const Standard_Integer Index = 1) const; + Standard_EXPORT const TColStd_Array1OfReal& Parameters(const Standard_Integer Index = 1) const; protected: - - - - - private: - - //! is internally used in the algorithm. - Standard_EXPORT Standard_Boolean Compute (const BRepApprox_TheMultiLineOfApprox& Line, - const Standard_Integer fpt, - const Standard_Integer lpt, - math_Vector& Para, - Standard_Real& TheTol3d, - Standard_Real& TheTol2d, - Standard_Integer& indbad); - + Standard_EXPORT Standard_Boolean Compute(const BRepApprox_TheMultiLineOfApprox& Line, + const Standard_Integer fpt, + const Standard_Integer lpt, + math_Vector& Para, + Standard_Real& TheTol3d, + Standard_Real& TheTol2d, + Standard_Integer& indbad); + //! is internally used in the algorithm. - Standard_EXPORT Standard_Boolean ComputeCurve (const BRepApprox_TheMultiLineOfApprox& Line, const Standard_Integer firspt, const Standard_Integer lastpt); - + Standard_EXPORT Standard_Boolean ComputeCurve(const BRepApprox_TheMultiLineOfApprox& Line, + const Standard_Integer firspt, + const Standard_Integer lastpt); + //! computes new parameters between firstP and lastP. - Standard_EXPORT void Parameters (const BRepApprox_TheMultiLineOfApprox& Line, const Standard_Integer firstP, const Standard_Integer LastP, math_Vector& TheParameters) const; - - Standard_EXPORT Standard_Real SearchFirstLambda (const BRepApprox_TheMultiLineOfApprox& Line, const math_Vector& Para, const math_Vector& V, const Standard_Integer index) const; - - Standard_EXPORT Standard_Real SearchLastLambda (const BRepApprox_TheMultiLineOfApprox& Line, const math_Vector& Para, const math_Vector& V, const Standard_Integer index) const; - - Standard_EXPORT void FirstTangencyVector (const BRepApprox_TheMultiLineOfApprox& Line, const Standard_Integer index, math_Vector& V) const; - - Standard_EXPORT void LastTangencyVector (const BRepApprox_TheMultiLineOfApprox& Line, const Standard_Integer index, math_Vector& V) const; - - - AppParCurves_SequenceOfMultiCurve myMultiCurves; - AppParCurves_MultiCurve TheMultiCurve; - AppParCurves_MultiBSpCurve myspline; - Standard_Boolean alldone; - Standard_Boolean tolreached; - Approx_ParametrizationType Par; - Handle(TColStd_HArray1OfReal) myParameters; - Handle(TColStd_HArray1OfReal) myfirstParam; - Approx_SequenceOfHArray1OfReal myPar; - TColStd_SequenceOfReal Tolers3d; - TColStd_SequenceOfReal Tolers2d; + Standard_EXPORT void Parameters(const BRepApprox_TheMultiLineOfApprox& Line, + const Standard_Integer firstP, + const Standard_Integer LastP, + math_Vector& TheParameters) const; + + Standard_EXPORT Standard_Real SearchFirstLambda(const BRepApprox_TheMultiLineOfApprox& Line, + const math_Vector& Para, + const math_Vector& V, + const Standard_Integer index) const; + + Standard_EXPORT Standard_Real SearchLastLambda(const BRepApprox_TheMultiLineOfApprox& Line, + const math_Vector& Para, + const math_Vector& V, + const Standard_Integer index) const; + + Standard_EXPORT void FirstTangencyVector(const BRepApprox_TheMultiLineOfApprox& Line, + const Standard_Integer index, + math_Vector& V) const; + + Standard_EXPORT void LastTangencyVector(const BRepApprox_TheMultiLineOfApprox& Line, + const Standard_Integer index, + math_Vector& V) const; + + AppParCurves_SequenceOfMultiCurve myMultiCurves; + AppParCurves_MultiCurve TheMultiCurve; + AppParCurves_MultiBSpCurve myspline; + Standard_Boolean alldone; + Standard_Boolean tolreached; + Approx_ParametrizationType Par; + Handle(TColStd_HArray1OfReal) myParameters; + Handle(TColStd_HArray1OfReal) myfirstParam; + Approx_SequenceOfHArray1OfReal myPar; + TColStd_SequenceOfReal Tolers3d; + TColStd_SequenceOfReal Tolers2d; Handle(AppParCurves_HArray1OfConstraintCouple) myConstraints; - Standard_Integer mydegremin; - Standard_Integer mydegremax; - Standard_Real mytol3d; - Standard_Real mytol2d; - Standard_Real currenttol3d; - Standard_Real currenttol2d; - Standard_Boolean mycut; - Standard_Boolean mysquares; - Standard_Integer myitermax; - AppParCurves_Constraint myfirstC; - AppParCurves_Constraint mylastC; - Standard_Integer myMultiLineNb; - Standard_Boolean myIsClear; - - + Standard_Integer mydegremin; + Standard_Integer mydegremax; + Standard_Real mytol3d; + Standard_Real mytol2d; + Standard_Real currenttol3d; + Standard_Real currenttol2d; + Standard_Boolean mycut; + Standard_Boolean mysquares; + Standard_Integer myitermax; + AppParCurves_Constraint myfirstC; + AppParCurves_Constraint mylastC; + Standard_Integer myMultiLineNb; + Standard_Boolean myIsClear; }; - - - - - - #endif // _BRepApprox_TheComputeLineBezierOfApprox_HeaderFile diff --git a/opencascade/BRepApprox_TheComputeLineOfApprox.hxx b/opencascade/BRepApprox_TheComputeLineOfApprox.hxx index 721d3ac5b..f26f38f05 100644 --- a/opencascade/BRepApprox_TheComputeLineOfApprox.hxx +++ b/opencascade/BRepApprox_TheComputeLineOfApprox.hxx @@ -45,15 +45,11 @@ class BRepApprox_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfApprox; class AppParCurves_MultiBSpCurve; class AppParCurves_MultiCurve; - - -class BRepApprox_TheComputeLineOfApprox +class BRepApprox_TheComputeLineOfApprox { public: - DEFINE_STANDARD_ALLOC - //! The MultiLine will be approximated until tolerances //! will be reached. //! The approximation will be done from degreemin to degreemax @@ -63,58 +59,103 @@ public: //! //! The multiplicities of the internal knots is set by //! default. - Standard_EXPORT BRepApprox_TheComputeLineOfApprox(const BRepApprox_TheMultiLineOfApprox& Line, const Standard_Integer degreemin = 4, const Standard_Integer degreemax = 8, const Standard_Real Tolerance3d = 1.0e-3, const Standard_Real Tolerance2d = 1.0e-6, const Standard_Integer NbIterations = 5, const Standard_Boolean cutting = Standard_True, const Approx_ParametrizationType parametrization = Approx_ChordLength, const Standard_Boolean Squares = Standard_False); - + Standard_EXPORT BRepApprox_TheComputeLineOfApprox( + const BRepApprox_TheMultiLineOfApprox& Line, + const Standard_Integer degreemin = 4, + const Standard_Integer degreemax = 8, + const Standard_Real Tolerance3d = 1.0e-3, + const Standard_Real Tolerance2d = 1.0e-6, + const Standard_Integer NbIterations = 5, + const Standard_Boolean cutting = Standard_True, + const Approx_ParametrizationType parametrization = Approx_ChordLength, + const Standard_Boolean Squares = Standard_False); + //! The MultiLine will be approximated until tolerances //! will be reached. //! The approximation will be done from degreemin to degreemax //! with a cutting if the corresponding boolean is True. //! If is True, the computation will be done with //! no iteration at all. - Standard_EXPORT BRepApprox_TheComputeLineOfApprox(const BRepApprox_TheMultiLineOfApprox& Line, const math_Vector& Parameters, const Standard_Integer degreemin = 4, const Standard_Integer degreemax = 8, const Standard_Real Tolerance3d = 1.0e-03, const Standard_Real Tolerance2d = 1.0e-06, const Standard_Integer NbIterations = 5, const Standard_Boolean cutting = Standard_True, const Standard_Boolean Squares = Standard_False); - + Standard_EXPORT BRepApprox_TheComputeLineOfApprox( + const BRepApprox_TheMultiLineOfApprox& Line, + const math_Vector& Parameters, + const Standard_Integer degreemin = 4, + const Standard_Integer degreemax = 8, + const Standard_Real Tolerance3d = 1.0e-03, + const Standard_Real Tolerance2d = 1.0e-06, + const Standard_Integer NbIterations = 5, + const Standard_Boolean cutting = Standard_True, + const Standard_Boolean Squares = Standard_False); + //! Initializes the fields of the algorithm. - Standard_EXPORT BRepApprox_TheComputeLineOfApprox(const math_Vector& Parameters, const Standard_Integer degreemin = 4, const Standard_Integer degreemax = 8, const Standard_Real Tolerance3d = 1.0e-03, const Standard_Real Tolerance2d = 1.0e-06, const Standard_Integer NbIterations = 5, const Standard_Boolean cutting = Standard_True, const Standard_Boolean Squares = Standard_False); - + Standard_EXPORT BRepApprox_TheComputeLineOfApprox( + const math_Vector& Parameters, + const Standard_Integer degreemin = 4, + const Standard_Integer degreemax = 8, + const Standard_Real Tolerance3d = 1.0e-03, + const Standard_Real Tolerance2d = 1.0e-06, + const Standard_Integer NbIterations = 5, + const Standard_Boolean cutting = Standard_True, + const Standard_Boolean Squares = Standard_False); + //! Initializes the fields of the algorithm. - Standard_EXPORT BRepApprox_TheComputeLineOfApprox(const Standard_Integer degreemin = 4, const Standard_Integer degreemax = 8, const Standard_Real Tolerance3d = 1.0e-03, const Standard_Real Tolerance2d = 1.0e-06, const Standard_Integer NbIterations = 5, const Standard_Boolean cutting = Standard_True, const Approx_ParametrizationType parametrization = Approx_ChordLength, const Standard_Boolean Squares = Standard_False); - + Standard_EXPORT BRepApprox_TheComputeLineOfApprox( + const Standard_Integer degreemin = 4, + const Standard_Integer degreemax = 8, + const Standard_Real Tolerance3d = 1.0e-03, + const Standard_Real Tolerance2d = 1.0e-06, + const Standard_Integer NbIterations = 5, + const Standard_Boolean cutting = Standard_True, + const Approx_ParametrizationType parametrization = Approx_ChordLength, + const Standard_Boolean Squares = Standard_False); + //! Constructs an interpolation of the MultiLine //! The result will be a C2 curve of degree 3. - Standard_EXPORT void Interpol (const BRepApprox_TheMultiLineOfApprox& Line); - + Standard_EXPORT void Interpol(const BRepApprox_TheMultiLineOfApprox& Line); + //! Initializes the fields of the algorithm. - Standard_EXPORT void Init (const Standard_Integer degreemin = 4, const Standard_Integer degreemax = 8, const Standard_Real Tolerance3d = 1.0e-03, const Standard_Real Tolerance2d = 1.0e-06, const Standard_Integer NbIterations = 5, const Standard_Boolean cutting = Standard_True, const Approx_ParametrizationType parametrization = Approx_ChordLength, const Standard_Boolean Squares = Standard_False); - + Standard_EXPORT void Init(const Standard_Integer degreemin = 4, + const Standard_Integer degreemax = 8, + const Standard_Real Tolerance3d = 1.0e-03, + const Standard_Real Tolerance2d = 1.0e-06, + const Standard_Integer NbIterations = 5, + const Standard_Boolean cutting = Standard_True, + const Approx_ParametrizationType parametrization = Approx_ChordLength, + const Standard_Boolean Squares = Standard_False); + //! runs the algorithm after having initialized the fields. - Standard_EXPORT void Perform (const BRepApprox_TheMultiLineOfApprox& Line); - + Standard_EXPORT void Perform(const BRepApprox_TheMultiLineOfApprox& Line); + //! The approximation will begin with the //! set of parameters . - Standard_EXPORT void SetParameters (const math_Vector& ThePar); - + Standard_EXPORT void SetParameters(const math_Vector& ThePar); + //! The approximation will be done with the //! set of knots . The multiplicities will be set //! with the degree and the desired continuity. - Standard_EXPORT void SetKnots (const TColStd_Array1OfReal& Knots); - + Standard_EXPORT void SetKnots(const TColStd_Array1OfReal& Knots); + //! The approximation will be done with the //! set of knots and the multiplicities . - Standard_EXPORT void SetKnotsAndMultiplicities (const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults); - + Standard_EXPORT void SetKnotsAndMultiplicities(const TColStd_Array1OfReal& Knots, + const TColStd_Array1OfInteger& Mults); + //! changes the degrees of the approximation. - Standard_EXPORT void SetDegrees (const Standard_Integer degreemin, const Standard_Integer degreemax); - + Standard_EXPORT void SetDegrees(const Standard_Integer degreemin, + const Standard_Integer degreemax); + //! Changes the tolerances of the approximation. - Standard_EXPORT void SetTolerances (const Standard_Real Tolerance3d, const Standard_Real Tolerance2d); - + Standard_EXPORT void SetTolerances(const Standard_Real Tolerance3d, + const Standard_Real Tolerance2d); + //! sets the continuity of the spline. //! if C = 2, the spline will be C2. - Standard_EXPORT void SetContinuity (const Standard_Integer C); - + Standard_EXPORT void SetContinuity(const Standard_Integer C); + //! changes the first and the last constraint points. - Standard_EXPORT void SetConstraints (const AppParCurves_Constraint firstC, const AppParCurves_Constraint lastC); - + Standard_EXPORT void SetConstraints(const AppParCurves_Constraint firstC, + const AppParCurves_Constraint lastC); + //! Sets periodic flag. //! If thePeriodic = Standard_True, algorithm tries to build periodic //! multicurve using corresponding C1 boundary condition for first and last multipoints. @@ -125,93 +166,99 @@ public: //! the status NoApproximation has been sent by the user //! when more points were needed. Standard_EXPORT Standard_Boolean IsAllApproximated() const; - + //! returns False if the status NoPointsAdded has been sent. Standard_EXPORT Standard_Boolean IsToleranceReached() const; - + //! returns the tolerances 2d and 3d of the MultiBSpCurve. - Standard_EXPORT void Error (Standard_Real& tol3d, Standard_Real& tol2d) const; - + Standard_EXPORT void Error(Standard_Real& tol3d, Standard_Real& tol2d) const; + //! returns the result of the approximation. Standard_EXPORT const AppParCurves_MultiBSpCurve& Value() const; - + //! returns the result of the approximation. Standard_EXPORT AppParCurves_MultiBSpCurve& ChangeValue(); - + //! returns the new parameters of the approximation //! corresponding to the points of the MultiBSpCurve. Standard_EXPORT const TColStd_Array1OfReal& Parameters() const; - - - protected: - - - - - private: - - //! is internally used in the algorithm. - Standard_EXPORT Standard_Boolean Compute (const BRepApprox_TheMultiLineOfApprox& Line, const Standard_Integer fpt, const Standard_Integer lpt, math_Vector& Para, const TColStd_Array1OfReal& Knots, TColStd_Array1OfInteger& Mults); - + Standard_EXPORT Standard_Boolean Compute(const BRepApprox_TheMultiLineOfApprox& Line, + const Standard_Integer fpt, + const Standard_Integer lpt, + math_Vector& Para, + const TColStd_Array1OfReal& Knots, + TColStd_Array1OfInteger& Mults); + //! is internally used in the algorithm. - Standard_EXPORT Standard_Boolean ComputeCurve (const BRepApprox_TheMultiLineOfApprox& Line, const Standard_Integer firspt, const Standard_Integer lastpt); - - //! computes new parameters between firstP and lastP. - Standard_EXPORT void Parameters (const BRepApprox_TheMultiLineOfApprox& Line, const Standard_Integer firstP, const Standard_Integer LastP, math_Vector& TheParameters) const; - - Standard_EXPORT Standard_Real SearchFirstLambda (const BRepApprox_TheMultiLineOfApprox& Line, const math_Vector& Para, const TColStd_Array1OfReal& Knots, const math_Vector& V, const Standard_Integer index) const; - - Standard_EXPORT Standard_Real SearchLastLambda (const BRepApprox_TheMultiLineOfApprox& Line, const math_Vector& Para, const TColStd_Array1OfReal& Knots, const math_Vector& V, const Standard_Integer index) const; - - Standard_EXPORT void TangencyVector (const BRepApprox_TheMultiLineOfApprox& Line, const AppParCurves_MultiCurve& C, const Standard_Real U, math_Vector& V) const; - - Standard_EXPORT void FirstTangencyVector (const BRepApprox_TheMultiLineOfApprox& Line, const Standard_Integer index, math_Vector& V) const; - - Standard_EXPORT void LastTangencyVector (const BRepApprox_TheMultiLineOfApprox& Line, const Standard_Integer index, math_Vector& V) const; - - Standard_EXPORT void FindRealConstraints (const BRepApprox_TheMultiLineOfApprox& Line); - - - AppParCurves_MultiBSpCurve TheMultiBSpCurve; - Standard_Boolean alldone; - Standard_Boolean tolreached; - Approx_ParametrizationType Par; - Handle(TColStd_HArray1OfReal) myParameters; - Handle(TColStd_HArray1OfReal) myfirstParam; - Handle(TColStd_HArray1OfReal) myknots; - Handle(TColStd_HArray1OfInteger) mymults; - Standard_Boolean myhasknots; - Standard_Boolean myhasmults; - Handle(AppParCurves_HArray1OfConstraintCouple) myConstraints; - Standard_Integer mydegremin; - Standard_Integer mydegremax; - Standard_Real mytol3d; - Standard_Real mytol2d; - Standard_Real currenttol3d; - Standard_Real currenttol2d; - Standard_Boolean mycut; - Standard_Boolean mysquares; - Standard_Integer myitermax; - AppParCurves_Constraint myfirstC; - AppParCurves_Constraint mylastC; - AppParCurves_Constraint realfirstC; - AppParCurves_Constraint reallastC; - Standard_Integer mycont; - Standard_Real mylambda1; - Standard_Real mylambda2; - Standard_Boolean myPeriodic; + Standard_EXPORT Standard_Boolean ComputeCurve(const BRepApprox_TheMultiLineOfApprox& Line, + const Standard_Integer firspt, + const Standard_Integer lastpt); + //! computes new parameters between firstP and lastP. + Standard_EXPORT void Parameters(const BRepApprox_TheMultiLineOfApprox& Line, + const Standard_Integer firstP, + const Standard_Integer LastP, + math_Vector& TheParameters) const; -}; + Standard_EXPORT Standard_Real SearchFirstLambda(const BRepApprox_TheMultiLineOfApprox& Line, + const math_Vector& Para, + const TColStd_Array1OfReal& Knots, + const math_Vector& V, + const Standard_Integer index) const; + Standard_EXPORT Standard_Real SearchLastLambda(const BRepApprox_TheMultiLineOfApprox& Line, + const math_Vector& Para, + const TColStd_Array1OfReal& Knots, + const math_Vector& V, + const Standard_Integer index) const; + Standard_EXPORT void TangencyVector(const BRepApprox_TheMultiLineOfApprox& Line, + const AppParCurves_MultiCurve& C, + const Standard_Real U, + math_Vector& V) const; + Standard_EXPORT void FirstTangencyVector(const BRepApprox_TheMultiLineOfApprox& Line, + const Standard_Integer index, + math_Vector& V) const; + Standard_EXPORT void LastTangencyVector(const BRepApprox_TheMultiLineOfApprox& Line, + const Standard_Integer index, + math_Vector& V) const; + Standard_EXPORT void FindRealConstraints(const BRepApprox_TheMultiLineOfApprox& Line); + AppParCurves_MultiBSpCurve TheMultiBSpCurve; + Standard_Boolean alldone; + Standard_Boolean tolreached; + Approx_ParametrizationType Par; + Handle(TColStd_HArray1OfReal) myParameters; + Handle(TColStd_HArray1OfReal) myfirstParam; + Handle(TColStd_HArray1OfReal) myknots; + Handle(TColStd_HArray1OfInteger) mymults; + Standard_Boolean myhasknots; + Standard_Boolean myhasmults; + Handle(AppParCurves_HArray1OfConstraintCouple) myConstraints; + Standard_Integer mydegremin; + Standard_Integer mydegremax; + Standard_Real mytol3d; + Standard_Real mytol2d; + Standard_Real currenttol3d; + Standard_Real currenttol2d; + Standard_Boolean mycut; + Standard_Boolean mysquares; + Standard_Integer myitermax; + AppParCurves_Constraint myfirstC; + AppParCurves_Constraint mylastC; + AppParCurves_Constraint realfirstC; + AppParCurves_Constraint reallastC; + Standard_Integer mycont; + Standard_Real mylambda1; + Standard_Real mylambda2; + Standard_Boolean myPeriodic; +}; #endif // _BRepApprox_TheComputeLineOfApprox_HeaderFile diff --git a/opencascade/BRepApprox_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfApprox.hxx b/opencascade/BRepApprox_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfApprox.hxx index c36d41577..e9b09e5de 100644 --- a/opencascade/BRepApprox_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfApprox.hxx +++ b/opencascade/BRepApprox_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfApprox.hxx @@ -34,83 +34,77 @@ class BRepAdaptor_Surface; class BRepApprox_SurfaceTool; class math_Matrix; - - -class BRepApprox_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfApprox : public math_FunctionSetWithDerivatives +class BRepApprox_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfApprox + : public math_FunctionSetWithDerivatives { public: - DEFINE_STANDARD_ALLOC - Standard_EXPORT BRepApprox_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfApprox(const BRepAdaptor_Surface& S1, const BRepAdaptor_Surface& S2); - + Standard_EXPORT BRepApprox_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfApprox( + const BRepAdaptor_Surface& S1, + const BRepAdaptor_Surface& S2); + Standard_EXPORT Standard_Integer NbVariables() const; - + Standard_EXPORT Standard_Integer NbEquations() const; - - Standard_EXPORT Standard_Boolean Value (const math_Vector& X, math_Vector& F); - - Standard_EXPORT Standard_Boolean Derivatives (const math_Vector& X, math_Matrix& D); - - Standard_EXPORT Standard_Boolean Values (const math_Vector& X, math_Vector& F, math_Matrix& D); - - Standard_EXPORT void ComputeParameters (const IntImp_ConstIsoparametric ChoixIso, const TColStd_Array1OfReal& Param, math_Vector& UVap, math_Vector& BornInf, math_Vector& BornSup, math_Vector& Tolerance); - - //! returns somme des fi*fi - Standard_Real Root() const; - - gp_Pnt Point() const; - - Standard_EXPORT Standard_Boolean IsTangent (const math_Vector& UVap, TColStd_Array1OfReal& Param, IntImp_ConstIsoparametric& BestChoix); - - gp_Dir Direction() const; - - gp_Dir2d DirectionOnS1() const; - - gp_Dir2d DirectionOnS2() const; - - const BRepAdaptor_Surface& AuxillarSurface1() const; - - const BRepAdaptor_Surface& AuxillarSurface2() const; + Standard_EXPORT Standard_Boolean Value(const math_Vector& X, math_Vector& F); + Standard_EXPORT Standard_Boolean Derivatives(const math_Vector& X, math_Matrix& D); + Standard_EXPORT Standard_Boolean Values(const math_Vector& X, math_Vector& F, math_Matrix& D); -protected: + Standard_EXPORT void ComputeParameters(const IntImp_ConstIsoparametric ChoixIso, + const TColStd_Array1OfReal& Param, + math_Vector& UVap, + math_Vector& BornInf, + math_Vector& BornSup, + math_Vector& Tolerance); + //! returns somme des fi*fi + Standard_Real Root() const; + gp_Pnt Point() const; + Standard_EXPORT Standard_Boolean IsTangent(const math_Vector& UVap, + TColStd_Array1OfReal& Param, + IntImp_ConstIsoparametric& BestChoix); + gp_Dir Direction() const; -private: + gp_Dir2d DirectionOnS1() const; + gp_Dir2d DirectionOnS2() const; + const BRepAdaptor_Surface& AuxillarSurface1() const; - Standard_Address surf1; - Standard_Address surf2; - gp_Pnt pntsol1; - gp_Pnt pntsol2; - Standard_Real f[3]; - Standard_Boolean compute; - Standard_Boolean tangent; - Standard_Real tgduv[4]; - gp_Vec dpuv[4]; - IntImp_ConstIsoparametric chxIso; - Standard_Real paramConst; - Standard_Real ua0; - Standard_Real va0; - Standard_Real ua1; - Standard_Real va1; - Standard_Real ub0; - Standard_Real vb0; - Standard_Real ub1; - Standard_Real vb1; - Standard_Real ures1; - Standard_Real ures2; - Standard_Real vres1; - Standard_Real vres2; - + const BRepAdaptor_Surface& AuxillarSurface2() const; +protected: +private: + Standard_Address surf1; + Standard_Address surf2; + gp_Pnt pntsol1; + gp_Pnt pntsol2; + Standard_Real f[3]; + Standard_Boolean compute; + Standard_Boolean tangent; + Standard_Real tgduv[4]; + gp_Vec dpuv[4]; + IntImp_ConstIsoparametric chxIso; + Standard_Real paramConst; + Standard_Real ua0; + Standard_Real va0; + Standard_Real ua1; + Standard_Real va1; + Standard_Real ub0; + Standard_Real vb0; + Standard_Real ub1; + Standard_Real vb1; + Standard_Real ures1; + Standard_Real ures2; + Standard_Real vres1; + Standard_Real vres2; }; #define ThePSurface BRepAdaptor_Surface @@ -129,7 +123,4 @@ private: #undef IntImp_ZerParFunc #undef IntImp_ZerParFunc_hxx - - - #endif // _BRepApprox_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfApprox_HeaderFile diff --git a/opencascade/BRepApprox_TheImpPrmSvSurfacesOfApprox.hxx b/opencascade/BRepApprox_TheImpPrmSvSurfacesOfApprox.hxx index ff53052db..ee98da40f 100644 --- a/opencascade/BRepApprox_TheImpPrmSvSurfacesOfApprox.hxx +++ b/opencascade/BRepApprox_TheImpPrmSvSurfacesOfApprox.hxx @@ -38,36 +38,56 @@ class gp_Pnt; class gp_Vec; class gp_Vec2d; - - -class BRepApprox_TheImpPrmSvSurfacesOfApprox : public ApproxInt_SvSurfaces +class BRepApprox_TheImpPrmSvSurfacesOfApprox : public ApproxInt_SvSurfaces { public: - DEFINE_STANDARD_ALLOC - - Standard_EXPORT BRepApprox_TheImpPrmSvSurfacesOfApprox(const BRepAdaptor_Surface& Surf1, const IntSurf_Quadric& Surf2); - - Standard_EXPORT BRepApprox_TheImpPrmSvSurfacesOfApprox(const IntSurf_Quadric& Surf1, const BRepAdaptor_Surface& Surf2); - + Standard_EXPORT BRepApprox_TheImpPrmSvSurfacesOfApprox(const BRepAdaptor_Surface& Surf1, + const IntSurf_Quadric& Surf2); + + Standard_EXPORT BRepApprox_TheImpPrmSvSurfacesOfApprox(const IntSurf_Quadric& Surf1, + const BRepAdaptor_Surface& Surf2); + //! returns True if Tg,Tguv1 Tguv2 can be computed. - Standard_EXPORT Standard_Boolean Compute (Standard_Real& u1, Standard_Real& v1, Standard_Real& u2, Standard_Real& v2, - gp_Pnt& Pt, gp_Vec& Tg, gp_Vec2d& Tguv1, gp_Vec2d& Tguv2); - - Standard_EXPORT void Pnt (const Standard_Real u1, const Standard_Real v1, const Standard_Real u2, const Standard_Real v2, gp_Pnt& P); - + Standard_EXPORT Standard_Boolean Compute(Standard_Real& u1, + Standard_Real& v1, + Standard_Real& u2, + Standard_Real& v2, + gp_Pnt& Pt, + gp_Vec& Tg, + gp_Vec2d& Tguv1, + gp_Vec2d& Tguv2); + + Standard_EXPORT void Pnt(const Standard_Real u1, + const Standard_Real v1, + const Standard_Real u2, + const Standard_Real v2, + gp_Pnt& P); + Standard_EXPORT Standard_Boolean SeekPoint(const Standard_Real u1, const Standard_Real v1, const Standard_Real u2, const Standard_Real v2, - IntSurf_PntOn2S& Point); - - Standard_EXPORT Standard_Boolean Tangency (const Standard_Real u1, const Standard_Real v1, const Standard_Real u2, const Standard_Real v2, gp_Vec& Tg); - - Standard_EXPORT Standard_Boolean TangencyOnSurf1 (const Standard_Real u1, const Standard_Real v1, const Standard_Real u2, const Standard_Real v2, gp_Vec2d& Tg); - - Standard_EXPORT Standard_Boolean TangencyOnSurf2 (const Standard_Real u1, const Standard_Real v1, const Standard_Real u2, const Standard_Real v2, gp_Vec2d& Tg); + IntSurf_PntOn2S& Point); + + Standard_EXPORT Standard_Boolean Tangency(const Standard_Real u1, + const Standard_Real v1, + const Standard_Real u2, + const Standard_Real v2, + gp_Vec& Tg); + + Standard_EXPORT Standard_Boolean TangencyOnSurf1(const Standard_Real u1, + const Standard_Real v1, + const Standard_Real u2, + const Standard_Real v2, + gp_Vec2d& Tg); + + Standard_EXPORT Standard_Boolean TangencyOnSurf2(const Standard_Real u1, + const Standard_Real v1, + const Standard_Real u2, + const Standard_Real v2, + gp_Vec2d& Tg); Standard_Boolean FillInitialVectorOfSolution(const Standard_Real u1, const Standard_Real v1, @@ -77,48 +97,30 @@ public: const Standard_Real bsupu, const Standard_Real binfv, const Standard_Real bsupv, - math_Vector& X, - Standard_Real& TranslationU, - Standard_Real& TranslationV); - - + math_Vector& X, + Standard_Real& TranslationU, + Standard_Real& TranslationV); protected: - - - - - private: - - - - gp_Pnt2d MyParOnS1; - gp_Pnt2d MyParOnS2; - gp_Pnt MyPnt; - gp_Vec2d MyTguv1; - gp_Vec2d MyTguv2; - gp_Vec MyTg; - Standard_Boolean MyIsTangent; - Standard_Boolean MyHasBeenComputed; - gp_Pnt2d MyParOnS1bis; - gp_Pnt2d MyParOnS2bis; - gp_Pnt MyPntbis; - gp_Vec2d MyTguv1bis; - gp_Vec2d MyTguv2bis; - gp_Vec MyTgbis; - Standard_Boolean MyIsTangentbis; - Standard_Boolean MyHasBeenComputedbis; - Standard_Boolean MyImplicitFirst; + gp_Pnt2d MyParOnS1; + gp_Pnt2d MyParOnS2; + gp_Pnt MyPnt; + gp_Vec2d MyTguv1; + gp_Vec2d MyTguv2; + gp_Vec MyTg; + Standard_Boolean MyIsTangent; + Standard_Boolean MyHasBeenComputed; + gp_Pnt2d MyParOnS1bis; + gp_Pnt2d MyParOnS2bis; + gp_Pnt MyPntbis; + gp_Vec2d MyTguv1bis; + gp_Vec2d MyTguv2bis; + gp_Vec MyTgbis; + Standard_Boolean MyIsTangentbis; + Standard_Boolean MyHasBeenComputedbis; + Standard_Boolean MyImplicitFirst; BRepApprox_TheZerImpFuncOfTheImpPrmSvSurfacesOfApprox MyZerImpFunc; - - }; - - - - - - #endif // _BRepApprox_TheImpPrmSvSurfacesOfApprox_HeaderFile diff --git a/opencascade/BRepApprox_TheInt2SOfThePrmPrmSvSurfacesOfApprox.hxx b/opencascade/BRepApprox_TheInt2SOfThePrmPrmSvSurfacesOfApprox.hxx index 57c427ffa..2e6db5254 100644 --- a/opencascade/BRepApprox_TheInt2SOfThePrmPrmSvSurfacesOfApprox.hxx +++ b/opencascade/BRepApprox_TheInt2SOfThePrmPrmSvSurfacesOfApprox.hxx @@ -38,17 +38,18 @@ class IntSurf_PntOn2S; class gp_Dir; class gp_Dir2d; - - -class BRepApprox_TheInt2SOfThePrmPrmSvSurfacesOfApprox +class BRepApprox_TheInt2SOfThePrmPrmSvSurfacesOfApprox { public: - DEFINE_STANDARD_ALLOC //! compute the solution point with the close point - Standard_EXPORT BRepApprox_TheInt2SOfThePrmPrmSvSurfacesOfApprox(const TColStd_Array1OfReal& Param, const BRepAdaptor_Surface& S1, const BRepAdaptor_Surface& S2, const Standard_Real TolTangency); - + Standard_EXPORT BRepApprox_TheInt2SOfThePrmPrmSvSurfacesOfApprox( + const TColStd_Array1OfReal& Param, + const BRepAdaptor_Surface& S1, + const BRepAdaptor_Surface& S2, + const Standard_Real TolTangency); + //! initialize the parameters to compute the solution point //! it 's possible to write to optimize: //! IntImp_Int2S inter(S1,S2,Func,TolTangency); @@ -59,90 +60,82 @@ public: //! param(3)=... //! inter.Perform(Param,rsnld); //! } - Standard_EXPORT BRepApprox_TheInt2SOfThePrmPrmSvSurfacesOfApprox(const BRepAdaptor_Surface& S1, const BRepAdaptor_Surface& S2, const Standard_Real TolTangency); - + Standard_EXPORT BRepApprox_TheInt2SOfThePrmPrmSvSurfacesOfApprox(const BRepAdaptor_Surface& S1, + const BRepAdaptor_Surface& S2, + const Standard_Real TolTangency); + //! returns the best constant isoparametric to find //! the next intersection's point +stores the solution //! point (the solution point is found with the close point //! to intersect the isoparametric with the other patch; //! the choice of the isoparametic is calculated) - Standard_EXPORT IntImp_ConstIsoparametric Perform (const TColStd_Array1OfReal& Param, math_FunctionSetRoot& Rsnld); - + Standard_EXPORT IntImp_ConstIsoparametric Perform(const TColStd_Array1OfReal& Param, + math_FunctionSetRoot& Rsnld); + //! returns the best constant isoparametric to find //! the next intersection's point +stores the solution //! point (the solution point is found with the close point //! to intersect the isoparametric with the other patch; //! the choice of the isoparametic is given by ChoixIso) - Standard_EXPORT IntImp_ConstIsoparametric Perform (const TColStd_Array1OfReal& Param, math_FunctionSetRoot& Rsnld, const IntImp_ConstIsoparametric ChoixIso); - + Standard_EXPORT IntImp_ConstIsoparametric Perform(const TColStd_Array1OfReal& Param, + math_FunctionSetRoot& Rsnld, + const IntImp_ConstIsoparametric ChoixIso); + //! Returns TRUE if the creation completed without failure. - Standard_Boolean IsDone() const; - + Standard_Boolean IsDone() const; + //! Returns TRUE when there is no solution to the problem. - Standard_Boolean IsEmpty() const; - + Standard_Boolean IsEmpty() const; + //! Returns the intersection point. - const IntSurf_PntOn2S& Point() const; - + const IntSurf_PntOn2S& Point() const; + //! Returns True if the surfaces are tangent at the //! intersection point. - Standard_Boolean IsTangent() const; - + Standard_Boolean IsTangent() const; + //! Returns the tangent at the intersection line. - const gp_Dir& Direction() const; - + const gp_Dir& Direction() const; + //! Returns the tangent at the intersection line in the //! parametric space of the first surface. - const gp_Dir2d& DirectionOnS1() const; - + const gp_Dir2d& DirectionOnS1() const; + //! Returns the tangent at the intersection line in the //! parametric space of the second surface. - const gp_Dir2d& DirectionOnS2() const; - + const gp_Dir2d& DirectionOnS2() const; + //! return the math function which //! is used to compute the intersection - BRepApprox_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfApprox& Function(); - + BRepApprox_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfApprox& Function(); + //! return the intersection point which is //! enable for changing. - IntSurf_PntOn2S& ChangePoint(); - - - + IntSurf_PntOn2S& ChangePoint(); protected: - - - - - private: - - - - Standard_Boolean done; - Standard_Boolean empty; - IntSurf_PntOn2S pint; - Standard_Boolean tangent; - gp_Dir d3d; - gp_Dir2d d2d1; - gp_Dir2d d2d2; + Standard_Boolean done; + Standard_Boolean empty; + IntSurf_PntOn2S pint; + Standard_Boolean tangent; + gp_Dir d3d; + gp_Dir2d d2d1; + gp_Dir2d d2d2; BRepApprox_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfApprox myZerParFunc; - Standard_Real tol; - Standard_Real ua0; - Standard_Real va0; - Standard_Real ua1; - Standard_Real va1; - Standard_Real ub0; - Standard_Real vb0; - Standard_Real ub1; - Standard_Real vb1; - Standard_Real ures1; - Standard_Real ures2; - Standard_Real vres1; - Standard_Real vres2; - - + Standard_Real tol; + Standard_Real ua0; + Standard_Real va0; + Standard_Real ua1; + Standard_Real va1; + Standard_Real ub0; + Standard_Real vb0; + Standard_Real ub1; + Standard_Real vb1; + Standard_Real ures1; + Standard_Real ures2; + Standard_Real vres1; + Standard_Real vres2; }; #define ThePSurface BRepAdaptor_Surface @@ -165,7 +158,4 @@ private: #undef IntImp_Int2S #undef IntImp_Int2S_hxx - - - #endif // _BRepApprox_TheInt2SOfThePrmPrmSvSurfacesOfApprox_HeaderFile diff --git a/opencascade/BRepApprox_TheMultiLineOfApprox.hxx b/opencascade/BRepApprox_TheMultiLineOfApprox.hxx index 1a6fce3bb..c1d10ecbd 100644 --- a/opencascade/BRepApprox_TheMultiLineOfApprox.hxx +++ b/opencascade/BRepApprox_TheMultiLineOfApprox.hxx @@ -32,21 +32,18 @@ class BRepApprox_ApproxLine; class ApproxInt_SvSurfaces; - - -class BRepApprox_TheMultiLineOfApprox +class BRepApprox_TheMultiLineOfApprox { public: - DEFINE_STANDARD_ALLOC - + Standard_EXPORT BRepApprox_TheMultiLineOfApprox(); - - //! The class SvSurfaces is used when the approximation algorithm - //! needs some extra points on the line . + + //! The class SvSurfaces is used when the approximation algorithm + //! needs some extra points on the line . //! A New line is then created which shares the same surfaces and functions. //! SvSurfaces is a deferred class which allows several implementations of - //! this algorithm with different surfaces (bi-parametric ones, or + //! this algorithm with different surfaces (bi-parametric ones, or //! implicit and biparametric ones) Standard_EXPORT BRepApprox_TheMultiLineOfApprox(const Handle(BRepApprox_ApproxLine)& line, const Standard_Address PtrSvSurfaces, @@ -54,36 +51,36 @@ public: const Standard_Integer NbP2d, const Standard_Boolean ApproxU1V1, const Standard_Boolean ApproxU2V2, - const Standard_Real xo, - const Standard_Real yo, - const Standard_Real zo, - const Standard_Real u1o, - const Standard_Real v1o, - const Standard_Real u2o, - const Standard_Real v2o, + const Standard_Real xo, + const Standard_Real yo, + const Standard_Real zo, + const Standard_Real u1o, + const Standard_Real v1o, + const Standard_Real u2o, + const Standard_Real v2o, const Standard_Boolean P2DOnFirst, const Standard_Integer IndMin = 0, const Standard_Integer IndMax = 0); //! No Extra points will be added on the current line Standard_EXPORT BRepApprox_TheMultiLineOfApprox(const Handle(BRepApprox_ApproxLine)& line, - const Standard_Integer NbP3d, - const Standard_Integer NbP2d, - const Standard_Boolean ApproxU1V1, - const Standard_Boolean ApproxU2V2, - const Standard_Real xo, - const Standard_Real yo, - const Standard_Real zo, - const Standard_Real u1o, - const Standard_Real v1o, - const Standard_Real u2o, - const Standard_Real v2o, - const Standard_Boolean P2DOnFirst, - const Standard_Integer IndMin = 0, - const Standard_Integer IndMax = 0); + const Standard_Integer NbP3d, + const Standard_Integer NbP2d, + const Standard_Boolean ApproxU1V1, + const Standard_Boolean ApproxU2V2, + const Standard_Real xo, + const Standard_Real yo, + const Standard_Real zo, + const Standard_Real u1o, + const Standard_Real v1o, + const Standard_Real u2o, + const Standard_Real v2o, + const Standard_Boolean P2DOnFirst, + const Standard_Integer IndMin = 0, + const Standard_Integer IndMax = 0); Standard_EXPORT Standard_Integer FirstPoint() const; - + Standard_EXPORT Standard_Integer LastPoint() const; //! Returns the number of 2d points of a TheLine. @@ -93,61 +90,68 @@ public: Standard_EXPORT Standard_Integer NbP3d() const; Standard_EXPORT Approx_Status WhatStatus() const; - + //! Returns the 3d points of the multipoint when only 3d points exist. - Standard_EXPORT void Value (const Standard_Integer MPointIndex, TColgp_Array1OfPnt& tabPt) const; + Standard_EXPORT void Value(const Standard_Integer MPointIndex, TColgp_Array1OfPnt& tabPt) const; //! Returns the 2d points of the multipoint when only 2d points exist. - Standard_EXPORT void Value (const Standard_Integer MPointIndex, TColgp_Array1OfPnt2d& tabPt2d) const; + Standard_EXPORT void Value(const Standard_Integer MPointIndex, + TColgp_Array1OfPnt2d& tabPt2d) const; //! Returns the 3d and 2d points of the multipoint . - Standard_EXPORT void Value (const Standard_Integer MPointIndex, TColgp_Array1OfPnt& tabPt, TColgp_Array1OfPnt2d& tabPt2d) const; + Standard_EXPORT void Value(const Standard_Integer MPointIndex, + TColgp_Array1OfPnt& tabPt, + TColgp_Array1OfPnt2d& tabPt2d) const; //! Returns the 3d tangency points of the multipoint only when 3d points exist. - Standard_EXPORT Standard_Boolean Tangency (const Standard_Integer MPointIndex, TColgp_Array1OfVec& tabV) const; - + Standard_EXPORT Standard_Boolean Tangency(const Standard_Integer MPointIndex, + TColgp_Array1OfVec& tabV) const; + //! Returns the 2d tangency points of the multipoint only when 2d points exist. - Standard_EXPORT Standard_Boolean Tangency (const Standard_Integer MPointIndex, TColgp_Array1OfVec2d& tabV2d) const; - + Standard_EXPORT Standard_Boolean Tangency(const Standard_Integer MPointIndex, + TColgp_Array1OfVec2d& tabV2d) const; + //! Returns the 3d and 2d points of the multipoint . - Standard_EXPORT Standard_Boolean Tangency (const Standard_Integer MPointIndex, TColgp_Array1OfVec& tabV, TColgp_Array1OfVec2d& tabV2d) const; + Standard_EXPORT Standard_Boolean Tangency(const Standard_Integer MPointIndex, + TColgp_Array1OfVec& tabV, + TColgp_Array1OfVec2d& tabV2d) const; //! Tries to make a sub-line between and points of this line //! by adding new points - Standard_EXPORT BRepApprox_TheMultiLineOfApprox MakeMLBetween (const Standard_Integer Low, - const Standard_Integer High, - const Standard_Integer NbPointsToInsert) const; - + Standard_EXPORT BRepApprox_TheMultiLineOfApprox + MakeMLBetween(const Standard_Integer Low, + const Standard_Integer High, + const Standard_Integer NbPointsToInsert) const; + //! Tries to make a sub-line between and points of this line //! by adding one more point between (indbad-1)-th and indbad-th points - Standard_EXPORT Standard_Boolean MakeMLOneMorePoint (const Standard_Integer Low, - const Standard_Integer High, - const Standard_Integer indbad, - BRepApprox_TheMultiLineOfApprox& OtherLine) const; + Standard_EXPORT Standard_Boolean + MakeMLOneMorePoint(const Standard_Integer Low, + const Standard_Integer High, + const Standard_Integer indbad, + BRepApprox_TheMultiLineOfApprox& OtherLine) const; //! Dump of the current multi-line. Standard_EXPORT void Dump() const; protected: - private: - Standard_Address PtrOnmySvSurfaces; + Standard_Address PtrOnmySvSurfaces; Handle(BRepApprox_ApproxLine) myLine; - Standard_Integer indicemin; - Standard_Integer indicemax; - Standard_Integer nbp3d; - Standard_Integer nbp2d; - Standard_Boolean myApproxU1V1; - Standard_Boolean myApproxU2V2; - Standard_Boolean p2donfirst; - Standard_Real Xo; - Standard_Real Yo; - Standard_Real Zo; - Standard_Real U1o; - Standard_Real V1o; - Standard_Real U2o; - Standard_Real V2o; - + Standard_Integer indicemin; + Standard_Integer indicemax; + Standard_Integer nbp3d; + Standard_Integer nbp2d; + Standard_Boolean myApproxU1V1; + Standard_Boolean myApproxU2V2; + Standard_Boolean p2donfirst; + Standard_Real Xo; + Standard_Real Yo; + Standard_Real Zo; + Standard_Real U1o; + Standard_Real V1o; + Standard_Real U2o; + Standard_Real V2o; }; #endif // _BRepApprox_TheMultiLineOfApprox_HeaderFile diff --git a/opencascade/BRepApprox_TheMultiLineToolOfApprox.hxx b/opencascade/BRepApprox_TheMultiLineToolOfApprox.hxx index 36af180e4..595f7a8dd 100644 --- a/opencascade/BRepApprox_TheMultiLineToolOfApprox.hxx +++ b/opencascade/BRepApprox_TheMultiLineToolOfApprox.hxx @@ -26,93 +26,102 @@ class BRepApprox_TheMultiLineOfApprox; class ApproxInt_SvSurfaces; - - -class BRepApprox_TheMultiLineToolOfApprox +class BRepApprox_TheMultiLineToolOfApprox { public: - DEFINE_STANDARD_ALLOC - //! Returns the number of multipoints of the TheMultiLine. - static Standard_Integer FirstPoint (const BRepApprox_TheMultiLineOfApprox& ML); - + static Standard_Integer FirstPoint(const BRepApprox_TheMultiLineOfApprox& ML); + //! Returns the number of multipoints of the TheMultiLine. - static Standard_Integer LastPoint (const BRepApprox_TheMultiLineOfApprox& ML); - + static Standard_Integer LastPoint(const BRepApprox_TheMultiLineOfApprox& ML); + //! Returns the number of 2d points of a TheMultiLine. - static Standard_Integer NbP2d (const BRepApprox_TheMultiLineOfApprox& ML); - + static Standard_Integer NbP2d(const BRepApprox_TheMultiLineOfApprox& ML); + //! Returns the number of 3d points of a TheMultiLine. - static Standard_Integer NbP3d (const BRepApprox_TheMultiLineOfApprox& ML); - + static Standard_Integer NbP3d(const BRepApprox_TheMultiLineOfApprox& ML); + //! returns the 3d points of the multipoint //! when only 3d points exist. - static void Value (const BRepApprox_TheMultiLineOfApprox& ML, const Standard_Integer MPointIndex, TColgp_Array1OfPnt& tabPt); - + static void Value(const BRepApprox_TheMultiLineOfApprox& ML, + const Standard_Integer MPointIndex, + TColgp_Array1OfPnt& tabPt); + //! returns the 2d points of the multipoint //! when only 2d points exist. - static void Value (const BRepApprox_TheMultiLineOfApprox& ML, const Standard_Integer MPointIndex, TColgp_Array1OfPnt2d& tabPt2d); - + static void Value(const BRepApprox_TheMultiLineOfApprox& ML, + const Standard_Integer MPointIndex, + TColgp_Array1OfPnt2d& tabPt2d); + //! returns the 3d and 2d points of the multipoint //! . - static void Value (const BRepApprox_TheMultiLineOfApprox& ML, const Standard_Integer MPointIndex, TColgp_Array1OfPnt& tabPt, TColgp_Array1OfPnt2d& tabPt2d); - + static void Value(const BRepApprox_TheMultiLineOfApprox& ML, + const Standard_Integer MPointIndex, + TColgp_Array1OfPnt& tabPt, + TColgp_Array1OfPnt2d& tabPt2d); + //! returns the 3d points of the multipoint //! when only 3d points exist. - static Standard_Boolean Tangency (const BRepApprox_TheMultiLineOfApprox& ML, const Standard_Integer MPointIndex, TColgp_Array1OfVec& tabV); - + static Standard_Boolean Tangency(const BRepApprox_TheMultiLineOfApprox& ML, + const Standard_Integer MPointIndex, + TColgp_Array1OfVec& tabV); + //! returns the 2d tangency points of the multipoint //! only when 2d points exist. - static Standard_Boolean Tangency (const BRepApprox_TheMultiLineOfApprox& ML, const Standard_Integer MPointIndex, TColgp_Array1OfVec2d& tabV2d); - + static Standard_Boolean Tangency(const BRepApprox_TheMultiLineOfApprox& ML, + const Standard_Integer MPointIndex, + TColgp_Array1OfVec2d& tabV2d); + //! returns the 3d and 2d points of the multipoint //! . - static Standard_Boolean Tangency (const BRepApprox_TheMultiLineOfApprox& ML, const Standard_Integer MPointIndex, TColgp_Array1OfVec& tabV, TColgp_Array1OfVec2d& tabV2d); - + static Standard_Boolean Tangency(const BRepApprox_TheMultiLineOfApprox& ML, + const Standard_Integer MPointIndex, + TColgp_Array1OfVec& tabV, + TColgp_Array1OfVec2d& tabV2d); + //! returns the 3d curvature of the multipoint //! when only 3d points exist. - static Standard_Boolean Curvature (const BRepApprox_TheMultiLineOfApprox& ML, const Standard_Integer MPointIndex, TColgp_Array1OfVec& tabV); - + static Standard_Boolean Curvature(const BRepApprox_TheMultiLineOfApprox& ML, + const Standard_Integer MPointIndex, + TColgp_Array1OfVec& tabV); + //! returns the 2d curvature points of the multipoint //! only when 2d points exist. - static Standard_Boolean Curvature (const BRepApprox_TheMultiLineOfApprox& ML, const Standard_Integer MPointIndex, TColgp_Array1OfVec2d& tabV2d); - + static Standard_Boolean Curvature(const BRepApprox_TheMultiLineOfApprox& ML, + const Standard_Integer MPointIndex, + TColgp_Array1OfVec2d& tabV2d); + //! returns the 3d and 2d curvature of the multipoint //! . - static Standard_Boolean Curvature (const BRepApprox_TheMultiLineOfApprox& ML, const Standard_Integer MPointIndex, TColgp_Array1OfVec& tabV, TColgp_Array1OfVec2d& tabV2d); - + static Standard_Boolean Curvature(const BRepApprox_TheMultiLineOfApprox& ML, + const Standard_Integer MPointIndex, + TColgp_Array1OfVec& tabV, + TColgp_Array1OfVec2d& tabV2d); + //! Is called if WhatStatus returned "PointsAdded". - static BRepApprox_TheMultiLineOfApprox MakeMLBetween (const BRepApprox_TheMultiLineOfApprox& ML, const Standard_Integer I1, const Standard_Integer I2, const Standard_Integer NbPMin); - - //! Is called when the Bezier curve contains a loop - static Standard_Boolean MakeMLOneMorePoint (const BRepApprox_TheMultiLineOfApprox& ML, - const Standard_Integer I1, - const Standard_Integer I2, - const Standard_Integer indbad, - BRepApprox_TheMultiLineOfApprox& OtherLine); - - static Approx_Status WhatStatus (const BRepApprox_TheMultiLineOfApprox& ML, const Standard_Integer I1, const Standard_Integer I2); - - //! Dump of the current multi-line. - static void Dump (const BRepApprox_TheMultiLineOfApprox& ML); + static BRepApprox_TheMultiLineOfApprox MakeMLBetween(const BRepApprox_TheMultiLineOfApprox& ML, + const Standard_Integer I1, + const Standard_Integer I2, + const Standard_Integer NbPMin); + //! Is called when the Bezier curve contains a loop + static Standard_Boolean MakeMLOneMorePoint(const BRepApprox_TheMultiLineOfApprox& ML, + const Standard_Integer I1, + const Standard_Integer I2, + const Standard_Integer indbad, + BRepApprox_TheMultiLineOfApprox& OtherLine); + static Approx_Status WhatStatus(const BRepApprox_TheMultiLineOfApprox& ML, + const Standard_Integer I1, + const Standard_Integer I2); + //! Dump of the current multi-line. + static void Dump(const BRepApprox_TheMultiLineOfApprox& ML); protected: - - - - - private: - - - - - }; #define TheMultiLine BRepApprox_TheMultiLineOfApprox @@ -131,7 +140,4 @@ private: #undef ApproxInt_MultiLineTool #undef ApproxInt_MultiLineTool_hxx - - - #endif // _BRepApprox_TheMultiLineToolOfApprox_HeaderFile diff --git a/opencascade/BRepApprox_ThePrmPrmSvSurfacesOfApprox.hxx b/opencascade/BRepApprox_ThePrmPrmSvSurfacesOfApprox.hxx index b99a68391..be2be9cef 100644 --- a/opencascade/BRepApprox_ThePrmPrmSvSurfacesOfApprox.hxx +++ b/opencascade/BRepApprox_ThePrmPrmSvSurfacesOfApprox.hxx @@ -37,73 +37,73 @@ class gp_Pnt; class gp_Vec; class gp_Vec2d; - - -class BRepApprox_ThePrmPrmSvSurfacesOfApprox : public ApproxInt_SvSurfaces +class BRepApprox_ThePrmPrmSvSurfacesOfApprox : public ApproxInt_SvSurfaces { public: - DEFINE_STANDARD_ALLOC - - Standard_EXPORT BRepApprox_ThePrmPrmSvSurfacesOfApprox(const BRepAdaptor_Surface& Surf1, const BRepAdaptor_Surface& Surf2); - + Standard_EXPORT BRepApprox_ThePrmPrmSvSurfacesOfApprox(const BRepAdaptor_Surface& Surf1, + const BRepAdaptor_Surface& Surf2); + //! returns True if Tg,Tguv1 Tguv2 can be computed. - Standard_EXPORT Standard_Boolean Compute (Standard_Real& u1, Standard_Real& v1, Standard_Real& u2, Standard_Real& v2, - gp_Pnt& Pt, gp_Vec& Tg, gp_Vec2d& Tguv1, gp_Vec2d& Tguv2); - - Standard_EXPORT void Pnt (const Standard_Real u1, const Standard_Real v1, const Standard_Real u2, const Standard_Real v2, gp_Pnt& P); - + Standard_EXPORT Standard_Boolean Compute(Standard_Real& u1, + Standard_Real& v1, + Standard_Real& u2, + Standard_Real& v2, + gp_Pnt& Pt, + gp_Vec& Tg, + gp_Vec2d& Tguv1, + gp_Vec2d& Tguv2); + + Standard_EXPORT void Pnt(const Standard_Real u1, + const Standard_Real v1, + const Standard_Real u2, + const Standard_Real v2, + gp_Pnt& P); + Standard_EXPORT Standard_Boolean SeekPoint(const Standard_Real u1, const Standard_Real v1, const Standard_Real u2, const Standard_Real v2, - IntSurf_PntOn2S& Point); - - Standard_EXPORT Standard_Boolean Tangency (const Standard_Real u1, const Standard_Real v1, const Standard_Real u2, const Standard_Real v2, gp_Vec& Tg); - - Standard_EXPORT Standard_Boolean TangencyOnSurf1 (const Standard_Real u1, const Standard_Real v1, const Standard_Real u2, const Standard_Real v2, gp_Vec2d& Tg); - - Standard_EXPORT Standard_Boolean TangencyOnSurf2 (const Standard_Real u1, const Standard_Real v1, const Standard_Real u2, const Standard_Real v2, gp_Vec2d& Tg); - - - + IntSurf_PntOn2S& Point); + + Standard_EXPORT Standard_Boolean Tangency(const Standard_Real u1, + const Standard_Real v1, + const Standard_Real u2, + const Standard_Real v2, + gp_Vec& Tg); + + Standard_EXPORT Standard_Boolean TangencyOnSurf1(const Standard_Real u1, + const Standard_Real v1, + const Standard_Real u2, + const Standard_Real v2, + gp_Vec2d& Tg); + + Standard_EXPORT Standard_Boolean TangencyOnSurf2(const Standard_Real u1, + const Standard_Real v1, + const Standard_Real u2, + const Standard_Real v2, + gp_Vec2d& Tg); protected: - - - - - private: - - - - gp_Pnt2d MyParOnS1; - gp_Pnt2d MyParOnS2; - gp_Pnt MyPnt; - gp_Vec2d MyTguv1; - gp_Vec2d MyTguv2; - gp_Vec MyTg; - Standard_Boolean MyIsTangent; - Standard_Boolean MyHasBeenComputed; - gp_Pnt2d MyParOnS1bis; - gp_Pnt2d MyParOnS2bis; - gp_Pnt MyPntbis; - gp_Vec2d MyTguv1bis; - gp_Vec2d MyTguv2bis; - gp_Vec MyTgbis; - Standard_Boolean MyIsTangentbis; - Standard_Boolean MyHasBeenComputedbis; + gp_Pnt2d MyParOnS1; + gp_Pnt2d MyParOnS2; + gp_Pnt MyPnt; + gp_Vec2d MyTguv1; + gp_Vec2d MyTguv2; + gp_Vec MyTg; + Standard_Boolean MyIsTangent; + Standard_Boolean MyHasBeenComputed; + gp_Pnt2d MyParOnS1bis; + gp_Pnt2d MyParOnS2bis; + gp_Pnt MyPntbis; + gp_Vec2d MyTguv1bis; + gp_Vec2d MyTguv2bis; + gp_Vec MyTgbis; + Standard_Boolean MyIsTangentbis; + Standard_Boolean MyHasBeenComputedbis; BRepApprox_TheInt2SOfThePrmPrmSvSurfacesOfApprox MyIntersectionOn2S; - - }; - - - - - - #endif // _BRepApprox_ThePrmPrmSvSurfacesOfApprox_HeaderFile diff --git a/opencascade/BRepApprox_TheZerImpFuncOfTheImpPrmSvSurfacesOfApprox.hxx b/opencascade/BRepApprox_TheZerImpFuncOfTheImpPrmSvSurfacesOfApprox.hxx index de37d98a3..20cd8e1cd 100644 --- a/opencascade/BRepApprox_TheZerImpFuncOfTheImpPrmSvSurfacesOfApprox.hxx +++ b/opencascade/BRepApprox_TheZerImpFuncOfTheImpPrmSvSurfacesOfApprox.hxx @@ -35,87 +35,72 @@ class gp_Pnt; class gp_Vec; class gp_Dir2d; - - -class BRepApprox_TheZerImpFuncOfTheImpPrmSvSurfacesOfApprox : public math_FunctionSetWithDerivatives +class BRepApprox_TheZerImpFuncOfTheImpPrmSvSurfacesOfApprox : public math_FunctionSetWithDerivatives { public: - DEFINE_STANDARD_ALLOC - Standard_EXPORT BRepApprox_TheZerImpFuncOfTheImpPrmSvSurfacesOfApprox(); - - Standard_EXPORT BRepApprox_TheZerImpFuncOfTheImpPrmSvSurfacesOfApprox(const BRepAdaptor_Surface& PS, const IntSurf_Quadric& IS); - + + Standard_EXPORT BRepApprox_TheZerImpFuncOfTheImpPrmSvSurfacesOfApprox( + const BRepAdaptor_Surface& PS, + const IntSurf_Quadric& IS); + Standard_EXPORT BRepApprox_TheZerImpFuncOfTheImpPrmSvSurfacesOfApprox(const IntSurf_Quadric& IS); - - void Set (const BRepAdaptor_Surface& PS); - - void SetImplicitSurface (const IntSurf_Quadric& IS); - - void Set (const Standard_Real Tolerance); - + + void Set(const BRepAdaptor_Surface& PS); + + void SetImplicitSurface(const IntSurf_Quadric& IS); + + void Set(const Standard_Real Tolerance); + Standard_EXPORT Standard_Integer NbVariables() const; - + Standard_EXPORT Standard_Integer NbEquations() const; - - Standard_EXPORT Standard_Boolean Value (const math_Vector& X, math_Vector& F); - - Standard_EXPORT Standard_Boolean Derivatives (const math_Vector& X, math_Matrix& D); - - Standard_EXPORT Standard_Boolean Values (const math_Vector& X, math_Vector& F, math_Matrix& D); - - Standard_Real Root() const; - - //! Returns the value Tol so that if Abs(Func.Root()). May be one if Continuity(me) >= - Standard_EXPORT virtual Standard_Integer NbIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE; - + Standard_EXPORT virtual Standard_Integer NbIntervals(const GeomAbs_Shape S) const + Standard_OVERRIDE; + //! Stores in the parameters bounding the intervals //! of continuity . //! //! The array must provide enough room to accommodate //! for the parameters. i.e. T.Length() > NbIntervals() - Standard_EXPORT virtual void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const Standard_OVERRIDE; - + Standard_EXPORT virtual void Intervals(TColStd_Array1OfReal& T, + const GeomAbs_Shape S) const Standard_OVERRIDE; + //! Sets the bounds of the parametric interval on //! the fonction //! This determines the derivatives in these values if the //! function is not Cn. - Standard_EXPORT virtual void SetInterval (const Standard_Real First, const Standard_Real Last) Standard_OVERRIDE; - + Standard_EXPORT virtual void SetInterval(const Standard_Real First, + const Standard_Real Last) Standard_OVERRIDE; + //! Returns the resolutions in the sub-space 2d -- //! This information is usfull to find an good tolerance in //! 2d approximation - Standard_EXPORT virtual void Resolution (const Standard_Integer Index, const Standard_Real Tol, Standard_Real& TolU, Standard_Real& TolV) const Standard_OVERRIDE; - + Standard_EXPORT virtual void Resolution(const Standard_Integer Index, + const Standard_Real Tol, + Standard_Real& TolU, + Standard_Real& TolV) const Standard_OVERRIDE; + //! Returns the tolerance to reach in approximation - //! to respecte + //! to respect //! BoundTol error at the Boundary //! AngleTol tangent error at the Boundary (in radian) //! SurfTol error inside the surface. - Standard_EXPORT virtual void GetTolerance (const Standard_Real BoundTol, const Standard_Real SurfTol, const Standard_Real AngleTol, TColStd_Array1OfReal& Tol3d) const Standard_OVERRIDE; - + Standard_EXPORT virtual void GetTolerance(const Standard_Real BoundTol, + const Standard_Real SurfTol, + const Standard_Real AngleTol, + TColStd_Array1OfReal& Tol3d) const Standard_OVERRIDE; + //! Is usfull, if (me) have to be run numerical //! algorithme to perform D0, D1 or D2 - Standard_EXPORT virtual void SetTolerance (const Standard_Real Tol3d, const Standard_Real Tol2d) Standard_OVERRIDE; - + Standard_EXPORT virtual void SetTolerance(const Standard_Real Tol3d, + const Standard_Real Tol2d) Standard_OVERRIDE; + //! Get the barycentre of Surface. An very poor //! estimation is sufficient. This information is useful //! to perform well conditioned rational approximation. Standard_EXPORT virtual gp_Pnt BarycentreOfSurf() const Standard_OVERRIDE; - + //! Returns the length of the maximum section. This //! information is useful to perform well conditioned rational //! approximation. Standard_EXPORT virtual Standard_Real MaximalSection() const Standard_OVERRIDE; - + //! Compute the minimal value of weight for each poles //! of all sections. This information is useful to //! perform well conditioned rational approximation. - Standard_EXPORT virtual void GetMinimalWeight (TColStd_Array1OfReal& Weigths) const Standard_OVERRIDE; - - Standard_EXPORT virtual void Point (const Blend_AppFunction& Func, const Standard_Real Param, const math_Vector& Sol, Blend_Point& Pnt) const = 0; - - Standard_EXPORT virtual void Vec (math_Vector& Sol, const Blend_Point& Pnt) const = 0; - + Standard_EXPORT virtual void GetMinimalWeight(TColStd_Array1OfReal& Weigths) const + Standard_OVERRIDE; + Standard_EXPORT virtual void Point(const Blend_AppFunction& Func, + const Standard_Real Param, + const math_Vector& Sol, + Blend_Point& Pnt) const = 0; + Standard_EXPORT virtual void Vec(math_Vector& Sol, const Blend_Point& Pnt) const = 0; - DEFINE_STANDARD_RTTIEXT(BRepBlend_AppFuncRoot,Approx_SweepFunction) + DEFINE_STANDARD_RTTIEXT(BRepBlend_AppFuncRoot, Approx_SweepFunction) protected: - - - Standard_EXPORT BRepBlend_AppFuncRoot(Handle(BRepBlend_Line)& Line, Blend_AppFunction& Func, const Standard_Real Tol3d, const Standard_Real Tol2d); - - + Standard_EXPORT BRepBlend_AppFuncRoot(Handle(BRepBlend_Line)& Line, + Blend_AppFunction& Func, + const Standard_Real Tol3d, + const Standard_Real Tol2d); private: + Standard_EXPORT Standard_Boolean SearchPoint(Blend_AppFunction& Func, + const Standard_Real Param, + Blend_Point& Pnt); - - Standard_EXPORT Standard_Boolean SearchPoint (Blend_AppFunction& Func, const Standard_Real Param, Blend_Point& Pnt); - - Standard_EXPORT Standard_Boolean SearchLocation (const Standard_Real Param, const Standard_Integer FirstIndex, const Standard_Integer LastIndex, Standard_Integer& ParamIndex) const; + Standard_EXPORT Standard_Boolean SearchLocation(const Standard_Real Param, + const Standard_Integer FirstIndex, + const Standard_Integer LastIndex, + Standard_Integer& ParamIndex) const; Handle(BRepBlend_Line) myLine; - Standard_Address myFunc; - math_Vector myTolerance; - Blend_Point myPnt; - gp_Pnt myBary; - math_Vector X1; - math_Vector X2; - math_Vector XInit; - math_Vector Sol; - - + Standard_Address myFunc; + math_Vector myTolerance; + Blend_Point myPnt; + gp_Pnt myBary; + math_Vector X1; + math_Vector X2; + math_Vector XInit; + math_Vector Sol; }; - - - - - - #endif // _BRepBlend_AppFuncRoot_HeaderFile diff --git a/opencascade/BRepBlend_AppFuncRst.hxx b/opencascade/BRepBlend_AppFuncRst.hxx index 335a8399b..773a697e6 100644 --- a/opencascade/BRepBlend_AppFuncRst.hxx +++ b/opencascade/BRepBlend_AppFuncRst.hxx @@ -27,7 +27,6 @@ class Blend_SurfRstFunction; class Blend_AppFunction; class Blend_Point; - class BRepBlend_AppFuncRst; DEFINE_STANDARD_HANDLE(BRepBlend_AppFuncRst, BRepBlend_AppFuncRoot) @@ -36,35 +35,22 @@ class BRepBlend_AppFuncRst : public BRepBlend_AppFuncRoot { public: + Standard_EXPORT BRepBlend_AppFuncRst(Handle(BRepBlend_Line)& Line, + Blend_SurfRstFunction& Func, + const Standard_Real Tol3d, + const Standard_Real Tol2d); - - Standard_EXPORT BRepBlend_AppFuncRst(Handle(BRepBlend_Line)& Line, Blend_SurfRstFunction& Func, const Standard_Real Tol3d, const Standard_Real Tol2d); - - Standard_EXPORT void Point (const Blend_AppFunction& Func, const Standard_Real Param, const math_Vector& Sol, Blend_Point& Pnt) const Standard_OVERRIDE; - - Standard_EXPORT void Vec (math_Vector& Sol, const Blend_Point& Pnt) const Standard_OVERRIDE; - - + Standard_EXPORT void Point(const Blend_AppFunction& Func, + const Standard_Real Param, + const math_Vector& Sol, + Blend_Point& Pnt) const Standard_OVERRIDE; + Standard_EXPORT void Vec(math_Vector& Sol, const Blend_Point& Pnt) const Standard_OVERRIDE; - DEFINE_STANDARD_RTTIEXT(BRepBlend_AppFuncRst,BRepBlend_AppFuncRoot) + DEFINE_STANDARD_RTTIEXT(BRepBlend_AppFuncRst, BRepBlend_AppFuncRoot) protected: - - - - private: - - - - }; - - - - - - #endif // _BRepBlend_AppFuncRst_HeaderFile diff --git a/opencascade/BRepBlend_AppFuncRstRst.hxx b/opencascade/BRepBlend_AppFuncRstRst.hxx index 3fc44e10b..135e2622a 100644 --- a/opencascade/BRepBlend_AppFuncRstRst.hxx +++ b/opencascade/BRepBlend_AppFuncRstRst.hxx @@ -27,7 +27,6 @@ class Blend_RstRstFunction; class Blend_AppFunction; class Blend_Point; - class BRepBlend_AppFuncRstRst; DEFINE_STANDARD_HANDLE(BRepBlend_AppFuncRstRst, BRepBlend_AppFuncRoot) @@ -36,35 +35,22 @@ class BRepBlend_AppFuncRstRst : public BRepBlend_AppFuncRoot { public: + Standard_EXPORT BRepBlend_AppFuncRstRst(Handle(BRepBlend_Line)& Line, + Blend_RstRstFunction& Func, + const Standard_Real Tol3d, + const Standard_Real Tol2d); - - Standard_EXPORT BRepBlend_AppFuncRstRst(Handle(BRepBlend_Line)& Line, Blend_RstRstFunction& Func, const Standard_Real Tol3d, const Standard_Real Tol2d); - - Standard_EXPORT void Point (const Blend_AppFunction& Func, const Standard_Real Param, const math_Vector& Sol, Blend_Point& Pnt) const Standard_OVERRIDE; - - Standard_EXPORT void Vec (math_Vector& Sol, const Blend_Point& Pnt) const Standard_OVERRIDE; - - + Standard_EXPORT void Point(const Blend_AppFunction& Func, + const Standard_Real Param, + const math_Vector& Sol, + Blend_Point& Pnt) const Standard_OVERRIDE; + Standard_EXPORT void Vec(math_Vector& Sol, const Blend_Point& Pnt) const Standard_OVERRIDE; - DEFINE_STANDARD_RTTIEXT(BRepBlend_AppFuncRstRst,BRepBlend_AppFuncRoot) + DEFINE_STANDARD_RTTIEXT(BRepBlend_AppFuncRstRst, BRepBlend_AppFuncRoot) protected: - - - - private: - - - - }; - - - - - - #endif // _BRepBlend_AppFuncRstRst_HeaderFile diff --git a/opencascade/BRepBlend_AppSurf.hxx b/opencascade/BRepBlend_AppSurf.hxx index 7e3cb6f4e..591e8506d 100644 --- a/opencascade/BRepBlend_AppSurf.hxx +++ b/opencascade/BRepBlend_AppSurf.hxx @@ -43,127 +43,147 @@ class Standard_OutOfRange; class Blend_AppFunction; class BRepBlend_Line; - - -class BRepBlend_AppSurf : public AppBlend_Approx +class BRepBlend_AppSurf : public AppBlend_Approx { public: - DEFINE_STANDARD_ALLOC - Standard_EXPORT BRepBlend_AppSurf(); - - Standard_EXPORT BRepBlend_AppSurf(const Standard_Integer Degmin, const Standard_Integer Degmax, const Standard_Real Tol3d, const Standard_Real Tol2d, const Standard_Integer NbIt, const Standard_Boolean KnownParameters = Standard_False); - - Standard_EXPORT void Init (const Standard_Integer Degmin, const Standard_Integer Degmax, const Standard_Real Tol3d, const Standard_Real Tol2d, const Standard_Integer NbIt, const Standard_Boolean KnownParameters = Standard_False); - + + Standard_EXPORT BRepBlend_AppSurf(const Standard_Integer Degmin, + const Standard_Integer Degmax, + const Standard_Real Tol3d, + const Standard_Real Tol2d, + const Standard_Integer NbIt, + const Standard_Boolean KnownParameters = Standard_False); + + Standard_EXPORT void Init(const Standard_Integer Degmin, + const Standard_Integer Degmax, + const Standard_Real Tol3d, + const Standard_Real Tol2d, + const Standard_Integer NbIt, + const Standard_Boolean KnownParameters = Standard_False); + //! Define the type of parametrization used in the approximation - Standard_EXPORT void SetParType (const Approx_ParametrizationType ParType); - + Standard_EXPORT void SetParType(const Approx_ParametrizationType ParType); + //! Define the Continuity used in the approximation - Standard_EXPORT void SetContinuity (const GeomAbs_Shape C); - + Standard_EXPORT void SetContinuity(const GeomAbs_Shape C); + //! define the Weights associed to the criterium used in //! the optimization. //! //! if Wi <= 0 - Standard_EXPORT void SetCriteriumWeight (const Standard_Real W1, const Standard_Real W2, const Standard_Real W3); - + Standard_EXPORT void SetCriteriumWeight(const Standard_Real W1, + const Standard_Real W2, + const Standard_Real W3); + //! returns the type of parametrization used in the approximation Standard_EXPORT Approx_ParametrizationType ParType() const; - + //! returns the Continuity used in the approximation Standard_EXPORT GeomAbs_Shape Continuity() const; - + //! returns the Weights (as percent) associed to the criterium used in //! the optimization. - Standard_EXPORT void CriteriumWeight (Standard_Real& W1, Standard_Real& W2, Standard_Real& W3) const; - - Standard_EXPORT void Perform (const Handle(BRepBlend_Line)& Lin, Blend_AppFunction& SecGen, const Standard_Boolean SpApprox = Standard_False); - - Standard_EXPORT void PerformSmoothing (const Handle(BRepBlend_Line)& Lin, Blend_AppFunction& SecGen); - - Standard_EXPORT void Perform (const Handle(BRepBlend_Line)& Lin, Blend_AppFunction& SecGen, const Standard_Integer NbMaxP); - - Standard_Boolean IsDone() const; - - Standard_EXPORT void SurfShape (Standard_Integer& UDegree, Standard_Integer& VDegree, Standard_Integer& NbUPoles, Standard_Integer& NbVPoles, Standard_Integer& NbUKnots, Standard_Integer& NbVKnots) const; - - Standard_EXPORT void Surface (TColgp_Array2OfPnt& TPoles, TColStd_Array2OfReal& TWeights, TColStd_Array1OfReal& TUKnots, TColStd_Array1OfReal& TVKnots, TColStd_Array1OfInteger& TUMults, TColStd_Array1OfInteger& TVMults) const; - - Standard_Integer UDegree() const; - - Standard_Integer VDegree() const; - - const TColgp_Array2OfPnt& SurfPoles() const; - - const TColStd_Array2OfReal& SurfWeights() const; - - const TColStd_Array1OfReal& SurfUKnots() const; - - const TColStd_Array1OfReal& SurfVKnots() const; - - const TColStd_Array1OfInteger& SurfUMults() const; - - const TColStd_Array1OfInteger& SurfVMults() const; - - Standard_Integer NbCurves2d() const; - - Standard_EXPORT void Curves2dShape (Standard_Integer& Degree, Standard_Integer& NbPoles, Standard_Integer& NbKnots) const; - - Standard_EXPORT void Curve2d (const Standard_Integer Index, TColgp_Array1OfPnt2d& TPoles, TColStd_Array1OfReal& TKnots, TColStd_Array1OfInteger& TMults) const; - - Standard_Integer Curves2dDegree() const; - - const TColgp_Array1OfPnt2d& Curve2dPoles (const Standard_Integer Index) const; - - const TColStd_Array1OfReal& Curves2dKnots() const; - - const TColStd_Array1OfInteger& Curves2dMults() const; - - void TolReached (Standard_Real& Tol3d, Standard_Real& Tol2d) const; - - Standard_EXPORT Standard_Real TolCurveOnSurf (const Standard_Integer Index) const; + Standard_EXPORT void CriteriumWeight(Standard_Real& W1, + Standard_Real& W2, + Standard_Real& W3) const; + Standard_EXPORT void Perform(const Handle(BRepBlend_Line)& Lin, + Blend_AppFunction& SecGen, + const Standard_Boolean SpApprox = Standard_False); + Standard_EXPORT void PerformSmoothing(const Handle(BRepBlend_Line)& Lin, + Blend_AppFunction& SecGen); + Standard_EXPORT void Perform(const Handle(BRepBlend_Line)& Lin, + Blend_AppFunction& SecGen, + const Standard_Integer NbMaxP); -protected: + Standard_Boolean IsDone() const; + Standard_EXPORT void SurfShape(Standard_Integer& UDegree, + Standard_Integer& VDegree, + Standard_Integer& NbUPoles, + Standard_Integer& NbVPoles, + Standard_Integer& NbUKnots, + Standard_Integer& NbVKnots) const; + Standard_EXPORT void Surface(TColgp_Array2OfPnt& TPoles, + TColStd_Array2OfReal& TWeights, + TColStd_Array1OfReal& TUKnots, + TColStd_Array1OfReal& TVKnots, + TColStd_Array1OfInteger& TUMults, + TColStd_Array1OfInteger& TVMults) const; + Standard_Integer UDegree() const; + Standard_Integer VDegree() const; -private: + const TColgp_Array2OfPnt& SurfPoles() const; - - Standard_EXPORT void InternalPerform (const Handle(BRepBlend_Line)& Lin, Blend_AppFunction& SecGen, const Standard_Boolean SpApprox, const Standard_Boolean UseVariational); - - - Standard_Boolean done; - Standard_Integer dmin; - Standard_Integer dmax; - Standard_Real tol3d; - Standard_Real tol2d; - Standard_Integer nbit; - Standard_Integer udeg; - Standard_Integer vdeg; - Standard_Boolean knownp; - Handle(TColgp_HArray2OfPnt) tabPoles; - Handle(TColStd_HArray2OfReal) tabWeights; - Handle(TColStd_HArray1OfReal) tabUKnots; - Handle(TColStd_HArray1OfReal) tabVKnots; - Handle(TColStd_HArray1OfInteger) tabUMults; - Handle(TColStd_HArray1OfInteger) tabVMults; - TColgp_SequenceOfArray1OfPnt2d seqPoles2d; - Standard_Real tol3dreached; - Standard_Real tol2dreached; - Approx_ParametrizationType paramtype; - GeomAbs_Shape continuity; - Standard_Real critweights[3]; + const TColStd_Array2OfReal& SurfWeights() const; + + const TColStd_Array1OfReal& SurfUKnots() const; + + const TColStd_Array1OfReal& SurfVKnots() const; + const TColStd_Array1OfInteger& SurfUMults() const; + const TColStd_Array1OfInteger& SurfVMults() const; + + Standard_Integer NbCurves2d() const; + + Standard_EXPORT void Curves2dShape(Standard_Integer& Degree, + Standard_Integer& NbPoles, + Standard_Integer& NbKnots) const; + + Standard_EXPORT void Curve2d(const Standard_Integer Index, + TColgp_Array1OfPnt2d& TPoles, + TColStd_Array1OfReal& TKnots, + TColStd_Array1OfInteger& TMults) const; + + Standard_Integer Curves2dDegree() const; + + const TColgp_Array1OfPnt2d& Curve2dPoles(const Standard_Integer Index) const; + + const TColStd_Array1OfReal& Curves2dKnots() const; + + const TColStd_Array1OfInteger& Curves2dMults() const; + + void TolReached(Standard_Real& Tol3d, Standard_Real& Tol2d) const; + + Standard_EXPORT Standard_Real TolCurveOnSurf(const Standard_Integer Index) const; + +protected: +private: + Standard_EXPORT void InternalPerform(const Handle(BRepBlend_Line)& Lin, + Blend_AppFunction& SecGen, + const Standard_Boolean SpApprox, + const Standard_Boolean UseVariational); + + Standard_Boolean done; + Standard_Integer dmin; + Standard_Integer dmax; + Standard_Real tol3d; + Standard_Real tol2d; + Standard_Integer nbit; + Standard_Integer udeg; + Standard_Integer vdeg; + Standard_Boolean knownp; + Handle(TColgp_HArray2OfPnt) tabPoles; + Handle(TColStd_HArray2OfReal) tabWeights; + Handle(TColStd_HArray1OfReal) tabUKnots; + Handle(TColStd_HArray1OfReal) tabVKnots; + Handle(TColStd_HArray1OfInteger) tabUMults; + Handle(TColStd_HArray1OfInteger) tabVMults; + TColgp_SequenceOfArray1OfPnt2d seqPoles2d; + Standard_Real tol3dreached; + Standard_Real tol2dreached; + Approx_ParametrizationType paramtype; + GeomAbs_Shape continuity; + Standard_Real critweights[3]; }; #define TheSectionGenerator Blend_AppFunction @@ -184,7 +204,4 @@ private: #undef AppBlend_AppSurf #undef AppBlend_AppSurf_hxx - - - #endif // _BRepBlend_AppSurf_HeaderFile diff --git a/opencascade/BRepBlend_AppSurface.hxx b/opencascade/BRepBlend_AppSurface.hxx index 8d78dc4f2..620797578 100644 --- a/opencascade/BRepBlend_AppSurface.hxx +++ b/opencascade/BRepBlend_AppSurface.hxx @@ -33,15 +33,12 @@ #include class Approx_SweepFunction; - //! Used to Approximate the blending surfaces. -class BRepBlend_AppSurface : public AppBlend_Approx +class BRepBlend_AppSurface : public AppBlend_Approx { public: - DEFINE_STANDARD_ALLOC - //! Approximation of the new Surface (and //! eventually the 2d Curves on the support //! surfaces). @@ -49,80 +46,85 @@ public: //! approximated with an tolerance given by the //! resolution on support surfaces, but if this //! tolerance is too large Tol2d is used. - Standard_EXPORT BRepBlend_AppSurface(const Handle(Approx_SweepFunction)& Funct, const Standard_Real First, const Standard_Real Last, const Standard_Real Tol3d, const Standard_Real Tol2d, const Standard_Real TolAngular, const GeomAbs_Shape Continuity = GeomAbs_C0, const Standard_Integer Degmax = 11, const Standard_Integer Segmax = 50); - - Standard_Boolean IsDone() const; - - Standard_EXPORT void SurfShape (Standard_Integer& UDegree, Standard_Integer& VDegree, Standard_Integer& NbUPoles, Standard_Integer& NbVPoles, Standard_Integer& NbUKnots, Standard_Integer& NbVKnots) const; - - Standard_EXPORT void Surface (TColgp_Array2OfPnt& TPoles, TColStd_Array2OfReal& TWeights, TColStd_Array1OfReal& TUKnots, TColStd_Array1OfReal& TVKnots, TColStd_Array1OfInteger& TUMults, TColStd_Array1OfInteger& TVMults) const; - - Standard_Integer UDegree() const; - - Standard_Integer VDegree() const; - - const TColgp_Array2OfPnt& SurfPoles() const; - - const TColStd_Array2OfReal& SurfWeights() const; - - const TColStd_Array1OfReal& SurfUKnots() const; - - const TColStd_Array1OfReal& SurfVKnots() const; - - const TColStd_Array1OfInteger& SurfUMults() const; - - const TColStd_Array1OfInteger& SurfVMults() const; - - //! returns the maximum error in the surface approximation. - Standard_EXPORT Standard_Real MaxErrorOnSurf() const; - - Standard_Integer NbCurves2d() const; - - Standard_EXPORT void Curves2dShape (Standard_Integer& Degree, Standard_Integer& NbPoles, Standard_Integer& NbKnots) const; - - Standard_EXPORT void Curve2d (const Standard_Integer Index, TColgp_Array1OfPnt2d& TPoles, TColStd_Array1OfReal& TKnots, TColStd_Array1OfInteger& TMults) const; - - Standard_Integer Curves2dDegree() const; - - const TColgp_Array1OfPnt2d& Curve2dPoles (const Standard_Integer Index) const; - - const TColStd_Array1OfReal& Curves2dKnots() const; - - const TColStd_Array1OfInteger& Curves2dMults() const; - - Standard_EXPORT void TolReached (Standard_Real& Tol3d, Standard_Real& Tol2d) const; - - //! returns the maximum error in the 2d curve approximation. - Standard_EXPORT Standard_Real Max2dError (const Standard_Integer Index) const; - - Standard_EXPORT Standard_Real TolCurveOnSurf (const Standard_Integer Index) const; - - //! display information on approximation. - Standard_EXPORT void Dump (Standard_OStream& o) const; + Standard_EXPORT BRepBlend_AppSurface(const Handle(Approx_SweepFunction)& Funct, + const Standard_Real First, + const Standard_Real Last, + const Standard_Real Tol3d, + const Standard_Real Tol2d, + const Standard_Real TolAngular, + const GeomAbs_Shape Continuity = GeomAbs_C0, + const Standard_Integer Degmax = 11, + const Standard_Integer Segmax = 50); + Standard_Boolean IsDone() const; + Standard_EXPORT void SurfShape(Standard_Integer& UDegree, + Standard_Integer& VDegree, + Standard_Integer& NbUPoles, + Standard_Integer& NbVPoles, + Standard_Integer& NbUKnots, + Standard_Integer& NbVKnots) const; + Standard_EXPORT void Surface(TColgp_Array2OfPnt& TPoles, + TColStd_Array2OfReal& TWeights, + TColStd_Array1OfReal& TUKnots, + TColStd_Array1OfReal& TVKnots, + TColStd_Array1OfInteger& TUMults, + TColStd_Array1OfInteger& TVMults) const; -protected: + Standard_Integer UDegree() const; + Standard_Integer VDegree() const; + const TColgp_Array2OfPnt& SurfPoles() const; + const TColStd_Array2OfReal& SurfWeights() const; + const TColStd_Array1OfReal& SurfUKnots() const; -private: + const TColStd_Array1OfReal& SurfVKnots() const; + const TColStd_Array1OfInteger& SurfUMults() const; + const TColStd_Array1OfInteger& SurfVMults() const; - Approx_SweepApproximation approx; + //! returns the maximum error in the surface approximation. + Standard_EXPORT Standard_Real MaxErrorOnSurf() const; + Standard_Integer NbCurves2d() const; -}; + Standard_EXPORT void Curves2dShape(Standard_Integer& Degree, + Standard_Integer& NbPoles, + Standard_Integer& NbKnots) const; + Standard_EXPORT void Curve2d(const Standard_Integer Index, + TColgp_Array1OfPnt2d& TPoles, + TColStd_Array1OfReal& TKnots, + TColStd_Array1OfInteger& TMults) const; -#include + Standard_Integer Curves2dDegree() const; + const TColgp_Array1OfPnt2d& Curve2dPoles(const Standard_Integer Index) const; + const TColStd_Array1OfReal& Curves2dKnots() const; + const TColStd_Array1OfInteger& Curves2dMults() const; + Standard_EXPORT void TolReached(Standard_Real& Tol3d, Standard_Real& Tol2d) const; + + //! returns the maximum error in the 2d curve approximation. + Standard_EXPORT Standard_Real Max2dError(const Standard_Integer Index) const; + + Standard_EXPORT Standard_Real TolCurveOnSurf(const Standard_Integer Index) const; + + //! display information on approximation. + Standard_EXPORT void Dump(Standard_OStream& o) const; + +protected: +private: + Approx_SweepApproximation approx; +}; + +#include #endif // _BRepBlend_AppSurface_HeaderFile diff --git a/opencascade/BRepBlend_AppSurface.lxx b/opencascade/BRepBlend_AppSurface.lxx index 5344f0e57..4fb914616 100644 --- a/opencascade/BRepBlend_AppSurface.lxx +++ b/opencascade/BRepBlend_AppSurface.lxx @@ -21,13 +21,11 @@ #include #include - inline Standard_Boolean BRepBlend_AppSurface::IsDone() const { return approx.IsDone(); } - inline Standard_Integer BRepBlend_AppSurface::UDegree() const { return approx.UDegree(); @@ -38,46 +36,39 @@ inline Standard_Integer BRepBlend_AppSurface::VDegree() const return approx.VDegree(); } -inline const TColgp_Array2OfPnt& -BRepBlend_AppSurface::SurfPoles() const +inline const TColgp_Array2OfPnt& BRepBlend_AppSurface::SurfPoles() const { return approx.SurfPoles(); } -inline const TColStd_Array2OfReal& -BRepBlend_AppSurface::SurfWeights() const +inline const TColStd_Array2OfReal& BRepBlend_AppSurface::SurfWeights() const { return approx.SurfWeights(); } - -inline const TColStd_Array1OfReal& -BRepBlend_AppSurface::SurfUKnots() const +inline const TColStd_Array1OfReal& BRepBlend_AppSurface::SurfUKnots() const { - return approx.SurfUKnots(); + return approx.SurfUKnots(); } -inline const TColStd_Array1OfReal& -BRepBlend_AppSurface::SurfVKnots() const +inline const TColStd_Array1OfReal& BRepBlend_AppSurface::SurfVKnots() const { - return approx.SurfVKnots(); + return approx.SurfVKnots(); } -inline const TColStd_Array1OfInteger& -BRepBlend_AppSurface::SurfUMults() const +inline const TColStd_Array1OfInteger& BRepBlend_AppSurface::SurfUMults() const { - return approx.SurfUMults(); + return approx.SurfUMults(); } -inline const TColStd_Array1OfInteger& -BRepBlend_AppSurface::SurfVMults() const +inline const TColStd_Array1OfInteger& BRepBlend_AppSurface::SurfVMults() const { - return approx.SurfVMults(); + return approx.SurfVMults(); } inline Standard_Integer BRepBlend_AppSurface::NbCurves2d() const { - return approx.NbCurves2d(); + return approx.NbCurves2d(); } inline Standard_Integer BRepBlend_AppSurface::Curves2dDegree() const @@ -85,22 +76,18 @@ inline Standard_Integer BRepBlend_AppSurface::Curves2dDegree() const return approx.Curves2dDegree(); } -inline const TColgp_Array1OfPnt2d& -BRepBlend_AppSurface::Curve2dPoles(const Standard_Integer Index) const +inline const TColgp_Array1OfPnt2d& BRepBlend_AppSurface::Curve2dPoles( + const Standard_Integer Index) const { - return approx.Curve2dPoles(Index); + return approx.Curve2dPoles(Index); } -inline const TColStd_Array1OfReal& -BRepBlend_AppSurface::Curves2dKnots() const +inline const TColStd_Array1OfReal& BRepBlend_AppSurface::Curves2dKnots() const { - return approx.Curves2dKnots(); + return approx.Curves2dKnots(); } -inline const TColStd_Array1OfInteger& -BRepBlend_AppSurface::Curves2dMults () const +inline const TColStd_Array1OfInteger& BRepBlend_AppSurface::Curves2dMults() const { - return approx.Curves2dMults(); + return approx.Curves2dMults(); } - - diff --git a/opencascade/BRepBlend_BlendTool.hxx b/opencascade/BRepBlend_BlendTool.hxx index a22f62d87..c56c30b21 100644 --- a/opencascade/BRepBlend_BlendTool.hxx +++ b/opencascade/BRepBlend_BlendTool.hxx @@ -23,13 +23,11 @@ class gp_Pnt2d; class Adaptor2d_Curve2d; class Adaptor3d_HVertex; -class BRepBlend_BlendTool +class BRepBlend_BlendTool { public: - DEFINE_STANDARD_ALLOC - //! Projects the point P on the arc C. //! If the methods returns Standard_True, the projection is //! successful, and Paramproj is the parameter on the arc @@ -37,61 +35,61 @@ public: //! P and the curve.. //! If the method returns Standard_False, Param proj and Dist //! are not significant. - Standard_EXPORT static Standard_Boolean Project (const gp_Pnt2d& P, const Handle(Adaptor3d_Surface)& S, const Handle(Adaptor2d_Curve2d)& C, Standard_Real& Paramproj, Standard_Real& Dist); - - Standard_EXPORT static Standard_Boolean Inters (const gp_Pnt2d& P1, const gp_Pnt2d& P2, const Handle(Adaptor3d_Surface)& S, const Handle(Adaptor2d_Curve2d)& C, Standard_Real& Param, Standard_Real& Dist); - + Standard_EXPORT static Standard_Boolean Project(const gp_Pnt2d& P, + const Handle(Adaptor3d_Surface)& S, + const Handle(Adaptor2d_Curve2d)& C, + Standard_Real& Paramproj, + Standard_Real& Dist); + + Standard_EXPORT static Standard_Boolean Inters(const gp_Pnt2d& P1, + const gp_Pnt2d& P2, + const Handle(Adaptor3d_Surface)& S, + const Handle(Adaptor2d_Curve2d)& C, + Standard_Real& Param, + Standard_Real& Dist); + //! Returns the parameter of the vertex V on the edge A. - static Standard_Real Parameter (const Handle(Adaptor3d_HVertex)& V, const Handle(Adaptor2d_Curve2d)& A); - + static Standard_Real Parameter(const Handle(Adaptor3d_HVertex)& V, + const Handle(Adaptor2d_Curve2d)& A); + //! Returns the parametric tolerance on the arc A //! used to consider that the vertex and another point meet, //! i-e if Abs(Parameter(Vertex)-Parameter(OtherPnt))<= //! Tolerance, the points are "merged". - static Standard_Real Tolerance (const Handle(Adaptor3d_HVertex)& V, const Handle(Adaptor2d_Curve2d)& A); - - static Standard_Boolean SingularOnUMin (const Handle(Adaptor3d_Surface)& S); - - static Standard_Boolean SingularOnUMax (const Handle(Adaptor3d_Surface)& S); - - static Standard_Boolean SingularOnVMin (const Handle(Adaptor3d_Surface)& S); - - static Standard_Boolean SingularOnVMax (const Handle(Adaptor3d_Surface)& S); - - Standard_EXPORT static Standard_Integer NbSamplesU (const Handle(Adaptor3d_Surface)& S, const Standard_Real u1, const Standard_Real u2); - - Standard_EXPORT static Standard_Integer NbSamplesV (const Handle(Adaptor3d_Surface)& S, const Standard_Real v1, const Standard_Real v2); - - //! Returns the parametric limits on the arc C. - //! These limits must be finite : they are either - //! the real limits of the arc, for a finite arc, - //! or a bounding box for an infinite arc. - Standard_EXPORT static void Bounds (const Handle(Adaptor2d_Curve2d)& C, Standard_Real& Ufirst, Standard_Real& Ulast); - - static Handle(Adaptor2d_Curve2d) CurveOnSurf (const Handle(Adaptor2d_Curve2d)& C, const Handle(Adaptor3d_Surface)& S); + static Standard_Real Tolerance(const Handle(Adaptor3d_HVertex)& V, + const Handle(Adaptor2d_Curve2d)& A); + static Standard_Boolean SingularOnUMin(const Handle(Adaptor3d_Surface)& S); + static Standard_Boolean SingularOnUMax(const Handle(Adaptor3d_Surface)& S); + static Standard_Boolean SingularOnVMin(const Handle(Adaptor3d_Surface)& S); -protected: + static Standard_Boolean SingularOnVMax(const Handle(Adaptor3d_Surface)& S); + Standard_EXPORT static Standard_Integer NbSamplesU(const Handle(Adaptor3d_Surface)& S, + const Standard_Real u1, + const Standard_Real u2); + Standard_EXPORT static Standard_Integer NbSamplesV(const Handle(Adaptor3d_Surface)& S, + const Standard_Real v1, + const Standard_Real v2); + //! Returns the parametric limits on the arc C. + //! These limits must be finite : they are either + //! the real limits of the arc, for a finite arc, + //! or a bounding box for an infinite arc. + Standard_EXPORT static void Bounds(const Handle(Adaptor2d_Curve2d)& C, + Standard_Real& Ufirst, + Standard_Real& Ulast); + static Handle(Adaptor2d_Curve2d) CurveOnSurf(const Handle(Adaptor2d_Curve2d)& C, + const Handle(Adaptor3d_Surface)& S); +protected: private: - - - - - }; - #include - - - - #endif // _BRepBlend_BlendTool_HeaderFile diff --git a/opencascade/BRepBlend_BlendTool.lxx b/opencascade/BRepBlend_BlendTool.lxx index bb77b3edc..c603e9a18 100644 --- a/opencascade/BRepBlend_BlendTool.lxx +++ b/opencascade/BRepBlend_BlendTool.lxx @@ -16,39 +16,43 @@ #include -inline Standard_Boolean BRepBlend_BlendTool::SingularOnUMin (const Handle(Adaptor3d_Surface)& ) +inline Standard_Boolean BRepBlend_BlendTool::SingularOnUMin(const Handle(Adaptor3d_Surface)&) { return Standard_False; } -inline Standard_Boolean BRepBlend_BlendTool::SingularOnUMax (const Handle(Adaptor3d_Surface)& ) +inline Standard_Boolean BRepBlend_BlendTool::SingularOnUMax(const Handle(Adaptor3d_Surface)&) { return Standard_False; } -inline Standard_Boolean BRepBlend_BlendTool::SingularOnVMin (const Handle(Adaptor3d_Surface)& ) +inline Standard_Boolean BRepBlend_BlendTool::SingularOnVMin(const Handle(Adaptor3d_Surface)&) { return Standard_False; } -inline Standard_Boolean BRepBlend_BlendTool::SingularOnVMax (const Handle(Adaptor3d_Surface)& ) +inline Standard_Boolean BRepBlend_BlendTool::SingularOnVMax(const Handle(Adaptor3d_Surface)&) { return Standard_False; } -inline Standard_Real BRepBlend_BlendTool::Tolerance (const Handle(Adaptor3d_HVertex)& V, const Handle(Adaptor2d_Curve2d)& A) +inline Standard_Real BRepBlend_BlendTool::Tolerance(const Handle(Adaptor3d_HVertex)& V, + const Handle(Adaptor2d_Curve2d)& A) { -// return Adaptor2d_HCurve2dTool::Resolution(A,1.e-6); // a voir + // return Adaptor2d_HCurve2dTool::Resolution(A,1.e-6); // a voir return V->Resolution(A); // a voir } -inline Standard_Real BRepBlend_BlendTool::Parameter (const Handle(Adaptor3d_HVertex)& V, const Handle(Adaptor2d_Curve2d)& C) +inline Standard_Real BRepBlend_BlendTool::Parameter(const Handle(Adaptor3d_HVertex)& V, + const Handle(Adaptor2d_Curve2d)& C) { -// return BRep_Tool::Parameter(V,A->Curve().Edge()); + // return BRep_Tool::Parameter(V,A->Curve().Edge()); return V->Parameter(C); } -inline Handle(Adaptor2d_Curve2d) BRepBlend_BlendTool::CurveOnSurf (const Handle(Adaptor2d_Curve2d)& C, const Handle(Adaptor3d_Surface)&) +inline Handle(Adaptor2d_Curve2d) BRepBlend_BlendTool::CurveOnSurf( + const Handle(Adaptor2d_Curve2d)& C, + const Handle(Adaptor3d_Surface)&) { return C; } diff --git a/opencascade/BRepBlend_CSCircular.hxx b/opencascade/BRepBlend_CSCircular.hxx index 604f3d03b..c87198401 100644 --- a/opencascade/BRepBlend_CSCircular.hxx +++ b/opencascade/BRepBlend_CSCircular.hxx @@ -21,5 +21,4 @@ typedef BlendFunc_CSCircular BRepBlend_CSCircular; - #endif // _BRepBlend_CSCircular_HeaderFile diff --git a/opencascade/BRepBlend_CSConstRad.hxx b/opencascade/BRepBlend_CSConstRad.hxx index 629c4e84d..0acedd1ee 100644 --- a/opencascade/BRepBlend_CSConstRad.hxx +++ b/opencascade/BRepBlend_CSConstRad.hxx @@ -21,5 +21,4 @@ typedef BlendFunc_CSConstRad BRepBlend_CSConstRad; - #endif // _BRepBlend_CSConstRad_HeaderFile diff --git a/opencascade/BRepBlend_CSWalking.hxx b/opencascade/BRepBlend_CSWalking.hxx index 590d369ea..ee9e8b0d9 100644 --- a/opencascade/BRepBlend_CSWalking.hxx +++ b/opencascade/BRepBlend_CSWalking.hxx @@ -1,7 +1,5 @@ -// Created on: 1993-12-06 -// Created by: Jacques GOUSSARD // Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS +// Copyright (c) 1999-2024 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // @@ -19,11 +17,11 @@ #include #include -#include -#include #include -#include +#include #include +#include +#include class BRepBlend_Line; class Adaptor3d_TopolTool; @@ -42,127 +40,78 @@ class gp_Pnt2d; class gp_Vec; class gp_Vec2d; -class BRepBlend_CSWalking +class BRepBlend_CSWalking { public: - DEFINE_STANDARD_ALLOC - - Standard_EXPORT BRepBlend_CSWalking(const Handle(Adaptor3d_Curve)& Curv, const Handle(Adaptor3d_Surface)& Surf, const Handle(Adaptor3d_TopolTool)& Domain); - - Standard_EXPORT void Perform (Blend_CSFunction& F, const Standard_Real Pdep, const Standard_Real Pmax, const Standard_Real MaxStep, const Standard_Real Tol3d, const Standard_Real TolGuide, const math_Vector& Soldep, const Standard_Real Fleche, const Standard_Boolean Appro = Standard_False); - - Standard_EXPORT Standard_Boolean Complete (Blend_CSFunction& F, const Standard_Real Pmin); - - Standard_Boolean IsDone() const; - - const Handle(BRepBlend_Line)& Line() const; - -private: - - - Standard_EXPORT void InternalPerform (Blend_CSFunction& F, math_Vector& Sol, const Standard_Real Bound); - - Standard_EXPORT void Transition (const Handle(Adaptor2d_Curve2d)& A, const Standard_Real Param, IntSurf_Transition& TLine, IntSurf_Transition& TArc); - - Standard_EXPORT void MakeExtremity (BRepBlend_Extremity& Extrem, const Standard_Integer Index, const Standard_Real Param, const Standard_Boolean IsVtx, const Handle(Adaptor3d_HVertex)& Vtx); - - Standard_EXPORT Blend_Status CheckDeflectionOnSurf (const gp_Pnt& Psurf, const gp_Pnt2d& Ponsurf, const gp_Vec& Tgsurf, const gp_Vec2d& Tgonsurf); - - Standard_EXPORT Blend_Status CheckDeflectionOnCurv (const gp_Pnt& Pcurv, const Standard_Real Poncurv, const gp_Vec& Tgcurv); - - Standard_EXPORT Blend_Status TestArret (Blend_CSFunction& F, const math_Vector& Sol, const Standard_Boolean TestDeflection, const Blend_Status State); - - - Standard_Boolean done; - Handle(BRepBlend_Line) line; - Handle(Adaptor3d_Surface) surf; - Handle(Adaptor3d_Curve) curv; - Handle(Adaptor3d_TopolTool) domain; - Standard_Real tolpoint3d; - Standard_Real tolgui; - Standard_Real pasmax; - Standard_Real fleche; - Standard_Real param; - Standard_Real firstparam; - Handle(TColStd_HArray1OfReal) firstsol; - Blend_Point previousP; - Standard_Boolean rebrou; - Standard_Boolean iscomplete; - Standard_Boolean comptra; - Standard_Real sens; - + Standard_EXPORT BRepBlend_CSWalking(const Handle(Adaptor3d_Curve)& Curv, + const Handle(Adaptor3d_Surface)& Surf, + const Handle(Adaptor3d_TopolTool)& Domain); -}; + Standard_EXPORT void Perform(Blend_CSFunction& F, + const Standard_Real Pdep, + const Standard_Real Pmax, + const Standard_Real MaxStep, + const Standard_Real Tol3d, + const Standard_Real TolGuide, + const math_Vector& Soldep, + const Standard_Real Fleche, + const Standard_Boolean Appro = Standard_False); -#define TheVertex Handle(Adaptor3d_HVertex) -#define TheVertex_hxx -#define TheArc Handle(Adaptor2d_Curve2d) -#define TheArc_hxx -#define TheSurface Handle(Adaptor3d_Surface) -#define TheSurface_hxx -#define TheCurve Handle(Adaptor3d_Curve) -#define TheCurve_hxx -#define TheVertexTool Standard_Integer -#define TheVertexTool_hxx -#define TheArcTool BRepBlend_HCurve2dTool -#define TheArcTool_hxx -#define TheSurfaceTool Adaptor3d_HSurfaceTool -#define TheSurfaceTool_hxx -#define TheCurveTool BRepBlend_HCurveTool -#define TheCurveTool_hxx -#define Handle_TheTopolTool Handle(Adaptor3d_TopolTool) -#define TheTopolTool Adaptor3d_TopolTool -#define TheTopolTool_hxx -#define TheBlendTool BRepBlend_BlendTool -#define TheBlendTool_hxx -#define ThePointOnRst BRepBlend_PointOnRst -#define ThePointOnRst_hxx -#define TheSeqPointOnRst BRepBlend_SequenceOfPointOnRst -#define TheSeqPointOnRst_hxx -#define TheExtremity BRepBlend_Extremity -#define TheExtremity_hxx -#define Handle_TheLine Handle(BRepBlend_Line) -#define TheLine BRepBlend_Line -#define TheLine_hxx -#define Blend_CSWalking BRepBlend_CSWalking -#define Blend_CSWalking_hxx - -#undef TheVertex -#undef TheVertex_hxx -#undef TheArc -#undef TheArc_hxx -#undef TheSurface -#undef TheSurface_hxx -#undef TheCurve -#undef TheCurve_hxx -#undef TheVertexTool -#undef TheVertexTool_hxx -#undef TheArcTool -#undef TheArcTool_hxx -#undef TheSurfaceTool -#undef TheSurfaceTool_hxx -#undef TheCurveTool -#undef TheCurveTool_hxx -#undef Handle_TheTopolTool -#undef TheTopolTool -#undef TheTopolTool_hxx -#undef TheBlendTool -#undef TheBlendTool_hxx -#undef ThePointOnRst -#undef ThePointOnRst_hxx -#undef TheSeqPointOnRst -#undef TheSeqPointOnRst_hxx -#undef TheExtremity -#undef TheExtremity_hxx -#undef Handle_TheLine -#undef TheLine -#undef TheLine_hxx -#undef Blend_CSWalking -#undef Blend_CSWalking_hxx + Standard_EXPORT Standard_Boolean Complete(Blend_CSFunction& F, const Standard_Real Pmin); + Standard_Boolean IsDone() const; + const Handle(BRepBlend_Line)& Line() const; +private: + Standard_EXPORT void InternalPerform(Blend_CSFunction& F, + math_Vector& Sol, + const Standard_Real Bound); + + Standard_EXPORT void Transition(const Handle(Adaptor2d_Curve2d)& A, + const Standard_Real Param, + IntSurf_Transition& TLine, + IntSurf_Transition& TArc); + + Standard_EXPORT void MakeExtremity(BRepBlend_Extremity& Extrem, + const Standard_Integer Index, + const Standard_Real Param, + const Standard_Boolean IsVtx, + const Handle(Adaptor3d_HVertex)& Vtx); + + Standard_EXPORT Blend_Status CheckDeflectionOnSurf(const gp_Pnt& Psurf, + const gp_Pnt2d& Ponsurf, + const gp_Vec& Tgsurf, + const gp_Vec2d& Tgonsurf); + + Standard_EXPORT Blend_Status CheckDeflectionOnCurv(const gp_Pnt& Pcurv, + const Standard_Real Poncurv, + const gp_Vec& Tgcurv); + + Standard_EXPORT Blend_Status TestArret(Blend_CSFunction& F, + const math_Vector& Sol, + const Standard_Boolean TestDeflection, + const Blend_Status State); + + Standard_Boolean done; + Handle(BRepBlend_Line) line; + Handle(Adaptor3d_Surface) surf; + Handle(Adaptor3d_Curve) curv; + Handle(Adaptor3d_TopolTool) domain; + Standard_Real tolpoint3d; + Standard_Real tolgui; + Standard_Real pasmax; + Standard_Real fleche; + Standard_Real param; + Standard_Real firstparam; + Handle(TColStd_HArray1OfReal) firstsol; + Blend_Point previousP; + Standard_Boolean rebrou; + Standard_Boolean iscomplete; + Standard_Boolean comptra; + Standard_Real sens; +}; #endif // _BRepBlend_CSWalking_HeaderFile diff --git a/opencascade/BRepBlend_ChAsym.hxx b/opencascade/BRepBlend_ChAsym.hxx index 17057a5b7..b8f2ee808 100644 --- a/opencascade/BRepBlend_ChAsym.hxx +++ b/opencascade/BRepBlend_ChAsym.hxx @@ -21,5 +21,4 @@ typedef BlendFunc_ChAsym BRepBlend_ChAsym; - #endif // _BRepBlend_ChAsym_HeaderFile diff --git a/opencascade/BRepBlend_ChAsymInv.hxx b/opencascade/BRepBlend_ChAsymInv.hxx index 7fc37cc91..0e9844b4f 100644 --- a/opencascade/BRepBlend_ChAsymInv.hxx +++ b/opencascade/BRepBlend_ChAsymInv.hxx @@ -21,5 +21,4 @@ typedef BlendFunc_ChAsymInv BRepBlend_ChAsymInv; - #endif // _BRepBlend_ChAsymInv_HeaderFile diff --git a/opencascade/BRepBlend_ChamfInv.hxx b/opencascade/BRepBlend_ChamfInv.hxx index a96f69fb5..81440cdfe 100644 --- a/opencascade/BRepBlend_ChamfInv.hxx +++ b/opencascade/BRepBlend_ChamfInv.hxx @@ -21,5 +21,4 @@ typedef BlendFunc_ChamfInv BRepBlend_ChamfInv; - #endif // _BRepBlend_ChamfInv_HeaderFile diff --git a/opencascade/BRepBlend_Chamfer.hxx b/opencascade/BRepBlend_Chamfer.hxx index b9e7a3b47..2767318f6 100644 --- a/opencascade/BRepBlend_Chamfer.hxx +++ b/opencascade/BRepBlend_Chamfer.hxx @@ -21,5 +21,4 @@ typedef BlendFunc_Chamfer BRepBlend_Chamfer; - #endif // _BRepBlend_Chamfer_HeaderFile diff --git a/opencascade/BRepBlend_ConstRad.hxx b/opencascade/BRepBlend_ConstRad.hxx index 95ed85823..7b173d6ce 100644 --- a/opencascade/BRepBlend_ConstRad.hxx +++ b/opencascade/BRepBlend_ConstRad.hxx @@ -21,5 +21,4 @@ typedef BlendFunc_ConstRad BRepBlend_ConstRad; - #endif // _BRepBlend_ConstRad_HeaderFile diff --git a/opencascade/BRepBlend_ConstRadInv.hxx b/opencascade/BRepBlend_ConstRadInv.hxx index 793fb7461..7b5a9e49c 100644 --- a/opencascade/BRepBlend_ConstRadInv.hxx +++ b/opencascade/BRepBlend_ConstRadInv.hxx @@ -21,5 +21,4 @@ typedef BlendFunc_ConstRadInv BRepBlend_ConstRadInv; - #endif // _BRepBlend_ConstRadInv_HeaderFile diff --git a/opencascade/BRepBlend_ConstThroat.hxx b/opencascade/BRepBlend_ConstThroat.hxx index 3f0721da0..077ef3346 100644 --- a/opencascade/BRepBlend_ConstThroat.hxx +++ b/opencascade/BRepBlend_ConstThroat.hxx @@ -19,5 +19,4 @@ typedef BlendFunc_ConstThroat BRepBlend_ConstThroat; - #endif // _BRepBlend_ConstThroat_HeaderFile diff --git a/opencascade/BRepBlend_ConstThroatInv.hxx b/opencascade/BRepBlend_ConstThroatInv.hxx index 328441473..a433e0e03 100644 --- a/opencascade/BRepBlend_ConstThroatInv.hxx +++ b/opencascade/BRepBlend_ConstThroatInv.hxx @@ -19,5 +19,4 @@ typedef BlendFunc_ConstThroatInv BRepBlend_ConstThroatInv; - #endif // _BRepBlend_ConstThroatInv_HeaderFile diff --git a/opencascade/BRepBlend_ConstThroatWithPenetration.hxx b/opencascade/BRepBlend_ConstThroatWithPenetration.hxx index 6ed14528f..4659fd8d4 100644 --- a/opencascade/BRepBlend_ConstThroatWithPenetration.hxx +++ b/opencascade/BRepBlend_ConstThroatWithPenetration.hxx @@ -19,5 +19,4 @@ typedef BlendFunc_ConstThroatWithPenetration BRepBlend_ConstThroatWithPenetration; - #endif // _BRepBlend_ConstThroatWithPenetration_HeaderFile diff --git a/opencascade/BRepBlend_ConstThroatWithPenetrationInv.hxx b/opencascade/BRepBlend_ConstThroatWithPenetrationInv.hxx index 78940e0ef..1432124e6 100644 --- a/opencascade/BRepBlend_ConstThroatWithPenetrationInv.hxx +++ b/opencascade/BRepBlend_ConstThroatWithPenetrationInv.hxx @@ -19,5 +19,4 @@ typedef BlendFunc_ConstThroatWithPenetrationInv BRepBlend_ConstThroatWithPenetrationInv; - #endif // _BRepBlend_ConstThroatWithPenetrationInv_HeaderFile diff --git a/opencascade/BRepBlend_CurvPointRadInv.hxx b/opencascade/BRepBlend_CurvPointRadInv.hxx index d6b1d6f21..5296018b4 100644 --- a/opencascade/BRepBlend_CurvPointRadInv.hxx +++ b/opencascade/BRepBlend_CurvPointRadInv.hxx @@ -28,7 +28,6 @@ class math_Matrix; - //! Function of reframing between a point and a curve. //! valid in cases of constant and progressive radius. //! This function is used to find a solution on a done @@ -39,81 +38,61 @@ class math_Matrix; //! coordinates w, U where w is the parameter on the //! guide line, U are the parametric coordinates of a //! point on the partner curve 2. -class BRepBlend_CurvPointRadInv : public Blend_CurvPointFuncInv +class BRepBlend_CurvPointRadInv : public Blend_CurvPointFuncInv { public: - DEFINE_STANDARD_ALLOC - - Standard_EXPORT BRepBlend_CurvPointRadInv(const Handle(Adaptor3d_Curve)& C1, const Handle(Adaptor3d_Curve)& C2); - - Standard_EXPORT void Set (const Standard_Integer Choix); - + Standard_EXPORT BRepBlend_CurvPointRadInv(const Handle(Adaptor3d_Curve)& C1, + const Handle(Adaptor3d_Curve)& C2); + + Standard_EXPORT void Set(const Standard_Integer Choix); + //! returns 2. Standard_EXPORT Standard_Integer NbEquations() const; - + //! computes the values of the Functions for the //! variable . //! Returns True if the computation was done successfully, //! False otherwise. - Standard_EXPORT Standard_Boolean Value (const math_Vector& X, math_Vector& F); - + Standard_EXPORT Standard_Boolean Value(const math_Vector& X, math_Vector& F); + //! returns the values of the derivatives for the //! variable . //! Returns True if the computation was done successfully, //! False otherwise. - Standard_EXPORT Standard_Boolean Derivatives (const math_Vector& X, math_Matrix& D); - + Standard_EXPORT Standard_Boolean Derivatives(const math_Vector& X, math_Matrix& D); + //! returns the values of the functions and the derivatives //! for the variable . //! Returns True if the computation was done successfully, //! False otherwise. - Standard_EXPORT Standard_Boolean Values (const math_Vector& X, math_Vector& F, math_Matrix& D); - + Standard_EXPORT Standard_Boolean Values(const math_Vector& X, math_Vector& F, math_Matrix& D); + //! Set the Point on which a solution has to be found. - Standard_EXPORT void Set (const gp_Pnt& P); - + Standard_EXPORT void Set(const gp_Pnt& P); + //! Returns in the vector Tolerance the parametric tolerance //! for each of the 3 variables; //! Tol is the tolerance used in 3d space. - Standard_EXPORT void GetTolerance (math_Vector& Tolerance, const Standard_Real Tol) const; - + Standard_EXPORT void GetTolerance(math_Vector& Tolerance, const Standard_Real Tol) const; + //! Returns in the vector InfBound the lowest values allowed //! for each of the 3 variables. //! Returns in the vector SupBound the greatest values allowed //! for each of the 3 variables. - Standard_EXPORT void GetBounds (math_Vector& InfBound, math_Vector& SupBound) const; - + Standard_EXPORT void GetBounds(math_Vector& InfBound, math_Vector& SupBound) const; + //! Returns Standard_True if Sol is a zero of the function. //! Tol is the tolerance used in 3d space. - Standard_EXPORT Standard_Boolean IsSolution (const math_Vector& Sol, const Standard_Real Tol); - - - + Standard_EXPORT Standard_Boolean IsSolution(const math_Vector& Sol, const Standard_Real Tol); protected: - - - - - private: - - - Handle(Adaptor3d_Curve) curv1; Handle(Adaptor3d_Curve) curv2; - gp_Pnt point; - Standard_Integer choix; - - + gp_Pnt point; + Standard_Integer choix; }; - - - - - - #endif // _BRepBlend_CurvPointRadInv_HeaderFile diff --git a/opencascade/BRepBlend_EvolRad.hxx b/opencascade/BRepBlend_EvolRad.hxx index b5b748242..86bad89cf 100644 --- a/opencascade/BRepBlend_EvolRad.hxx +++ b/opencascade/BRepBlend_EvolRad.hxx @@ -21,5 +21,4 @@ typedef BlendFunc_EvolRad BRepBlend_EvolRad; - #endif // _BRepBlend_EvolRad_HeaderFile diff --git a/opencascade/BRepBlend_EvolRadInv.hxx b/opencascade/BRepBlend_EvolRadInv.hxx index 9063191f9..f2b357e6b 100644 --- a/opencascade/BRepBlend_EvolRadInv.hxx +++ b/opencascade/BRepBlend_EvolRadInv.hxx @@ -21,5 +21,4 @@ typedef BlendFunc_EvolRadInv BRepBlend_EvolRadInv; - #endif // _BRepBlend_EvolRadInv_HeaderFile diff --git a/opencascade/BRepBlend_Extremity.hxx b/opencascade/BRepBlend_Extremity.hxx index c923ccc3b..4900776b9 100644 --- a/opencascade/BRepBlend_Extremity.hxx +++ b/opencascade/BRepBlend_Extremity.hxx @@ -31,73 +31,96 @@ class Adaptor3d_HVertex; class IntSurf_Transition; class BRepBlend_PointOnRst; - - -class BRepBlend_Extremity +class BRepBlend_Extremity { public: - DEFINE_STANDARD_ALLOC - Standard_EXPORT BRepBlend_Extremity(); - + //! Creates an extremity on a surface - Standard_EXPORT BRepBlend_Extremity(const gp_Pnt& P, const Standard_Real U, const Standard_Real V, const Standard_Real Param, const Standard_Real Tol); - + Standard_EXPORT BRepBlend_Extremity(const gp_Pnt& P, + const Standard_Real U, + const Standard_Real V, + const Standard_Real Param, + const Standard_Real Tol); + //! Creates an extremity on a surface. This extremity matches //! the vertex . - Standard_EXPORT BRepBlend_Extremity(const gp_Pnt& P, const Standard_Real U, const Standard_Real V, const Standard_Real Param, const Standard_Real Tol, const Handle(Adaptor3d_HVertex)& Vtx); - + Standard_EXPORT BRepBlend_Extremity(const gp_Pnt& P, + const Standard_Real U, + const Standard_Real V, + const Standard_Real Param, + const Standard_Real Tol, + const Handle(Adaptor3d_HVertex)& Vtx); + //! Creates an extremity on a curve - Standard_EXPORT BRepBlend_Extremity(const gp_Pnt& P, const Standard_Real W, const Standard_Real Param, const Standard_Real Tol); - + Standard_EXPORT BRepBlend_Extremity(const gp_Pnt& P, + const Standard_Real W, + const Standard_Real Param, + const Standard_Real Tol); + //! Set the values for an extremity on a surface. - Standard_EXPORT void SetValue (const gp_Pnt& P, const Standard_Real U, const Standard_Real V, const Standard_Real Param, const Standard_Real Tol); - + Standard_EXPORT void SetValue(const gp_Pnt& P, + const Standard_Real U, + const Standard_Real V, + const Standard_Real Param, + const Standard_Real Tol); + //! Set the values for an extremity on a surface.This //! extremity matches the vertex . - Standard_EXPORT void SetValue (const gp_Pnt& P, const Standard_Real U, const Standard_Real V, const Standard_Real Param, const Standard_Real Tol, const Handle(Adaptor3d_HVertex)& Vtx); - + Standard_EXPORT void SetValue(const gp_Pnt& P, + const Standard_Real U, + const Standard_Real V, + const Standard_Real Param, + const Standard_Real Tol, + const Handle(Adaptor3d_HVertex)& Vtx); + //! Set the values for an extremity on curve. - Standard_EXPORT void SetValue (const gp_Pnt& P, const Standard_Real W, const Standard_Real Param, const Standard_Real Tol); - + Standard_EXPORT void SetValue(const gp_Pnt& P, + const Standard_Real W, + const Standard_Real Param, + const Standard_Real Tol); + //! This method returns the value of the point in 3d space. - const gp_Pnt& Value() const; - + const gp_Pnt& Value() const; + //! Set the tangent vector for an extremity on a //! surface. - void SetTangent (const gp_Vec& Tangent); - + void SetTangent(const gp_Vec& Tangent); + //! Returns TRUE if the Tangent is stored. - Standard_Boolean HasTangent() const; - + Standard_Boolean HasTangent() const; + //! This method returns the value of tangent in 3d //! space. - const gp_Vec& Tangent() const; - + const gp_Vec& Tangent() const; + //! This method returns the fuzziness on the point //! in 3d space. - Standard_Real Tolerance() const; - + Standard_Real Tolerance() const; + //! Set the values for an extremity on a curve. - Standard_EXPORT void SetVertex (const Handle(Adaptor3d_HVertex)& V); - + Standard_EXPORT void SetVertex(const Handle(Adaptor3d_HVertex)& V); + //! Sets the values of a point which is on the arc //! A, at parameter Param. - Standard_EXPORT void AddArc (const Handle(Adaptor2d_Curve2d)& A, const Standard_Real Param, const IntSurf_Transition& TLine, const IntSurf_Transition& TArc); - + Standard_EXPORT void AddArc(const Handle(Adaptor2d_Curve2d)& A, + const Standard_Real Param, + const IntSurf_Transition& TLine, + const IntSurf_Transition& TArc); + //! This method returns the parameters of the point //! on the concerned surface. - void Parameters (Standard_Real& U, Standard_Real& V) const; - + void Parameters(Standard_Real& U, Standard_Real& V) const; + //! Returns Standard_True when the point coincide with //! an existing vertex. - Standard_Boolean IsVertex() const; - + Standard_Boolean IsVertex() const; + //! Returns the vertex when IsVertex returns Standard_True. - const Handle(Adaptor3d_HVertex)& Vertex() const; - + const Handle(Adaptor3d_HVertex)& Vertex() const; + //! Returns the number of arc containing the extremity. //! If the method returns 0, the point is inside the //! surface. @@ -105,46 +128,28 @@ public: //! and all the information (arc, parameter, transitions) //! are given by the point on restriction (PointOnRst) //! returned by the next method. - Standard_Integer NbPointOnRst() const; - - const BRepBlend_PointOnRst& PointOnRst (const Standard_Integer Index) const; - - Standard_Real Parameter() const; - - Standard_Real ParameterOnGuide() const; + Standard_Integer NbPointOnRst() const; + const BRepBlend_PointOnRst& PointOnRst(const Standard_Integer Index) const; + Standard_Real Parameter() const; + Standard_Real ParameterOnGuide() const; protected: - - - - - private: - - - - Handle(Adaptor3d_HVertex) vtx; + Handle(Adaptor3d_HVertex) vtx; BRepBlend_SequenceOfPointOnRst seqpt; - gp_Pnt pt; - gp_Vec tang; - Standard_Real param; - Standard_Real u; - Standard_Real v; - Standard_Real tol; - Standard_Boolean isvtx; - Standard_Boolean hastang; - - + gp_Pnt pt; + gp_Vec tang; + Standard_Real param; + Standard_Real u; + Standard_Real v; + Standard_Real tol; + Standard_Boolean isvtx; + Standard_Boolean hastang; }; - #include - - - - #endif // _BRepBlend_Extremity_HeaderFile diff --git a/opencascade/BRepBlend_Extremity.lxx b/opencascade/BRepBlend_Extremity.lxx index cffad9991..3b84ce392 100644 --- a/opencascade/BRepBlend_Extremity.lxx +++ b/opencascade/BRepBlend_Extremity.lxx @@ -14,7 +14,7 @@ #include -inline const gp_Pnt& BRepBlend_Extremity::Value () const +inline const gp_Pnt& BRepBlend_Extremity::Value() const { return pt; } @@ -22,22 +22,24 @@ inline const gp_Pnt& BRepBlend_Extremity::Value () const inline void BRepBlend_Extremity::SetTangent(const gp_Vec& Tangent) { hastang = Standard_True; - tang = Tangent; + tang = Tangent; } -inline Standard_Boolean BRepBlend_Extremity::HasTangent () const +inline Standard_Boolean BRepBlend_Extremity::HasTangent() const { return hastang; } -inline const gp_Vec& BRepBlend_Extremity::Tangent () const +inline const gp_Vec& BRepBlend_Extremity::Tangent() const { - if (!hastang) {throw Standard_DomainError();} + if (!hastang) + { + throw Standard_DomainError(); + } return tang; } -inline void BRepBlend_Extremity::Parameters(Standard_Real& U, - Standard_Real& V) const +inline void BRepBlend_Extremity::Parameters(Standard_Real& U, Standard_Real& V) const { U = u; V = v; @@ -48,26 +50,27 @@ inline Standard_Real BRepBlend_Extremity::Tolerance() const return tol; } - inline Standard_Boolean BRepBlend_Extremity::IsVertex() const { return isvtx; } - -inline const Handle(Adaptor3d_HVertex)& BRepBlend_Extremity::Vertex () const +inline const Handle(Adaptor3d_HVertex)& BRepBlend_Extremity::Vertex() const { - if (!isvtx) {throw Standard_DomainError();} + if (!isvtx) + { + throw Standard_DomainError(); + } return vtx; } -inline Standard_Integer BRepBlend_Extremity::NbPointOnRst () const +inline Standard_Integer BRepBlend_Extremity::NbPointOnRst() const { return seqpt.Length(); } -inline const BRepBlend_PointOnRst& BRepBlend_Extremity::PointOnRst - (const Standard_Integer Index) const +inline const BRepBlend_PointOnRst& BRepBlend_Extremity::PointOnRst( + const Standard_Integer Index) const { return seqpt(Index); } @@ -83,4 +86,3 @@ inline Standard_Real BRepBlend_Extremity::ParameterOnGuide() const { return param; } - diff --git a/opencascade/BRepBlend_HCurve2dTool.hxx b/opencascade/BRepBlend_HCurve2dTool.hxx index c28ebfdbe..e9c6ca75c 100644 --- a/opencascade/BRepBlend_HCurve2dTool.hxx +++ b/opencascade/BRepBlend_HCurve2dTool.hxx @@ -29,117 +29,112 @@ #include #include -class BRepBlend_HCurve2dTool +class BRepBlend_HCurve2dTool { public: - DEFINE_STANDARD_ALLOC - - static Standard_Real FirstParameter (const Handle(Adaptor2d_Curve2d)& C); - - static Standard_Real LastParameter (const Handle(Adaptor2d_Curve2d)& C); - - static GeomAbs_Shape Continuity (const Handle(Adaptor2d_Curve2d)& C); - + static Standard_Real FirstParameter(const Handle(Adaptor2d_Curve2d)& C); + + static Standard_Real LastParameter(const Handle(Adaptor2d_Curve2d)& C); + + static GeomAbs_Shape Continuity(const Handle(Adaptor2d_Curve2d)& C); + //! Returns the number of intervals for continuity //! . May be one if Continuity(myclass) >= - static Standard_Integer NbIntervals (const Handle(Adaptor2d_Curve2d)& C, const GeomAbs_Shape S); - + static Standard_Integer NbIntervals(const Handle(Adaptor2d_Curve2d)& C, const GeomAbs_Shape S); + //! Stores in the parameters bounding the intervals //! of continuity . //! //! The array must provide enough room to accommodate //! for the parameters. i.e. T.Length() > NbIntervals() - static void Intervals (const Handle(Adaptor2d_Curve2d)& C, TColStd_Array1OfReal& T, const GeomAbs_Shape S); - - static Standard_Boolean IsClosed (const Handle(Adaptor2d_Curve2d)& C); - - static Standard_Boolean IsPeriodic (const Handle(Adaptor2d_Curve2d)& C); - - static Standard_Real Period (const Handle(Adaptor2d_Curve2d)& C); - + static void Intervals(const Handle(Adaptor2d_Curve2d)& C, + TColStd_Array1OfReal& T, + const GeomAbs_Shape S); + + static Standard_Boolean IsClosed(const Handle(Adaptor2d_Curve2d)& C); + + static Standard_Boolean IsPeriodic(const Handle(Adaptor2d_Curve2d)& C); + + static Standard_Real Period(const Handle(Adaptor2d_Curve2d)& C); + //! Computes the point of parameter U on the curve. - static gp_Pnt2d Value (const Handle(Adaptor2d_Curve2d)& C, const Standard_Real U); - + static gp_Pnt2d Value(const Handle(Adaptor2d_Curve2d)& C, const Standard_Real U); + //! Computes the point of parameter U on the curve. - static void D0 (const Handle(Adaptor2d_Curve2d)& C, const Standard_Real U, gp_Pnt2d& P); - + static void D0(const Handle(Adaptor2d_Curve2d)& C, const Standard_Real U, gp_Pnt2d& P); + //! Computes the point of parameter U on the curve with its //! first derivative. //! Raised if the continuity of the current interval //! is not C1. - static void D1 (const Handle(Adaptor2d_Curve2d)& C, const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V); - + static void D1(const Handle(Adaptor2d_Curve2d)& C, + const Standard_Real U, + gp_Pnt2d& P, + gp_Vec2d& V); //! Returns the point P of parameter U, the first and second //! derivatives V1 and V2. //! Raised if the continuity of the current interval //! is not C2. - static void D2 (const Handle(Adaptor2d_Curve2d)& C, const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2); - + static void D2(const Handle(Adaptor2d_Curve2d)& C, + const Standard_Real U, + gp_Pnt2d& P, + gp_Vec2d& V1, + gp_Vec2d& V2); //! Returns the point P of parameter U, the first, the second //! and the third derivative. //! Raised if the continuity of the current interval //! is not C3. - static void D3 (const Handle(Adaptor2d_Curve2d)& C, const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2, gp_Vec2d& V3); - + static void D3(const Handle(Adaptor2d_Curve2d)& C, + const Standard_Real U, + gp_Pnt2d& P, + gp_Vec2d& V1, + gp_Vec2d& V2, + gp_Vec2d& V3); //! The returned vector gives the value of the derivative for the //! order of derivation N. //! Raised if the continuity of the current interval //! is not CN. //! Raised if N < 1. - static gp_Vec2d DN (const Handle(Adaptor2d_Curve2d)& C, const Standard_Real U, const Standard_Integer N); - + static gp_Vec2d DN(const Handle(Adaptor2d_Curve2d)& C, + const Standard_Real U, + const Standard_Integer N); + //! Returns the parametric resolution corresponding //! to the real space resolution . - static Standard_Real Resolution (const Handle(Adaptor2d_Curve2d)& C, const Standard_Real R3d); - + static Standard_Real Resolution(const Handle(Adaptor2d_Curve2d)& C, const Standard_Real R3d); + //! Returns the type of the curve in the current //! interval : Line, Circle, Ellipse, Hyperbola, //! Parabola, BezierCurve, BSplineCurve, OtherCurve. - static GeomAbs_CurveType GetType (const Handle(Adaptor2d_Curve2d)& C); - - static gp_Lin2d Line (const Handle(Adaptor2d_Curve2d)& C); - - static gp_Circ2d Circle (const Handle(Adaptor2d_Curve2d)& C); - - static gp_Elips2d Ellipse (const Handle(Adaptor2d_Curve2d)& C); - - static gp_Hypr2d Hyperbola (const Handle(Adaptor2d_Curve2d)& C); - - static gp_Parab2d Parabola (const Handle(Adaptor2d_Curve2d)& C); - - static Handle(Geom2d_BezierCurve) Bezier (const Handle(Adaptor2d_Curve2d)& C); - - static Handle(Geom2d_BSplineCurve) BSpline (const Handle(Adaptor2d_Curve2d)& C); - - Standard_EXPORT static Standard_Integer NbSamples (const Handle(Adaptor2d_Curve2d)& C, const Standard_Real U0, const Standard_Real U1); + static GeomAbs_CurveType GetType(const Handle(Adaptor2d_Curve2d)& C); + static gp_Lin2d Line(const Handle(Adaptor2d_Curve2d)& C); + static gp_Circ2d Circle(const Handle(Adaptor2d_Curve2d)& C); + static gp_Elips2d Ellipse(const Handle(Adaptor2d_Curve2d)& C); -protected: + static gp_Hypr2d Hyperbola(const Handle(Adaptor2d_Curve2d)& C); + static gp_Parab2d Parabola(const Handle(Adaptor2d_Curve2d)& C); + static Handle(Geom2d_BezierCurve) Bezier(const Handle(Adaptor2d_Curve2d)& C); + static Handle(Geom2d_BSplineCurve) BSpline(const Handle(Adaptor2d_Curve2d)& C); + Standard_EXPORT static Standard_Integer NbSamples(const Handle(Adaptor2d_Curve2d)& C, + const Standard_Real U0, + const Standard_Real U1); +protected: private: - - - - - }; - #include - - - - #endif // _BRepBlend_HCurve2dTool_HeaderFile diff --git a/opencascade/BRepBlend_HCurve2dTool.lxx b/opencascade/BRepBlend_HCurve2dTool.lxx index ebc4a88f5..4f363bd51 100644 --- a/opencascade/BRepBlend_HCurve2dTool.lxx +++ b/opencascade/BRepBlend_HCurve2dTool.lxx @@ -24,139 +24,172 @@ #include #include - #include #include #include //============================================================ -inline Standard_Real BRepBlend_HCurve2dTool::FirstParameter (const Handle(Adaptor2d_Curve2d)& C) { - return(C->FirstParameter()); +inline Standard_Real BRepBlend_HCurve2dTool::FirstParameter(const Handle(Adaptor2d_Curve2d)& C) +{ + return (C->FirstParameter()); } + //============================================================ -inline Standard_Real BRepBlend_HCurve2dTool::LastParameter (const Handle(Adaptor2d_Curve2d)& C) { - return(C->LastParameter()); +inline Standard_Real BRepBlend_HCurve2dTool::LastParameter(const Handle(Adaptor2d_Curve2d)& C) +{ + return (C->LastParameter()); } + //============================================================ -inline GeomAbs_Shape BRepBlend_HCurve2dTool::Continuity (const Handle(Adaptor2d_Curve2d)& C) { - return(C->Continuity()); +inline GeomAbs_Shape BRepBlend_HCurve2dTool::Continuity(const Handle(Adaptor2d_Curve2d)& C) +{ + return (C->Continuity()); } + //============================================================ -inline Standard_Integer BRepBlend_HCurve2dTool::NbIntervals(const Handle(Adaptor2d_Curve2d)& C,const GeomAbs_Shape Sh) { - return(C->NbIntervals(Sh)); +inline Standard_Integer BRepBlend_HCurve2dTool::NbIntervals(const Handle(Adaptor2d_Curve2d)& C, + const GeomAbs_Shape Sh) +{ + return (C->NbIntervals(Sh)); } + //============================================================ inline void BRepBlend_HCurve2dTool::Intervals(const Handle(Adaptor2d_Curve2d)& C, - TColStd_Array1OfReal& Tab, - const GeomAbs_Shape Sh) { - C->Intervals(Tab,Sh); + TColStd_Array1OfReal& Tab, + const GeomAbs_Shape Sh) +{ + C->Intervals(Tab, Sh); } + //============================================================ -inline Standard_Boolean BRepBlend_HCurve2dTool::IsClosed(const Handle(Adaptor2d_Curve2d)& C) { - return(C->IsClosed()); +inline Standard_Boolean BRepBlend_HCurve2dTool::IsClosed(const Handle(Adaptor2d_Curve2d)& C) +{ + return (C->IsClosed()); } + //============================================================ -inline Standard_Boolean BRepBlend_HCurve2dTool::IsPeriodic(const Handle(Adaptor2d_Curve2d)& C) { - return(C->IsPeriodic()); +inline Standard_Boolean BRepBlend_HCurve2dTool::IsPeriodic(const Handle(Adaptor2d_Curve2d)& C) +{ + return (C->IsPeriodic()); } + //============================================================ -inline Standard_Real BRepBlend_HCurve2dTool::Period(const Handle(Adaptor2d_Curve2d)& C) { - return(C->Period()); +inline Standard_Real BRepBlend_HCurve2dTool::Period(const Handle(Adaptor2d_Curve2d)& C) +{ + return (C->Period()); } + //============================================================ -inline gp_Pnt2d BRepBlend_HCurve2dTool::Value (const Handle(Adaptor2d_Curve2d)& C, - const Standard_Real U) { - return(C->Value(U)); +inline gp_Pnt2d BRepBlend_HCurve2dTool::Value(const Handle(Adaptor2d_Curve2d)& C, + const Standard_Real U) +{ + return (C->Value(U)); } + //============================================================ inline void BRepBlend_HCurve2dTool::D0(const Handle(Adaptor2d_Curve2d)& C, - const Standard_Real U, - gp_Pnt2d& P) { - C->D0(U,P); + const Standard_Real U, + gp_Pnt2d& P) +{ + C->D0(U, P); } + //============================================================ -inline void BRepBlend_HCurve2dTool::D1 (const Handle(Adaptor2d_Curve2d)& C, - const Standard_Real U, - gp_Pnt2d& P, - gp_Vec2d& T) { - C->D1(U,P,T); +inline void BRepBlend_HCurve2dTool::D1(const Handle(Adaptor2d_Curve2d)& C, + const Standard_Real U, + gp_Pnt2d& P, + gp_Vec2d& T) +{ + C->D1(U, P, T); } + //============================================================ -inline void BRepBlend_HCurve2dTool::D2 (const Handle(Adaptor2d_Curve2d)& C, - const Standard_Real U, - gp_Pnt2d& P, - gp_Vec2d& T, - gp_Vec2d& N) { - - C->D2(U,P,T,N); +inline void BRepBlend_HCurve2dTool::D2(const Handle(Adaptor2d_Curve2d)& C, + const Standard_Real U, + gp_Pnt2d& P, + gp_Vec2d& T, + gp_Vec2d& N) +{ + + C->D2(U, P, T, N); } + //============================================================ -inline void BRepBlend_HCurve2dTool::D3 (const Handle(Adaptor2d_Curve2d)& C, - const Standard_Real U, - gp_Pnt2d& P, - gp_Vec2d& V1, - gp_Vec2d& V2, - gp_Vec2d& V3) { - - C->D3(U,P,V1,V2,V3); +inline void BRepBlend_HCurve2dTool::D3(const Handle(Adaptor2d_Curve2d)& C, + const Standard_Real U, + gp_Pnt2d& P, + gp_Vec2d& V1, + gp_Vec2d& V2, + gp_Vec2d& V3) +{ + + C->D3(U, P, V1, V2, V3); } + //============================================================ -inline gp_Vec2d BRepBlend_HCurve2dTool::DN (const Handle(Adaptor2d_Curve2d)& C, - const Standard_Real U, - const Standard_Integer N) { - - return(C->DN(U,N)); +inline gp_Vec2d BRepBlend_HCurve2dTool::DN(const Handle(Adaptor2d_Curve2d)& C, + const Standard_Real U, + const Standard_Integer N) +{ + + return (C->DN(U, N)); } + //============================================================ inline Standard_Real BRepBlend_HCurve2dTool::Resolution(const Handle(Adaptor2d_Curve2d)& C, - const Standard_Real R3d) { - return(C->Resolution(R3d)); + const Standard_Real R3d) +{ + return (C->Resolution(R3d)); } + //============================================================ -inline GeomAbs_CurveType BRepBlend_HCurve2dTool::GetType(const Handle(Adaptor2d_Curve2d)& C) { - return(C->GetType()); +inline GeomAbs_CurveType BRepBlend_HCurve2dTool::GetType(const Handle(Adaptor2d_Curve2d)& C) +{ + return (C->GetType()); } + //============================================================ -inline gp_Lin2d BRepBlend_HCurve2dTool::Line (const Handle(Adaptor2d_Curve2d)& C) { - return(C->Line()); +inline gp_Lin2d BRepBlend_HCurve2dTool::Line(const Handle(Adaptor2d_Curve2d)& C) +{ + return (C->Line()); } + //============================================================ -inline gp_Circ2d BRepBlend_HCurve2dTool::Circle (const Handle(Adaptor2d_Curve2d)& C) { - return(C->Circle()); +inline gp_Circ2d BRepBlend_HCurve2dTool::Circle(const Handle(Adaptor2d_Curve2d)& C) +{ + return (C->Circle()); } + //============================================================ -inline gp_Elips2d BRepBlend_HCurve2dTool::Ellipse (const Handle(Adaptor2d_Curve2d)& C) { - return(C->Ellipse()); +inline gp_Elips2d BRepBlend_HCurve2dTool::Ellipse(const Handle(Adaptor2d_Curve2d)& C) +{ + return (C->Ellipse()); } + //============================================================ -inline gp_Parab2d BRepBlend_HCurve2dTool::Parabola (const Handle(Adaptor2d_Curve2d)& C) { - return(C->Parabola()); +inline gp_Parab2d BRepBlend_HCurve2dTool::Parabola(const Handle(Adaptor2d_Curve2d)& C) +{ + return (C->Parabola()); } + //============================================================ -inline gp_Hypr2d BRepBlend_HCurve2dTool::Hyperbola (const Handle(Adaptor2d_Curve2d)& C) { - return(C->Hyperbola()); +inline gp_Hypr2d BRepBlend_HCurve2dTool::Hyperbola(const Handle(Adaptor2d_Curve2d)& C) +{ + return (C->Hyperbola()); } + //============================================================ -inline Handle(Geom2d_BezierCurve) BRepBlend_HCurve2dTool::Bezier (const Handle(Adaptor2d_Curve2d)& C) { - return(C->Bezier()); +inline Handle(Geom2d_BezierCurve) BRepBlend_HCurve2dTool::Bezier(const Handle(Adaptor2d_Curve2d)& C) +{ + return (C->Bezier()); } + //============================================================ -inline Handle(Geom2d_BSplineCurve) BRepBlend_HCurve2dTool::BSpline (const Handle(Adaptor2d_Curve2d)& C) { - return(C->BSpline()); +inline Handle(Geom2d_BSplineCurve) BRepBlend_HCurve2dTool::BSpline( + const Handle(Adaptor2d_Curve2d)& C) +{ + return (C->BSpline()); } -//============================================================ - - - - - - - - - - - - - +//============================================================ diff --git a/opencascade/BRepBlend_HCurveTool.hxx b/opencascade/BRepBlend_HCurveTool.hxx index 3edb968f7..1eaeacf5b 100644 --- a/opencascade/BRepBlend_HCurveTool.hxx +++ b/opencascade/BRepBlend_HCurveTool.hxx @@ -29,117 +29,109 @@ #include #include -class BRepBlend_HCurveTool +class BRepBlend_HCurveTool { public: - DEFINE_STANDARD_ALLOC - - static Standard_Real FirstParameter (const Handle(Adaptor3d_Curve)& C); - - static Standard_Real LastParameter (const Handle(Adaptor3d_Curve)& C); - - static GeomAbs_Shape Continuity (const Handle(Adaptor3d_Curve)& C); - + static Standard_Real FirstParameter(const Handle(Adaptor3d_Curve)& C); + + static Standard_Real LastParameter(const Handle(Adaptor3d_Curve)& C); + + static GeomAbs_Shape Continuity(const Handle(Adaptor3d_Curve)& C); + //! Returns the number of intervals for continuity //! . May be one if Continuity(myclass) >= - static Standard_Integer NbIntervals (const Handle(Adaptor3d_Curve)& C, const GeomAbs_Shape S); - + static Standard_Integer NbIntervals(const Handle(Adaptor3d_Curve)& C, const GeomAbs_Shape S); + //! Stores in the parameters bounding the intervals //! of continuity . //! //! The array must provide enough room to accommodate //! for the parameters. i.e. T.Length() > NbIntervals() - static void Intervals (const Handle(Adaptor3d_Curve)& C, TColStd_Array1OfReal& T, const GeomAbs_Shape S); - - static Standard_Boolean IsClosed (const Handle(Adaptor3d_Curve)& C); - - static Standard_Boolean IsPeriodic (const Handle(Adaptor3d_Curve)& C); - - static Standard_Real Period (const Handle(Adaptor3d_Curve)& C); - + static void Intervals(const Handle(Adaptor3d_Curve)& C, + TColStd_Array1OfReal& T, + const GeomAbs_Shape S); + + static Standard_Boolean IsClosed(const Handle(Adaptor3d_Curve)& C); + + static Standard_Boolean IsPeriodic(const Handle(Adaptor3d_Curve)& C); + + static Standard_Real Period(const Handle(Adaptor3d_Curve)& C); + //! Computes the point of parameter U on the curve. - static gp_Pnt Value (const Handle(Adaptor3d_Curve)& C, const Standard_Real U); - + static gp_Pnt Value(const Handle(Adaptor3d_Curve)& C, const Standard_Real U); + //! Computes the point of parameter U on the curve. - static void D0 (const Handle(Adaptor3d_Curve)& C, const Standard_Real U, gp_Pnt& P); - + static void D0(const Handle(Adaptor3d_Curve)& C, const Standard_Real U, gp_Pnt& P); + //! Computes the point of parameter U on the curve with its //! first derivative. //! Raised if the continuity of the current interval //! is not C1. - static void D1 (const Handle(Adaptor3d_Curve)& C, const Standard_Real U, gp_Pnt& P, gp_Vec& V); - + static void D1(const Handle(Adaptor3d_Curve)& C, const Standard_Real U, gp_Pnt& P, gp_Vec& V); //! Returns the point P of parameter U, the first and second //! derivatives V1 and V2. //! Raised if the continuity of the current interval //! is not C2. - static void D2 (const Handle(Adaptor3d_Curve)& C, const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2); - + static void D2(const Handle(Adaptor3d_Curve)& C, + const Standard_Real U, + gp_Pnt& P, + gp_Vec& V1, + gp_Vec& V2); //! Returns the point P of parameter U, the first, the second //! and the third derivative. //! Raised if the continuity of the current interval //! is not C3. - static void D3 (const Handle(Adaptor3d_Curve)& C, const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, gp_Vec& V3); - + static void D3(const Handle(Adaptor3d_Curve)& C, + const Standard_Real U, + gp_Pnt& P, + gp_Vec& V1, + gp_Vec& V2, + gp_Vec& V3); //! The returned vector gives the value of the derivative for the //! order of derivation N. //! Raised if the continuity of the current interval //! is not CN. //! Raised if N < 1. - static gp_Vec DN (const Handle(Adaptor3d_Curve)& C, const Standard_Real U, const Standard_Integer N); - + static gp_Vec DN(const Handle(Adaptor3d_Curve)& C, + const Standard_Real U, + const Standard_Integer N); + //! Returns the parametric resolution corresponding //! to the real space resolution . - static Standard_Real Resolution (const Handle(Adaptor3d_Curve)& C, const Standard_Real R3d); - + static Standard_Real Resolution(const Handle(Adaptor3d_Curve)& C, const Standard_Real R3d); + //! Returns the type of the curve in the current //! interval : Line, Circle, Ellipse, Hyperbola, //! Parabola, BezierCurve, BSplineCurve, OtherCurve. - static GeomAbs_CurveType GetType (const Handle(Adaptor3d_Curve)& C); - - static gp_Lin Line (const Handle(Adaptor3d_Curve)& C); - - static gp_Circ Circle (const Handle(Adaptor3d_Curve)& C); - - static gp_Elips Ellipse (const Handle(Adaptor3d_Curve)& C); - - static gp_Hypr Hyperbola (const Handle(Adaptor3d_Curve)& C); - - static gp_Parab Parabola (const Handle(Adaptor3d_Curve)& C); - - static Handle(Geom_BezierCurve) Bezier (const Handle(Adaptor3d_Curve)& C); - - static Handle(Geom_BSplineCurve) BSpline (const Handle(Adaptor3d_Curve)& C); - - Standard_EXPORT static Standard_Integer NbSamples (const Handle(Adaptor3d_Curve)& C, const Standard_Real U0, const Standard_Real U1); + static GeomAbs_CurveType GetType(const Handle(Adaptor3d_Curve)& C); + static gp_Lin Line(const Handle(Adaptor3d_Curve)& C); + static gp_Circ Circle(const Handle(Adaptor3d_Curve)& C); + static gp_Elips Ellipse(const Handle(Adaptor3d_Curve)& C); -protected: + static gp_Hypr Hyperbola(const Handle(Adaptor3d_Curve)& C); + static gp_Parab Parabola(const Handle(Adaptor3d_Curve)& C); + static Handle(Geom_BezierCurve) Bezier(const Handle(Adaptor3d_Curve)& C); + static Handle(Geom_BSplineCurve) BSpline(const Handle(Adaptor3d_Curve)& C); + Standard_EXPORT static Standard_Integer NbSamples(const Handle(Adaptor3d_Curve)& C, + const Standard_Real U0, + const Standard_Real U1); +protected: private: - - - - - }; - #include - - - - #endif // _BRepBlend_HCurveTool_HeaderFile diff --git a/opencascade/BRepBlend_HCurveTool.lxx b/opencascade/BRepBlend_HCurveTool.lxx index 356e16ac7..b31e11ef1 100644 --- a/opencascade/BRepBlend_HCurveTool.lxx +++ b/opencascade/BRepBlend_HCurveTool.lxx @@ -24,139 +24,170 @@ #include #include - #include #include #include //============================================================ -inline Standard_Real BRepBlend_HCurveTool::FirstParameter (const Handle(Adaptor3d_Curve)& C) { - return(C->FirstParameter()); +inline Standard_Real BRepBlend_HCurveTool::FirstParameter(const Handle(Adaptor3d_Curve)& C) +{ + return (C->FirstParameter()); } + //============================================================ -inline Standard_Real BRepBlend_HCurveTool::LastParameter (const Handle(Adaptor3d_Curve)& C) { - return(C->LastParameter()); +inline Standard_Real BRepBlend_HCurveTool::LastParameter(const Handle(Adaptor3d_Curve)& C) +{ + return (C->LastParameter()); } + //============================================================ -inline GeomAbs_Shape BRepBlend_HCurveTool::Continuity (const Handle(Adaptor3d_Curve)& C) { - return(C->Continuity()); +inline GeomAbs_Shape BRepBlend_HCurveTool::Continuity(const Handle(Adaptor3d_Curve)& C) +{ + return (C->Continuity()); } + //============================================================ -inline Standard_Integer BRepBlend_HCurveTool::NbIntervals(const Handle(Adaptor3d_Curve)& C,const GeomAbs_Shape Sh) { - return(C->NbIntervals(Sh)); +inline Standard_Integer BRepBlend_HCurveTool::NbIntervals(const Handle(Adaptor3d_Curve)& C, + const GeomAbs_Shape Sh) +{ + return (C->NbIntervals(Sh)); } + //============================================================ inline void BRepBlend_HCurveTool::Intervals(const Handle(Adaptor3d_Curve)& C, - TColStd_Array1OfReal& Tab, - const GeomAbs_Shape Sh) { - C->Intervals(Tab,Sh); + TColStd_Array1OfReal& Tab, + const GeomAbs_Shape Sh) +{ + C->Intervals(Tab, Sh); } + //============================================================ -inline Standard_Boolean BRepBlend_HCurveTool::IsClosed(const Handle(Adaptor3d_Curve)& C) { - return(C->IsClosed()); +inline Standard_Boolean BRepBlend_HCurveTool::IsClosed(const Handle(Adaptor3d_Curve)& C) +{ + return (C->IsClosed()); } + //============================================================ -inline Standard_Boolean BRepBlend_HCurveTool::IsPeriodic(const Handle(Adaptor3d_Curve)& C) { - return(C->IsPeriodic()); +inline Standard_Boolean BRepBlend_HCurveTool::IsPeriodic(const Handle(Adaptor3d_Curve)& C) +{ + return (C->IsPeriodic()); } + //============================================================ -inline Standard_Real BRepBlend_HCurveTool::Period(const Handle(Adaptor3d_Curve)& C) { - return(C->Period()); +inline Standard_Real BRepBlend_HCurveTool::Period(const Handle(Adaptor3d_Curve)& C) +{ + return (C->Period()); } + //============================================================ -inline gp_Pnt BRepBlend_HCurveTool::Value (const Handle(Adaptor3d_Curve)& C, - const Standard_Real U) { - return(C->Value(U)); +inline gp_Pnt BRepBlend_HCurveTool::Value(const Handle(Adaptor3d_Curve)& C, const Standard_Real U) +{ + return (C->Value(U)); } + //============================================================ inline void BRepBlend_HCurveTool::D0(const Handle(Adaptor3d_Curve)& C, - const Standard_Real U, - gp_Pnt& P) { - C->D0(U,P); + const Standard_Real U, + gp_Pnt& P) +{ + C->D0(U, P); } + //============================================================ -inline void BRepBlend_HCurveTool::D1 (const Handle(Adaptor3d_Curve)& C, - const Standard_Real U, - gp_Pnt& P, - gp_Vec& T) { - C->D1(U,P,T); +inline void BRepBlend_HCurveTool::D1(const Handle(Adaptor3d_Curve)& C, + const Standard_Real U, + gp_Pnt& P, + gp_Vec& T) +{ + C->D1(U, P, T); } + //============================================================ -inline void BRepBlend_HCurveTool::D2 (const Handle(Adaptor3d_Curve)& C, - const Standard_Real U, - gp_Pnt& P, - gp_Vec& T, - gp_Vec& N) { - - C->D2(U,P,T,N); +inline void BRepBlend_HCurveTool::D2(const Handle(Adaptor3d_Curve)& C, + const Standard_Real U, + gp_Pnt& P, + gp_Vec& T, + gp_Vec& N) +{ + + C->D2(U, P, T, N); } + //============================================================ -inline void BRepBlend_HCurveTool::D3 (const Handle(Adaptor3d_Curve)& C, - const Standard_Real U, - gp_Pnt& P, - gp_Vec& V1, - gp_Vec& V2, - gp_Vec& V3) { - - C->D3(U,P,V1,V2,V3); +inline void BRepBlend_HCurveTool::D3(const Handle(Adaptor3d_Curve)& C, + const Standard_Real U, + gp_Pnt& P, + gp_Vec& V1, + gp_Vec& V2, + gp_Vec& V3) +{ + + C->D3(U, P, V1, V2, V3); } + //============================================================ -inline gp_Vec BRepBlend_HCurveTool::DN (const Handle(Adaptor3d_Curve)& C, - const Standard_Real U, - const Standard_Integer N) { - - return(C->DN(U,N)); +inline gp_Vec BRepBlend_HCurveTool::DN(const Handle(Adaptor3d_Curve)& C, + const Standard_Real U, + const Standard_Integer N) +{ + + return (C->DN(U, N)); } + //============================================================ inline Standard_Real BRepBlend_HCurveTool::Resolution(const Handle(Adaptor3d_Curve)& C, - const Standard_Real R3d) { - return(C->Resolution(R3d)); + const Standard_Real R3d) +{ + return (C->Resolution(R3d)); } + //============================================================ -inline GeomAbs_CurveType BRepBlend_HCurveTool::GetType(const Handle(Adaptor3d_Curve)& C) { - return(C->GetType()); +inline GeomAbs_CurveType BRepBlend_HCurveTool::GetType(const Handle(Adaptor3d_Curve)& C) +{ + return (C->GetType()); } + //============================================================ -inline gp_Lin BRepBlend_HCurveTool::Line (const Handle(Adaptor3d_Curve)& C) { - return(C->Line()); +inline gp_Lin BRepBlend_HCurveTool::Line(const Handle(Adaptor3d_Curve)& C) +{ + return (C->Line()); } + //============================================================ -inline gp_Circ BRepBlend_HCurveTool::Circle (const Handle(Adaptor3d_Curve)& C) { - return(C->Circle()); +inline gp_Circ BRepBlend_HCurveTool::Circle(const Handle(Adaptor3d_Curve)& C) +{ + return (C->Circle()); } + //============================================================ -inline gp_Elips BRepBlend_HCurveTool::Ellipse (const Handle(Adaptor3d_Curve)& C) { - return(C->Ellipse()); +inline gp_Elips BRepBlend_HCurveTool::Ellipse(const Handle(Adaptor3d_Curve)& C) +{ + return (C->Ellipse()); } + //============================================================ -inline gp_Parab BRepBlend_HCurveTool::Parabola (const Handle(Adaptor3d_Curve)& C) { - return(C->Parabola()); +inline gp_Parab BRepBlend_HCurveTool::Parabola(const Handle(Adaptor3d_Curve)& C) +{ + return (C->Parabola()); } + //============================================================ -inline gp_Hypr BRepBlend_HCurveTool::Hyperbola (const Handle(Adaptor3d_Curve)& C) { - return(C->Hyperbola()); +inline gp_Hypr BRepBlend_HCurveTool::Hyperbola(const Handle(Adaptor3d_Curve)& C) +{ + return (C->Hyperbola()); } + //============================================================ -inline Handle(Geom_BezierCurve) BRepBlend_HCurveTool::Bezier (const Handle(Adaptor3d_Curve)& C) { - return(C->Bezier()); +inline Handle(Geom_BezierCurve) BRepBlend_HCurveTool::Bezier(const Handle(Adaptor3d_Curve)& C) +{ + return (C->Bezier()); } + //============================================================ -inline Handle(Geom_BSplineCurve) BRepBlend_HCurveTool::BSpline (const Handle(Adaptor3d_Curve)& C) { - return(C->BSpline()); +inline Handle(Geom_BSplineCurve) BRepBlend_HCurveTool::BSpline(const Handle(Adaptor3d_Curve)& C) +{ + return (C->BSpline()); } -//============================================================ - - - - - - - - - - - - - +//============================================================ diff --git a/opencascade/BRepBlend_Line.hxx b/opencascade/BRepBlend_Line.hxx index c62fc793b..37a678f59 100644 --- a/opencascade/BRepBlend_Line.hxx +++ b/opencascade/BRepBlend_Line.hxx @@ -24,55 +24,51 @@ class Blend_Point; - class BRepBlend_Line; DEFINE_STANDARD_HANDLE(BRepBlend_Line, Standard_Transient) - class BRepBlend_Line : public Standard_Transient { public: - - Standard_EXPORT BRepBlend_Line(); - + //! Clears the content of the line. Standard_EXPORT void Clear(); - + //! Adds a point in the line. - void Append (const Blend_Point& P); - + void Append(const Blend_Point& P); + //! Adds a point in the line at the first place. - void Prepend (const Blend_Point& P); - + void Prepend(const Blend_Point& P); + //! Adds a point in the line at the first place. - void InsertBefore (const Standard_Integer Index, const Blend_Point& P); - + void InsertBefore(const Standard_Integer Index, const Blend_Point& P); + //! Removes from all the items of //! positions between and . //! Raises an exception if the indices are out of bounds. - void Remove (const Standard_Integer FromIndex, const Standard_Integer ToIndex); - + void Remove(const Standard_Integer FromIndex, const Standard_Integer ToIndex); + //! Sets the value of the transition of the line on S1 and //! the line on S2. - Standard_EXPORT void Set (const IntSurf_TypeTrans TranS1, const IntSurf_TypeTrans TranS2); - + Standard_EXPORT void Set(const IntSurf_TypeTrans TranS1, const IntSurf_TypeTrans TranS2); + //! Sets the value of the transition of the line on a surface - Standard_EXPORT void Set (const IntSurf_TypeTrans Trans); - + Standard_EXPORT void Set(const IntSurf_TypeTrans Trans); + //! Sets the values of the start points for the line. - void SetStartPoints (const BRepBlend_Extremity& StartPt1, const BRepBlend_Extremity& StartPt2); - + void SetStartPoints(const BRepBlend_Extremity& StartPt1, const BRepBlend_Extremity& StartPt2); + //! Sets tne values of the end points for the line. - void SetEndPoints (const BRepBlend_Extremity& EndPt1, const BRepBlend_Extremity& EndPt2); - + void SetEndPoints(const BRepBlend_Extremity& EndPt1, const BRepBlend_Extremity& EndPt2); + //! Returns the number of points in the line. - Standard_Integer NbPoints() const; - + Standard_Integer NbPoints() const; + //! Returns the point of range Index. - const Blend_Point& Point (const Standard_Integer Index) const; - + const Blend_Point& Point(const Standard_Integer Index) const; + //! Returns the type of the transition of the line defined //! on the first surface. The transition is "constant" //! along the line. @@ -85,60 +81,44 @@ public: //! T is the tangent to the line on S1 at P. //! The transitioon is OUT when the system of vectors is //! left-handed. - IntSurf_TypeTrans TransitionOnS1() const; - + IntSurf_TypeTrans TransitionOnS1() const; + //! Returns the type of the transition of the line defined //! on the second surface. The transition is "constant" //! along the line. - IntSurf_TypeTrans TransitionOnS2() const; - + IntSurf_TypeTrans TransitionOnS2() const; + //! Returns the start point on S1. - const BRepBlend_Extremity& StartPointOnFirst() const; - + const BRepBlend_Extremity& StartPointOnFirst() const; + //! Returns the start point on S2 - const BRepBlend_Extremity& StartPointOnSecond() const; - + const BRepBlend_Extremity& StartPointOnSecond() const; + //! Returns the end point on S1. - const BRepBlend_Extremity& EndPointOnFirst() const; - + const BRepBlend_Extremity& EndPointOnFirst() const; + //! Returns the point on S2. - const BRepBlend_Extremity& EndPointOnSecond() const; - + const BRepBlend_Extremity& EndPointOnSecond() const; + //! Returns the type of the transition of the line defined //! on the surface. - IntSurf_TypeTrans TransitionOnS() const; - - - + IntSurf_TypeTrans TransitionOnS() const; - DEFINE_STANDARD_RTTIEXT(BRepBlend_Line,Standard_Transient) + DEFINE_STANDARD_RTTIEXT(BRepBlend_Line, Standard_Transient) protected: - - - - private: - - Blend_SequenceOfPoint seqpt; - IntSurf_TypeTrans tras1; - IntSurf_TypeTrans tras2; - BRepBlend_Extremity stp1; - BRepBlend_Extremity stp2; - BRepBlend_Extremity endp1; - BRepBlend_Extremity endp2; - Standard_Boolean hass1; - Standard_Boolean hass2; - - + IntSurf_TypeTrans tras1; + IntSurf_TypeTrans tras2; + BRepBlend_Extremity stp1; + BRepBlend_Extremity stp2; + BRepBlend_Extremity endp1; + BRepBlend_Extremity endp2; + Standard_Boolean hass1; + Standard_Boolean hass2; }; - #include - - - - #endif // _BRepBlend_Line_HeaderFile diff --git a/opencascade/BRepBlend_Line.lxx b/opencascade/BRepBlend_Line.lxx index 49d276d4e..916a690a1 100644 --- a/opencascade/BRepBlend_Line.lxx +++ b/opencascade/BRepBlend_Line.lxx @@ -15,7 +15,6 @@ #include #include - inline void BRepBlend_Line::Append(const Blend_Point& P) { seqpt.Append(P); @@ -26,35 +25,33 @@ inline void BRepBlend_Line::Prepend(const Blend_Point& P) seqpt.Prepend(P); } -inline void BRepBlend_Line::InsertBefore(const Standard_Integer Index, - const Blend_Point& P) +inline void BRepBlend_Line::InsertBefore(const Standard_Integer Index, const Blend_Point& P) { seqpt.InsertBefore(Index, P); } -inline void BRepBlend_Line::Remove(const Standard_Integer FromIndex, - const Standard_Integer ToIndex) +inline void BRepBlend_Line::Remove(const Standard_Integer FromIndex, const Standard_Integer ToIndex) { - seqpt.Remove(FromIndex,ToIndex); + seqpt.Remove(FromIndex, ToIndex); } inline void BRepBlend_Line::SetStartPoints(const BRepBlend_Extremity& StartPtOnS1, - const BRepBlend_Extremity& StartPtOnS2) + const BRepBlend_Extremity& StartPtOnS2) { - stp1 = StartPtOnS1; - stp2 = StartPtOnS2; + stp1 = StartPtOnS1; + stp2 = StartPtOnS2; } inline void BRepBlend_Line::SetEndPoints(const BRepBlend_Extremity& EndPtOnS1, - const BRepBlend_Extremity& EndPtOnS2) + const BRepBlend_Extremity& EndPtOnS2) { endp1 = EndPtOnS1; endp2 = EndPtOnS2; } -inline Standard_Integer BRepBlend_Line::NbPoints () const +inline Standard_Integer BRepBlend_Line::NbPoints() const { return seqpt.Length(); } @@ -64,15 +61,21 @@ inline const Blend_Point& BRepBlend_Line::Point(const Standard_Integer Index) co return seqpt(Index); } -inline IntSurf_TypeTrans BRepBlend_Line::TransitionOnS1 () const +inline IntSurf_TypeTrans BRepBlend_Line::TransitionOnS1() const { - if (!hass1) {throw Standard_DomainError();} + if (!hass1) + { + throw Standard_DomainError(); + } return tras1; } -inline IntSurf_TypeTrans BRepBlend_Line::TransitionOnS2 () const +inline IntSurf_TypeTrans BRepBlend_Line::TransitionOnS2() const { - if (!hass2) {throw Standard_DomainError();} + if (!hass2) + { + throw Standard_DomainError(); + } return tras2; } @@ -96,10 +99,11 @@ inline const BRepBlend_Extremity& BRepBlend_Line::EndPointOnSecond() const return endp2; } -inline IntSurf_TypeTrans BRepBlend_Line::TransitionOnS () const +inline IntSurf_TypeTrans BRepBlend_Line::TransitionOnS() const { - if (!hass1) {throw Standard_DomainError();} + if (!hass1) + { + throw Standard_DomainError(); + } return tras1; } - - diff --git a/opencascade/BRepBlend_PointOnRst.hxx b/opencascade/BRepBlend_PointOnRst.hxx index 0fdc7ac6e..13ac85d20 100644 --- a/opencascade/BRepBlend_PointOnRst.hxx +++ b/opencascade/BRepBlend_PointOnRst.hxx @@ -20,7 +20,6 @@ #include #include - //! Definition of an intersection point between a line //! and a restriction on a surface. //! Such a point is contains geometrical information (see @@ -28,64 +27,50 @@ class BRepBlend_PointOnRst { public: - DEFINE_STANDARD_ALLOC - //! Empty constructor. Standard_EXPORT BRepBlend_PointOnRst(); - + //! Creates the PointOnRst on the arc A, at parameter Param, //! with the transition TLine on the walking line, and //! TArc on the arc A. - Standard_EXPORT BRepBlend_PointOnRst(const Handle(Adaptor2d_Curve2d)& A, const Standard_Real Param, const IntSurf_Transition& TLine, const IntSurf_Transition& TArc); - + Standard_EXPORT BRepBlend_PointOnRst(const Handle(Adaptor2d_Curve2d)& A, + const Standard_Real Param, + const IntSurf_Transition& TLine, + const IntSurf_Transition& TArc); + //! Sets the values of a point which is on the arc //! A, at parameter Param. - Standard_EXPORT void SetArc (const Handle(Adaptor2d_Curve2d)& A, const Standard_Real Param, const IntSurf_Transition& TLine, const IntSurf_Transition& TArc); - + Standard_EXPORT void SetArc(const Handle(Adaptor2d_Curve2d)& A, + const Standard_Real Param, + const IntSurf_Transition& TLine, + const IntSurf_Transition& TArc); + //! Returns the arc of restriction containing the //! vertex. - const Handle(Adaptor2d_Curve2d)& Arc() const; - + const Handle(Adaptor2d_Curve2d)& Arc() const; + //! Returns the transition of the point on the //! line on surface. - const IntSurf_Transition& TransitionOnLine() const; - + const IntSurf_Transition& TransitionOnLine() const; + //! Returns the transition of the point on the arc //! returned by Arc(). - const IntSurf_Transition& TransitionOnArc() const; - + const IntSurf_Transition& TransitionOnArc() const; + //! Returns the parameter of the point on the //! arc returned by the method Arc(). - Standard_Real ParameterOnArc() const; - - - + Standard_Real ParameterOnArc() const; protected: - - - - - private: - - - Handle(Adaptor2d_Curve2d) arc; - IntSurf_Transition traline; - IntSurf_Transition traarc; - Standard_Real prm; - - + IntSurf_Transition traline; + IntSurf_Transition traarc; + Standard_Real prm; }; - #include - - - - #endif // _BRepBlend_PointOnRst_HeaderFile diff --git a/opencascade/BRepBlend_PointOnRst.lxx b/opencascade/BRepBlend_PointOnRst.lxx index b23ec7d5f..9b7a3d195 100644 --- a/opencascade/BRepBlend_PointOnRst.lxx +++ b/opencascade/BRepBlend_PointOnRst.lxx @@ -14,23 +14,22 @@ #include -inline const Handle(Adaptor2d_Curve2d)& BRepBlend_PointOnRst::Arc () const +inline const Handle(Adaptor2d_Curve2d)& BRepBlend_PointOnRst::Arc() const { return arc; } -inline const IntSurf_Transition& BRepBlend_PointOnRst::TransitionOnLine () const +inline const IntSurf_Transition& BRepBlend_PointOnRst::TransitionOnLine() const { return traline; } -inline const IntSurf_Transition& BRepBlend_PointOnRst::TransitionOnArc () const +inline const IntSurf_Transition& BRepBlend_PointOnRst::TransitionOnArc() const { return traarc; } -inline Standard_Real BRepBlend_PointOnRst::ParameterOnArc () const +inline Standard_Real BRepBlend_PointOnRst::ParameterOnArc() const { return prm; } - diff --git a/opencascade/BRepBlend_RstRstConstRad.hxx b/opencascade/BRepBlend_RstRstConstRad.hxx index de8221a06..f423b679b 100644 --- a/opencascade/BRepBlend_RstRstConstRad.hxx +++ b/opencascade/BRepBlend_RstRstConstRad.hxx @@ -40,207 +40,240 @@ class math_Matrix; class gp_Circ; class Blend_Point; - //! Copy of CSConstRad with a pcurve on surface //! as support. -class BRepBlend_RstRstConstRad : public Blend_RstRstFunction +class BRepBlend_RstRstConstRad : public Blend_RstRstFunction { public: - DEFINE_STANDARD_ALLOC - - Standard_EXPORT BRepBlend_RstRstConstRad(const Handle(Adaptor3d_Surface)& Surf1, const Handle(Adaptor2d_Curve2d)& Rst1, const Handle(Adaptor3d_Surface)& Surf2, const Handle(Adaptor2d_Curve2d)& Rst2, const Handle(Adaptor3d_Curve)& CGuide); - + Standard_EXPORT BRepBlend_RstRstConstRad(const Handle(Adaptor3d_Surface)& Surf1, + const Handle(Adaptor2d_Curve2d)& Rst1, + const Handle(Adaptor3d_Surface)& Surf2, + const Handle(Adaptor2d_Curve2d)& Rst2, + const Handle(Adaptor3d_Curve)& CGuide); + //! Returns 2. Standard_EXPORT Standard_Integer NbVariables() const Standard_OVERRIDE; - + //! Returns 2. Standard_EXPORT Standard_Integer NbEquations() const Standard_OVERRIDE; - + //! computes the values of the Functions for the //! variable . //! Returns True if the computation was done successfully, //! False otherwise. - Standard_EXPORT Standard_Boolean Value (const math_Vector& X, math_Vector& F) Standard_OVERRIDE; - + Standard_EXPORT Standard_Boolean Value(const math_Vector& X, math_Vector& F) Standard_OVERRIDE; + //! returns the values of the derivatives for the //! variable . //! Returns True if the computation was done successfully, //! False otherwise. - Standard_EXPORT Standard_Boolean Derivatives (const math_Vector& X, math_Matrix& D) Standard_OVERRIDE; - + Standard_EXPORT Standard_Boolean Derivatives(const math_Vector& X, + math_Matrix& D) Standard_OVERRIDE; + //! returns the values of the functions and the derivatives //! for the variable . //! Returns True if the computation was done successfully, //! False otherwise. - Standard_EXPORT Standard_Boolean Values (const math_Vector& X, math_Vector& F, math_Matrix& D) Standard_OVERRIDE; - - Standard_EXPORT void Set (const Handle(Adaptor3d_Surface)& SurfRef1, const Handle(Adaptor2d_Curve2d)& RstRef1, const Handle(Adaptor3d_Surface)& SurfRef2, const Handle(Adaptor2d_Curve2d)& RstRef2); - - Standard_EXPORT void Set (const Standard_Real Param) Standard_OVERRIDE; - + Standard_EXPORT Standard_Boolean Values(const math_Vector& X, + math_Vector& F, + math_Matrix& D) Standard_OVERRIDE; + + Standard_EXPORT void Set(const Handle(Adaptor3d_Surface)& SurfRef1, + const Handle(Adaptor2d_Curve2d)& RstRef1, + const Handle(Adaptor3d_Surface)& SurfRef2, + const Handle(Adaptor2d_Curve2d)& RstRef2); + + Standard_EXPORT void Set(const Standard_Real Param) Standard_OVERRIDE; + //! Sets the bounds of the parametric interval on //! the guide line. //! This determines the derivatives in these values if the //! function is not Cn. - Standard_EXPORT void Set (const Standard_Real First, const Standard_Real Last) Standard_OVERRIDE; - - Standard_EXPORT void GetTolerance (math_Vector& Tolerance, const Standard_Real Tol) const Standard_OVERRIDE; - - Standard_EXPORT void GetBounds (math_Vector& InfBound, math_Vector& SupBound) const Standard_OVERRIDE; - - Standard_EXPORT Standard_Boolean IsSolution (const math_Vector& Sol, const Standard_Real Tol) Standard_OVERRIDE; - + Standard_EXPORT void Set(const Standard_Real First, const Standard_Real Last) Standard_OVERRIDE; + + Standard_EXPORT void GetTolerance(math_Vector& Tolerance, + const Standard_Real Tol) const Standard_OVERRIDE; + + Standard_EXPORT void GetBounds(math_Vector& InfBound, + math_Vector& SupBound) const Standard_OVERRIDE; + + Standard_EXPORT Standard_Boolean IsSolution(const math_Vector& Sol, + const Standard_Real Tol) Standard_OVERRIDE; + //! Returns the minimal Distance between two //! extremities of calculated sections. Standard_EXPORT virtual Standard_Real GetMinimalDistance() const Standard_OVERRIDE; - + Standard_EXPORT const gp_Pnt& PointOnRst1() const Standard_OVERRIDE; - + Standard_EXPORT const gp_Pnt& PointOnRst2() const Standard_OVERRIDE; - + //! Returns U,V coordinates of the point on the surface. Standard_EXPORT const gp_Pnt2d& Pnt2dOnRst1() const Standard_OVERRIDE; - + //! Returns U,V coordinates of the point on the curve on //! surface. Standard_EXPORT const gp_Pnt2d& Pnt2dOnRst2() const Standard_OVERRIDE; - + //! Returns parameter of the point on the curve. Standard_EXPORT Standard_Real ParameterOnRst1() const Standard_OVERRIDE; - + //! Returns parameter of the point on the curve. Standard_EXPORT Standard_Real ParameterOnRst2() const Standard_OVERRIDE; - + Standard_EXPORT Standard_Boolean IsTangencyPoint() const Standard_OVERRIDE; - + Standard_EXPORT const gp_Vec& TangentOnRst1() const Standard_OVERRIDE; - + Standard_EXPORT const gp_Vec2d& Tangent2dOnRst1() const Standard_OVERRIDE; - + Standard_EXPORT const gp_Vec& TangentOnRst2() const Standard_OVERRIDE; - + Standard_EXPORT const gp_Vec2d& Tangent2dOnRst2() const Standard_OVERRIDE; - + //! Permet d ' implementer un critere de decrochage //! specifique a la fonction. - Standard_EXPORT Blend_DecrochStatus Decroch (const math_Vector& Sol, gp_Vec& NRst1, gp_Vec& TgRst1, gp_Vec& NRst2, gp_Vec& TgRst2) const Standard_OVERRIDE; - - Standard_EXPORT void Set (const Standard_Real Radius, const Standard_Integer Choix); - + Standard_EXPORT Blend_DecrochStatus Decroch(const math_Vector& Sol, + gp_Vec& NRst1, + gp_Vec& TgRst1, + gp_Vec& NRst2, + gp_Vec& TgRst2) const Standard_OVERRIDE; + + Standard_EXPORT void Set(const Standard_Real Radius, const Standard_Integer Choix); + //! Sets the type of section generation for the //! approximations. - Standard_EXPORT void Set (const BlendFunc_SectionShape TypeSection); - + Standard_EXPORT void Set(const BlendFunc_SectionShape TypeSection); + //! Give the center of circle define by PtRst1, PtRst2 and //! radius ray. - Standard_EXPORT Standard_Boolean CenterCircleRst1Rst2 (const gp_Pnt& PtRst1, const gp_Pnt& PtRst2, const gp_Vec& np, gp_Pnt& Center, gp_Vec& VdMed) const; - - Standard_EXPORT void Section (const Standard_Real Param, const Standard_Real U, const Standard_Real V, Standard_Real& Pdeb, Standard_Real& Pfin, gp_Circ& C); - - //! Returns if the section is rationnal + Standard_EXPORT Standard_Boolean CenterCircleRst1Rst2(const gp_Pnt& PtRst1, + const gp_Pnt& PtRst2, + const gp_Vec& np, + gp_Pnt& Center, + gp_Vec& VdMed) const; + + Standard_EXPORT void Section(const Standard_Real Param, + const Standard_Real U, + const Standard_Real V, + Standard_Real& Pdeb, + Standard_Real& Pfin, + gp_Circ& C); + + //! Returns if the section is rational Standard_EXPORT Standard_Boolean IsRational() const Standard_OVERRIDE; - + //! Returns the length of the maximum section Standard_EXPORT Standard_Real GetSectionSize() const Standard_OVERRIDE; - + //! Compute the minimal value of weight for each poles //! of all sections. - Standard_EXPORT void GetMinimalWeight (TColStd_Array1OfReal& Weigths) const Standard_OVERRIDE; - + Standard_EXPORT void GetMinimalWeight(TColStd_Array1OfReal& Weigths) const Standard_OVERRIDE; + //! Returns the number of intervals for continuity //! . May be one if Continuity(me) >= - Standard_EXPORT Standard_Integer NbIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE; - + Standard_EXPORT Standard_Integer NbIntervals(const GeomAbs_Shape S) const Standard_OVERRIDE; + //! Stores in the parameters bounding the intervals //! of continuity . //! The array must provide enough room to accommodate //! for the parameters. i.e. T.Length() > NbIntervals() - Standard_EXPORT void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const Standard_OVERRIDE; - - Standard_EXPORT void GetShape (Standard_Integer& NbPoles, Standard_Integer& NbKnots, Standard_Integer& Degree, Standard_Integer& NbPoles2d) Standard_OVERRIDE; - + Standard_EXPORT void Intervals(TColStd_Array1OfReal& T, + const GeomAbs_Shape S) const Standard_OVERRIDE; + + Standard_EXPORT void GetShape(Standard_Integer& NbPoles, + Standard_Integer& NbKnots, + Standard_Integer& Degree, + Standard_Integer& NbPoles2d) Standard_OVERRIDE; + //! Returns the tolerance to reach in approximation - //! to respecte + //! to respect //! BoundTol error at the Boundary //! AngleTol tangent error at the Boundary //! SurfTol error inside the surface. - Standard_EXPORT void GetTolerance (const Standard_Real BoundTol, const Standard_Real SurfTol, const Standard_Real AngleTol, math_Vector& Tol3d, math_Vector& Tol1D) const Standard_OVERRIDE; - - Standard_EXPORT void Knots (TColStd_Array1OfReal& TKnots) Standard_OVERRIDE; - - Standard_EXPORT void Mults (TColStd_Array1OfInteger& TMults) Standard_OVERRIDE; - - //! Used for the first and last section - Standard_EXPORT Standard_Boolean Section (const Blend_Point& P, TColgp_Array1OfPnt& Poles, TColgp_Array1OfVec& DPoles, TColgp_Array1OfPnt2d& Poles2d, TColgp_Array1OfVec2d& DPoles2d, TColStd_Array1OfReal& Weigths, TColStd_Array1OfReal& DWeigths) Standard_OVERRIDE; - - Standard_EXPORT void Section (const Blend_Point& P, TColgp_Array1OfPnt& Poles, TColgp_Array1OfPnt2d& Poles2d, TColStd_Array1OfReal& Weigths) Standard_OVERRIDE; - - //! Used for the first and last section - //! The method returns Standard_True if the derivatives - //! are computed, otherwise it returns Standard_False. - Standard_EXPORT Standard_Boolean Section (const Blend_Point& P, TColgp_Array1OfPnt& Poles, TColgp_Array1OfVec& DPoles, TColgp_Array1OfVec& D2Poles, TColgp_Array1OfPnt2d& Poles2d, TColgp_Array1OfVec2d& DPoles2d, TColgp_Array1OfVec2d& D2Poles2d, TColStd_Array1OfReal& Weigths, TColStd_Array1OfReal& DWeigths, TColStd_Array1OfReal& D2Weigths) Standard_OVERRIDE; - - Standard_EXPORT void Resolution (const Standard_Integer IC2d, const Standard_Real Tol, Standard_Real& TolU, Standard_Real& TolV) const Standard_OVERRIDE; - + Standard_EXPORT void GetTolerance(const Standard_Real BoundTol, + const Standard_Real SurfTol, + const Standard_Real AngleTol, + math_Vector& Tol3d, + math_Vector& Tol1D) const Standard_OVERRIDE; + Standard_EXPORT void Knots(TColStd_Array1OfReal& TKnots) Standard_OVERRIDE; + Standard_EXPORT void Mults(TColStd_Array1OfInteger& TMults) Standard_OVERRIDE; -protected: - + //! Used for the first and last section + Standard_EXPORT Standard_Boolean Section(const Blend_Point& P, + TColgp_Array1OfPnt& Poles, + TColgp_Array1OfVec& DPoles, + TColgp_Array1OfPnt2d& Poles2d, + TColgp_Array1OfVec2d& DPoles2d, + TColStd_Array1OfReal& Weigths, + TColStd_Array1OfReal& DWeigths) Standard_OVERRIDE; + Standard_EXPORT void Section(const Blend_Point& P, + TColgp_Array1OfPnt& Poles, + TColgp_Array1OfPnt2d& Poles2d, + TColStd_Array1OfReal& Weigths) Standard_OVERRIDE; + //! Used for the first and last section + //! The method returns Standard_True if the derivatives + //! are computed, otherwise it returns Standard_False. + Standard_EXPORT Standard_Boolean Section(const Blend_Point& P, + TColgp_Array1OfPnt& Poles, + TColgp_Array1OfVec& DPoles, + TColgp_Array1OfVec& D2Poles, + TColgp_Array1OfPnt2d& Poles2d, + TColgp_Array1OfVec2d& DPoles2d, + TColgp_Array1OfVec2d& D2Poles2d, + TColStd_Array1OfReal& Weigths, + TColStd_Array1OfReal& DWeigths, + TColStd_Array1OfReal& D2Weigths) Standard_OVERRIDE; + Standard_EXPORT void Resolution(const Standard_Integer IC2d, + const Standard_Real Tol, + Standard_Real& TolU, + Standard_Real& TolV) const Standard_OVERRIDE; +protected: private: - - - - Handle(Adaptor3d_Surface) surf1; - Handle(Adaptor3d_Surface) surf2; - Handle(Adaptor2d_Curve2d) rst1; - Handle(Adaptor2d_Curve2d) rst2; - Adaptor3d_CurveOnSurface cons1; - Adaptor3d_CurveOnSurface cons2; - Handle(Adaptor3d_Curve) guide; - Handle(Adaptor3d_Curve) tguide; - gp_Pnt ptrst1; - gp_Pnt ptrst2; - gp_Pnt2d pt2drst1; - gp_Pnt2d pt2drst2; - Standard_Real prmrst1; - Standard_Real prmrst2; - Standard_Boolean istangent; - gp_Vec tgrst1; - gp_Vec2d tg2drst1; - gp_Vec tgrst2; - gp_Vec2d tg2drst2; - Standard_Real ray; - Standard_Integer choix; - gp_Pnt ptgui; - gp_Vec d1gui; - gp_Vec d2gui; - gp_Vec nplan; - Standard_Real normtg; - Standard_Real theD; - Handle(Adaptor3d_Surface) surfref1; - Handle(Adaptor2d_Curve2d) rstref1; - Handle(Adaptor3d_Surface) surfref2; - Handle(Adaptor2d_Curve2d) rstref2; - Standard_Real maxang; - Standard_Real minang; - Standard_Real distmin; - BlendFunc_SectionShape mySShape; + Handle(Adaptor3d_Surface) surf1; + Handle(Adaptor3d_Surface) surf2; + Handle(Adaptor2d_Curve2d) rst1; + Handle(Adaptor2d_Curve2d) rst2; + Adaptor3d_CurveOnSurface cons1; + Adaptor3d_CurveOnSurface cons2; + Handle(Adaptor3d_Curve) guide; + Handle(Adaptor3d_Curve) tguide; + gp_Pnt ptrst1; + gp_Pnt ptrst2; + gp_Pnt2d pt2drst1; + gp_Pnt2d pt2drst2; + Standard_Real prmrst1; + Standard_Real prmrst2; + Standard_Boolean istangent; + gp_Vec tgrst1; + gp_Vec2d tg2drst1; + gp_Vec tgrst2; + gp_Vec2d tg2drst2; + Standard_Real ray; + Standard_Integer choix; + gp_Pnt ptgui; + gp_Vec d1gui; + gp_Vec d2gui; + gp_Vec nplan; + Standard_Real normtg; + Standard_Real theD; + Handle(Adaptor3d_Surface) surfref1; + Handle(Adaptor2d_Curve2d) rstref1; + Handle(Adaptor3d_Surface) surfref2; + Handle(Adaptor2d_Curve2d) rstref2; + Standard_Real maxang; + Standard_Real minang; + Standard_Real distmin; + BlendFunc_SectionShape mySShape; Convert_ParameterisationType myTConv; - - }; - - - - - - #endif // _BRepBlend_RstRstConstRad_HeaderFile diff --git a/opencascade/BRepBlend_RstRstEvolRad.hxx b/opencascade/BRepBlend_RstRstEvolRad.hxx index 10aa7da64..283bcd35a 100644 --- a/opencascade/BRepBlend_RstRstEvolRad.hxx +++ b/opencascade/BRepBlend_RstRstEvolRad.hxx @@ -41,210 +41,244 @@ class math_Matrix; class gp_Circ; class Blend_Point; - //! Function to approximate by AppSurface for //! Edge/Edge and evolutif radius -class BRepBlend_RstRstEvolRad : public Blend_RstRstFunction +class BRepBlend_RstRstEvolRad : public Blend_RstRstFunction { public: - DEFINE_STANDARD_ALLOC - - Standard_EXPORT BRepBlend_RstRstEvolRad(const Handle(Adaptor3d_Surface)& Surf1, const Handle(Adaptor2d_Curve2d)& Rst1, const Handle(Adaptor3d_Surface)& Surf2, const Handle(Adaptor2d_Curve2d)& Rst2, const Handle(Adaptor3d_Curve)& CGuide, const Handle(Law_Function)& Evol); - + Standard_EXPORT BRepBlend_RstRstEvolRad(const Handle(Adaptor3d_Surface)& Surf1, + const Handle(Adaptor2d_Curve2d)& Rst1, + const Handle(Adaptor3d_Surface)& Surf2, + const Handle(Adaptor2d_Curve2d)& Rst2, + const Handle(Adaptor3d_Curve)& CGuide, + const Handle(Law_Function)& Evol); + //! Returns 2. Standard_EXPORT Standard_Integer NbVariables() const Standard_OVERRIDE; - + //! Returns 2. Standard_EXPORT Standard_Integer NbEquations() const Standard_OVERRIDE; - + //! computes the values of the Functions for the //! variable . //! Returns True if the computation was done successfully, //! False otherwise. - Standard_EXPORT Standard_Boolean Value (const math_Vector& X, math_Vector& F) Standard_OVERRIDE; - + Standard_EXPORT Standard_Boolean Value(const math_Vector& X, math_Vector& F) Standard_OVERRIDE; + //! returns the values of the derivatives for the //! variable . //! Returns True if the computation was done successfully, //! False otherwise. - Standard_EXPORT Standard_Boolean Derivatives (const math_Vector& X, math_Matrix& D) Standard_OVERRIDE; - + Standard_EXPORT Standard_Boolean Derivatives(const math_Vector& X, + math_Matrix& D) Standard_OVERRIDE; + //! returns the values of the functions and the derivatives //! for the variable . //! Returns True if the computation was done successfully, //! False otherwise. - Standard_EXPORT Standard_Boolean Values (const math_Vector& X, math_Vector& F, math_Matrix& D) Standard_OVERRIDE; - - Standard_EXPORT void Set (const Handle(Adaptor3d_Surface)& SurfRef1, const Handle(Adaptor2d_Curve2d)& RstRef1, const Handle(Adaptor3d_Surface)& SurfRef2, const Handle(Adaptor2d_Curve2d)& RstRef2); - - Standard_EXPORT void Set (const Standard_Real Param) Standard_OVERRIDE; - + Standard_EXPORT Standard_Boolean Values(const math_Vector& X, + math_Vector& F, + math_Matrix& D) Standard_OVERRIDE; + + Standard_EXPORT void Set(const Handle(Adaptor3d_Surface)& SurfRef1, + const Handle(Adaptor2d_Curve2d)& RstRef1, + const Handle(Adaptor3d_Surface)& SurfRef2, + const Handle(Adaptor2d_Curve2d)& RstRef2); + + Standard_EXPORT void Set(const Standard_Real Param) Standard_OVERRIDE; + //! Sets the bounds of the parametric interval on //! the guide line. //! This determines the derivatives in these values if the //! function is not Cn. - Standard_EXPORT void Set (const Standard_Real First, const Standard_Real Last) Standard_OVERRIDE; - - Standard_EXPORT void GetTolerance (math_Vector& Tolerance, const Standard_Real Tol) const Standard_OVERRIDE; - - Standard_EXPORT void GetBounds (math_Vector& InfBound, math_Vector& SupBound) const Standard_OVERRIDE; - - Standard_EXPORT Standard_Boolean IsSolution (const math_Vector& Sol, const Standard_Real Tol) Standard_OVERRIDE; - + Standard_EXPORT void Set(const Standard_Real First, const Standard_Real Last) Standard_OVERRIDE; + + Standard_EXPORT void GetTolerance(math_Vector& Tolerance, + const Standard_Real Tol) const Standard_OVERRIDE; + + Standard_EXPORT void GetBounds(math_Vector& InfBound, + math_Vector& SupBound) const Standard_OVERRIDE; + + Standard_EXPORT Standard_Boolean IsSolution(const math_Vector& Sol, + const Standard_Real Tol) Standard_OVERRIDE; + //! Returns the minimal Distance between two //! extremities of calculated sections. Standard_EXPORT virtual Standard_Real GetMinimalDistance() const Standard_OVERRIDE; - + Standard_EXPORT const gp_Pnt& PointOnRst1() const Standard_OVERRIDE; - + Standard_EXPORT const gp_Pnt& PointOnRst2() const Standard_OVERRIDE; - + //! Returns U,V coordinates of the point on the surface. Standard_EXPORT const gp_Pnt2d& Pnt2dOnRst1() const Standard_OVERRIDE; - + //! Returns U,V coordinates of the point on the curve on //! surface. Standard_EXPORT const gp_Pnt2d& Pnt2dOnRst2() const Standard_OVERRIDE; - + //! Returns parameter of the point on the curve. Standard_EXPORT Standard_Real ParameterOnRst1() const Standard_OVERRIDE; - + //! Returns parameter of the point on the curve. Standard_EXPORT Standard_Real ParameterOnRst2() const Standard_OVERRIDE; - + Standard_EXPORT Standard_Boolean IsTangencyPoint() const Standard_OVERRIDE; - + Standard_EXPORT const gp_Vec& TangentOnRst1() const Standard_OVERRIDE; - + Standard_EXPORT const gp_Vec2d& Tangent2dOnRst1() const Standard_OVERRIDE; - + Standard_EXPORT const gp_Vec& TangentOnRst2() const Standard_OVERRIDE; - + Standard_EXPORT const gp_Vec2d& Tangent2dOnRst2() const Standard_OVERRIDE; - + //! Enables implementation of a criterion of decrochage //! specific to the function. - Standard_EXPORT Blend_DecrochStatus Decroch (const math_Vector& Sol, gp_Vec& NRst1, gp_Vec& TgRst1, gp_Vec& NRst2, gp_Vec& TgRst2) const Standard_OVERRIDE; - - Standard_EXPORT void Set (const Standard_Integer Choix); - + Standard_EXPORT Blend_DecrochStatus Decroch(const math_Vector& Sol, + gp_Vec& NRst1, + gp_Vec& TgRst1, + gp_Vec& NRst2, + gp_Vec& TgRst2) const Standard_OVERRIDE; + + Standard_EXPORT void Set(const Standard_Integer Choix); + //! Sets the type of section generation for the //! approximations. - Standard_EXPORT void Set (const BlendFunc_SectionShape TypeSection); - + Standard_EXPORT void Set(const BlendFunc_SectionShape TypeSection); + //! Gives the center of circle defined by PtRst1, PtRst2 and //! radius ray. - Standard_EXPORT Standard_Boolean CenterCircleRst1Rst2 (const gp_Pnt& PtRst1, const gp_Pnt& PtRst2, const gp_Vec& np, gp_Pnt& Center, gp_Vec& VdMed) const; - - Standard_EXPORT void Section (const Standard_Real Param, const Standard_Real U, const Standard_Real V, Standard_Real& Pdeb, Standard_Real& Pfin, gp_Circ& C); - - //! Returns if the section is rationnal + Standard_EXPORT Standard_Boolean CenterCircleRst1Rst2(const gp_Pnt& PtRst1, + const gp_Pnt& PtRst2, + const gp_Vec& np, + gp_Pnt& Center, + gp_Vec& VdMed) const; + + Standard_EXPORT void Section(const Standard_Real Param, + const Standard_Real U, + const Standard_Real V, + Standard_Real& Pdeb, + Standard_Real& Pfin, + gp_Circ& C); + + //! Returns if the section is rational Standard_EXPORT Standard_Boolean IsRational() const Standard_OVERRIDE; - + //! Returns the length of the maximum section Standard_EXPORT Standard_Real GetSectionSize() const Standard_OVERRIDE; - + //! Compute the minimal value of weight for each poles //! of all sections. - Standard_EXPORT void GetMinimalWeight (TColStd_Array1OfReal& Weigths) const Standard_OVERRIDE; - + Standard_EXPORT void GetMinimalWeight(TColStd_Array1OfReal& Weigths) const Standard_OVERRIDE; + //! Returns the number of intervals for continuity //! . May be one if Continuity(me) >= - Standard_EXPORT Standard_Integer NbIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE; - + Standard_EXPORT Standard_Integer NbIntervals(const GeomAbs_Shape S) const Standard_OVERRIDE; + //! Stores in the parameters bounding the intervals //! of continuity . //! The array must provide enough room to accommodate //! for the parameters. i.e. T.Length() > NbIntervals() - Standard_EXPORT void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const Standard_OVERRIDE; - - Standard_EXPORT void GetShape (Standard_Integer& NbPoles, Standard_Integer& NbKnots, Standard_Integer& Degree, Standard_Integer& NbPoles2d) Standard_OVERRIDE; - + Standard_EXPORT void Intervals(TColStd_Array1OfReal& T, + const GeomAbs_Shape S) const Standard_OVERRIDE; + + Standard_EXPORT void GetShape(Standard_Integer& NbPoles, + Standard_Integer& NbKnots, + Standard_Integer& Degree, + Standard_Integer& NbPoles2d) Standard_OVERRIDE; + //! Returns the tolerance to reach in approximation - //! to respecte + //! to respect //! BoundTol error at the Boundary //! AngleTol tangent error at the Boundary //! SurfTol error inside the surface. - Standard_EXPORT void GetTolerance (const Standard_Real BoundTol, const Standard_Real SurfTol, const Standard_Real AngleTol, math_Vector& Tol3d, math_Vector& Tol1D) const Standard_OVERRIDE; - - Standard_EXPORT void Knots (TColStd_Array1OfReal& TKnots) Standard_OVERRIDE; - - Standard_EXPORT void Mults (TColStd_Array1OfInteger& TMults) Standard_OVERRIDE; - - //! Used for the first and last section - Standard_EXPORT Standard_Boolean Section (const Blend_Point& P, TColgp_Array1OfPnt& Poles, TColgp_Array1OfVec& DPoles, TColgp_Array1OfPnt2d& Poles2d, TColgp_Array1OfVec2d& DPoles2d, TColStd_Array1OfReal& Weigths, TColStd_Array1OfReal& DWeigths) Standard_OVERRIDE; - - Standard_EXPORT void Section (const Blend_Point& P, TColgp_Array1OfPnt& Poles, TColgp_Array1OfPnt2d& Poles2d, TColStd_Array1OfReal& Weigths) Standard_OVERRIDE; - - //! Used for the first and last section - //! The method returns Standard_True if the derivatives - //! are computed, otherwise it returns Standard_False. - Standard_EXPORT Standard_Boolean Section (const Blend_Point& P, TColgp_Array1OfPnt& Poles, TColgp_Array1OfVec& DPoles, TColgp_Array1OfVec& D2Poles, TColgp_Array1OfPnt2d& Poles2d, TColgp_Array1OfVec2d& DPoles2d, TColgp_Array1OfVec2d& D2Poles2d, TColStd_Array1OfReal& Weigths, TColStd_Array1OfReal& DWeigths, TColStd_Array1OfReal& D2Weigths) Standard_OVERRIDE; - - Standard_EXPORT void Resolution (const Standard_Integer IC2d, const Standard_Real Tol, Standard_Real& TolU, Standard_Real& TolV) const Standard_OVERRIDE; - + Standard_EXPORT void GetTolerance(const Standard_Real BoundTol, + const Standard_Real SurfTol, + const Standard_Real AngleTol, + math_Vector& Tol3d, + math_Vector& Tol1D) const Standard_OVERRIDE; + Standard_EXPORT void Knots(TColStd_Array1OfReal& TKnots) Standard_OVERRIDE; + Standard_EXPORT void Mults(TColStd_Array1OfInteger& TMults) Standard_OVERRIDE; -protected: - + //! Used for the first and last section + Standard_EXPORT Standard_Boolean Section(const Blend_Point& P, + TColgp_Array1OfPnt& Poles, + TColgp_Array1OfVec& DPoles, + TColgp_Array1OfPnt2d& Poles2d, + TColgp_Array1OfVec2d& DPoles2d, + TColStd_Array1OfReal& Weigths, + TColStd_Array1OfReal& DWeigths) Standard_OVERRIDE; + Standard_EXPORT void Section(const Blend_Point& P, + TColgp_Array1OfPnt& Poles, + TColgp_Array1OfPnt2d& Poles2d, + TColStd_Array1OfReal& Weigths) Standard_OVERRIDE; + //! Used for the first and last section + //! The method returns Standard_True if the derivatives + //! are computed, otherwise it returns Standard_False. + Standard_EXPORT Standard_Boolean Section(const Blend_Point& P, + TColgp_Array1OfPnt& Poles, + TColgp_Array1OfVec& DPoles, + TColgp_Array1OfVec& D2Poles, + TColgp_Array1OfPnt2d& Poles2d, + TColgp_Array1OfVec2d& DPoles2d, + TColgp_Array1OfVec2d& D2Poles2d, + TColStd_Array1OfReal& Weigths, + TColStd_Array1OfReal& DWeigths, + TColStd_Array1OfReal& D2Weigths) Standard_OVERRIDE; + Standard_EXPORT void Resolution(const Standard_Integer IC2d, + const Standard_Real Tol, + Standard_Real& TolU, + Standard_Real& TolV) const Standard_OVERRIDE; +protected: private: - - - - Handle(Adaptor3d_Surface) surf1; - Handle(Adaptor3d_Surface) surf2; - Handle(Adaptor2d_Curve2d) rst1; - Handle(Adaptor2d_Curve2d) rst2; - Adaptor3d_CurveOnSurface cons1; - Adaptor3d_CurveOnSurface cons2; - Handle(Adaptor3d_Curve) guide; - Handle(Adaptor3d_Curve) tguide; - gp_Pnt ptrst1; - gp_Pnt ptrst2; - gp_Pnt2d pt2drst1; - gp_Pnt2d pt2drst2; - Standard_Real prmrst1; - Standard_Real prmrst2; - Standard_Boolean istangent; - gp_Vec tgrst1; - gp_Vec2d tg2drst1; - gp_Vec tgrst2; - gp_Vec2d tg2drst2; - Standard_Real ray; - Standard_Real dray; - Standard_Integer choix; - gp_Pnt ptgui; - gp_Vec d1gui; - gp_Vec d2gui; - gp_Vec nplan; - Standard_Real normtg; - Standard_Real theD; - Handle(Adaptor3d_Surface) surfref1; - Handle(Adaptor2d_Curve2d) rstref1; - Handle(Adaptor3d_Surface) surfref2; - Handle(Adaptor2d_Curve2d) rstref2; - Standard_Real maxang; - Standard_Real minang; - Standard_Real distmin; - BlendFunc_SectionShape mySShape; + Handle(Adaptor3d_Surface) surf1; + Handle(Adaptor3d_Surface) surf2; + Handle(Adaptor2d_Curve2d) rst1; + Handle(Adaptor2d_Curve2d) rst2; + Adaptor3d_CurveOnSurface cons1; + Adaptor3d_CurveOnSurface cons2; + Handle(Adaptor3d_Curve) guide; + Handle(Adaptor3d_Curve) tguide; + gp_Pnt ptrst1; + gp_Pnt ptrst2; + gp_Pnt2d pt2drst1; + gp_Pnt2d pt2drst2; + Standard_Real prmrst1; + Standard_Real prmrst2; + Standard_Boolean istangent; + gp_Vec tgrst1; + gp_Vec2d tg2drst1; + gp_Vec tgrst2; + gp_Vec2d tg2drst2; + Standard_Real ray; + Standard_Real dray; + Standard_Integer choix; + gp_Pnt ptgui; + gp_Vec d1gui; + gp_Vec d2gui; + gp_Vec nplan; + Standard_Real normtg; + Standard_Real theD; + Handle(Adaptor3d_Surface) surfref1; + Handle(Adaptor2d_Curve2d) rstref1; + Handle(Adaptor3d_Surface) surfref2; + Handle(Adaptor2d_Curve2d) rstref2; + Standard_Real maxang; + Standard_Real minang; + Standard_Real distmin; + BlendFunc_SectionShape mySShape; Convert_ParameterisationType myTConv; - Handle(Law_Function) tevol; - Handle(Law_Function) fevol; - - + Handle(Law_Function) tevol; + Handle(Law_Function) fevol; }; - - - - - - #endif // _BRepBlend_RstRstEvolRad_HeaderFile diff --git a/opencascade/BRepBlend_RstRstLineBuilder.hxx b/opencascade/BRepBlend_RstRstLineBuilder.hxx index 10b1a0702..437184477 100644 --- a/opencascade/BRepBlend_RstRstLineBuilder.hxx +++ b/opencascade/BRepBlend_RstRstLineBuilder.hxx @@ -33,7 +33,6 @@ class Adaptor3d_HVertex; class IntSurf_Transition; class BRepBlend_Extremity; - //! This class processes the data resulting from //! Blend_CSWalking but it takes in consideration the Surface //! supporting the curve to detect the breakpoint. @@ -63,98 +62,148 @@ class BRepBlend_Extremity; //! guaranteed, the criteria of correct repartition of sections //! before smoothing are not respected. The resulting Line //! is f(t) oriented. -class BRepBlend_RstRstLineBuilder +class BRepBlend_RstRstLineBuilder { public: - DEFINE_STANDARD_ALLOC - - Standard_EXPORT BRepBlend_RstRstLineBuilder(const Handle(Adaptor3d_Surface)& Surf1, const Handle(Adaptor2d_Curve2d)& Rst1, const Handle(Adaptor3d_TopolTool)& Domain1, const Handle(Adaptor3d_Surface)& Surf2, const Handle(Adaptor2d_Curve2d)& Rst2, const Handle(Adaptor3d_TopolTool)& Domain2); - - Standard_EXPORT void Perform (Blend_RstRstFunction& Func, Blend_SurfCurvFuncInv& Finv1, Blend_CurvPointFuncInv& FinvP1, Blend_SurfCurvFuncInv& Finv2, Blend_CurvPointFuncInv& FinvP2, const Standard_Real Pdep, const Standard_Real Pmax, const Standard_Real MaxStep, const Standard_Real Tol3d, const Standard_Real TolGuide, const math_Vector& Soldep, const Standard_Real Fleche, const Standard_Boolean Appro = Standard_False); - - Standard_EXPORT Standard_Boolean PerformFirstSection (Blend_RstRstFunction& Func, Blend_SurfCurvFuncInv& Finv1, Blend_CurvPointFuncInv& FinvP1, Blend_SurfCurvFuncInv& Finv2, Blend_CurvPointFuncInv& FinvP2, const Standard_Real Pdep, const Standard_Real Pmax, const math_Vector& Soldep, const Standard_Real Tol3d, const Standard_Real TolGuide, const Standard_Boolean RecRst1, const Standard_Boolean RecP1, const Standard_Boolean RecRst2, const Standard_Boolean RecP2, Standard_Real& Psol, math_Vector& ParSol); - - Standard_EXPORT Standard_Boolean Complete (Blend_RstRstFunction& Func, Blend_SurfCurvFuncInv& Finv1, Blend_CurvPointFuncInv& FinvP1, Blend_SurfCurvFuncInv& Finv2, Blend_CurvPointFuncInv& FinvP2, const Standard_Real Pmin); - - Standard_Boolean IsDone() const; - - const Handle(BRepBlend_Line)& Line() const; - - Standard_Boolean Decroch1Start() const; - - Standard_Boolean Decroch1End() const; - - Standard_Boolean Decroch2Start() const; - - Standard_Boolean Decroch2End() const; - - - + Standard_EXPORT BRepBlend_RstRstLineBuilder(const Handle(Adaptor3d_Surface)& Surf1, + const Handle(Adaptor2d_Curve2d)& Rst1, + const Handle(Adaptor3d_TopolTool)& Domain1, + const Handle(Adaptor3d_Surface)& Surf2, + const Handle(Adaptor2d_Curve2d)& Rst2, + const Handle(Adaptor3d_TopolTool)& Domain2); + + Standard_EXPORT void Perform(Blend_RstRstFunction& Func, + Blend_SurfCurvFuncInv& Finv1, + Blend_CurvPointFuncInv& FinvP1, + Blend_SurfCurvFuncInv& Finv2, + Blend_CurvPointFuncInv& FinvP2, + const Standard_Real Pdep, + const Standard_Real Pmax, + const Standard_Real MaxStep, + const Standard_Real Tol3d, + const Standard_Real TolGuide, + const math_Vector& Soldep, + const Standard_Real Fleche, + const Standard_Boolean Appro = Standard_False); + + Standard_EXPORT Standard_Boolean PerformFirstSection(Blend_RstRstFunction& Func, + Blend_SurfCurvFuncInv& Finv1, + Blend_CurvPointFuncInv& FinvP1, + Blend_SurfCurvFuncInv& Finv2, + Blend_CurvPointFuncInv& FinvP2, + const Standard_Real Pdep, + const Standard_Real Pmax, + const math_Vector& Soldep, + const Standard_Real Tol3d, + const Standard_Real TolGuide, + const Standard_Boolean RecRst1, + const Standard_Boolean RecP1, + const Standard_Boolean RecRst2, + const Standard_Boolean RecP2, + Standard_Real& Psol, + math_Vector& ParSol); + + Standard_EXPORT Standard_Boolean Complete(Blend_RstRstFunction& Func, + Blend_SurfCurvFuncInv& Finv1, + Blend_CurvPointFuncInv& FinvP1, + Blend_SurfCurvFuncInv& Finv2, + Blend_CurvPointFuncInv& FinvP2, + const Standard_Real Pmin); + + Standard_Boolean IsDone() const; + + const Handle(BRepBlend_Line)& Line() const; + + Standard_Boolean Decroch1Start() const; + + Standard_Boolean Decroch1End() const; + + Standard_Boolean Decroch2Start() const; + + Standard_Boolean Decroch2End() const; protected: - - - - - private: - - - Standard_EXPORT void InternalPerform (Blend_RstRstFunction& Func, Blend_SurfCurvFuncInv& Finv1, Blend_CurvPointFuncInv& FinvP1, Blend_SurfCurvFuncInv& Finv2, Blend_CurvPointFuncInv& FinvP2, const Standard_Real Bound); - - Standard_EXPORT Standard_Boolean Recadre1 (Blend_RstRstFunction& Func, Blend_SurfCurvFuncInv& Finv, math_Vector& Solinv, Standard_Boolean& IsVtx, Handle(Adaptor3d_HVertex)& Vtx); - - Standard_EXPORT Standard_Boolean Recadre2 (Blend_RstRstFunction& Func, Blend_SurfCurvFuncInv& Finv, math_Vector& Solinv, Standard_Boolean& IsVtx, Handle(Adaptor3d_HVertex)& Vtx); - - Standard_EXPORT Standard_Boolean Recadre1 (Blend_CurvPointFuncInv& FinvP, math_Vector& Solinv, Standard_Boolean& IsVtx, Handle(Adaptor3d_HVertex)& Vtx); - - Standard_EXPORT Standard_Boolean Recadre2 (Blend_CurvPointFuncInv& FinvP, math_Vector& Solinv, Standard_Boolean& IsVtx, Handle(Adaptor3d_HVertex)& Vtx); - - Standard_EXPORT void Transition (const Standard_Boolean OnFirst, const Handle(Adaptor2d_Curve2d)& Arc, const Standard_Real Param, IntSurf_Transition& TLine, IntSurf_Transition& TArc); - - Standard_EXPORT void MakeExtremity (BRepBlend_Extremity& Extrem, const Standard_Boolean OnFirst, const Handle(Adaptor2d_Curve2d)& Arc, const Standard_Real Param, const Standard_Boolean IsVtx, const Handle(Adaptor3d_HVertex)& Vtx); - - Standard_EXPORT Blend_Status CheckDeflectionOnRst1 (const Blend_Point& CurPoint); - - Standard_EXPORT Blend_Status CheckDeflectionOnRst2 (const Blend_Point& CurPoint); - - Standard_EXPORT Blend_Status TestArret (Blend_RstRstFunction& Func, const Standard_Boolean TestDeflection, const Blend_Status State); - - Standard_EXPORT Standard_Boolean CheckInside (Blend_RstRstFunction& Func, TopAbs_State& SituOnC1, TopAbs_State& SituOnC2, Blend_DecrochStatus& Decroch); - - - Standard_Boolean done; - Handle(BRepBlend_Line) line; - math_Vector sol; - Handle(Adaptor3d_Surface) surf1; + Standard_EXPORT void InternalPerform(Blend_RstRstFunction& Func, + Blend_SurfCurvFuncInv& Finv1, + Blend_CurvPointFuncInv& FinvP1, + Blend_SurfCurvFuncInv& Finv2, + Blend_CurvPointFuncInv& FinvP2, + const Standard_Real Bound); + + Standard_EXPORT Standard_Boolean Recadre1(Blend_RstRstFunction& Func, + Blend_SurfCurvFuncInv& Finv, + math_Vector& Solinv, + Standard_Boolean& IsVtx, + Handle(Adaptor3d_HVertex)& Vtx); + + Standard_EXPORT Standard_Boolean Recadre2(Blend_RstRstFunction& Func, + Blend_SurfCurvFuncInv& Finv, + math_Vector& Solinv, + Standard_Boolean& IsVtx, + Handle(Adaptor3d_HVertex)& Vtx); + + Standard_EXPORT Standard_Boolean Recadre1(Blend_CurvPointFuncInv& FinvP, + math_Vector& Solinv, + Standard_Boolean& IsVtx, + Handle(Adaptor3d_HVertex)& Vtx); + + Standard_EXPORT Standard_Boolean Recadre2(Blend_CurvPointFuncInv& FinvP, + math_Vector& Solinv, + Standard_Boolean& IsVtx, + Handle(Adaptor3d_HVertex)& Vtx); + + Standard_EXPORT void Transition(const Standard_Boolean OnFirst, + const Handle(Adaptor2d_Curve2d)& Arc, + const Standard_Real Param, + IntSurf_Transition& TLine, + IntSurf_Transition& TArc); + + Standard_EXPORT void MakeExtremity(BRepBlend_Extremity& Extrem, + const Standard_Boolean OnFirst, + const Handle(Adaptor2d_Curve2d)& Arc, + const Standard_Real Param, + const Standard_Boolean IsVtx, + const Handle(Adaptor3d_HVertex)& Vtx); + + Standard_EXPORT Blend_Status CheckDeflectionOnRst1(const Blend_Point& CurPoint); + + Standard_EXPORT Blend_Status CheckDeflectionOnRst2(const Blend_Point& CurPoint); + + Standard_EXPORT Blend_Status TestArret(Blend_RstRstFunction& Func, + const Standard_Boolean TestDeflection, + const Blend_Status State); + + Standard_EXPORT Standard_Boolean CheckInside(Blend_RstRstFunction& Func, + TopAbs_State& SituOnC1, + TopAbs_State& SituOnC2, + Blend_DecrochStatus& Decroch); + + Standard_Boolean done; + Handle(BRepBlend_Line) line; + math_Vector sol; + Handle(Adaptor3d_Surface) surf1; Handle(Adaptor3d_TopolTool) domain1; - Handle(Adaptor3d_Surface) surf2; + Handle(Adaptor3d_Surface) surf2; Handle(Adaptor3d_TopolTool) domain2; - Handle(Adaptor2d_Curve2d) rst1; - Handle(Adaptor2d_Curve2d) rst2; - Standard_Real tolpoint3d; - Standard_Real tolgui; - Standard_Real pasmax; - Standard_Real fleche; - Standard_Real param; - Blend_Point previousP; - Standard_Boolean rebrou; - Standard_Boolean iscomplete; - Standard_Boolean comptra; - Standard_Real sens; - Blend_DecrochStatus decrochdeb; - Blend_DecrochStatus decrochfin; - - + Handle(Adaptor2d_Curve2d) rst1; + Handle(Adaptor2d_Curve2d) rst2; + Standard_Real tolpoint3d; + Standard_Real tolgui; + Standard_Real pasmax; + Standard_Real fleche; + Standard_Real param; + Blend_Point previousP; + Standard_Boolean rebrou; + Standard_Boolean iscomplete; + Standard_Boolean comptra; + Standard_Real sens; + Blend_DecrochStatus decrochdeb; + Blend_DecrochStatus decrochfin; }; - #include - - - - #endif // _BRepBlend_RstRstLineBuilder_HeaderFile diff --git a/opencascade/BRepBlend_RstRstLineBuilder.lxx b/opencascade/BRepBlend_RstRstLineBuilder.lxx index aa7b133ab..eb9112aea 100644 --- a/opencascade/BRepBlend_RstRstLineBuilder.lxx +++ b/opencascade/BRepBlend_RstRstLineBuilder.lxx @@ -15,9 +15,10 @@ // commercial license or contractual agreement. #include + //======================================================================= -//function : IsDone -//purpose : +// function : IsDone +// purpose : //======================================================================= inline Standard_Boolean BRepBlend_RstRstLineBuilder::IsDone() const @@ -26,67 +27,67 @@ inline Standard_Boolean BRepBlend_RstRstLineBuilder::IsDone() const } //======================================================================= -//function : Line -//purpose : +// function : Line +// purpose : //======================================================================= inline const Handle(BRepBlend_Line)& BRepBlend_RstRstLineBuilder::Line() const { - if (!done) {throw StdFail_NotDone();} + if (!done) + { + throw StdFail_NotDone(); + } return line; } - //======================================================================= -//function : Decroch1Start -//purpose : +// function : Decroch1Start +// purpose : //======================================================================= inline Standard_Boolean BRepBlend_RstRstLineBuilder::Decroch1Start() const { - if (decrochdeb == Blend_DecrochRst1 - || decrochdeb == Blend_DecrochBoth) return Standard_True; + if (decrochdeb == Blend_DecrochRst1 || decrochdeb == Blend_DecrochBoth) + return Standard_True; - return Standard_False; + return Standard_False; } - //======================================================================= -//function : Decroch1End -//purpose : +// function : Decroch1End +// purpose : //======================================================================= inline Standard_Boolean BRepBlend_RstRstLineBuilder::Decroch1End() const { - if (decrochfin == Blend_DecrochRst1 - || decrochfin == Blend_DecrochBoth) return Standard_True; + if (decrochfin == Blend_DecrochRst1 || decrochfin == Blend_DecrochBoth) + return Standard_True; return Standard_False; } //======================================================================= -//function : Decroch2Start -//purpose : +// function : Decroch2Start +// purpose : //======================================================================= inline Standard_Boolean BRepBlend_RstRstLineBuilder::Decroch2Start() const { - if (decrochdeb == Blend_DecrochRst2 - || decrochdeb == Blend_DecrochBoth) return Standard_True; + if (decrochdeb == Blend_DecrochRst2 || decrochdeb == Blend_DecrochBoth) + return Standard_True; - return Standard_False; + return Standard_False; } - //======================================================================= -//function : Decroch2End -//purpose : +// function : Decroch2End +// purpose : //======================================================================= inline Standard_Boolean BRepBlend_RstRstLineBuilder::Decroch2End() const { - if (decrochfin == Blend_DecrochRst2 - || decrochfin == Blend_DecrochBoth) return Standard_True; + if (decrochfin == Blend_DecrochRst2 || decrochfin == Blend_DecrochBoth) + return Standard_True; return Standard_False; } diff --git a/opencascade/BRepBlend_Ruled.hxx b/opencascade/BRepBlend_Ruled.hxx index 3384af359..20e15ed47 100644 --- a/opencascade/BRepBlend_Ruled.hxx +++ b/opencascade/BRepBlend_Ruled.hxx @@ -21,5 +21,4 @@ typedef BlendFunc_Ruled BRepBlend_Ruled; - #endif // _BRepBlend_Ruled_HeaderFile diff --git a/opencascade/BRepBlend_RuledInv.hxx b/opencascade/BRepBlend_RuledInv.hxx index 6ff7aab1e..04557c6cf 100644 --- a/opencascade/BRepBlend_RuledInv.hxx +++ b/opencascade/BRepBlend_RuledInv.hxx @@ -21,5 +21,4 @@ typedef BlendFunc_RuledInv BRepBlend_RuledInv; - #endif // _BRepBlend_RuledInv_HeaderFile diff --git a/opencascade/BRepBlend_SequenceOfLine.hxx b/opencascade/BRepBlend_SequenceOfLine.hxx index 3517abc20..dfb970ee2 100644 --- a/opencascade/BRepBlend_SequenceOfLine.hxx +++ b/opencascade/BRepBlend_SequenceOfLine.hxx @@ -22,5 +22,4 @@ typedef NCollection_Sequence BRepBlend_SequenceOfLine; - #endif diff --git a/opencascade/BRepBlend_SequenceOfPointOnRst.hxx b/opencascade/BRepBlend_SequenceOfPointOnRst.hxx index d8216811d..c66151fcd 100644 --- a/opencascade/BRepBlend_SequenceOfPointOnRst.hxx +++ b/opencascade/BRepBlend_SequenceOfPointOnRst.hxx @@ -22,5 +22,4 @@ typedef NCollection_Sequence BRepBlend_SequenceOfPointOnRst; - #endif diff --git a/opencascade/BRepBlend_SurfCurvConstRadInv.hxx b/opencascade/BRepBlend_SurfCurvConstRadInv.hxx index 9853df01a..e94dccf1a 100644 --- a/opencascade/BRepBlend_SurfCurvConstRadInv.hxx +++ b/opencascade/BRepBlend_SurfCurvConstRadInv.hxx @@ -23,7 +23,6 @@ class math_Matrix; - //! Function of reframing between a restriction surface of the //! surface and a curve. //! Class used to compute a solution of the @@ -35,83 +34,64 @@ class math_Matrix; //! parameter on the guide line, wcurv is the parameter on //! the curve, wrst is the parameter on the restriction on //! the surface. -class BRepBlend_SurfCurvConstRadInv : public Blend_SurfCurvFuncInv +class BRepBlend_SurfCurvConstRadInv : public Blend_SurfCurvFuncInv { public: - DEFINE_STANDARD_ALLOC - - Standard_EXPORT BRepBlend_SurfCurvConstRadInv(const Handle(Adaptor3d_Surface)& S, const Handle(Adaptor3d_Curve)& C, const Handle(Adaptor3d_Curve)& Cg); - - Standard_EXPORT void Set (const Standard_Real R, const Standard_Integer Choix); - + Standard_EXPORT BRepBlend_SurfCurvConstRadInv(const Handle(Adaptor3d_Surface)& S, + const Handle(Adaptor3d_Curve)& C, + const Handle(Adaptor3d_Curve)& Cg); + + Standard_EXPORT void Set(const Standard_Real R, const Standard_Integer Choix); + //! returns 3. Standard_EXPORT Standard_Integer NbEquations() const; - + //! computes the values of the Functions for the //! variable . //! Returns True if the computation was done successfully, //! False otherwise. - Standard_EXPORT Standard_Boolean Value (const math_Vector& X, math_Vector& F); - + Standard_EXPORT Standard_Boolean Value(const math_Vector& X, math_Vector& F); + //! returns the values of the derivatives for the //! variable . //! Returns True if the computation was done successfully, //! False otherwise. - Standard_EXPORT Standard_Boolean Derivatives (const math_Vector& X, math_Matrix& D); - + Standard_EXPORT Standard_Boolean Derivatives(const math_Vector& X, math_Matrix& D); + //! returns the values of the functions and the derivatives //! for the variable . //! Returns True if the computation was done successfully, //! False otherwise. - Standard_EXPORT Standard_Boolean Values (const math_Vector& X, math_Vector& F, math_Matrix& D); - + Standard_EXPORT Standard_Boolean Values(const math_Vector& X, math_Vector& F, math_Matrix& D); + //! Set the restriction on which a solution has to be found. - Standard_EXPORT void Set (const Handle(Adaptor2d_Curve2d)& Rst); - + Standard_EXPORT void Set(const Handle(Adaptor2d_Curve2d)& Rst); + //! Returns in the vector Tolerance the parametric tolerance //! for each of the 3 variables; //! Tol is the tolerance used in 3d space. - Standard_EXPORT void GetTolerance (math_Vector& Tolerance, const Standard_Real Tol) const; - + Standard_EXPORT void GetTolerance(math_Vector& Tolerance, const Standard_Real Tol) const; + //! Returns in the vector InfBound the lowest values allowed //! for each of the 3 variables. //! Returns in the vector SupBound the greatest values allowed //! for each of the 3 variables. - Standard_EXPORT void GetBounds (math_Vector& InfBound, math_Vector& SupBound) const; - + Standard_EXPORT void GetBounds(math_Vector& InfBound, math_Vector& SupBound) const; + //! Returns Standard_True if Sol is a zero of the function. //! Tol is the tolerance used in 3d space. - Standard_EXPORT Standard_Boolean IsSolution (const math_Vector& Sol, const Standard_Real Tol); - - - + Standard_EXPORT Standard_Boolean IsSolution(const math_Vector& Sol, const Standard_Real Tol); protected: - - - - - private: - - - Handle(Adaptor3d_Surface) surf; - Handle(Adaptor3d_Curve) curv; - Handle(Adaptor3d_Curve) guide; + Handle(Adaptor3d_Curve) curv; + Handle(Adaptor3d_Curve) guide; Handle(Adaptor2d_Curve2d) rst; - Standard_Real ray; - Standard_Integer choix; - - + Standard_Real ray; + Standard_Integer choix; }; - - - - - - #endif // _BRepBlend_SurfCurvConstRadInv_HeaderFile diff --git a/opencascade/BRepBlend_SurfCurvEvolRadInv.hxx b/opencascade/BRepBlend_SurfCurvEvolRadInv.hxx index 2115eb089..950d145ff 100644 --- a/opencascade/BRepBlend_SurfCurvEvolRadInv.hxx +++ b/opencascade/BRepBlend_SurfCurvEvolRadInv.hxx @@ -24,7 +24,6 @@ class Law_Function; class math_Matrix; - //! Function of reframing between a surface restriction //! of the surface and a curve. //! Class used to compute a solution of the @@ -36,85 +35,67 @@ class math_Matrix; //! parameter on the guide line, wcurv is the parameter on //! the curve, wrst is the parameter on the restriction on //! the surface. -class BRepBlend_SurfCurvEvolRadInv : public Blend_SurfCurvFuncInv +class BRepBlend_SurfCurvEvolRadInv : public Blend_SurfCurvFuncInv { public: - DEFINE_STANDARD_ALLOC - - Standard_EXPORT BRepBlend_SurfCurvEvolRadInv(const Handle(Adaptor3d_Surface)& S, const Handle(Adaptor3d_Curve)& C, const Handle(Adaptor3d_Curve)& Cg, const Handle(Law_Function)& Evol); - - Standard_EXPORT void Set (const Standard_Integer Choix); - + Standard_EXPORT BRepBlend_SurfCurvEvolRadInv(const Handle(Adaptor3d_Surface)& S, + const Handle(Adaptor3d_Curve)& C, + const Handle(Adaptor3d_Curve)& Cg, + const Handle(Law_Function)& Evol); + + Standard_EXPORT void Set(const Standard_Integer Choix); + //! returns 3. Standard_EXPORT Standard_Integer NbEquations() const; - + //! computes the values of the Functions for the //! variable . //! Returns True if the computation was done successfully, //! False otherwise. - Standard_EXPORT Standard_Boolean Value (const math_Vector& X, math_Vector& F); - + Standard_EXPORT Standard_Boolean Value(const math_Vector& X, math_Vector& F); + //! returns the values of the derivatives for the //! variable . //! Returns True if the computation was done successfully, //! False otherwise. - Standard_EXPORT Standard_Boolean Derivatives (const math_Vector& X, math_Matrix& D); - + Standard_EXPORT Standard_Boolean Derivatives(const math_Vector& X, math_Matrix& D); + //! returns the values of the functions and the derivatives //! for the variable . //! Returns True if the computation was done successfully, //! False otherwise. - Standard_EXPORT Standard_Boolean Values (const math_Vector& X, math_Vector& F, math_Matrix& D); - + Standard_EXPORT Standard_Boolean Values(const math_Vector& X, math_Vector& F, math_Matrix& D); + //! Set the restriction on which a solution has to be found. - Standard_EXPORT void Set (const Handle(Adaptor2d_Curve2d)& Rst); - + Standard_EXPORT void Set(const Handle(Adaptor2d_Curve2d)& Rst); + //! Returns in the vector Tolerance the parametric tolerance //! for each of the 3 variables; //! Tol is the tolerance used in 3d space. - Standard_EXPORT void GetTolerance (math_Vector& Tolerance, const Standard_Real Tol) const; - + Standard_EXPORT void GetTolerance(math_Vector& Tolerance, const Standard_Real Tol) const; + //! Returns in the vector InfBound the lowest values allowed //! for each of the 3 variables. //! Returns in the vector SupBound the greatest values allowed //! for each of the 3 variables. - Standard_EXPORT void GetBounds (math_Vector& InfBound, math_Vector& SupBound) const; - + Standard_EXPORT void GetBounds(math_Vector& InfBound, math_Vector& SupBound) const; + //! Returns Standard_True if Sol is a zero of the function. //! Tol is the tolerance used in 3d space. - Standard_EXPORT Standard_Boolean IsSolution (const math_Vector& Sol, const Standard_Real Tol); - - - + Standard_EXPORT Standard_Boolean IsSolution(const math_Vector& Sol, const Standard_Real Tol); protected: - - - - - private: - - - Handle(Adaptor3d_Surface) surf; - Handle(Adaptor3d_Curve) curv; - Handle(Adaptor3d_Curve) guide; + Handle(Adaptor3d_Curve) curv; + Handle(Adaptor3d_Curve) guide; Handle(Adaptor2d_Curve2d) rst; - Standard_Real ray; - Standard_Integer choix; - Handle(Law_Function) tevol; - Standard_Real sg1; - - + Standard_Real ray; + Standard_Integer choix; + Handle(Law_Function) tevol; + Standard_Real sg1; }; - - - - - - #endif // _BRepBlend_SurfCurvEvolRadInv_HeaderFile diff --git a/opencascade/BRepBlend_SurfPointConstRadInv.hxx b/opencascade/BRepBlend_SurfPointConstRadInv.hxx index 775382a18..6a5d7e4fc 100644 --- a/opencascade/BRepBlend_SurfPointConstRadInv.hxx +++ b/opencascade/BRepBlend_SurfPointConstRadInv.hxx @@ -33,82 +33,62 @@ class math_Matrix; //! coordinates w, U, V where w is the parameter on the //! guide line, U,V are the parametric coordinates of a //! point on the partner surface. -class BRepBlend_SurfPointConstRadInv : public Blend_SurfPointFuncInv +class BRepBlend_SurfPointConstRadInv : public Blend_SurfPointFuncInv { public: - DEFINE_STANDARD_ALLOC - - Standard_EXPORT BRepBlend_SurfPointConstRadInv(const Handle(Adaptor3d_Surface)& S, const Handle(Adaptor3d_Curve)& C); - - Standard_EXPORT void Set (const Standard_Real R, const Standard_Integer Choix); - + Standard_EXPORT BRepBlend_SurfPointConstRadInv(const Handle(Adaptor3d_Surface)& S, + const Handle(Adaptor3d_Curve)& C); + + Standard_EXPORT void Set(const Standard_Real R, const Standard_Integer Choix); + //! returns 3. Standard_EXPORT Standard_Integer NbEquations() const; - + //! computes the values of the Functions for the //! variable . //! Returns True if the computation was done successfully, //! False otherwise. - Standard_EXPORT Standard_Boolean Value (const math_Vector& X, math_Vector& F); - + Standard_EXPORT Standard_Boolean Value(const math_Vector& X, math_Vector& F); + //! returns the values of the derivatives for the //! variable . //! Returns True if the computation was done successfully, //! False otherwise. - Standard_EXPORT Standard_Boolean Derivatives (const math_Vector& X, math_Matrix& D); - + Standard_EXPORT Standard_Boolean Derivatives(const math_Vector& X, math_Matrix& D); + //! returns the values of the functions and the derivatives //! for the variable . //! Returns True if the computation was done successfully, //! False otherwise. - Standard_EXPORT Standard_Boolean Values (const math_Vector& X, math_Vector& F, math_Matrix& D); - + Standard_EXPORT Standard_Boolean Values(const math_Vector& X, math_Vector& F, math_Matrix& D); + //! Set the Point on which a solution has to be found. - Standard_EXPORT void Set (const gp_Pnt& P); - + Standard_EXPORT void Set(const gp_Pnt& P); + //! Returns in the vector Tolerance the parametric tolerance //! for each of the 3 variables; //! Tol is the tolerance used in 3d space. - Standard_EXPORT void GetTolerance (math_Vector& Tolerance, const Standard_Real Tol) const; - + Standard_EXPORT void GetTolerance(math_Vector& Tolerance, const Standard_Real Tol) const; + //! Returns in the vector InfBound the lowest values allowed //! for each of the 3 variables. //! Returns in the vector SupBound the greatest values allowed //! for each of the 3 variables. - Standard_EXPORT void GetBounds (math_Vector& InfBound, math_Vector& SupBound) const; - + Standard_EXPORT void GetBounds(math_Vector& InfBound, math_Vector& SupBound) const; + //! Returns Standard_True if Sol is a zero of the function. //! Tol is the tolerance used in 3d space. - Standard_EXPORT Standard_Boolean IsSolution (const math_Vector& Sol, const Standard_Real Tol); - - - + Standard_EXPORT Standard_Boolean IsSolution(const math_Vector& Sol, const Standard_Real Tol); protected: - - - - - private: - - - Handle(Adaptor3d_Surface) surf; - Handle(Adaptor3d_Curve) curv; - gp_Pnt point; - Standard_Real ray; - Standard_Integer choix; - - + Handle(Adaptor3d_Curve) curv; + gp_Pnt point; + Standard_Real ray; + Standard_Integer choix; }; - - - - - - #endif // _BRepBlend_SurfPointConstRadInv_HeaderFile diff --git a/opencascade/BRepBlend_SurfPointEvolRadInv.hxx b/opencascade/BRepBlend_SurfPointEvolRadInv.hxx index 4356b08f9..93f41899e 100644 --- a/opencascade/BRepBlend_SurfPointEvolRadInv.hxx +++ b/opencascade/BRepBlend_SurfPointEvolRadInv.hxx @@ -25,7 +25,6 @@ class Law_Function; class math_Matrix; - //! Function of reframing between a point and a surface. //! This function is used to find a solution on a done //! point of the curve when using SurfRstConsRad or @@ -35,84 +34,65 @@ class math_Matrix; //! coordinates w, U, V where w is the parameter on the //! guide line, U,V are the parametric coordinates of a //! point on the partner surface. -class BRepBlend_SurfPointEvolRadInv : public Blend_SurfPointFuncInv +class BRepBlend_SurfPointEvolRadInv : public Blend_SurfPointFuncInv { public: - DEFINE_STANDARD_ALLOC - - Standard_EXPORT BRepBlend_SurfPointEvolRadInv(const Handle(Adaptor3d_Surface)& S, const Handle(Adaptor3d_Curve)& C, const Handle(Law_Function)& Evol); - - Standard_EXPORT void Set (const Standard_Integer Choix); - + Standard_EXPORT BRepBlend_SurfPointEvolRadInv(const Handle(Adaptor3d_Surface)& S, + const Handle(Adaptor3d_Curve)& C, + const Handle(Law_Function)& Evol); + + Standard_EXPORT void Set(const Standard_Integer Choix); + //! returns 3. Standard_EXPORT Standard_Integer NbEquations() const; - + //! computes the values of the Functions for the //! variable . //! Returns True if the computation was done successfully, //! False otherwise. - Standard_EXPORT Standard_Boolean Value (const math_Vector& X, math_Vector& F); - + Standard_EXPORT Standard_Boolean Value(const math_Vector& X, math_Vector& F); + //! returns the values of the derivatives for the //! variable . //! Returns True if the computation was done successfully, //! False otherwise. - Standard_EXPORT Standard_Boolean Derivatives (const math_Vector& X, math_Matrix& D); - + Standard_EXPORT Standard_Boolean Derivatives(const math_Vector& X, math_Matrix& D); + //! returns the values of the functions and the derivatives //! for the variable . //! Returns True if the computation was done successfully, //! False otherwise. - Standard_EXPORT Standard_Boolean Values (const math_Vector& X, math_Vector& F, math_Matrix& D); - + Standard_EXPORT Standard_Boolean Values(const math_Vector& X, math_Vector& F, math_Matrix& D); + //! Set the Point on which a solution has to be found. - Standard_EXPORT void Set (const gp_Pnt& P); - + Standard_EXPORT void Set(const gp_Pnt& P); + //! Returns in the vector Tolerance the parametric tolerance //! for each of the 3 variables; //! Tol is the tolerance used in 3d space. - Standard_EXPORT void GetTolerance (math_Vector& Tolerance, const Standard_Real Tol) const; - + Standard_EXPORT void GetTolerance(math_Vector& Tolerance, const Standard_Real Tol) const; + //! Returns in the vector InfBound the lowest values allowed //! for each of the 3 variables. //! Returns in the vector SupBound the greatest values allowed //! for each of the 3 variables. - Standard_EXPORT void GetBounds (math_Vector& InfBound, math_Vector& SupBound) const; - + Standard_EXPORT void GetBounds(math_Vector& InfBound, math_Vector& SupBound) const; + //! Returns Standard_True if Sol is a zero of the function. //! Tol is the tolerance used in 3d space. - Standard_EXPORT Standard_Boolean IsSolution (const math_Vector& Sol, const Standard_Real Tol); - - - + Standard_EXPORT Standard_Boolean IsSolution(const math_Vector& Sol, const Standard_Real Tol); protected: - - - - - private: - - - Handle(Adaptor3d_Surface) surf; - Handle(Adaptor3d_Curve) curv; - gp_Pnt point; - Standard_Real ray; - Standard_Integer choix; - Handle(Law_Function) tevol; - Standard_Real sg1; - - + Handle(Adaptor3d_Curve) curv; + gp_Pnt point; + Standard_Real ray; + Standard_Integer choix; + Handle(Law_Function) tevol; + Standard_Real sg1; }; - - - - - - #endif // _BRepBlend_SurfPointEvolRadInv_HeaderFile diff --git a/opencascade/BRepBlend_SurfRstConstRad.hxx b/opencascade/BRepBlend_SurfRstConstRad.hxx index a77097fcc..964b23d73 100644 --- a/opencascade/BRepBlend_SurfRstConstRad.hxx +++ b/opencascade/BRepBlend_SurfRstConstRad.hxx @@ -39,197 +39,222 @@ class math_Matrix; class gp_Circ; class Blend_Point; - //! Copy of CSConstRad with pcurve on surface //! as support. -class BRepBlend_SurfRstConstRad : public Blend_SurfRstFunction +class BRepBlend_SurfRstConstRad : public Blend_SurfRstFunction { public: - DEFINE_STANDARD_ALLOC - - Standard_EXPORT BRepBlend_SurfRstConstRad(const Handle(Adaptor3d_Surface)& Surf, const Handle(Adaptor3d_Surface)& SurfRst, const Handle(Adaptor2d_Curve2d)& Rst, const Handle(Adaptor3d_Curve)& CGuide); - + Standard_EXPORT BRepBlend_SurfRstConstRad(const Handle(Adaptor3d_Surface)& Surf, + const Handle(Adaptor3d_Surface)& SurfRst, + const Handle(Adaptor2d_Curve2d)& Rst, + const Handle(Adaptor3d_Curve)& CGuide); + //! Returns 3. Standard_EXPORT Standard_Integer NbVariables() const Standard_OVERRIDE; - + //! Returns 3. Standard_EXPORT Standard_Integer NbEquations() const Standard_OVERRIDE; - + //! computes the values of the Functions for the //! variable . //! Returns True if the computation was done successfully, //! False otherwise. - Standard_EXPORT Standard_Boolean Value (const math_Vector& X, math_Vector& F) Standard_OVERRIDE; - + Standard_EXPORT Standard_Boolean Value(const math_Vector& X, math_Vector& F) Standard_OVERRIDE; + //! returns the values of the derivatives for the //! variable . //! Returns True if the computation was done successfully, //! False otherwise. - Standard_EXPORT Standard_Boolean Derivatives (const math_Vector& X, math_Matrix& D) Standard_OVERRIDE; - + Standard_EXPORT Standard_Boolean Derivatives(const math_Vector& X, + math_Matrix& D) Standard_OVERRIDE; + //! returns the values of the functions and the derivatives //! for the variable . //! Returns True if the computation was done successfully, //! False otherwise. - Standard_EXPORT Standard_Boolean Values (const math_Vector& X, math_Vector& F, math_Matrix& D) Standard_OVERRIDE; - - Standard_EXPORT void Set (const Handle(Adaptor3d_Surface)& SurfRef, const Handle(Adaptor2d_Curve2d)& RstRef); - - Standard_EXPORT void Set (const Standard_Real Param) Standard_OVERRIDE; - + Standard_EXPORT Standard_Boolean Values(const math_Vector& X, + math_Vector& F, + math_Matrix& D) Standard_OVERRIDE; + + Standard_EXPORT void Set(const Handle(Adaptor3d_Surface)& SurfRef, + const Handle(Adaptor2d_Curve2d)& RstRef); + + Standard_EXPORT void Set(const Standard_Real Param) Standard_OVERRIDE; + //! Sets the bounds of the parametric interval on //! the guide line. //! This determines the derivatives in these values if the //! function is not Cn. - Standard_EXPORT void Set (const Standard_Real First, const Standard_Real Last) Standard_OVERRIDE; - - Standard_EXPORT void GetTolerance (math_Vector& Tolerance, const Standard_Real Tol) const Standard_OVERRIDE; - - Standard_EXPORT void GetBounds (math_Vector& InfBound, math_Vector& SupBound) const Standard_OVERRIDE; - - Standard_EXPORT Standard_Boolean IsSolution (const math_Vector& Sol, const Standard_Real Tol) Standard_OVERRIDE; - + Standard_EXPORT void Set(const Standard_Real First, const Standard_Real Last) Standard_OVERRIDE; + + Standard_EXPORT void GetTolerance(math_Vector& Tolerance, + const Standard_Real Tol) const Standard_OVERRIDE; + + Standard_EXPORT void GetBounds(math_Vector& InfBound, + math_Vector& SupBound) const Standard_OVERRIDE; + + Standard_EXPORT Standard_Boolean IsSolution(const math_Vector& Sol, + const Standard_Real Tol) Standard_OVERRIDE; + //! Returns the minimal Distance between two //! extremities of calculated sections. Standard_EXPORT virtual Standard_Real GetMinimalDistance() const Standard_OVERRIDE; - + Standard_EXPORT const gp_Pnt& PointOnS() const Standard_OVERRIDE; - + Standard_EXPORT const gp_Pnt& PointOnRst() const Standard_OVERRIDE; - + //! Returns U,V coordinates of the point on the surface. Standard_EXPORT const gp_Pnt2d& Pnt2dOnS() const Standard_OVERRIDE; - + //! Returns U,V coordinates of the point on the curve on //! surface. Standard_EXPORT const gp_Pnt2d& Pnt2dOnRst() const Standard_OVERRIDE; - + //! Returns parameter of the point on the curve. Standard_EXPORT Standard_Real ParameterOnRst() const Standard_OVERRIDE; - + Standard_EXPORT Standard_Boolean IsTangencyPoint() const Standard_OVERRIDE; - + Standard_EXPORT const gp_Vec& TangentOnS() const Standard_OVERRIDE; - + Standard_EXPORT const gp_Vec2d& Tangent2dOnS() const Standard_OVERRIDE; - + Standard_EXPORT const gp_Vec& TangentOnRst() const Standard_OVERRIDE; - + Standard_EXPORT const gp_Vec2d& Tangent2dOnRst() const Standard_OVERRIDE; - + //! Enables implementation of a criterion of decrochage //! specific to the function. //! Warning: Can be called without previous call of issolution //! but the values calculated can be senseless. - Standard_EXPORT Standard_Boolean Decroch (const math_Vector& Sol, gp_Vec& NS, gp_Vec& TgS) const Standard_OVERRIDE; - - Standard_EXPORT void Set (const Standard_Real Radius, const Standard_Integer Choix); - + Standard_EXPORT Standard_Boolean Decroch(const math_Vector& Sol, + gp_Vec& NS, + gp_Vec& TgS) const Standard_OVERRIDE; + + Standard_EXPORT void Set(const Standard_Real Radius, const Standard_Integer Choix); + //! Sets the type of section generation for the //! approximations. - Standard_EXPORT void Set (const BlendFunc_SectionShape TypeSection); - - Standard_EXPORT void Section (const Standard_Real Param, const Standard_Real U, const Standard_Real V, const Standard_Real W, Standard_Real& Pdeb, Standard_Real& Pfin, gp_Circ& C); - - //! Returns if the section is rationnal + Standard_EXPORT void Set(const BlendFunc_SectionShape TypeSection); + + Standard_EXPORT void Section(const Standard_Real Param, + const Standard_Real U, + const Standard_Real V, + const Standard_Real W, + Standard_Real& Pdeb, + Standard_Real& Pfin, + gp_Circ& C); + + //! Returns if the section is rational Standard_EXPORT Standard_Boolean IsRational() const Standard_OVERRIDE; - + //! Returns the length of the maximum section Standard_EXPORT Standard_Real GetSectionSize() const Standard_OVERRIDE; - + //! Compute the minimal value of weight for each poles //! of all sections. - Standard_EXPORT void GetMinimalWeight (TColStd_Array1OfReal& Weigths) const Standard_OVERRIDE; - + Standard_EXPORT void GetMinimalWeight(TColStd_Array1OfReal& Weigths) const Standard_OVERRIDE; + //! Returns the number of intervals for continuity //! . May be one if Continuity(me) >= - Standard_EXPORT Standard_Integer NbIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE; - + Standard_EXPORT Standard_Integer NbIntervals(const GeomAbs_Shape S) const Standard_OVERRIDE; + //! Stores in the parameters bounding the intervals //! of continuity . //! The array must provide enough room to accommodate //! for the parameters. i.e. T.Length() > NbIntervals() - Standard_EXPORT void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const Standard_OVERRIDE; - - Standard_EXPORT void GetShape (Standard_Integer& NbPoles, Standard_Integer& NbKnots, Standard_Integer& Degree, Standard_Integer& NbPoles2d) Standard_OVERRIDE; - + Standard_EXPORT void Intervals(TColStd_Array1OfReal& T, + const GeomAbs_Shape S) const Standard_OVERRIDE; + + Standard_EXPORT void GetShape(Standard_Integer& NbPoles, + Standard_Integer& NbKnots, + Standard_Integer& Degree, + Standard_Integer& NbPoles2d) Standard_OVERRIDE; + //! Returns the tolerance to reach in approximation - //! to respecte + //! to respect //! BoundTol error at the Boundary //! AngleTol tangent error at the Boundary //! SurfTol error inside the surface. - Standard_EXPORT void GetTolerance (const Standard_Real BoundTol, const Standard_Real SurfTol, const Standard_Real AngleTol, math_Vector& Tol3d, math_Vector& Tol1D) const Standard_OVERRIDE; - - Standard_EXPORT void Knots (TColStd_Array1OfReal& TKnots) Standard_OVERRIDE; - - Standard_EXPORT void Mults (TColStd_Array1OfInteger& TMults) Standard_OVERRIDE; - + Standard_EXPORT void GetTolerance(const Standard_Real BoundTol, + const Standard_Real SurfTol, + const Standard_Real AngleTol, + math_Vector& Tol3d, + math_Vector& Tol1D) const Standard_OVERRIDE; + + Standard_EXPORT void Knots(TColStd_Array1OfReal& TKnots) Standard_OVERRIDE; + + Standard_EXPORT void Mults(TColStd_Array1OfInteger& TMults) Standard_OVERRIDE; + //! Used for the first and last section - Standard_EXPORT Standard_Boolean Section (const Blend_Point& P, TColgp_Array1OfPnt& Poles, TColgp_Array1OfVec& DPoles, TColgp_Array1OfPnt2d& Poles2d, TColgp_Array1OfVec2d& DPoles2d, TColStd_Array1OfReal& Weigths, TColStd_Array1OfReal& DWeigths) Standard_OVERRIDE; - + Standard_EXPORT Standard_Boolean Section(const Blend_Point& P, + TColgp_Array1OfPnt& Poles, + TColgp_Array1OfVec& DPoles, + TColgp_Array1OfPnt2d& Poles2d, + TColgp_Array1OfVec2d& DPoles2d, + TColStd_Array1OfReal& Weigths, + TColStd_Array1OfReal& DWeigths) Standard_OVERRIDE; + //! Used for the first and last section //! The method returns Standard_True if the derivatives //! are computed, otherwise it returns Standard_False. - Standard_EXPORT Standard_Boolean Section (const Blend_Point& P, TColgp_Array1OfPnt& Poles, TColgp_Array1OfVec& DPoles, TColgp_Array1OfVec& D2Poles, TColgp_Array1OfPnt2d& Poles2d, TColgp_Array1OfVec2d& DPoles2d, TColgp_Array1OfVec2d& D2Poles2d, TColStd_Array1OfReal& Weigths, TColStd_Array1OfReal& DWeigths, TColStd_Array1OfReal& D2Weigths) Standard_OVERRIDE; - - Standard_EXPORT void Section (const Blend_Point& P, TColgp_Array1OfPnt& Poles, TColgp_Array1OfPnt2d& Poles2d, TColStd_Array1OfReal& Weigths) Standard_OVERRIDE; - - Standard_EXPORT void Resolution (const Standard_Integer IC2d, const Standard_Real Tol, Standard_Real& TolU, Standard_Real& TolV) const Standard_OVERRIDE; - + Standard_EXPORT Standard_Boolean Section(const Blend_Point& P, + TColgp_Array1OfPnt& Poles, + TColgp_Array1OfVec& DPoles, + TColgp_Array1OfVec& D2Poles, + TColgp_Array1OfPnt2d& Poles2d, + TColgp_Array1OfVec2d& DPoles2d, + TColgp_Array1OfVec2d& D2Poles2d, + TColStd_Array1OfReal& Weigths, + TColStd_Array1OfReal& DWeigths, + TColStd_Array1OfReal& D2Weigths) Standard_OVERRIDE; + Standard_EXPORT void Section(const Blend_Point& P, + TColgp_Array1OfPnt& Poles, + TColgp_Array1OfPnt2d& Poles2d, + TColStd_Array1OfReal& Weigths) Standard_OVERRIDE; + Standard_EXPORT void Resolution(const Standard_Integer IC2d, + const Standard_Real Tol, + Standard_Real& TolU, + Standard_Real& TolV) const Standard_OVERRIDE; protected: - - - - - private: - - - - Handle(Adaptor3d_Surface) surf; - Handle(Adaptor3d_Surface) surfrst; - Handle(Adaptor2d_Curve2d) rst; - Adaptor3d_CurveOnSurface cons; - Handle(Adaptor3d_Curve) guide; - Handle(Adaptor3d_Curve) tguide; - gp_Pnt pts; - gp_Pnt ptrst; - gp_Pnt2d pt2ds; - gp_Pnt2d pt2drst; - Standard_Real prmrst; - Standard_Boolean istangent; - gp_Vec tgs; - gp_Vec2d tg2ds; - gp_Vec tgrst; - gp_Vec2d tg2drst; - Standard_Real ray; - Standard_Integer choix; - gp_Pnt ptgui; - gp_Vec d1gui; - gp_Vec d2gui; - gp_Vec nplan; - Standard_Real normtg; - Standard_Real theD; - Handle(Adaptor3d_Surface) surfref; - Handle(Adaptor2d_Curve2d) rstref; - Standard_Real maxang; - Standard_Real minang; - Standard_Real distmin; - BlendFunc_SectionShape mySShape; + Handle(Adaptor3d_Surface) surf; + Handle(Adaptor3d_Surface) surfrst; + Handle(Adaptor2d_Curve2d) rst; + Adaptor3d_CurveOnSurface cons; + Handle(Adaptor3d_Curve) guide; + Handle(Adaptor3d_Curve) tguide; + gp_Pnt pts; + gp_Pnt ptrst; + gp_Pnt2d pt2ds; + gp_Pnt2d pt2drst; + Standard_Real prmrst; + Standard_Boolean istangent; + gp_Vec tgs; + gp_Vec2d tg2ds; + gp_Vec tgrst; + gp_Vec2d tg2drst; + Standard_Real ray; + Standard_Integer choix; + gp_Pnt ptgui; + gp_Vec d1gui; + gp_Vec d2gui; + gp_Vec nplan; + Standard_Real normtg; + Standard_Real theD; + Handle(Adaptor3d_Surface) surfref; + Handle(Adaptor2d_Curve2d) rstref; + Standard_Real maxang; + Standard_Real minang; + Standard_Real distmin; + BlendFunc_SectionShape mySShape; Convert_ParameterisationType myTConv; - - }; - - - - - - #endif // _BRepBlend_SurfRstConstRad_HeaderFile diff --git a/opencascade/BRepBlend_SurfRstEvolRad.hxx b/opencascade/BRepBlend_SurfRstEvolRad.hxx index ebdc9b82a..2ea1333c1 100644 --- a/opencascade/BRepBlend_SurfRstEvolRad.hxx +++ b/opencascade/BRepBlend_SurfRstEvolRad.hxx @@ -40,199 +40,225 @@ class math_Matrix; class gp_Circ; class Blend_Point; - //! Function to approximate by AppSurface for //! Edge/Face and evolutif radius -class BRepBlend_SurfRstEvolRad : public Blend_SurfRstFunction +class BRepBlend_SurfRstEvolRad : public Blend_SurfRstFunction { public: - DEFINE_STANDARD_ALLOC - - Standard_EXPORT BRepBlend_SurfRstEvolRad(const Handle(Adaptor3d_Surface)& Surf, const Handle(Adaptor3d_Surface)& SurfRst, const Handle(Adaptor2d_Curve2d)& Rst, const Handle(Adaptor3d_Curve)& CGuide, const Handle(Law_Function)& Evol); - + Standard_EXPORT BRepBlend_SurfRstEvolRad(const Handle(Adaptor3d_Surface)& Surf, + const Handle(Adaptor3d_Surface)& SurfRst, + const Handle(Adaptor2d_Curve2d)& Rst, + const Handle(Adaptor3d_Curve)& CGuide, + const Handle(Law_Function)& Evol); + //! Returns 3. Standard_EXPORT Standard_Integer NbVariables() const Standard_OVERRIDE; - + //! Returns 3. Standard_EXPORT Standard_Integer NbEquations() const Standard_OVERRIDE; - + //! computes the values of the Functions for the //! variable . //! Returns True if the computation was done successfully, //! False otherwise. - Standard_EXPORT Standard_Boolean Value (const math_Vector& X, math_Vector& F) Standard_OVERRIDE; - + Standard_EXPORT Standard_Boolean Value(const math_Vector& X, math_Vector& F) Standard_OVERRIDE; + //! returns the values of the derivatives for the //! variable . //! Returns True if the computation was done successfully, //! False otherwise. - Standard_EXPORT Standard_Boolean Derivatives (const math_Vector& X, math_Matrix& D) Standard_OVERRIDE; - + Standard_EXPORT Standard_Boolean Derivatives(const math_Vector& X, + math_Matrix& D) Standard_OVERRIDE; + //! returns the values of the functions and the derivatives //! for the variable . //! Returns True if the computation was done successfully, //! False otherwise. - Standard_EXPORT Standard_Boolean Values (const math_Vector& X, math_Vector& F, math_Matrix& D) Standard_OVERRIDE; - - Standard_EXPORT void Set (const Handle(Adaptor3d_Surface)& SurfRef, const Handle(Adaptor2d_Curve2d)& RstRef); - - Standard_EXPORT void Set (const Standard_Real Param) Standard_OVERRIDE; - + Standard_EXPORT Standard_Boolean Values(const math_Vector& X, + math_Vector& F, + math_Matrix& D) Standard_OVERRIDE; + + Standard_EXPORT void Set(const Handle(Adaptor3d_Surface)& SurfRef, + const Handle(Adaptor2d_Curve2d)& RstRef); + + Standard_EXPORT void Set(const Standard_Real Param) Standard_OVERRIDE; + //! Sets the bounds of the parametric interval on //! the guide line. //! This determines the derivatives in these values if the //! function is not Cn. - Standard_EXPORT void Set (const Standard_Real First, const Standard_Real Last) Standard_OVERRIDE; - - Standard_EXPORT void GetTolerance (math_Vector& Tolerance, const Standard_Real Tol) const Standard_OVERRIDE; - - Standard_EXPORT void GetBounds (math_Vector& InfBound, math_Vector& SupBound) const Standard_OVERRIDE; - - Standard_EXPORT Standard_Boolean IsSolution (const math_Vector& Sol, const Standard_Real Tol) Standard_OVERRIDE; - + Standard_EXPORT void Set(const Standard_Real First, const Standard_Real Last) Standard_OVERRIDE; + + Standard_EXPORT void GetTolerance(math_Vector& Tolerance, + const Standard_Real Tol) const Standard_OVERRIDE; + + Standard_EXPORT void GetBounds(math_Vector& InfBound, + math_Vector& SupBound) const Standard_OVERRIDE; + + Standard_EXPORT Standard_Boolean IsSolution(const math_Vector& Sol, + const Standard_Real Tol) Standard_OVERRIDE; + //! Returns the minimal Distance between two //! extremities of calculated sections. Standard_EXPORT virtual Standard_Real GetMinimalDistance() const Standard_OVERRIDE; - + Standard_EXPORT const gp_Pnt& PointOnS() const Standard_OVERRIDE; - + Standard_EXPORT const gp_Pnt& PointOnRst() const Standard_OVERRIDE; - + //! Returns U,V coordinates of the point on the surface. Standard_EXPORT const gp_Pnt2d& Pnt2dOnS() const Standard_OVERRIDE; - + //! Returns U,V coordinates of the point on the curve on //! surface. Standard_EXPORT const gp_Pnt2d& Pnt2dOnRst() const Standard_OVERRIDE; - + //! Returns parameter of the point on the curve. Standard_EXPORT Standard_Real ParameterOnRst() const Standard_OVERRIDE; - + Standard_EXPORT Standard_Boolean IsTangencyPoint() const Standard_OVERRIDE; - + Standard_EXPORT const gp_Vec& TangentOnS() const Standard_OVERRIDE; - + Standard_EXPORT const gp_Vec2d& Tangent2dOnS() const Standard_OVERRIDE; - + Standard_EXPORT const gp_Vec& TangentOnRst() const Standard_OVERRIDE; - + Standard_EXPORT const gp_Vec2d& Tangent2dOnRst() const Standard_OVERRIDE; - + //! Permet d ' implementer un critere de decrochage //! specifique a la fonction. - Standard_EXPORT Standard_Boolean Decroch (const math_Vector& Sol, gp_Vec& NS, gp_Vec& TgS) const Standard_OVERRIDE; - - Standard_EXPORT void Set (const Standard_Integer Choix); - + Standard_EXPORT Standard_Boolean Decroch(const math_Vector& Sol, + gp_Vec& NS, + gp_Vec& TgS) const Standard_OVERRIDE; + + Standard_EXPORT void Set(const Standard_Integer Choix); + //! Sets the type of section generation for the //! approximations. - Standard_EXPORT void Set (const BlendFunc_SectionShape TypeSection); - - Standard_EXPORT void Section (const Standard_Real Param, const Standard_Real U, const Standard_Real V, const Standard_Real W, Standard_Real& Pdeb, Standard_Real& Pfin, gp_Circ& C); - - //! Returns if the section is rationnal + Standard_EXPORT void Set(const BlendFunc_SectionShape TypeSection); + + Standard_EXPORT void Section(const Standard_Real Param, + const Standard_Real U, + const Standard_Real V, + const Standard_Real W, + Standard_Real& Pdeb, + Standard_Real& Pfin, + gp_Circ& C); + + //! Returns if the section is rational Standard_EXPORT Standard_Boolean IsRational() const Standard_OVERRIDE; - + //! Returns the length of the maximum section Standard_EXPORT Standard_Real GetSectionSize() const Standard_OVERRIDE; - + //! Compute the minimal value of weight for each poles //! of all sections. - Standard_EXPORT void GetMinimalWeight (TColStd_Array1OfReal& Weigths) const Standard_OVERRIDE; - + Standard_EXPORT void GetMinimalWeight(TColStd_Array1OfReal& Weigths) const Standard_OVERRIDE; + //! Returns the number of intervals for continuity //! . May be one if Continuity(me) >= - Standard_EXPORT Standard_Integer NbIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE; - + Standard_EXPORT Standard_Integer NbIntervals(const GeomAbs_Shape S) const Standard_OVERRIDE; + //! Stores in the parameters bounding the intervals //! of continuity . //! The array must provide enough room to accommodate //! for the parameters. i.e. T.Length() > NbIntervals() - Standard_EXPORT void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const Standard_OVERRIDE; - - Standard_EXPORT void GetShape (Standard_Integer& NbPoles, Standard_Integer& NbKnots, Standard_Integer& Degree, Standard_Integer& NbPoles2d) Standard_OVERRIDE; - + Standard_EXPORT void Intervals(TColStd_Array1OfReal& T, + const GeomAbs_Shape S) const Standard_OVERRIDE; + + Standard_EXPORT void GetShape(Standard_Integer& NbPoles, + Standard_Integer& NbKnots, + Standard_Integer& Degree, + Standard_Integer& NbPoles2d) Standard_OVERRIDE; + //! Returns the tolerance to reach in approximation - //! to respecte + //! to respect //! BoundTol error at the Boundary //! AngleTol tangent error at the Boundary //! SurfTol error inside the surface. - Standard_EXPORT void GetTolerance (const Standard_Real BoundTol, const Standard_Real SurfTol, const Standard_Real AngleTol, math_Vector& Tol3d, math_Vector& Tol1D) const Standard_OVERRIDE; - - Standard_EXPORT void Knots (TColStd_Array1OfReal& TKnots) Standard_OVERRIDE; - - Standard_EXPORT void Mults (TColStd_Array1OfInteger& TMults) Standard_OVERRIDE; - + Standard_EXPORT void GetTolerance(const Standard_Real BoundTol, + const Standard_Real SurfTol, + const Standard_Real AngleTol, + math_Vector& Tol3d, + math_Vector& Tol1D) const Standard_OVERRIDE; + + Standard_EXPORT void Knots(TColStd_Array1OfReal& TKnots) Standard_OVERRIDE; + + Standard_EXPORT void Mults(TColStd_Array1OfInteger& TMults) Standard_OVERRIDE; + //! Used for the first and last section - Standard_EXPORT Standard_Boolean Section (const Blend_Point& P, TColgp_Array1OfPnt& Poles, TColgp_Array1OfVec& DPoles, TColgp_Array1OfPnt2d& Poles2d, TColgp_Array1OfVec2d& DPoles2d, TColStd_Array1OfReal& Weigths, TColStd_Array1OfReal& DWeigths) Standard_OVERRIDE; - + Standard_EXPORT Standard_Boolean Section(const Blend_Point& P, + TColgp_Array1OfPnt& Poles, + TColgp_Array1OfVec& DPoles, + TColgp_Array1OfPnt2d& Poles2d, + TColgp_Array1OfVec2d& DPoles2d, + TColStd_Array1OfReal& Weigths, + TColStd_Array1OfReal& DWeigths) Standard_OVERRIDE; + //! Used for the first and last section //! The method returns Standard_True if the derivatives //! are computed, otherwise it returns Standard_False. - Standard_EXPORT Standard_Boolean Section (const Blend_Point& P, TColgp_Array1OfPnt& Poles, TColgp_Array1OfVec& DPoles, TColgp_Array1OfVec& D2Poles, TColgp_Array1OfPnt2d& Poles2d, TColgp_Array1OfVec2d& DPoles2d, TColgp_Array1OfVec2d& D2Poles2d, TColStd_Array1OfReal& Weigths, TColStd_Array1OfReal& DWeigths, TColStd_Array1OfReal& D2Weigths) Standard_OVERRIDE; - - Standard_EXPORT void Section (const Blend_Point& P, TColgp_Array1OfPnt& Poles, TColgp_Array1OfPnt2d& Poles2d, TColStd_Array1OfReal& Weigths) Standard_OVERRIDE; - - Standard_EXPORT void Resolution (const Standard_Integer IC2d, const Standard_Real Tol, Standard_Real& TolU, Standard_Real& TolV) const Standard_OVERRIDE; - + Standard_EXPORT Standard_Boolean Section(const Blend_Point& P, + TColgp_Array1OfPnt& Poles, + TColgp_Array1OfVec& DPoles, + TColgp_Array1OfVec& D2Poles, + TColgp_Array1OfPnt2d& Poles2d, + TColgp_Array1OfVec2d& DPoles2d, + TColgp_Array1OfVec2d& D2Poles2d, + TColStd_Array1OfReal& Weigths, + TColStd_Array1OfReal& DWeigths, + TColStd_Array1OfReal& D2Weigths) Standard_OVERRIDE; + Standard_EXPORT void Section(const Blend_Point& P, + TColgp_Array1OfPnt& Poles, + TColgp_Array1OfPnt2d& Poles2d, + TColStd_Array1OfReal& Weigths) Standard_OVERRIDE; + Standard_EXPORT void Resolution(const Standard_Integer IC2d, + const Standard_Real Tol, + Standard_Real& TolU, + Standard_Real& TolV) const Standard_OVERRIDE; protected: - - - - - private: - - - - Handle(Adaptor3d_Surface) surf; - Handle(Adaptor3d_Surface) surfrst; - Handle(Adaptor2d_Curve2d) rst; - Adaptor3d_CurveOnSurface cons; - Handle(Adaptor3d_Curve) guide; - Handle(Adaptor3d_Curve) tguide; - gp_Pnt pts; - gp_Pnt ptrst; - gp_Pnt2d pt2ds; - gp_Pnt2d pt2drst; - Standard_Real prmrst; - Standard_Boolean istangent; - gp_Vec tgs; - gp_Vec2d tg2ds; - gp_Vec tgrst; - gp_Vec2d tg2drst; - Standard_Real ray; - Standard_Real dray; - Standard_Integer choix; - gp_Pnt ptgui; - gp_Vec d1gui; - gp_Vec d2gui; - gp_Vec nplan; - Standard_Real normtg; - Standard_Real theD; - Handle(Adaptor3d_Surface) surfref; - Handle(Adaptor2d_Curve2d) rstref; - Standard_Real maxang; - Standard_Real minang; - Standard_Real distmin; - BlendFunc_SectionShape mySShape; + Handle(Adaptor3d_Surface) surf; + Handle(Adaptor3d_Surface) surfrst; + Handle(Adaptor2d_Curve2d) rst; + Adaptor3d_CurveOnSurface cons; + Handle(Adaptor3d_Curve) guide; + Handle(Adaptor3d_Curve) tguide; + gp_Pnt pts; + gp_Pnt ptrst; + gp_Pnt2d pt2ds; + gp_Pnt2d pt2drst; + Standard_Real prmrst; + Standard_Boolean istangent; + gp_Vec tgs; + gp_Vec2d tg2ds; + gp_Vec tgrst; + gp_Vec2d tg2drst; + Standard_Real ray; + Standard_Real dray; + Standard_Integer choix; + gp_Pnt ptgui; + gp_Vec d1gui; + gp_Vec d2gui; + gp_Vec nplan; + Standard_Real normtg; + Standard_Real theD; + Handle(Adaptor3d_Surface) surfref; + Handle(Adaptor2d_Curve2d) rstref; + Standard_Real maxang; + Standard_Real minang; + Standard_Real distmin; + BlendFunc_SectionShape mySShape; Convert_ParameterisationType myTConv; - Handle(Law_Function) tevol; - Handle(Law_Function) fevol; - Standard_Real sg1; - - + Handle(Law_Function) tevol; + Handle(Law_Function) fevol; + Standard_Real sg1; }; - - - - - - #endif // _BRepBlend_SurfRstEvolRad_HeaderFile diff --git a/opencascade/BRepBlend_SurfRstLineBuilder.hxx b/opencascade/BRepBlend_SurfRstLineBuilder.hxx index 3bf200950..f5d526e1b 100644 --- a/opencascade/BRepBlend_SurfRstLineBuilder.hxx +++ b/opencascade/BRepBlend_SurfRstLineBuilder.hxx @@ -62,94 +62,141 @@ class BRepBlend_Extremity; //! guaranteed, the criteria of correct repartition of sections //! before smoothing are not respected. The resulting Line //! is f(t) oriented. -class BRepBlend_SurfRstLineBuilder +class BRepBlend_SurfRstLineBuilder { public: - DEFINE_STANDARD_ALLOC - - Standard_EXPORT BRepBlend_SurfRstLineBuilder(const Handle(Adaptor3d_Surface)& Surf1, const Handle(Adaptor3d_TopolTool)& Domain1, const Handle(Adaptor3d_Surface)& Surf2, const Handle(Adaptor2d_Curve2d)& Rst, const Handle(Adaptor3d_TopolTool)& Domain2); - - Standard_EXPORT void Perform (Blend_SurfRstFunction& Func, Blend_FuncInv& Finv, Blend_SurfPointFuncInv& FinvP, Blend_SurfCurvFuncInv& FinvC, const Standard_Real Pdep, const Standard_Real Pmax, const Standard_Real MaxStep, const Standard_Real Tol3d, const Standard_Real Tol2d, const Standard_Real TolGuide, const math_Vector& Soldep, const Standard_Real Fleche, const Standard_Boolean Appro = Standard_False); - - Standard_EXPORT Standard_Boolean PerformFirstSection (Blend_SurfRstFunction& Func, Blend_FuncInv& Finv, Blend_SurfPointFuncInv& FinvP, Blend_SurfCurvFuncInv& FinvC, const Standard_Real Pdep, const Standard_Real Pmax, const math_Vector& Soldep, const Standard_Real Tol3d, const Standard_Real Tol2d, const Standard_Real TolGuide, const Standard_Boolean RecRst, const Standard_Boolean RecP, const Standard_Boolean RecS, Standard_Real& Psol, math_Vector& ParSol); - - Standard_EXPORT Standard_Boolean Complete (Blend_SurfRstFunction& Func, Blend_FuncInv& Finv, Blend_SurfPointFuncInv& FinvP, Blend_SurfCurvFuncInv& FinvC, const Standard_Real Pmin); - - Standard_EXPORT Standard_Integer ArcToRecadre (const math_Vector& Sol, const Standard_Integer PrevIndex, gp_Pnt2d& pt2d, gp_Pnt2d& lastpt2d, Standard_Real& ponarc); - - Standard_Boolean IsDone() const; - - const Handle(BRepBlend_Line)& Line() const; - - Standard_Boolean DecrochStart() const; - - Standard_Boolean DecrochEnd() const; - - - + Standard_EXPORT BRepBlend_SurfRstLineBuilder(const Handle(Adaptor3d_Surface)& Surf1, + const Handle(Adaptor3d_TopolTool)& Domain1, + const Handle(Adaptor3d_Surface)& Surf2, + const Handle(Adaptor2d_Curve2d)& Rst, + const Handle(Adaptor3d_TopolTool)& Domain2); + + Standard_EXPORT void Perform(Blend_SurfRstFunction& Func, + Blend_FuncInv& Finv, + Blend_SurfPointFuncInv& FinvP, + Blend_SurfCurvFuncInv& FinvC, + const Standard_Real Pdep, + const Standard_Real Pmax, + const Standard_Real MaxStep, + const Standard_Real Tol3d, + const Standard_Real Tol2d, + const Standard_Real TolGuide, + const math_Vector& Soldep, + const Standard_Real Fleche, + const Standard_Boolean Appro = Standard_False); + + Standard_EXPORT Standard_Boolean PerformFirstSection(Blend_SurfRstFunction& Func, + Blend_FuncInv& Finv, + Blend_SurfPointFuncInv& FinvP, + Blend_SurfCurvFuncInv& FinvC, + const Standard_Real Pdep, + const Standard_Real Pmax, + const math_Vector& Soldep, + const Standard_Real Tol3d, + const Standard_Real Tol2d, + const Standard_Real TolGuide, + const Standard_Boolean RecRst, + const Standard_Boolean RecP, + const Standard_Boolean RecS, + Standard_Real& Psol, + math_Vector& ParSol); + + Standard_EXPORT Standard_Boolean Complete(Blend_SurfRstFunction& Func, + Blend_FuncInv& Finv, + Blend_SurfPointFuncInv& FinvP, + Blend_SurfCurvFuncInv& FinvC, + const Standard_Real Pmin); + + Standard_EXPORT Standard_Integer ArcToRecadre(const math_Vector& Sol, + const Standard_Integer PrevIndex, + gp_Pnt2d& pt2d, + gp_Pnt2d& lastpt2d, + Standard_Real& ponarc); + + Standard_Boolean IsDone() const; + + const Handle(BRepBlend_Line)& Line() const; + + Standard_Boolean DecrochStart() const; + + Standard_Boolean DecrochEnd() const; protected: - - - - - private: - - - Standard_EXPORT void InternalPerform (Blend_SurfRstFunction& Func, Blend_FuncInv& Finv, Blend_SurfPointFuncInv& FinvP, Blend_SurfCurvFuncInv& FinvC, const Standard_Real Bound); - - Standard_EXPORT Standard_Boolean Recadre (Blend_SurfCurvFuncInv& FinvC, math_Vector& Solinv, Handle(Adaptor2d_Curve2d)& Arc, Standard_Boolean& IsVtx, Handle(Adaptor3d_HVertex)& Vtx); - - Standard_EXPORT Standard_Boolean Recadre (Blend_SurfRstFunction& Func, Blend_FuncInv& Finv, math_Vector& Solinv, Standard_Boolean& IsVtx, Handle(Adaptor3d_HVertex)& Vtx); - - Standard_EXPORT Standard_Boolean Recadre (Blend_SurfPointFuncInv& FinvP, math_Vector& Solinv, Standard_Boolean& IsVtx, Handle(Adaptor3d_HVertex)& Vtx); - - Standard_EXPORT void Transition (const Standard_Boolean OnFirst, const Handle(Adaptor2d_Curve2d)& Arc, const Standard_Real Param, IntSurf_Transition& TLine, IntSurf_Transition& TArc); - - Standard_EXPORT void MakeExtremity (BRepBlend_Extremity& Extrem, const Standard_Boolean OnFirst, const Handle(Adaptor2d_Curve2d)& Arc, const Standard_Real Param, const Standard_Boolean IsVtx, const Handle(Adaptor3d_HVertex)& Vtx); - - Standard_EXPORT Blend_Status CheckDeflectionOnSurf (const Blend_Point& CurPoint); - - Standard_EXPORT Blend_Status CheckDeflectionOnRst (const Blend_Point& CurPoint); - - Standard_EXPORT Blend_Status TestArret (Blend_SurfRstFunction& Func, const Standard_Boolean TestDeflection, const Blend_Status State); - - Standard_EXPORT Standard_Boolean CheckInside (Blend_SurfRstFunction& Func, TopAbs_State& SituOnC, TopAbs_State& SituOnS, Standard_Boolean& Decroch); - - - Standard_Boolean done; - Handle(BRepBlend_Line) line; - math_Vector sol; - Handle(Adaptor3d_Surface) surf1; + Standard_EXPORT void InternalPerform(Blend_SurfRstFunction& Func, + Blend_FuncInv& Finv, + Blend_SurfPointFuncInv& FinvP, + Blend_SurfCurvFuncInv& FinvC, + const Standard_Real Bound); + + Standard_EXPORT Standard_Boolean Recadre(Blend_SurfCurvFuncInv& FinvC, + math_Vector& Solinv, + Handle(Adaptor2d_Curve2d)& Arc, + Standard_Boolean& IsVtx, + Handle(Adaptor3d_HVertex)& Vtx); + + Standard_EXPORT Standard_Boolean Recadre(Blend_SurfRstFunction& Func, + Blend_FuncInv& Finv, + math_Vector& Solinv, + Standard_Boolean& IsVtx, + Handle(Adaptor3d_HVertex)& Vtx); + + Standard_EXPORT Standard_Boolean Recadre(Blend_SurfPointFuncInv& FinvP, + math_Vector& Solinv, + Standard_Boolean& IsVtx, + Handle(Adaptor3d_HVertex)& Vtx); + + Standard_EXPORT void Transition(const Standard_Boolean OnFirst, + const Handle(Adaptor2d_Curve2d)& Arc, + const Standard_Real Param, + IntSurf_Transition& TLine, + IntSurf_Transition& TArc); + + Standard_EXPORT void MakeExtremity(BRepBlend_Extremity& Extrem, + const Standard_Boolean OnFirst, + const Handle(Adaptor2d_Curve2d)& Arc, + const Standard_Real Param, + const Standard_Boolean IsVtx, + const Handle(Adaptor3d_HVertex)& Vtx); + + Standard_EXPORT Blend_Status CheckDeflectionOnSurf(const Blend_Point& CurPoint); + + Standard_EXPORT Blend_Status CheckDeflectionOnRst(const Blend_Point& CurPoint); + + Standard_EXPORT Blend_Status TestArret(Blend_SurfRstFunction& Func, + const Standard_Boolean TestDeflection, + const Blend_Status State); + + Standard_EXPORT Standard_Boolean CheckInside(Blend_SurfRstFunction& Func, + TopAbs_State& SituOnC, + TopAbs_State& SituOnS, + Standard_Boolean& Decroch); + + Standard_Boolean done; + Handle(BRepBlend_Line) line; + math_Vector sol; + Handle(Adaptor3d_Surface) surf1; Handle(Adaptor3d_TopolTool) domain1; - Handle(Adaptor3d_Surface) surf2; - Handle(Adaptor2d_Curve2d) rst; + Handle(Adaptor3d_Surface) surf2; + Handle(Adaptor2d_Curve2d) rst; Handle(Adaptor3d_TopolTool) domain2; - Standard_Real tolpoint3d; - Standard_Real tolpoint2d; - Standard_Real tolgui; - Standard_Real pasmax; - Standard_Real fleche; - Standard_Real param; - Blend_Point previousP; - Standard_Boolean rebrou; - Standard_Boolean iscomplete; - Standard_Boolean comptra; - Standard_Real sens; - Standard_Boolean decrochdeb; - Standard_Boolean decrochfin; - - + Standard_Real tolpoint3d; + Standard_Real tolpoint2d; + Standard_Real tolgui; + Standard_Real pasmax; + Standard_Real fleche; + Standard_Real param; + Blend_Point previousP; + Standard_Boolean rebrou; + Standard_Boolean iscomplete; + Standard_Boolean comptra; + Standard_Real sens; + Standard_Boolean decrochdeb; + Standard_Boolean decrochfin; }; - #include - - - - #endif // _BRepBlend_SurfRstLineBuilder_HeaderFile diff --git a/opencascade/BRepBlend_SurfRstLineBuilder.lxx b/opencascade/BRepBlend_SurfRstLineBuilder.lxx index 7af29bc70..64fc8109b 100644 --- a/opencascade/BRepBlend_SurfRstLineBuilder.lxx +++ b/opencascade/BRepBlend_SurfRstLineBuilder.lxx @@ -15,9 +15,10 @@ // commercial license or contractual agreement. #include + //======================================================================= -//function : IsDone -//purpose : +// function : IsDone +// purpose : //======================================================================= inline Standard_Boolean BRepBlend_SurfRstLineBuilder::IsDone() const @@ -26,19 +27,22 @@ inline Standard_Boolean BRepBlend_SurfRstLineBuilder::IsDone() const } //======================================================================= -//function : Line -//purpose : +// function : Line +// purpose : //======================================================================= inline const Handle(BRepBlend_Line)& BRepBlend_SurfRstLineBuilder::Line() const { - if (!done) {throw StdFail_NotDone();} + if (!done) + { + throw StdFail_NotDone(); + } return line; } //======================================================================= -//function : DecrochStart -//purpose : +// function : DecrochStart +// purpose : //======================================================================= inline Standard_Boolean BRepBlend_SurfRstLineBuilder::DecrochStart() const @@ -46,10 +50,9 @@ inline Standard_Boolean BRepBlend_SurfRstLineBuilder::DecrochStart() const return decrochdeb; } - //======================================================================= -//function : DecrochEnd -//purpose : +// function : DecrochEnd +// purpose : //======================================================================= inline Standard_Boolean BRepBlend_SurfRstLineBuilder::DecrochEnd() const diff --git a/opencascade/BRepBlend_Walking.hxx b/opencascade/BRepBlend_Walking.hxx index 23d718ec9..71e85d27a 100644 --- a/opencascade/BRepBlend_Walking.hxx +++ b/opencascade/BRepBlend_Walking.hxx @@ -1,7 +1,5 @@ -// Created on: 1993-12-06 -// Created by: Jacques GOUSSARD // Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS +// Copyright (c) 1999-2024 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // @@ -18,13 +16,14 @@ #define _BRepBlend_Walking_HeaderFile #include +#include #include #include #include -#include #include -#include +#include #include +#include class BRepBlend_Line; class Adaptor3d_TopolTool; @@ -43,183 +42,178 @@ class gp_Pnt; class gp_Pnt2d; class IntSurf_Transition; -class BRepBlend_Walking +class BRepBlend_Walking { public: - DEFINE_STANDARD_ALLOC - - Standard_EXPORT BRepBlend_Walking(const Handle(Adaptor3d_Surface)& Surf1, const Handle(Adaptor3d_Surface)& Surf2, const Handle(Adaptor3d_TopolTool)& Domain1, const Handle(Adaptor3d_TopolTool)& Domain2, const Handle(ChFiDS_ElSpine)& HGuide); - - //! To define different domains for control and clipping. - Standard_EXPORT void SetDomainsToRecadre (const Handle(Adaptor3d_TopolTool)& RecDomain1, const Handle(Adaptor3d_TopolTool)& RecDomain2); - - //! To define singular points computed before walking. - Standard_EXPORT void AddSingularPoint (const Blend_Point& P); - - Standard_EXPORT void Perform (Blend_Function& F, Blend_FuncInv& FInv, const Standard_Real Pdep, const Standard_Real Pmax, const Standard_Real MaxStep, const Standard_Real Tol3d, const Standard_Real TolGuide, const math_Vector& Soldep, const Standard_Real Fleche, const Standard_Boolean Appro = Standard_False); - - Standard_EXPORT Standard_Boolean PerformFirstSection (Blend_Function& F, const Standard_Real Pdep, math_Vector& ParDep, const Standard_Real Tol3d, const Standard_Real TolGuide, TopAbs_State& Pos1, TopAbs_State& Pos2); - - Standard_EXPORT Standard_Boolean PerformFirstSection (Blend_Function& F, Blend_FuncInv& FInv, const Standard_Real Pdep, const Standard_Real Pmax, const math_Vector& ParDep, const Standard_Real Tol3d, const Standard_Real TolGuide, const Standard_Boolean RecOnS1, const Standard_Boolean RecOnS2, Standard_Real& Psol, math_Vector& ParSol); - - Standard_EXPORT Standard_Boolean Continu (Blend_Function& F, Blend_FuncInv& FInv, const Standard_Real P); - - Standard_EXPORT Standard_Boolean Continu (Blend_Function& F, Blend_FuncInv& FInv, const Standard_Real P, const Standard_Boolean OnS1); - - Standard_EXPORT Standard_Boolean Complete (Blend_Function& F, Blend_FuncInv& FInv, const Standard_Real Pmin); - - Standard_EXPORT void ClassificationOnS1 (const Standard_Boolean C); - - Standard_EXPORT void ClassificationOnS2 (const Standard_Boolean C); - - Standard_EXPORT void Check2d (const Standard_Boolean C); - - Standard_EXPORT void Check (const Standard_Boolean C); - - Standard_Boolean TwistOnS1() const; - - Standard_Boolean TwistOnS2() const; - - Standard_Boolean IsDone() const; - - const Handle(BRepBlend_Line)& Line() const; - - - - -protected: - - + Standard_EXPORT BRepBlend_Walking(const Handle(Adaptor3d_Surface)& Surf1, + const Handle(Adaptor3d_Surface)& Surf2, + const Handle(Adaptor3d_TopolTool)& Domain1, + const Handle(Adaptor3d_TopolTool)& Domain2, + const Handle(ChFiDS_ElSpine)& HGuide); + //! To define different domains for control and clipping. + Standard_EXPORT void SetDomainsToRecadre(const Handle(Adaptor3d_TopolTool)& RecDomain1, + const Handle(Adaptor3d_TopolTool)& RecDomain2); + //! To define singular points computed before walking. + Standard_EXPORT void AddSingularPoint(const Blend_Point& P); + + Standard_EXPORT void Perform(Blend_Function& F, + Blend_FuncInv& FInv, + const Standard_Real Pdep, + const Standard_Real Pmax, + const Standard_Real MaxStep, + const Standard_Real Tol3d, + const Standard_Real TolGuide, + const math_Vector& Soldep, + const Standard_Real Fleche, + const Standard_Boolean Appro = Standard_False); + + Standard_EXPORT Standard_Boolean PerformFirstSection(Blend_Function& F, + const Standard_Real Pdep, + math_Vector& ParDep, + const Standard_Real Tol3d, + const Standard_Real TolGuide, + TopAbs_State& Pos1, + TopAbs_State& Pos2); + + Standard_EXPORT Standard_Boolean PerformFirstSection(Blend_Function& F, + Blend_FuncInv& FInv, + const Standard_Real Pdep, + const Standard_Real Pmax, + const math_Vector& ParDep, + const Standard_Real Tol3d, + const Standard_Real TolGuide, + const Standard_Boolean RecOnS1, + const Standard_Boolean RecOnS2, + Standard_Real& Psol, + math_Vector& ParSol); + + Standard_EXPORT Standard_Boolean Continu(Blend_Function& F, + Blend_FuncInv& FInv, + const Standard_Real P); + + Standard_EXPORT Standard_Boolean Continu(Blend_Function& F, + Blend_FuncInv& FInv, + const Standard_Real P, + const Standard_Boolean OnS1); + + Standard_EXPORT Standard_Boolean Complete(Blend_Function& F, + Blend_FuncInv& FInv, + const Standard_Real Pmin); + + Standard_EXPORT void ClassificationOnS1(const Standard_Boolean C); + + Standard_EXPORT void ClassificationOnS2(const Standard_Boolean C); + + Standard_EXPORT void Check2d(const Standard_Boolean C); + + Standard_EXPORT void Check(const Standard_Boolean C); + + inline Standard_Boolean TwistOnS1() const { return twistflag1; } + + inline Standard_Boolean TwistOnS2() const { return twistflag2; } + + inline Standard_Boolean IsDone() const { return done; } + + inline const Handle(BRepBlend_Line)& Line() const + { + if (!done) + { + throw StdFail_NotDone(); + } + return line; + } private: - - - Standard_EXPORT void InternalPerform (Blend_Function& F, Blend_FuncInv& FInv, const Standard_Real Bound); - - Standard_EXPORT Standard_Boolean CorrectExtremityOnOneRst (const Standard_Integer IndexOfRst, const Standard_Real theU, const Standard_Real theV, const Standard_Real theParam, const gp_Pnt& thePntOnRst, Standard_Real& NewU, Standard_Real& NewV, gp_Pnt& NewPoint, Standard_Real& NewParam) const; - - Standard_EXPORT Standard_Integer ArcToRecadre (const Standard_Boolean OnFirst, const math_Vector& Sol, const Standard_Integer PrevIndex, gp_Pnt2d& lpt2d, gp_Pnt2d& pt2d, Standard_Real& ponarc); - - Standard_EXPORT Standard_Boolean Recadre (Blend_FuncInv& FInv, const Standard_Boolean OnFirst, const math_Vector& Sol, math_Vector& Solrst, Standard_Integer& Indexsol, Standard_Boolean& IsVtx, Handle(Adaptor3d_HVertex)& Vtx, const Standard_Real Extrap = 0.0); - - Standard_EXPORT void Transition (const Standard_Boolean OnFirst, const Handle(Adaptor2d_Curve2d)& A, const Standard_Real Param, IntSurf_Transition& TLine, IntSurf_Transition& TArc); - - Standard_EXPORT void MakeExtremity (BRepBlend_Extremity& Extrem, const Standard_Boolean OnFirst, const Standard_Integer Index, const Standard_Real Param, const Standard_Boolean IsVtx, const Handle(Adaptor3d_HVertex)& Vtx); - - Standard_EXPORT void MakeSingularExtremity (BRepBlend_Extremity& Extrem, const Standard_Boolean OnFirst, const Handle(Adaptor3d_HVertex)& Vtx); - - Standard_EXPORT Blend_Status CheckDeflection (const Standard_Boolean OnFirst, const Blend_Point& CurPoint); - - Standard_EXPORT Blend_Status TestArret (Blend_Function& F, const Blend_Status State, const Standard_Boolean TestDeflection = Standard_True, const Standard_Boolean TestSolution = Standard_True, const Standard_Boolean TestLengthStep = Standard_False); - - - Blend_Point previousP; - Handle(BRepBlend_Line) line; - math_Vector sol; - Blend_SequenceOfPoint jalons; - Handle(Adaptor3d_Surface) surf1; - Handle(Adaptor3d_Surface) surf2; + Standard_EXPORT void InternalPerform(Blend_Function& F, + Blend_FuncInv& FInv, + const Standard_Real Bound); + + Standard_EXPORT Standard_Boolean CorrectExtremityOnOneRst(const Standard_Integer IndexOfRst, + const Standard_Real theU, + const Standard_Real theV, + const Standard_Real theParam, + const gp_Pnt& thePntOnRst, + Standard_Real& NewU, + Standard_Real& NewV, + gp_Pnt& NewPoint, + Standard_Real& NewParam) const; + + Standard_EXPORT Standard_Integer ArcToRecadre(const Standard_Boolean OnFirst, + const math_Vector& Sol, + const Standard_Integer PrevIndex, + gp_Pnt2d& lpt2d, + gp_Pnt2d& pt2d, + Standard_Real& ponarc); + + Standard_EXPORT Standard_Boolean Recadre(Blend_FuncInv& FInv, + const Standard_Boolean OnFirst, + const math_Vector& Sol, + math_Vector& Solrst, + Standard_Integer& Indexsol, + Standard_Boolean& IsVtx, + Handle(Adaptor3d_HVertex)& Vtx, + const Standard_Real Extrap = 0.0); + + Standard_EXPORT void Transition(const Standard_Boolean OnFirst, + const Handle(Adaptor2d_Curve2d)& A, + const Standard_Real Param, + IntSurf_Transition& TLine, + IntSurf_Transition& TArc); + + Standard_EXPORT void MakeExtremity(BRepBlend_Extremity& Extrem, + const Standard_Boolean OnFirst, + const Standard_Integer Index, + const Standard_Real Param, + const Standard_Boolean IsVtx, + const Handle(Adaptor3d_HVertex)& Vtx); + + Standard_EXPORT void MakeSingularExtremity(BRepBlend_Extremity& Extrem, + const Standard_Boolean OnFirst, + const Handle(Adaptor3d_HVertex)& Vtx); + + Standard_EXPORT Blend_Status CheckDeflection(const Standard_Boolean OnFirst, + const Blend_Point& CurPoint); + + Standard_EXPORT Blend_Status TestArret(Blend_Function& F, + const Blend_Status State, + const Standard_Boolean TestDeflection = Standard_True, + const Standard_Boolean TestSolution = Standard_True, + const Standard_Boolean TestLengthStep = Standard_False); + + Blend_Point previousP; + Handle(BRepBlend_Line) line; + math_Vector sol; + Blend_SequenceOfPoint jalons; + Handle(Adaptor3d_Surface) surf1; + Handle(Adaptor3d_Surface) surf2; Handle(Adaptor3d_TopolTool) domain1; Handle(Adaptor3d_TopolTool) domain2; Handle(Adaptor3d_TopolTool) recdomain1; Handle(Adaptor3d_TopolTool) recdomain2; - Handle(ChFiDS_ElSpine) hguide; - Standard_Boolean ToCorrectOnRst1; - Standard_Boolean ToCorrectOnRst2; - Standard_Real CorrectedParam; - Standard_Real tolpoint3d; - Standard_Real tolgui; - Standard_Real pasmax; - Standard_Real fleche; - Standard_Real param; - Standard_Real sens; - Standard_Boolean done; - Standard_Boolean rebrou; - Standard_Boolean iscomplete; - Standard_Boolean comptra; - Standard_Boolean clasonS1; - Standard_Boolean clasonS2; - Standard_Boolean check2d; - Standard_Boolean check; - Standard_Boolean twistflag1; - Standard_Boolean twistflag2; - - + Handle(ChFiDS_ElSpine) hguide; + Standard_Boolean ToCorrectOnRst1; + Standard_Boolean ToCorrectOnRst2; + Standard_Real CorrectedParam; + Standard_Real tolpoint3d; + Standard_Real tolgui; + Standard_Real pasmax; + Standard_Real fleche; + Standard_Real param; + Standard_Real sens; + Standard_Boolean done; + Standard_Boolean rebrou; + Standard_Boolean iscomplete; + Standard_Boolean comptra; + Standard_Boolean clasonS1; + Standard_Boolean clasonS2; + Standard_Boolean check2d; + Standard_Boolean check; + Standard_Boolean twistflag1; + Standard_Boolean twistflag2; }; -#define TheVertex Handle(Adaptor3d_HVertex) -#define TheVertex_hxx -#define TheArc Handle(Adaptor2d_Curve2d) -#define TheArc_hxx -#define TheSurface Handle(Adaptor3d_Surface) -#define TheSurface_hxx -#define TheCurve Handle(Adaptor3d_Curve) -#define TheCurve_hxx -#define TheVertexTool Standard_Integer -#define TheVertexTool_hxx -#define TheArcTool BRepBlend_HCurve2dTool -#define TheArcTool_hxx -#define TheSurfaceTool Adaptor3d_HSurfaceTool -#define TheSurfaceTool_hxx -#define TheCurveTool BRepBlend_HCurveTool -#define TheCurveTool_hxx -#define Handle_TheTopolTool Handle(Adaptor3d_TopolTool) -#define TheTopolTool Adaptor3d_TopolTool -#define TheTopolTool_hxx -#define TheBlendTool BRepBlend_BlendTool -#define TheBlendTool_hxx -#define ThePointOnRst BRepBlend_PointOnRst -#define ThePointOnRst_hxx -#define TheSeqPointOnRst BRepBlend_SequenceOfPointOnRst -#define TheSeqPointOnRst_hxx -#define TheExtremity BRepBlend_Extremity -#define TheExtremity_hxx -#define Handle_TheLine Handle(BRepBlend_Line) -#define TheLine BRepBlend_Line -#define TheLine_hxx -#define Blend_Walking BRepBlend_Walking -#define Blend_Walking_hxx - -#include - -#undef TheVertex -#undef TheVertex_hxx -#undef TheArc -#undef TheArc_hxx -#undef TheSurface -#undef TheSurface_hxx -#undef TheCurve -#undef TheCurve_hxx -#undef TheVertexTool -#undef TheVertexTool_hxx -#undef TheArcTool -#undef TheArcTool_hxx -#undef TheSurfaceTool -#undef TheSurfaceTool_hxx -#undef TheCurveTool -#undef TheCurveTool_hxx -#undef Handle_TheTopolTool -#undef TheTopolTool -#undef TheTopolTool_hxx -#undef TheBlendTool -#undef TheBlendTool_hxx -#undef ThePointOnRst -#undef ThePointOnRst_hxx -#undef TheSeqPointOnRst -#undef TheSeqPointOnRst_hxx -#undef TheExtremity -#undef TheExtremity_hxx -#undef Handle_TheLine -#undef TheLine -#undef TheLine_hxx -#undef Blend_Walking -#undef Blend_Walking_hxx - - - - #endif // _BRepBlend_Walking_HeaderFile diff --git a/opencascade/BRepBndLib.hxx b/opencascade/BRepBndLib.hxx index c44457f5f..086ed5016 100644 --- a/opencascade/BRepBndLib.hxx +++ b/opencascade/BRepBndLib.hxx @@ -24,17 +24,14 @@ class TopoDS_Shape; class Bnd_Box; class Bnd_OBB; - //! This package provides the bounding boxes for curves //! and surfaces from BRepAdaptor. //! Functions to add a topological shape to a bounding box -class BRepBndLib +class BRepBndLib { public: - DEFINE_STANDARD_ALLOC - //! Adds the shape S to the bounding box B. //! More precisely are successively added to B: //! - each face of S; the triangulation of the face is used if it exists, @@ -52,8 +49,10 @@ public: //! - This algorithm is time consuming if triangulation has not //! been inserted inside the data structure of the shape S. //! - The resulting bounding box may be somewhat larger than the object. - Standard_EXPORT static void Add (const TopoDS_Shape& S, Bnd_Box& B, const Standard_Boolean useTriangulation = Standard_True); - + Standard_EXPORT static void Add(const TopoDS_Shape& S, + Bnd_Box& B, + const Standard_Boolean useTriangulation = Standard_True); + //! Adds the shape S to the bounding box B. //! This is a quick algorithm but only works if the shape S is //! composed of polygonal planar faces, as is the case if S is @@ -65,21 +64,21 @@ public: //! tolerance value of the sub-shapes as is the case with the //! Add function. So the added part of the resulting bounding //! box is closer to the shape S. - Standard_EXPORT static void AddClose (const TopoDS_Shape& S, Bnd_Box& B); + Standard_EXPORT static void AddClose(const TopoDS_Shape& S, Bnd_Box& B); //! Adds the shape S to the bounding box B. //! This algorithm builds precise bounding box, //! which differs from exact geometry boundaries of shape only on shape entities tolerances - //! Algorithm is the same as for method Add(..), but uses more precise methods for building boxes + //! Algorithm is the same as for method Add(..), but uses more precise methods for building boxes //! for geometry objects. - //! If useShapeTolerance = True, bounding box is enlardged by shape tolerances and - //! these tolerances are used for numerical methods of bounding box size calculations, + //! If useShapeTolerance = True, bounding box is enlardged by shape tolerances and + //! these tolerances are used for numerical methods of bounding box size calculations, //! otherwise bounding box is built according to sizes of uderlined geometrical entities, //! numerical calculation use tolerance Precision::Confusion(). - Standard_EXPORT static void AddOptimal (const TopoDS_Shape& S, Bnd_Box& B, - const Standard_Boolean useTriangulation = Standard_True, - const Standard_Boolean useShapeTolerance = Standard_False); - + Standard_EXPORT static void AddOptimal(const TopoDS_Shape& S, + Bnd_Box& B, + const Standard_Boolean useTriangulation = Standard_True, + const Standard_Boolean useShapeTolerance = Standard_False); //! Computes the Oriented Bounding box for the shape . //! Two independent methods of computation are implemented: @@ -88,36 +87,20 @@ public: //! The second method is based on use of inertia axes and is called //! if use of the first method is impossible. //! If theIsTriangulationUsed == FALSE then the triangulation will - //! be ignored at all. + //! be ignored at all. //! If theIsShapeToleranceUsed == TRUE then resulting box will be //! extended on the tolerance of the shape. //! theIsOptimal flag defines whether to look for the more tight //! OBB for the cost of performance or not. - Standard_EXPORT static - void AddOBB(const TopoDS_Shape& theS, - Bnd_OBB& theOBB, - const Standard_Boolean theIsTriangulationUsed = Standard_True, - const Standard_Boolean theIsOptimal = Standard_False, - const Standard_Boolean theIsShapeToleranceUsed = Standard_True); + Standard_EXPORT static void AddOBB( + const TopoDS_Shape& theS, + Bnd_OBB& theOBB, + const Standard_Boolean theIsTriangulationUsed = Standard_True, + const Standard_Boolean theIsOptimal = Standard_False, + const Standard_Boolean theIsShapeToleranceUsed = Standard_True); protected: - - - - - private: - - - - - }; - - - - - - #endif // _BRepBndLib_HeaderFile diff --git a/opencascade/BRepBuilderAPI.hxx b/opencascade/BRepBuilderAPI.hxx index 91092301b..b018455ec 100644 --- a/opencascade/BRepBuilderAPI.hxx +++ b/opencascade/BRepBuilderAPI.hxx @@ -24,7 +24,6 @@ #include class Geom_Plane; - //! The BRepBuilderAPI package provides an Application //! Programming Interface for the BRep topology data //! structure. @@ -80,29 +79,26 @@ class Geom_Plane; //! the NotDone error. When Done is false on a command //! the error description can be asked to the command. //! -//! In theory the comands can be called with any -//! arguments, argument checking is performed by the +//! In theory the commands can be called with any +//! arguments, argument checking is performed by the //! command. -class BRepBuilderAPI +class BRepBuilderAPI { public: - DEFINE_STANDARD_ALLOC - //! Sets the current plane. - Standard_EXPORT static void Plane (const Handle(Geom_Plane)& P); - + Standard_EXPORT static void Plane(const Handle(Geom_Plane)& P); + //! Returns the current plane. Standard_EXPORT static const Handle(Geom_Plane)& Plane(); - + //! Sets the default precision. The current Precision //! is returned. - Standard_EXPORT static void Precision (const Standard_Real P); - + Standard_EXPORT static void Precision(const Standard_Real P); + //! Returns the default precision. Standard_EXPORT static Standard_Real Precision(); - }; #endif // _BRepBuilderAPI_HeaderFile diff --git a/opencascade/BRepBuilderAPI_BndBoxTreeSelector.hxx b/opencascade/BRepBuilderAPI_BndBoxTreeSelector.hxx index 901e17a7e..a2bf5718d 100644 --- a/opencascade/BRepBuilderAPI_BndBoxTreeSelector.hxx +++ b/opencascade/BRepBuilderAPI_BndBoxTreeSelector.hxx @@ -20,12 +20,12 @@ #include #include -typedef NCollection_UBTree BRepBuilderAPI_BndBoxTree; +typedef NCollection_UBTree BRepBuilderAPI_BndBoxTree; //======================================================================= -//! Class BRepBuilderAPI_BndBoxTreeSelector +//! Class BRepBuilderAPI_BndBoxTreeSelector //! derived from UBTree::Selector -//! This class is used to select overlapping boxes, stored in +//! This class is used to select overlapping boxes, stored in //! NCollection::UBTree; contains methods to maintain the selection //! condition and to retrieve selected objects after search. //======================================================================= @@ -34,48 +34,39 @@ class BRepBuilderAPI_BndBoxTreeSelector : public BRepBuilderAPI_BndBoxTree::Sele { public: //! Constructor; calls the base class constructor - BRepBuilderAPI_BndBoxTreeSelector() : BRepBuilderAPI_BndBoxTree::Selector() {} + BRepBuilderAPI_BndBoxTreeSelector() + : BRepBuilderAPI_BndBoxTree::Selector() + { + } //! Implementation of rejection method //! @return - //! True if the bounding box does not intersect with the current - Standard_Boolean Reject (const Bnd_Box& theBox) const - { - return (myBox.IsOut (theBox)); - } + //! True if the bounding box does not intersect with the current + Standard_Boolean Reject(const Bnd_Box& theBox) const { return (myBox.IsOut(theBox)); } //! Implementation of acceptance method //! This method is called when the bounding box intersect with the current. //! It stores the object - the index of box in the list of accepted objects. //! @return //! True, because the object is accepted - Standard_Boolean Accept (const Standard_Integer& theObj) + Standard_Boolean Accept(const Standard_Integer& theObj) { - myResInd.Append (theObj); + myResInd.Append(theObj); return Standard_True; } //! Clear the list of intersecting boxes - void ClearResList() - { - myResInd.Clear(); - } + void ClearResList() { myResInd.Clear(); } //! Set current box to search for overlapping with him - void SetCurrent (const Bnd_Box& theBox) - { - myBox = theBox; - } + void SetCurrent(const Bnd_Box& theBox) { myBox = theBox; } //! Get list of indexes of boxes intersecting with the current box - const TColStd_ListOfInteger& ResInd() - { - return myResInd; - } + const TColStd_ListOfInteger& ResInd() { return myResInd; } private: TColStd_ListOfInteger myResInd; - Bnd_Box myBox; + Bnd_Box myBox; }; #endif diff --git a/opencascade/BRepBuilderAPI_Collect.hxx b/opencascade/BRepBuilderAPI_Collect.hxx index 9183e23b3..bbbd96c31 100644 --- a/opencascade/BRepBuilderAPI_Collect.hxx +++ b/opencascade/BRepBuilderAPI_Collect.hxx @@ -26,54 +26,31 @@ #include class BRepBuilderAPI_MakeShape; - - -class BRepBuilderAPI_Collect +class BRepBuilderAPI_Collect { public: - DEFINE_STANDARD_ALLOC - Standard_EXPORT BRepBuilderAPI_Collect(); - - Standard_EXPORT void Add (const TopoDS_Shape& SI, BRepBuilderAPI_MakeShape& MKS); - - Standard_EXPORT void AddGenerated (const TopoDS_Shape& S, const TopoDS_Shape& Gen); - - Standard_EXPORT void AddModif (const TopoDS_Shape& S, const TopoDS_Shape& Mod); - - Standard_EXPORT void Filter (const TopoDS_Shape& SF); - - Standard_EXPORT const TopTools_DataMapOfShapeListOfShape& Modification() const; - - Standard_EXPORT const TopTools_DataMapOfShapeListOfShape& Generated() const; + Standard_EXPORT void Add(const TopoDS_Shape& SI, BRepBuilderAPI_MakeShape& MKS); + Standard_EXPORT void AddGenerated(const TopoDS_Shape& S, const TopoDS_Shape& Gen); + Standard_EXPORT void AddModif(const TopoDS_Shape& S, const TopoDS_Shape& Mod); -protected: - - + Standard_EXPORT void Filter(const TopoDS_Shape& SF); + Standard_EXPORT const TopTools_DataMapOfShapeListOfShape& Modification() const; + Standard_EXPORT const TopTools_DataMapOfShapeListOfShape& Generated() const; +protected: private: - - - - TopoDS_Shape myInitialShape; - TopTools_MapOfShape myDeleted; + TopoDS_Shape myInitialShape; + TopTools_MapOfShape myDeleted; TopTools_DataMapOfShapeListOfShape myMod; TopTools_DataMapOfShapeListOfShape myGen; - - }; - - - - - - #endif // _BRepBuilderAPI_Collect_HeaderFile diff --git a/opencascade/BRepBuilderAPI_Command.hxx b/opencascade/BRepBuilderAPI_Command.hxx index 6af627cd8..7094c06d9 100644 --- a/opencascade/BRepBuilderAPI_Command.hxx +++ b/opencascade/BRepBuilderAPI_Command.hxx @@ -23,7 +23,6 @@ #include - //! Root class for all commands in BRepBuilderAPI. //! //! Provides : @@ -33,50 +32,30 @@ //! * Catching of exceptions (not implemented). //! //! * Logging (not implemented). -class BRepBuilderAPI_Command +class BRepBuilderAPI_Command { public: - DEFINE_STANDARD_ALLOC - + Standard_EXPORT virtual ~BRepBuilderAPI_Command(); - + Standard_EXPORT virtual Standard_Boolean IsDone() const; - + //! Raises NotDone if done is false. Standard_EXPORT void Check() const; - - - protected: - - //! Set done to False. Standard_EXPORT BRepBuilderAPI_Command(); - + //! Set done to true. Standard_EXPORT void Done(); - + //! Set done to false. Standard_EXPORT void NotDone(); - - - private: - - - Standard_Boolean myDone; - - }; - - - - - - #endif // _BRepBuilderAPI_Command_HeaderFile diff --git a/opencascade/BRepBuilderAPI_Copy.hxx b/opencascade/BRepBuilderAPI_Copy.hxx index 640db82fb..e9c0e0880 100644 --- a/opencascade/BRepBuilderAPI_Copy.hxx +++ b/opencascade/BRepBuilderAPI_Copy.hxx @@ -29,34 +29,36 @@ class TopoDS_Shape; //! - defining the construction of a duplicate shape, //! - implementing the construction algorithm, and //! - consulting the result. -class BRepBuilderAPI_Copy : public BRepBuilderAPI_ModifyShape +class BRepBuilderAPI_Copy : public BRepBuilderAPI_ModifyShape { public: - DEFINE_STANDARD_ALLOC - + //! Constructs an empty copy framework. Use the function //! Perform to copy shapes. Standard_EXPORT BRepBuilderAPI_Copy(); - + //! Constructs a copy framework and copies the shape S. //! Use the function Shape to access the result. - //! If copyMesh is True, triangulation contained in original shape will be + //! If copyMesh is True, triangulation contained in original shape will be //! copied along with geometry (by default, triangulation gets lost). - //! If copyGeom is False, only topological objects will be copied, while + //! If copyGeom is False, only topological objects will be copied, while //! geometry and triangulation will be shared with original shape. //! Note: the constructed framework can be reused to copy //! other shapes: just specify them with the function Perform. - Standard_EXPORT BRepBuilderAPI_Copy(const TopoDS_Shape& S, const Standard_Boolean copyGeom = Standard_True, const Standard_Boolean copyMesh = Standard_False); - + Standard_EXPORT BRepBuilderAPI_Copy(const TopoDS_Shape& S, + const Standard_Boolean copyGeom = Standard_True, + const Standard_Boolean copyMesh = Standard_False); + //! Copies the shape S. //! Use the function Shape to access the result. - //! If copyMesh is True, triangulation contained in original shape will be + //! If copyMesh is True, triangulation contained in original shape will be //! copied along with geometry (by default, triangulation gets lost). - //! If copyGeom is False, only topological objects will be copied, while + //! If copyGeom is False, only topological objects will be copied, while //! geometry and triangulation will be shared with original shape. - Standard_EXPORT void Perform (const TopoDS_Shape& S, const Standard_Boolean copyGeom = Standard_True, const Standard_Boolean copyMesh = Standard_False); - + Standard_EXPORT void Perform(const TopoDS_Shape& S, + const Standard_Boolean copyGeom = Standard_True, + const Standard_Boolean copyMesh = Standard_False); }; #endif // _BRepBuilderAPI_Copy_HeaderFile diff --git a/opencascade/BRepBuilderAPI_EdgeError.hxx b/opencascade/BRepBuilderAPI_EdgeError.hxx index c2d3a25cb..77dc41cac 100644 --- a/opencascade/BRepBuilderAPI_EdgeError.hxx +++ b/opencascade/BRepBuilderAPI_EdgeError.hxx @@ -43,13 +43,13 @@ //! of an edge without curve); gp::Resolution is used for the confusion test. enum BRepBuilderAPI_EdgeError { -BRepBuilderAPI_EdgeDone, -BRepBuilderAPI_PointProjectionFailed, -BRepBuilderAPI_ParameterOutOfRange, -BRepBuilderAPI_DifferentPointsOnClosedCurve, -BRepBuilderAPI_PointWithInfiniteParameter, -BRepBuilderAPI_DifferentsPointAndParameter, -BRepBuilderAPI_LineThroughIdenticPoints + BRepBuilderAPI_EdgeDone, + BRepBuilderAPI_PointProjectionFailed, + BRepBuilderAPI_ParameterOutOfRange, + BRepBuilderAPI_DifferentPointsOnClosedCurve, + BRepBuilderAPI_PointWithInfiniteParameter, + BRepBuilderAPI_DifferentsPointAndParameter, + BRepBuilderAPI_LineThroughIdenticPoints }; #endif // _BRepBuilderAPI_EdgeError_HeaderFile diff --git a/opencascade/BRepBuilderAPI_FaceError.hxx b/opencascade/BRepBuilderAPI_FaceError.hxx index b98edba4f..709699a20 100644 --- a/opencascade/BRepBuilderAPI_FaceError.hxx +++ b/opencascade/BRepBuilderAPI_FaceError.hxx @@ -32,11 +32,11 @@ //! The parameters given to limit the surface are out of its bounds. enum BRepBuilderAPI_FaceError { -BRepBuilderAPI_FaceDone, -BRepBuilderAPI_NoFace, -BRepBuilderAPI_NotPlanar, -BRepBuilderAPI_CurveProjectionFailed, -BRepBuilderAPI_ParametersOutOfRange + BRepBuilderAPI_FaceDone, + BRepBuilderAPI_NoFace, + BRepBuilderAPI_NotPlanar, + BRepBuilderAPI_CurveProjectionFailed, + BRepBuilderAPI_ParametersOutOfRange }; #endif // _BRepBuilderAPI_FaceError_HeaderFile diff --git a/opencascade/BRepBuilderAPI_FastSewing.hxx b/opencascade/BRepBuilderAPI_FastSewing.hxx index 5d9e548a6..371c783a5 100644 --- a/opencascade/BRepBuilderAPI_FastSewing.hxx +++ b/opencascade/BRepBuilderAPI_FastSewing.hxx @@ -29,7 +29,6 @@ #include #include - //! This class performs fast sewing of surfaces (faces). It supposes //! that all surfaces are finite and are naturally restricted by their bounds. //! Moreover, it supposes that stitched together surfaces have the same parameterization @@ -45,29 +44,28 @@ //! - retrieve the resulted shape class BRepBuilderAPI_FastSewing : public Standard_Transient { -public: +public: typedef unsigned int FS_VARStatuses; //! Enumeration of result statuses - //ATTENTION!!! If you add new status, please - // describe it in GetStatuses() method + // ATTENTION!!! If you add new status, please + // describe it in GetStatuses() method enum FS_Statuses { - FS_OK = 0x00000000, - FS_Degenerated = 0x00000001, - FS_FindVertexError = 0x00000002, - FS_FindEdgeError = 0x00000004, - FS_FaceWithNullSurface = 0x00000008, - FS_NotNaturalBoundsFace = 0x00000010, - FS_InfiniteSurface = 0x00000020, - FS_EmptyInput = 0x00000040, - FS_Exception = 0x00000080 + FS_OK = 0x00000000, + FS_Degenerated = 0x00000001, + FS_FindVertexError = 0x00000002, + FS_FindEdgeError = 0x00000004, + FS_FaceWithNullSurface = 0x00000008, + FS_NotNaturalBoundsFace = 0x00000010, + FS_InfiniteSurface = 0x00000020, + FS_EmptyInput = 0x00000040, + FS_Exception = 0x00000080 }; - //! Creates an object with tolerance of connexity Standard_EXPORT BRepBuilderAPI_FastSewing(const Standard_Real theTolerance = 1.0e-06); - + //! Adds faces of a shape Standard_EXPORT Standard_Boolean Add(const TopoDS_Shape& theShape); @@ -75,45 +73,36 @@ public: Standard_EXPORT Standard_Boolean Add(const Handle(Geom_Surface)& theSurface); //! Compute resulted shape - Standard_EXPORT void Perform (void) ; - + Standard_EXPORT void Perform(void); + //! Sets tolerance - void SetTolerance (const Standard_Real theToler) - { - myTolerance = theToler; - } - + void SetTolerance(const Standard_Real theToler) { myTolerance = theToler; } + //! Returns tolerance - Standard_Real GetTolerance() const - { - return myTolerance; - } + Standard_Real GetTolerance() const { return myTolerance; } //! Returns resulted shape - const TopoDS_Shape& GetResult() const - { - return myResShape; - } - + const TopoDS_Shape& GetResult() const { return myResShape; } + //! Returns list of statuses. Print message if theOS != 0 Standard_EXPORT FS_VARStatuses GetStatuses(Standard_OStream* const theOS = 0); - DEFINE_STANDARD_RTTIEXT(BRepBuilderAPI_FastSewing,Standard_Transient) + DEFINE_STANDARD_RTTIEXT(BRepBuilderAPI_FastSewing, Standard_Transient) protected: class NodeInspector; - Standard_EXPORT void FindVertexes(const Standard_Integer theSurfID, - NCollection_CellFilter& theCells); + Standard_EXPORT void FindVertexes(const Standard_Integer theSurfID, + NCollection_CellFilter& theCells); Standard_EXPORT void FindEdges(const Standard_Integer theSurfID); Standard_EXPORT void UpdateEdgeInfo(const Standard_Integer theIDPrevVertex, const Standard_Integer theIDCurrVertex, const Standard_Integer theFaceID, const Standard_Integer theIDCurvOnFace); - Standard_EXPORT void CreateNewEdge( const Standard_Integer theIDPrevVertex, - const Standard_Integer theIDCurrVertex, - const Standard_Integer theFaceID, - const Standard_Integer theIDCurvOnFace); + Standard_EXPORT void CreateNewEdge(const Standard_Integer theIDPrevVertex, + const Standard_Integer theIDCurrVertex, + const Standard_Integer theFaceID, + const Standard_Integer theIDCurvOnFace); Standard_EXPORT Standard_Real Compute3DRange(); @@ -129,12 +118,13 @@ protected: // Classes FS_Vertex, FS_Face and FS_Edge keep information about // relations between resulted members (e.g. which faces share this vertex? etc.) - + //! The struct corresponding to a vertex struct FS_Vertex { public: - FS_Vertex(): myID(-1){}; + FS_Vertex() + : myID(-1) {}; //! Creates topological member (vertex) void CreateTopologicalVertex(const Standard_Real theToler) @@ -142,9 +132,9 @@ protected: BRep_Builder aBuilder; aBuilder.MakeVertex(myTopoVert, myPnt, theToler); } - + //! Geometry point of this Vertex - gp_Pnt myPnt; + gp_Pnt myPnt; TopoDS_Vertex myTopoVert; //! List of faces and edges which share this vertex @@ -159,24 +149,26 @@ protected: //! The struct corresponding to an face struct FS_Face { - FS_Face(): myID(-1) + FS_Face() + : myID(-1) { for (Standard_Integer i = 0; i < 4; i++) { myVertices[i] = -1; - myEdges[i] = -1; + myEdges[i] = -1; } }; + //! Creates topological members (wire and face) void CreateTopologicalWire(const NCollection_Vector& theEdgeVec, - const Standard_Real theToler); + const Standard_Real theToler); void CreateTopologicalFace(); - + //! Sets vertex void SetVertex(const Standard_Integer thePlaceID, const Standard_Integer theVertID) { Standard_RangeError_Raise_if((thePlaceID < 0) || (thePlaceID > 3), - "FS_Face::SetVertex(): OUT of Range"); + "FS_Face::SetVertex(): OUT of Range"); myVertices[thePlaceID] = theVertID; } @@ -185,7 +177,7 @@ protected: void SetEdge(const Standard_Integer thePlaceID, const Standard_Integer theEdgeID) { Standard_RangeError_Raise_if((thePlaceID < 0) || (thePlaceID > 3), - "FS_Face::SetEdge(): OUT of Range"); + "FS_Face::SetEdge(): OUT of Range"); myEdges[thePlaceID] = theEdgeID; } @@ -210,36 +202,35 @@ protected: class FS_Edge { public: - FS_Edge(): myID(-1) + FS_Edge() + : myID(-1) { myVertices[0] = -1; myVertices[1] = -1; } - FS_Edge(const Standard_Integer theIDVert1, const Standard_Integer theIDVert2): myID(-1) + FS_Edge(const Standard_Integer theIDVert1, const Standard_Integer theIDVert2) + : myID(-1) { myVertices[0] = theIDVert1; myVertices[1] = theIDVert2; }; //! Creates topological member (TopoDS_Edge) - void CreateTopologicalEdge( const NCollection_Vector& theVertexVec, - const NCollection_Vector& theFaceVec, - const Standard_Real theTol); - + void CreateTopologicalEdge(const NCollection_Vector& theVertexVec, + const NCollection_Vector& theFaceVec, + const Standard_Real theTol); + //! Sets vertex void SetVertex(const Standard_Integer thePlaceID, const Standard_Integer theVertID) { Standard_RangeError_Raise_if((thePlaceID < 0) || (thePlaceID > 1), - "FS_Face::SetVertex(): OUT of Range"); + "FS_Face::SetVertex(): OUT of Range"); myVertices[thePlaceID] = theVertID; } - Standard_Boolean IsDegenerated() const - { - return (myVertices[0] == myVertices[1]); - } + Standard_Boolean IsDegenerated() const { return (myVertices[0] == myVertices[1]); } //! List of faces which are shared with this edge //! Value is the index of this shape in myFaceVec array @@ -250,37 +241,37 @@ protected: Standard_Integer myID; TopoDS_Edge myTopoEdge; + private: - //! Index of the vertex in myVertexVec array + //! Index of the vertex in myVertexVec array Standard_Integer myVertices[2]; }; //! This inspector will find a node nearest to the given point //! not far than on the given tolerance - class NodeInspector: public NCollection_CellFilter_InspectorXYZ + class NodeInspector : public NCollection_CellFilter_InspectorXYZ { public: - typedef Standard_Integer Target; + typedef Standard_Integer Target; NodeInspector(const NCollection_Vector& theVec, - const gp_Pnt& thePnt, const Standard_Real theTol); + const gp_Pnt& thePnt, + const Standard_Real theTol); - Standard_EXPORT NCollection_CellFilter_Action Inspect (const Target theId); + Standard_EXPORT NCollection_CellFilter_Action Inspect(const Target theId); - Target GetResult() - { - return myResID; - } + Target GetResult() { return myResID; } private: - NodeInspector& operator = (const NodeInspector&); + NodeInspector& operator=(const NodeInspector&); const NCollection_Vector& myVecOfVertexes; - gp_Pnt myPoint; - Standard_Real mySQToler; - Target myResID; - Standard_Boolean myIsFindingEnable; + gp_Pnt myPoint; + Standard_Real mySQToler; + Target myResID; + Standard_Boolean myIsFindingEnable; }; -private: + +private: TopoDS_Shape myResShape; // myFaceVec, myVertexVec and myEdgeVec lists are filled only once!!!!! diff --git a/opencascade/BRepBuilderAPI_FindPlane.hxx b/opencascade/BRepBuilderAPI_FindPlane.hxx index 8edc89db0..836207282 100644 --- a/opencascade/BRepBuilderAPI_FindPlane.hxx +++ b/opencascade/BRepBuilderAPI_FindPlane.hxx @@ -24,23 +24,20 @@ class Geom_Plane; class TopoDS_Shape; - //! Describes functions to find the plane in which the edges //! of a given shape are located. //! A FindPlane object provides a framework for: //! - extracting the edges of a given shape, //! - implementing the construction algorithm, and //! - consulting the result. -class BRepBuilderAPI_FindPlane +class BRepBuilderAPI_FindPlane { public: - DEFINE_STANDARD_ALLOC - //! Initializes an empty algorithm. The function Init is then used to define the shape. Standard_EXPORT BRepBuilderAPI_FindPlane(); - + //! Constructs the plane containing the edges of the shape S. //! A plane is built only if all the edges are within a distance //! of less than or equal to tolerance from a planar surface. @@ -50,7 +47,7 @@ public: //! Use the function Found to verify that a plane is built. //! The resulting plane is then retrieved using the function Plane. Standard_EXPORT BRepBuilderAPI_FindPlane(const TopoDS_Shape& S, const Standard_Real Tol = -1); - + //! Constructs the plane containing the edges of the shape S. //! A plane is built only if all the edges are within a distance //! of less than or equal to tolerance from a planar surface. @@ -59,40 +56,21 @@ public: //! - the largest of the tolerance values assigned to the individual edges of S. //! Use the function Found to verify that a plane is built. //! The resulting plane is then retrieved using the function Plane. - Standard_EXPORT void Init (const TopoDS_Shape& S, const Standard_Real Tol = -1); - + Standard_EXPORT void Init(const TopoDS_Shape& S, const Standard_Real Tol = -1); + //! Returns true if a plane containing the edges of the //! shape is found and built. Use the function Plane to consult the result. Standard_EXPORT Standard_Boolean Found() const; - + //! Returns the plane containing the edges of the shape. //! Warning //! Use the function Found to verify that the plane is built. If //! a plane is not found, Plane returns a null handle. Standard_EXPORT Handle(Geom_Plane) Plane() const; - - - protected: - - - - - private: - - - Handle(Geom_Plane) myPlane; - - }; - - - - - - #endif // _BRepBuilderAPI_FindPlane_HeaderFile diff --git a/opencascade/BRepBuilderAPI_GTransform.hxx b/opencascade/BRepBuilderAPI_GTransform.hxx index 63683575b..163463223 100644 --- a/opencascade/BRepBuilderAPI_GTransform.hxx +++ b/opencascade/BRepBuilderAPI_GTransform.hxx @@ -26,7 +26,6 @@ #include class TopoDS_Shape; - //! Geometric transformation on a shape. //! The transformation to be applied is defined as a gp_GTrsf //! transformation. It may be: @@ -49,18 +48,16 @@ class TopoDS_Shape; //! - defining the geometric transformation to be applied, //! - implementing the transformation algorithm, and //! - consulting the result. -class BRepBuilderAPI_GTransform : public BRepBuilderAPI_ModifyShape +class BRepBuilderAPI_GTransform : public BRepBuilderAPI_ModifyShape { public: - DEFINE_STANDARD_ALLOC - //! Constructs a framework for applying the geometric //! transformation T to a shape. Use the function //! Perform to define the shape to transform. Standard_EXPORT BRepBuilderAPI_GTransform(const gp_GTrsf& T); - + //! Constructs a framework for applying the geometric //! transformation T to a shape, and applies it to the shape S. //! - If the transformation T is direct and isometric (i.e. if @@ -74,8 +71,10 @@ public: //! Note: the constructed framework can be reused to //! apply the same geometric transformation to other //! shapes: just specify them with the function Perform. - Standard_EXPORT BRepBuilderAPI_GTransform(const TopoDS_Shape& S, const gp_GTrsf& T, const Standard_Boolean Copy = Standard_False); - + Standard_EXPORT BRepBuilderAPI_GTransform(const TopoDS_Shape& S, + const gp_GTrsf& T, + const Standard_Boolean Copy = Standard_False); + //! Applies the geometric transformation defined at the //! time of construction of this framework to the shape S. //! - If the transformation T is direct and isometric (i.e. if @@ -88,38 +87,20 @@ public: //! Note: this framework can be reused to apply the same //! geometric transformation to other shapes: just specify //! them by calling the function Perform again. - Standard_EXPORT void Perform (const TopoDS_Shape& S, const Standard_Boolean Copy = Standard_False); - + Standard_EXPORT void Perform(const TopoDS_Shape& S, const Standard_Boolean Copy = Standard_False); + //! Returns the list of shapes modified from the shape //! . - Standard_EXPORT virtual const TopTools_ListOfShape& Modified (const TopoDS_Shape& S) Standard_OVERRIDE; - - //! Returns the modified shape corresponding to . - Standard_EXPORT virtual TopoDS_Shape ModifiedShape (const TopoDS_Shape& S) const Standard_OVERRIDE; - - + Standard_EXPORT virtual const TopTools_ListOfShape& Modified(const TopoDS_Shape& S) + Standard_OVERRIDE; + //! Returns the modified shape corresponding to . + Standard_EXPORT virtual TopoDS_Shape ModifiedShape(const TopoDS_Shape& S) const Standard_OVERRIDE; protected: - - - - - private: - - - - gp_GTrsf myGTrsf; + gp_GTrsf myGTrsf; BRepBuilderAPI_Collect myHist; - - }; - - - - - - #endif // _BRepBuilderAPI_GTransform_HeaderFile diff --git a/opencascade/BRepBuilderAPI_MakeEdge.hxx b/opencascade/BRepBuilderAPI_MakeEdge.hxx index 7ec829f32..8c943ecb0 100644 --- a/opencascade/BRepBuilderAPI_MakeEdge.hxx +++ b/opencascade/BRepBuilderAPI_MakeEdge.hxx @@ -37,7 +37,6 @@ class Geom2d_Curve; class Geom_Surface; class TopoDS_Edge; - //! Provides methods to build edges. //! //! The methods have the following syntax, where @@ -69,81 +68,128 @@ class TopoDS_Edge; //! V1 and V2. Same as the previous but no vertices //! are created. If a vertex is Null the curve will //! be open in this direction. -class BRepBuilderAPI_MakeEdge : public BRepBuilderAPI_MakeShape +class BRepBuilderAPI_MakeEdge : public BRepBuilderAPI_MakeShape { public: - DEFINE_STANDARD_ALLOC - Standard_EXPORT BRepBuilderAPI_MakeEdge(); - + Standard_EXPORT BRepBuilderAPI_MakeEdge(const TopoDS_Vertex& V1, const TopoDS_Vertex& V2); - + Standard_EXPORT BRepBuilderAPI_MakeEdge(const gp_Pnt& P1, const gp_Pnt& P2); - + Standard_EXPORT BRepBuilderAPI_MakeEdge(const gp_Lin& L); - - Standard_EXPORT BRepBuilderAPI_MakeEdge(const gp_Lin& L, const Standard_Real p1, const Standard_Real p2); - + + Standard_EXPORT BRepBuilderAPI_MakeEdge(const gp_Lin& L, + const Standard_Real p1, + const Standard_Real p2); + Standard_EXPORT BRepBuilderAPI_MakeEdge(const gp_Lin& L, const gp_Pnt& P1, const gp_Pnt& P2); - - Standard_EXPORT BRepBuilderAPI_MakeEdge(const gp_Lin& L, const TopoDS_Vertex& V1, const TopoDS_Vertex& V2); - + + Standard_EXPORT BRepBuilderAPI_MakeEdge(const gp_Lin& L, + const TopoDS_Vertex& V1, + const TopoDS_Vertex& V2); + Standard_EXPORT BRepBuilderAPI_MakeEdge(const gp_Circ& L); - - Standard_EXPORT BRepBuilderAPI_MakeEdge(const gp_Circ& L, const Standard_Real p1, const Standard_Real p2); - + + Standard_EXPORT BRepBuilderAPI_MakeEdge(const gp_Circ& L, + const Standard_Real p1, + const Standard_Real p2); + Standard_EXPORT BRepBuilderAPI_MakeEdge(const gp_Circ& L, const gp_Pnt& P1, const gp_Pnt& P2); - - Standard_EXPORT BRepBuilderAPI_MakeEdge(const gp_Circ& L, const TopoDS_Vertex& V1, const TopoDS_Vertex& V2); - + + Standard_EXPORT BRepBuilderAPI_MakeEdge(const gp_Circ& L, + const TopoDS_Vertex& V1, + const TopoDS_Vertex& V2); + Standard_EXPORT BRepBuilderAPI_MakeEdge(const gp_Elips& L); - - Standard_EXPORT BRepBuilderAPI_MakeEdge(const gp_Elips& L, const Standard_Real p1, const Standard_Real p2); - + + Standard_EXPORT BRepBuilderAPI_MakeEdge(const gp_Elips& L, + const Standard_Real p1, + const Standard_Real p2); + Standard_EXPORT BRepBuilderAPI_MakeEdge(const gp_Elips& L, const gp_Pnt& P1, const gp_Pnt& P2); - - Standard_EXPORT BRepBuilderAPI_MakeEdge(const gp_Elips& L, const TopoDS_Vertex& V1, const TopoDS_Vertex& V2); - + + Standard_EXPORT BRepBuilderAPI_MakeEdge(const gp_Elips& L, + const TopoDS_Vertex& V1, + const TopoDS_Vertex& V2); + Standard_EXPORT BRepBuilderAPI_MakeEdge(const gp_Hypr& L); - - Standard_EXPORT BRepBuilderAPI_MakeEdge(const gp_Hypr& L, const Standard_Real p1, const Standard_Real p2); - + + Standard_EXPORT BRepBuilderAPI_MakeEdge(const gp_Hypr& L, + const Standard_Real p1, + const Standard_Real p2); + Standard_EXPORT BRepBuilderAPI_MakeEdge(const gp_Hypr& L, const gp_Pnt& P1, const gp_Pnt& P2); - - Standard_EXPORT BRepBuilderAPI_MakeEdge(const gp_Hypr& L, const TopoDS_Vertex& V1, const TopoDS_Vertex& V2); - + + Standard_EXPORT BRepBuilderAPI_MakeEdge(const gp_Hypr& L, + const TopoDS_Vertex& V1, + const TopoDS_Vertex& V2); + Standard_EXPORT BRepBuilderAPI_MakeEdge(const gp_Parab& L); - - Standard_EXPORT BRepBuilderAPI_MakeEdge(const gp_Parab& L, const Standard_Real p1, const Standard_Real p2); - + + Standard_EXPORT BRepBuilderAPI_MakeEdge(const gp_Parab& L, + const Standard_Real p1, + const Standard_Real p2); + Standard_EXPORT BRepBuilderAPI_MakeEdge(const gp_Parab& L, const gp_Pnt& P1, const gp_Pnt& P2); - - Standard_EXPORT BRepBuilderAPI_MakeEdge(const gp_Parab& L, const TopoDS_Vertex& V1, const TopoDS_Vertex& V2); - + + Standard_EXPORT BRepBuilderAPI_MakeEdge(const gp_Parab& L, + const TopoDS_Vertex& V1, + const TopoDS_Vertex& V2); + Standard_EXPORT BRepBuilderAPI_MakeEdge(const Handle(Geom_Curve)& L); - - Standard_EXPORT BRepBuilderAPI_MakeEdge(const Handle(Geom_Curve)& L, const Standard_Real p1, const Standard_Real p2); - - Standard_EXPORT BRepBuilderAPI_MakeEdge(const Handle(Geom_Curve)& L, const gp_Pnt& P1, const gp_Pnt& P2); - - Standard_EXPORT BRepBuilderAPI_MakeEdge(const Handle(Geom_Curve)& L, const TopoDS_Vertex& V1, const TopoDS_Vertex& V2); - - Standard_EXPORT BRepBuilderAPI_MakeEdge(const Handle(Geom_Curve)& L, const gp_Pnt& P1, const gp_Pnt& P2, const Standard_Real p1, const Standard_Real p2); - - Standard_EXPORT BRepBuilderAPI_MakeEdge(const Handle(Geom_Curve)& L, const TopoDS_Vertex& V1, const TopoDS_Vertex& V2, const Standard_Real p1, const Standard_Real p2); - - Standard_EXPORT BRepBuilderAPI_MakeEdge(const Handle(Geom2d_Curve)& L, const Handle(Geom_Surface)& S); - - Standard_EXPORT BRepBuilderAPI_MakeEdge(const Handle(Geom2d_Curve)& L, const Handle(Geom_Surface)& S, const Standard_Real p1, const Standard_Real p2); - - Standard_EXPORT BRepBuilderAPI_MakeEdge(const Handle(Geom2d_Curve)& L, const Handle(Geom_Surface)& S, const gp_Pnt& P1, const gp_Pnt& P2); - - Standard_EXPORT BRepBuilderAPI_MakeEdge(const Handle(Geom2d_Curve)& L, const Handle(Geom_Surface)& S, const TopoDS_Vertex& V1, const TopoDS_Vertex& V2); - - Standard_EXPORT BRepBuilderAPI_MakeEdge(const Handle(Geom2d_Curve)& L, const Handle(Geom_Surface)& S, const gp_Pnt& P1, const gp_Pnt& P2, const Standard_Real p1, const Standard_Real p2); - + + Standard_EXPORT BRepBuilderAPI_MakeEdge(const Handle(Geom_Curve)& L, + const Standard_Real p1, + const Standard_Real p2); + + Standard_EXPORT BRepBuilderAPI_MakeEdge(const Handle(Geom_Curve)& L, + const gp_Pnt& P1, + const gp_Pnt& P2); + + Standard_EXPORT BRepBuilderAPI_MakeEdge(const Handle(Geom_Curve)& L, + const TopoDS_Vertex& V1, + const TopoDS_Vertex& V2); + + Standard_EXPORT BRepBuilderAPI_MakeEdge(const Handle(Geom_Curve)& L, + const gp_Pnt& P1, + const gp_Pnt& P2, + const Standard_Real p1, + const Standard_Real p2); + + Standard_EXPORT BRepBuilderAPI_MakeEdge(const Handle(Geom_Curve)& L, + const TopoDS_Vertex& V1, + const TopoDS_Vertex& V2, + const Standard_Real p1, + const Standard_Real p2); + + Standard_EXPORT BRepBuilderAPI_MakeEdge(const Handle(Geom2d_Curve)& L, + const Handle(Geom_Surface)& S); + + Standard_EXPORT BRepBuilderAPI_MakeEdge(const Handle(Geom2d_Curve)& L, + const Handle(Geom_Surface)& S, + const Standard_Real p1, + const Standard_Real p2); + + Standard_EXPORT BRepBuilderAPI_MakeEdge(const Handle(Geom2d_Curve)& L, + const Handle(Geom_Surface)& S, + const gp_Pnt& P1, + const gp_Pnt& P2); + + Standard_EXPORT BRepBuilderAPI_MakeEdge(const Handle(Geom2d_Curve)& L, + const Handle(Geom_Surface)& S, + const TopoDS_Vertex& V1, + const TopoDS_Vertex& V2); + + Standard_EXPORT BRepBuilderAPI_MakeEdge(const Handle(Geom2d_Curve)& L, + const Handle(Geom_Surface)& S, + const gp_Pnt& P1, + const gp_Pnt& P2, + const Standard_Real p1, + const Standard_Real p2); + //! The general method to directly create an edge is to give //! - a 3D curve C as the support (geometric domain) of the edge, //! - two vertices V1 and V2 to limit the curve (definition of the restriction of @@ -208,52 +254,87 @@ public: //! parameters of the curve will then be used. //! //! Auxiliary methods - Standard_EXPORT BRepBuilderAPI_MakeEdge(const Handle(Geom2d_Curve)& L, const Handle(Geom_Surface)& S, const TopoDS_Vertex& V1, const TopoDS_Vertex& V2, const Standard_Real p1, const Standard_Real p2); - - Standard_EXPORT void Init (const Handle(Geom_Curve)& C); - - Standard_EXPORT void Init (const Handle(Geom_Curve)& C, const Standard_Real p1, const Standard_Real p2); - - Standard_EXPORT void Init (const Handle(Geom_Curve)& C, const gp_Pnt& P1, const gp_Pnt& P2); - - Standard_EXPORT void Init (const Handle(Geom_Curve)& C, const TopoDS_Vertex& V1, const TopoDS_Vertex& V2); - - Standard_EXPORT void Init (const Handle(Geom_Curve)& C, const gp_Pnt& P1, const gp_Pnt& P2, const Standard_Real p1, const Standard_Real p2); - - Standard_EXPORT void Init (const Handle(Geom_Curve)& C, const TopoDS_Vertex& V1, const TopoDS_Vertex& V2, const Standard_Real p1, const Standard_Real p2); - - Standard_EXPORT void Init (const Handle(Geom2d_Curve)& C, const Handle(Geom_Surface)& S); - - Standard_EXPORT void Init (const Handle(Geom2d_Curve)& C, const Handle(Geom_Surface)& S, const Standard_Real p1, const Standard_Real p2); - - Standard_EXPORT void Init (const Handle(Geom2d_Curve)& C, const Handle(Geom_Surface)& S, const gp_Pnt& P1, const gp_Pnt& P2); - - Standard_EXPORT void Init (const Handle(Geom2d_Curve)& C, const Handle(Geom_Surface)& S, const TopoDS_Vertex& V1, const TopoDS_Vertex& V2); - - Standard_EXPORT void Init (const Handle(Geom2d_Curve)& C, const Handle(Geom_Surface)& S, const gp_Pnt& P1, const gp_Pnt& P2, const Standard_Real p1, const Standard_Real p2); - + Standard_EXPORT BRepBuilderAPI_MakeEdge(const Handle(Geom2d_Curve)& L, + const Handle(Geom_Surface)& S, + const TopoDS_Vertex& V1, + const TopoDS_Vertex& V2, + const Standard_Real p1, + const Standard_Real p2); + + Standard_EXPORT void Init(const Handle(Geom_Curve)& C); + + Standard_EXPORT void Init(const Handle(Geom_Curve)& C, + const Standard_Real p1, + const Standard_Real p2); + + Standard_EXPORT void Init(const Handle(Geom_Curve)& C, const gp_Pnt& P1, const gp_Pnt& P2); + + Standard_EXPORT void Init(const Handle(Geom_Curve)& C, + const TopoDS_Vertex& V1, + const TopoDS_Vertex& V2); + + Standard_EXPORT void Init(const Handle(Geom_Curve)& C, + const gp_Pnt& P1, + const gp_Pnt& P2, + const Standard_Real p1, + const Standard_Real p2); + + Standard_EXPORT void Init(const Handle(Geom_Curve)& C, + const TopoDS_Vertex& V1, + const TopoDS_Vertex& V2, + const Standard_Real p1, + const Standard_Real p2); + + Standard_EXPORT void Init(const Handle(Geom2d_Curve)& C, const Handle(Geom_Surface)& S); + + Standard_EXPORT void Init(const Handle(Geom2d_Curve)& C, + const Handle(Geom_Surface)& S, + const Standard_Real p1, + const Standard_Real p2); + + Standard_EXPORT void Init(const Handle(Geom2d_Curve)& C, + const Handle(Geom_Surface)& S, + const gp_Pnt& P1, + const gp_Pnt& P2); + + Standard_EXPORT void Init(const Handle(Geom2d_Curve)& C, + const Handle(Geom_Surface)& S, + const TopoDS_Vertex& V1, + const TopoDS_Vertex& V2); + + Standard_EXPORT void Init(const Handle(Geom2d_Curve)& C, + const Handle(Geom_Surface)& S, + const gp_Pnt& P1, + const gp_Pnt& P2, + const Standard_Real p1, + const Standard_Real p2); + //! Defines or redefines the arguments for the construction of an edge. //! This function is currently used after the empty constructor BRepAPI_MakeEdge(). - Standard_EXPORT void Init (const Handle(Geom2d_Curve)& C, const Handle(Geom_Surface)& S, const TopoDS_Vertex& V1, const TopoDS_Vertex& V2, const Standard_Real p1, const Standard_Real p2); - + Standard_EXPORT void Init(const Handle(Geom2d_Curve)& C, + const Handle(Geom_Surface)& S, + const TopoDS_Vertex& V1, + const TopoDS_Vertex& V2, + const Standard_Real p1, + const Standard_Real p2); + //! Returns true if the edge is built. Standard_EXPORT virtual Standard_Boolean IsDone() const Standard_OVERRIDE; - + //! Returns the construction status //! - BRepBuilderAPI_EdgeDone if the edge is built, or //! - another value of the BRepBuilderAPI_EdgeError //! enumeration indicating the reason of construction failure. Standard_EXPORT BRepBuilderAPI_EdgeError Error() const; - //! Returns the constructed edge. //! Exceptions StdFail_NotDone if the edge is not built. Standard_EXPORT const TopoDS_Edge& Edge(); - Standard_EXPORT operator TopoDS_Edge(); - + Standard_EXPORT operator TopoDS_Edge(); + //! Returns the first vertex of the edge. May be Null. Standard_EXPORT const TopoDS_Vertex& Vertex1() const; - + //! Returns the second vertex of the edge. May be Null. //! //! Warning @@ -266,28 +347,9 @@ public: //! StdFail_NotDone if the edge is not built. Standard_EXPORT const TopoDS_Vertex& Vertex2() const; - - - protected: - - - - - private: - - - BRepLib_MakeEdge myMakeEdge; - - }; - - - - - - #endif // _BRepBuilderAPI_MakeEdge_HeaderFile diff --git a/opencascade/BRepBuilderAPI_MakeEdge2d.hxx b/opencascade/BRepBuilderAPI_MakeEdge2d.hxx index 5b0b300bf..ead036ad3 100644 --- a/opencascade/BRepBuilderAPI_MakeEdge2d.hxx +++ b/opencascade/BRepBuilderAPI_MakeEdge2d.hxx @@ -35,7 +35,6 @@ class gp_Parab2d; class Geom2d_Curve; class TopoDS_Edge; - //! Provides methods to build edges. //! //! The methods have the following syntax, where @@ -67,117 +66,152 @@ class TopoDS_Edge; //! V1 and V2. Same as the previous but no vertices //! are created. If a vertex is Null the curve will //! be open in this direction. -class BRepBuilderAPI_MakeEdge2d : public BRepBuilderAPI_MakeShape +class BRepBuilderAPI_MakeEdge2d : public BRepBuilderAPI_MakeShape { public: - DEFINE_STANDARD_ALLOC - Standard_EXPORT BRepBuilderAPI_MakeEdge2d(const TopoDS_Vertex& V1, const TopoDS_Vertex& V2); - + Standard_EXPORT BRepBuilderAPI_MakeEdge2d(const gp_Pnt2d& P1, const gp_Pnt2d& P2); - + Standard_EXPORT BRepBuilderAPI_MakeEdge2d(const gp_Lin2d& L); - - Standard_EXPORT BRepBuilderAPI_MakeEdge2d(const gp_Lin2d& L, const Standard_Real p1, const Standard_Real p2); - - Standard_EXPORT BRepBuilderAPI_MakeEdge2d(const gp_Lin2d& L, const gp_Pnt2d& P1, const gp_Pnt2d& P2); - - Standard_EXPORT BRepBuilderAPI_MakeEdge2d(const gp_Lin2d& L, const TopoDS_Vertex& V1, const TopoDS_Vertex& V2); - + + Standard_EXPORT BRepBuilderAPI_MakeEdge2d(const gp_Lin2d& L, + const Standard_Real p1, + const Standard_Real p2); + + Standard_EXPORT BRepBuilderAPI_MakeEdge2d(const gp_Lin2d& L, + const gp_Pnt2d& P1, + const gp_Pnt2d& P2); + + Standard_EXPORT BRepBuilderAPI_MakeEdge2d(const gp_Lin2d& L, + const TopoDS_Vertex& V1, + const TopoDS_Vertex& V2); + Standard_EXPORT BRepBuilderAPI_MakeEdge2d(const gp_Circ2d& L); - - Standard_EXPORT BRepBuilderAPI_MakeEdge2d(const gp_Circ2d& L, const Standard_Real p1, const Standard_Real p2); - - Standard_EXPORT BRepBuilderAPI_MakeEdge2d(const gp_Circ2d& L, const gp_Pnt2d& P1, const gp_Pnt2d& P2); - - Standard_EXPORT BRepBuilderAPI_MakeEdge2d(const gp_Circ2d& L, const TopoDS_Vertex& V1, const TopoDS_Vertex& V2); - + + Standard_EXPORT BRepBuilderAPI_MakeEdge2d(const gp_Circ2d& L, + const Standard_Real p1, + const Standard_Real p2); + + Standard_EXPORT BRepBuilderAPI_MakeEdge2d(const gp_Circ2d& L, + const gp_Pnt2d& P1, + const gp_Pnt2d& P2); + + Standard_EXPORT BRepBuilderAPI_MakeEdge2d(const gp_Circ2d& L, + const TopoDS_Vertex& V1, + const TopoDS_Vertex& V2); + Standard_EXPORT BRepBuilderAPI_MakeEdge2d(const gp_Elips2d& L); - - Standard_EXPORT BRepBuilderAPI_MakeEdge2d(const gp_Elips2d& L, const Standard_Real p1, const Standard_Real p2); - - Standard_EXPORT BRepBuilderAPI_MakeEdge2d(const gp_Elips2d& L, const gp_Pnt2d& P1, const gp_Pnt2d& P2); - - Standard_EXPORT BRepBuilderAPI_MakeEdge2d(const gp_Elips2d& L, const TopoDS_Vertex& V1, const TopoDS_Vertex& V2); - + + Standard_EXPORT BRepBuilderAPI_MakeEdge2d(const gp_Elips2d& L, + const Standard_Real p1, + const Standard_Real p2); + + Standard_EXPORT BRepBuilderAPI_MakeEdge2d(const gp_Elips2d& L, + const gp_Pnt2d& P1, + const gp_Pnt2d& P2); + + Standard_EXPORT BRepBuilderAPI_MakeEdge2d(const gp_Elips2d& L, + const TopoDS_Vertex& V1, + const TopoDS_Vertex& V2); + Standard_EXPORT BRepBuilderAPI_MakeEdge2d(const gp_Hypr2d& L); - - Standard_EXPORT BRepBuilderAPI_MakeEdge2d(const gp_Hypr2d& L, const Standard_Real p1, const Standard_Real p2); - - Standard_EXPORT BRepBuilderAPI_MakeEdge2d(const gp_Hypr2d& L, const gp_Pnt2d& P1, const gp_Pnt2d& P2); - - Standard_EXPORT BRepBuilderAPI_MakeEdge2d(const gp_Hypr2d& L, const TopoDS_Vertex& V1, const TopoDS_Vertex& V2); - + + Standard_EXPORT BRepBuilderAPI_MakeEdge2d(const gp_Hypr2d& L, + const Standard_Real p1, + const Standard_Real p2); + + Standard_EXPORT BRepBuilderAPI_MakeEdge2d(const gp_Hypr2d& L, + const gp_Pnt2d& P1, + const gp_Pnt2d& P2); + + Standard_EXPORT BRepBuilderAPI_MakeEdge2d(const gp_Hypr2d& L, + const TopoDS_Vertex& V1, + const TopoDS_Vertex& V2); + Standard_EXPORT BRepBuilderAPI_MakeEdge2d(const gp_Parab2d& L); - - Standard_EXPORT BRepBuilderAPI_MakeEdge2d(const gp_Parab2d& L, const Standard_Real p1, const Standard_Real p2); - - Standard_EXPORT BRepBuilderAPI_MakeEdge2d(const gp_Parab2d& L, const gp_Pnt2d& P1, const gp_Pnt2d& P2); - - Standard_EXPORT BRepBuilderAPI_MakeEdge2d(const gp_Parab2d& L, const TopoDS_Vertex& V1, const TopoDS_Vertex& V2); - - Standard_EXPORT BRepBuilderAPI_MakeEdge2d(const Handle(Geom2d_Curve)& L); - - Standard_EXPORT BRepBuilderAPI_MakeEdge2d(const Handle(Geom2d_Curve)& L, const Standard_Real p1, const Standard_Real p2); - - Standard_EXPORT BRepBuilderAPI_MakeEdge2d(const Handle(Geom2d_Curve)& L, const gp_Pnt2d& P1, const gp_Pnt2d& P2); - - Standard_EXPORT BRepBuilderAPI_MakeEdge2d(const Handle(Geom2d_Curve)& L, const TopoDS_Vertex& V1, const TopoDS_Vertex& V2); - - Standard_EXPORT BRepBuilderAPI_MakeEdge2d(const Handle(Geom2d_Curve)& L, const gp_Pnt2d& P1, const gp_Pnt2d& P2, const Standard_Real p1, const Standard_Real p2); - - Standard_EXPORT BRepBuilderAPI_MakeEdge2d(const Handle(Geom2d_Curve)& L, const TopoDS_Vertex& V1, const TopoDS_Vertex& V2, const Standard_Real p1, const Standard_Real p2); - - Standard_EXPORT void Init (const Handle(Geom2d_Curve)& C); - - Standard_EXPORT void Init (const Handle(Geom2d_Curve)& C, const Standard_Real p1, const Standard_Real p2); - - Standard_EXPORT void Init (const Handle(Geom2d_Curve)& C, const gp_Pnt2d& P1, const gp_Pnt2d& P2); - - Standard_EXPORT void Init (const Handle(Geom2d_Curve)& C, const TopoDS_Vertex& V1, const TopoDS_Vertex& V2); - - Standard_EXPORT void Init (const Handle(Geom2d_Curve)& C, const gp_Pnt2d& P1, const gp_Pnt2d& P2, const Standard_Real p1, const Standard_Real p2); - - Standard_EXPORT void Init (const Handle(Geom2d_Curve)& C, const TopoDS_Vertex& V1, const TopoDS_Vertex& V2, const Standard_Real p1, const Standard_Real p2); - - Standard_EXPORT virtual Standard_Boolean IsDone() const Standard_OVERRIDE; - - //! Returns the error description when NotDone. - Standard_EXPORT BRepBuilderAPI_EdgeError Error() const; - - Standard_EXPORT const TopoDS_Edge& Edge(); - Standard_EXPORT operator TopoDS_Edge(); - - //! Returns the first vertex of the edge. May be Null. - Standard_EXPORT const TopoDS_Vertex& Vertex1() const; - - //! Returns the second vertex of the edge. May be Null. - Standard_EXPORT const TopoDS_Vertex& Vertex2() const; + Standard_EXPORT BRepBuilderAPI_MakeEdge2d(const gp_Parab2d& L, + const Standard_Real p1, + const Standard_Real p2); + Standard_EXPORT BRepBuilderAPI_MakeEdge2d(const gp_Parab2d& L, + const gp_Pnt2d& P1, + const gp_Pnt2d& P2); + Standard_EXPORT BRepBuilderAPI_MakeEdge2d(const gp_Parab2d& L, + const TopoDS_Vertex& V1, + const TopoDS_Vertex& V2); -protected: + Standard_EXPORT BRepBuilderAPI_MakeEdge2d(const Handle(Geom2d_Curve)& L); + Standard_EXPORT BRepBuilderAPI_MakeEdge2d(const Handle(Geom2d_Curve)& L, + const Standard_Real p1, + const Standard_Real p2); + Standard_EXPORT BRepBuilderAPI_MakeEdge2d(const Handle(Geom2d_Curve)& L, + const gp_Pnt2d& P1, + const gp_Pnt2d& P2); + Standard_EXPORT BRepBuilderAPI_MakeEdge2d(const Handle(Geom2d_Curve)& L, + const TopoDS_Vertex& V1, + const TopoDS_Vertex& V2); + Standard_EXPORT BRepBuilderAPI_MakeEdge2d(const Handle(Geom2d_Curve)& L, + const gp_Pnt2d& P1, + const gp_Pnt2d& P2, + const Standard_Real p1, + const Standard_Real p2); -private: + Standard_EXPORT BRepBuilderAPI_MakeEdge2d(const Handle(Geom2d_Curve)& L, + const TopoDS_Vertex& V1, + const TopoDS_Vertex& V2, + const Standard_Real p1, + const Standard_Real p2); + Standard_EXPORT void Init(const Handle(Geom2d_Curve)& C); + Standard_EXPORT void Init(const Handle(Geom2d_Curve)& C, + const Standard_Real p1, + const Standard_Real p2); - BRepLib_MakeEdge2d myMakeEdge2d; + Standard_EXPORT void Init(const Handle(Geom2d_Curve)& C, const gp_Pnt2d& P1, const gp_Pnt2d& P2); + Standard_EXPORT void Init(const Handle(Geom2d_Curve)& C, + const TopoDS_Vertex& V1, + const TopoDS_Vertex& V2); -}; + Standard_EXPORT void Init(const Handle(Geom2d_Curve)& C, + const gp_Pnt2d& P1, + const gp_Pnt2d& P2, + const Standard_Real p1, + const Standard_Real p2); + Standard_EXPORT void Init(const Handle(Geom2d_Curve)& C, + const TopoDS_Vertex& V1, + const TopoDS_Vertex& V2, + const Standard_Real p1, + const Standard_Real p2); + Standard_EXPORT virtual Standard_Boolean IsDone() const Standard_OVERRIDE; + //! Returns the error description when NotDone. + Standard_EXPORT BRepBuilderAPI_EdgeError Error() const; + Standard_EXPORT const TopoDS_Edge& Edge(); + Standard_EXPORT operator TopoDS_Edge(); + //! Returns the first vertex of the edge. May be Null. + Standard_EXPORT const TopoDS_Vertex& Vertex1() const; + //! Returns the second vertex of the edge. May be Null. + Standard_EXPORT const TopoDS_Vertex& Vertex2() const; + +protected: +private: + BRepLib_MakeEdge2d myMakeEdge2d; +}; #endif // _BRepBuilderAPI_MakeEdge2d_HeaderFile diff --git a/opencascade/BRepBuilderAPI_MakeFace.hxx b/opencascade/BRepBuilderAPI_MakeFace.hxx index 17e355eaf..7eb199ff0 100644 --- a/opencascade/BRepBuilderAPI_MakeFace.hxx +++ b/opencascade/BRepBuilderAPI_MakeFace.hxx @@ -34,7 +34,6 @@ class gp_Torus; class Geom_Surface; class TopoDS_Wire; - //! Provides methods to build faces. //! //! A face may be built : @@ -60,84 +59,121 @@ class TopoDS_Wire; //! * From a face and a wire. //! //! - The new wire is a perforation. -class BRepBuilderAPI_MakeFace : public BRepBuilderAPI_MakeShape +class BRepBuilderAPI_MakeFace : public BRepBuilderAPI_MakeShape { public: - DEFINE_STANDARD_ALLOC - //! Not done. Standard_EXPORT BRepBuilderAPI_MakeFace(); - + //! Load a face. useful to add wires. Standard_EXPORT BRepBuilderAPI_MakeFace(const TopoDS_Face& F); - + //! Make a face from a plane. Standard_EXPORT BRepBuilderAPI_MakeFace(const gp_Pln& P); - + //! Make a face from a cylinder. Standard_EXPORT BRepBuilderAPI_MakeFace(const gp_Cylinder& C); - + //! Make a face from a cone. Standard_EXPORT BRepBuilderAPI_MakeFace(const gp_Cone& C); - + //! Make a face from a sphere. Standard_EXPORT BRepBuilderAPI_MakeFace(const gp_Sphere& S); - + //! Make a face from a torus. Standard_EXPORT BRepBuilderAPI_MakeFace(const gp_Torus& C); - + //! Make a face from a Surface. Accepts tolerance value (TolDegen) //! for resolution of degenerated edges. - Standard_EXPORT BRepBuilderAPI_MakeFace(const Handle(Geom_Surface)& S, const Standard_Real TolDegen); - + Standard_EXPORT BRepBuilderAPI_MakeFace(const Handle(Geom_Surface)& S, + const Standard_Real TolDegen); + //! Make a face from a plane. - Standard_EXPORT BRepBuilderAPI_MakeFace(const gp_Pln& P, const Standard_Real UMin, const Standard_Real UMax, const Standard_Real VMin, const Standard_Real VMax); - + Standard_EXPORT BRepBuilderAPI_MakeFace(const gp_Pln& P, + const Standard_Real UMin, + const Standard_Real UMax, + const Standard_Real VMin, + const Standard_Real VMax); + //! Make a face from a cylinder. - Standard_EXPORT BRepBuilderAPI_MakeFace(const gp_Cylinder& C, const Standard_Real UMin, const Standard_Real UMax, const Standard_Real VMin, const Standard_Real VMax); - + Standard_EXPORT BRepBuilderAPI_MakeFace(const gp_Cylinder& C, + const Standard_Real UMin, + const Standard_Real UMax, + const Standard_Real VMin, + const Standard_Real VMax); + //! Make a face from a cone. - Standard_EXPORT BRepBuilderAPI_MakeFace(const gp_Cone& C, const Standard_Real UMin, const Standard_Real UMax, const Standard_Real VMin, const Standard_Real VMax); - + Standard_EXPORT BRepBuilderAPI_MakeFace(const gp_Cone& C, + const Standard_Real UMin, + const Standard_Real UMax, + const Standard_Real VMin, + const Standard_Real VMax); + //! Make a face from a sphere. - Standard_EXPORT BRepBuilderAPI_MakeFace(const gp_Sphere& S, const Standard_Real UMin, const Standard_Real UMax, const Standard_Real VMin, const Standard_Real VMax); - + Standard_EXPORT BRepBuilderAPI_MakeFace(const gp_Sphere& S, + const Standard_Real UMin, + const Standard_Real UMax, + const Standard_Real VMin, + const Standard_Real VMax); + //! Make a face from a torus. - Standard_EXPORT BRepBuilderAPI_MakeFace(const gp_Torus& C, const Standard_Real UMin, const Standard_Real UMax, const Standard_Real VMin, const Standard_Real VMax); - + Standard_EXPORT BRepBuilderAPI_MakeFace(const gp_Torus& C, + const Standard_Real UMin, + const Standard_Real UMax, + const Standard_Real VMin, + const Standard_Real VMax); + //! Make a face from a Surface. Accepts tolerance value (TolDegen) //! for resolution of degenerated edges. - Standard_EXPORT BRepBuilderAPI_MakeFace(const Handle(Geom_Surface)& S, const Standard_Real UMin, const Standard_Real UMax, const Standard_Real VMin, const Standard_Real VMax, const Standard_Real TolDegen); - + Standard_EXPORT BRepBuilderAPI_MakeFace(const Handle(Geom_Surface)& S, + const Standard_Real UMin, + const Standard_Real UMax, + const Standard_Real VMin, + const Standard_Real VMax, + const Standard_Real TolDegen); + //! Find a surface from the wire and make a face. //! if is true, the computed surface will be //! a plane. If it is not possible to find a plane, the //! flag NotDone will be set. - Standard_EXPORT BRepBuilderAPI_MakeFace(const TopoDS_Wire& W, const Standard_Boolean OnlyPlane = Standard_False); - + Standard_EXPORT BRepBuilderAPI_MakeFace(const TopoDS_Wire& W, + const Standard_Boolean OnlyPlane = Standard_False); + //! Make a face from a plane and a wire. - Standard_EXPORT BRepBuilderAPI_MakeFace(const gp_Pln& P, const TopoDS_Wire& W, const Standard_Boolean Inside = Standard_True); - + Standard_EXPORT BRepBuilderAPI_MakeFace(const gp_Pln& P, + const TopoDS_Wire& W, + const Standard_Boolean Inside = Standard_True); + //! Make a face from a cylinder and a wire. - Standard_EXPORT BRepBuilderAPI_MakeFace(const gp_Cylinder& C, const TopoDS_Wire& W, const Standard_Boolean Inside = Standard_True); - + Standard_EXPORT BRepBuilderAPI_MakeFace(const gp_Cylinder& C, + const TopoDS_Wire& W, + const Standard_Boolean Inside = Standard_True); + //! Make a face from a cone and a wire. - Standard_EXPORT BRepBuilderAPI_MakeFace(const gp_Cone& C, const TopoDS_Wire& W, const Standard_Boolean Inside = Standard_True); - + Standard_EXPORT BRepBuilderAPI_MakeFace(const gp_Cone& C, + const TopoDS_Wire& W, + const Standard_Boolean Inside = Standard_True); + //! Make a face from a sphere and a wire. - Standard_EXPORT BRepBuilderAPI_MakeFace(const gp_Sphere& S, const TopoDS_Wire& W, const Standard_Boolean Inside = Standard_True); - + Standard_EXPORT BRepBuilderAPI_MakeFace(const gp_Sphere& S, + const TopoDS_Wire& W, + const Standard_Boolean Inside = Standard_True); + //! Make a face from a torus and a wire. - Standard_EXPORT BRepBuilderAPI_MakeFace(const gp_Torus& C, const TopoDS_Wire& W, const Standard_Boolean Inside = Standard_True); - + Standard_EXPORT BRepBuilderAPI_MakeFace(const gp_Torus& C, + const TopoDS_Wire& W, + const Standard_Boolean Inside = Standard_True); + //! Make a face from a Surface and a wire. //! If the surface S is not plane, //! it must contain pcurves for all edges in W, //! otherwise the wrong shape will be created. - Standard_EXPORT BRepBuilderAPI_MakeFace(const Handle(Geom_Surface)& S, const TopoDS_Wire& W, const Standard_Boolean Inside = Standard_True); - + Standard_EXPORT BRepBuilderAPI_MakeFace(const Handle(Geom_Surface)& S, + const TopoDS_Wire& W, + const Standard_Boolean Inside = Standard_True); + //! Adds the wire in the face //! A general method to create a face is to give //! - a surface S as the support (the geometric domain) of the face, @@ -182,14 +218,14 @@ public: //! - A parameter value may be infinite. There will be no edge and //! no vertex in the corresponding direction. Standard_EXPORT BRepBuilderAPI_MakeFace(const TopoDS_Face& F, const TopoDS_Wire& W); - + //! Initializes (or reinitializes) the //! construction of a face by creating a new object which is a copy of //! the face F, in order to add wires to it, using the function Add. //! Note: this complete copy of the geometry is only required if you //! want to work on the geometries of the two faces independently. - Standard_EXPORT void Init (const TopoDS_Face& F); - + Standard_EXPORT void Init(const TopoDS_Face& F); + //! Initializes (or reinitializes) the construction of a face on //! the surface S. If Bound is true, a wire is //! automatically created from the natural bounds of the @@ -199,8 +235,10 @@ public: //! the face after this initialization, using the function Add. //! TolDegen parameter is used for resolution of degenerated edges //! if calculation of natural bounds is turned on. - Standard_EXPORT void Init (const Handle(Geom_Surface)& S, const Standard_Boolean Bound, const Standard_Real TolDegen); - + Standard_EXPORT void Init(const Handle(Geom_Surface)& S, + const Standard_Boolean Bound, + const Standard_Real TolDegen); + //! Initializes (or reinitializes) the construction of a face on //! the surface S, limited in the u parametric direction by //! the two parameter values UMin and UMax and in the @@ -211,8 +249,13 @@ public: //! when the parameters given are outside the bounds of the //! surface or the basis surface of a trimmed surface. //! TolDegen parameter is used for resolution of degenerated edges. - Standard_EXPORT void Init (const Handle(Geom_Surface)& S, const Standard_Real UMin, const Standard_Real UMax, const Standard_Real VMin, const Standard_Real VMax, const Standard_Real TolDegen); - + Standard_EXPORT void Init(const Handle(Geom_Surface)& S, + const Standard_Real UMin, + const Standard_Real UMax, + const Standard_Real VMin, + const Standard_Real VMax, + const Standard_Real TolDegen); + //! Adds the wire W to the constructed face as a hole. //! Warning //! W must not cross the other bounds of the face, and all @@ -226,11 +269,11 @@ public: //! BRepBuilderAPI_MakeFace MF(C); //! MF.Add(W); //! TopoDS_Face F = MF; - Standard_EXPORT void Add (const TopoDS_Wire& W); - + Standard_EXPORT void Add(const TopoDS_Wire& W); + //! Returns true if this algorithm has a valid face. Standard_EXPORT virtual Standard_Boolean IsDone() const Standard_OVERRIDE; - + //! Returns the construction status //! BRepBuilderAPI_FaceDone if the face is built, or //! - another value of the BRepBuilderAPI_FaceError @@ -238,35 +281,16 @@ public: //! particular when the given parameters are outside the //! bounds of the surface. Standard_EXPORT BRepBuilderAPI_FaceError Error() const; - + //! Returns the constructed face. //! Exceptions //! StdFail_NotDone if no face is built. Standard_EXPORT const TopoDS_Face& Face() const; -Standard_EXPORT operator TopoDS_Face() const; - - - + Standard_EXPORT operator TopoDS_Face() const; protected: - - - - - private: - - - BRepLib_MakeFace myMakeFace; - - }; - - - - - - #endif // _BRepBuilderAPI_MakeFace_HeaderFile diff --git a/opencascade/BRepBuilderAPI_MakePolygon.hxx b/opencascade/BRepBuilderAPI_MakePolygon.hxx index e5375e389..76186ac8d 100644 --- a/opencascade/BRepBuilderAPI_MakePolygon.hxx +++ b/opencascade/BRepBuilderAPI_MakePolygon.hxx @@ -28,7 +28,6 @@ class TopoDS_Vertex; class TopoDS_Edge; class TopoDS_Wire; - //! Describes functions to build polygonal wires. A //! polygonal wire can be built from any number of points //! or vertices, and consists of a sequence of connected @@ -46,23 +45,24 @@ class TopoDS_Wire; //! - initializing the construction of a polygonal wire, //! - adding points or vertices to the polygonal wire under construction, and //! - consulting the result. -class BRepBuilderAPI_MakePolygon : public BRepBuilderAPI_MakeShape +class BRepBuilderAPI_MakePolygon : public BRepBuilderAPI_MakeShape { public: - DEFINE_STANDARD_ALLOC - //! Initializes an empty polygonal wire, to which points or //! vertices are added using the Add function. //! As soon as the polygonal wire under construction //! contains vertices, it can be consulted using the Wire function. Standard_EXPORT BRepBuilderAPI_MakePolygon(); - + Standard_EXPORT BRepBuilderAPI_MakePolygon(const gp_Pnt& P1, const gp_Pnt& P2); - - Standard_EXPORT BRepBuilderAPI_MakePolygon(const gp_Pnt& P1, const gp_Pnt& P2, const gp_Pnt& P3, const Standard_Boolean Close = Standard_False); - + + Standard_EXPORT BRepBuilderAPI_MakePolygon(const gp_Pnt& P1, + const gp_Pnt& P2, + const gp_Pnt& P3, + const Standard_Boolean Close = Standard_False); + //! Constructs a polygonal wire from 2, 3 or 4 points. Vertices are //! automatically created on the given points. The polygonal wire is //! closed if Close is true; otherwise it is open. Further vertices can @@ -78,12 +78,19 @@ public: //! sequence of points p1 - p2 - p1 is found among the arguments of the //! constructor, you will create a polygonal wire with two //! consecutive coincident edges. - Standard_EXPORT BRepBuilderAPI_MakePolygon(const gp_Pnt& P1, const gp_Pnt& P2, const gp_Pnt& P3, const gp_Pnt& P4, const Standard_Boolean Close = Standard_False); - + Standard_EXPORT BRepBuilderAPI_MakePolygon(const gp_Pnt& P1, + const gp_Pnt& P2, + const gp_Pnt& P3, + const gp_Pnt& P4, + const Standard_Boolean Close = Standard_False); + Standard_EXPORT BRepBuilderAPI_MakePolygon(const TopoDS_Vertex& V1, const TopoDS_Vertex& V2); - - Standard_EXPORT BRepBuilderAPI_MakePolygon(const TopoDS_Vertex& V1, const TopoDS_Vertex& V2, const TopoDS_Vertex& V3, const Standard_Boolean Close = Standard_False); - + + Standard_EXPORT BRepBuilderAPI_MakePolygon(const TopoDS_Vertex& V1, + const TopoDS_Vertex& V2, + const TopoDS_Vertex& V3, + const Standard_Boolean Close = Standard_False); + //! Constructs a polygonal wire from //! 2, 3 or 4 vertices. The polygonal wire is closed if Close is true; //! otherwise it is open (default value). Further vertices can be @@ -100,10 +107,13 @@ public: //! polygonal wire with two consecutive coincident edges if //! the sequence of vertices v1 - v2 - v1 is found among the //! constructor's arguments. - Standard_EXPORT BRepBuilderAPI_MakePolygon(const TopoDS_Vertex& V1, const TopoDS_Vertex& V2, const TopoDS_Vertex& V3, const TopoDS_Vertex& V4, const Standard_Boolean Close = Standard_False); - - Standard_EXPORT void Add (const gp_Pnt& P); - + Standard_EXPORT BRepBuilderAPI_MakePolygon(const TopoDS_Vertex& V1, + const TopoDS_Vertex& V2, + const TopoDS_Vertex& V3, + const TopoDS_Vertex& V4, + const Standard_Boolean Close = Standard_False); + + Standard_EXPORT void Add(const gp_Pnt& P); //! Adds the point P or the vertex V at the end of the //! polygonal wire under construction. A vertex is @@ -129,37 +139,35 @@ public: //! Consequently, be careful when using this function: you might create: //! - a polygonal wire with two consecutive coincident edges, or //! - a non-manifold polygonal wire. - Standard_EXPORT void Add (const TopoDS_Vertex& V); - + Standard_EXPORT void Add(const TopoDS_Vertex& V); + //! Returns true if the last vertex added to the constructed //! polygonal wire is not coincident with the previous one. Standard_EXPORT Standard_Boolean Added() const; - + //! Closes the polygonal wire under construction. Note - this //! is equivalent to adding the first vertex to the polygonal //! wire under construction. Standard_EXPORT void Close(); - + Standard_EXPORT const TopoDS_Vertex& FirstVertex() const; - + //! Returns the first or the last vertex of the polygonal wire under construction. //! If the constructed polygonal wire is closed, the first and the last vertices are identical. Standard_EXPORT const TopoDS_Vertex& LastVertex() const; - //! Returns true if this algorithm contains a valid polygonal //! wire (i.e. if there is at least one edge). //! IsDone returns false if fewer than two vertices have //! been chained together by this construction algorithm. Standard_EXPORT virtual Standard_Boolean IsDone() const Standard_OVERRIDE; - + //! Returns the edge built between the last two points or //! vertices added to the constructed polygonal wire under construction. //! Warning //! If there is only one vertex in the polygonal wire, the result is a null edge. Standard_EXPORT const TopoDS_Edge& Edge() const; -Standard_EXPORT operator TopoDS_Edge() const; - + Standard_EXPORT operator TopoDS_Edge() const; //! Returns the constructed polygonal wire, or the already //! built part of the polygonal wire under construction. @@ -167,30 +175,11 @@ Standard_EXPORT operator TopoDS_Edge() const; //! StdFail_NotDone if the wire is not built, i.e. if fewer than //! two vertices have been chained together by this construction algorithm. Standard_EXPORT const TopoDS_Wire& Wire(); - Standard_EXPORT operator TopoDS_Wire(); - - - + Standard_EXPORT operator TopoDS_Wire(); protected: - - - - - private: - - - BRepLib_MakePolygon myMakePolygon; - - }; - - - - - - #endif // _BRepBuilderAPI_MakePolygon_HeaderFile diff --git a/opencascade/BRepBuilderAPI_MakeShape.hxx b/opencascade/BRepBuilderAPI_MakeShape.hxx index cf10ea770..ba3a84be2 100644 --- a/opencascade/BRepBuilderAPI_MakeShape.hxx +++ b/opencascade/BRepBuilderAPI_MakeShape.hxx @@ -26,63 +26,44 @@ #include #include - //! This is the root class for all shape //! constructions. It stores the result. //! //! It provides deferred methods to trace the history //! of sub-shapes. -class BRepBuilderAPI_MakeShape : public BRepBuilderAPI_Command +class BRepBuilderAPI_MakeShape : public BRepBuilderAPI_Command { public: - DEFINE_STANDARD_ALLOC //! This is called by Shape(). It does nothing but //! may be redefined. - Standard_EXPORT virtual void Build(const Message_ProgressRange& theRange = Message_ProgressRange()); - + Standard_EXPORT virtual void Build( + const Message_ProgressRange& theRange = Message_ProgressRange()); + //! Returns a shape built by the shape construction algorithm. //! Raises exception StdFail_NotDone if the shape was not built. Standard_EXPORT virtual const TopoDS_Shape& Shape(); - Standard_EXPORT operator TopoDS_Shape(); - + Standard_EXPORT operator TopoDS_Shape(); + //! Returns the list of shapes generated from the //! shape . - Standard_EXPORT virtual const TopTools_ListOfShape& Generated (const TopoDS_Shape& S); - + Standard_EXPORT virtual const TopTools_ListOfShape& Generated(const TopoDS_Shape& S); + //! Returns the list of shapes modified from the shape //! . - Standard_EXPORT virtual const TopTools_ListOfShape& Modified (const TopoDS_Shape& S); - - //! Returns true if the shape S has been deleted. - Standard_EXPORT virtual Standard_Boolean IsDeleted (const TopoDS_Shape& S); - - + Standard_EXPORT virtual const TopTools_ListOfShape& Modified(const TopoDS_Shape& S); + //! Returns true if the shape S has been deleted. + Standard_EXPORT virtual Standard_Boolean IsDeleted(const TopoDS_Shape& S); protected: - - Standard_EXPORT BRepBuilderAPI_MakeShape(); - - TopoDS_Shape myShape; + TopoDS_Shape myShape; TopTools_ListOfShape myGenerated; - private: - - - - - }; - - - - - - #endif // _BRepBuilderAPI_MakeShape_HeaderFile diff --git a/opencascade/BRepBuilderAPI_MakeShapeOnMesh.hxx b/opencascade/BRepBuilderAPI_MakeShapeOnMesh.hxx index 17a5db828..39b522ea2 100644 --- a/opencascade/BRepBuilderAPI_MakeShapeOnMesh.hxx +++ b/opencascade/BRepBuilderAPI_MakeShapeOnMesh.hxx @@ -25,22 +25,21 @@ class BRepBuilderAPI_MakeShapeOnMesh : public BRepBuilderAPI_MakeShape { public: - DEFINE_STANDARD_ALLOC //! Ctor. Sets mesh to process. - //! @param theMesh [in] - Mesh to construct shape for. + //! @param[in] theMesh - Mesh to construct shape for. BRepBuilderAPI_MakeShapeOnMesh(const Handle(Poly_Triangulation)& theMesh) - : myMesh(theMesh) - {} + : myMesh(theMesh) + { + } //! Builds shape on mesh. - Standard_EXPORT virtual void Build(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; + Standard_EXPORT virtual void Build( + const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; private: - Handle(Poly_Triangulation) myMesh; - }; #endif // _BRepBuilderAPI_MakeShapeOnMesh_HeaderFile diff --git a/opencascade/BRepBuilderAPI_MakeShell.hxx b/opencascade/BRepBuilderAPI_MakeShell.hxx index d5df37572..7c443d9ca 100644 --- a/opencascade/BRepBuilderAPI_MakeShell.hxx +++ b/opencascade/BRepBuilderAPI_MakeShell.hxx @@ -28,7 +28,6 @@ class Geom_Surface; class TopoDS_Shell; - //! Describes functions to build a //! shape corresponding to the skin of a surface. //! Note that the term shell in the class name has the same definition @@ -52,29 +51,33 @@ class TopoDS_Shell; //! the surface are not sewn. For a sewn result, you need to use //! BRepOffsetAPI_Sewing. For a shell with thickness, you need to use //! BRepOffsetAPI_MakeOffsetShape. -class BRepBuilderAPI_MakeShell : public BRepBuilderAPI_MakeShape +class BRepBuilderAPI_MakeShell : public BRepBuilderAPI_MakeShape { public: - DEFINE_STANDARD_ALLOC - //! Constructs an empty shell framework. The Init //! function is used to define the construction arguments. //! Warning //! The function Error will return //! BRepBuilderAPI_EmptyShell if it is called before the function Init. Standard_EXPORT BRepBuilderAPI_MakeShell(); - + //! Constructs a shell from the surface S. - Standard_EXPORT BRepBuilderAPI_MakeShell(const Handle(Geom_Surface)& S, const Standard_Boolean Segment = Standard_False); - + Standard_EXPORT BRepBuilderAPI_MakeShell(const Handle(Geom_Surface)& S, + const Standard_Boolean Segment = Standard_False); + //! Constructs a shell from the surface S, //! limited in the u parametric direction by the two //! parameter values UMin and UMax, and limited in the v //! parametric direction by the two parameter values VMin and VMax. - Standard_EXPORT BRepBuilderAPI_MakeShell(const Handle(Geom_Surface)& S, const Standard_Real UMin, const Standard_Real UMax, const Standard_Real VMin, const Standard_Real VMax, const Standard_Boolean Segment = Standard_False); - + Standard_EXPORT BRepBuilderAPI_MakeShell(const Handle(Geom_Surface)& S, + const Standard_Real UMin, + const Standard_Real UMax, + const Standard_Real VMin, + const Standard_Real VMax, + const Standard_Boolean Segment = Standard_False); + //! Defines or redefines the arguments //! for the construction of a shell. The construction is initialized //! with the surface S, limited in the u parametric direction by the @@ -85,11 +88,16 @@ public: //! - BRepBuilderAPI_ShellParametersOutOfRange //! when the given parameters are outside the bounds of the //! surface or the basis surface if S is trimmed - Standard_EXPORT void Init (const Handle(Geom_Surface)& S, const Standard_Real UMin, const Standard_Real UMax, const Standard_Real VMin, const Standard_Real VMax, const Standard_Boolean Segment = Standard_False); - + Standard_EXPORT void Init(const Handle(Geom_Surface)& S, + const Standard_Real UMin, + const Standard_Real UMax, + const Standard_Real VMin, + const Standard_Real VMax, + const Standard_Boolean Segment = Standard_False); + //! Returns true if the shell is built. Standard_EXPORT virtual Standard_Boolean IsDone() const Standard_OVERRIDE; - + //! Returns the construction status: //! - BRepBuilderAPI_ShellDone if the shell is built, or //! - another value of the BRepBuilderAPI_ShellError @@ -97,33 +105,14 @@ public: //! This is frequently BRepBuilderAPI_ShellParametersOutOfRange //! indicating that the given parameters are outside the bounds of the surface. Standard_EXPORT BRepBuilderAPI_ShellError Error() const; - + //! Returns the new Shell. Standard_EXPORT const TopoDS_Shell& Shell() const; -Standard_EXPORT operator TopoDS_Shell() const; - - - + Standard_EXPORT operator TopoDS_Shell() const; protected: - - - - - private: - - - BRepLib_MakeShell myMakeShell; - - }; - - - - - - #endif // _BRepBuilderAPI_MakeShell_HeaderFile diff --git a/opencascade/BRepBuilderAPI_MakeSolid.hxx b/opencascade/BRepBuilderAPI_MakeSolid.hxx index 523c72bdd..f321310d6 100644 --- a/opencascade/BRepBuilderAPI_MakeSolid.hxx +++ b/opencascade/BRepBuilderAPI_MakeSolid.hxx @@ -28,7 +28,6 @@ class TopoDS_Shell; class TopoDS_Solid; class TopoDS_Shape; - //! Describes functions to build a solid from shells. //! A solid is made of one shell, or a series of shells, which //! do not intersect each other. One of these shells @@ -39,27 +38,25 @@ class TopoDS_Shape; //! A MakeSolid object provides a framework for: //! - defining and implementing the construction of a solid, and //! - consulting the result. -class BRepBuilderAPI_MakeSolid : public BRepBuilderAPI_MakeShape +class BRepBuilderAPI_MakeSolid : public BRepBuilderAPI_MakeShape { public: - DEFINE_STANDARD_ALLOC - //! Initializes the construction of a solid. An empty solid is //! considered to cover the whole space. The Add function //! is used to define shells to bound it. Standard_EXPORT BRepBuilderAPI_MakeSolid(); - + //! Make a solid from a CompSolid. Standard_EXPORT BRepBuilderAPI_MakeSolid(const TopoDS_CompSolid& S); - + //! Make a solid from a shell. Standard_EXPORT BRepBuilderAPI_MakeSolid(const TopoDS_Shell& S); - + //! Make a solid from two shells. Standard_EXPORT BRepBuilderAPI_MakeSolid(const TopoDS_Shell& S1, const TopoDS_Shell& S2); - + //! Make a solid from three shells. //! Constructs a solid //! - covering the whole space, or @@ -75,11 +72,13 @@ public: //! skin of the solid; it may be closed (a finite solid) or open //! (an infinite solid). Other shells form hollows (cavities) in //! these previous ones. Each must bound a closed volume. - Standard_EXPORT BRepBuilderAPI_MakeSolid(const TopoDS_Shell& S1, const TopoDS_Shell& S2, const TopoDS_Shell& S3); - + Standard_EXPORT BRepBuilderAPI_MakeSolid(const TopoDS_Shell& S1, + const TopoDS_Shell& S2, + const TopoDS_Shell& S3); + //! Make a solid from a solid. useful for adding later. Standard_EXPORT BRepBuilderAPI_MakeSolid(const TopoDS_Solid& So); - + //! Add a shell to a solid. //! //! Constructs a solid: @@ -94,7 +93,7 @@ public: //! (an infinite solid). Other shells form hollows (cavities) in //! the previous ones. Each must bound a closed volume. Standard_EXPORT BRepBuilderAPI_MakeSolid(const TopoDS_Solid& So, const TopoDS_Shell& S); - + //! Adds the shell to the current solid. //! Warning //! No check is done to verify the conditions of coherence @@ -105,43 +104,24 @@ public: //! solid. It may be closed (a finite solid) or open (an //! infinite solid). Other shells form hollows (cavities) in //! these previous ones. Each must bound a closed volume. - Standard_EXPORT void Add (const TopoDS_Shell& S); - + Standard_EXPORT void Add(const TopoDS_Shell& S); + //! Returns true if the solid is built. //! For this class, a solid under construction is always valid. //! If no shell has been added, it could be a whole-space //! solid. However, no check was done to verify the //! conditions of coherence of the resulting solid. Standard_EXPORT virtual Standard_Boolean IsDone() const Standard_OVERRIDE; - + //! Returns the new Solid. Standard_EXPORT const TopoDS_Solid& Solid(); - Standard_EXPORT operator TopoDS_Solid(); - - Standard_EXPORT virtual Standard_Boolean IsDeleted (const TopoDS_Shape& S) Standard_OVERRIDE; - - + Standard_EXPORT operator TopoDS_Solid(); + Standard_EXPORT virtual Standard_Boolean IsDeleted(const TopoDS_Shape& S) Standard_OVERRIDE; protected: - - - - - private: - - - BRepLib_MakeSolid myMakeSolid; - - }; - - - - - - #endif // _BRepBuilderAPI_MakeSolid_HeaderFile diff --git a/opencascade/BRepBuilderAPI_MakeVertex.hxx b/opencascade/BRepBuilderAPI_MakeVertex.hxx index 3356af307..4c080af53 100644 --- a/opencascade/BRepBuilderAPI_MakeVertex.hxx +++ b/opencascade/BRepBuilderAPI_MakeVertex.hxx @@ -26,7 +26,6 @@ class gp_Pnt; class TopoDS_Vertex; - //! Describes functions to build BRepBuilder vertices directly //! from 3D geometric points. A vertex built using a //! MakeVertex object is only composed of a 3D point and @@ -36,45 +35,24 @@ class TopoDS_Vertex; //! A MakeVertex object provides a framework for: //! - defining and implementing the construction of a vertex, and //! - consulting the result. -class BRepBuilderAPI_MakeVertex : public BRepBuilderAPI_MakeShape +class BRepBuilderAPI_MakeVertex : public BRepBuilderAPI_MakeShape { public: - DEFINE_STANDARD_ALLOC - //! Constructs a vertex from point P. //! Example create a vertex from a 3D point. //! gp_Pnt P(0,0,10); //! TopoDS_Vertex V = BRepBuilderAPI_MakeVertex(P); Standard_EXPORT BRepBuilderAPI_MakeVertex(const gp_Pnt& P); - + //! Returns the constructed vertex. Standard_EXPORT const TopoDS_Vertex& Vertex(); - Standard_EXPORT operator TopoDS_Vertex(); - - - + Standard_EXPORT operator TopoDS_Vertex(); protected: - - - - - private: - - - BRepLib_MakeVertex myMakeVertex; - - }; - - - - - - #endif // _BRepBuilderAPI_MakeVertex_HeaderFile diff --git a/opencascade/BRepBuilderAPI_MakeWire.hxx b/opencascade/BRepBuilderAPI_MakeWire.hxx index be89327a2..ea86a2a13 100644 --- a/opencascade/BRepBuilderAPI_MakeWire.hxx +++ b/opencascade/BRepBuilderAPI_MakeWire.hxx @@ -29,7 +29,6 @@ class TopoDS_Edge; class TopoDS_Wire; class TopoDS_Vertex; - //! Describes functions to build wires from edges. A wire can //! be built from any number of edges. //! To build a wire you first initialize the construction, then @@ -61,13 +60,11 @@ class TopoDS_Vertex; //! - initializing the construction of a wire, //! - adding edges to the wire under construction, and //! - consulting the result. -class BRepBuilderAPI_MakeWire : public BRepBuilderAPI_MakeShape +class BRepBuilderAPI_MakeWire : public BRepBuilderAPI_MakeShape { public: - DEFINE_STANDARD_ALLOC - //! Constructs an empty wire framework, to which edges //! are added using the Add function. //! As soon as the wire contains one edge, it can return @@ -77,16 +74,18 @@ public: //! BRepBuilderAPI_EmptyWire if it is called before at //! least one edge is added to the wire under construction. Standard_EXPORT BRepBuilderAPI_MakeWire(); - + //! Make a Wire from an edge. Standard_EXPORT BRepBuilderAPI_MakeWire(const TopoDS_Edge& E); - + //! Make a Wire from two edges. Standard_EXPORT BRepBuilderAPI_MakeWire(const TopoDS_Edge& E1, const TopoDS_Edge& E2); - + //! Make a Wire from three edges. - Standard_EXPORT BRepBuilderAPI_MakeWire(const TopoDS_Edge& E1, const TopoDS_Edge& E2, const TopoDS_Edge& E3); - + Standard_EXPORT BRepBuilderAPI_MakeWire(const TopoDS_Edge& E1, + const TopoDS_Edge& E2, + const TopoDS_Edge& E3); + //! Make a Wire from four edges. //! Constructs a wire //! - from the TopoDS_Wire W composed of the edge E, or @@ -108,14 +107,17 @@ public: //! return BRepBuilderAPI_DisconnectedWire, the //! function IsDone will return false and the function Wire //! will raise an error, until a new connectable edge is added. - Standard_EXPORT BRepBuilderAPI_MakeWire(const TopoDS_Edge& E1, const TopoDS_Edge& E2, const TopoDS_Edge& E3, const TopoDS_Edge& E4); - + Standard_EXPORT BRepBuilderAPI_MakeWire(const TopoDS_Edge& E1, + const TopoDS_Edge& E2, + const TopoDS_Edge& E3, + const TopoDS_Edge& E4); + //! Make a Wire from a Wire. useful for adding later. Standard_EXPORT BRepBuilderAPI_MakeWire(const TopoDS_Wire& W); - + //! Add an edge to a wire. Standard_EXPORT BRepBuilderAPI_MakeWire(const TopoDS_Wire& W, const TopoDS_Edge& E); - + //! Adds the edge E to the wire under construction. //! E must be connectable to the wire under construction, and, unless it //! is the first edge of the wire, must satisfy the following @@ -129,11 +131,11 @@ public: //! BRepBuilderAPI_DisconnectedWire, the function IsDone will return //! false and the function Wire will raise an error, until a new //! connectable edge is added. - Standard_EXPORT void Add (const TopoDS_Edge& E); - + Standard_EXPORT void Add(const TopoDS_Edge& E); + //! Add the edges of to the current wire. - Standard_EXPORT void Add (const TopoDS_Wire& W); - + Standard_EXPORT void Add(const TopoDS_Wire& W); + //! Adds the edges of to the current wire. The //! edges are not to be consecutive. But they are to //! be all connected geometrically or topologically. @@ -141,26 +143,26 @@ public: //! DisconnectedWire but the "Maker" is Done() and you //! can get the partial result. (ie connected to the //! first edgeof the list ) - Standard_EXPORT void Add (const TopTools_ListOfShape& L); - + Standard_EXPORT void Add(const TopTools_ListOfShape& L); + //! Returns true if this algorithm contains a valid wire. //! IsDone returns false if: //! - there are no edges in the wire, or //! - the last edge which you tried to add was not connectable. Standard_EXPORT virtual Standard_Boolean IsDone() const Standard_OVERRIDE; - + //! Returns the construction status //! - BRepBuilderAPI_WireDone if the wire is built, or //! - another value of the BRepBuilderAPI_WireError //! enumeration indicating why the construction failed. Standard_EXPORT BRepBuilderAPI_WireError Error() const; - + //! Returns the constructed wire; or the part of the wire //! under construction already built. //! Exceptions StdFail_NotDone if a wire is not built. Standard_EXPORT const TopoDS_Wire& Wire(); - Standard_EXPORT operator TopoDS_Wire(); - + Standard_EXPORT operator TopoDS_Wire(); + //! Returns the last edge added to the wire under construction. //! Warning //! - This edge can be different from the original one (the @@ -169,7 +171,7 @@ public: //! wire under construction, or if the last edge which you //! tried to add was not connectable.. Standard_EXPORT const TopoDS_Edge& Edge() const; - + //! Returns the last vertex of the last edge added to the //! wire under construction. //! Warning @@ -178,28 +180,9 @@ public: //! add was not connectableR Standard_EXPORT const TopoDS_Vertex& Vertex() const; - - - protected: - - - - - private: - - - BRepLib_MakeWire myMakeWire; - - }; - - - - - - #endif // _BRepBuilderAPI_MakeWire_HeaderFile diff --git a/opencascade/BRepBuilderAPI_ModifyShape.hxx b/opencascade/BRepBuilderAPI_ModifyShape.hxx index 63986cd03..4f95bd99a 100644 --- a/opencascade/BRepBuilderAPI_ModifyShape.hxx +++ b/opencascade/BRepBuilderAPI_ModifyShape.hxx @@ -27,7 +27,6 @@ #include class BRepTools_Modification; - //! Implements the methods of MakeShape for the //! constant topology modifications. The methods are //! implemented when the modification uses a Modifier @@ -43,17 +42,16 @@ class BRepTools_Modification; //! - BRepBuilderAPI_NurbsConvert to convert the //! whole geometry of a shape into NURBS geometry, //! - BRepOffsetAPI_DraftAngle to build a tapered shape. -class BRepBuilderAPI_ModifyShape : public BRepBuilderAPI_MakeShape +class BRepBuilderAPI_ModifyShape : public BRepBuilderAPI_MakeShape { public: - DEFINE_STANDARD_ALLOC - //! Returns the list of shapes modified from the shape //! . - Standard_EXPORT virtual const TopTools_ListOfShape& Modified (const TopoDS_Shape& S) Standard_OVERRIDE; - + Standard_EXPORT virtual const TopTools_ListOfShape& Modified(const TopoDS_Shape& S) + Standard_OVERRIDE; + //! Returns the modified shape corresponding to . //! S can correspond to the entire initial shape or to its subshape. //! Exceptions @@ -62,61 +60,43 @@ public: //! transformation has been applied. Raises NoSuchObject from Standard //! if S is not the initial shape or a sub-shape //! of the initial shape. - Standard_EXPORT virtual TopoDS_Shape ModifiedShape (const TopoDS_Shape& S) const; - - - + Standard_EXPORT virtual TopoDS_Shape ModifiedShape(const TopoDS_Shape& S) const; protected: - - //! Empty constructor. Standard_EXPORT BRepBuilderAPI_ModifyShape(); - + //! Initializes the modifier with the Shape , and //! set the field to . Standard_EXPORT BRepBuilderAPI_ModifyShape(const TopoDS_Shape& S); - + //! Set the field with . Standard_EXPORT BRepBuilderAPI_ModifyShape(const Handle(BRepTools_Modification)& M); - + //! Initializes the modifier with the Shape , and //! set the field to , and set the //! field with , the performs the //! modification. - Standard_EXPORT BRepBuilderAPI_ModifyShape(const TopoDS_Shape& S, const Handle(BRepTools_Modification)& M); - + Standard_EXPORT BRepBuilderAPI_ModifyShape(const TopoDS_Shape& S, + const Handle(BRepTools_Modification)& M); + //! Performs the previously given modification on the //! shape . - Standard_EXPORT void DoModif (const TopoDS_Shape& S); - + Standard_EXPORT void DoModif(const TopoDS_Shape& S); + //! Performs the modification on a previously //! given shape. - Standard_EXPORT void DoModif (const Handle(BRepTools_Modification)& M); - - //! Performs the modification on the shape . - Standard_EXPORT void DoModif (const TopoDS_Shape& S, const Handle(BRepTools_Modification)& M); + Standard_EXPORT void DoModif(const Handle(BRepTools_Modification)& M); + //! Performs the modification on the shape . + Standard_EXPORT void DoModif(const TopoDS_Shape& S, const Handle(BRepTools_Modification)& M); - BRepTools_Modifier myModifier; - TopoDS_Shape myInitialShape; + BRepTools_Modifier myModifier; + TopoDS_Shape myInitialShape; Handle(BRepTools_Modification) myModification; - private: - - Standard_EXPORT void DoModif(); - - - - }; - - - - - - #endif // _BRepBuilderAPI_ModifyShape_HeaderFile diff --git a/opencascade/BRepBuilderAPI_NurbsConvert.hxx b/opencascade/BRepBuilderAPI_NurbsConvert.hxx index bc0098d1e..c34c26ed2 100644 --- a/opencascade/BRepBuilderAPI_NurbsConvert.hxx +++ b/opencascade/BRepBuilderAPI_NurbsConvert.hxx @@ -26,25 +26,22 @@ class TopoDS_Shape; - //! Conversion of the complete geometry of a shape //! (all 3D analytical representation of surfaces and curves) -//! into NURBS geometry (execpt for Planes). For example, +//! into NURBS geometry (except for Planes). For example, //! all curves supporting edges of the basis shape are converted //! into BSpline curves, and all surfaces supporting its faces are //! converted into BSpline surfaces. -class BRepBuilderAPI_NurbsConvert : public BRepBuilderAPI_ModifyShape +class BRepBuilderAPI_NurbsConvert : public BRepBuilderAPI_ModifyShape { public: - DEFINE_STANDARD_ALLOC - //! Constructs a framework for converting the geometry of a //! shape into NURBS geometry. Use the function Perform //! to define the shape to convert. Standard_EXPORT BRepBuilderAPI_NurbsConvert(); - + //! Builds a new shape by converting the geometry of the //! shape S into NURBS geometry. Specifically, all curves //! supporting edges of S are converted into BSpline @@ -54,8 +51,9 @@ public: //! Note: the constructed framework can be reused to //! convert other shapes. You specify these with the //! function Perform. - Standard_EXPORT BRepBuilderAPI_NurbsConvert(const TopoDS_Shape& S, const Standard_Boolean Copy = Standard_False); - + Standard_EXPORT BRepBuilderAPI_NurbsConvert(const TopoDS_Shape& S, + const Standard_Boolean Copy = Standard_False); + //! Builds a new shape by converting the geometry of the //! shape S into NURBS geometry. //! Specifically, all curves supporting edges of S are @@ -64,41 +62,26 @@ public: //! Use the function Shape to access the new shape. //! Note: this framework can be reused to convert other //! shapes: you specify them by calling the function Perform again. - Standard_EXPORT void Perform (const TopoDS_Shape& S, const Standard_Boolean Copy = Standard_False); - + Standard_EXPORT void Perform(const TopoDS_Shape& S, const Standard_Boolean Copy = Standard_False); //! Returns the list of shapes modified from the shape //! . - Standard_EXPORT virtual const TopTools_ListOfShape& Modified (const TopoDS_Shape& S); - + Standard_EXPORT virtual const TopTools_ListOfShape& Modified(const TopoDS_Shape& S); + //! Returns the modified shape corresponding to . //! S can correspond to the entire initial shape or to its subshape. //! Exceptions //! Standard_NoSuchObject if S is not the initial shape or //! a subshape of the initial shape to which the - //! transformation has been applied. - Standard_EXPORT virtual TopoDS_Shape ModifiedShape (const TopoDS_Shape& S) const; - + //! transformation has been applied. + Standard_EXPORT virtual TopoDS_Shape ModifiedShape(const TopoDS_Shape& S) const; protected: - - - - - private: - Standard_EXPORT void CorrectVertexTol(); TopTools_DataMapOfShapeShape myVtxToReplace; - BRepTools_ReShape mySubs; - + BRepTools_ReShape mySubs; }; - - - - - - #endif // _BRepBuilderAPI_NurbsConvert_HeaderFile diff --git a/opencascade/BRepBuilderAPI_PipeError.hxx b/opencascade/BRepBuilderAPI_PipeError.hxx index 1eb8cfcb1..82e9551ad 100644 --- a/opencascade/BRepBuilderAPI_PipeError.hxx +++ b/opencascade/BRepBuilderAPI_PipeError.hxx @@ -20,10 +20,10 @@ //! Errors that can occur at (shell)pipe construction. enum BRepBuilderAPI_PipeError { -BRepBuilderAPI_PipeDone, -BRepBuilderAPI_PipeNotDone, -BRepBuilderAPI_PlaneNotIntersectGuide, -BRepBuilderAPI_ImpossibleContact + BRepBuilderAPI_PipeDone, + BRepBuilderAPI_PipeNotDone, + BRepBuilderAPI_PlaneNotIntersectGuide, + BRepBuilderAPI_ImpossibleContact }; #endif // _BRepBuilderAPI_PipeError_HeaderFile diff --git a/opencascade/BRepBuilderAPI_Sewing.hxx b/opencascade/BRepBuilderAPI_Sewing.hxx index 883f3d6c3..dffd77cb3 100644 --- a/opencascade/BRepBuilderAPI_Sewing.hxx +++ b/opencascade/BRepBuilderAPI_Sewing.hxx @@ -49,7 +49,6 @@ class TopLoc_Location; class Geom2d_Curve; class Geom_Curve; - class BRepBuilderAPI_Sewing; DEFINE_STANDARD_HANDLE(BRepBuilderAPI_Sewing, Standard_Transient) @@ -70,7 +69,7 @@ DEFINE_STANDARD_HANDLE(BRepBuilderAPI_Sewing, Standard_Transient) //! - set the cutting option as you need (default True) //! - define a tolerance //! - add shapes to be sewed -> Add -//! - compute -> Perfom +//! - compute -> Perform //! - output the resulted shapes //! - output free edges if necessary //! - output multiple edges if necessary @@ -79,306 +78,350 @@ class BRepBuilderAPI_Sewing : public Standard_Transient { public: - - //! Creates an object with //! tolerance of connexity //! option for sewing (if false only control) //! option for analysis of degenerated shapes //! option for cutting of free edges. //! option for non manifold processing - Standard_EXPORT BRepBuilderAPI_Sewing(const Standard_Real tolerance = 1.0e-06, const Standard_Boolean option1 = Standard_True, const Standard_Boolean option2 = Standard_True, const Standard_Boolean option3 = Standard_True, const Standard_Boolean option4 = Standard_False); - + Standard_EXPORT BRepBuilderAPI_Sewing(const Standard_Real tolerance = 1.0e-06, + const Standard_Boolean option1 = Standard_True, + const Standard_Boolean option2 = Standard_True, + const Standard_Boolean option3 = Standard_True, + const Standard_Boolean option4 = Standard_False); + //! initialize the parameters if necessary - Standard_EXPORT void Init (const Standard_Real tolerance = 1.0e-06, const Standard_Boolean option1 = Standard_True, const Standard_Boolean option2 = Standard_True, const Standard_Boolean option3 = Standard_True, const Standard_Boolean option4 = Standard_False); - - //! Loades the context shape. - Standard_EXPORT void Load (const TopoDS_Shape& shape); - + Standard_EXPORT void Init(const Standard_Real tolerance = 1.0e-06, + const Standard_Boolean option1 = Standard_True, + const Standard_Boolean option2 = Standard_True, + const Standard_Boolean option3 = Standard_True, + const Standard_Boolean option4 = Standard_False); + + //! Loads the context shape. + Standard_EXPORT void Load(const TopoDS_Shape& shape); + //! Defines the shapes to be sewed or controlled - Standard_EXPORT void Add (const TopoDS_Shape& shape); - + Standard_EXPORT void Add(const TopoDS_Shape& shape); + //! Computing //! theProgress - progress indicator of algorithm - Standard_EXPORT void Perform (const Message_ProgressRange& theProgress = Message_ProgressRange()); - + Standard_EXPORT void Perform(const Message_ProgressRange& theProgress = Message_ProgressRange()); + //! Gives the sewed shape //! a null shape if nothing constructed //! may be a face, a shell, a solid or a compound Standard_EXPORT const TopoDS_Shape& SewedShape() const; - + //! set context - Standard_EXPORT void SetContext (const Handle(BRepTools_ReShape)& theContext); - + Standard_EXPORT void SetContext(const Handle(BRepTools_ReShape)& theContext); + //! return context Standard_EXPORT const Handle(BRepTools_ReShape)& GetContext() const; - + //! Gives the number of free edges (edge shared by one face) Standard_EXPORT Standard_Integer NbFreeEdges() const; - + //! Gives each free edge - Standard_EXPORT const TopoDS_Edge& FreeEdge (const Standard_Integer index) const; - + Standard_EXPORT const TopoDS_Edge& FreeEdge(const Standard_Integer index) const; + //! Gives the number of multiple edges //! (edge shared by more than two faces) Standard_EXPORT Standard_Integer NbMultipleEdges() const; - + //! Gives each multiple edge - Standard_EXPORT const TopoDS_Edge& MultipleEdge (const Standard_Integer index) const; - + Standard_EXPORT const TopoDS_Edge& MultipleEdge(const Standard_Integer index) const; + //! Gives the number of contiguous edges (edge shared by two faces) Standard_EXPORT Standard_Integer NbContigousEdges() const; - + //! Gives each contiguous edge - Standard_EXPORT const TopoDS_Edge& ContigousEdge (const Standard_Integer index) const; - + Standard_EXPORT const TopoDS_Edge& ContigousEdge(const Standard_Integer index) const; + //! Gives the sections (edge) belonging to a contiguous edge - Standard_EXPORT const TopTools_ListOfShape& ContigousEdgeCouple (const Standard_Integer index) const; - + Standard_EXPORT const TopTools_ListOfShape& ContigousEdgeCouple( + const Standard_Integer index) const; + //! Indicates if a section is bound (before use SectionToBoundary) - Standard_EXPORT Standard_Boolean IsSectionBound (const TopoDS_Edge& section) const; - + Standard_EXPORT Standard_Boolean IsSectionBound(const TopoDS_Edge& section) const; + //! Gives the original edge (free boundary) which becomes the //! the section. Remember that sections constitute common edges. - //! This imformation is important for control because with + //! This information is important for control because with //! original edge we can find the surface to which the section //! is attached. - Standard_EXPORT const TopoDS_Edge& SectionToBoundary (const TopoDS_Edge& section) const; - + Standard_EXPORT const TopoDS_Edge& SectionToBoundary(const TopoDS_Edge& section) const; + //! Gives the number of degenerated shapes Standard_EXPORT Standard_Integer NbDegeneratedShapes() const; - + //! Gives each degenerated shape - Standard_EXPORT const TopoDS_Shape& DegeneratedShape (const Standard_Integer index) const; - + Standard_EXPORT const TopoDS_Shape& DegeneratedShape(const Standard_Integer index) const; + //! Indicates if a input shape is degenerated - Standard_EXPORT Standard_Boolean IsDegenerated (const TopoDS_Shape& shape) const; - + Standard_EXPORT Standard_Boolean IsDegenerated(const TopoDS_Shape& shape) const; + //! Indicates if a input shape has been modified - Standard_EXPORT Standard_Boolean IsModified (const TopoDS_Shape& shape) const; - + Standard_EXPORT Standard_Boolean IsModified(const TopoDS_Shape& shape) const; + //! Gives a modifieded shape - Standard_EXPORT const TopoDS_Shape& Modified (const TopoDS_Shape& shape) const; - + Standard_EXPORT const TopoDS_Shape& Modified(const TopoDS_Shape& shape) const; + //! Indicates if a input subshape has been modified - Standard_EXPORT Standard_Boolean IsModifiedSubShape (const TopoDS_Shape& shape) const; - + Standard_EXPORT Standard_Boolean IsModifiedSubShape(const TopoDS_Shape& shape) const; + //! Gives a modifieded subshape - Standard_EXPORT TopoDS_Shape ModifiedSubShape (const TopoDS_Shape& shape) const; - + Standard_EXPORT TopoDS_Shape ModifiedSubShape(const TopoDS_Shape& shape) const; + //! print the information Standard_EXPORT void Dump() const; - + //! Gives the number of deleted faces (faces smallest than tolerance) Standard_EXPORT Standard_Integer NbDeletedFaces() const; - + //! Gives each deleted face - Standard_EXPORT const TopoDS_Face& DeletedFace (const Standard_Integer index) const; - + Standard_EXPORT const TopoDS_Face& DeletedFace(const Standard_Integer index) const; + //! Gives a modified shape - Standard_EXPORT TopoDS_Face WhichFace (const TopoDS_Edge& theEdg, const Standard_Integer index = 1) const; - + Standard_EXPORT TopoDS_Face WhichFace(const TopoDS_Edge& theEdg, + const Standard_Integer index = 1) const; + //! Gets same parameter mode. - Standard_Boolean SameParameterMode() const; - + Standard_Boolean SameParameterMode() const; + //! Sets same parameter mode. - void SetSameParameterMode (const Standard_Boolean SameParameterMode); - + void SetSameParameterMode(const Standard_Boolean SameParameterMode); + //! Gives set tolerance. - Standard_Real Tolerance() const; - + Standard_Real Tolerance() const; + //! Sets tolerance - void SetTolerance (const Standard_Real theToler); - + void SetTolerance(const Standard_Real theToler); + //! Gives set min tolerance. - Standard_Real MinTolerance() const; - + Standard_Real MinTolerance() const; + //! Sets min tolerance - void SetMinTolerance (const Standard_Real theMinToler); - + void SetMinTolerance(const Standard_Real theMinToler); + //! Gives set max tolerance - Standard_Real MaxTolerance() const; - + Standard_Real MaxTolerance() const; + //! Sets max tolerance. - void SetMaxTolerance (const Standard_Real theMaxToler); - + void SetMaxTolerance(const Standard_Real theMaxToler); + //! Returns mode for sewing faces By default - true. - Standard_Boolean FaceMode() const; - + Standard_Boolean FaceMode() const; + //! Sets mode for sewing faces By default - true. - void SetFaceMode (const Standard_Boolean theFaceMode); - + void SetFaceMode(const Standard_Boolean theFaceMode); + //! Returns mode for sewing floating edges By default - false. - Standard_Boolean FloatingEdgesMode() const; - + Standard_Boolean FloatingEdgesMode() const; + //! Sets mode for sewing floating edges By default - false. //! Returns mode for cutting floating edges By default - false. //! Sets mode for cutting floating edges By default - false. - void SetFloatingEdgesMode (const Standard_Boolean theFloatingEdgesMode); - + void SetFloatingEdgesMode(const Standard_Boolean theFloatingEdgesMode); + //! Returns mode for accounting of local tolerances //! of edges and vertices during of merging. - Standard_Boolean LocalTolerancesMode() const; - + Standard_Boolean LocalTolerancesMode() const; + //! Sets mode for accounting of local tolerances //! of edges and vertices during of merging //! in this case WorkTolerance = myTolerance + tolEdge1+ tolEdg2; - void SetLocalTolerancesMode (const Standard_Boolean theLocalTolerancesMode); - + void SetLocalTolerancesMode(const Standard_Boolean theLocalTolerancesMode); + //! Sets mode for non-manifold sewing. - void SetNonManifoldMode (const Standard_Boolean theNonManifoldMode); - + void SetNonManifoldMode(const Standard_Boolean theNonManifoldMode); + //! Gets mode for non-manifold sewing. //! //! INTERNAL FUNCTIONS --- - Standard_Boolean NonManifoldMode() const; + Standard_Boolean NonManifoldMode() const; + DEFINE_STANDARD_RTTIEXT(BRepBuilderAPI_Sewing, Standard_Transient) +protected: + //! Performs cutting of sections + //! theProgress - progress indicator of processing + Standard_EXPORT void Cutting(const Message_ProgressRange& theProgress = Message_ProgressRange()); + Standard_EXPORT void Merging(const Standard_Boolean passage, + const Message_ProgressRange& theProgress = Message_ProgressRange()); - DEFINE_STANDARD_RTTIEXT(BRepBuilderAPI_Sewing,Standard_Transient) + Standard_EXPORT Standard_Boolean IsMergedClosed(const TopoDS_Edge& Edge1, + const TopoDS_Edge& Edge2, + const TopoDS_Face& fase) const; -protected: + Standard_EXPORT Standard_Boolean FindCandidates(TopTools_SequenceOfShape& seqSections, + TColStd_IndexedMapOfInteger& mapReference, + TColStd_SequenceOfInteger& seqCandidates, + TColStd_SequenceOfBoolean& seqOrientations); + + Standard_EXPORT void AnalysisNearestEdges(const TopTools_SequenceOfShape& sequenceSec, + TColStd_SequenceOfInteger& seqIndCandidate, + TColStd_SequenceOfBoolean& seqOrientations, + const Standard_Boolean evalDist = Standard_True); - - //! Performs cutting of sections - //! theProgress - progress indicator of processing - Standard_EXPORT void Cutting (const Message_ProgressRange& theProgress = Message_ProgressRange()); - - Standard_EXPORT void Merging (const Standard_Boolean passage, const Message_ProgressRange& theProgress = Message_ProgressRange()); - - Standard_EXPORT Standard_Boolean IsMergedClosed (const TopoDS_Edge& Edge1, const TopoDS_Edge& Edge2, const TopoDS_Face& fase) const; - - Standard_EXPORT Standard_Boolean FindCandidates (TopTools_SequenceOfShape& seqSections, TColStd_IndexedMapOfInteger& mapReference, TColStd_SequenceOfInteger& seqCandidates, TColStd_SequenceOfBoolean& seqOrientations); - - Standard_EXPORT void AnalysisNearestEdges (const TopTools_SequenceOfShape& sequenceSec, TColStd_SequenceOfInteger& seqIndCandidate, TColStd_SequenceOfBoolean& seqOrientations, const Standard_Boolean evalDist = Standard_True); - //! Merged nearest edges. - Standard_EXPORT Standard_Boolean MergedNearestEdges (const TopoDS_Shape& edge, TopTools_SequenceOfShape& SeqMergedEdge, TColStd_SequenceOfBoolean& SeqMergedOri); - - Standard_EXPORT void EdgeProcessing (const Message_ProgressRange& theProgress = Message_ProgressRange()); + Standard_EXPORT Standard_Boolean MergedNearestEdges(const TopoDS_Shape& edge, + TopTools_SequenceOfShape& SeqMergedEdge, + TColStd_SequenceOfBoolean& SeqMergedOri); + + Standard_EXPORT void EdgeProcessing( + const Message_ProgressRange& theProgress = Message_ProgressRange()); //! Recompute regularity on merged edges - Standard_EXPORT void EdgeRegularity (const Message_ProgressRange& theProgress = Message_ProgressRange()); - + Standard_EXPORT void EdgeRegularity( + const Message_ProgressRange& theProgress = Message_ProgressRange()); + Standard_EXPORT void CreateOutputInformations(); - + //! Defines if surface is U closed. - Standard_EXPORT virtual Standard_Boolean IsUClosedSurface (const Handle(Geom_Surface)& surf, const TopoDS_Shape& theEdge, const TopLoc_Location& theloc) const; - + Standard_EXPORT virtual Standard_Boolean IsUClosedSurface(const Handle(Geom_Surface)& surf, + const TopoDS_Shape& theEdge, + const TopLoc_Location& theloc) const; + //! Defines if surface is V closed. - Standard_EXPORT virtual Standard_Boolean IsVClosedSurface (const Handle(Geom_Surface)& surf, const TopoDS_Shape& theEdge, const TopLoc_Location& theloc) const; - + Standard_EXPORT virtual Standard_Boolean IsVClosedSurface(const Handle(Geom_Surface)& surf, + const TopoDS_Shape& theEdge, + const TopLoc_Location& theloc) const; //! This method is called from Perform only //! theProgress - progress indicator of processing - Standard_EXPORT virtual void FaceAnalysis (const Message_ProgressRange& theProgress = Message_ProgressRange()); - + Standard_EXPORT virtual void FaceAnalysis( + const Message_ProgressRange& theProgress = Message_ProgressRange()); //! This method is called from Perform only Standard_EXPORT virtual void FindFreeBoundaries(); - //! This method is called from Perform only //! theProgress - progress indicator of processing - Standard_EXPORT virtual void VerticesAssembling (const Message_ProgressRange& theProgress = Message_ProgressRange()); - + Standard_EXPORT virtual void VerticesAssembling( + const Message_ProgressRange& theProgress = Message_ProgressRange()); //! This method is called from Perform only Standard_EXPORT virtual void CreateSewedShape(); - + //! Get wire from free edges. //! This method is called from EdgeProcessing only - Standard_EXPORT virtual void GetFreeWires (TopTools_IndexedMapOfShape& MapFreeEdges, - TopTools_SequenceOfShape& seqWires); - + Standard_EXPORT virtual void GetFreeWires(TopTools_IndexedMapOfShape& MapFreeEdges, + TopTools_SequenceOfShape& seqWires); //! This method is called from MergingOfSections only - Standard_EXPORT virtual void EvaluateAngulars (TopTools_SequenceOfShape& sequenceSec, TColStd_Array1OfBoolean& secForward, TColStd_Array1OfReal& tabAng, const Standard_Integer indRef) const; - + Standard_EXPORT virtual void EvaluateAngulars(TopTools_SequenceOfShape& sequenceSec, + TColStd_Array1OfBoolean& secForward, + TColStd_Array1OfReal& tabAng, + const Standard_Integer indRef) const; //! This method is called from MergingOfSections only - Standard_EXPORT virtual void EvaluateDistances (TopTools_SequenceOfShape& sequenceSec, TColStd_Array1OfBoolean& secForward, TColStd_Array1OfReal& tabAng, TColStd_Array1OfReal& arrLen, TColStd_Array1OfReal& tabMinDist, const Standard_Integer indRef) const; - + Standard_EXPORT virtual void EvaluateDistances(TopTools_SequenceOfShape& sequenceSec, + TColStd_Array1OfBoolean& secForward, + TColStd_Array1OfReal& tabAng, + TColStd_Array1OfReal& arrLen, + TColStd_Array1OfReal& tabMinDist, + const Standard_Integer indRef) const; //! This method is called from SameParameterEdge only - Standard_EXPORT virtual Handle(Geom2d_Curve) SameRange (const Handle(Geom2d_Curve)& CurvePtr, const Standard_Real FirstOnCurve, const Standard_Real LastOnCurve, const Standard_Real RequestedFirst, const Standard_Real RequestedLast) const; - + Standard_EXPORT virtual Handle(Geom2d_Curve) SameRange(const Handle(Geom2d_Curve)& CurvePtr, + const Standard_Real FirstOnCurve, + const Standard_Real LastOnCurve, + const Standard_Real RequestedFirst, + const Standard_Real RequestedLast) const; //! This method is called from SameParameterEdge only - Standard_EXPORT virtual void SameParameter (const TopoDS_Edge& edge) const; - + Standard_EXPORT virtual void SameParameter(const TopoDS_Edge& edge) const; //! This method is called from Merging only - Standard_EXPORT virtual TopoDS_Edge SameParameterEdge (const TopoDS_Shape& edge, const TopTools_SequenceOfShape& seqEdges, const TColStd_SequenceOfBoolean& seqForward, TopTools_MapOfShape& mapMerged, const Handle(BRepTools_ReShape)& locReShape); - + Standard_EXPORT virtual TopoDS_Edge SameParameterEdge( + const TopoDS_Shape& edge, + const TopTools_SequenceOfShape& seqEdges, + const TColStd_SequenceOfBoolean& seqForward, + TopTools_MapOfShape& mapMerged, + const Handle(BRepTools_ReShape)& locReShape); //! This method is called from Merging only - Standard_EXPORT virtual TopoDS_Edge SameParameterEdge (const TopoDS_Edge& edge1, const TopoDS_Edge& edge2, const TopTools_ListOfShape& listFaces1, const TopTools_ListOfShape& listFaces2, const Standard_Boolean secForward, Standard_Integer& whichSec, const Standard_Boolean firstCall = Standard_True); - + Standard_EXPORT virtual TopoDS_Edge SameParameterEdge( + const TopoDS_Edge& edge1, + const TopoDS_Edge& edge2, + const TopTools_ListOfShape& listFaces1, + const TopTools_ListOfShape& listFaces2, + const Standard_Boolean secForward, + Standard_Integer& whichSec, + const Standard_Boolean firstCall = Standard_True); + //! Projects points on curve //! This method is called from Cutting only - Standard_EXPORT void ProjectPointsOnCurve (const TColgp_Array1OfPnt& arrPnt, const Handle(Geom_Curve)& Crv, const Standard_Real first, const Standard_Real last, TColStd_Array1OfReal& arrDist, TColStd_Array1OfReal& arrPara, TColgp_Array1OfPnt& arrProj, const Standard_Boolean isConsiderEnds) const; - + Standard_EXPORT void ProjectPointsOnCurve(const TColgp_Array1OfPnt& arrPnt, + const Handle(Geom_Curve)& Crv, + const Standard_Real first, + const Standard_Real last, + TColStd_Array1OfReal& arrDist, + TColStd_Array1OfReal& arrPara, + TColgp_Array1OfPnt& arrProj, + const Standard_Boolean isConsiderEnds) const; + //! Creates cutting vertices on projections //! This method is called from Cutting only - Standard_EXPORT virtual void CreateCuttingNodes (const TopTools_IndexedMapOfShape& MapVert, const TopoDS_Shape& bound, const TopoDS_Shape& vfirst, const TopoDS_Shape& vlast, const TColStd_Array1OfReal& arrDist, const TColStd_Array1OfReal& arrPara, const TColgp_Array1OfPnt& arrPnt, TopTools_SequenceOfShape& seqNode, TColStd_SequenceOfReal& seqPara); - + Standard_EXPORT virtual void CreateCuttingNodes(const TopTools_IndexedMapOfShape& MapVert, + const TopoDS_Shape& bound, + const TopoDS_Shape& vfirst, + const TopoDS_Shape& vlast, + const TColStd_Array1OfReal& arrDist, + const TColStd_Array1OfReal& arrPara, + const TColgp_Array1OfPnt& arrPnt, + TopTools_SequenceOfShape& seqNode, + TColStd_SequenceOfReal& seqPara); + //! Performs cutting of bound //! This method is called from Cutting only - Standard_EXPORT virtual void CreateSections (const TopoDS_Shape& bound, const TopTools_SequenceOfShape& seqNode, const TColStd_SequenceOfReal& seqPara, TopTools_ListOfShape& listEdge); - + Standard_EXPORT virtual void CreateSections(const TopoDS_Shape& bound, + const TopTools_SequenceOfShape& seqNode, + const TColStd_SequenceOfReal& seqPara, + TopTools_ListOfShape& listEdge); + //! Makes all edges from shape same parameter //! if SameParameterMode is equal to Standard_True //! This method is called from Perform only Standard_EXPORT virtual void SameParameterShape(); - Standard_Real myTolerance; - Standard_Boolean mySewing; - Standard_Boolean myAnalysis; - Standard_Boolean myCutting; - Standard_Boolean myNonmanifold; - TopTools_IndexedDataMapOfShapeShape myOldShapes; - TopoDS_Shape mySewedShape; - TopTools_IndexedMapOfShape myDegenerated; - TopTools_IndexedMapOfShape myFreeEdges; - TopTools_IndexedMapOfShape myMultipleEdges; + Standard_Real myTolerance; + Standard_Boolean mySewing; + Standard_Boolean myAnalysis; + Standard_Boolean myCutting; + Standard_Boolean myNonmanifold; + TopTools_IndexedDataMapOfShapeShape myOldShapes; + TopoDS_Shape mySewedShape; + TopTools_IndexedMapOfShape myDegenerated; + TopTools_IndexedMapOfShape myFreeEdges; + TopTools_IndexedMapOfShape myMultipleEdges; TopTools_IndexedDataMapOfShapeListOfShape myContigousEdges; - TopTools_DataMapOfShapeShape myContigSecBound; - Standard_Integer myNbShapes; - Standard_Integer myNbVertices; - Standard_Integer myNbEdges; + TopTools_DataMapOfShapeShape myContigSecBound; + Standard_Integer myNbShapes; + Standard_Integer myNbVertices; + Standard_Integer myNbEdges; TopTools_IndexedDataMapOfShapeListOfShape myBoundFaces; - TopTools_DataMapOfShapeListOfShape myBoundSections; - TopTools_DataMapOfShapeShape mySectionBound; - TopTools_IndexedDataMapOfShapeShape myVertexNode; - TopTools_IndexedDataMapOfShapeShape myVertexNodeFree; - TopTools_DataMapOfShapeListOfShape myNodeSections; - TopTools_DataMapOfShapeListOfShape myCuttingNode; - TopTools_IndexedMapOfShape myLittleFace; - TopoDS_Shape myShape; - Handle(BRepTools_ReShape) myReShape; - + TopTools_DataMapOfShapeListOfShape myBoundSections; + TopTools_DataMapOfShapeShape mySectionBound; + TopTools_IndexedDataMapOfShapeShape myVertexNode; + TopTools_IndexedDataMapOfShapeShape myVertexNodeFree; + TopTools_DataMapOfShapeListOfShape myNodeSections; + TopTools_DataMapOfShapeListOfShape myCuttingNode; + TopTools_IndexedMapOfShape myLittleFace; + TopoDS_Shape myShape; + Handle(BRepTools_ReShape) myReShape; private: - - - Standard_Boolean myFaceMode; - Standard_Boolean myFloatingEdgesMode; - Standard_Boolean mySameParameterMode; - Standard_Boolean myLocalToleranceMode; - Standard_Real myMinTolerance; - Standard_Real myMaxTolerance; + Standard_Boolean myFaceMode; + Standard_Boolean myFloatingEdgesMode; + Standard_Boolean mySameParameterMode; + Standard_Boolean myLocalToleranceMode; + Standard_Real myMinTolerance; + Standard_Real myMaxTolerance; TopTools_MapOfShape myMergedEdges; - - }; - #include - - - - #endif // _BRepBuilderAPI_Sewing_HeaderFile diff --git a/opencascade/BRepBuilderAPI_Sewing.lxx b/opencascade/BRepBuilderAPI_Sewing.lxx index fa58c30d2..be5adef96 100644 --- a/opencascade/BRepBuilderAPI_Sewing.lxx +++ b/opencascade/BRepBuilderAPI_Sewing.lxx @@ -14,120 +14,120 @@ // commercial license or contractual agreement. //======================================================================= -//function : SetMaxTolerance -//purpose : +// function : SetMaxTolerance +// purpose : //======================================================================= -inline void BRepBuilderAPI_Sewing::SetMaxTolerance(const Standard_Real theMaxToler) +inline void BRepBuilderAPI_Sewing::SetMaxTolerance(const Standard_Real theMaxToler) { myMaxTolerance = theMaxToler; } //======================================================================= -//function : MaxTolerance -//purpose : +// function : MaxTolerance +// purpose : //======================================================================= -inline Standard_Real BRepBuilderAPI_Sewing::MaxTolerance() const +inline Standard_Real BRepBuilderAPI_Sewing::MaxTolerance() const { - return myMaxTolerance; + return myMaxTolerance; } //======================================================================= -//function : Tolerance -//purpose : +// function : Tolerance +// purpose : //======================================================================= -inline Standard_Real BRepBuilderAPI_Sewing::Tolerance() const +inline Standard_Real BRepBuilderAPI_Sewing::Tolerance() const { return myTolerance; } - //======================================================================= -//function : SetTolerance -//purpose : +// function : SetTolerance +// purpose : //======================================================================= -inline void BRepBuilderAPI_Sewing::SetTolerance(const Standard_Real theToler) +inline void BRepBuilderAPI_Sewing::SetTolerance(const Standard_Real theToler) { myTolerance = theToler; -} +} //======================================================================= -//function : SetMinTolerance -//purpose : +// function : SetMinTolerance +// purpose : //======================================================================= -inline void BRepBuilderAPI_Sewing::SetMinTolerance(const Standard_Real theMinToler) +inline void BRepBuilderAPI_Sewing::SetMinTolerance(const Standard_Real theMinToler) { myMinTolerance = theMinToler; } //======================================================================= -//function : MinTolerance -//purpose : +// function : MinTolerance +// purpose : //======================================================================= -inline Standard_Real BRepBuilderAPI_Sewing::MinTolerance() const +inline Standard_Real BRepBuilderAPI_Sewing::MinTolerance() const { - return myMinTolerance; + return myMinTolerance; } - + //======================================================================= -//function : SetFaceMode -//purpose : +// function : SetFaceMode +// purpose : //======================================================================= -inline void BRepBuilderAPI_Sewing::SetFaceMode(const Standard_Boolean theFaceMode) +inline void BRepBuilderAPI_Sewing::SetFaceMode(const Standard_Boolean theFaceMode) { myFaceMode = theFaceMode; } - + //======================================================================= -//function : FaceMode -//purpose : +// function : FaceMode +// purpose : //======================================================================= -inline Standard_Boolean BRepBuilderAPI_Sewing::FaceMode() const +inline Standard_Boolean BRepBuilderAPI_Sewing::FaceMode() const { return myFaceMode; } - + //======================================================================= -//function : SetFloatingEdgesMode -//purpose : +// function : SetFloatingEdgesMode +// purpose : //======================================================================= -inline void BRepBuilderAPI_Sewing::SetFloatingEdgesMode(const Standard_Boolean theFloatingEdgesMode) +inline void BRepBuilderAPI_Sewing::SetFloatingEdgesMode(const Standard_Boolean theFloatingEdgesMode) { myFloatingEdgesMode = theFloatingEdgesMode; } - + //======================================================================= -//function : FloatingEdgesMode -//purpose : +// function : FloatingEdgesMode +// purpose : //======================================================================= -inline Standard_Boolean BRepBuilderAPI_Sewing::FloatingEdgesMode() const +inline Standard_Boolean BRepBuilderAPI_Sewing::FloatingEdgesMode() const { return myFloatingEdgesMode; } - + /* //======================================================================= //function : SetCuttingFloatingEdgesMode -//purpose : +//purpose : //======================================================================= -inline void BRepBuilderAPI_Sewing::SetCuttingFloatingEdgesMode(const Standard_Boolean theCuttingFloatingEdgesMode) +inline void BRepBuilderAPI_Sewing::SetCuttingFloatingEdgesMode(const Standard_Boolean +theCuttingFloatingEdgesMode) { myCuttingFloatingEdgesMode = theCuttingFloatingEdgesMode; } - + //======================================================================= //function : CuttingFloatingEdgesMode -//purpose : +//purpose : //======================================================================= inline Standard_Boolean BRepBuilderAPI_Sewing::CuttingFloatingEdgesMode() const @@ -137,48 +137,49 @@ inline Standard_Boolean BRepBuilderAPI_Sewing::CuttingFloatingEdgesMode() const */ //======================================================================= -//function : SameParameterMode -//purpose : +// function : SameParameterMode +// purpose : //======================================================================= -inline Standard_Boolean BRepBuilderAPI_Sewing::SameParameterMode() const +inline Standard_Boolean BRepBuilderAPI_Sewing::SameParameterMode() const { return mySameParameterMode; } - + //======================================================================= -//function : SetSameParameterMode -//purpose : +// function : SetSameParameterMode +// purpose : //======================================================================= -inline void BRepBuilderAPI_Sewing::SetSameParameterMode(const Standard_Boolean SameParameterMode) +inline void BRepBuilderAPI_Sewing::SetSameParameterMode(const Standard_Boolean SameParameterMode) { mySameParameterMode = SameParameterMode; } //======================================================================= -//function : SetLocalTolerancesMode -//purpose : +// function : SetLocalTolerancesMode +// purpose : //======================================================================= -inline void BRepBuilderAPI_Sewing::SetLocalTolerancesMode(const Standard_Boolean theLocalTolerancesMode) +inline void BRepBuilderAPI_Sewing::SetLocalTolerancesMode( + const Standard_Boolean theLocalTolerancesMode) { myLocalToleranceMode = theLocalTolerancesMode; } - + //======================================================================= -//function : LocalTolerancesMode -//purpose : +// function : LocalTolerancesMode +// purpose : //======================================================================= -inline Standard_Boolean BRepBuilderAPI_Sewing::LocalTolerancesMode() const +inline Standard_Boolean BRepBuilderAPI_Sewing::LocalTolerancesMode() const { - return myLocalToleranceMode; + return myLocalToleranceMode; } //======================================================================= -//function : SetNonManifoldMode -//purpose : +// function : SetNonManifoldMode +// purpose : //======================================================================= inline void BRepBuilderAPI_Sewing::SetNonManifoldMode(const Standard_Boolean theNonManifoldMode) @@ -187,11 +188,11 @@ inline void BRepBuilderAPI_Sewing::SetNonManifoldMode(const Standard_Boolean the } //======================================================================= -//function : NonManifoldMode -//purpose : +// function : NonManifoldMode +// purpose : //======================================================================= -inline Standard_Boolean BRepBuilderAPI_Sewing::NonManifoldMode() const +inline Standard_Boolean BRepBuilderAPI_Sewing::NonManifoldMode() const { return myNonmanifold; } diff --git a/opencascade/BRepBuilderAPI_ShapeModification.hxx b/opencascade/BRepBuilderAPI_ShapeModification.hxx index 9b91488a3..92ca98fa3 100644 --- a/opencascade/BRepBuilderAPI_ShapeModification.hxx +++ b/opencascade/BRepBuilderAPI_ShapeModification.hxx @@ -27,11 +27,11 @@ //! constitute the list of operands. enum BRepBuilderAPI_ShapeModification { -BRepBuilderAPI_Preserved, -BRepBuilderAPI_Deleted, -BRepBuilderAPI_Trimmed, -BRepBuilderAPI_Merged, -BRepBuilderAPI_BoundaryModified + BRepBuilderAPI_Preserved, + BRepBuilderAPI_Deleted, + BRepBuilderAPI_Trimmed, + BRepBuilderAPI_Merged, + BRepBuilderAPI_BoundaryModified }; #endif // _BRepBuilderAPI_ShapeModification_HeaderFile diff --git a/opencascade/BRepBuilderAPI_ShellError.hxx b/opencascade/BRepBuilderAPI_ShellError.hxx index b2770e0e1..bda9e00fb 100644 --- a/opencascade/BRepBuilderAPI_ShellError.hxx +++ b/opencascade/BRepBuilderAPI_ShellError.hxx @@ -28,10 +28,10 @@ //! The parameters given to limit the surface are out of its bounds. enum BRepBuilderAPI_ShellError { -BRepBuilderAPI_ShellDone, -BRepBuilderAPI_EmptyShell, -BRepBuilderAPI_DisconnectedShell, -BRepBuilderAPI_ShellParametersOutOfRange + BRepBuilderAPI_ShellDone, + BRepBuilderAPI_EmptyShell, + BRepBuilderAPI_DisconnectedShell, + BRepBuilderAPI_ShellParametersOutOfRange }; #endif // _BRepBuilderAPI_ShellError_HeaderFile diff --git a/opencascade/BRepBuilderAPI_Transform.hxx b/opencascade/BRepBuilderAPI_Transform.hxx index b0cdaa181..6249c2faa 100644 --- a/opencascade/BRepBuilderAPI_Transform.hxx +++ b/opencascade/BRepBuilderAPI_Transform.hxx @@ -26,7 +26,6 @@ #include class TopoDS_Shape; - //! Geometric transformation on a shape. //! The transformation to be applied is defined as a //! gp_Trsf transformation, i.e. a transformation which does @@ -38,18 +37,16 @@ class TopoDS_Shape; //! - defining the geometric transformation to be applied, //! - implementing the transformation algorithm, and //! - consulting the results. -class BRepBuilderAPI_Transform : public BRepBuilderAPI_ModifyShape +class BRepBuilderAPI_Transform : public BRepBuilderAPI_ModifyShape { public: - DEFINE_STANDARD_ALLOC - //! Constructs a framework for applying the geometric //! transformation T to a shape. Use the function Perform //! to define the shape to transform. Standard_EXPORT BRepBuilderAPI_Transform(const gp_Trsf& T); - + //! Creates a transformation from the gp_Trsf , and //! applies it to the shape . If the transformation //! is direct and isometric (determinant = 1) and @@ -63,7 +60,7 @@ public: const gp_Trsf& theTrsf, const Standard_Boolean theCopyGeom = Standard_False, const Standard_Boolean theCopyMesh = Standard_False); - + //! Applies the geometric transformation defined at the //! time of construction of this framework to the shape S. //! - If the transformation T is direct and isometric, in @@ -78,41 +75,23 @@ public: //! Note: this framework can be reused to apply the same //! geometric transformation to other shapes. You only //! need to specify them by calling the function Perform again. - Standard_EXPORT void Perform (const TopoDS_Shape& theShape, - const Standard_Boolean theCopyGeom = Standard_False, - const Standard_Boolean theCopyMesh = Standard_False); - + Standard_EXPORT void Perform(const TopoDS_Shape& theShape, + const Standard_Boolean theCopyGeom = Standard_False, + const Standard_Boolean theCopyMesh = Standard_False); + //! Returns the modified shape corresponding to . - Standard_EXPORT virtual TopoDS_Shape ModifiedShape (const TopoDS_Shape& S) const Standard_OVERRIDE; - + Standard_EXPORT virtual TopoDS_Shape ModifiedShape(const TopoDS_Shape& S) const Standard_OVERRIDE; + //! Returns the list of shapes modified from the shape //! . - Standard_EXPORT virtual const TopTools_ListOfShape& Modified (const TopoDS_Shape& S) Standard_OVERRIDE; - - - + Standard_EXPORT virtual const TopTools_ListOfShape& Modified(const TopoDS_Shape& S) + Standard_OVERRIDE; protected: - - - - - private: - - - - gp_Trsf myTrsf; - TopLoc_Location myLocation; + gp_Trsf myTrsf; + TopLoc_Location myLocation; Standard_Boolean myUseModif; - - }; - - - - - - #endif // _BRepBuilderAPI_Transform_HeaderFile diff --git a/opencascade/BRepBuilderAPI_TransitionMode.hxx b/opencascade/BRepBuilderAPI_TransitionMode.hxx index 44807709f..44fb2a034 100644 --- a/opencascade/BRepBuilderAPI_TransitionMode.hxx +++ b/opencascade/BRepBuilderAPI_TransitionMode.hxx @@ -20,9 +20,9 @@ //! Option to manage discontinuities in Sweep enum BRepBuilderAPI_TransitionMode { -BRepBuilderAPI_Transformed, -BRepBuilderAPI_RightCorner, -BRepBuilderAPI_RoundCorner + BRepBuilderAPI_Transformed, + BRepBuilderAPI_RightCorner, + BRepBuilderAPI_RoundCorner }; #endif // _BRepBuilderAPI_TransitionMode_HeaderFile diff --git a/opencascade/BRepBuilderAPI_VertexInspector.hxx b/opencascade/BRepBuilderAPI_VertexInspector.hxx index 49b419cdc..8f13c7fdb 100644 --- a/opencascade/BRepBuilderAPI_VertexInspector.hxx +++ b/opencascade/BRepBuilderAPI_VertexInspector.hxx @@ -24,9 +24,9 @@ typedef NCollection_Vector VectorOfPoint; //======================================================================= -//! Class BRepBuilderAPI_VertexInspector +//! Class BRepBuilderAPI_VertexInspector //! derived from NCollection_CellFilter_InspectorXYZ -//! This class define the Inspector interface for CellFilter algorithm, +//! This class define the Inspector interface for CellFilter algorithm, //! working with gp_XYZ points in 3d space. //! Used in search of coincidence points with a certain tolerance. //======================================================================= @@ -35,42 +35,33 @@ class BRepBuilderAPI_VertexInspector : public NCollection_CellFilter_InspectorXY { public: typedef Standard_Integer Target; - //! Constructor; remembers the tolerance - BRepBuilderAPI_VertexInspector (const Standard_Real theTol):myTol(theTol*theTol) - {} - //! Keep the points used for comparison - void Add (const gp_XYZ& thePnt) + //! Constructor; remembers the tolerance + BRepBuilderAPI_VertexInspector(const Standard_Real theTol) + : myTol(theTol * theTol) { - myPoints.Append (thePnt); } - + + //! Keep the points used for comparison + void Add(const gp_XYZ& thePnt) { myPoints.Append(thePnt); } + //! Clear the list of adjacent points - void ClearResList() - { - myResInd.Clear(); - } - + void ClearResList() { myResInd.Clear(); } + //! Set current point to search for coincidence - void SetCurrent (const gp_XYZ& theCurPnt) - { - myCurrent = theCurPnt; - } + void SetCurrent(const gp_XYZ& theCurPnt) { myCurrent = theCurPnt; } //! Get list of indexes of points adjacent with the current - const TColStd_ListOfInteger& ResInd() - { - return myResInd; - } + const TColStd_ListOfInteger& ResInd() { return myResInd; } //! Implementation of inspection method - Standard_EXPORT NCollection_CellFilter_Action Inspect (const Standard_Integer theTarget); + Standard_EXPORT NCollection_CellFilter_Action Inspect(const Standard_Integer theTarget); private: - Standard_Real myTol; + Standard_Real myTol; TColStd_ListOfInteger myResInd; - VectorOfPoint myPoints; - gp_XYZ myCurrent; + VectorOfPoint myPoints; + gp_XYZ myCurrent; }; #endif diff --git a/opencascade/BRepBuilderAPI_WireError.hxx b/opencascade/BRepBuilderAPI_WireError.hxx index c1eb82366..e0a5c407d 100644 --- a/opencascade/BRepBuilderAPI_WireError.hxx +++ b/opencascade/BRepBuilderAPI_WireError.hxx @@ -29,10 +29,10 @@ //! The wire with some singularity. enum BRepBuilderAPI_WireError { -BRepBuilderAPI_WireDone, -BRepBuilderAPI_EmptyWire, -BRepBuilderAPI_DisconnectedWire, -BRepBuilderAPI_NonManifoldWire + BRepBuilderAPI_WireDone, + BRepBuilderAPI_EmptyWire, + BRepBuilderAPI_DisconnectedWire, + BRepBuilderAPI_NonManifoldWire }; #endif // _BRepBuilderAPI_WireError_HeaderFile diff --git a/opencascade/BRepCheck.hxx b/opencascade/BRepCheck.hxx index aec962a19..5fe2d5c74 100644 --- a/opencascade/BRepCheck.hxx +++ b/opencascade/BRepCheck.hxx @@ -27,28 +27,27 @@ class TopoDS_Face; class TopoDS_Edge; class Adaptor3d_Curve; - //! This package provides tools to check the validity //! of the BRep. -class BRepCheck +class BRepCheck { public: - DEFINE_STANDARD_ALLOC - - Standard_EXPORT static void Add (BRepCheck_ListOfStatus& List, const BRepCheck_Status Stat); - - Standard_EXPORT static void Print (const BRepCheck_Status Stat, Standard_OStream& OS); - - Standard_EXPORT static Standard_Boolean SelfIntersection (const TopoDS_Wire& W, const TopoDS_Face& F, TopoDS_Edge& E1, TopoDS_Edge& E2); + Standard_EXPORT static void Add(BRepCheck_ListOfStatus& List, const BRepCheck_Status Stat); + + Standard_EXPORT static void Print(const BRepCheck_Status Stat, Standard_OStream& OS); + + Standard_EXPORT static Standard_Boolean SelfIntersection(const TopoDS_Wire& W, + const TopoDS_Face& F, + TopoDS_Edge& E1, + TopoDS_Edge& E2); //! Returns the resolution on the 3d curve Standard_EXPORT static Standard_Real PrecCurve(const Adaptor3d_Curve& aAC3D); //! Returns the resolution on the surface Standard_EXPORT static Standard_Real PrecSurface(const Handle(Adaptor3d_Surface)& aAHSurf); - }; #endif // _BRepCheck_HeaderFile diff --git a/opencascade/BRepCheck_Analyzer.hxx b/opencascade/BRepCheck_Analyzer.hxx index b71f0490b..31fb8b12b 100644 --- a/opencascade/BRepCheck_Analyzer.hxx +++ b/opencascade/BRepCheck_Analyzer.hxx @@ -33,10 +33,9 @@ class BRepCheck_Result; //! Once you have determined whether a shape is valid or not, you can //! diagnose its specific anomalies and correct them using the services of //! the ShapeAnalysis, ShapeUpgrade, and ShapeFix packages. -class BRepCheck_Analyzer +class BRepCheck_Analyzer { public: - DEFINE_STANDARD_ALLOC //! Constructs a shape validation object defined by the shape S. @@ -56,14 +55,14 @@ public: //! BRepCheck_InvalidToleranceValue NYI //! For a wire : //! BRepCheck_SelfIntersectingWire - BRepCheck_Analyzer (const TopoDS_Shape& S, - const Standard_Boolean GeomControls = Standard_True, - const Standard_Boolean theIsParallel = Standard_False, - const Standard_Boolean theIsExact = Standard_False) - : myIsParallel(theIsParallel), - myIsExact(theIsExact) + BRepCheck_Analyzer(const TopoDS_Shape& S, + const Standard_Boolean GeomControls = Standard_True, + const Standard_Boolean theIsParallel = Standard_False, + const Standard_Boolean theIsExact = Standard_False) + : myIsParallel(theIsParallel), + myIsExact(theIsExact) { - Init (S, GeomControls); + Init(S, GeomControls); } //! is the shape to control. If @@ -82,42 +81,30 @@ public: //! BRepCheck_InvalidTolerance NYI //! For a wire : //! BRepCheck_SelfIntersectingWire - Standard_EXPORT void Init (const TopoDS_Shape& S, - const Standard_Boolean GeomControls = Standard_True); + Standard_EXPORT void Init(const TopoDS_Shape& S, + const Standard_Boolean GeomControls = Standard_True); //! Sets method to calculate distance: Calculating in finite number of points (if theIsExact - //! is false, faster, but possible not correct result) or exact calculating by using + //! is false, faster, but possible not correct result) or exact calculating by using //! BRepLib_CheckCurveOnSurface class (if theIsExact is true, slowly, but more correctly). //! Exact method is used only when edge is SameParameter. //! Default method is calculating in finite number of points - void SetExactMethod(const Standard_Boolean theIsExact) - { - myIsExact = theIsExact; - } + void SetExactMethod(const Standard_Boolean theIsExact) { myIsExact = theIsExact; } //! Returns true if exact method selected - Standard_Boolean IsExactMethod() - { - return myIsExact; - } + Standard_Boolean IsExactMethod() { return myIsExact; } //! Sets parallel flag - void SetParallel(const Standard_Boolean theIsParallel) - { - myIsParallel = theIsParallel; - } + void SetParallel(const Standard_Boolean theIsParallel) { myIsParallel = theIsParallel; } //! Returns true if parallel flag is set - Standard_Boolean IsParallel() - { - return myIsParallel; - } + Standard_Boolean IsParallel() { return myIsParallel; } //! is a subshape of the original shape. Returns //! if no default has been detected on //! and any of its subshape. - Standard_EXPORT Standard_Boolean IsValid (const TopoDS_Shape& S) const; - + Standard_EXPORT Standard_Boolean IsValid(const TopoDS_Shape& S) const; + //! Returns true if no defect is //! detected on the shape S or any of its subshapes. //! Returns true if the shape S is valid. @@ -157,32 +144,26 @@ public: //! surface of the reference face), this checks that |C(t) - S(P(t))| //! is less than or equal to tolerance, where tolerance is the tolerance //! value coded on the edge. - Standard_Boolean IsValid() const - { - return IsValid (myShape); - } + Standard_Boolean IsValid() const { return IsValid(myShape); } - const Handle(BRepCheck_Result)& Result (const TopoDS_Shape& theSubS) const + const Handle(BRepCheck_Result)& Result(const TopoDS_Shape& theSubS) const { - return myMap.FindFromKey (theSubS); + return myMap.FindFromKey(theSubS); } private: - - Standard_EXPORT void Put (const TopoDS_Shape& S, - const Standard_Boolean Gctrl); + Standard_EXPORT void Put(const TopoDS_Shape& S, const Standard_Boolean Gctrl); Standard_EXPORT void Perform(); - Standard_EXPORT Standard_Boolean ValidSub (const TopoDS_Shape& S, const TopAbs_ShapeEnum SubType) const; + Standard_EXPORT Standard_Boolean ValidSub(const TopoDS_Shape& S, + const TopAbs_ShapeEnum SubType) const; private: - - TopoDS_Shape myShape; + TopoDS_Shape myShape; BRepCheck_IndexedDataMapOfShapeResult myMap; - Standard_Boolean myIsParallel; - Standard_Boolean myIsExact; - + Standard_Boolean myIsParallel; + Standard_Boolean myIsExact; }; #endif // _BRepCheck_Analyzer_HeaderFile diff --git a/opencascade/BRepCheck_DataMapOfShapeListOfStatus.hxx b/opencascade/BRepCheck_DataMapOfShapeListOfStatus.hxx index 69c1383ef..cbaca48f6 100644 --- a/opencascade/BRepCheck_DataMapOfShapeListOfStatus.hxx +++ b/opencascade/BRepCheck_DataMapOfShapeListOfStatus.hxx @@ -24,12 +24,12 @@ #include typedef NCollection_DataMap), - TopTools_ShapeMapHasher> + Handle(NCollection_Shared), + TopTools_ShapeMapHasher> BRepCheck_DataMapOfShapeListOfStatus; typedef NCollection_DataMap), - TopTools_ShapeMapHasher>::Iterator + Handle(NCollection_Shared), + TopTools_ShapeMapHasher>::Iterator BRepCheck_DataMapIteratorOfDataMapOfShapeListOfStatus; #endif diff --git a/opencascade/BRepCheck_Edge.hxx b/opencascade/BRepCheck_Edge.hxx index 3a8ef877c..daf9a3974 100644 --- a/opencascade/BRepCheck_Edge.hxx +++ b/opencascade/BRepCheck_Edge.hxx @@ -28,59 +28,48 @@ class TopoDS_Shape; class BRepCheck_Edge; DEFINE_STANDARD_HANDLE(BRepCheck_Edge, BRepCheck_Result) - class BRepCheck_Edge : public BRepCheck_Result { public: - - Standard_EXPORT BRepCheck_Edge(const TopoDS_Edge& E); - - Standard_EXPORT void InContext (const TopoDS_Shape& ContextShape) Standard_OVERRIDE; - + + Standard_EXPORT void InContext(const TopoDS_Shape& ContextShape) Standard_OVERRIDE; + Standard_EXPORT void Minimum() Standard_OVERRIDE; - + Standard_EXPORT void Blind() Standard_OVERRIDE; - + Standard_EXPORT Standard_Boolean GeometricControls() const; - - Standard_EXPORT void GeometricControls (const Standard_Boolean B); - + + Standard_EXPORT void GeometricControls(const Standard_Boolean B); + Standard_EXPORT Standard_Real Tolerance(); - + //! Sets status of Edge; - Standard_EXPORT void SetStatus (const BRepCheck_Status theStatus); + Standard_EXPORT void SetStatus(const BRepCheck_Status theStatus); //! Sets method to calculate distance: Calculating in finite number of points (if theIsExact - //! is false, faster, but possible not correct result) or exact calculating by using + //! is false, faster, but possible not correct result) or exact calculating by using //! BRepLib_CheckCurveOnSurface class (if theIsExact is true, slowly, but more correctly). //! Exact method is used only when edge is SameParameter. //! Default method is calculating in finite number of points - void SetExactMethod(Standard_Boolean theIsExact) - { - myIsExactMethod = theIsExact; - } - + void SetExactMethod(Standard_Boolean theIsExact) { myIsExactMethod = theIsExact; } + //! Returns true if exact method selected - Standard_Boolean IsExactMethod() - { - return myIsExactMethod; - } + Standard_Boolean IsExactMethod() { return myIsExactMethod; } //! Checks, if polygon on triangulation of heEdge //! is out of 3D-curve of this edge. - Standard_EXPORT BRepCheck_Status CheckPolygonOnTriangulation (const TopoDS_Edge& theEdge); + Standard_EXPORT BRepCheck_Status CheckPolygonOnTriangulation(const TopoDS_Edge& theEdge); - DEFINE_STANDARD_RTTIEXT(BRepCheck_Edge,BRepCheck_Result) + DEFINE_STANDARD_RTTIEXT(BRepCheck_Edge, BRepCheck_Result) private: - - Handle(BRep_CurveRepresentation) myCref; - Handle(Adaptor3d_Curve) myHCurve; - Standard_Boolean myGctrl; - Standard_Boolean myIsExactMethod; + Handle(Adaptor3d_Curve) myHCurve; + Standard_Boolean myGctrl; + Standard_Boolean myIsExactMethod; }; #endif // _BRepCheck_Edge_HeaderFile diff --git a/opencascade/BRepCheck_Face.hxx b/opencascade/BRepCheck_Face.hxx index 741a9954b..ae6db5eb4 100644 --- a/opencascade/BRepCheck_Face.hxx +++ b/opencascade/BRepCheck_Face.hxx @@ -26,71 +26,51 @@ class TopoDS_Face; class TopoDS_Shape; - class BRepCheck_Face; DEFINE_STANDARD_HANDLE(BRepCheck_Face, BRepCheck_Result) - class BRepCheck_Face : public BRepCheck_Result { public: - - Standard_EXPORT BRepCheck_Face(const TopoDS_Face& F); - - Standard_EXPORT void InContext (const TopoDS_Shape& ContextShape) Standard_OVERRIDE; - - Standard_EXPORT void Minimum() Standard_OVERRIDE; - - Standard_EXPORT void Blind() Standard_OVERRIDE; - - Standard_EXPORT BRepCheck_Status IntersectWires (const Standard_Boolean Update = Standard_False); - - Standard_EXPORT BRepCheck_Status ClassifyWires (const Standard_Boolean Update = Standard_False); - - Standard_EXPORT BRepCheck_Status OrientationOfWires (const Standard_Boolean Update = Standard_False); - - Standard_EXPORT void SetUnorientable(); - - //! Sets status of Face; - Standard_EXPORT void SetStatus (const BRepCheck_Status theStatus); - - Standard_EXPORT Standard_Boolean IsUnorientable() const; - - Standard_EXPORT Standard_Boolean GeometricControls() const; - - Standard_EXPORT void GeometricControls (const Standard_Boolean B); + Standard_EXPORT void InContext(const TopoDS_Shape& ContextShape) Standard_OVERRIDE; + Standard_EXPORT void Minimum() Standard_OVERRIDE; + Standard_EXPORT void Blind() Standard_OVERRIDE; - DEFINE_STANDARD_RTTIEXT(BRepCheck_Face,BRepCheck_Result) + Standard_EXPORT BRepCheck_Status IntersectWires(const Standard_Boolean Update = Standard_False); -protected: + Standard_EXPORT BRepCheck_Status ClassifyWires(const Standard_Boolean Update = Standard_False); + Standard_EXPORT BRepCheck_Status + OrientationOfWires(const Standard_Boolean Update = Standard_False); + Standard_EXPORT void SetUnorientable(); + //! Sets status of Face; + Standard_EXPORT void SetStatus(const BRepCheck_Status theStatus); -private: + Standard_EXPORT Standard_Boolean IsUnorientable() const; + Standard_EXPORT Standard_Boolean GeometricControls() const; - Standard_Boolean myIntdone; - BRepCheck_Status myIntres; - Standard_Boolean myImbdone; - BRepCheck_Status myImbres; - Standard_Boolean myOridone; - BRepCheck_Status myOrires; - TopTools_DataMapOfShapeListOfShape myMapImb; - Standard_Boolean myGctrl; + Standard_EXPORT void GeometricControls(const Standard_Boolean B); + DEFINE_STANDARD_RTTIEXT(BRepCheck_Face, BRepCheck_Result) +protected: +private: + Standard_Boolean myIntdone; + BRepCheck_Status myIntres; + Standard_Boolean myImbdone; + BRepCheck_Status myImbres; + Standard_Boolean myOridone; + BRepCheck_Status myOrires; + TopTools_DataMapOfShapeListOfShape myMapImb; + Standard_Boolean myGctrl; }; - - - - - - #endif // _BRepCheck_Face_HeaderFile diff --git a/opencascade/BRepCheck_IndexedDataMapOfShapeResult.hxx b/opencascade/BRepCheck_IndexedDataMapOfShapeResult.hxx index 8caadefa2..7a14e7d2f 100644 --- a/opencascade/BRepCheck_IndexedDataMapOfShapeResult.hxx +++ b/opencascade/BRepCheck_IndexedDataMapOfShapeResult.hxx @@ -21,7 +21,7 @@ #include #include -typedef NCollection_IndexedDataMap BRepCheck_IndexedDataMapOfShapeResult; - +typedef NCollection_IndexedDataMap + BRepCheck_IndexedDataMapOfShapeResult; #endif diff --git a/opencascade/BRepCheck_ListIteratorOfListOfStatus.hxx b/opencascade/BRepCheck_ListIteratorOfListOfStatus.hxx index 7a946c6c8..08c2842d9 100644 --- a/opencascade/BRepCheck_ListIteratorOfListOfStatus.hxx +++ b/opencascade/BRepCheck_ListIteratorOfListOfStatus.hxx @@ -11,7 +11,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. - #ifndef BRepCheck_ListIteratorOfListOfStatus_HeaderFile #define BRepCheck_ListIteratorOfListOfStatus_HeaderFile diff --git a/opencascade/BRepCheck_ListOfStatus.hxx b/opencascade/BRepCheck_ListOfStatus.hxx index edf7b0beb..42ffcab83 100644 --- a/opencascade/BRepCheck_ListOfStatus.hxx +++ b/opencascade/BRepCheck_ListOfStatus.hxx @@ -21,9 +21,8 @@ #include #include -typedef NCollection_List BRepCheck_ListOfStatus; +typedef NCollection_List BRepCheck_ListOfStatus; typedef NCollection_List::Iterator BRepCheck_ListIteratorOfListOfStatus; -typedef NCollection_Shared BRepCheck_HListOfStatus; - +typedef NCollection_Shared BRepCheck_HListOfStatus; #endif diff --git a/opencascade/BRepCheck_Result.hxx b/opencascade/BRepCheck_Result.hxx index 7ba169502..022e0108e 100644 --- a/opencascade/BRepCheck_Result.hxx +++ b/opencascade/BRepCheck_Result.hxx @@ -24,26 +24,23 @@ #include #include - DEFINE_STANDARD_HANDLE(BRepCheck_Result, Standard_Transient) - class BRepCheck_Result : public Standard_Transient { public: + Standard_EXPORT void Init(const TopoDS_Shape& S); + + Standard_EXPORT virtual void InContext(const TopoDS_Shape& ContextShape) = 0; - Standard_EXPORT void Init (const TopoDS_Shape& S); - - Standard_EXPORT virtual void InContext (const TopoDS_Shape& ContextShape) = 0; - Standard_EXPORT virtual void Minimum() = 0; - + Standard_EXPORT virtual void Blind() = 0; - Standard_EXPORT void SetFailStatus (const TopoDS_Shape& S); + Standard_EXPORT void SetFailStatus(const TopoDS_Shape& S); - const BRepCheck_ListOfStatus& Status() const { return *myMap (myShape); } + const BRepCheck_ListOfStatus& Status() const { return *myMap(myShape); } Standard_Boolean IsMinimum() const { return myMin; } @@ -59,45 +56,37 @@ public: Standard_EXPORT void NextShapeInContext(); - Standard_EXPORT void SetParallel (Standard_Boolean theIsParallel); + Standard_EXPORT void SetParallel(Standard_Boolean theIsParallel); - Standard_Boolean IsStatusOnShape (const TopoDS_Shape& theShape) const + Standard_Boolean IsStatusOnShape(const TopoDS_Shape& theShape) const { - return myMap.IsBound (theShape); + return myMap.IsBound(theShape); } - const BRepCheck_ListOfStatus& StatusOnShape (const TopoDS_Shape& theShape) const + const BRepCheck_ListOfStatus& StatusOnShape(const TopoDS_Shape& theShape) const { - return *myMap.Find (theShape); + return *myMap.Find(theShape); } friend class BRepCheck_ParallelAnalyzer; - DEFINE_STANDARD_RTTIEXT(BRepCheck_Result,Standard_Transient) + DEFINE_STANDARD_RTTIEXT(BRepCheck_Result, Standard_Transient) protected: - Standard_EXPORT BRepCheck_Result(); protected: - - TopoDS_Shape myShape; - Standard_Boolean myMin; - Standard_Boolean myBlind; + TopoDS_Shape myShape; + Standard_Boolean myMin; + Standard_Boolean myBlind; BRepCheck_DataMapOfShapeListOfStatus myMap; - mutable Handle(Standard_HMutex) myMutex; + mutable Handle(Standard_HMutex) myMutex; private: - - Standard_HMutex* GetMutex() - { - return myMutex.get(); - } + Standard_HMutex* GetMutex() { return myMutex.get(); } private: - BRepCheck_DataMapIteratorOfDataMapOfShapeListOfStatus myIter; - }; #endif // _BRepCheck_Result_HeaderFile diff --git a/opencascade/BRepCheck_Shell.hxx b/opencascade/BRepCheck_Shell.hxx index e5535a860..e10fb86b3 100644 --- a/opencascade/BRepCheck_Shell.hxx +++ b/opencascade/BRepCheck_Shell.hxx @@ -26,70 +26,49 @@ class TopoDS_Shell; class TopoDS_Shape; - class BRepCheck_Shell; DEFINE_STANDARD_HANDLE(BRepCheck_Shell, BRepCheck_Result) - class BRepCheck_Shell : public BRepCheck_Result { public: - - Standard_EXPORT BRepCheck_Shell(const TopoDS_Shell& S); - - Standard_EXPORT void InContext (const TopoDS_Shape& ContextShape) Standard_OVERRIDE; - + + Standard_EXPORT void InContext(const TopoDS_Shape& ContextShape) Standard_OVERRIDE; + Standard_EXPORT void Minimum() Standard_OVERRIDE; - + Standard_EXPORT void Blind() Standard_OVERRIDE; - + //! Checks if the oriented faces of the shell give a //! closed shell. If the wire is closed, returns //! BRepCheck_NoError.If is set to //! Standard_True, registers the status in the list. - Standard_EXPORT BRepCheck_Status Closed (const Standard_Boolean Update = Standard_False); - + Standard_EXPORT BRepCheck_Status Closed(const Standard_Boolean Update = Standard_False); + //! Checks if the oriented faces of the shell are //! correctly oriented. An internal call is made to //! the method Closed. If is set to //! Standard_True, registers the status in the list. - Standard_EXPORT BRepCheck_Status Orientation (const Standard_Boolean Update = Standard_False); - - Standard_EXPORT void SetUnorientable(); - - Standard_EXPORT Standard_Boolean IsUnorientable() const; - - Standard_EXPORT Standard_Integer NbConnectedSet (TopTools_ListOfShape& theSets); + Standard_EXPORT BRepCheck_Status Orientation(const Standard_Boolean Update = Standard_False); + Standard_EXPORT void SetUnorientable(); + Standard_EXPORT Standard_Boolean IsUnorientable() const; + Standard_EXPORT Standard_Integer NbConnectedSet(TopTools_ListOfShape& theSets); - DEFINE_STANDARD_RTTIEXT(BRepCheck_Shell,BRepCheck_Result) + DEFINE_STANDARD_RTTIEXT(BRepCheck_Shell, BRepCheck_Result) protected: - - - - private: - - - Standard_Integer myNbori; - Standard_Boolean myCdone; - BRepCheck_Status myCstat; - Standard_Boolean myOdone; - BRepCheck_Status myOstat; + Standard_Integer myNbori; + Standard_Boolean myCdone; + BRepCheck_Status myCstat; + Standard_Boolean myOdone; + BRepCheck_Status myOstat; TopTools_IndexedDataMapOfShapeListOfShape myMapEF; - - }; - - - - - - #endif // _BRepCheck_Shell_HeaderFile diff --git a/opencascade/BRepCheck_Solid.hxx b/opencascade/BRepCheck_Solid.hxx index 65adff458..d07877088 100644 --- a/opencascade/BRepCheck_Solid.hxx +++ b/opencascade/BRepCheck_Solid.hxx @@ -22,7 +22,6 @@ class TopoDS_Solid; class TopoDS_Shape; - class BRepCheck_Solid; DEFINE_STANDARD_HANDLE(BRepCheck_Solid, BRepCheck_Result) @@ -31,18 +30,13 @@ class BRepCheck_Solid : public BRepCheck_Result { public: - - - //! Constructor //! is the solid to check Standard_EXPORT BRepCheck_Solid(const TopoDS_Solid& theS); - //! Checks the solid in context of //! the shape - Standard_EXPORT virtual void InContext (const TopoDS_Shape& theContextShape) Standard_OVERRIDE; - + Standard_EXPORT virtual void InContext(const TopoDS_Shape& theContextShape) Standard_OVERRIDE; //! Checks the solid per se. //! @@ -63,32 +57,14 @@ public: //! (for non-holes) //! Status: BRepCheck_EnclosedRegion Standard_EXPORT virtual void Minimum() Standard_OVERRIDE; - //! see the parent class for more details Standard_EXPORT virtual void Blind() Standard_OVERRIDE; - - - - DEFINE_STANDARD_RTTIEXT(BRepCheck_Solid,BRepCheck_Result) + DEFINE_STANDARD_RTTIEXT(BRepCheck_Solid, BRepCheck_Result) protected: - - - - private: - - - - }; - - - - - - #endif // _BRepCheck_Solid_HeaderFile diff --git a/opencascade/BRepCheck_Status.hxx b/opencascade/BRepCheck_Status.hxx index 1990d2873..7b817a7fe 100644 --- a/opencascade/BRepCheck_Status.hxx +++ b/opencascade/BRepCheck_Status.hxx @@ -17,46 +17,45 @@ #ifndef _BRepCheck_Status_HeaderFile #define _BRepCheck_Status_HeaderFile - enum BRepCheck_Status { -BRepCheck_NoError, -BRepCheck_InvalidPointOnCurve, -BRepCheck_InvalidPointOnCurveOnSurface, -BRepCheck_InvalidPointOnSurface, -BRepCheck_No3DCurve, -BRepCheck_Multiple3DCurve, -BRepCheck_Invalid3DCurve, -BRepCheck_NoCurveOnSurface, -BRepCheck_InvalidCurveOnSurface, -BRepCheck_InvalidCurveOnClosedSurface, -BRepCheck_InvalidSameRangeFlag, -BRepCheck_InvalidSameParameterFlag, -BRepCheck_InvalidDegeneratedFlag, -BRepCheck_FreeEdge, -BRepCheck_InvalidMultiConnexity, -BRepCheck_InvalidRange, -BRepCheck_EmptyWire, -BRepCheck_RedundantEdge, -BRepCheck_SelfIntersectingWire, -BRepCheck_NoSurface, -BRepCheck_InvalidWire, -BRepCheck_RedundantWire, -BRepCheck_IntersectingWires, -BRepCheck_InvalidImbricationOfWires, -BRepCheck_EmptyShell, -BRepCheck_RedundantFace, -BRepCheck_InvalidImbricationOfShells, -BRepCheck_UnorientableShape, -BRepCheck_NotClosed, -BRepCheck_NotConnected, -BRepCheck_SubshapeNotInShape, -BRepCheck_BadOrientation, -BRepCheck_BadOrientationOfSubshape, -BRepCheck_InvalidPolygonOnTriangulation, -BRepCheck_InvalidToleranceValue, -BRepCheck_EnclosedRegion, -BRepCheck_CheckFail + BRepCheck_NoError, + BRepCheck_InvalidPointOnCurve, + BRepCheck_InvalidPointOnCurveOnSurface, + BRepCheck_InvalidPointOnSurface, + BRepCheck_No3DCurve, + BRepCheck_Multiple3DCurve, + BRepCheck_Invalid3DCurve, + BRepCheck_NoCurveOnSurface, + BRepCheck_InvalidCurveOnSurface, + BRepCheck_InvalidCurveOnClosedSurface, + BRepCheck_InvalidSameRangeFlag, + BRepCheck_InvalidSameParameterFlag, + BRepCheck_InvalidDegeneratedFlag, + BRepCheck_FreeEdge, + BRepCheck_InvalidMultiConnexity, + BRepCheck_InvalidRange, + BRepCheck_EmptyWire, + BRepCheck_RedundantEdge, + BRepCheck_SelfIntersectingWire, + BRepCheck_NoSurface, + BRepCheck_InvalidWire, + BRepCheck_RedundantWire, + BRepCheck_IntersectingWires, + BRepCheck_InvalidImbricationOfWires, + BRepCheck_EmptyShell, + BRepCheck_RedundantFace, + BRepCheck_InvalidImbricationOfShells, + BRepCheck_UnorientableShape, + BRepCheck_NotClosed, + BRepCheck_NotConnected, + BRepCheck_SubshapeNotInShape, + BRepCheck_BadOrientation, + BRepCheck_BadOrientationOfSubshape, + BRepCheck_InvalidPolygonOnTriangulation, + BRepCheck_InvalidToleranceValue, + BRepCheck_EnclosedRegion, + BRepCheck_CheckFail }; #endif // _BRepCheck_Status_HeaderFile diff --git a/opencascade/BRepCheck_Vertex.hxx b/opencascade/BRepCheck_Vertex.hxx index b17f0d403..25195c22c 100644 --- a/opencascade/BRepCheck_Vertex.hxx +++ b/opencascade/BRepCheck_Vertex.hxx @@ -24,48 +24,27 @@ class TopoDS_Vertex; class TopoDS_Shape; - class BRepCheck_Vertex; DEFINE_STANDARD_HANDLE(BRepCheck_Vertex, BRepCheck_Result) - class BRepCheck_Vertex : public BRepCheck_Result { public: - - Standard_EXPORT BRepCheck_Vertex(const TopoDS_Vertex& V); - - Standard_EXPORT void InContext (const TopoDS_Shape& ContextShape) Standard_OVERRIDE; - - Standard_EXPORT void Minimum() Standard_OVERRIDE; - - Standard_EXPORT void Blind() Standard_OVERRIDE; - - Standard_EXPORT Standard_Real Tolerance(); + Standard_EXPORT void InContext(const TopoDS_Shape& ContextShape) Standard_OVERRIDE; + Standard_EXPORT void Minimum() Standard_OVERRIDE; + Standard_EXPORT void Blind() Standard_OVERRIDE; - DEFINE_STANDARD_RTTIEXT(BRepCheck_Vertex,BRepCheck_Result) - -protected: - - + Standard_EXPORT Standard_Real Tolerance(); + DEFINE_STANDARD_RTTIEXT(BRepCheck_Vertex, BRepCheck_Result) +protected: private: - - - - }; - - - - - - #endif // _BRepCheck_Vertex_HeaderFile diff --git a/opencascade/BRepCheck_Wire.hxx b/opencascade/BRepCheck_Wire.hxx index 6beeda0cb..500acde92 100644 --- a/opencascade/BRepCheck_Wire.hxx +++ b/opencascade/BRepCheck_Wire.hxx @@ -28,31 +28,27 @@ class TopoDS_Shape; class TopoDS_Face; class TopoDS_Edge; - class BRepCheck_Wire; DEFINE_STANDARD_HANDLE(BRepCheck_Wire, BRepCheck_Result) - class BRepCheck_Wire : public BRepCheck_Result { public: - - Standard_EXPORT BRepCheck_Wire(const TopoDS_Wire& W); - + //! if is a face, consequently checks //! SelfIntersect(), Closed(), Orientation() and //! Closed2d until faulty is found - Standard_EXPORT void InContext (const TopoDS_Shape& ContextShape) Standard_OVERRIDE; - + Standard_EXPORT void InContext(const TopoDS_Shape& ContextShape) Standard_OVERRIDE; + //! checks that the wire is not empty and "connex". //! Called by constructor Standard_EXPORT void Minimum() Standard_OVERRIDE; - + //! Does nothing Standard_EXPORT void Blind() Standard_OVERRIDE; - + //! Checks if the oriented edges of the wire give a //! closed wire. If the wire is closed, returns //! BRepCheck_NoError. Warning : if the first and @@ -66,15 +62,16 @@ public: //! more than 3 times or in case of 2 occurrences if //! not with FORWARD and REVERSED orientation. //! **BRepCheck_NoError - Standard_EXPORT BRepCheck_Status Closed (const Standard_Boolean Update = Standard_False); - + Standard_EXPORT BRepCheck_Status Closed(const Standard_Boolean Update = Standard_False); + //! Checks if edges of the wire give a wire closed in //! 2d space. //! Returns BRepCheck_NoError, or BRepCheck_NotClosed //! If is set to Standard_True, registers the //! status in the list. - Standard_EXPORT BRepCheck_Status Closed2d (const TopoDS_Face& F, const Standard_Boolean Update = Standard_False); - + Standard_EXPORT BRepCheck_Status Closed2d(const TopoDS_Face& F, + const Standard_Boolean Update = Standard_False); + //! Checks if the oriented edges of the wire are //! correctly oriented. An internal call is made to //! the method Closed. If no face exists, call the @@ -86,8 +83,9 @@ public: //! BRepCheck_BadOrientationOfSubshape, //! BRepCheck_NotClosed, //! BRepCheck_NoError - Standard_EXPORT BRepCheck_Status Orientation (const TopoDS_Face& F, const Standard_Boolean Update = Standard_False); - + Standard_EXPORT BRepCheck_Status Orientation(const TopoDS_Face& F, + const Standard_Boolean Update = Standard_False); + //! Checks if the wire intersect itself on the face //! . and are the first intersecting //! edges found. may be a null edge when a @@ -99,42 +97,28 @@ public: //! BRepCheck_SelfIntersectingWire, //! BRepCheck_NoCurveOnSurface, //! BRepCheck_NoError - Standard_EXPORT BRepCheck_Status SelfIntersect (const TopoDS_Face& F, TopoDS_Edge& E1, TopoDS_Edge& E2, const Standard_Boolean Update = Standard_False); - + Standard_EXPORT BRepCheck_Status SelfIntersect(const TopoDS_Face& F, + TopoDS_Edge& E1, + TopoDS_Edge& E2, + const Standard_Boolean Update = Standard_False); + //! report SelfIntersect() check would be (is) done Standard_EXPORT Standard_Boolean GeometricControls() const; - - //! set SelfIntersect() to be checked - Standard_EXPORT void GeometricControls (const Standard_Boolean B); - - //! Sets status of Wire; - Standard_EXPORT void SetStatus (const BRepCheck_Status theStatus); - + //! set SelfIntersect() to be checked + Standard_EXPORT void GeometricControls(const Standard_Boolean B); + //! Sets status of Wire; + Standard_EXPORT void SetStatus(const BRepCheck_Status theStatus); - DEFINE_STANDARD_RTTIEXT(BRepCheck_Wire,BRepCheck_Result) + DEFINE_STANDARD_RTTIEXT(BRepCheck_Wire, BRepCheck_Result) protected: - - - - private: - - - Standard_Boolean myCdone; - BRepCheck_Status myCstat; + Standard_Boolean myCdone; + BRepCheck_Status myCstat; TopTools_IndexedDataMapOfShapeListOfShape myMapVE; - Standard_Boolean myGctrl; - - + Standard_Boolean myGctrl; }; - - - - - - #endif // _BRepCheck_Wire_HeaderFile diff --git a/opencascade/BRepClass3d.hxx b/opencascade/BRepClass3d.hxx index 2fb50307e..5812168ec 100644 --- a/opencascade/BRepClass3d.hxx +++ b/opencascade/BRepClass3d.hxx @@ -24,20 +24,15 @@ class TopoDS_Shell; class TopoDS_Solid; - - -class BRepClass3d +class BRepClass3d { public: - DEFINE_STANDARD_ALLOC - //! Returns the outer most shell of . Returns a Null //! shell if has no outer shell. //! If has only one shell, then it will return, without checking orientation. - Standard_EXPORT static TopoDS_Shell OuterShell (const TopoDS_Solid& S); - + Standard_EXPORT static TopoDS_Shell OuterShell(const TopoDS_Solid& S); }; #endif // _BRepClass3d_HeaderFile diff --git a/opencascade/BRepClass3d_BndBoxTree.hxx b/opencascade/BRepClass3d_BndBoxTree.hxx index a817324ab..2edf4d473 100644 --- a/opencascade/BRepClass3d_BndBoxTree.hxx +++ b/opencascade/BRepClass3d_BndBoxTree.hxx @@ -15,7 +15,6 @@ #ifndef _BRepClass3d_BndBoxTree_HeaderFile #define _BRepClass3d_BndBoxTree_HeaderFile - #include #include #include @@ -28,108 +27,93 @@ #include // Typedef to reduce code complexity. -typedef NCollection_UBTree BRepClass3d_BndBoxTree; +typedef NCollection_UBTree BRepClass3d_BndBoxTree; // Class representing tree selector for point object. class BRepClass3d_BndBoxTreeSelectorPoint : public BRepClass3d_BndBoxTree::Selector { public: BRepClass3d_BndBoxTreeSelectorPoint(const TopTools_IndexedMapOfShape& theMapOfShape) - : BRepClass3d_BndBoxTreeSelectorPoint::Selector(), myMapOfShape (theMapOfShape) - {} - - Standard_Boolean Reject (const Bnd_Box& theBox) const + : BRepClass3d_BndBoxTreeSelectorPoint::Selector(), + myMapOfShape(theMapOfShape) { - return (theBox.IsOut (myP)); } - Standard_Boolean Accept (const Standard_Integer& theObj); + Standard_Boolean Reject(const Bnd_Box& theBox) const { return (theBox.IsOut(myP)); } + + Standard_Boolean Accept(const Standard_Integer& theObj); // Sets current point for boxes-point collisions. - void SetCurrentPoint (const gp_Pnt& theP) - { - myP = theP; - } + void SetCurrentPoint(const gp_Pnt& theP) { myP = theP; } private: - BRepClass3d_BndBoxTreeSelectorPoint(const BRepClass3d_BndBoxTreeSelectorPoint& ); - BRepClass3d_BndBoxTreeSelectorPoint& operator=(const BRepClass3d_BndBoxTreeSelectorPoint& ); + BRepClass3d_BndBoxTreeSelectorPoint(const BRepClass3d_BndBoxTreeSelectorPoint&); + BRepClass3d_BndBoxTreeSelectorPoint& operator=(const BRepClass3d_BndBoxTreeSelectorPoint&); private: - const TopTools_IndexedMapOfShape& myMapOfShape; //shapes (vertices + edges) - gp_Pnt myP; + const TopTools_IndexedMapOfShape& myMapOfShape; // shapes (vertices + edges) + gp_Pnt myP; }; // Class representing tree selector for line object. class BRepClass3d_BndBoxTreeSelectorLine : public BRepClass3d_BndBoxTree::Selector { public: - struct EdgeParam { - TopoDS_Edge myE; - Standard_Real myParam; //par on myE - Standard_Real myLParam; //par on line + TopoDS_Edge myE; + Standard_Real myParam; // par on myE + Standard_Real myLParam; // par on line }; struct VertParam { TopoDS_Vertex myV; - Standard_Real myLParam; //par on line + Standard_Real myLParam; // par on line }; - public: - BRepClass3d_BndBoxTreeSelectorLine(const TopTools_IndexedMapOfShape& theMapOfShape) - : BRepClass3d_BndBoxTreeSelectorLine::Selector(), - myMapOfShape(theMapOfShape), - myIsValid(Standard_True) - {} - - Standard_Boolean Reject (const Bnd_Box& theBox) const + BRepClass3d_BndBoxTreeSelectorLine(const TopTools_IndexedMapOfShape& theMapOfShape) + : BRepClass3d_BndBoxTreeSelectorLine::Selector(), + myMapOfShape(theMapOfShape), + myIsValid(Standard_True) { - return (theBox.IsOut (myL)); } - Standard_Boolean Accept (const Standard_Integer& theObj); + Standard_Boolean Reject(const Bnd_Box& theBox) const { return (theBox.IsOut(myL)); } + + Standard_Boolean Accept(const Standard_Integer& theObj); - //Sets current line for boxes-line collisions - void SetCurrentLine (const gp_Lin& theL, - const Standard_Real theMaxParam) + // Sets current line for boxes-line collisions + void SetCurrentLine(const gp_Lin& theL, const Standard_Real theMaxParam) { myL = theL; myLC.Load(new Geom_Line(theL), -Precision::PConfusion(), theMaxParam); } - + void GetEdgeParam(const Standard_Integer i, - TopoDS_Edge& theOutE, - Standard_Real &theOutParam, - Standard_Real &outLParam ) const + TopoDS_Edge& theOutE, + Standard_Real& theOutParam, + Standard_Real& outLParam) const { const EdgeParam& EP = myEP.Value(i); - theOutE = EP.myE; - theOutParam = EP.myParam; - outLParam = EP.myLParam; + theOutE = EP.myE; + theOutParam = EP.myParam; + outLParam = EP.myLParam; } void GetVertParam(const Standard_Integer i, - TopoDS_Vertex& theOutV, - Standard_Real &outLParam ) const + TopoDS_Vertex& theOutV, + Standard_Real& outLParam) const { const VertParam& VP = myVP.Value(i); - theOutV = VP.myV; - outLParam = VP.myLParam; + theOutV = VP.myV; + outLParam = VP.myLParam; } - Standard_Integer GetNbEdgeParam() const - { - return myEP.Length(); - } + Standard_Integer GetNbEdgeParam() const { return myEP.Length(); } - Standard_Integer GetNbVertParam() const - { - return myVP.Length(); - } + Standard_Integer GetNbVertParam() const { return myVP.Length(); } void ClearResults() { @@ -139,22 +123,19 @@ public: } //! Returns TRUE if correct classification is possible - Standard_Boolean IsCorrect() const - { - return myIsValid; - } + Standard_Boolean IsCorrect() const { return myIsValid; } private: - BRepClass3d_BndBoxTreeSelectorLine(const BRepClass3d_BndBoxTreeSelectorLine& ); - BRepClass3d_BndBoxTreeSelectorLine& operator=(const BRepClass3d_BndBoxTreeSelectorLine& ); + BRepClass3d_BndBoxTreeSelectorLine(const BRepClass3d_BndBoxTreeSelectorLine&); + BRepClass3d_BndBoxTreeSelectorLine& operator=(const BRepClass3d_BndBoxTreeSelectorLine&); private: - const TopTools_IndexedMapOfShape& myMapOfShape; //shapes (vertices + edges) - gp_Lin myL; - NCollection_Sequence myEP; //output result (edge vs line) - NCollection_Sequence myVP; //output result (vertex vs line) - GeomAdaptor_Curve myLC; - Standard_Boolean myIsValid; + const TopTools_IndexedMapOfShape& myMapOfShape; // shapes (vertices + edges) + gp_Lin myL; + NCollection_Sequence myEP; // output result (edge vs line) + NCollection_Sequence myVP; // output result (vertex vs line) + GeomAdaptor_Curve myLC; + Standard_Boolean myIsValid; }; #endif diff --git a/opencascade/BRepClass3d_DataMapIteratorOfMapOfInter.hxx b/opencascade/BRepClass3d_DataMapIteratorOfMapOfInter.hxx index 962c02d92..eaea926ac 100644 --- a/opencascade/BRepClass3d_DataMapIteratorOfMapOfInter.hxx +++ b/opencascade/BRepClass3d_DataMapIteratorOfMapOfInter.hxx @@ -11,7 +11,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. - #ifndef BRepClass3d_DataMapIteratorOfMapOfInter_HeaderFile #define BRepClass3d_DataMapIteratorOfMapOfInter_HeaderFile diff --git a/opencascade/BRepClass3d_Intersector3d.hxx b/opencascade/BRepClass3d_Intersector3d.hxx index 23f735e78..970b9993b 100644 --- a/opencascade/BRepClass3d_Intersector3d.hxx +++ b/opencascade/BRepClass3d_Intersector3d.hxx @@ -26,18 +26,14 @@ #include class gp_Lin; - - -class BRepClass3d_Intersector3d +class BRepClass3d_Intersector3d { public: - DEFINE_STANDARD_ALLOC - //! Empty constructor. Standard_EXPORT BRepClass3d_Intersector3d(); - + //! Perform the intersection between the //! segment L(0) ... L(Prm) and the Shape . //! @@ -48,75 +44,60 @@ public: //! first point of the segment is near the face. In //! that case, the parameter of the intersection point //! on the line can be a negative value (greater than -Tol). - Standard_EXPORT void Perform (const gp_Lin& L, const Standard_Real Prm, const Standard_Real Tol, const TopoDS_Face& F); - + Standard_EXPORT void Perform(const gp_Lin& L, + const Standard_Real Prm, + const Standard_Real Tol, + const TopoDS_Face& F); + //! True is returned when the intersection have been computed. - Standard_Boolean IsDone() const; - + Standard_Boolean IsDone() const; + //! True is returned if a point has been found. - Standard_Boolean HasAPoint() const; - + Standard_Boolean HasAPoint() const; + //! Returns the U parameter of the intersection point //! on the surface. - Standard_Real UParameter() const; - + Standard_Real UParameter() const; + //! Returns the V parameter of the intersection point //! on the surface. - Standard_Real VParameter() const; - + Standard_Real VParameter() const; + //! Returns the parameter of the intersection point //! on the line. - Standard_Real WParameter() const; - + Standard_Real WParameter() const; + //! Returns the geometric point of the intersection //! between the line and the surface. - const gp_Pnt& Pnt() const; - + const gp_Pnt& Pnt() const; + //! Returns the transition of the line on the surface. - IntCurveSurface_TransitionOnCurve Transition() const; - + IntCurveSurface_TransitionOnCurve Transition() const; + //! Returns the state of the point on the face. //! The values can be either TopAbs_IN //! ( the point is in the face) //! or TopAbs_ON //! ( the point is on a boundary of the face). - TopAbs_State State() const; - + TopAbs_State State() const; + //! Returns the significant face used to determine //! the intersection. - const TopoDS_Face& Face() const; - - - + const TopoDS_Face& Face() const; protected: - - - - - private: - - - - gp_Pnt pnt; - Standard_Real U; - Standard_Real V; - Standard_Real W; + gp_Pnt pnt; + Standard_Real U; + Standard_Real V; + Standard_Real W; IntCurveSurface_TransitionOnCurve transition; - Standard_Boolean done; - Standard_Boolean hasapoint; - TopAbs_State state; - TopoDS_Face face; - - + Standard_Boolean done; + Standard_Boolean hasapoint; + TopAbs_State state; + TopoDS_Face face; }; - #include - - - - #endif // _BRepClass3d_Intersector3d_HeaderFile diff --git a/opencascade/BRepClass3d_Intersector3d.lxx b/opencascade/BRepClass3d_Intersector3d.lxx index 66bfd16a8..6dcfcc924 100644 --- a/opencascade/BRepClass3d_Intersector3d.lxx +++ b/opencascade/BRepClass3d_Intersector3d.lxx @@ -15,40 +15,57 @@ // commercial license or contractual agreement. //============================================================================ -inline Standard_Boolean BRepClass3d_Intersector3d::IsDone() const { - return(done); +inline Standard_Boolean BRepClass3d_Intersector3d::IsDone() const +{ + return (done); } + //============================================================================ -inline Standard_Boolean BRepClass3d_Intersector3d::HasAPoint() const { - return(hasapoint); +inline Standard_Boolean BRepClass3d_Intersector3d::HasAPoint() const +{ + return (hasapoint); } + //============================================================================ -inline const gp_Pnt& BRepClass3d_Intersector3d::Pnt() const { - return(pnt); +inline const gp_Pnt& BRepClass3d_Intersector3d::Pnt() const +{ + return (pnt); } + //============================================================================ -inline Standard_Real BRepClass3d_Intersector3d::UParameter() const { - return(U); +inline Standard_Real BRepClass3d_Intersector3d::UParameter() const +{ + return (U); } + //============================================================================ -inline Standard_Real BRepClass3d_Intersector3d::VParameter() const { - return(V); +inline Standard_Real BRepClass3d_Intersector3d::VParameter() const +{ + return (V); } + //============================================================================ -inline Standard_Real BRepClass3d_Intersector3d::WParameter() const { - return(W); +inline Standard_Real BRepClass3d_Intersector3d::WParameter() const +{ + return (W); } + //============================================================================ -inline IntCurveSurface_TransitionOnCurve BRepClass3d_Intersector3d::Transition() const { - return(transition); +inline IntCurveSurface_TransitionOnCurve BRepClass3d_Intersector3d::Transition() const +{ + return (transition); } + //============================================================================ -inline TopAbs_State BRepClass3d_Intersector3d::State() const { - return(state); +inline TopAbs_State BRepClass3d_Intersector3d::State() const +{ + return (state); } + //============================================================================ -inline const TopoDS_Face& BRepClass3d_Intersector3d::Face() const { - return(face); +inline const TopoDS_Face& BRepClass3d_Intersector3d::Face() const +{ + return (face); } -//============================================================================ +//============================================================================ diff --git a/opencascade/BRepClass3d_MapOfInter.hxx b/opencascade/BRepClass3d_MapOfInter.hxx index 43ae23423..1a9467734 100644 --- a/opencascade/BRepClass3d_MapOfInter.hxx +++ b/opencascade/BRepClass3d_MapOfInter.hxx @@ -21,8 +21,9 @@ #include #include -typedef NCollection_DataMap BRepClass3d_MapOfInter; -typedef NCollection_DataMap::Iterator BRepClass3d_DataMapIteratorOfMapOfInter; - +typedef NCollection_DataMap + BRepClass3d_MapOfInter; +typedef NCollection_DataMap::Iterator + BRepClass3d_DataMapIteratorOfMapOfInter; #endif diff --git a/opencascade/BRepClass3d_SClassifier.hxx b/opencascade/BRepClass3d_SClassifier.hxx index f28a5e412..a4cdeb3c6 100644 --- a/opencascade/BRepClass3d_SClassifier.hxx +++ b/opencascade/BRepClass3d_SClassifier.hxx @@ -26,41 +26,42 @@ class BRepClass3d_SolidExplorer; class gp_Pnt; - //! Provides an algorithm to classify a point in a solid. -class BRepClass3d_SClassifier +class BRepClass3d_SClassifier { public: - DEFINE_STANDARD_ALLOC - //! Empty constructor. Standard_EXPORT BRepClass3d_SClassifier(); - + //! Constructor to classify the point P with the //! tolerance Tol on the solid S. - Standard_EXPORT BRepClass3d_SClassifier(BRepClass3d_SolidExplorer& S, const gp_Pnt& P, const Standard_Real Tol); - + Standard_EXPORT BRepClass3d_SClassifier(BRepClass3d_SolidExplorer& S, + const gp_Pnt& P, + const Standard_Real Tol); + //! Classify the point P with the //! tolerance Tol on the solid S. - Standard_EXPORT void Perform (BRepClass3d_SolidExplorer& S, const gp_Pnt& P, const Standard_Real Tol); - + Standard_EXPORT void Perform(BRepClass3d_SolidExplorer& S, + const gp_Pnt& P, + const Standard_Real Tol); + //! Classify an infinite point with the //! tolerance Tol on the solid S. - Standard_EXPORT void PerformInfinitePoint (BRepClass3d_SolidExplorer& S, const Standard_Real Tol); - + Standard_EXPORT void PerformInfinitePoint(BRepClass3d_SolidExplorer& S, const Standard_Real Tol); + //! Returns True if the classification has been //! computed by rejection. //! The State is then OUT. Standard_EXPORT Standard_Boolean Rejected() const; - + //! Returns the result of the classification. Standard_EXPORT TopAbs_State State() const; - + //! Returns True when the point is a point of a face. Standard_EXPORT Standard_Boolean IsOnAFace() const; - + //! Returns the face used to determine the //! classification. When the state is ON, this is the //! face containing the point. @@ -68,41 +69,22 @@ public: //! When Rejected() returns True, Face() has no signification. Standard_EXPORT TopoDS_Face Face() const; - - - protected: - - Standard_EXPORT void ForceIn(); - - Standard_EXPORT void ForceOut(); - - + Standard_EXPORT void ForceOut(); private: - - - TopoDS_Face myFace; //! This variable stores information about algorithm internal state. - //! Type of this variable differs from TopAbs_State since it contains + //! Type of this variable differs from TopAbs_State since it contains //! additional information about error status. //! 1 - Error inside of the algorithm. //! 2 - ON. //! 3 - IN. //! 4 - OUT. Standard_Integer myState; - - }; - - - - - - #endif // _BRepClass3d_SClassifier_HeaderFile diff --git a/opencascade/BRepClass3d_SolidClassifier.hxx b/opencascade/BRepClass3d_SolidClassifier.hxx index 420c14182..324a18c3f 100644 --- a/opencascade/BRepClass3d_SolidClassifier.hxx +++ b/opencascade/BRepClass3d_SolidClassifier.hxx @@ -26,66 +26,44 @@ class TopoDS_Shape; class gp_Pnt; - //! Provides an algorithm to classify a point in a solid. -class BRepClass3d_SolidClassifier : public BRepClass3d_SClassifier +class BRepClass3d_SolidClassifier : public BRepClass3d_SClassifier { public: - DEFINE_STANDARD_ALLOC - //! empty constructor Standard_EXPORT BRepClass3d_SolidClassifier(); - - Standard_EXPORT void Load (const TopoDS_Shape& S); - + + Standard_EXPORT void Load(const TopoDS_Shape& S); + //! Constructor from a Shape. Standard_EXPORT BRepClass3d_SolidClassifier(const TopoDS_Shape& S); - + //! Constructor to classify the point P with the //! tolerance Tol on the solid S. - Standard_EXPORT BRepClass3d_SolidClassifier(const TopoDS_Shape& S, const gp_Pnt& P, const Standard_Real Tol); - + Standard_EXPORT BRepClass3d_SolidClassifier(const TopoDS_Shape& S, + const gp_Pnt& P, + const Standard_Real Tol); + //! Classify the point P with the //! tolerance Tol on the solid S. - Standard_EXPORT void Perform (const gp_Pnt& P, const Standard_Real Tol); - + Standard_EXPORT void Perform(const gp_Pnt& P, const Standard_Real Tol); + //! Classify an infinite point with the //! tolerance Tol on the solid S. //! Useful for compute the orientation of a solid. - Standard_EXPORT void PerformInfinitePoint (const Standard_Real Tol); - - Standard_EXPORT void Destroy(); -~BRepClass3d_SolidClassifier() -{ - Destroy(); -} - + Standard_EXPORT void PerformInfinitePoint(const Standard_Real Tol); + Standard_EXPORT void Destroy(); + ~BRepClass3d_SolidClassifier() { Destroy(); } protected: - - - - - private: - - - - Standard_Boolean aSolidLoaded; + Standard_Boolean aSolidLoaded; BRepClass3d_SolidExplorer explorer; - Standard_Boolean isaholeinspace; - - + Standard_Boolean isaholeinspace; }; - - - - - - #endif // _BRepClass3d_SolidClassifier_HeaderFile diff --git a/opencascade/BRepClass3d_SolidExplorer.hxx b/opencascade/BRepClass3d_SolidExplorer.hxx index 8daba7883..d47510a6e 100644 --- a/opencascade/BRepClass3d_SolidExplorer.hxx +++ b/opencascade/BRepClass3d_SolidExplorer.hxx @@ -35,82 +35,124 @@ class IntCurvesFace_Intersector; //! Provide an exploration of a BRep Shape for the classification. //! Provide access to the special UB tree to obtain fast search. -class BRepClass3d_SolidExplorer +class BRepClass3d_SolidExplorer { public: - DEFINE_STANDARD_ALLOC - Standard_EXPORT BRepClass3d_SolidExplorer(); - + Standard_EXPORT BRepClass3d_SolidExplorer(const TopoDS_Shape& S); - + Standard_EXPORT virtual ~BRepClass3d_SolidExplorer(); - - Standard_EXPORT void InitShape (const TopoDS_Shape& S); - + + Standard_EXPORT void InitShape(const TopoDS_Shape& S); + //! Should return True if P outside of bounding vol. of the shape - Standard_EXPORT virtual Standard_Boolean Reject (const gp_Pnt& P) const; - + Standard_EXPORT virtual Standard_Boolean Reject(const gp_Pnt& P) const; + //! compute a point P in the face F. Param is a Real in //! ]0,1[ and is used to initialise the algorithm. For //! different values , different points are returned. - Standard_EXPORT static Standard_Boolean FindAPointInTheFace (const TopoDS_Face& F, gp_Pnt& P, Standard_Real& Param); - - Standard_EXPORT static Standard_Boolean FindAPointInTheFace (const TopoDS_Face& F, gp_Pnt& P, Standard_Real& u, Standard_Real& v, Standard_Real& Param); - - Standard_EXPORT static Standard_Boolean FindAPointInTheFace (const TopoDS_Face& F, gp_Pnt& P, Standard_Real& u, Standard_Real& v, Standard_Real& Param, gp_Vec& theVecD1U, gp_Vec& theVecD1V); - - Standard_EXPORT static Standard_Boolean FindAPointInTheFace (const TopoDS_Face& F, gp_Pnt& P, Standard_Real& u, Standard_Real& v); - - Standard_EXPORT static Standard_Boolean FindAPointInTheFace (const TopoDS_Face& F, gp_Pnt& P); - - Standard_EXPORT static Standard_Boolean FindAPointInTheFace (const TopoDS_Face& F, Standard_Real& u, Standard_Real& v); - - Standard_EXPORT Standard_Boolean PointInTheFace (const TopoDS_Face& F, gp_Pnt& P, Standard_Real& u, Standard_Real& v, Standard_Real& Param, Standard_Integer& Index) const; - - Standard_EXPORT Standard_Boolean PointInTheFace (const TopoDS_Face& F, gp_Pnt& P, Standard_Real& u, Standard_Real& v, Standard_Real& Param, Standard_Integer& Index, const Handle(BRepAdaptor_Surface)& surf, const Standard_Real u1, const Standard_Real v1, const Standard_Real u2, const Standard_Real v2) const; - + Standard_EXPORT static Standard_Boolean FindAPointInTheFace(const TopoDS_Face& F, + gp_Pnt& P, + Standard_Real& Param); + + Standard_EXPORT static Standard_Boolean FindAPointInTheFace(const TopoDS_Face& F, + gp_Pnt& P, + Standard_Real& u, + Standard_Real& v, + Standard_Real& Param); + + Standard_EXPORT static Standard_Boolean FindAPointInTheFace(const TopoDS_Face& F, + gp_Pnt& P, + Standard_Real& u, + Standard_Real& v, + Standard_Real& Param, + gp_Vec& theVecD1U, + gp_Vec& theVecD1V); + + Standard_EXPORT static Standard_Boolean FindAPointInTheFace(const TopoDS_Face& F, + gp_Pnt& P, + Standard_Real& u, + Standard_Real& v); + + Standard_EXPORT static Standard_Boolean FindAPointInTheFace(const TopoDS_Face& F, gp_Pnt& P); + + Standard_EXPORT static Standard_Boolean FindAPointInTheFace(const TopoDS_Face& F, + Standard_Real& u, + Standard_Real& v); + + Standard_EXPORT Standard_Boolean PointInTheFace(const TopoDS_Face& F, + gp_Pnt& P, + Standard_Real& u, + Standard_Real& v, + Standard_Real& Param, + Standard_Integer& Index) const; + + Standard_EXPORT Standard_Boolean PointInTheFace(const TopoDS_Face& F, + gp_Pnt& P, + Standard_Real& u, + Standard_Real& v, + Standard_Real& Param, + Standard_Integer& Index, + const Handle(BRepAdaptor_Surface)& surf, + const Standard_Real u1, + const Standard_Real v1, + const Standard_Real u2, + const Standard_Real v2) const; + //! gives point index to search from and returns //! point index of succeseful search - Standard_EXPORT Standard_Boolean PointInTheFace (const TopoDS_Face& F, gp_Pnt& P, Standard_Real& u, Standard_Real& v, Standard_Real& Param, Standard_Integer& Index, const Handle(BRepAdaptor_Surface)& surf, const Standard_Real u1, const Standard_Real v1, const Standard_Real u2, const Standard_Real v2, gp_Vec& theVecD1U, gp_Vec& theVecD1V) const; - + Standard_EXPORT Standard_Boolean PointInTheFace(const TopoDS_Face& F, + gp_Pnt& P, + Standard_Real& u, + Standard_Real& v, + Standard_Real& Param, + Standard_Integer& Index, + const Handle(BRepAdaptor_Surface)& surf, + const Standard_Real u1, + const Standard_Real v1, + const Standard_Real u2, + const Standard_Real v2, + gp_Vec& theVecD1U, + gp_Vec& theVecD1V) const; + //! Starts an exploration of the shells. Standard_EXPORT void InitShell(); - + //! Returns True if there is a current shell. Standard_EXPORT Standard_Boolean MoreShell() const; - + //! Sets the explorer to the next shell. Standard_EXPORT void NextShell(); - + //! Returns the current shell. Standard_EXPORT TopoDS_Shell CurrentShell() const; - + //! Returns True if the Shell is rejected. - Standard_EXPORT virtual Standard_Boolean RejectShell (const gp_Lin& L) const; - + Standard_EXPORT virtual Standard_Boolean RejectShell(const gp_Lin& L) const; + //! Starts an exploration of the faces of the current shell. Standard_EXPORT void InitFace(); - + //! Returns True if current face in current shell. Standard_EXPORT Standard_Boolean MoreFace() const; - + //! Sets the explorer to the next Face of the current shell. Standard_EXPORT void NextFace(); - + //! Returns the current face. Standard_EXPORT TopoDS_Face CurrentFace() const; - + //! returns True if the face is rejected. - Standard_EXPORT virtual Standard_Boolean RejectFace (const gp_Lin& L) const; - + Standard_EXPORT virtual Standard_Boolean RejectFace(const gp_Lin& L) const; + //! Returns in , a segment having at least //! one intersection with the shape boundary to //! compute intersections. - Standard_EXPORT Standard_Integer Segment (const gp_Pnt& P, gp_Lin& L, Standard_Real& Par); - + Standard_EXPORT Standard_Integer Segment(const gp_Pnt& P, gp_Lin& L, Standard_Real& Par); + //! Returns in , a segment having at least //! one intersection with the shape boundary to //! compute intersections. @@ -119,60 +161,50 @@ public: //! point to a point of the first face of the shape. //! The Second Call provide a line to the second face //! and so on. - Standard_EXPORT Standard_Integer OtherSegment (const gp_Pnt& P, gp_Lin& L, Standard_Real& Par); - + Standard_EXPORT Standard_Integer OtherSegment(const gp_Pnt& P, gp_Lin& L, Standard_Real& Par); + //! Returns the index of face for which //! last segment is calculated. Standard_EXPORT Standard_Integer GetFaceSegmentIndex() const; - - Standard_EXPORT virtual void DumpSegment (const gp_Pnt& P, const gp_Lin& L, const Standard_Real Par, const TopAbs_State S) const; - + + Standard_EXPORT virtual void DumpSegment(const gp_Pnt& P, + const gp_Lin& L, + const Standard_Real Par, + const TopAbs_State S) const; + Standard_EXPORT const Bnd_Box& Box() const; Standard_EXPORT const TopoDS_Shape& GetShape() const; - - Standard_EXPORT IntCurvesFace_Intersector& Intersector (const TopoDS_Face& F) const; + + Standard_EXPORT IntCurvesFace_Intersector& Intersector(const TopoDS_Face& F) const; //! Return UB-tree instance which is used for edge / vertex checks. - const BRepClass3d_BndBoxTree& GetTree () {return myTree;} + const BRepClass3d_BndBoxTree& GetTree() { return myTree; } + //! Return edge/vertices map for current shape. - const TopTools_IndexedMapOfShape& GetMapEV () {return myMapEV;} - + const TopTools_IndexedMapOfShape& GetMapEV() { return myMapEV; } + Standard_EXPORT void Destroy(); private: - Standard_EXPORT BRepClass3d_SolidExplorer(const BRepClass3d_SolidExplorer& Oth); protected: - - Standard_EXPORT TopAbs_State ClassifyUVPoint - (const IntCurvesFace_Intersector& theIntersector, - const Handle(BRepAdaptor_Surface)& theSurf, - const gp_Pnt2d& theP2d) const; + Standard_EXPORT TopAbs_State ClassifyUVPoint(const IntCurvesFace_Intersector& theIntersector, + const Handle(BRepAdaptor_Surface)& theSurf, + const gp_Pnt2d& theP2d) const; private: - - - - Bnd_Box myBox; - TopoDS_Shape myShape; - Standard_Boolean myReject; - Standard_Integer myFirstFace; - Standard_Real myParamOnEdge; - TopExp_Explorer myShellExplorer; - TopExp_Explorer myFaceExplorer; - BRepClass3d_MapOfInter myMapOfInter; - BRepClass3d_BndBoxTree myTree; + Bnd_Box myBox; + TopoDS_Shape myShape; + Standard_Boolean myReject; + Standard_Integer myFirstFace; + Standard_Real myParamOnEdge; + TopExp_Explorer myShellExplorer; + TopExp_Explorer myFaceExplorer; + BRepClass3d_MapOfInter myMapOfInter; + BRepClass3d_BndBoxTree myTree; TopTools_IndexedMapOfShape myMapEV; - - }; - - - - - - #endif // _BRepClass3d_SolidExplorer_HeaderFile diff --git a/opencascade/BRepClass3d_SolidPassiveClassifier.hxx b/opencascade/BRepClass3d_SolidPassiveClassifier.hxx index 1d8342733..0698c411f 100644 --- a/opencascade/BRepClass3d_SolidPassiveClassifier.hxx +++ b/opencascade/BRepClass3d_SolidPassiveClassifier.hxx @@ -1,7 +1,5 @@ -// Created on: 1994-04-18 -// Created by: Laurent BUCHARD // Copyright (c) 1994-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS +// Copyright (c) 1999-2024 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // @@ -17,94 +15,61 @@ #ifndef _BRepClass3d_SolidPassiveClassifier_HeaderFile #define _BRepClass3d_SolidPassiveClassifier_HeaderFile +#include #include +#include #include #include - -#include +#include +#include #include #include -#include -#include -#include + class Standard_DomainError; class BRepClass3d_Intersector3d; class gp_Lin; class TopoDS_Face; - - -class BRepClass3d_SolidPassiveClassifier +class BRepClass3d_SolidPassiveClassifier { public: - DEFINE_STANDARD_ALLOC - //! Creates an undefined classifier. Standard_EXPORT BRepClass3d_SolidPassiveClassifier(); - + //! Starts a classification process. The point to //! classify is the origin of the line .

is //! the original length of the segment on used to //! compute intersections. is the tolerance //! attached to the intersections. - Standard_EXPORT void Reset (const gp_Lin& L, const Standard_Real P, const Standard_Real Tol); - + Standard_EXPORT void Reset(const gp_Lin& L, const Standard_Real P, const Standard_Real Tol); + //! Updates the classification process with the face //! from the boundary. - Standard_EXPORT void Compare (const TopoDS_Face& F, const TopAbs_Orientation Or); - - //! Returns the current value of the parameter. - Standard_Real Parameter() const; - - //! Returns True if an intersection is computed. - Standard_Boolean HasIntersection() const; - - //! Returns the intersecting algorithm. - BRepClass3d_Intersector3d& Intersector(); - - //! Returns the current state of the point. - TopAbs_State State() const; - - - - -protected: + Standard_EXPORT void Compare(const TopoDS_Face& F, const TopAbs_Orientation Or); + //! Returns the current value of the parameter. + Standard_Real Parameter() const { return myParam; } + //! Returns True if an intersection is computed. + Standard_Boolean HasIntersection() const { return hasIntersect; } + //! Returns the intersecting algorithm. + BRepClass3d_Intersector3d& Intersector() { return myIntersector; } + //! Returns the current state of the point. + TopAbs_State State() const { return myState; } private: - - - - Standard_Boolean isSet; - TopoDS_Face myFace; - gp_Lin myLin; - Standard_Real myParam; - Standard_Real myTolerance; - TopAbs_State myState; - Standard_Boolean hasIntersect; + Standard_Boolean isSet; + TopoDS_Face myFace; + gp_Lin myLin; + Standard_Real myParam; + Standard_Real myTolerance; + TopAbs_State myState; + Standard_Boolean hasIntersect; BRepClass3d_Intersector3d myIntersector; - - }; -#define TheIntersector BRepClass3d_Intersector3d -#define TheIntersector_hxx -#define TopClass_Classifier3d BRepClass3d_SolidPassiveClassifier -#define TopClass_Classifier3d_hxx - -#include - -#undef TheIntersector -#undef TheIntersector_hxx -#undef TopClass_Classifier3d -#undef TopClass_Classifier3d_hxx - - - - #endif // _BRepClass3d_SolidPassiveClassifier_HeaderFile diff --git a/opencascade/BRepClass_Edge.hxx b/opencascade/BRepClass_Edge.hxx index a9e5b2564..4da864cea 100644 --- a/opencascade/BRepClass_Edge.hxx +++ b/opencascade/BRepClass_Edge.hxx @@ -25,89 +25,56 @@ #include #include - //! This class is used to send the description of an //! Edge to the classifier. It contains an Edge and a //! Face. So the PCurve of the Edge can be found. -class BRepClass_Edge +class BRepClass_Edge { public: - DEFINE_STANDARD_ALLOC - Standard_EXPORT BRepClass_Edge(); - + Standard_EXPORT BRepClass_Edge(const TopoDS_Edge& E, const TopoDS_Face& F); - - //! Returns the current Edge - TopoDS_Edge& Edge(); -const TopoDS_Edge& Edge() const; - + + //! Returns the current Edge + TopoDS_Edge& Edge(); + const TopoDS_Edge& Edge() const; + //! Returns the Face for the current Edge - TopoDS_Face& Face(); -const TopoDS_Face& Face() const; + TopoDS_Face& Face(); + const TopoDS_Face& Face() const; //! Returns the next Edge - const TopoDS_Edge& NextEdge() const - { - return myNextEdge; - } + const TopoDS_Edge& NextEdge() const { return myNextEdge; } //! Finds and sets the next Edge for the current Standard_EXPORT void SetNextEdge(const TopTools_IndexedDataMapOfShapeListOfShape& theMapVE); //! Returns the maximum tolerance - Standard_Real MaxTolerance() const - { - return myMaxTolerance; - } + Standard_Real MaxTolerance() const { return myMaxTolerance; } - //! Sets the maximum tolerance at + //! Sets the maximum tolerance at //! which to start checking in the intersector - void SetMaxTolerance(const Standard_Real theValue) - { - myMaxTolerance = theValue; - } + void SetMaxTolerance(const Standard_Real theValue) { myMaxTolerance = theValue; } //! Returns true if we are using boxes //! in the intersector - Standard_Boolean UseBndBox() const - { - return myUseBndBox; - } + Standard_Boolean UseBndBox() const { return myUseBndBox; } //! Sets the status of whether we are //! using boxes or not - void SetUseBndBox(const Standard_Boolean theValue) - { - myUseBndBox = theValue; - } - + void SetUseBndBox(const Standard_Boolean theValue) { myUseBndBox = theValue; } protected: - - - - - private: - - - - TopoDS_Edge myEdge; - TopoDS_Face myFace; - TopoDS_Edge myNextEdge; - Standard_Real myMaxTolerance; + TopoDS_Edge myEdge; + TopoDS_Face myFace; + TopoDS_Edge myNextEdge; + Standard_Real myMaxTolerance; Standard_Boolean myUseBndBox; - }; - #include - - - - #endif // _BRepClass_Edge_HeaderFile diff --git a/opencascade/BRepClass_Edge.lxx b/opencascade/BRepClass_Edge.lxx index 07b362a30..f4a975680 100644 --- a/opencascade/BRepClass_Edge.lxx +++ b/opencascade/BRepClass_Edge.lxx @@ -15,42 +15,41 @@ // commercial license or contractual agreement. //======================================================================= -//function : Edge -//purpose : +// function : Edge +// purpose : //======================================================================= -inline TopoDS_Edge& BRepClass_Edge::Edge() +inline TopoDS_Edge& BRepClass_Edge::Edge() { - return myEdge; + return myEdge; } //======================================================================= -//function : Edge -//purpose : +// function : Edge +// purpose : //======================================================================= inline const TopoDS_Edge& BRepClass_Edge::Edge() const { - return myEdge; + return myEdge; } //======================================================================= -//function : Face -//purpose : +// function : Face +// purpose : //======================================================================= -inline TopoDS_Face& BRepClass_Edge::Face() +inline TopoDS_Face& BRepClass_Edge::Face() { return myFace; } //======================================================================= -//function : Face -//purpose : +// function : Face +// purpose : //======================================================================= inline const TopoDS_Face& BRepClass_Edge::Face() const { return myFace; } - diff --git a/opencascade/BRepClass_FClass2dOfFClassifier.hxx b/opencascade/BRepClass_FClass2dOfFClassifier.hxx index e93872049..3a0a7d6ef 100644 --- a/opencascade/BRepClass_FClass2dOfFClassifier.hxx +++ b/opencascade/BRepClass_FClass2dOfFClassifier.hxx @@ -30,75 +30,58 @@ class BRepClass_Edge; class BRepClass_Intersector; class gp_Lin2d; - - -class BRepClass_FClass2dOfFClassifier +class BRepClass_FClass2dOfFClassifier { public: - DEFINE_STANDARD_ALLOC - //! Creates an undefined classifier. Standard_EXPORT BRepClass_FClass2dOfFClassifier(); - + //! Starts a classification process. The point to //! classify is the origin of the line .

is //! the original length of the segment on used to //! compute intersections. is the tolerance //! attached to the line segment in intersections. - Standard_EXPORT void Reset (const gp_Lin2d& L, const Standard_Real P, const Standard_Real Tol); - + Standard_EXPORT void Reset(const gp_Lin2d& L, const Standard_Real P, const Standard_Real Tol); + //! Updates the classification process with the edge //! from the boundary. - Standard_EXPORT void Compare (const BRepClass_Edge& E, const TopAbs_Orientation Or); - + Standard_EXPORT void Compare(const BRepClass_Edge& E, const TopAbs_Orientation Or); + //! Returns the current value of the parameter. - Standard_Real Parameter() const; - + Standard_Real Parameter() const; + //! Returns the intersecting algorithm. - BRepClass_Intersector& Intersector(); - + BRepClass_Intersector& Intersector(); + //! Returns 0 if the last compared edge had no //! relevant intersection. Else returns the index of //! this intersection in the last intersection //! algorithm. - Standard_Integer ClosestIntersection() const; - + Standard_Integer ClosestIntersection() const; + //! Returns the current state of the point. - TopAbs_State State() const; - + TopAbs_State State() const; + //! Returns the Standard_True if the closest intersection point //! represents head or end of the edge. Returns Standard_False //! otherwise. - Standard_Boolean IsHeadOrEnd() const; - - - + Standard_Boolean IsHeadOrEnd() const; protected: - - - - - private: - - - - Standard_Boolean myIsSet; - Standard_Boolean myFirstCompare; - Standard_Boolean myFirstTrans; - gp_Lin2d myLin; - Standard_Real myParam; - Standard_Real myTolerance; + Standard_Boolean myIsSet; + Standard_Boolean myFirstCompare; + Standard_Boolean myFirstTrans; + gp_Lin2d myLin; + Standard_Real myParam; + Standard_Real myTolerance; TopTrans_CurveTransition myTrans; - BRepClass_Intersector myIntersector; - Standard_Integer myClosest; - TopAbs_State myState; - Standard_Boolean myIsHeadOrEnd; - - + BRepClass_Intersector myIntersector; + Standard_Integer myClosest; + TopAbs_State myState; + Standard_Boolean myIsHeadOrEnd; }; #define TheEdge BRepClass_Edge @@ -117,7 +100,4 @@ private: #undef TopClass_Classifier2d #undef TopClass_Classifier2d_hxx - - - #endif // _BRepClass_FClass2dOfFClassifier_HeaderFile diff --git a/opencascade/BRepClass_FClassifier.hxx b/opencascade/BRepClass_FClassifier.hxx index fe43b1fe7..9f5467198 100644 --- a/opencascade/BRepClass_FClassifier.hxx +++ b/opencascade/BRepClass_FClassifier.hxx @@ -31,71 +31,59 @@ class BRepClass_Intersector; class BRepClass_FClass2dOfFClassifier; class gp_Pnt2d; - - -class BRepClass_FClassifier +class BRepClass_FClassifier { public: - DEFINE_STANDARD_ALLOC - //! Empty constructor, undefined algorithm. Standard_EXPORT BRepClass_FClassifier(); - + //! Creates an algorithm to classify the Point P with //! Tolerance on the face described by . - Standard_EXPORT BRepClass_FClassifier(BRepClass_FaceExplorer& F, const gp_Pnt2d& P, const Standard_Real Tol); - + Standard_EXPORT BRepClass_FClassifier(BRepClass_FaceExplorer& F, + const gp_Pnt2d& P, + const Standard_Real Tol); + //! Classify the Point P with Tolerance on the //! face described by . - Standard_EXPORT void Perform (BRepClass_FaceExplorer& F, const gp_Pnt2d& P, const Standard_Real Tol); - + Standard_EXPORT void Perform(BRepClass_FaceExplorer& F, + const gp_Pnt2d& P, + const Standard_Real Tol); + //! Returns the result of the classification. Standard_EXPORT TopAbs_State State() const; - + //! Returns True when the state was computed by a //! rejection. The state is OUT. - Standard_Boolean Rejected() const; - + Standard_Boolean Rejected() const; + //! Returns True if the face contains no wire. The //! state is IN. - Standard_Boolean NoWires() const; - + Standard_Boolean NoWires() const; + //! Returns the Edge used to determine the //! classification. When the State is ON this is the //! Edge containing the point. Standard_EXPORT const BRepClass_Edge& Edge() const; - + //! Returns the parameter on Edge() used to determine the //! classification. Standard_EXPORT Standard_Real EdgeParameter() const; - + //! Returns the position of the point on the edge //! returned by Edge. - IntRes2d_Position Position() const; - - - + IntRes2d_Position Position() const; protected: - - - BRepClass_FClass2dOfFClassifier myClassifier; - BRepClass_Edge myEdge; - Standard_Real myEdgeParameter; - IntRes2d_Position myPosition; - Standard_Boolean rejected; - Standard_Boolean nowires; - + BRepClass_Edge myEdge; + Standard_Real myEdgeParameter; + IntRes2d_Position myPosition; + Standard_Boolean rejected; + Standard_Boolean nowires; private: - - - - - }; #define TheFaceExplorer BRepClass_FaceExplorer @@ -122,7 +110,4 @@ private: #undef TopClass_FaceClassifier #undef TopClass_FaceClassifier_hxx - - - #endif // _BRepClass_FClassifier_HeaderFile diff --git a/opencascade/BRepClass_FaceClassifier.hxx b/opencascade/BRepClass_FaceClassifier.hxx index 334f14344..443ed0886 100644 --- a/opencascade/BRepClass_FaceClassifier.hxx +++ b/opencascade/BRepClass_FaceClassifier.hxx @@ -27,71 +27,63 @@ class gp_Pnt2d; class TopoDS_Face; class gp_Pnt; - //! Provides Constructors with a Face. -class BRepClass_FaceClassifier : public BRepClass_FClassifier +class BRepClass_FaceClassifier : public BRepClass_FClassifier { public: - DEFINE_STANDARD_ALLOC - //! Empty constructor, undefined algorithm. Standard_EXPORT BRepClass_FaceClassifier(); - + //! Creates an algorithm to classify the Point P with //! Tolerance on the face described by . - Standard_EXPORT BRepClass_FaceClassifier(BRepClass_FaceExplorer& F, const gp_Pnt2d& P, const Standard_Real Tol); - + Standard_EXPORT BRepClass_FaceClassifier(BRepClass_FaceExplorer& F, + const gp_Pnt2d& P, + const Standard_Real Tol); + //! Creates an algorithm to classify the Point P with //! Tolerance on the face . //! Recommended to use Bnd_Box if the number of edges > 10 //! and the geometry is mostly spline - Standard_EXPORT BRepClass_FaceClassifier(const TopoDS_Face& theF, const gp_Pnt2d& theP, const Standard_Real theTol, - const Standard_Boolean theUseBndBox = Standard_False, const Standard_Real theGapCheckTol = 0.1); + Standard_EXPORT BRepClass_FaceClassifier(const TopoDS_Face& theF, + const gp_Pnt2d& theP, + const Standard_Real theTol, + const Standard_Boolean theUseBndBox = Standard_False, + const Standard_Real theGapCheckTol = 0.1); //! Classify the Point P with Tolerance on the //! face described by . //! Recommended to use Bnd_Box if the number of edges > 10 //! and the geometry is mostly spline - Standard_EXPORT void Perform (const TopoDS_Face& theF, const gp_Pnt2d& theP, const Standard_Real theTol, - const Standard_Boolean theUseBndBox = Standard_False, const Standard_Real theGapCheckTol = 0.1); - + Standard_EXPORT void Perform(const TopoDS_Face& theF, + const gp_Pnt2d& theP, + const Standard_Real theTol, + const Standard_Boolean theUseBndBox = Standard_False, + const Standard_Real theGapCheckTol = 0.1); + //! Creates an algorithm to classify the Point P with //! Tolerance on the face . //! Recommended to use Bnd_Box if the number of edges > 10 //! and the geometry is mostly spline - Standard_EXPORT BRepClass_FaceClassifier(const TopoDS_Face& theF, const gp_Pnt& theP, const Standard_Real theTol, - const Standard_Boolean theUseBndBox = Standard_False, const Standard_Real theGapCheckTol = 0.1); - + Standard_EXPORT BRepClass_FaceClassifier(const TopoDS_Face& theF, + const gp_Pnt& theP, + const Standard_Real theTol, + const Standard_Boolean theUseBndBox = Standard_False, + const Standard_Real theGapCheckTol = 0.1); + //! Classify the Point P with Tolerance on the //! face described by . //! Recommended to use Bnd_Box if the number of edges > 10 //! and the geometry is mostly spline - Standard_EXPORT void Perform (const TopoDS_Face& theF, const gp_Pnt& theP, const Standard_Real theTol, - const Standard_Boolean theUseBndBox = Standard_False, const Standard_Real theGapCheckTol = 0.1); - - - + Standard_EXPORT void Perform(const TopoDS_Face& theF, + const gp_Pnt& theP, + const Standard_Real theTol, + const Standard_Boolean theUseBndBox = Standard_False, + const Standard_Real theGapCheckTol = 0.1); protected: - - - - - private: - - - - - }; - - - - - - #endif // _BRepClass_FaceClassifier_HeaderFile diff --git a/opencascade/BRepClass_FaceExplorer.hxx b/opencascade/BRepClass_FaceExplorer.hxx index fe674e06f..4866d7eb3 100644 --- a/opencascade/BRepClass_FaceExplorer.hxx +++ b/opencascade/BRepClass_FaceExplorer.hxx @@ -29,115 +29,92 @@ class gp_Pnt2d; class gp_Lin2d; class BRepClass_Edge; - //! Provide an exploration of a BRep Face for the //! classification. Return UV edges. -class BRepClass_FaceExplorer +class BRepClass_FaceExplorer { public: - DEFINE_STANDARD_ALLOC - Standard_EXPORT BRepClass_FaceExplorer(const TopoDS_Face& F); //! Checks the point and change its coords if it is located too far - //! from the bounding box of the face. New Coordinates of the point - //! will be on the line between the point and the center of the + //! from the bounding box of the face. New Coordinates of the point + //! will be on the line between the point and the center of the //! bounding box. Returns True if point was not changed. - Standard_EXPORT Standard_Boolean CheckPoint (gp_Pnt2d& thePoint); - + Standard_EXPORT Standard_Boolean CheckPoint(gp_Pnt2d& thePoint); + //! Should return True if the point is outside a //! bounding volume of the face. - Standard_EXPORT Standard_Boolean Reject (const gp_Pnt2d& P) const; - + Standard_EXPORT Standard_Boolean Reject(const gp_Pnt2d& P) const; + //! Returns in , a segment having at least //! one intersection with the face boundary to //! compute intersections. - Standard_EXPORT Standard_Boolean Segment (const gp_Pnt2d& P, gp_Lin2d& L, Standard_Real& Par); - + Standard_EXPORT Standard_Boolean Segment(const gp_Pnt2d& P, gp_Lin2d& L, Standard_Real& Par); + //! Returns in , a segment having at least //! one intersection with the face boundary to //! compute intersections. Each call gives another segment. - Standard_EXPORT Standard_Boolean OtherSegment (const gp_Pnt2d& P, gp_Lin2d& L, Standard_Real& Par); - + Standard_EXPORT Standard_Boolean OtherSegment(const gp_Pnt2d& P, gp_Lin2d& L, Standard_Real& Par); + //! Starts an exploration of the wires. Standard_EXPORT void InitWires(); - + //! Returns True if there is a current wire. - Standard_Boolean MoreWires() const; - + Standard_Boolean MoreWires() const; + //! Sets the explorer to the next wire. - void NextWire(); - + void NextWire(); + //! Returns True if the wire bounding volume does not //! intersect the segment. - Standard_EXPORT Standard_Boolean RejectWire (const gp_Lin2d& L, const Standard_Real Par) const; - + Standard_EXPORT Standard_Boolean RejectWire(const gp_Lin2d& L, const Standard_Real Par) const; + //! Starts an exploration of the edges of the current //! wire. Standard_EXPORT void InitEdges(); - + //! Returns True if there is a current edge. - Standard_Boolean MoreEdges() const; - + Standard_Boolean MoreEdges() const; + //! Sets the explorer to the next edge. - void NextEdge(); - + void NextEdge(); + //! Returns True if the edge bounding volume does not //! intersect the segment. - Standard_EXPORT Standard_Boolean RejectEdge (const gp_Lin2d& L, const Standard_Real Par) const; - + Standard_EXPORT Standard_Boolean RejectEdge(const gp_Lin2d& L, const Standard_Real Par) const; + //! Current edge in current wire and its orientation. - Standard_EXPORT void CurrentEdge (BRepClass_Edge& E, TopAbs_Orientation& Or) const; + Standard_EXPORT void CurrentEdge(BRepClass_Edge& E, TopAbs_Orientation& Or) const; //! Returns the maximum tolerance - Standard_Real MaxTolerance() const - { - return myMaxTolerance; - } + Standard_Real MaxTolerance() const { return myMaxTolerance; } - //! Sets the maximum tolerance at + //! Sets the maximum tolerance at //! which to start checking in the intersector - void SetMaxTolerance(const Standard_Real theValue) - { - myMaxTolerance = theValue; - } + void SetMaxTolerance(const Standard_Real theValue) { myMaxTolerance = theValue; } //! Returns true if we are using boxes //! in the intersector - Standard_Boolean UseBndBox() const - { - return myUseBndBox; - } + Standard_Boolean UseBndBox() const { return myUseBndBox; } //! Sets the status of whether we are //! using boxes or not - void SetUseBndBox(const Standard_Boolean theValue) - { - myUseBndBox = theValue; - } - - - + void SetUseBndBox(const Standard_Boolean theValue) { myUseBndBox = theValue; } protected: - //! Computes UV bounds of a face Standard_EXPORT void ComputeFaceBounds(); - private: - - - - TopoDS_Face myFace; - TopExp_Explorer myWExplorer; - TopExp_Explorer myEExplorer; - Standard_Integer myCurEdgeInd; - Standard_Real myCurEdgePar; - Standard_Real myMaxTolerance; - Standard_Boolean myUseBndBox; + TopoDS_Face myFace; + TopExp_Explorer myWExplorer; + TopExp_Explorer myEExplorer; + Standard_Integer myCurEdgeInd; + Standard_Real myCurEdgePar; + Standard_Real myMaxTolerance; + Standard_Boolean myUseBndBox; TopTools_IndexedDataMapOfShapeListOfShape myMapVE; Standard_Real myUMin; @@ -146,11 +123,6 @@ private: Standard_Real myVMax; }; - #include - - - - #endif // _BRepClass_FaceExplorer_HeaderFile diff --git a/opencascade/BRepClass_FaceExplorer.lxx b/opencascade/BRepClass_FaceExplorer.lxx index b5f4b1ee1..d47873b8d 100644 --- a/opencascade/BRepClass_FaceExplorer.lxx +++ b/opencascade/BRepClass_FaceExplorer.lxx @@ -15,18 +15,18 @@ // commercial license or contractual agreement. //======================================================================= -//function : MoreWires -//purpose : +// function : MoreWires +// purpose : //======================================================================= -inline Standard_Boolean BRepClass_FaceExplorer::MoreWires()const +inline Standard_Boolean BRepClass_FaceExplorer::MoreWires() const { return myWExplorer.More(); } //======================================================================= -//function : NextWire -//purpose : +// function : NextWire +// purpose : //======================================================================= inline void BRepClass_FaceExplorer::NextWire() @@ -35,23 +35,21 @@ inline void BRepClass_FaceExplorer::NextWire() } //======================================================================= -//function : MoreEdges -//purpose : +// function : MoreEdges +// purpose : //======================================================================= -inline Standard_Boolean BRepClass_FaceExplorer::MoreEdges()const +inline Standard_Boolean BRepClass_FaceExplorer::MoreEdges() const { return myEExplorer.More(); } //======================================================================= -//function : NextEdge -//purpose : +// function : NextEdge +// purpose : //======================================================================= inline void BRepClass_FaceExplorer::NextEdge() { myEExplorer.Next(); } - - diff --git a/opencascade/BRepClass_FacePassiveClassifier.hxx b/opencascade/BRepClass_FacePassiveClassifier.hxx index f93b6d015..d428433ac 100644 --- a/opencascade/BRepClass_FacePassiveClassifier.hxx +++ b/opencascade/BRepClass_FacePassiveClassifier.hxx @@ -31,75 +31,58 @@ class BRepClass_Edge; class BRepClass_Intersector; class gp_Lin2d; - - -class BRepClass_FacePassiveClassifier +class BRepClass_FacePassiveClassifier { public: - DEFINE_STANDARD_ALLOC - //! Creates an undefined classifier. Standard_EXPORT BRepClass_FacePassiveClassifier(); - + //! Starts a classification process. The point to //! classify is the origin of the line .

is //! the original length of the segment on used to //! compute intersections. is the tolerance //! attached to the line segment in intersections. - Standard_EXPORT void Reset (const gp_Lin2d& L, const Standard_Real P, const Standard_Real Tol); - + Standard_EXPORT void Reset(const gp_Lin2d& L, const Standard_Real P, const Standard_Real Tol); + //! Updates the classification process with the edge //! from the boundary. - Standard_EXPORT void Compare (const BRepClass_Edge& E, const TopAbs_Orientation Or); - + Standard_EXPORT void Compare(const BRepClass_Edge& E, const TopAbs_Orientation Or); + //! Returns the current value of the parameter. - Standard_Real Parameter() const; - + Standard_Real Parameter() const; + //! Returns the intersecting algorithm. - BRepClass_Intersector& Intersector(); - + BRepClass_Intersector& Intersector(); + //! Returns 0 if the last compared edge had no //! relevant intersection. Else returns the index of //! this intersection in the last intersection //! algorithm. - Standard_Integer ClosestIntersection() const; - + Standard_Integer ClosestIntersection() const; + //! Returns the current state of the point. - TopAbs_State State() const; - + TopAbs_State State() const; + //! Returns the Standard_True if the closest intersection point //! represents head or end of the edge. Returns Standard_False //! otherwise. - Standard_Boolean IsHeadOrEnd() const; - - - + Standard_Boolean IsHeadOrEnd() const; protected: - - - - - private: - - - - Standard_Boolean myIsSet; - Standard_Boolean myFirstCompare; - Standard_Boolean myFirstTrans; - gp_Lin2d myLin; - Standard_Real myParam; - Standard_Real myTolerance; + Standard_Boolean myIsSet; + Standard_Boolean myFirstCompare; + Standard_Boolean myFirstTrans; + gp_Lin2d myLin; + Standard_Real myParam; + Standard_Real myTolerance; TopTrans_CurveTransition myTrans; - BRepClass_Intersector myIntersector; - Standard_Integer myClosest; - TopAbs_State myState; - Standard_Boolean myIsHeadOrEnd; - - + BRepClass_Intersector myIntersector; + Standard_Integer myClosest; + TopAbs_State myState; + Standard_Boolean myIsHeadOrEnd; }; #define TheEdge BRepClass_Edge @@ -118,7 +101,4 @@ private: #undef TopClass_Classifier2d #undef TopClass_Classifier2d_hxx - - - #endif // _BRepClass_FacePassiveClassifier_HeaderFile diff --git a/opencascade/BRepClass_Intersector.hxx b/opencascade/BRepClass_Intersector.hxx index cdede179d..e92310133 100644 --- a/opencascade/BRepClass_Intersector.hxx +++ b/opencascade/BRepClass_Intersector.hxx @@ -25,45 +25,32 @@ class gp_Lin2d; class BRepClass_Edge; class gp_Dir2d; - //! Intersect an Edge with a segment. //! Implement the Intersector2d required by the classifier. -class BRepClass_Intersector : public Geom2dInt_IntConicCurveOfGInter +class BRepClass_Intersector : public Geom2dInt_IntConicCurveOfGInter { public: - DEFINE_STANDARD_ALLOC - Standard_EXPORT BRepClass_Intersector(); - + //! Intersect the line segment and the edge. - Standard_EXPORT void Perform (const gp_Lin2d& L, const Standard_Real P, const Standard_Real Tol, const BRepClass_Edge& E); - + Standard_EXPORT void Perform(const gp_Lin2d& L, + const Standard_Real P, + const Standard_Real Tol, + const BRepClass_Edge& E); + //! Returns in , and the tangent, normal //! and curvature of the edge at parameter value //! . - Standard_EXPORT void LocalGeometry (const BRepClass_Edge& E, const Standard_Real U, gp_Dir2d& T, gp_Dir2d& N, Standard_Real& C) const; - - + Standard_EXPORT void LocalGeometry(const BRepClass_Edge& E, + const Standard_Real U, + gp_Dir2d& T, + gp_Dir2d& N, + Standard_Real& C) const; protected: - - - - - private: - - - - }; - - - - - - #endif // _BRepClass_Intersector_HeaderFile diff --git a/opencascade/BRepExtrema_DistShapeShape.hxx b/opencascade/BRepExtrema_DistShapeShape.hxx index 3e5bc64a7..7afb9d867 100644 --- a/opencascade/BRepExtrema_DistShapeShape.hxx +++ b/opencascade/BRepExtrema_DistShapeShape.hxx @@ -26,30 +26,30 @@ #include #include -//! This class provides tools to compute minimum distance +//! This class provides tools to compute minimum distance //! between two Shapes (Compound,CompSolid, Solid, Shell, Face, Wire, Edge, Vertex). class BRepExtrema_DistShapeShape { - public: - +public: DEFINE_STANDARD_ALLOC //! create empty tool Standard_EXPORT BRepExtrema_DistShapeShape(); - //! create tool and computation of the minimum distance (value and pair of points) + //! create tool and computation of the minimum distance (value and pair of points) //! using default deflection in single thread mode.
//! Default deflection value is Precision::Confusion().
//! @param Shape1 - the first shape for distance computation //! @param Shape2 - the second shape for distance computation //! @param F and @param A are not used in computation and are obsolete. //! @param theRange - the progress indicator of algorithm - Standard_EXPORT BRepExtrema_DistShapeShape(const TopoDS_Shape& Shape1, - const TopoDS_Shape& Shape2, - const Extrema_ExtFlag F = Extrema_ExtFlag_MINMAX, - const Extrema_ExtAlgo A = Extrema_ExtAlgo_Grad, - const Message_ProgressRange& theRange = Message_ProgressRange()); - //! create tool and computation of the minimum distance + Standard_EXPORT BRepExtrema_DistShapeShape( + const TopoDS_Shape& Shape1, + const TopoDS_Shape& Shape2, + const Extrema_ExtFlag F = Extrema_ExtFlag_MINMAX, + const Extrema_ExtAlgo A = Extrema_ExtAlgo_Grad, + const Message_ProgressRange& theRange = Message_ProgressRange()); + //! create tool and computation of the minimum distance //! (value and pair of points) in single thread mode.
//! Default deflection value is Precision::Confusion().
//! @param Shape1 - the first shape for distance computation @@ -57,18 +57,16 @@ class BRepExtrema_DistShapeShape //! @param theDeflection - the presition of distance computation //! @param F and @param A are not used in computation and are obsolete. //! @param theRange - the progress indicator of algorithm - Standard_EXPORT BRepExtrema_DistShapeShape(const TopoDS_Shape& Shape1, - const TopoDS_Shape& Shape2, - const Standard_Real theDeflection, - const Extrema_ExtFlag F = Extrema_ExtFlag_MINMAX, - const Extrema_ExtAlgo A = Extrema_ExtAlgo_Grad, - const Message_ProgressRange& theRange = Message_ProgressRange()); - + Standard_EXPORT BRepExtrema_DistShapeShape( + const TopoDS_Shape& Shape1, + const TopoDS_Shape& Shape2, + const Standard_Real theDeflection, + const Extrema_ExtFlag F = Extrema_ExtFlag_MINMAX, + const Extrema_ExtAlgo A = Extrema_ExtAlgo_Grad, + const Message_ProgressRange& theRange = Message_ProgressRange()); + //! Sets deflection to computation of the minimum distance
- void SetDeflection(const Standard_Real theDeflection) - { - myEps = theDeflection; - } + void SetDeflection(const Standard_Real theDeflection) { myEps = theDeflection; } //! load first shape into extrema
Standard_EXPORT void LoadS1(const TopoDS_Shape& Shape1); @@ -82,39 +80,31 @@ class BRepExtrema_DistShapeShape //! from the minimum one.
//! Returns IsDone status.
//! theRange - the progress indicator of algorithm - Standard_EXPORT Standard_Boolean Perform(const Message_ProgressRange& theRange = Message_ProgressRange()); + Standard_EXPORT Standard_Boolean + Perform(const Message_ProgressRange& theRange = Message_ProgressRange()); //! True if the minimum distance is found.
- Standard_Boolean IsDone() const - { - return myIsDone; - } + Standard_Boolean IsDone() const { return myIsDone; } //! Returns the number of solutions satisfying the minimum distance.
- Standard_Integer NbSolution() const - { - return mySolutionsShape1.Length(); - } + Standard_Integer NbSolution() const { return mySolutionsShape1.Length(); } //! Returns the value of the minimum distance.
Standard_EXPORT Standard_Real Value() const; //! True if one of the shapes is a solid and the other shape
//! is completely or partially inside the solid.
- Standard_Boolean InnerSolution() const - { - return myInnerSol; - } + Standard_Boolean InnerSolution() const { return myInnerSol; } //! Returns the Point corresponding to the th solution on the first Shape
- const gp_Pnt & PointOnShape1(const Standard_Integer N) const - { + const gp_Pnt& PointOnShape1(const Standard_Integer N) const + { return mySolutionsShape1.Value(N).Point(); } //! Returns the Point corresponding to the th solution on the second Shape
- const gp_Pnt & PointOnShape2(const Standard_Integer N) const - { + const gp_Pnt& PointOnShape2(const Standard_Integer N) const + { return mySolutionsShape2.Value(N).Point(); } @@ -124,7 +114,7 @@ class BRepExtrema_DistShapeShape //! IsInFace => the Nth solution on the first shape is inside a face
//! the corresponding support is obtained by the method SupportOnShape1
BRepExtrema_SupportType SupportTypeShape1(const Standard_Integer N) const - { + { return mySolutionsShape1.Value(N).SupportKind(); } @@ -134,7 +124,7 @@ class BRepExtrema_DistShapeShape //! IsInFace => the Nth solution on the second shape is inside a face
//! the corresponding support is obtained by the method SupportOnShape2
BRepExtrema_SupportType SupportTypeShape2(const Standard_Integer N) const - { + { return mySolutionsShape2.Value(N).SupportKind(); } @@ -148,52 +138,43 @@ class BRepExtrema_DistShapeShape //! gives the corresponding parameter t if the Nth solution
//! is situated on an Edge of the first shape
- Standard_EXPORT void ParOnEdgeS1(const Standard_Integer N,Standard_Real& t) const; + Standard_EXPORT void ParOnEdgeS1(const Standard_Integer N, Standard_Real& t) const; //! gives the corresponding parameter t if the Nth solution
//! is situated on an Edge of the first shape
- Standard_EXPORT void ParOnEdgeS2(const Standard_Integer N,Standard_Real& t) const; + Standard_EXPORT void ParOnEdgeS2(const Standard_Integer N, Standard_Real& t) const; //! gives the corresponding parameters (U,V) if the Nth solution
//! is situated on an face of the first shape
- Standard_EXPORT void ParOnFaceS1(const Standard_Integer N,Standard_Real& u,Standard_Real& v) const; + Standard_EXPORT void ParOnFaceS1(const Standard_Integer N, + Standard_Real& u, + Standard_Real& v) const; //! gives the corresponding parameters (U,V) if the Nth solution
//! is situated on an Face of the second shape
- Standard_EXPORT void ParOnFaceS2(const Standard_Integer N,Standard_Real& u,Standard_Real& v) const; + Standard_EXPORT void ParOnFaceS2(const Standard_Integer N, + Standard_Real& u, + Standard_Real& v) const; //! Prints on the stream o information on the current state of the object.
Standard_EXPORT void Dump(Standard_OStream& o) const; //! Sets unused parameter - //! Obsolete - void SetFlag(const Extrema_ExtFlag F) - { - myFlag = F; - } + //! Obsolete + void SetFlag(const Extrema_ExtFlag F) { myFlag = F; } //! Sets unused parameter - //! Obsolete - void SetAlgo(const Extrema_ExtAlgo A) - { - myAlgo = A; - } + //! Obsolete + void SetAlgo(const Extrema_ExtAlgo A) { myAlgo = A; } //! If isMultiThread == Standard_True then computation will be performed in parallel. - void SetMultiThread(Standard_Boolean theIsMultiThread) - { - myIsMultiThread = theIsMultiThread; - } + void SetMultiThread(Standard_Boolean theIsMultiThread) { myIsMultiThread = theIsMultiThread; } //! Returns Standard_True then computation will be performed in parallel //! Default value is Standard_False - Standard_Boolean IsMultiThread() const - { - return myIsMultiThread; - } + Standard_Boolean IsMultiThread() const { return myIsMultiThread; } private: - //! computes the minimum distance between two maps of shapes (Face,Edge,Vertex)
Standard_Boolean DistanceMapMap(const TopTools_IndexedMapOfShape& Map1, const TopTools_IndexedMapOfShape& Map2, @@ -204,39 +185,38 @@ private: //! computes the minimum distance between two maps of vertices
Standard_Boolean DistanceVertVert(const TopTools_IndexedMapOfShape& theMap1, const TopTools_IndexedMapOfShape& theMap2, - const Message_ProgressRange& theRange); + const Message_ProgressRange& theRange); - Standard_Boolean SolidTreatment(const TopoDS_Shape& theShape, + Standard_Boolean SolidTreatment(const TopoDS_Shape& theShape, const TopTools_IndexedMapOfShape& theMap, - const Message_ProgressRange& theRange); + const Message_ProgressRange& theRange); private: - - Standard_Real myDistRef; - Standard_Boolean myIsDone; - BRepExtrema_SeqOfSolution mySolutionsShape1; - BRepExtrema_SeqOfSolution mySolutionsShape2; - Standard_Boolean myInnerSol; - Standard_Real myEps; - TopoDS_Shape myShape1; - TopoDS_Shape myShape2; + Standard_Real myDistRef; + Standard_Boolean myIsDone; + BRepExtrema_SeqOfSolution mySolutionsShape1; + BRepExtrema_SeqOfSolution mySolutionsShape2; + Standard_Boolean myInnerSol; + Standard_Real myEps; + TopoDS_Shape myShape1; + TopoDS_Shape myShape2; TopTools_IndexedMapOfShape myMapV1; TopTools_IndexedMapOfShape myMapV2; TopTools_IndexedMapOfShape myMapE1; TopTools_IndexedMapOfShape myMapE2; TopTools_IndexedMapOfShape myMapF1; TopTools_IndexedMapOfShape myMapF2; - Standard_Boolean myIsInitS1; - Standard_Boolean myIsInitS2; - Extrema_ExtFlag myFlag; - Extrema_ExtAlgo myAlgo; - Bnd_Array1OfBox myBV1; - Bnd_Array1OfBox myBV2; - Bnd_Array1OfBox myBE1; - Bnd_Array1OfBox myBE2; - Bnd_Array1OfBox myBF1; - Bnd_Array1OfBox myBF2; - Standard_Boolean myIsMultiThread; + Standard_Boolean myIsInitS1; + Standard_Boolean myIsInitS2; + Extrema_ExtFlag myFlag; + Extrema_ExtAlgo myAlgo; + Bnd_Array1OfBox myBV1; + Bnd_Array1OfBox myBV2; + Bnd_Array1OfBox myBE1; + Bnd_Array1OfBox myBE2; + Bnd_Array1OfBox myBF1; + Bnd_Array1OfBox myBF2; + Standard_Boolean myIsMultiThread; }; #endif diff --git a/opencascade/BRepExtrema_DistanceSS.hxx b/opencascade/BRepExtrema_DistanceSS.hxx index 638bff029..4d696bdba 100644 --- a/opencascade/BRepExtrema_DistanceSS.hxx +++ b/opencascade/BRepExtrema_DistanceSS.hxx @@ -31,11 +31,9 @@ class TopoDS_Face; class BRepExtrema_DistanceSS { public: - DEFINE_STANDARD_ALLOC public: //! @name Constructor from two shapes - //! Computes the distance between two Shapes (face edge vertex). //! @param theS1 - First shape //! @param theS2 - Second shape @@ -48,94 +46,88 @@ public: //! @name Constructor from two shapes //! (default is MINMAX, applied only to point-face extrema) //! @param theExtAlgo - Specifies which extrema algorithm is to be used //! (default is Grad algo, applied only to point-face extrema) - BRepExtrema_DistanceSS(const TopoDS_Shape& theS1, const TopoDS_Shape& theS2, - const Bnd_Box& theBox1, const Bnd_Box& theBox2, - const Standard_Real theDstRef, - const Standard_Real theDeflection = Precision::Confusion(), - const Extrema_ExtFlag theExtFlag = Extrema_ExtFlag_MINMAX, - const Extrema_ExtAlgo theExtAlgo = Extrema_ExtAlgo_Grad) - : - myDstRef(theDstRef), - myModif(Standard_False), - myEps(theDeflection), - myFlag(theExtFlag), - myAlgo(theExtAlgo) + BRepExtrema_DistanceSS(const TopoDS_Shape& theS1, + const TopoDS_Shape& theS2, + const Bnd_Box& theBox1, + const Bnd_Box& theBox2, + const Standard_Real theDstRef, + const Standard_Real theDeflection = Precision::Confusion(), + const Extrema_ExtFlag theExtFlag = Extrema_ExtFlag_MINMAX, + const Extrema_ExtAlgo theExtAlgo = Extrema_ExtAlgo_Grad) + : myDstRef(theDstRef), + myModif(Standard_False), + myEps(theDeflection), + myFlag(theExtFlag), + myAlgo(theExtAlgo) { Perform(theS1, theS2, theBox1, theBox2); } public: //! @name Results - //! Returns true if the distance has been computed, false otherwise. - Standard_Boolean IsDone() const - { - return myModif; - } + Standard_Boolean IsDone() const { return myModif; } //! Returns the distance value. - Standard_Real DistValue() const - { - return myDstRef; - } + Standard_Real DistValue() const { return myDstRef; } //! Returns the list of solutions on the first shape. - const BRepExtrema_SeqOfSolution& Seq1Value() const - { - return mySeqSolShape1; - } + const BRepExtrema_SeqOfSolution& Seq1Value() const { return mySeqSolShape1; } //! Returns the list of solutions on the second shape. - const BRepExtrema_SeqOfSolution& Seq2Value() const - { - return mySeqSolShape2; - } + const BRepExtrema_SeqOfSolution& Seq2Value() const { return mySeqSolShape2; } private: //! @name private methods performing the search - //! Computes the distance between two Shapes (face edge vertex). //! General method to sort out the shape types and call the specific method. - Standard_EXPORT void Perform(const TopoDS_Shape& theS1, const TopoDS_Shape& theS2, - const Bnd_Box& theBox1, const Bnd_Box& theBox2); + Standard_EXPORT void Perform(const TopoDS_Shape& theS1, + const TopoDS_Shape& theS2, + const Bnd_Box& theBox1, + const Bnd_Box& theBox2); //! Computes the distance between two vertices. - void Perform(const TopoDS_Vertex& S1, const TopoDS_Vertex& S2, + void Perform(const TopoDS_Vertex& S1, + const TopoDS_Vertex& S2, BRepExtrema_SeqOfSolution& theSeqSolShape1, BRepExtrema_SeqOfSolution& theSeqSolShape2); //! Computes the minimum distance between a vertex and an edge. - void Perform(const TopoDS_Vertex& theS1, const TopoDS_Edge& theS2, + void Perform(const TopoDS_Vertex& theS1, + const TopoDS_Edge& theS2, BRepExtrema_SeqOfSolution& theSeqSolShape1, BRepExtrema_SeqOfSolution& theSeqSolShape2); //! Computes the minimum distance between a vertex and a face. - void Perform(const TopoDS_Vertex& theS1, const TopoDS_Face& theS2, + void Perform(const TopoDS_Vertex& theS1, + const TopoDS_Face& theS2, BRepExtrema_SeqOfSolution& theSeqSolShape1, BRepExtrema_SeqOfSolution& theSeqSolShape2); //! Computes the minimum distance between two edges. - void Perform(const TopoDS_Edge& theS1, const TopoDS_Edge& theS2, + void Perform(const TopoDS_Edge& theS1, + const TopoDS_Edge& theS2, BRepExtrema_SeqOfSolution& theSeqSolShape1, BRepExtrema_SeqOfSolution& theSeqSolShape2); //! Computes the minimum distance between an edge and a face. - void Perform(const TopoDS_Edge& theS1, const TopoDS_Face& theS2, + void Perform(const TopoDS_Edge& theS1, + const TopoDS_Face& theS2, BRepExtrema_SeqOfSolution& theSeqSolShape1, BRepExtrema_SeqOfSolution& theSeqSolShape2); //! Computes the minimum distance between two faces. - void Perform(const TopoDS_Face& theS1, const TopoDS_Face& theS2, + void Perform(const TopoDS_Face& theS1, + const TopoDS_Face& theS2, BRepExtrema_SeqOfSolution& theSeqSolShape1, BRepExtrema_SeqOfSolution& theSeqSolShape2); -private: //! @name Fields - +private: //! @name Fields BRepExtrema_SeqOfSolution mySeqSolShape1; //!< Solutions on the first shape BRepExtrema_SeqOfSolution mySeqSolShape2; //!< Solutions on the second shape - Standard_Real myDstRef; //!< The minimal distance found - Standard_Boolean myModif; //!< Flag indicating whether the solution was improved or not - Standard_Real myEps; //!< Deflection - Extrema_ExtFlag myFlag; //!< Extrema flag indicating what solutions to look for - Extrema_ExtAlgo myAlgo; //!< Extrema algo to be used to look for solutions + Standard_Real myDstRef; //!< The minimal distance found + Standard_Boolean myModif; //!< Flag indicating whether the solution was improved or not + Standard_Real myEps; //!< Deflection + Extrema_ExtFlag myFlag; //!< Extrema flag indicating what solutions to look for + Extrema_ExtAlgo myAlgo; //!< Extrema algo to be used to look for solutions }; #endif diff --git a/opencascade/BRepExtrema_ElementFilter.hxx b/opencascade/BRepExtrema_ElementFilter.hxx index d81c94edd..7eb2f6d3f 100644 --- a/opencascade/BRepExtrema_ElementFilter.hxx +++ b/opencascade/BRepExtrema_ElementFilter.hxx @@ -38,8 +38,8 @@ struct BRepExtrema_ElementFilter //! Checks if two mesh elements should be tested for overlapping/intersection //! (used for detection correct/incorrect cases of shared edges and vertices). - virtual FilterResult PreCheckElements (const Standard_Integer /*theIndex1*/, - const Standard_Integer /*theIndex2*/) + virtual FilterResult PreCheckElements(const Standard_Integer /*theIndex1*/, + const Standard_Integer /*theIndex2*/) { return DoCheck; } diff --git a/opencascade/BRepExtrema_ExtCC.hxx b/opencascade/BRepExtrema_ExtCC.hxx index 734d8b1ac..c531052b3 100644 --- a/opencascade/BRepExtrema_ExtCC.hxx +++ b/opencascade/BRepExtrema_ExtCC.hxx @@ -23,39 +23,30 @@ class gp_Pnt; class BRepExtrema_ExtCC { - public: - +public: DEFINE_STANDARD_ALLOC - - BRepExtrema_ExtCC () - { - } + + BRepExtrema_ExtCC() {} + //! It calculates all the distances.
- Standard_EXPORT BRepExtrema_ExtCC(const TopoDS_Edge& E1,const TopoDS_Edge& E2); + Standard_EXPORT BRepExtrema_ExtCC(const TopoDS_Edge& E1, const TopoDS_Edge& E2); Standard_EXPORT void Initialize(const TopoDS_Edge& E2); //! An exception is raised if the fields have not been initialized.
Standard_EXPORT void Perform(const TopoDS_Edge& E1); + //! True if the distances are found.
- Standard_Boolean IsDone() const - { - return myExtCC.IsDone(); - } + Standard_Boolean IsDone() const { return myExtCC.IsDone(); } + //! Returns the number of extremum distances.
- Standard_Integer NbExt() const - { - return myExtCC.NbExt(); - } + Standard_Integer NbExt() const { return myExtCC.NbExt(); } + //! Returns True if E1 and E2 are parallel.
- Standard_Boolean IsParallel() const - { - return myExtCC.IsParallel(); - } + Standard_Boolean IsParallel() const { return myExtCC.IsParallel(); } + //! Returns the value of the th extremum square distance.
- Standard_Real SquareDistance(const Standard_Integer N) const - { - return myExtCC.SquareDistance(N); - } + Standard_Real SquareDistance(const Standard_Integer N) const { return myExtCC.SquareDistance(N); } + //! Returns the parameter on the first edge of the th extremum distance.
Standard_EXPORT Standard_Real ParameterOnE1(const Standard_Integer N) const; //! Returns the Point of the th extremum distance on the edge E1.
@@ -68,11 +59,17 @@ class BRepExtrema_ExtCC //! dist11 is a square distance between the point on E1
//! of parameter FirstParameter and the point of
//! parameter FirstParameter on E2.
- Standard_EXPORT void TrimmedSquareDistances(Standard_Real& dist11,Standard_Real& distP12,Standard_Real& distP21,Standard_Real& distP22,gp_Pnt& P11,gp_Pnt& P12,gp_Pnt& P21,gp_Pnt& P22) const; - - private: + Standard_EXPORT void TrimmedSquareDistances(Standard_Real& dist11, + Standard_Real& distP12, + Standard_Real& distP21, + Standard_Real& distP22, + gp_Pnt& P11, + gp_Pnt& P12, + gp_Pnt& P21, + gp_Pnt& P22) const; - Extrema_ExtCC myExtCC; +private: + Extrema_ExtCC myExtCC; Handle(BRepAdaptor_Curve) myHC; }; diff --git a/opencascade/BRepExtrema_ExtCF.hxx b/opencascade/BRepExtrema_ExtCF.hxx index b0ac4e077..a916fa4d5 100644 --- a/opencascade/BRepExtrema_ExtCF.hxx +++ b/opencascade/BRepExtrema_ExtCF.hxx @@ -28,67 +28,54 @@ class TopoDS_Face; class BRepExtrema_ExtCF { - public: - +public: DEFINE_STANDARD_ALLOC - BRepExtrema_ExtCF() - { - } + BRepExtrema_ExtCF() {} + //! It calculates all the distances.
- Standard_EXPORT BRepExtrema_ExtCF(const TopoDS_Edge& E,const TopoDS_Face& F); + Standard_EXPORT BRepExtrema_ExtCF(const TopoDS_Edge& E, const TopoDS_Face& F); Standard_EXPORT void Initialize(const TopoDS_Edge& E, const TopoDS_Face& F); //! An exception is raised if the fields have not been initialized.
//! Be careful: this method uses the Face only for classify not for the fields.
- Standard_EXPORT void Perform(const TopoDS_Edge& E,const TopoDS_Face& F); + Standard_EXPORT void Perform(const TopoDS_Edge& E, const TopoDS_Face& F); + //! True if the distances are found.
- Standard_Boolean IsDone() const - { - return myExtCS.IsDone(); - } + Standard_Boolean IsDone() const { return myExtCS.IsDone(); } + //! Returns the number of extremum distances.
- Standard_Integer NbExt() const - { - return mySqDist.Length(); - } + Standard_Integer NbExt() const { return mySqDist.Length(); } + //! Returns the value of the th extremum square distance.
- Standard_Real SquareDistance(const Standard_Integer N) const - { - return mySqDist.Value(N); - } + Standard_Real SquareDistance(const Standard_Integer N) const { return mySqDist.Value(N); } + //! Returns True if the curve is on a parallel surface.
- Standard_Boolean IsParallel() const - { - return myExtCS.IsParallel(); - } + Standard_Boolean IsParallel() const { return myExtCS.IsParallel(); } + //! Returns the parameters on the Edge of the th extremum distance.
Standard_Real ParameterOnEdge(const Standard_Integer N) const { return myPointsOnC.Value(N).Parameter(); } + //! Returns the parameters on the Face of the th extremum distance.
- void ParameterOnFace(const Standard_Integer N,Standard_Real& U,Standard_Real& V) const + void ParameterOnFace(const Standard_Integer N, Standard_Real& U, Standard_Real& V) const { myPointsOnS.Value(N).Parameter(U, V); } + //! Returns the Point of the th extremum distance.
- gp_Pnt PointOnEdge(const Standard_Integer N) const - { - return myPointsOnC.Value(N).Value(); - } - //! Returns the Point of the th extremum distance.
- gp_Pnt PointOnFace(const Standard_Integer N) const - { - return myPointsOnS.Value(N).Value(); - } + gp_Pnt PointOnEdge(const Standard_Integer N) const { return myPointsOnC.Value(N).Value(); } - private: + //! Returns the Point of the th extremum distance.
+ gp_Pnt PointOnFace(const Standard_Integer N) const { return myPointsOnS.Value(N).Value(); } - Extrema_ExtCS myExtCS; - TColStd_SequenceOfReal mySqDist; - Extrema_SequenceOfPOnSurf myPointsOnS; - Extrema_SequenceOfPOnCurv myPointsOnC; +private: + Extrema_ExtCS myExtCS; + TColStd_SequenceOfReal mySqDist; + Extrema_SequenceOfPOnSurf myPointsOnS; + Extrema_SequenceOfPOnCurv myPointsOnC; Handle(BRepAdaptor_Surface) myHS; }; diff --git a/opencascade/BRepExtrema_ExtFF.hxx b/opencascade/BRepExtrema_ExtFF.hxx index 2bafcee74..ed1e55f07 100644 --- a/opencascade/BRepExtrema_ExtFF.hxx +++ b/opencascade/BRepExtrema_ExtFF.hxx @@ -25,67 +25,54 @@ class TopoDS_Face; class BRepExtrema_ExtFF { - public: - +public: DEFINE_STANDARD_ALLOC - - BRepExtrema_ExtFF() - { - } + + BRepExtrema_ExtFF() {} + //! It calculates all the distances.
- Standard_EXPORT BRepExtrema_ExtFF(const TopoDS_Face& F1,const TopoDS_Face& F2); - - Standard_EXPORT void Initialize(const TopoDS_Face& F2) ; + Standard_EXPORT BRepExtrema_ExtFF(const TopoDS_Face& F1, const TopoDS_Face& F2); + + Standard_EXPORT void Initialize(const TopoDS_Face& F2); //! An exception is raised if the fields have not been initialized.
//! Be careful: this method uses the Face F2 only for classify, not for the fields.
- Standard_EXPORT void Perform(const TopoDS_Face& F1,const TopoDS_Face& F2); + Standard_EXPORT void Perform(const TopoDS_Face& F1, const TopoDS_Face& F2); + //! True if the distances are found.
- Standard_Boolean IsDone() const - { - return myExtSS.IsDone(); - } + Standard_Boolean IsDone() const { return myExtSS.IsDone(); } + //! Returns True if the surfaces are parallel.
- Standard_Boolean IsParallel() const - { - return myExtSS.IsParallel(); - } + Standard_Boolean IsParallel() const { return myExtSS.IsParallel(); } + //! Returns the number of extremum distances.
- Standard_Integer NbExt() const - { - return mySqDist.Length(); - } + Standard_Integer NbExt() const { return mySqDist.Length(); } + //! Returns the value of the th extremum square distance.
- Standard_Real SquareDistance(const Standard_Integer N) const - { - return mySqDist.Value(N); - } + Standard_Real SquareDistance(const Standard_Integer N) const { return mySqDist.Value(N); } + //! Returns the parameters on the Face F1 of the th extremum distance.
- void ParameterOnFace1(const Standard_Integer N,Standard_Real& U,Standard_Real& V) const + void ParameterOnFace1(const Standard_Integer N, Standard_Real& U, Standard_Real& V) const { myPointsOnS1.Value(N).Parameter(U, V); } + //! Returns the parameters on the Face F2 of the th extremum distance.
- void ParameterOnFace2(const Standard_Integer N,Standard_Real& U,Standard_Real& V) const + void ParameterOnFace2(const Standard_Integer N, Standard_Real& U, Standard_Real& V) const { myPointsOnS2.Value(N).Parameter(U, V); } + //! Returns the Point of the th extremum distance.
- gp_Pnt PointOnFace1(const Standard_Integer N) const - { - return myPointsOnS1.Value(N).Value(); - } - //! Returns the Point of the th extremum distance.
- gp_Pnt PointOnFace2(const Standard_Integer N) const - { - return myPointsOnS2.Value(N).Value(); - } + gp_Pnt PointOnFace1(const Standard_Integer N) const { return myPointsOnS1.Value(N).Value(); } - private: + //! Returns the Point of the th extremum distance.
+ gp_Pnt PointOnFace2(const Standard_Integer N) const { return myPointsOnS2.Value(N).Value(); } - Extrema_ExtSS myExtSS; - TColStd_SequenceOfReal mySqDist; - Extrema_SequenceOfPOnSurf myPointsOnS1; - Extrema_SequenceOfPOnSurf myPointsOnS2; +private: + Extrema_ExtSS myExtSS; + TColStd_SequenceOfReal mySqDist; + Extrema_SequenceOfPOnSurf myPointsOnS1; + Extrema_SequenceOfPOnSurf myPointsOnS2; Handle(BRepAdaptor_Surface) myHS; }; diff --git a/opencascade/BRepExtrema_ExtPC.hxx b/opencascade/BRepExtrema_ExtPC.hxx index 2ab085fb2..cefeb7895 100644 --- a/opencascade/BRepExtrema_ExtPC.hxx +++ b/opencascade/BRepExtrema_ExtPC.hxx @@ -21,65 +21,53 @@ class TopoDS_Vertex; class TopoDS_Edge; - class BRepExtrema_ExtPC { - public: - +public: DEFINE_STANDARD_ALLOC - - BRepExtrema_ExtPC() - { - } + + BRepExtrema_ExtPC() {} + //! It calculates all the distances.
- Standard_EXPORT BRepExtrema_ExtPC(const TopoDS_Vertex& V,const TopoDS_Edge& E); - + Standard_EXPORT BRepExtrema_ExtPC(const TopoDS_Vertex& V, const TopoDS_Edge& E); + Standard_EXPORT void Initialize(const TopoDS_Edge& E); //! An exception is raised if the fields have not been initialized.
Standard_EXPORT void Perform(const TopoDS_Vertex& V); + //! True if the distances are found.
- Standard_Boolean IsDone() const - { - return myExtPC.IsDone(); - } + Standard_Boolean IsDone() const { return myExtPC.IsDone(); } + //! Returns the number of extremum distances.
- Standard_Integer NbExt() const - { - return myExtPC.NbExt(); - } + Standard_Integer NbExt() const { return myExtPC.NbExt(); } + //! Returns True if the th extremum distance is a minimum.
- Standard_Boolean IsMin(const Standard_Integer N) const - { - return myExtPC.IsMin(N); - } + Standard_Boolean IsMin(const Standard_Integer N) const { return myExtPC.IsMin(N); } + //! Returns the value of the th extremum square distance.
- Standard_Real SquareDistance(const Standard_Integer N) const - { - return myExtPC.SquareDistance(N); - } + Standard_Real SquareDistance(const Standard_Integer N) const { return myExtPC.SquareDistance(N); } + //! Returns the parameter on the edge of the th extremum distance.
- Standard_Real Parameter(const Standard_Integer N) const - { - return myExtPC.Point(N).Parameter(); - } + Standard_Real Parameter(const Standard_Integer N) const { return myExtPC.Point(N).Parameter(); } + //! Returns the Point of the th extremum distance.
- gp_Pnt Point(const Standard_Integer N) const - { - return myExtPC.Point(N).Value(); - } + gp_Pnt Point(const Standard_Integer N) const { return myExtPC.Point(N).Value(); } + //! if the curve is a trimmed curve,
//! dist1 is a square distance between

and the point
//! of parameter FirstParameter and
//! dist2 is a square distance between

and the point
//! of parameter LastParameter .
- void TrimmedSquareDistances(Standard_Real& dist1,Standard_Real& dist2,gp_Pnt& pnt1,gp_Pnt& pnt2) const + void TrimmedSquareDistances(Standard_Real& dist1, + Standard_Real& dist2, + gp_Pnt& pnt1, + gp_Pnt& pnt2) const { - myExtPC.TrimmedSquareDistances(dist1,dist2,pnt1,pnt2); + myExtPC.TrimmedSquareDistances(dist1, dist2, pnt1, pnt2); } - private: - - Extrema_ExtPC myExtPC; +private: + Extrema_ExtPC myExtPC; Handle(BRepAdaptor_Curve) myHC; }; diff --git a/opencascade/BRepExtrema_ExtPF.hxx b/opencascade/BRepExtrema_ExtPF.hxx index e132fc7e8..50622a6cb 100644 --- a/opencascade/BRepExtrema_ExtPF.hxx +++ b/opencascade/BRepExtrema_ExtPF.hxx @@ -24,69 +24,54 @@ class TopoDS_Vertex; class TopoDS_Face; - class BRepExtrema_ExtPF { - public: - +public: DEFINE_STANDARD_ALLOC - BRepExtrema_ExtPF() - {} + BRepExtrema_ExtPF() {} + //! It calculates all the distances.
- Standard_EXPORT BRepExtrema_ExtPF(const TopoDS_Vertex& TheVertex,const TopoDS_Face& TheFace, + Standard_EXPORT BRepExtrema_ExtPF(const TopoDS_Vertex& TheVertex, + const TopoDS_Face& TheFace, const Extrema_ExtFlag TheFlag = Extrema_ExtFlag_MINMAX, const Extrema_ExtAlgo TheAlgo = Extrema_ExtAlgo_Grad); - - Standard_EXPORT void Initialize(const TopoDS_Face& TheFace, + + Standard_EXPORT void Initialize(const TopoDS_Face& TheFace, const Extrema_ExtFlag TheFlag = Extrema_ExtFlag_MINMAX, const Extrema_ExtAlgo TheAlgo = Extrema_ExtAlgo_Grad); //! An exception is raised if the fields have not been initialized.
//! Be careful: this method uses the Face only for classify not for the fields.
- Standard_EXPORT void Perform(const TopoDS_Vertex& TheVertex,const TopoDS_Face& TheFace); + Standard_EXPORT void Perform(const TopoDS_Vertex& TheVertex, const TopoDS_Face& TheFace); + //! True if the distances are found.
- Standard_Boolean IsDone() const - { - return myExtPS.IsDone(); - } + Standard_Boolean IsDone() const { return myExtPS.IsDone(); } + //! Returns the number of extremum distances.
- Standard_Integer NbExt() const - { - return myPoints.Length(); - } + Standard_Integer NbExt() const { return myPoints.Length(); } + //! Returns the value of the th extremum square distance.
- Standard_Real SquareDistance(const Standard_Integer N) const - { - return mySqDist.Value(N); - } + Standard_Real SquareDistance(const Standard_Integer N) const { return mySqDist.Value(N); } + //! Returns the parameters on the Face of the th extremum distance.
- void Parameter(const Standard_Integer N,Standard_Real& U,Standard_Real& V) const + void Parameter(const Standard_Integer N, Standard_Real& U, Standard_Real& V) const { myPoints.Value(N).Parameter(U, V); } - //! Returns the Point of the th extremum distance.
- gp_Pnt Point(const Standard_Integer N) const - { - return myPoints.Value(N).Value(); - } - void SetFlag(const Extrema_ExtFlag F) - { - myExtPS.SetFlag(F); - } + //! Returns the Point of the th extremum distance.
+ gp_Pnt Point(const Standard_Integer N) const { return myPoints.Value(N).Value(); } - void SetAlgo(const Extrema_ExtAlgo A) - { - myExtPS.SetAlgo(A); - } + void SetFlag(const Extrema_ExtFlag F) { myExtPS.SetFlag(F); } - private: + void SetAlgo(const Extrema_ExtAlgo A) { myExtPS.SetAlgo(A); } - Extrema_ExtPS myExtPS; - TColStd_SequenceOfReal mySqDist; +private: + Extrema_ExtPS myExtPS; + TColStd_SequenceOfReal mySqDist; Extrema_SequenceOfPOnSurf myPoints; - BRepAdaptor_Surface mySurf; + BRepAdaptor_Surface mySurf; }; #endif diff --git a/opencascade/BRepExtrema_MapOfIntegerPackedMapOfInteger.hxx b/opencascade/BRepExtrema_MapOfIntegerPackedMapOfInteger.hxx index f7d734c1f..2906b69f2 100644 --- a/opencascade/BRepExtrema_MapOfIntegerPackedMapOfInteger.hxx +++ b/opencascade/BRepExtrema_MapOfIntegerPackedMapOfInteger.hxx @@ -20,6 +20,7 @@ #include //! Set of overlapped sub-shapes. -typedef NCollection_DataMap BRepExtrema_MapOfIntegerPackedMapOfInteger; +typedef NCollection_DataMap + BRepExtrema_MapOfIntegerPackedMapOfInteger; #endif // _BRepExtrema_MapOfIntegerPackedMapOfInteger_HeaderFile diff --git a/opencascade/BRepExtrema_OverlapTool.hxx b/opencascade/BRepExtrema_OverlapTool.hxx index d2cf6f55c..e8bc4c43a 100644 --- a/opencascade/BRepExtrema_OverlapTool.hxx +++ b/opencascade/BRepExtrema_OverlapTool.hxx @@ -35,25 +35,23 @@ //! In second case, tessellation of single shape will be tested for self- //! intersections. Please note that algorithm results are approximate and //! depend greatly on the quality of input tessellation(s). -class BRepExtrema_OverlapTool : public BVH_PairTraverse +class BRepExtrema_OverlapTool : public BVH_PairTraverse { public: - //! Creates new uninitialized overlap tool. BRepExtrema_OverlapTool(); //! Creates new overlap tool for the given element sets. - BRepExtrema_OverlapTool (const Handle(BRepExtrema_TriangleSet)& theSet1, - const Handle(BRepExtrema_TriangleSet)& theSet2); + BRepExtrema_OverlapTool(const Handle(BRepExtrema_TriangleSet)& theSet1, + const Handle(BRepExtrema_TriangleSet)& theSet2); public: - //! Loads the given element sets into the overlap tool. - void LoadTriangleSets (const Handle(BRepExtrema_TriangleSet)& theSet1, - const Handle(BRepExtrema_TriangleSet)& theSet2); + void LoadTriangleSets(const Handle(BRepExtrema_TriangleSet)& theSet1, + const Handle(BRepExtrema_TriangleSet)& theSet2); //! Performs searching of overlapped mesh elements. - void Perform (const Standard_Real theTolerance = 0.0); + void Perform(const Standard_Real theTolerance = 0.0); //! Is overlap test completed? Standard_Boolean IsDone() const { return myIsDone; } @@ -62,10 +60,16 @@ public: void MarkDirty() { myIsDone = Standard_False; } //! Returns set of overlapped sub-shapes of 1st shape (currently only faces are detected). - const BRepExtrema_MapOfIntegerPackedMapOfInteger& OverlapSubShapes1() const { return myOverlapSubShapes1; } + const BRepExtrema_MapOfIntegerPackedMapOfInteger& OverlapSubShapes1() const + { + return myOverlapSubShapes1; + } //! Returns set of overlapped sub-shapes of 2nd shape (currently only faces are detected). - const BRepExtrema_MapOfIntegerPackedMapOfInteger& OverlapSubShapes2() const { return myOverlapSubShapes2; } + const BRepExtrema_MapOfIntegerPackedMapOfInteger& OverlapSubShapes2() const + { + return myOverlapSubShapes2; + } #ifdef OVERLAP_TOOL_OUTPUT_TRIANGLES //! Returns set of overlapped triangles from the 1st shape (for debug). @@ -76,35 +80,31 @@ public: #endif //! Sets filtering tool for preliminary checking pairs of mesh elements. - void SetElementFilter (BRepExtrema_ElementFilter* theFilter) { myFilter = theFilter; } - + void SetElementFilter(BRepExtrema_ElementFilter* theFilter) { myFilter = theFilter; } public: //! @name Reject/Accept implementations - //! Defines the rules for node rejection by bounding box - Standard_EXPORT virtual Standard_Boolean RejectNode (const BVH_Vec3d& theCornerMin1, - const BVH_Vec3d& theCornerMax1, - const BVH_Vec3d& theCornerMin2, - const BVH_Vec3d& theCornerMax2, - Standard_Real&) const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean RejectNode(const BVH_Vec3d& theCornerMin1, + const BVH_Vec3d& theCornerMax1, + const BVH_Vec3d& theCornerMin2, + const BVH_Vec3d& theCornerMax2, + Standard_Real&) const Standard_OVERRIDE; //! Defines the rules for leaf acceptance - Standard_EXPORT virtual Standard_Boolean Accept (const Standard_Integer theLeaf1, - const Standard_Integer theLeaf2) Standard_OVERRIDE; - + Standard_EXPORT virtual Standard_Boolean Accept(const Standard_Integer theLeaf1, + const Standard_Integer theLeaf2) + Standard_OVERRIDE; protected: - //! Performs narrow-phase of overlap test (exact intersection). - void intersectTrianglesExact (const Standard_Integer theTrgIdx1, - const Standard_Integer theTrgIdx2); + void intersectTrianglesExact(const Standard_Integer theTrgIdx1, + const Standard_Integer theTrgIdx2); //! Performs narrow-phase of overlap test (intersection with non-zero tolerance). - void intersectTrianglesToler (const Standard_Integer theTrgIdx1, - const Standard_Integer theTrgIdx2, - const Standard_Real theToler); + void intersectTrianglesToler(const Standard_Integer theTrgIdx1, + const Standard_Integer theTrgIdx2, + const Standard_Real theToler); private: - //! Set of all mesh elements (triangles) of the 1st shape. Handle(BRepExtrema_TriangleSet) mySet1; //! Set of all mesh elements (triangles) of the 2nd shape. diff --git a/opencascade/BRepExtrema_Poly.hxx b/opencascade/BRepExtrema_Poly.hxx index 6083f179f..3cf1669b7 100644 --- a/opencascade/BRepExtrema_Poly.hxx +++ b/opencascade/BRepExtrema_Poly.hxx @@ -21,10 +21,13 @@ class gp_Pnt; class BRepExtrema_Poly { - public: - +public: //! returns Standard_True if OK. - Standard_EXPORT static Standard_Boolean Distance(const TopoDS_Shape& S1,const TopoDS_Shape& S2,gp_Pnt& P1,gp_Pnt& P2,Standard_Real& dist); + Standard_EXPORT static Standard_Boolean Distance(const TopoDS_Shape& S1, + const TopoDS_Shape& S2, + gp_Pnt& P1, + gp_Pnt& P2, + Standard_Real& dist); }; #endif diff --git a/opencascade/BRepExtrema_ProximityDistTool.hxx b/opencascade/BRepExtrema_ProximityDistTool.hxx index da6d5de07..9af9dc6c5 100644 --- a/opencascade/BRepExtrema_ProximityDistTool.hxx +++ b/opencascade/BRepExtrema_ProximityDistTool.hxx @@ -23,21 +23,20 @@ #include #include -//! Tool class for computation the proximity distance from first -//! primitive set to second one that is the maximal from minimum -//! perpendicular distances. If no perpendicular distance is found, the +//! Tool class for computation the proximity distance from first +//! primitive set to second one that is the maximal from minimum +//! perpendicular distances. If no perpendicular distance is found, the //! minimum distance will be returned. //! This tool is not intended to be used independently, and is integrated //! in other classes, implementing algorithms based on shape tessellation //! (BRepExtrema_ProximityValueTool). -//! +//! //! Please note that algorithm results are approximate and depend greatly //! on the quality of input tessellation(s). -class BRepExtrema_ProximityDistTool : public BVH_Distance +class BRepExtrema_ProximityDistTool + : public BVH_Distance { public: - typedef typename BVH_Tools::BVH_PrjStateInTriangle BVH_PrjState; enum ProxPnt_Status @@ -48,27 +47,28 @@ public: }; public: - //! Struct with information about projection point state from 2nd BVH, //! providing proximity point of 2nd shape struct PrjState { PrjState() - : myTrgIdx (0), - myPrjState (BVH_PrjState::BVH_PrjStateInTriangle_INNER), - myNumberOfFirstNode (0), - myNumberOfLastNode (0) - {} - - PrjState (const Standard_Integer theTrgIdx, - const BVH_PrjState thePrjState, - const Standard_Integer theNumberOfFirstNode, - const Standard_Integer theNumberOfLastNode) - : myTrgIdx (theTrgIdx), - myPrjState (thePrjState), - myNumberOfFirstNode (theNumberOfFirstNode), - myNumberOfLastNode (theNumberOfLastNode) - {} + : myTrgIdx(0), + myPrjState(BVH_PrjState::BVH_PrjStateInTriangle_INNER), + myNumberOfFirstNode(0), + myNumberOfLastNode(0) + { + } + + PrjState(const Standard_Integer theTrgIdx, + const BVH_PrjState thePrjState, + const Standard_Integer theNumberOfFirstNode, + const Standard_Integer theNumberOfLastNode) + : myTrgIdx(theTrgIdx), + myPrjState(thePrjState), + myNumberOfFirstNode(theNumberOfFirstNode), + myNumberOfLastNode(theNumberOfLastNode) + { + } Standard_Integer GetTrgIdx() const { return myTrgIdx; } @@ -79,78 +79,77 @@ public: Standard_Integer GetNumberOfLastNode() const { return myNumberOfLastNode; } private: - - Standard_Integer myTrgIdx; //!< Index of triangle on which the projection is located - BVH_PrjState myPrjState; //!< Position of a projection on the triangle (vertex, edge, inner) + Standard_Integer myTrgIdx; //!< Index of triangle on which the projection is located + BVH_PrjState myPrjState; //!< Position of a projection on the triangle (vertex, edge, inner) + // clang-format off Standard_Integer myNumberOfFirstNode; //!< The 1st vtx of the triangle edge on which the projection is located Standard_Integer myNumberOfLastNode; //!< The 2nd vtx of the triangle edge on which the projection is located + // clang-format on }; public: - - //! Creates new unitialized tool. + //! Creates new uninitialized tool. Standard_EXPORT BRepExtrema_ProximityDistTool(); //! Creates new tool for the given element sets. - Standard_EXPORT BRepExtrema_ProximityDistTool (const Handle(BRepExtrema_TriangleSet)& theSet1, - const Standard_Integer theNbSamples1, - const BVH_Array3d& theAddVertices1, - const NCollection_Vector& theAddStatus1, - const Handle(BRepExtrema_TriangleSet)& theSet2, - const BRepExtrema_ShapeList& theShapeList1, - const BRepExtrema_ShapeList& theShapeList2); + Standard_EXPORT BRepExtrema_ProximityDistTool( + const Handle(BRepExtrema_TriangleSet)& theSet1, + const Standard_Integer theNbSamples1, + const BVH_Array3d& theAddVertices1, + const NCollection_Vector& theAddStatus1, + const Handle(BRepExtrema_TriangleSet)& theSet2, + const BRepExtrema_ShapeList& theShapeList1, + const BRepExtrema_ShapeList& theShapeList2); public: - //! Loads the given element sets into the tool. - Standard_EXPORT void LoadTriangleSets (const Handle(BRepExtrema_TriangleSet)& theSet1, - const Handle(BRepExtrema_TriangleSet)& theSet2); + Standard_EXPORT void LoadTriangleSets(const Handle(BRepExtrema_TriangleSet)& theSet1, + const Handle(BRepExtrema_TriangleSet)& theSet2); //! Loads the given list of subshapes into the tool. - Standard_EXPORT void LoadShapeLists (const BRepExtrema_ShapeList& theShapeList1, - const BRepExtrema_ShapeList& theShapeList2); + Standard_EXPORT void LoadShapeLists(const BRepExtrema_ShapeList& theShapeList1, + const BRepExtrema_ShapeList& theShapeList2); //! Loads given additional vertices and their statuses. - void LoadAdditionalPointsFirstSet (const BVH_Array3d& theAddVertices1, - const NCollection_Vector& theAddStatus1); + void LoadAdditionalPointsFirstSet(const BVH_Array3d& theAddVertices1, + const NCollection_Vector& theAddStatus1); //! Performs searching of the proximity distance. Standard_EXPORT void Perform(); public: //! @name Reject/Accept implementations - //! Defines the rules for node rejection by bounding box. - Standard_EXPORT virtual Standard_Boolean RejectNode (const BVH_Vec3d& theCornerMin, - const BVH_Vec3d& theCornerMax, - Standard_Real& theMetric) const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean RejectNode(const BVH_Vec3d& theCornerMin, + const BVH_Vec3d& theCornerMax, + Standard_Real& theMetric) const + Standard_OVERRIDE; //! Defines the rules for leaf acceptance. - Standard_EXPORT virtual Standard_Boolean Accept (const Standard_Integer theSgmIdx, - const Standard_Real&) Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean Accept(const Standard_Integer theSgmIdx, + const Standard_Real&) Standard_OVERRIDE; public: - //! Returns true if the node is on the boarder. - Standard_EXPORT static Standard_Boolean IsNodeOnBorder (const Standard_Integer theNodeIdx, - const Handle (Poly_Triangulation)& theTr); + Standard_EXPORT static Standard_Boolean IsNodeOnBorder(const Standard_Integer theNodeIdx, + const Handle(Poly_Triangulation)& theTr); //! Returns true if the edge is on the boarder. - Standard_EXPORT static Standard_Boolean IsEdgeOnBorder (const Standard_Integer theTrgIdx, - const Standard_Integer theFirstEdgeNodeIdx, - const Standard_Integer theSecondEdgeNodeIdx, - const Handle (Poly_Triangulation)& theTr); + Standard_EXPORT static Standard_Boolean IsEdgeOnBorder( + const Standard_Integer theTrgIdx, + const Standard_Integer theFirstEdgeNodeIdx, + const Standard_Integer theSecondEdgeNodeIdx, + const Handle(Poly_Triangulation)& theTr); public: - //! Returns points on triangles sets, which provide the proximity distance. - void ProximityPoints (BVH_Vec3d& thePoint1, BVH_Vec3d& thePoint2) const + void ProximityPoints(BVH_Vec3d& thePoint1, BVH_Vec3d& thePoint2) const { thePoint1 = myPnt1; thePoint2 = myPnt2; } //! Returns status of points on triangles sets, which provide the proximity distance. - void ProximityPointsStatus (ProxPnt_Status& thePointStatus1, ProxPnt_Status& thePointStatus2) const + void ProximityPointsStatus(ProxPnt_Status& thePointStatus1, ProxPnt_Status& thePointStatus2) const { thePointStatus1 = myPntStatus1; thePointStatus2 = myPntStatus2; @@ -160,7 +159,6 @@ public: Standard_Real ProximityDistance() const { return myProxDist; } protected: - //! Computes the distance between object and BVH tree. Standard_EXPORT Standard_Real ComputeDistance(); @@ -168,10 +166,8 @@ protected: Standard_EXPORT void DefineStatusProxPnt(); private: - - //! Goes throught vertices from the 1st set. - void goThroughtSet1 (const BVH_Array3d& aVertices1, - const Standard_Boolean theIsAdditionalSet); + //! Goes through vertices from the 1st set. + void goThroughtSet1(const BVH_Array3d& aVertices1, const Standard_Boolean theIsAdditionalSet); //! Defines the status of proximity point from 1st BVH. void defineStatusProxPnt1(); @@ -180,8 +176,9 @@ private: void defineStatusProxPnt2(); protected: - + // clang-format off Standard_Real myMinDistance; //!< Minimal distance from point to BVH, could be not equal to myDistance + // clang-format on BVH_Vec3d myMinDistPoint; //!< Point on BVH providing the minimal distance BVH_Vec3d myExtremaPoint; //!< Point on BVH providing the extrema @@ -195,7 +192,6 @@ protected: ProxPnt_Status myPntStatus1, myPntStatus2; private: - //! Set of all mesh elements (triangles) of the 1st shape. Handle(BRepExtrema_TriangleSet) mySet1; //! Set of all mesh elements (triangles) of the 2nd shape. @@ -210,8 +206,10 @@ private: //! Is vertex corresponding to proximity point of 1st shape from additional set Standard_Integer myIsProxVtx1FromAddSet; - BVH_Array3d myAddVertices1; //!< Additional vertices on the 1st shape + BVH_Array3d myAddVertices1; //!< Additional vertices on the 1st shape + // clang-format off NCollection_Vector myAddStatus1; //!< Status of additional vertices on the 1st shape + // clang-format on //! Vertex index from 1st BVH corresponding to proximity point of 1st shape Standard_Integer myProxVtxIdx1; @@ -224,7 +222,6 @@ private: //! Information of projection point state from 2nd BVH providing the minimal distance PrjState myMinPrjState; - }; #endif // _BRepExtrema_ProximityDistTool_HeaderFile diff --git a/opencascade/BRepExtrema_ProximityValueTool.hxx b/opencascade/BRepExtrema_ProximityValueTool.hxx index ca65c2810..af762fc02 100644 --- a/opencascade/BRepExtrema_ProximityValueTool.hxx +++ b/opencascade/BRepExtrema_ProximityValueTool.hxx @@ -35,45 +35,37 @@ public: //! Constructor; remembers the tolerance BRepExtrema_VertexInspector() - : myTol (Precision::SquareConfusion()), - myIsNeedAdd (Standard_True) - {} - - //! Keep the points used for comparison - void Add (const gp_XYZ& thePnt) + : myTol(Precision::SquareConfusion()), + myIsNeedAdd(Standard_True) { - myPoints.Append (thePnt); } + //! Keep the points used for comparison + void Add(const gp_XYZ& thePnt) { myPoints.Append(thePnt); } + //! Set tolerance for comparison of point coordinates - void SetTol (const Standard_Real theTol) - { - myTol = theTol; - } + void SetTol(const Standard_Real theTol) { myTol = theTol; } //! Set current point to search for coincidence - void SetCurrent (const gp_XYZ& theCurPnt) + void SetCurrent(const gp_XYZ& theCurPnt) { - myCurrent = theCurPnt; + myCurrent = theCurPnt; myIsNeedAdd = Standard_True; } - Standard_Boolean IsNeedAdd() - { - return myIsNeedAdd; - } + Standard_Boolean IsNeedAdd() { return myIsNeedAdd; } //! Implementation of inspection method - Standard_EXPORT NCollection_CellFilter_Action Inspect (const Standard_Integer theTarget); + Standard_EXPORT NCollection_CellFilter_Action Inspect(const Standard_Integer theTarget); private: - Standard_Real myTol; + Standard_Real myTol; Standard_Boolean myIsNeedAdd; - VectorOfPoint myPoints; - gp_XYZ myCurrent; + VectorOfPoint myPoints; + gp_XYZ myCurrent; }; -typedef NCollection_CellFilter BRepExtrema_CellFilter; +typedef NCollection_CellFilter BRepExtrema_CellFilter; typedef typename BRepExtrema_ProximityDistTool::ProxPnt_Status ProxPnt_Status; //! Tool class for computation of the proximity value from one BVH @@ -82,40 +74,38 @@ typedef typename BRepExtrema_ProximityDistTool::ProxPnt_Status ProxPnt_Status; //! This tool is not intended to be used independently, and is integrated //! in other classes, implementing algorithms based on shape tessellation //! (BRepExtrema_ShapeProximity and BRepExtrema_SelfIntersection). -//! +//! //! Please note that algorithm results are approximate and depend greatly //! on the quality of input tessellation(s). class BRepExtrema_ProximityValueTool { public: - - //! Creates new unitialized proximity tool. + //! Creates new uninitialized proximity tool. Standard_EXPORT BRepExtrema_ProximityValueTool(); //! Creates new proximity tool for the given element sets. - Standard_EXPORT BRepExtrema_ProximityValueTool (const Handle(BRepExtrema_TriangleSet)& theSet1, - const Handle(BRepExtrema_TriangleSet)& theSet2, - const BRepExtrema_ShapeList& theShapeList1, - const BRepExtrema_ShapeList& theShapeList2); + Standard_EXPORT BRepExtrema_ProximityValueTool(const Handle(BRepExtrema_TriangleSet)& theSet1, + const Handle(BRepExtrema_TriangleSet)& theSet2, + const BRepExtrema_ShapeList& theShapeList1, + const BRepExtrema_ShapeList& theShapeList2); public: - //! Loads the given element sets into the proximity tool. - Standard_EXPORT void LoadTriangleSets (const Handle (BRepExtrema_TriangleSet)& theSet1, - const Handle (BRepExtrema_TriangleSet)& theSet2); + Standard_EXPORT void LoadTriangleSets(const Handle(BRepExtrema_TriangleSet)& theSet1, + const Handle(BRepExtrema_TriangleSet)& theSet2); //! Loads the given list of subshapes into the proximity tool. - Standard_EXPORT void LoadShapeLists (const BRepExtrema_ShapeList& theShapeList1, - const BRepExtrema_ShapeList& theShapeList2); + Standard_EXPORT void LoadShapeLists(const BRepExtrema_ShapeList& theShapeList1, + const BRepExtrema_ShapeList& theShapeList2); //! Sets number of sample points used for proximity calculation for each shape. //! If number is less or equal zero, all triangulation nodes are used. - Standard_EXPORT void SetNbSamplePoints (const Standard_Integer theSamples1 = 0, - const Standard_Integer theSamples2 = 0); + Standard_EXPORT void SetNbSamplePoints(const Standard_Integer theSamples1 = 0, + const Standard_Integer theSamples2 = 0); //! Performs the computation of the proximity value. - Standard_EXPORT void Perform (Standard_Real& theTolerance); + Standard_EXPORT void Perform(Standard_Real& theTolerance); //! Is proximity test completed? Standard_Boolean IsDone() const { return myIsDone; } @@ -134,58 +124,57 @@ public: } //! Returns status of points on triangles sets, which provide the proximity distance. - void ProximityPointsStatus (ProxPnt_Status& thePointStatus1, ProxPnt_Status& thePointStatus2) const + void ProximityPointsStatus(ProxPnt_Status& thePointStatus1, ProxPnt_Status& thePointStatus2) const { thePointStatus1 = myPntStatus1; thePointStatus2 = myPntStatus2; } private: - //! Gets shape data for further refinement. - Standard_Boolean getInfoForRefinement (const TopoDS_Shape& theShapes, - TopAbs_ShapeEnum& theShapeType, - Standard_Integer& theNbNodes, - Standard_Real& theStep); + Standard_Boolean getInfoForRefinement(const TopoDS_Shape& theShapes, + TopAbs_ShapeEnum& theShapeType, + Standard_Integer& theNbNodes, + Standard_Real& theStep); //! Returns the computed proximity value from first BVH to another one. - Standard_Real computeProximityDist (const Handle(BRepExtrema_TriangleSet)& theSet1, - const Standard_Integer theNbSamples1, - const BVH_Array3d& theAddVertices1, - const NCollection_Vector& theAddStatus1, - const Handle(BRepExtrema_TriangleSet)& theSet2, - const BRepExtrema_ShapeList& theShapeList1, - const BRepExtrema_ShapeList& theShapeList2, - BVH_Vec3d& thePoint1, - BVH_Vec3d& thePoint2, - ProxPnt_Status& thePointStatus1, - ProxPnt_Status& thePointStatus2) const; + Standard_Real computeProximityDist(const Handle(BRepExtrema_TriangleSet)& theSet1, + const Standard_Integer theNbSamples1, + const BVH_Array3d& theAddVertices1, + const NCollection_Vector& theAddStatus1, + const Handle(BRepExtrema_TriangleSet)& theSet2, + const BRepExtrema_ShapeList& theShapeList1, + const BRepExtrema_ShapeList& theShapeList2, + BVH_Vec3d& thePoint1, + BVH_Vec3d& thePoint2, + ProxPnt_Status& thePointStatus1, + ProxPnt_Status& thePointStatus2) const; //! Gets additional vertices on shapes with refining a coarser one if it's needed. Standard_Boolean getShapesAdditionalVertices(); //! Gets additional vertices and their statuses on the edge with the input step. - Standard_Boolean getEdgeAdditionalVertices (const TopoDS_Edge& theEdge, - const Standard_Real theStep, - BVH_Array3d& theAddVertices, - NCollection_Vector& theAddStatuses); + Standard_Boolean getEdgeAdditionalVertices(const TopoDS_Edge& theEdge, + const Standard_Real theStep, + BVH_Array3d& theAddVertices, + NCollection_Vector& theAddStatuses); //! Gets additional vertices and their statuses on the face with the input step (triangle square). - Standard_Boolean getFaceAdditionalVertices (const TopoDS_Face& theFace, - const Standard_Real theStep, - BVH_Array3d& theAddVertices, - NCollection_Vector& theAddStatuses); + Standard_Boolean getFaceAdditionalVertices(const TopoDS_Face& theFace, + const Standard_Real theStep, + BVH_Array3d& theAddVertices, + NCollection_Vector& theAddStatuses); //! Splits the triangle recursively, halving the longest side //! to the area of ​​the current triangle > input step - void doRecurTrgSplit (const gp_Pnt (&theTrg)[3], - const ProxPnt_Status (&theEdgesStatus)[3], - const Standard_Real theTol, - const Standard_Real theStep, - BVH_Array3d& theAddVertices, - NCollection_Vector& theAddStatuses); -private: + void doRecurTrgSplit(const gp_Pnt (&theTrg)[3], + const ProxPnt_Status (&theEdgesStatus)[3], + const Standard_Real theTol, + const Standard_Real theStep, + BVH_Array3d& theAddVertices, + NCollection_Vector& theAddStatuses); +private: //! Set of all mesh primitives of the 1st shape. Handle(BRepExtrema_TriangleSet) mySet1; //! Set of all mesh primitives of the 2nd shape. @@ -204,8 +193,10 @@ private: BVH_Array3d myAddVertices1; //!< Additional vertices on the 1st shape if its mesh is coarser. BVH_Array3d myAddVertices2; //!< Additional vertices on the 2nd shape if its mesh is coarser. + // clang-format off NCollection_Vector myAddStatus1; //!< Status of additional vertices on the 1st shape. NCollection_Vector myAddStatus2; //!< Status of additional vertices on the 2nd shape. + // clang-format on Standard_Boolean myIsInitS1; //!< Is the 1st shape initialized? Standard_Boolean myIsInitS2; //!< Is the 2nd shape initialized? @@ -219,14 +210,14 @@ private: Standard_Real myStep1; //!< Step for getting vertices on the 1st shape. Standard_Real myStep2; //!< Step for getting vertices on the 2nd shape. - BRepExtrema_CellFilter myCells; + BRepExtrema_CellFilter myCells; BRepExtrema_VertexInspector myInspector; TopAbs_ShapeEnum myShapeType1; //!< 1st shape type. TopAbs_ShapeEnum myShapeType2; //!< 2nd shape type. - Standard_Real myDistance; //!< Distance - Standard_Boolean myIsDone; //!< State of the algorithm + Standard_Real myDistance; //!< Distance + Standard_Boolean myIsDone; //!< State of the algorithm Standard_Integer myNbSamples1; //!< Number of samples points on the first shape Standard_Integer myNbSamples2; //!< Number of samples points on the second shape @@ -236,7 +227,6 @@ private: //! Proximity points' status ProxPnt_Status myPntStatus1, myPntStatus2; - }; #endif // _BRepExtrema_ProximityValueTool_HeaderFile diff --git a/opencascade/BRepExtrema_SelfIntersection.hxx b/opencascade/BRepExtrema_SelfIntersection.hxx index efb1b39fd..915b7fac4 100644 --- a/opencascade/BRepExtrema_SelfIntersection.hxx +++ b/opencascade/BRepExtrema_SelfIntersection.hxx @@ -36,38 +36,28 @@ class BRepExtrema_SelfIntersection : public BRepExtrema_ElementFilter friend class BRepExtrema_OverlapTool; public: - //! Creates uninitialized self-intersection tool. - Standard_EXPORT BRepExtrema_SelfIntersection (const Standard_Real theTolerance = 0.0); + Standard_EXPORT BRepExtrema_SelfIntersection(const Standard_Real theTolerance = 0.0); //! Creates self-intersection tool for the given shape. - Standard_EXPORT BRepExtrema_SelfIntersection (const TopoDS_Shape& theShape, const Standard_Real theTolerance = 0.0); + Standard_EXPORT BRepExtrema_SelfIntersection(const TopoDS_Shape& theShape, + const Standard_Real theTolerance = 0.0); public: - //! Returns tolerance value used for self-intersection test. - Standard_Real Tolerance() const - { - return myTolerance; - } + Standard_Real Tolerance() const { return myTolerance; } //! Sets tolerance value used for self-intersection test. - void SetTolerance (const Standard_Real theTolerance) - { - myTolerance = theTolerance; - } + void SetTolerance(const Standard_Real theTolerance) { myTolerance = theTolerance; } //! Loads shape for detection of self-intersections. - Standard_EXPORT Standard_Boolean LoadShape (const TopoDS_Shape& theShape); + Standard_EXPORT Standard_Boolean LoadShape(const TopoDS_Shape& theShape); //! Performs detection of self-intersections. Standard_EXPORT void Perform(); //! True if the detection is completed. - Standard_Boolean IsDone() const - { - return myOverlapTool.IsDone(); - } + Standard_Boolean IsDone() const { return myOverlapTool.IsDone(); } //! Returns set of IDs of overlapped sub-shapes (started from 0). const BRepExtrema_MapOfIntegerPackedMapOfInteger& OverlapElements() const @@ -76,16 +66,13 @@ public: } //! Returns sub-shape from the shape for the given index (started from 0). - const TopoDS_Face& GetSubShape (const Standard_Integer theID) const + const TopoDS_Face& GetSubShape(const Standard_Integer theID) const { return TopoDS::Face(myFaceList.Value(theID)); } //! Returns set of all the face triangles of the shape. - const Handle(BRepExtrema_TriangleSet)& ElementSet() const - { - return myElementSet; - } + const Handle(BRepExtrema_TriangleSet)& ElementSet() const { return myElementSet; } #ifdef OVERLAP_TOOL_OUTPUT_TRIANGLES //! Returns set of overlapped mesh elements (only triangles). @@ -96,26 +83,27 @@ public: #endif protected: - //! Filter out correct adjacent mesh elements. - Standard_EXPORT virtual BRepExtrema_ElementFilter::FilterResult PreCheckElements (const Standard_Integer theIndex1, - const Standard_Integer theIndex2); + Standard_EXPORT virtual BRepExtrema_ElementFilter::FilterResult PreCheckElements( + const Standard_Integer theIndex1, + const Standard_Integer theIndex2); //! Checks if the given triangles have only single common vertex. - Standard_EXPORT BRepExtrema_ElementFilter::FilterResult isRegularSharedVertex (const BVH_Vec3d& theSharedVert, - const BVH_Vec3d& theTrng1Vtxs1, - const BVH_Vec3d& theTrng1Vtxs2, - const BVH_Vec3d& theTrng2Vtxs1, - const BVH_Vec3d& theTrng2Vtxs2); + Standard_EXPORT BRepExtrema_ElementFilter::FilterResult isRegularSharedVertex( + const BVH_Vec3d& theSharedVert, + const BVH_Vec3d& theTrng1Vtxs1, + const BVH_Vec3d& theTrng1Vtxs2, + const BVH_Vec3d& theTrng2Vtxs1, + const BVH_Vec3d& theTrng2Vtxs2); //! Checks if the given triangles have only single common edge. - Standard_EXPORT BRepExtrema_ElementFilter::FilterResult isRegularSharedEdge (const BVH_Vec3d& theTrng1Vtxs0, - const BVH_Vec3d& theTrng1Vtxs1, - const BVH_Vec3d& theTrng1Vtxs2, - const BVH_Vec3d& theTrng2Vtxs2); + Standard_EXPORT BRepExtrema_ElementFilter::FilterResult isRegularSharedEdge( + const BVH_Vec3d& theTrng1Vtxs0, + const BVH_Vec3d& theTrng1Vtxs1, + const BVH_Vec3d& theTrng1Vtxs2, + const BVH_Vec3d& theTrng2Vtxs2); private: - //! Self-intersection tolerance. Standard_Real myTolerance; @@ -130,7 +118,6 @@ private: //! Overlap tool used for self-intersection test. BRepExtrema_OverlapTool myOverlapTool; - }; #endif // _BRepExtrema_SelfIntersection_HeaderFile diff --git a/opencascade/BRepExtrema_ShapeProximity.hxx b/opencascade/BRepExtrema_ShapeProximity.hxx index 63f56a941..da49d7e49 100644 --- a/opencascade/BRepExtrema_ShapeProximity.hxx +++ b/opencascade/BRepExtrema_ShapeProximity.hxx @@ -49,40 +49,31 @@ class BRepExtrema_ShapeProximity { public: - //! Creates empty proximity tool. - Standard_EXPORT BRepExtrema_ShapeProximity (const Standard_Real theTolerance = Precision::Infinite()); + Standard_EXPORT BRepExtrema_ShapeProximity( + const Standard_Real theTolerance = Precision::Infinite()); //! Creates proximity tool for the given two shapes. - Standard_EXPORT BRepExtrema_ShapeProximity (const TopoDS_Shape& theShape1, - const TopoDS_Shape& theShape2, - const Standard_Real theTolerance = Precision::Infinite()); + Standard_EXPORT BRepExtrema_ShapeProximity( + const TopoDS_Shape& theShape1, + const TopoDS_Shape& theShape2, + const Standard_Real theTolerance = Precision::Infinite()); public: - //! Returns tolerance value for overlap test (distance between shapes). - Standard_Real Tolerance() const - { - return myTolerance; - } + Standard_Real Tolerance() const { return myTolerance; } //! Sets tolerance value for overlap test (distance between shapes). - void SetTolerance (const Standard_Real theTolerance) - { - myTolerance = theTolerance; - } + void SetTolerance(const Standard_Real theTolerance) { myTolerance = theTolerance; } //! Returns proximity value calculated for the whole input shapes. - Standard_Real Proximity() const - { - return Tolerance(); - } + Standard_Real Proximity() const { return Tolerance(); } //! Loads 1st shape into proximity tool. - Standard_EXPORT Standard_Boolean LoadShape1 (const TopoDS_Shape& theShape1); + Standard_EXPORT Standard_Boolean LoadShape1(const TopoDS_Shape& theShape1); //! Loads 2nd shape into proximity tool. - Standard_EXPORT Standard_Boolean LoadShape2 (const TopoDS_Shape& theShape2); + Standard_EXPORT Standard_Boolean LoadShape2(const TopoDS_Shape& theShape2); //! Set number of sample points on the 1st shape used to compute the proximity value. //! In case of 0, all triangulation nodes will be used. @@ -96,10 +87,7 @@ public: Standard_EXPORT void Perform(); //! True if the search is completed. - Standard_Boolean IsDone() const - { - return myOverlapTool.IsDone() || myProxValTool.IsDone(); - } + Standard_Boolean IsDone() const { return myOverlapTool.IsDone() || myProxValTool.IsDone(); } //! Returns set of IDs of overlapped faces of 1st shape (started from 0). const BRepExtrema_MapOfIntegerPackedMapOfInteger& OverlapSubShapes1() const @@ -114,59 +102,40 @@ public: } //! Returns sub-shape from 1st shape with the given index (started from 0). - const TopoDS_Shape& GetSubShape1 (const Standard_Integer theID) const + const TopoDS_Shape& GetSubShape1(const Standard_Integer theID) const { - return myShapeList1.Value (theID); + return myShapeList1.Value(theID); } //! Returns sub-shape from 1st shape with the given index (started from 0). - const TopoDS_Shape& GetSubShape2 (const Standard_Integer theID) const + const TopoDS_Shape& GetSubShape2(const Standard_Integer theID) const { - return myShapeList2.Value (theID); + return myShapeList2.Value(theID); } //! Returns set of all the face triangles of the 1st shape. - const Handle(BRepExtrema_TriangleSet)& ElementSet1() const - { - return myElementSet1; - } + const Handle(BRepExtrema_TriangleSet)& ElementSet1() const { return myElementSet1; } //! Returns set of all the face triangles of the 2nd shape. - const Handle(BRepExtrema_TriangleSet)& ElementSet2() const - { - return myElementSet2; - } + const Handle(BRepExtrema_TriangleSet)& ElementSet2() const { return myElementSet2; } //! Returns the point on the 1st shape, which could be used as a reference point //! for the value of the proximity. - const gp_Pnt& ProximityPoint1() const - { - return myProxPoint1; - } + const gp_Pnt& ProximityPoint1() const { return myProxPoint1; } //! Returns the point on the 2nd shape, which could be used as a reference point //! for the value of the proximity. - const gp_Pnt& ProximityPoint2() const - { - return myProxPoint2; - } + const gp_Pnt& ProximityPoint2() const { return myProxPoint2; } //! Returns the status of point on the 1st shape, which could be used as a reference point //! for the value of the proximity. - const ProxPnt_Status& ProxPntStatus1() const - { - return myProxPntStatus1; - } + const ProxPnt_Status& ProxPntStatus1() const { return myProxPntStatus1; } //! Returns the status of point on the 2nd shape, which could be used as a reference point //! for the value of the proximity. - const ProxPnt_Status& ProxPntStatus2() const - { - return myProxPntStatus2; - } + const ProxPnt_Status& ProxPntStatus2() const { return myProxPntStatus2; } private: - //! Maximum overlapping distance. Standard_Real myTolerance; @@ -194,7 +163,7 @@ private: //! Reference point of the proximity value on the 1st shape. gp_Pnt myProxPoint1; - //! Reference point of the proximity value on the 2st shape. + //! Reference point of the proximity value on the 2nd shape. gp_Pnt myProxPoint2; //! Status of reference points of the proximity value. @@ -207,7 +176,6 @@ private: //! the minimal diameter of a tube containing both edges or //! the minimal thickness of a shell containing both faces. BRepExtrema_ProximityValueTool myProxValTool; - }; #endif // _BRepExtrema_ShapeProximity_HeaderFile diff --git a/opencascade/BRepExtrema_SolutionElem.hxx b/opencascade/BRepExtrema_SolutionElem.hxx index 5c0f80807..c923b9dfb 100644 --- a/opencascade/BRepExtrema_SolutionElem.hxx +++ b/opencascade/BRepExtrema_SolutionElem.hxx @@ -23,17 +23,16 @@ //! This class is used to store information relative to the minimum distance between two shapes. class BRepExtrema_SolutionElem { - public: - +public: DEFINE_STANDARD_ALLOC //! Empty constructor BRepExtrema_SolutionElem() - : myDist (0.0), - myPoint (0.0, 0.0, 0.0), - mySupType (BRepExtrema_IsVertex), - myPar1 (0.0), - myPar2 (0.0) + : myDist(0.0), + myPoint(0.0, 0.0, 0.0), + mySupType(BRepExtrema_IsVertex), + myPar1(0.0), + myPar2(0.0) { } @@ -43,16 +42,18 @@ class BRepExtrema_SolutionElem //! @param thePoint the solution point //! @param theSolType the type of solution //! @param theVertex and the Vertex - BRepExtrema_SolutionElem (const Standard_Real theDist, - const gp_Pnt& thePoint, - const BRepExtrema_SupportType theSolType, - const TopoDS_Vertex& theVertex) - : myDist (theDist), - myPoint (thePoint), - mySupType (theSolType), - myVertex (theVertex), - myPar1 (0.0), - myPar2 (0.0) {} + BRepExtrema_SolutionElem(const Standard_Real theDist, + const gp_Pnt& thePoint, + const BRepExtrema_SupportType theSolType, + const TopoDS_Vertex& theVertex) + : myDist(theDist), + myPoint(thePoint), + mySupType(theSolType), + myVertex(theVertex), + myPar1(0.0), + myPar2(0.0) + { + } //! This constructor is used when the solution of distance is on an Edge. //! The different initialized fields are: @@ -61,17 +62,19 @@ class BRepExtrema_SolutionElem //! @param theSolType the type of solution //! @param theEdge the Edge //! @param theParam the parameter to locate the solution - BRepExtrema_SolutionElem (const Standard_Real theDist, - const gp_Pnt& thePoint, - const BRepExtrema_SupportType theSolType, - const TopoDS_Edge& theEdge, - const Standard_Real theParam) - : myDist (theDist), - myPoint (thePoint), - mySupType (theSolType), - myEdge (theEdge), - myPar1 (theParam), - myPar2 (0.0) {} + BRepExtrema_SolutionElem(const Standard_Real theDist, + const gp_Pnt& thePoint, + const BRepExtrema_SupportType theSolType, + const TopoDS_Edge& theEdge, + const Standard_Real theParam) + : myDist(theDist), + myPoint(thePoint), + mySupType(theSolType), + myEdge(theEdge), + myPar1(theParam), + myPar2(0.0) + { + } //! This constructor is used when the solution of distance is in a Face. //! The different initialized fields are: @@ -81,83 +84,61 @@ class BRepExtrema_SolutionElem //! @param theFace the Face //! @param theU U parameter to locate the solution //! @param theV V parameter to locate the solution - BRepExtrema_SolutionElem (const Standard_Real theDist, - const gp_Pnt& thePoint, - const BRepExtrema_SupportType theSolType, - const TopoDS_Face& theFace, - const Standard_Real theU, - const Standard_Real theV) - : myDist (theDist), - myPoint (thePoint), - mySupType (theSolType), - myFace (theFace), - myPar1 (theU), - myPar2 (theV) {} - - //! Returns the value of the minimum distance. - Standard_Real Dist() const + BRepExtrema_SolutionElem(const Standard_Real theDist, + const gp_Pnt& thePoint, + const BRepExtrema_SupportType theSolType, + const TopoDS_Face& theFace, + const Standard_Real theU, + const Standard_Real theV) + : myDist(theDist), + myPoint(thePoint), + mySupType(theSolType), + myFace(theFace), + myPar1(theU), + myPar2(theV) { - return myDist; } + //! Returns the value of the minimum distance. + Standard_Real Dist() const { return myDist; } + //! Returns the solution point. - const gp_Pnt& Point() const - { - return myPoint; - } + const gp_Pnt& Point() const { return myPoint; } //! Returns the Support type: //! IsVertex => The solution is a vertex. //! IsOnEdge => The solution belongs to an Edge. //! IsInFace => The solution is inside a Face. - BRepExtrema_SupportType SupportKind() const - { - return mySupType; - } + BRepExtrema_SupportType SupportKind() const { return mySupType; } //! Returns the vertex if the solution is a Vertex. - const TopoDS_Vertex& Vertex() const - { - return myVertex; - } + const TopoDS_Vertex& Vertex() const { return myVertex; } //! Returns the vertex if the solution is an Edge. - const TopoDS_Edge& Edge() const - { - return myEdge; - } + const TopoDS_Edge& Edge() const { return myEdge; } //! Returns the vertex if the solution is an Face. - const TopoDS_Face& Face() const - { - return myFace; - } + const TopoDS_Face& Face() const { return myFace; } //! Returns the parameter value if the solution is on Edge. - void EdgeParameter (Standard_Real& theParam) const - { - theParam = myPar1; - } + void EdgeParameter(Standard_Real& theParam) const { theParam = myPar1; } //! Returns the parameters U and V if the solution is in a Face. - void FaceParameter (Standard_Real& theU, - Standard_Real& theV) const + void FaceParameter(Standard_Real& theU, Standard_Real& theV) const { theU = myPar1; theV = myPar2; } - private: - - Standard_Real myDist; - gp_Pnt myPoint; +private: + Standard_Real myDist; + gp_Pnt myPoint; BRepExtrema_SupportType mySupType; - TopoDS_Vertex myVertex; - TopoDS_Edge myEdge; - TopoDS_Face myFace; - Standard_Real myPar1; - Standard_Real myPar2; - + TopoDS_Vertex myVertex; + TopoDS_Edge myEdge; + TopoDS_Face myFace; + Standard_Real myPar1; + Standard_Real myPar2; }; #endif diff --git a/opencascade/BRepExtrema_TriangleSet.hxx b/opencascade/BRepExtrema_TriangleSet.hxx index eb87430cb..04f21a2be 100644 --- a/opencascade/BRepExtrema_TriangleSet.hxx +++ b/opencascade/BRepExtrema_TriangleSet.hxx @@ -29,83 +29,81 @@ typedef NCollection_Vector BRepExtrema_ShapeList; class BRepExtrema_TriangleSet : public BVH_PrimitiveSet3d { public: - //! Creates empty triangle set. Standard_EXPORT BRepExtrema_TriangleSet(); //! Creates triangle set from the given face. - Standard_EXPORT BRepExtrema_TriangleSet (const BRepExtrema_ShapeList& theFaces); + Standard_EXPORT BRepExtrema_TriangleSet(const BRepExtrema_ShapeList& theFaces); //! Releases resources of triangle set. Standard_EXPORT ~BRepExtrema_TriangleSet(); public: //! @name methods implementing BVH set interface - //! Returns total number of triangles. Standard_EXPORT Standard_Integer Size() const Standard_OVERRIDE; //! Returns AABB of the given triangle. - Standard_EXPORT BVH_Box Box (const Standard_Integer theIndex) const Standard_OVERRIDE; + Standard_EXPORT BVH_Box Box(const Standard_Integer theIndex) const + Standard_OVERRIDE; //! Make inherited method Box() visible to avoid CLang warning using BVH_PrimitiveSet3d::Box; //! Returns centroid position along specified axis. - Standard_EXPORT Standard_Real Center (const Standard_Integer theIndex, const Standard_Integer theAxis) const Standard_OVERRIDE; + Standard_EXPORT Standard_Real Center(const Standard_Integer theIndex, + const Standard_Integer theAxis) const Standard_OVERRIDE; //! Swaps indices of two specified triangles. - Standard_EXPORT void Swap (const Standard_Integer theIndex1, const Standard_Integer theIndex2) Standard_OVERRIDE; + Standard_EXPORT void Swap(const Standard_Integer theIndex1, + const Standard_Integer theIndex2) Standard_OVERRIDE; public: - //! Clears triangle set data. Standard_EXPORT void Clear(); //! Initializes triangle set. - Standard_EXPORT Standard_Boolean Init (const BRepExtrema_ShapeList& theShapes); + Standard_EXPORT Standard_Boolean Init(const BRepExtrema_ShapeList& theShapes); //! Returns all vertices. Standard_EXPORT const BVH_Array3d& GetVertices() const { return myVertexArray; } //! Returns vertices of the given triangle. - Standard_EXPORT void GetVertices (const Standard_Integer theIndex, - BVH_Vec3d& theVertex1, - BVH_Vec3d& theVertex2, - BVH_Vec3d& theVertex3) const; + Standard_EXPORT void GetVertices(const Standard_Integer theIndex, + BVH_Vec3d& theVertex1, + BVH_Vec3d& theVertex2, + BVH_Vec3d& theVertex3) const; //! Returns vertex indices of the given triangle. - Standard_EXPORT void GetVtxIndices (const Standard_Integer theIndex, - NCollection_Array1& theVtxIndices) const; + Standard_EXPORT void GetVtxIndices(const Standard_Integer theIndex, + NCollection_Array1& theVtxIndices) const; //! Returns face ID of the given triangle. - Standard_EXPORT Standard_Integer GetFaceID (const Standard_Integer theIndex) const; + Standard_EXPORT Standard_Integer GetFaceID(const Standard_Integer theIndex) const; //! Returns shape ID of the given vertex index. - Standard_EXPORT Standard_Integer GetShapeIDOfVtx (const Standard_Integer theIndex) const; + Standard_EXPORT Standard_Integer GetShapeIDOfVtx(const Standard_Integer theIndex) const; //! Returns vertex index in tringulation of the shape, which vertex belongs, //! with the given vtx ID in whole set. - Standard_EXPORT Standard_Integer GetVtxIdxInShape (const Standard_Integer theIndex) const; + Standard_EXPORT Standard_Integer GetVtxIdxInShape(const Standard_Integer theIndex) const; //! Returns triangle index (before swapping) in tringulation of the shape, which triangle belongs, //! with the given trg ID in whole set (after swapping). - Standard_EXPORT Standard_Integer GetTrgIdxInShape (const Standard_Integer theIndex) const; + Standard_EXPORT Standard_Integer GetTrgIdxInShape(const Standard_Integer theIndex) const; private: - //! Initializes triangle set from the face - Standard_Boolean initFace (const TopoDS_Face& theFace, const Standard_Integer theIndex); + Standard_Boolean initFace(const TopoDS_Face& theFace, const Standard_Integer theIndex); //! Initializes polygon from the edge - Standard_Boolean initEdge (const TopoDS_Edge& theEdge, const Standard_Integer theIndex); + Standard_Boolean initEdge(const TopoDS_Edge& theEdge, const Standard_Integer theIndex); //! Initializes nodes - void initNodes (const TColgp_Array1OfPnt& theNodes, - const gp_Trsf& theTrsf, - const Standard_Integer theIndex); + void initNodes(const TColgp_Array1OfPnt& theNodes, + const gp_Trsf& theTrsf, + const Standard_Integer theIndex); protected: - //! Array of vertex indices. BVH_Array4i myTriangles; @@ -126,9 +124,7 @@ protected: TColStd_DataMapOfIntegerInteger myTrgIdxMap; public: - DEFINE_STANDARD_RTTIEXT(BRepExtrema_TriangleSet, BVH_PrimitiveSet3d) - }; DEFINE_STANDARD_HANDLE(BRepExtrema_TriangleSet, BVH_PrimitiveSet3d) diff --git a/opencascade/BRepExtrema_UnCompatibleShape.hxx b/opencascade/BRepExtrema_UnCompatibleShape.hxx index 240e82642..112010c3a 100644 --- a/opencascade/BRepExtrema_UnCompatibleShape.hxx +++ b/opencascade/BRepExtrema_UnCompatibleShape.hxx @@ -26,8 +26,9 @@ class BRepExtrema_UnCompatibleShape; DEFINE_STANDARD_HANDLE(BRepExtrema_UnCompatibleShape, Standard_DomainError) #if !defined No_Exception && !defined No_BRepExtrema_UnCompatibleShape - #define BRepExtrema_UnCompatibleShape_Raise_if(CONDITION, MESSAGE) \ - if (CONDITION) throw BRepExtrema_UnCompatibleShape(MESSAGE); + #define BRepExtrema_UnCompatibleShape_Raise_if(CONDITION, MESSAGE) \ + if (CONDITION) \ + throw BRepExtrema_UnCompatibleShape(MESSAGE); #else #define BRepExtrema_UnCompatibleShape_Raise_if(CONDITION, MESSAGE) #endif diff --git a/opencascade/BRepFeat.hxx b/opencascade/BRepFeat.hxx index d4441dc10..a948cfbe1 100644 --- a/opencascade/BRepFeat.hxx +++ b/opencascade/BRepFeat.hxx @@ -35,7 +35,6 @@ class BRepTopAdaptor_FClass2d; class Geom2dAdaptor_Curve; class TopoDS_Solid; - //! BRepFeat is necessary for the //! creation and manipulation of both form and mechanical features in a //! Boundary Representation framework. Form features can be depressions or @@ -79,34 +78,43 @@ class TopoDS_Solid; //! - to a limiting face of the basis shape //! - to or from a limiting plane //! - to a height. -class BRepFeat +class BRepFeat { public: - DEFINE_STANDARD_ALLOC - - Standard_EXPORT static void SampleEdges (const TopoDS_Shape& S, TColgp_SequenceOfPnt& Pt); - - Standard_EXPORT static void Barycenter (const TopoDS_Shape& S, gp_Pnt& Pt); - - Standard_EXPORT static Standard_Real ParametricBarycenter (const TopoDS_Shape& S, const Handle(Geom_Curve)& C); - + Standard_EXPORT static void SampleEdges(const TopoDS_Shape& S, TColgp_SequenceOfPnt& Pt); + + Standard_EXPORT static void Barycenter(const TopoDS_Shape& S, gp_Pnt& Pt); + + Standard_EXPORT static Standard_Real ParametricBarycenter(const TopoDS_Shape& S, + const Handle(Geom_Curve)& C); + //! Ori = True taking account the orientation - Standard_EXPORT static void ParametricMinMax (const TopoDS_Shape& S, const Handle(Geom_Curve)& C, Standard_Real& prmin, Standard_Real& prmax, Standard_Real& prbmin, Standard_Real& prbmax, Standard_Boolean& flag, const Standard_Boolean Ori = Standard_False); - - Standard_EXPORT static Standard_Boolean IsInside (const TopoDS_Face& F1, const TopoDS_Face& F2); - - Standard_EXPORT static Standard_Boolean IsInOut (const BRepTopAdaptor_FClass2d& FC, const Geom2dAdaptor_Curve& AC); - - Standard_EXPORT static void FaceUntil (const TopoDS_Shape& S, TopoDS_Face& F); - - Standard_EXPORT static TopoDS_Solid Tool (const TopoDS_Shape& SRef, const TopoDS_Face& Fac, const TopAbs_Orientation Orf); - + Standard_EXPORT static void ParametricMinMax(const TopoDS_Shape& S, + const Handle(Geom_Curve)& C, + Standard_Real& prmin, + Standard_Real& prmax, + Standard_Real& prbmin, + Standard_Real& prbmax, + Standard_Boolean& flag, + const Standard_Boolean Ori = Standard_False); + + Standard_EXPORT static Standard_Boolean IsInside(const TopoDS_Face& F1, const TopoDS_Face& F2); + + Standard_EXPORT static Standard_Boolean IsInOut(const BRepTopAdaptor_FClass2d& FC, + const Geom2dAdaptor_Curve& AC); + + Standard_EXPORT static void FaceUntil(const TopoDS_Shape& S, TopoDS_Face& F); + + Standard_EXPORT static TopoDS_Solid Tool(const TopoDS_Shape& SRef, + const TopoDS_Face& Fac, + const TopAbs_Orientation Orf); + //! Prints the Error description of the State as a String on //! the Stream and returns . - Standard_EXPORT static Standard_OStream& Print (const BRepFeat_StatusError SE, Standard_OStream& S); - + Standard_EXPORT static Standard_OStream& Print(const BRepFeat_StatusError SE, + Standard_OStream& S); }; #endif // _BRepFeat_HeaderFile diff --git a/opencascade/BRepFeat_Builder.hxx b/opencascade/BRepFeat_Builder.hxx index 2d3fc4327..06686afee 100644 --- a/opencascade/BRepFeat_Builder.hxx +++ b/opencascade/BRepFeat_Builder.hxx @@ -27,7 +27,6 @@ class TopoDS_Shape; class TopoDS_Face; - //! Provides a basic tool to implement features topological //! operations. The main goal of the algorithm is to perform //! the result of the operation according to the @@ -43,103 +42,86 @@ class TopoDS_Face; //! c) Build images of the object; //! d) Build the result of the operation. //! Result: Result shape of the operation required. -class BRepFeat_Builder : public BOPAlgo_BOP +class BRepFeat_Builder : public BOPAlgo_BOP { public: - DEFINE_STANDARD_ALLOC - Standard_EXPORT BRepFeat_Builder(); -Standard_EXPORT virtual ~BRepFeat_Builder(); - + Standard_EXPORT virtual ~BRepFeat_Builder(); + //! Clears internal fields and arguments. Standard_EXPORT virtual void Clear() Standard_OVERRIDE; - + //! Initializes the object of local boolean operation. - Standard_EXPORT void Init (const TopoDS_Shape& theShape); - + Standard_EXPORT void Init(const TopoDS_Shape& theShape); + //! Initializes the arguments of local boolean operation. - Standard_EXPORT void Init (const TopoDS_Shape& theShape, const TopoDS_Shape& theTool); - + Standard_EXPORT void Init(const TopoDS_Shape& theShape, const TopoDS_Shape& theTool); + //! Sets the operation of local boolean operation. //! If theFuse = 0 than the operation is CUT, otherwise FUSE. - Standard_EXPORT void SetOperation (const Standard_Integer theFuse); - + Standard_EXPORT void SetOperation(const Standard_Integer theFuse); + //! Sets the operation of local boolean operation. //! If theFlag = TRUE it means that no selection of parts //! of the tool is needed, t.e. no second part. In that case //! if theFuse = 0 than operation is COMMON, otherwise CUT21. //! If theFlag = FALSE SetOperation(theFuse) function is called. - Standard_EXPORT void SetOperation (const Standard_Integer theFuse, const Standard_Boolean theFlag); - + Standard_EXPORT void SetOperation(const Standard_Integer theFuse, const Standard_Boolean theFlag); + //! Collects parts of the tool. - Standard_EXPORT void PartsOfTool (TopTools_ListOfShape& theLT); - + Standard_EXPORT void PartsOfTool(TopTools_ListOfShape& theLT); + //! Initializes parts of the tool for second step of algorithm. //! Collects shapes and all sub-shapes into myShapes map. - Standard_EXPORT void KeepParts (const TopTools_ListOfShape& theIm); - + Standard_EXPORT void KeepParts(const TopTools_ListOfShape& theIm); + //! Adds shape theS and all its sub-shapes into myShapes map. - Standard_EXPORT void KeepPart (const TopoDS_Shape& theS); - + Standard_EXPORT void KeepPart(const TopoDS_Shape& theS); + //! Main function to build the result of the //! local operation required. - Standard_EXPORT void PerformResult(const Message_ProgressRange& theRange = Message_ProgressRange()); - + Standard_EXPORT void PerformResult( + const Message_ProgressRange& theRange = Message_ProgressRange()); + //! Rebuilds faces in accordance with the kept parts of the tool. Standard_EXPORT void RebuildFaces(); - + //! Rebuilds edges in accordance with the kept parts of the tool. - Standard_EXPORT void RebuildEdge (const TopoDS_Shape& theE, const TopoDS_Face& theF, const TopTools_MapOfShape& theME, TopTools_ListOfShape& aLEIm); - + Standard_EXPORT void RebuildEdge(const TopoDS_Shape& theE, + const TopoDS_Face& theF, + const TopTools_MapOfShape& theME, + TopTools_ListOfShape& aLEIm); + //! Collects the images of the object, that contains in //! the images of the tool. Standard_EXPORT void CheckSolidImages(); - + //! Collects the removed parts of the tool into myRemoved map. Standard_EXPORT void FillRemoved(); - - //! Adds the shape S and its sub-shapes into myRemoved map. - Standard_EXPORT void FillRemoved (const TopoDS_Shape& theS, TopTools_MapOfShape& theM); - - + //! Adds the shape S and its sub-shapes into myRemoved map. + Standard_EXPORT void FillRemoved(const TopoDS_Shape& theS, TopTools_MapOfShape& theM); protected: - //! Prepares builder of local operation. Standard_EXPORT virtual void Prepare() Standard_OVERRIDE; - + //! Function is redefined to avoid the usage of removed faces. - Standard_EXPORT virtual void FillIn3DParts (TopTools_DataMapOfShapeShape& theDraftSolids, - const Message_ProgressRange& theRange) Standard_OVERRIDE; + Standard_EXPORT virtual void FillIn3DParts(TopTools_DataMapOfShapeShape& theDraftSolids, + const Message_ProgressRange& theRange) + Standard_OVERRIDE; //! Avoid the check for open solids and always use the splits //! of solids for building the result shape. - virtual Standard_Boolean CheckArgsForOpenSolid() Standard_OVERRIDE - { - return Standard_False; - } - + virtual Standard_Boolean CheckArgsForOpenSolid() Standard_OVERRIDE { return Standard_False; } TopTools_MapOfShape myShapes; TopTools_MapOfShape myRemoved; - Standard_Integer myFuse; - + Standard_Integer myFuse; private: - - - - - }; - - - - - - #endif // _BRepFeat_Builder_HeaderFile diff --git a/opencascade/BRepFeat_Form.hxx b/opencascade/BRepFeat_Form.hxx index 793fb952d..29a2d3881 100644 --- a/opencascade/BRepFeat_Form.hxx +++ b/opencascade/BRepFeat_Form.hxx @@ -35,7 +35,6 @@ class Geom_Curve; class LocOpe_Gluer; class BRepAlgoAPI_BooleanOperation; - //! Provides general functions to build form features. //! Form features can be depressions or protrusions and include the following types: //! - Cylinder @@ -63,37 +62,37 @@ class BRepAlgoAPI_BooleanOperation; //! Topological definition with local operations of this sort makes //! calculations simpler and faster than a global operation. The latter //! would entail a second phase of removing unwanted matter to get the same result. -class BRepFeat_Form : public BRepBuilderAPI_MakeShape +class BRepFeat_Form : public BRepBuilderAPI_MakeShape { public: - DEFINE_STANDARD_ALLOC - //! returns the list of generated Faces. - Standard_EXPORT virtual const TopTools_ListOfShape& Modified (const TopoDS_Shape& F) Standard_OVERRIDE; - + Standard_EXPORT virtual const TopTools_ListOfShape& Modified(const TopoDS_Shape& F) + Standard_OVERRIDE; + //! returns a list of the created faces //! from the shape . - Standard_EXPORT virtual const TopTools_ListOfShape& Generated (const TopoDS_Shape& S) Standard_OVERRIDE; - - Standard_EXPORT virtual Standard_Boolean IsDeleted (const TopoDS_Shape& S) Standard_OVERRIDE; - + Standard_EXPORT virtual const TopTools_ListOfShape& Generated(const TopoDS_Shape& S) + Standard_OVERRIDE; + + Standard_EXPORT virtual Standard_Boolean IsDeleted(const TopoDS_Shape& S) Standard_OVERRIDE; + //! Returns the list of shapes created at the bottom of //! the created form. It may be an empty list. Standard_EXPORT const TopTools_ListOfShape& FirstShape() const; - + //! Returns the list of shapes created at the top of the //! created form. It may be an empty list. Standard_EXPORT const TopTools_ListOfShape& LastShape() const; - + //! Returns a list of the limiting and glueing edges //! generated by the feature. These edges did not originally //! exist in the basis shape. //! The list provides the information necessary for //! subsequent addition of fillets. It may be an empty list. Standard_EXPORT const TopTools_ListOfShape& NewEdges() const; - + //! Returns a list of the tangent edges among the limiting //! and glueing edges generated by the feature. These //! edges did not originally exist in the basis shape and are @@ -103,100 +102,81 @@ public: //! If an edge is tangent, no fillet is possible, and the edge //! must subsequently be removed if you want to add a fillet. Standard_EXPORT const TopTools_ListOfShape& TgtEdges() const; - + //! Initializes the topological construction if the basis shape is present. - void BasisShapeValid(); - + void BasisShapeValid(); + //! Initializes the topological construction if the generated shape S is present. - void GeneratedShapeValid(); - + void GeneratedShapeValid(); //! Initializes the topological construction if the shape is //! present from the specified integer on. - void ShapeFromValid(); - + void ShapeFromValid(); //! Initializes the topological construction if the shape is //! present until the specified integer. - void ShapeUntilValid(); - + void ShapeUntilValid(); //! Initializes the topological construction if the glued face is present. - void GluedFacesValid(); - + void GluedFacesValid(); //! Initializes the topological construction if the sketch face //! is present. If the sketch face is inside the basis shape, //! local operations such as glueing can be performed. - void SketchFaceValid(); - + void SketchFaceValid(); + //! Initializes the topological construction if the selected face is present. - void PerfSelectionValid(); - - Standard_EXPORT virtual void Curves (TColGeom_SequenceOfCurve& S) = 0; - - Standard_EXPORT virtual Handle(Geom_Curve) BarycCurve() = 0; - - Standard_EXPORT BRepFeat_StatusError CurrentStatusError() const; + void PerfSelectionValid(); + Standard_EXPORT virtual void Curves(TColGeom_SequenceOfCurve& S) = 0; + Standard_EXPORT virtual Handle(Geom_Curve) BarycCurve() = 0; + Standard_EXPORT BRepFeat_StatusError CurrentStatusError() const; protected: - - //! Redefines the empty constructor. - BRepFeat_Form(); - + BRepFeat_Form(); + //! General perform method... Standard_EXPORT void GlobalPerform(); - - Standard_EXPORT void UpdateDescendants (const LocOpe_Gluer& G); - - Standard_EXPORT void UpdateDescendants (const BRepAlgoAPI_BooleanOperation& aBOP, const TopoDS_Shape& SResult, const Standard_Boolean SkipFace = Standard_False); - - Standard_EXPORT Standard_Boolean TransformShapeFU (const Standard_Integer flag); - - - Standard_Boolean myFuse; - Standard_Boolean myModify; - TopTools_DataMapOfShapeListOfShape myMap; - TopoDS_Shape myFShape; - TopoDS_Shape myLShape; - TopTools_ListOfShape myNewEdges; - TopTools_ListOfShape myTgtEdges; - BRepFeat_PerfSelection myPerfSelection; - Standard_Boolean myJustGluer; - Standard_Boolean myJustFeat; - TopoDS_Shape mySbase; - TopoDS_Face mySkface; - TopoDS_Shape myGShape; - TopoDS_Shape mySFrom; - TopoDS_Shape mySUntil; - TopTools_DataMapOfShapeShape myGluedF; + Standard_EXPORT void UpdateDescendants(const LocOpe_Gluer& G); -private: + Standard_EXPORT void UpdateDescendants(const BRepAlgoAPI_BooleanOperation& aBOP, + const TopoDS_Shape& SResult, + const Standard_Boolean SkipFace = Standard_False); + Standard_EXPORT Standard_Boolean TransformShapeFU(const Standard_Integer flag); + Standard_Boolean myFuse; + Standard_Boolean myModify; + TopTools_DataMapOfShapeListOfShape myMap; + TopoDS_Shape myFShape; + TopoDS_Shape myLShape; + TopTools_ListOfShape myNewEdges; + TopTools_ListOfShape myTgtEdges; + BRepFeat_PerfSelection myPerfSelection; + Standard_Boolean myJustGluer; + Standard_Boolean myJustFeat; + TopoDS_Shape mySbase; + TopoDS_Face mySkface; + TopoDS_Shape myGShape; + TopoDS_Shape mySFrom; + TopoDS_Shape mySUntil; + TopTools_DataMapOfShapeShape myGluedF; - Standard_Boolean mySbOK; - Standard_Boolean mySkOK; - Standard_Boolean myGSOK; - Standard_Boolean mySFOK; - Standard_Boolean mySUOK; - Standard_Boolean myGFOK; - Standard_Boolean myPSOK; +private: + Standard_Boolean mySbOK; + Standard_Boolean mySkOK; + Standard_Boolean myGSOK; + Standard_Boolean mySFOK; + Standard_Boolean mySUOK; + Standard_Boolean myGFOK; + Standard_Boolean myPSOK; BRepFeat_StatusError myStatusError; - - }; - #include - - - - #endif // _BRepFeat_Form_HeaderFile diff --git a/opencascade/BRepFeat_Form.lxx b/opencascade/BRepFeat_Form.lxx index fa4c033aa..c045d1340 100644 --- a/opencascade/BRepFeat_Form.lxx +++ b/opencascade/BRepFeat_Form.lxx @@ -15,36 +15,41 @@ // commercial license or contractual agreement. //======================================================================= -//function : BRepFeatForm -//purpose : -//======================================================================= - -inline BRepFeat_Form::BRepFeat_Form () : - myFuse(Standard_False), - myModify(Standard_False), - myPerfSelection(BRepFeat_NoSelection), - myJustGluer(Standard_False), - myJustFeat(Standard_False), - mySbOK(Standard_False),mySkOK(Standard_False), - myGSOK(Standard_False),mySFOK(Standard_False), - mySUOK(Standard_False),myGFOK(Standard_False), - myPSOK(Standard_False), - myStatusError(BRepFeat_NotInitialized) +// function : BRepFeatForm +// purpose : +//======================================================================= + +inline BRepFeat_Form::BRepFeat_Form() + : myFuse(Standard_False), + myModify(Standard_False), + myPerfSelection(BRepFeat_NoSelection), + myJustGluer(Standard_False), + myJustFeat(Standard_False), + mySbOK(Standard_False), + mySkOK(Standard_False), + myGSOK(Standard_False), + mySFOK(Standard_False), + mySUOK(Standard_False), + myGFOK(Standard_False), + myPSOK(Standard_False), + myStatusError(BRepFeat_NotInitialized) -{} +{ +} //======================================================================= -//function : BasisShapeValid -//purpose : +// function : BasisShapeValid +// purpose : //======================================================================= inline void BRepFeat_Form::BasisShapeValid() { mySbOK = Standard_True; } + //======================================================================= -//function : PerfSelectionValid -//purpose : +// function : PerfSelectionValid +// purpose : //======================================================================= inline void BRepFeat_Form::PerfSelectionValid() @@ -53,26 +58,28 @@ inline void BRepFeat_Form::PerfSelectionValid() } //======================================================================= -//function : GeneratedShapeValid -//purpose : +// function : GeneratedShapeValid +// purpose : //======================================================================= inline void BRepFeat_Form::GeneratedShapeValid() { myGSOK = Standard_True; } + //======================================================================= -//function : ShapeFromValid -//purpose : +// function : ShapeFromValid +// purpose : //======================================================================= inline void BRepFeat_Form::ShapeFromValid() { mySFOK = Standard_True; } + //======================================================================= -//function : ShapeUntilValid -//purpose : +// function : ShapeUntilValid +// purpose : //======================================================================= inline void BRepFeat_Form::ShapeUntilValid() @@ -81,8 +88,8 @@ inline void BRepFeat_Form::ShapeUntilValid() } //======================================================================= -//function : GluedFacesValid -//purpose : +// function : GluedFacesValid +// purpose : //======================================================================= inline void BRepFeat_Form::GluedFacesValid() @@ -91,14 +98,11 @@ inline void BRepFeat_Form::GluedFacesValid() } //======================================================================= -//function : SketchFaceValid -//purpose : +// function : SketchFaceValid +// purpose : //======================================================================= inline void BRepFeat_Form::SketchFaceValid() { mySkOK = Standard_True; } - - - diff --git a/opencascade/BRepFeat_Gluer.hxx b/opencascade/BRepFeat_Gluer.hxx index a525775c1..addb79303 100644 --- a/opencascade/BRepFeat_Gluer.hxx +++ b/opencascade/BRepFeat_Gluer.hxx @@ -29,7 +29,6 @@ class TopoDS_Shape; class TopoDS_Face; class TopoDS_Edge; - //! One of the most significant aspects //! of BRepFeat functionality is the use of local operations as opposed //! to global ones. In a global operation, you would first @@ -46,24 +45,22 @@ class TopoDS_Edge; //! projected to a plane outside or inside the basis shape. By //! rebuilding the initial shape incorporating the edges and the //! faces of the tool, protrusion features can be constructed. -class BRepFeat_Gluer : public BRepBuilderAPI_MakeShape +class BRepFeat_Gluer : public BRepBuilderAPI_MakeShape { public: - DEFINE_STANDARD_ALLOC - //! Initializes an empty constructor - BRepFeat_Gluer(); - + BRepFeat_Gluer(); + //! Initializes the shapes to be glued, the new shape //! Snew and the basis shape Sbase. - BRepFeat_Gluer(const TopoDS_Shape& Snew, const TopoDS_Shape& Sbase); - + BRepFeat_Gluer(const TopoDS_Shape& Snew, const TopoDS_Shape& Sbase); + //! Initializes the new shape Snew and the basis shape //! Sbase for the local glueing operation. - void Init (const TopoDS_Shape& Snew, const TopoDS_Shape& Sbase); - + void Init(const TopoDS_Shape& Snew, const TopoDS_Shape& Sbase); + //! Defines a contact between Fnew on the new shape //! Snew and Fbase on the basis shape Sbase. Informs //! other methods that Fnew in the new shape Snew is @@ -71,57 +68,41 @@ public: //! The contact faces of the glued shape must not have //! parts outside the contact faces of the basis shape. //! This indicates that glueing is possible. - void Bind (const TopoDS_Face& Fnew, const TopoDS_Face& Fbase); - + void Bind(const TopoDS_Face& Fnew, const TopoDS_Face& Fbase); + //! nforms other methods that the edge Enew in the new //! shape is the same as the edge Ebase in the basis //! shape and is therefore attached to the basis shape. This //! indicates that glueing is possible. - void Bind (const TopoDS_Edge& Enew, const TopoDS_Edge& Ebase); - + void Bind(const TopoDS_Edge& Enew, const TopoDS_Edge& Ebase); + //! Determine which operation type to use glueing or sliding. - LocOpe_Operation OpeType() const; - + LocOpe_Operation OpeType() const; + //! Returns the basis shape of the compound shape. - const TopoDS_Shape& BasisShape() const; - + const TopoDS_Shape& BasisShape() const; + //! Returns the resulting compound shape. - const TopoDS_Shape& GluedShape() const; - + const TopoDS_Shape& GluedShape() const; + //! This is called by Shape(). It does nothing but //! may be redefined. - Standard_EXPORT virtual void Build(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; - + Standard_EXPORT virtual void Build( + const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; + //! returns the status of the Face after //! the shape creation. - Standard_EXPORT virtual Standard_Boolean IsDeleted (const TopoDS_Shape& F) Standard_OVERRIDE; - - //! returns the list of generated Faces. - Standard_EXPORT virtual const TopTools_ListOfShape& Modified (const TopoDS_Shape& F) Standard_OVERRIDE; - - + Standard_EXPORT virtual Standard_Boolean IsDeleted(const TopoDS_Shape& F) Standard_OVERRIDE; + //! returns the list of generated Faces. + Standard_EXPORT virtual const TopTools_ListOfShape& Modified(const TopoDS_Shape& F) + Standard_OVERRIDE; protected: - - - - - private: - - - LocOpe_Gluer myGluer; - - }; - #include - - - - #endif // _BRepFeat_Gluer_HeaderFile diff --git a/opencascade/BRepFeat_Gluer.lxx b/opencascade/BRepFeat_Gluer.lxx index 8ef61e294..f9ec24852 100644 --- a/opencascade/BRepFeat_Gluer.lxx +++ b/opencascade/BRepFeat_Gluer.lxx @@ -15,64 +15,55 @@ // commercial license or contractual agreement. //======================================================================= -//function : BRepFeat_Gluer -//purpose : +// function : BRepFeat_Gluer +// purpose : //======================================================================= -inline BRepFeat_Gluer::BRepFeat_Gluer () -{} - +inline BRepFeat_Gluer::BRepFeat_Gluer() {} //======================================================================= -//function : BRepFeat_Gluer -//purpose : +// function : BRepFeat_Gluer +// purpose : //======================================================================= -inline BRepFeat_Gluer::BRepFeat_Gluer (const TopoDS_Shape& Snew, - const TopoDS_Shape& Sbase) : - myGluer(Sbase,Snew) // Attention a l`inversion -{} - +inline BRepFeat_Gluer::BRepFeat_Gluer(const TopoDS_Shape& Snew, const TopoDS_Shape& Sbase) + : myGluer(Sbase, Snew) // Attention a l`inversion +{ +} //======================================================================= -//function : Init -//purpose : +// function : Init +// purpose : //======================================================================= -inline void BRepFeat_Gluer::Init(const TopoDS_Shape& Snew, - const TopoDS_Shape& Sbase) +inline void BRepFeat_Gluer::Init(const TopoDS_Shape& Snew, const TopoDS_Shape& Sbase) { - myGluer.Init(Sbase,Snew); + myGluer.Init(Sbase, Snew); } - //======================================================================= -//function : Bind -//purpose : +// function : Bind +// purpose : //======================================================================= -inline void BRepFeat_Gluer::Bind(const TopoDS_Face& Fnew, - const TopoDS_Face& Fbase) +inline void BRepFeat_Gluer::Bind(const TopoDS_Face& Fnew, const TopoDS_Face& Fbase) { - myGluer.Bind(Fnew,Fbase); + myGluer.Bind(Fnew, Fbase); } - //======================================================================= -//function : Bind -//purpose : +// function : Bind +// purpose : //======================================================================= -inline void BRepFeat_Gluer::Bind(const TopoDS_Edge& Enew, - const TopoDS_Edge& Ebase) +inline void BRepFeat_Gluer::Bind(const TopoDS_Edge& Enew, const TopoDS_Edge& Ebase) { - myGluer.Bind(Enew,Ebase); + myGluer.Bind(Enew, Ebase); } - //======================================================================= -//function : OpeType -//purpose : +// function : OpeType +// purpose : //======================================================================= inline LocOpe_Operation BRepFeat_Gluer::OpeType() const @@ -80,10 +71,9 @@ inline LocOpe_Operation BRepFeat_Gluer::OpeType() const return myGluer.OpeType(); } - //======================================================================= -//function : BasisShape -//purpose : +// function : BasisShape +// purpose : //======================================================================= inline const TopoDS_Shape& BRepFeat_Gluer::BasisShape() const @@ -91,15 +81,12 @@ inline const TopoDS_Shape& BRepFeat_Gluer::BasisShape() const return myGluer.BasisShape(); } - //======================================================================= -//function : GluedShape -//purpose : +// function : GluedShape +// purpose : //======================================================================= inline const TopoDS_Shape& BRepFeat_Gluer::GluedShape() const { return myGluer.GluedShape(); } - - diff --git a/opencascade/BRepFeat_MakeCylindricalHole.hxx b/opencascade/BRepFeat_MakeCylindricalHole.hxx index 87ff55200..3093e6a51 100644 --- a/opencascade/BRepFeat_MakeCylindricalHole.hxx +++ b/opencascade/BRepFeat_MakeCylindricalHole.hxx @@ -31,98 +31,88 @@ #endif //! Provides a tool to make cylindrical holes on a shape. -class BRepFeat_MakeCylindricalHole : public BRepFeat_Builder +class BRepFeat_MakeCylindricalHole : public BRepFeat_Builder { public: - DEFINE_STANDARD_ALLOC - //! Empty constructor. - BRepFeat_MakeCylindricalHole(); - + BRepFeat_MakeCylindricalHole(); + //! Sets the axis of the hole(s). - void Init (const gp_Ax1& Axis); - + void Init(const gp_Ax1& Axis); + //! Sets the shape and axis on which hole(s) will be //! performed. - void Init (const TopoDS_Shape& S, const gp_Ax1& Axis); + void Init(const TopoDS_Shape& S, const gp_Ax1& Axis); - //! Performs every holes of radius . This + //! Performs every hole of radius . This //! command has the same effect as a cut operation //! with an infinite cylinder defined by the given //! axis and . - Standard_EXPORT void Perform (const Standard_Real Radius); - - //! Performs evry hole of radius located + Standard_EXPORT void Perform(const Standard_Real Radius); + + //! Performs every hole of radius located //! between PFrom and PTo on the given axis. If //! is set to Standard_False no control //! are done on the resulting shape after the //! operation is performed. - Standard_EXPORT void Perform (const Standard_Real Radius, const Standard_Real PFrom, const Standard_Real PTo, const Standard_Boolean WithControl = Standard_True); - + Standard_EXPORT void Perform(const Standard_Real Radius, + const Standard_Real PFrom, + const Standard_Real PTo, + const Standard_Boolean WithControl = Standard_True); + //! Performs the first hole of radius , in the //! direction of the defined axis. First hole signify //! first encountered after the origin of the axis. If //! is set to Standard_False no control //! are done on the resulting shape after the //! operation is performed. - Standard_EXPORT void PerformThruNext (const Standard_Real Radius, const Standard_Boolean WithControl = Standard_True); - - //! Performs evry holes of radius located + Standard_EXPORT void PerformThruNext(const Standard_Real Radius, + const Standard_Boolean WithControl = Standard_True); + + //! Performs every hole of radius located //! after the origin of the given axis. If //! is set to Standard_False no control //! are done on the resulting shape after the //! operation is performed. - Standard_EXPORT void PerformUntilEnd (const Standard_Real Radius, const Standard_Boolean WithControl = Standard_True); - + Standard_EXPORT void PerformUntilEnd(const Standard_Real Radius, + const Standard_Boolean WithControl = Standard_True); + //! Performs a blind hole of radius and //! length . The length is measured from the //! origin of the given axis. If is set //! to Standard_False no control are done after the //! operation is performed. - Standard_EXPORT void PerformBlind (const Standard_Real Radius, const Standard_Real Length, const Standard_Boolean WithControl = Standard_True); - + Standard_EXPORT void PerformBlind(const Standard_Real Radius, + const Standard_Real Length, + const Standard_Boolean WithControl = Standard_True); + //! Returns the status after a hole is performed. - BRepFeat_Status Status() const; - + BRepFeat_Status Status() const; + //! Builds the resulting shape (redefined from //! MakeShape). Invalidates the given parts of tools //! if any, and performs the result of the local //! operation. Standard_EXPORT void Build(); - - - protected: - //! Unhide the base class member to avoid Clang warnings using BRepFeat_Builder::Perform; - private: - - Standard_EXPORT BRepFeat_Status Validate(); - - gp_Ax1 myAxis; + gp_Ax1 myAxis; Standard_Boolean myAxDef; - BRepFeat_Status myStatus; + BRepFeat_Status myStatus; Standard_Boolean myIsBlind; Standard_Boolean myValidate; - TopoDS_Face myTopFace; - TopoDS_Face myBotFace; - - + TopoDS_Face myTopFace; + TopoDS_Face myBotFace; }; - #include - - - - #endif // _BRepFeat_MakeCylindricalHole_HeaderFile diff --git a/opencascade/BRepFeat_MakeCylindricalHole.lxx b/opencascade/BRepFeat_MakeCylindricalHole.lxx index 631ad37a0..a0d2c5522 100644 --- a/opencascade/BRepFeat_MakeCylindricalHole.lxx +++ b/opencascade/BRepFeat_MakeCylindricalHole.lxx @@ -16,50 +16,48 @@ // Modified by jag, Tue May 30 09:47:02 1995 - //======================================================================= -//function : BRepFeat_MakeCylindricalHole -//purpose : +// function : BRepFeat_MakeCylindricalHole +// purpose : //======================================================================= -inline BRepFeat_MakeCylindricalHole::BRepFeat_MakeCylindricalHole (): - myAxDef(Standard_False), - myStatus(BRepFeat_NoError), - myIsBlind(Standard_False), - myValidate(Standard_False) -{} +inline BRepFeat_MakeCylindricalHole::BRepFeat_MakeCylindricalHole() + : myAxDef(Standard_False), + myStatus(BRepFeat_NoError), + myIsBlind(Standard_False), + myValidate(Standard_False) +{ +} //======================================================================= -//function : Init -//purpose : +// function : Init +// purpose : //======================================================================= inline void BRepFeat_MakeCylindricalHole::Init(const gp_Ax1& Axis) { - myAxis = Axis; + myAxis = Axis; myAxDef = Standard_True; } - //======================================================================= -//function : Init -//purpose : +// function : Init +// purpose : //======================================================================= -inline void BRepFeat_MakeCylindricalHole::Init(const TopoDS_Shape& S, - const gp_Ax1& Axis) +inline void BRepFeat_MakeCylindricalHole::Init(const TopoDS_Shape& S, const gp_Ax1& Axis) { BRepFeat_Builder::Init(S); - myAxis = Axis; + myAxis = Axis; myAxDef = Standard_True; } //======================================================================= -//function : Status -//purpose : +// function : Status +// purpose : //======================================================================= -inline BRepFeat_Status BRepFeat_MakeCylindricalHole::Status () const +inline BRepFeat_Status BRepFeat_MakeCylindricalHole::Status() const { return myStatus; } diff --git a/opencascade/BRepFeat_MakeDPrism.hxx b/opencascade/BRepFeat_MakeDPrism.hxx index 358e94b8a..43ba0c7ef 100644 --- a/opencascade/BRepFeat_MakeDPrism.hxx +++ b/opencascade/BRepFeat_MakeDPrism.hxx @@ -31,7 +31,6 @@ class Geom_Curve; class TopoDS_Shape; class TopoDS_Edge; - //! Describes functions to build draft //! prism topologies from basis shape surfaces. These can be depressions or protrusions. //! The semantics of draft prism feature creation is based on the @@ -48,13 +47,11 @@ class TopoDS_Edge; //! In case of the concerned area of a face, you could, for example, cut //! it out and move it to a different height which will define the //! limiting face of a protrusion or depression. -class BRepFeat_MakeDPrism : public BRepFeat_Form +class BRepFeat_MakeDPrism : public BRepFeat_Form { public: - DEFINE_STANDARD_ALLOC - //! A face Pbase is selected in the shape //! Sbase to serve as the basis for the draft prism. The //! draft will be defined by the angle Angle and Fuse offers a choice between: @@ -64,17 +61,22 @@ public: //! operation. If it is inside the basis shape, a local //! operation such as glueing can be performed. //! Initializes the draft prism class - BRepFeat_MakeDPrism (const TopoDS_Shape& Sbase, const TopoDS_Face& Pbase, const TopoDS_Face& Skface, const Standard_Real Angle, const Standard_Integer Fuse, const Standard_Boolean Modify) + BRepFeat_MakeDPrism(const TopoDS_Shape& Sbase, + const TopoDS_Face& Pbase, + const TopoDS_Face& Skface, + const Standard_Real Angle, + const Standard_Integer Fuse, + const Standard_Boolean Modify) { - Init (Sbase, Pbase, Skface, Angle, Fuse, Modify); + Init(Sbase, Pbase, Skface, Angle, Fuse, Modify); } - + BRepFeat_MakeDPrism() - : myAngle(RealLast()), - myStatusError(BRepFeat_OK) + : myAngle(RealLast()), + myStatusError(BRepFeat_OK) { } - + //! Initializes this algorithm for building draft prisms along surfaces. //! A face Pbase is selected in the basis shape Sbase to //! serve as the basis from the draft prism. The draft will be @@ -84,77 +86,69 @@ public: //! The sketch face Skface serves to determine the type of //! operation. If it is inside the basis shape, a local //! operation such as glueing can be performed. - Standard_EXPORT void Init (const TopoDS_Shape& Sbase, const TopoDS_Face& Pbase, const TopoDS_Face& Skface, const Standard_Real Angle, const Standard_Integer Fuse, const Standard_Boolean Modify); - + Standard_EXPORT void Init(const TopoDS_Shape& Sbase, + const TopoDS_Face& Pbase, + const TopoDS_Face& Skface, + const Standard_Real Angle, + const Standard_Integer Fuse, + const Standard_Boolean Modify); + //! Indicates that the edge will slide on the face //! . //! Raises ConstructionError if the face does not belong to the //! basis shape, or the edge to the prismed shape. - Standard_EXPORT void Add (const TopoDS_Edge& E, const TopoDS_Face& OnFace); - - Standard_EXPORT void Perform (const Standard_Real Height); - - Standard_EXPORT void Perform (const TopoDS_Shape& Until); - + Standard_EXPORT void Add(const TopoDS_Edge& E, const TopoDS_Face& OnFace); + + Standard_EXPORT void Perform(const Standard_Real Height); + + Standard_EXPORT void Perform(const TopoDS_Shape& Until); + //! Assigns one of the following semantics //! - to a height Height //! - to a face Until //! - from a face From to a height Until. //! Reconstructs the feature topologically according to the semantic option chosen. - Standard_EXPORT void Perform (const TopoDS_Shape& From, const TopoDS_Shape& Until); - + Standard_EXPORT void Perform(const TopoDS_Shape& From, const TopoDS_Shape& Until); + //! Realizes a semi-infinite prism, limited by the position of the prism base. Standard_EXPORT void PerformUntilEnd(); - + //! Realizes a semi-infinite prism, limited by the face Funtil. - Standard_EXPORT void PerformFromEnd (const TopoDS_Shape& FUntil); - + Standard_EXPORT void PerformFromEnd(const TopoDS_Shape& FUntil); + //! Builds an infinite prism. The infinite descendants will not be kept in the result. Standard_EXPORT void PerformThruAll(); - + //! Assigns both a limiting shape, Until from //! TopoDS_Shape, and a height, Height at which to stop //! generation of the prism feature. - Standard_EXPORT void PerformUntilHeight (const TopoDS_Shape& Until, const Standard_Real Height); - - Standard_EXPORT void Curves (TColGeom_SequenceOfCurve& S); - + Standard_EXPORT void PerformUntilHeight(const TopoDS_Shape& Until, const Standard_Real Height); + + Standard_EXPORT void Curves(TColGeom_SequenceOfCurve& S); + Standard_EXPORT Handle(Geom_Curve) BarycCurve(); - + //! Determination of TopEdges and LatEdges. //! sig = 1 -> TopEdges = FirstShape of the DPrism //! sig = 2 -> TOpEdges = LastShape of the DPrism - Standard_EXPORT void BossEdges (const Standard_Integer sig); - + Standard_EXPORT void BossEdges(const Standard_Integer sig); + //! Returns the list of TopoDS Edges of the top of the boss. Standard_EXPORT const TopTools_ListOfShape& TopEdges(); - + //! Returns the list of TopoDS Edges of the bottom of the boss. Standard_EXPORT const TopTools_ListOfShape& LatEdges(); - - - protected: - - - - - private: - - - - TopoDS_Face myPbase; + TopoDS_Face myPbase; TopTools_DataMapOfShapeListOfShape mySlface; - Standard_Real myAngle; - TColGeom_SequenceOfCurve myCurves; - Handle(Geom_Curve) myBCurve; - TopTools_ListOfShape myTopEdges; - TopTools_ListOfShape myLatEdges; - BRepFeat_StatusError myStatusError; - - + Standard_Real myAngle; + TColGeom_SequenceOfCurve myCurves; + Handle(Geom_Curve) myBCurve; + TopTools_ListOfShape myTopEdges; + TopTools_ListOfShape myLatEdges; + BRepFeat_StatusError myStatusError; }; #endif // _BRepFeat_MakeDPrism_HeaderFile diff --git a/opencascade/BRepFeat_MakeLinearForm.hxx b/opencascade/BRepFeat_MakeLinearForm.hxx index dad2fc20b..f979a861a 100644 --- a/opencascade/BRepFeat_MakeLinearForm.hxx +++ b/opencascade/BRepFeat_MakeLinearForm.hxx @@ -34,7 +34,6 @@ class TopoDS_Edge; class TopoDS_Face; class gp_Pnt; - //! Builds a rib or a groove along a developable, planar surface. //! The semantics of mechanical features is built around //! giving thickness to a contour. This thickness can either @@ -47,16 +46,14 @@ class gp_Pnt; //! - to a limiting face of the basis shape //! - to or from a limiting plane //! - to a height. -class BRepFeat_MakeLinearForm : public BRepFeat_RibSlot +class BRepFeat_MakeLinearForm : public BRepFeat_RibSlot { public: - DEFINE_STANDARD_ALLOC - //! initializes the linear form class - BRepFeat_MakeLinearForm(); - + BRepFeat_MakeLinearForm(); + //! contour W, a shape Sbase and a //! plane P are initialized to serve as the basic //! elements in the construction of the rib or groove. @@ -67,8 +64,14 @@ public: //! setting 0 in case of the groove //! - adding matter with Boolean fusion using the //! setting 1 in case of the rib. - BRepFeat_MakeLinearForm(const TopoDS_Shape& Sbase, const TopoDS_Wire& W, const Handle(Geom_Plane)& P, const gp_Vec& Direction, const gp_Vec& Direction1, const Standard_Integer Fuse, const Standard_Boolean Modify); - + BRepFeat_MakeLinearForm(const TopoDS_Shape& Sbase, + const TopoDS_Wire& W, + const Handle(Geom_Plane)& P, + const gp_Vec& Direction, + const gp_Vec& Direction1, + const Standard_Integer Fuse, + const Standard_Boolean Modify); + //! Initializes this construction algorithm. //! A contour W, a shape Sbase and a plane P are //! initialized to serve as the basic elements in the @@ -80,18 +83,24 @@ public: //! 0 in case of the groove //! - adding matter with Boolean fusion using the setting 1 //! in case of the rib. - Standard_EXPORT void Init (const TopoDS_Shape& Sbase, const TopoDS_Wire& W, const Handle(Geom_Plane)& P, const gp_Vec& Direction, const gp_Vec& Direction1, const Standard_Integer Fuse, const Standard_Boolean Modify); - + Standard_EXPORT void Init(const TopoDS_Shape& Sbase, + const TopoDS_Wire& W, + const Handle(Geom_Plane)& P, + const gp_Vec& Direction, + const gp_Vec& Direction1, + const Standard_Integer Fuse, + const Standard_Boolean Modify); + //! Indicates that the edge will slide on the face //! . //! Raises ConstructionError if the face does not belong to the //! basis shape, or the edge to the prismed shape. - Standard_EXPORT void Add (const TopoDS_Edge& E, const TopoDS_Face& OnFace); - + Standard_EXPORT void Add(const TopoDS_Edge& E, const TopoDS_Face& OnFace); + //! Performs a prism from the wire to the plane along the //! basis shape Sbase. Reconstructs the feature topologically. Standard_EXPORT void Perform(); - + //! Limits construction of the linear form feature by using //! one of the following three semantics: //! - from a limiting plane @@ -100,40 +109,26 @@ public: //! The setting is provided by a flag, flag, which can be set //! to from and/or until. The third semantic possibility above //! is selected by showing both from and until at the same time. - Standard_EXPORT void TransformShapeFU (const Standard_Integer flag); - - Standard_EXPORT Standard_Boolean Propagate (TopTools_ListOfShape& L, const TopoDS_Face& F, const gp_Pnt& FPoint, const gp_Pnt& LPoint, Standard_Boolean& falseside); - - + Standard_EXPORT void TransformShapeFU(const Standard_Integer flag); + Standard_EXPORT Standard_Boolean Propagate(TopTools_ListOfShape& L, + const TopoDS_Face& F, + const gp_Pnt& FPoint, + const gp_Pnt& LPoint, + Standard_Boolean& falseside); protected: - - - - - private: - - - - Handle(Geom_Curve) myCrv; - gp_Vec myDir; - gp_Vec myDir1; - Handle(Geom_Plane) myPln; - Standard_Real myBnd; + Handle(Geom_Curve) myCrv; + gp_Vec myDir; + gp_Vec myDir1; + Handle(Geom_Plane) myPln; + Standard_Real myBnd; TopTools_DataMapOfShapeListOfShape mySlface; - TopTools_ListOfShape myListOfEdges; - Standard_Real myTol; - - + TopTools_ListOfShape myListOfEdges; + Standard_Real myTol; }; - #include - - - - #endif // _BRepFeat_MakeLinearForm_HeaderFile diff --git a/opencascade/BRepFeat_MakeLinearForm.lxx b/opencascade/BRepFeat_MakeLinearForm.lxx index ed87d3660..6b4400af7 100644 --- a/opencascade/BRepFeat_MakeLinearForm.lxx +++ b/opencascade/BRepFeat_MakeLinearForm.lxx @@ -15,34 +15,29 @@ // commercial license or contractual agreement. //======================================================================= -//function : BRepFeat_MakeLinearForm -//purpose : +// function : BRepFeat_MakeLinearForm +// purpose : //======================================================================= -inline BRepFeat_MakeLinearForm::BRepFeat_MakeLinearForm () -: myBnd(0.0), - myTol(0.0) +inline BRepFeat_MakeLinearForm::BRepFeat_MakeLinearForm() + : myBnd(0.0), + myTol(0.0) { } - //======================================================================= -//function : BRepFeat_MakePrism -//purpose : +// function : BRepFeat_MakePrism +// purpose : //======================================================================= -inline BRepFeat_MakeLinearForm::BRepFeat_MakeLinearForm (const TopoDS_Shape& Sbase, - const TopoDS_Wire& W, - const Handle(Geom_Plane)& P, - const gp_Vec& Direc, - const gp_Vec& Direc1, - const Standard_Integer Fuse, - const Standard_Boolean Modify) - +inline BRepFeat_MakeLinearForm::BRepFeat_MakeLinearForm(const TopoDS_Shape& Sbase, + const TopoDS_Wire& W, + const Handle(Geom_Plane)& P, + const gp_Vec& Direc, + const gp_Vec& Direc1, + const Standard_Integer Fuse, + const Standard_Boolean Modify) + { - Init(Sbase, W, P, Direc, Direc1, Fuse,Modify); + Init(Sbase, W, P, Direc, Direc1, Fuse, Modify); } - - - - diff --git a/opencascade/BRepFeat_MakePipe.hxx b/opencascade/BRepFeat_MakePipe.hxx index b1f56a12f..9266afe16 100644 --- a/opencascade/BRepFeat_MakePipe.hxx +++ b/opencascade/BRepFeat_MakePipe.hxx @@ -29,7 +29,6 @@ class Geom_Curve; class TopoDS_Edge; - //! Constructs compound shapes with pipe //! features. These can be depressions or protrusions. //! The semantics of pipe feature creation is based on the construction of shapes: @@ -47,16 +46,14 @@ class TopoDS_Edge; //! could, for example, cut it out and move it to a //! different height which will define the limiting //! face of a protrusion or depression. -class BRepFeat_MakePipe : public BRepFeat_Form +class BRepFeat_MakePipe : public BRepFeat_Form { public: - DEFINE_STANDARD_ALLOC - //! initializes the pipe class. - BRepFeat_MakePipe(); - + BRepFeat_MakePipe(); + //! A face Pbase is selected in the //! shape Sbase to serve as the basis for the //! pipe. It will be defined by the wire Spine. @@ -66,8 +63,13 @@ public: //! The sketch face Skface serves to determine //! the type of operation. If it is inside the basis //! shape, a local operation such as glueing can be performed. - BRepFeat_MakePipe(const TopoDS_Shape& Sbase, const TopoDS_Shape& Pbase, const TopoDS_Face& Skface, const TopoDS_Wire& Spine, const Standard_Integer Fuse, const Standard_Boolean Modify); - + BRepFeat_MakePipe(const TopoDS_Shape& Sbase, + const TopoDS_Shape& Pbase, + const TopoDS_Face& Skface, + const TopoDS_Wire& Spine, + const Standard_Integer Fuse, + const Standard_Boolean Modify); + //! Initializes this algorithm for adding pipes to shapes. //! A face Pbase is selected in the shape Sbase to //! serve as the basis for the pipe. It will be defined by the wire Spine. @@ -77,55 +79,42 @@ public: //! The sketch face Skface serves to determine //! the type of operation. If it is inside the basis //! shape, a local operation such as glueing can be performed. - Standard_EXPORT void Init (const TopoDS_Shape& Sbase, const TopoDS_Shape& Pbase, const TopoDS_Face& Skface, const TopoDS_Wire& Spine, const Standard_Integer Fuse, const Standard_Boolean Modify); - + Standard_EXPORT void Init(const TopoDS_Shape& Sbase, + const TopoDS_Shape& Pbase, + const TopoDS_Face& Skface, + const TopoDS_Wire& Spine, + const Standard_Integer Fuse, + const Standard_Boolean Modify); + //! Indicates that the edge will slide on the face //! . Raises ConstructionError if the face does not belong to the //! basis shape, or the edge to the prismed shape. - Standard_EXPORT void Add (const TopoDS_Edge& E, const TopoDS_Face& OnFace); - + Standard_EXPORT void Add(const TopoDS_Edge& E, const TopoDS_Face& OnFace); + Standard_EXPORT void Perform(); - - Standard_EXPORT void Perform (const TopoDS_Shape& Until); - + + Standard_EXPORT void Perform(const TopoDS_Shape& Until); + //! Assigns one of the following semantics //! - to a face Until //! - from a face From to a height Until. //! Reconstructs the feature topologically according to the semantic option chosen. - Standard_EXPORT void Perform (const TopoDS_Shape& From, const TopoDS_Shape& Until); - - Standard_EXPORT void Curves (TColGeom_SequenceOfCurve& S); - - Standard_EXPORT Handle(Geom_Curve) BarycCurve(); - + Standard_EXPORT void Perform(const TopoDS_Shape& From, const TopoDS_Shape& Until); + Standard_EXPORT void Curves(TColGeom_SequenceOfCurve& S); + Standard_EXPORT Handle(Geom_Curve) BarycCurve(); protected: - - - - - private: - - - - TopoDS_Shape myPbase; - TopoDS_Face mySkface; + TopoDS_Shape myPbase; + TopoDS_Face mySkface; TopTools_DataMapOfShapeListOfShape mySlface; - TopoDS_Wire mySpine; - TColGeom_SequenceOfCurve myCurves; - Handle(Geom_Curve) myBCurve; - - + TopoDS_Wire mySpine; + TColGeom_SequenceOfCurve myCurves; + Handle(Geom_Curve) myBCurve; }; - #include - - - - #endif // _BRepFeat_MakePipe_HeaderFile diff --git a/opencascade/BRepFeat_MakePipe.lxx b/opencascade/BRepFeat_MakePipe.lxx index e188f2e1b..e3c93f580 100644 --- a/opencascade/BRepFeat_MakePipe.lxx +++ b/opencascade/BRepFeat_MakePipe.lxx @@ -15,26 +15,24 @@ // commercial license or contractual agreement. //======================================================================= -//function : BRepFeat_MakePipe -//purpose : +// function : BRepFeat_MakePipe +// purpose : //======================================================================= -inline BRepFeat_MakePipe::BRepFeat_MakePipe () {} - +inline BRepFeat_MakePipe::BRepFeat_MakePipe() {} //======================================================================= -//function : BRepFeat_MakePipe -//purpose : +// function : BRepFeat_MakePipe +// purpose : //======================================================================= -inline BRepFeat_MakePipe::BRepFeat_MakePipe (const TopoDS_Shape& Sbase, - const TopoDS_Shape& Pbase, - const TopoDS_Face& Skface, - const TopoDS_Wire& Spine, - const Standard_Integer Fuse, - const Standard_Boolean Modify) - +inline BRepFeat_MakePipe::BRepFeat_MakePipe(const TopoDS_Shape& Sbase, + const TopoDS_Shape& Pbase, + const TopoDS_Face& Skface, + const TopoDS_Wire& Spine, + const Standard_Integer Fuse, + const Standard_Boolean Modify) + { - Init(Sbase,Pbase,Skface,Spine,Fuse,Modify); + Init(Sbase, Pbase, Skface, Spine, Fuse, Modify); } - diff --git a/opencascade/BRepFeat_MakePrism.hxx b/opencascade/BRepFeat_MakePrism.hxx index 5f559884a..719fe5e78 100644 --- a/opencascade/BRepFeat_MakePrism.hxx +++ b/opencascade/BRepFeat_MakePrism.hxx @@ -31,7 +31,6 @@ class Geom_Curve; class TopoDS_Face; class TopoDS_Edge; - //! Describes functions to build prism features. //! These can be depressions or protrusions. //! The semantics of prism feature creation is @@ -50,17 +49,15 @@ class TopoDS_Edge; //! could, for example, cut it out and move it to a //! different height which will define the limiting //! face of a protrusion or depression. -class BRepFeat_MakePrism : public BRepFeat_Form +class BRepFeat_MakePrism : public BRepFeat_Form { public: - DEFINE_STANDARD_ALLOC - //! Builds a prism by projecting a //! wire along the face of a shape. Initializes the prism class. - BRepFeat_MakePrism(); - + BRepFeat_MakePrism(); + //! Builds a prism by projecting a //! wire along the face of a shape. a face Pbase is selected in //! the shape Sbase to serve as the basis for @@ -75,8 +72,13 @@ public: //! Exceptions //! Standard_ConstructionError if the face //! does not belong to the basis or the prism shape. - BRepFeat_MakePrism(const TopoDS_Shape& Sbase, const TopoDS_Shape& Pbase, const TopoDS_Face& Skface, const gp_Dir& Direction, const Standard_Integer Fuse, const Standard_Boolean Modify); - + BRepFeat_MakePrism(const TopoDS_Shape& Sbase, + const TopoDS_Shape& Pbase, + const TopoDS_Face& Skface, + const gp_Dir& Direction, + const Standard_Integer Fuse, + const Standard_Boolean Modify); + //! Initializes this algorithm for building prisms along surfaces. //! A face Pbase is selected in the shape Sbase //! to serve as the basis for the prism. The @@ -87,72 +89,59 @@ public: //! The sketch face Skface serves to determine //! the type of operation. If it is inside the basis //! shape, a local operation such as glueing can be performed. - Standard_EXPORT void Init (const TopoDS_Shape& Sbase, const TopoDS_Shape& Pbase, const TopoDS_Face& Skface, const gp_Dir& Direction, const Standard_Integer Fuse, const Standard_Boolean Modify); - + Standard_EXPORT void Init(const TopoDS_Shape& Sbase, + const TopoDS_Shape& Pbase, + const TopoDS_Face& Skface, + const gp_Dir& Direction, + const Standard_Integer Fuse, + const Standard_Boolean Modify); + //! Indicates that the edge will slide on the face //! . Raises ConstructionError if the face does not belong to the //! basis shape, or the edge to the prismed shape. - Standard_EXPORT void Add (const TopoDS_Edge& E, const TopoDS_Face& OnFace); - - Standard_EXPORT void Perform (const Standard_Real Length); - - Standard_EXPORT void Perform (const TopoDS_Shape& Until); - + Standard_EXPORT void Add(const TopoDS_Edge& E, const TopoDS_Face& OnFace); + + Standard_EXPORT void Perform(const Standard_Real Length); + + Standard_EXPORT void Perform(const TopoDS_Shape& Until); + //! Assigns one of the following semantics //! - to a height Length //! - to a face Until //! - from a face From to a height Until. //! Reconstructs the feature topologically according to the semantic option chosen. - Standard_EXPORT void Perform (const TopoDS_Shape& From, const TopoDS_Shape& Until); - + Standard_EXPORT void Perform(const TopoDS_Shape& From, const TopoDS_Shape& Until); + //! Realizes a semi-infinite prism, limited by the //! position of the prism base. All other faces extend infinitely. Standard_EXPORT void PerformUntilEnd(); - + //! Realizes a semi-infinite prism, limited by the face Funtil. - Standard_EXPORT void PerformFromEnd (const TopoDS_Shape& FUntil); - + Standard_EXPORT void PerformFromEnd(const TopoDS_Shape& FUntil); + //! Builds an infinite prism. The infinite descendants will not be kept in the result. Standard_EXPORT void PerformThruAll(); - + //! Assigns both a limiting shape, Until from //! TopoDS_Shape, and a height, Length at which to stop generation of the prism feature. - Standard_EXPORT void PerformUntilHeight (const TopoDS_Shape& Until, const Standard_Real Length); - + Standard_EXPORT void PerformUntilHeight(const TopoDS_Shape& Until, const Standard_Real Length); + //! Returns the list of curves S parallel to the axis of the prism. - Standard_EXPORT void Curves (TColGeom_SequenceOfCurve& S); - + Standard_EXPORT void Curves(TColGeom_SequenceOfCurve& S); + //! Generates a curve along the center of mass of the primitive. Standard_EXPORT Handle(Geom_Curve) BarycCurve(); - - - protected: - - - - - private: - - - - TopoDS_Shape myPbase; + TopoDS_Shape myPbase; TopTools_DataMapOfShapeListOfShape mySlface; - gp_Dir myDir; - TColGeom_SequenceOfCurve myCurves; - Handle(Geom_Curve) myBCurve; - BRepFeat_StatusError myStatusError; - - + gp_Dir myDir; + TColGeom_SequenceOfCurve myCurves; + Handle(Geom_Curve) myBCurve; + BRepFeat_StatusError myStatusError; }; - #include - - - - #endif // _BRepFeat_MakePrism_HeaderFile diff --git a/opencascade/BRepFeat_MakePrism.lxx b/opencascade/BRepFeat_MakePrism.lxx index c46a817b9..baf4d8fde 100644 --- a/opencascade/BRepFeat_MakePrism.lxx +++ b/opencascade/BRepFeat_MakePrism.lxx @@ -15,38 +15,27 @@ // commercial license or contractual agreement. //======================================================================= -//function : BRepFeat_MakePrism -//purpose : +// function : BRepFeat_MakePrism +// purpose : //======================================================================= -inline BRepFeat_MakePrism::BRepFeat_MakePrism () -: myStatusError(BRepFeat_OK) +inline BRepFeat_MakePrism::BRepFeat_MakePrism() + : myStatusError(BRepFeat_OK) { } - //======================================================================= -//function : BRepFeat_MakePrism -//purpose : +// function : BRepFeat_MakePrism +// purpose : //======================================================================= -inline BRepFeat_MakePrism::BRepFeat_MakePrism (const TopoDS_Shape& Sbase, - const TopoDS_Shape& Pbase, - const TopoDS_Face& Skface, - const gp_Dir& Direc, - const Standard_Integer Fuse, - const Standard_Boolean Modify) - +inline BRepFeat_MakePrism::BRepFeat_MakePrism(const TopoDS_Shape& Sbase, + const TopoDS_Shape& Pbase, + const TopoDS_Face& Skface, + const gp_Dir& Direc, + const Standard_Integer Fuse, + const Standard_Boolean Modify) + { - Init(Sbase,Pbase,Skface,Direc,Fuse,Modify); + Init(Sbase, Pbase, Skface, Direc, Fuse, Modify); } - - - - - - - - - - diff --git a/opencascade/BRepFeat_MakeRevol.hxx b/opencascade/BRepFeat_MakeRevol.hxx index 0cf191e9d..02b19c867 100644 --- a/opencascade/BRepFeat_MakeRevol.hxx +++ b/opencascade/BRepFeat_MakeRevol.hxx @@ -31,18 +31,15 @@ class Geom_Curve; class TopoDS_Face; class TopoDS_Edge; - //! Describes functions to build revolved shells from basis shapes. -class BRepFeat_MakeRevol : public BRepFeat_Form +class BRepFeat_MakeRevol : public BRepFeat_Form { public: - DEFINE_STANDARD_ALLOC - //! initializes the revolved shell class. - BRepFeat_MakeRevol(); - + BRepFeat_MakeRevol(); + //! a face Pbase is selected in the //! shape Sbase to serve as the basis for the //! revolved shell. The revolution will be defined @@ -52,63 +49,55 @@ public: //! The sketch face Skface serves to determine //! the type of operation. If it is inside the basis //! shape, a local operation such as glueing can be performed. - BRepFeat_MakeRevol(const TopoDS_Shape& Sbase, const TopoDS_Shape& Pbase, const TopoDS_Face& Skface, const gp_Ax1& Axis, const Standard_Integer Fuse, const Standard_Boolean Modify); - - Standard_EXPORT void Init (const TopoDS_Shape& Sbase, const TopoDS_Shape& Pbase, const TopoDS_Face& Skface, const gp_Ax1& Axis, const Standard_Integer Fuse, const Standard_Boolean Modify); - + BRepFeat_MakeRevol(const TopoDS_Shape& Sbase, + const TopoDS_Shape& Pbase, + const TopoDS_Face& Skface, + const gp_Ax1& Axis, + const Standard_Integer Fuse, + const Standard_Boolean Modify); + + Standard_EXPORT void Init(const TopoDS_Shape& Sbase, + const TopoDS_Shape& Pbase, + const TopoDS_Face& Skface, + const gp_Ax1& Axis, + const Standard_Integer Fuse, + const Standard_Boolean Modify); + //! Indicates that the edge will slide on the face //! . Raises ConstructionError if the face does not belong to the //! basis shape, or the edge to the prismed shape. - Standard_EXPORT void Add (const TopoDS_Edge& E, const TopoDS_Face& OnFace); - - Standard_EXPORT void Perform (const Standard_Real Angle); - - Standard_EXPORT void Perform (const TopoDS_Shape& Until); - + Standard_EXPORT void Add(const TopoDS_Edge& E, const TopoDS_Face& OnFace); + + Standard_EXPORT void Perform(const Standard_Real Angle); + + Standard_EXPORT void Perform(const TopoDS_Shape& Until); + //! Reconstructs the feature topologically. - Standard_EXPORT void Perform (const TopoDS_Shape& From, const TopoDS_Shape& Until); - + Standard_EXPORT void Perform(const TopoDS_Shape& From, const TopoDS_Shape& Until); + //! Builds an infinite shell. The infinite descendants //! will not be kept in the result. Standard_EXPORT void PerformThruAll(); - + //! Assigns both a limiting shape, Until from //! TopoDS_Shape, and an angle, Angle at //! which to stop generation of the revolved shell feature. - Standard_EXPORT void PerformUntilAngle (const TopoDS_Shape& Until, const Standard_Real Angle); - - Standard_EXPORT void Curves (TColGeom_SequenceOfCurve& S); - - Standard_EXPORT Handle(Geom_Curve) BarycCurve(); - + Standard_EXPORT void PerformUntilAngle(const TopoDS_Shape& Until, const Standard_Real Angle); + Standard_EXPORT void Curves(TColGeom_SequenceOfCurve& S); + Standard_EXPORT Handle(Geom_Curve) BarycCurve(); protected: - - - - - private: - - - - TopoDS_Shape myPbase; + TopoDS_Shape myPbase; TopTools_DataMapOfShapeListOfShape mySlface; - gp_Ax1 myAxis; - TColGeom_SequenceOfCurve myCurves; - Handle(Geom_Curve) myBCurve; - BRepFeat_StatusError myStatusError; - - + gp_Ax1 myAxis; + TColGeom_SequenceOfCurve myCurves; + Handle(Geom_Curve) myBCurve; + BRepFeat_StatusError myStatusError; }; - #include - - - - #endif // _BRepFeat_MakeRevol_HeaderFile diff --git a/opencascade/BRepFeat_MakeRevol.lxx b/opencascade/BRepFeat_MakeRevol.lxx index 533cc3d9a..0d766b797 100644 --- a/opencascade/BRepFeat_MakeRevol.lxx +++ b/opencascade/BRepFeat_MakeRevol.lxx @@ -15,29 +15,27 @@ // commercial license or contractual agreement. //======================================================================= -//function : BRepFeat_MakeRevol -//purpose : +// function : BRepFeat_MakeRevol +// purpose : //======================================================================= -inline BRepFeat_MakeRevol::BRepFeat_MakeRevol () -: myStatusError(BRepFeat_OK) +inline BRepFeat_MakeRevol::BRepFeat_MakeRevol() + : myStatusError(BRepFeat_OK) { } - //======================================================================= -//function : BRepFeat_MakeRevol -//purpose : +// function : BRepFeat_MakeRevol +// purpose : //======================================================================= -inline BRepFeat_MakeRevol::BRepFeat_MakeRevol (const TopoDS_Shape& Sbase, - const TopoDS_Shape& Pbase, - const TopoDS_Face& Skface, - const gp_Ax1& Axis, - const Standard_Integer Fuse, - const Standard_Boolean Modify) - +inline BRepFeat_MakeRevol::BRepFeat_MakeRevol(const TopoDS_Shape& Sbase, + const TopoDS_Shape& Pbase, + const TopoDS_Face& Skface, + const gp_Ax1& Axis, + const Standard_Integer Fuse, + const Standard_Boolean Modify) + { - Init(Sbase,Pbase,Skface,Axis,Fuse,Modify); + Init(Sbase, Pbase, Skface, Axis, Fuse, Modify); } - diff --git a/opencascade/BRepFeat_MakeRevolutionForm.hxx b/opencascade/BRepFeat_MakeRevolutionForm.hxx index e6a66a8c7..2dec21ee2 100644 --- a/opencascade/BRepFeat_MakeRevolutionForm.hxx +++ b/opencascade/BRepFeat_MakeRevolutionForm.hxx @@ -33,7 +33,6 @@ class TopoDS_Edge; class TopoDS_Face; class gp_Pnt; - //! MakeRevolutionForm Generates a surface of //! revolution in the feature as it slides along a //! revolved face in the basis shape. @@ -48,16 +47,14 @@ class gp_Pnt; //! - to a limiting face of the basis shape //! - to or from a limiting plane //! - to a height. -class BRepFeat_MakeRevolutionForm : public BRepFeat_RibSlot +class BRepFeat_MakeRevolutionForm : public BRepFeat_RibSlot { public: - DEFINE_STANDARD_ALLOC - //! initializes the linear form class. - BRepFeat_MakeRevolutionForm(); - + BRepFeat_MakeRevolutionForm(); + //! a contour W, a shape Sbase and a plane P are initialized to serve as //! the basic elements in the construction of the rib or groove. The axis Axis of the //! revolved surface in the basis shape defines the feature's axis of revolution. @@ -65,8 +62,15 @@ public: //! Fuse offers a choice between: //! - removing matter with a Boolean cut using the setting 0 in case of the groove //! - adding matter with Boolean fusion using the setting 1 in case of the rib. - BRepFeat_MakeRevolutionForm(const TopoDS_Shape& Sbase, const TopoDS_Wire& W, const Handle(Geom_Plane)& Plane, const gp_Ax1& Axis, const Standard_Real Height1, const Standard_Real Height2, const Standard_Integer Fuse, Standard_Boolean& Sliding); - + BRepFeat_MakeRevolutionForm(const TopoDS_Shape& Sbase, + const TopoDS_Wire& W, + const Handle(Geom_Plane)& Plane, + const gp_Ax1& Axis, + const Standard_Real Height1, + const Standard_Real Height2, + const Standard_Integer Fuse, + Standard_Boolean& Sliding); + //! Initializes this construction algorithm //! A contour W, a shape Sbase and a plane P are initialized to serve as the basic elements //! in the construction of the rib or groove. The axis Axis of the revolved surface in the basis @@ -75,52 +79,45 @@ public: //! Fuse offers a choice between: //! - removing matter with a Boolean cut using the setting 0 in case of the groove //! - adding matter with Boolean fusion using the setting 1 in case of the rib. - Standard_EXPORT void Init (const TopoDS_Shape& Sbase, const TopoDS_Wire& W, const Handle(Geom_Plane)& Plane, const gp_Ax1& Axis, const Standard_Real Height1, const Standard_Real Height2, const Standard_Integer Fuse, Standard_Boolean& Sliding); - + Standard_EXPORT void Init(const TopoDS_Shape& Sbase, + const TopoDS_Wire& W, + const Handle(Geom_Plane)& Plane, + const gp_Ax1& Axis, + const Standard_Real Height1, + const Standard_Real Height2, + const Standard_Integer Fuse, + Standard_Boolean& Sliding); + //! Indicates that the edge will slide on the face //! . Raises ConstructionError if the face does not belong to the //! basis shape, or the edge to the prismed shape. - Standard_EXPORT void Add (const TopoDS_Edge& E, const TopoDS_Face& OnFace); - + Standard_EXPORT void Add(const TopoDS_Edge& E, const TopoDS_Face& OnFace); + //! Performs a prism from the wire to the plane //! along the basis shape S. Reconstructs the feature topologically. Standard_EXPORT void Perform(); - - Standard_EXPORT Standard_Boolean Propagate (TopTools_ListOfShape& L, const TopoDS_Face& F, const gp_Pnt& FPoint, const gp_Pnt& LPoint, Standard_Boolean& falseside); - - + Standard_EXPORT Standard_Boolean Propagate(TopTools_ListOfShape& L, + const TopoDS_Face& F, + const gp_Pnt& FPoint, + const gp_Pnt& LPoint, + Standard_Boolean& falseside); protected: - - - - - private: - - - - gp_Ax1 myAxe; - Standard_Real myHeight1; - Standard_Real myHeight2; - Standard_Boolean mySliding; - Handle(Geom_Plane) myPln; - Standard_Real myBnd; + gp_Ax1 myAxe; + Standard_Real myHeight1; + Standard_Real myHeight2; + Standard_Boolean mySliding; + Handle(Geom_Plane) myPln; + Standard_Real myBnd; TopTools_DataMapOfShapeListOfShape mySlface; - TopTools_ListOfShape myListOfEdges; - Standard_Real myTol; - Standard_Real myAngle1; - Standard_Real myAngle2; - - + TopTools_ListOfShape myListOfEdges; + Standard_Real myTol; + Standard_Real myAngle1; + Standard_Real myAngle2; }; - #include - - - - #endif // _BRepFeat_MakeRevolutionForm_HeaderFile diff --git a/opencascade/BRepFeat_MakeRevolutionForm.lxx b/opencascade/BRepFeat_MakeRevolutionForm.lxx index e69a9eb3a..89764946f 100644 --- a/opencascade/BRepFeat_MakeRevolutionForm.lxx +++ b/opencascade/BRepFeat_MakeRevolutionForm.lxx @@ -15,40 +15,35 @@ // commercial license or contractual agreement. //======================================================================= -//function : BRepFeat_MakeLinearForm -//purpose : +// function : BRepFeat_MakeLinearForm +// purpose : //======================================================================= -inline BRepFeat_MakeRevolutionForm::BRepFeat_MakeRevolutionForm () -: myHeight1(0.0), - myHeight2(0.0), - mySliding(Standard_False), - myBnd(0.0), - myTol(0.0), - myAngle1(RealLast()), - myAngle2(RealLast()) +inline BRepFeat_MakeRevolutionForm::BRepFeat_MakeRevolutionForm() + : myHeight1(0.0), + myHeight2(0.0), + mySliding(Standard_False), + myBnd(0.0), + myTol(0.0), + myAngle1(RealLast()), + myAngle2(RealLast()) { } - //======================================================================= -//function : BRepFeat_MakePrism -//purpose : +// function : BRepFeat_MakePrism +// purpose : //======================================================================= -inline BRepFeat_MakeRevolutionForm::BRepFeat_MakeRevolutionForm (const TopoDS_Shape& Sbase, - const TopoDS_Wire& W, - const Handle(Geom_Plane)& P, - const gp_Ax1& Axis, - const Standard_Real H1, - const Standard_Real H2, - const Standard_Integer Fuse, - Standard_Boolean& Sliding) - +inline BRepFeat_MakeRevolutionForm::BRepFeat_MakeRevolutionForm(const TopoDS_Shape& Sbase, + const TopoDS_Wire& W, + const Handle(Geom_Plane)& P, + const gp_Ax1& Axis, + const Standard_Real H1, + const Standard_Real H2, + const Standard_Integer Fuse, + Standard_Boolean& Sliding) + { Init(Sbase, W, P, Axis, H1, H2, Fuse, Sliding); } - - - - diff --git a/opencascade/BRepFeat_PerfSelection.hxx b/opencascade/BRepFeat_PerfSelection.hxx index 44809358f..5b5fbdf16 100644 --- a/opencascade/BRepFeat_PerfSelection.hxx +++ b/opencascade/BRepFeat_PerfSelection.hxx @@ -29,11 +29,11 @@ //! local operation will be performed. enum BRepFeat_PerfSelection { -BRepFeat_NoSelection, -BRepFeat_SelectionFU, -BRepFeat_SelectionU, -BRepFeat_SelectionSh, -BRepFeat_SelectionShU + BRepFeat_NoSelection, + BRepFeat_SelectionFU, + BRepFeat_SelectionU, + BRepFeat_SelectionSh, + BRepFeat_SelectionShU }; #endif // _BRepFeat_PerfSelection_HeaderFile diff --git a/opencascade/BRepFeat_RibSlot.hxx b/opencascade/BRepFeat_RibSlot.hxx index cb28bcc69..5ca0d4043 100644 --- a/opencascade/BRepFeat_RibSlot.hxx +++ b/opencascade/BRepFeat_RibSlot.hxx @@ -40,7 +40,6 @@ class TopoDS_Vertex; class LocOpe_Gluer; class BRepAlgoAPI_BooleanOperation; - //! Provides functions to build mechanical features. //! Mechanical features include ribs - protrusions and grooves (or slots) - depressions along //! planar (linear) surfaces or revolution surfaces. The semantics of mechanical features is built @@ -52,30 +51,30 @@ class BRepAlgoAPI_BooleanOperation; //! - to a limiting face of the basis shape //! - to or from a limiting plane //! - to a height. -class BRepFeat_RibSlot : public BRepBuilderAPI_MakeShape +class BRepFeat_RibSlot : public BRepBuilderAPI_MakeShape { public: - DEFINE_STANDARD_ALLOC - //! Returns true if F a TopoDS_Shape of type edge or face has been deleted. - Standard_EXPORT virtual Standard_Boolean IsDeleted (const TopoDS_Shape& F) Standard_OVERRIDE; - + Standard_EXPORT virtual Standard_Boolean IsDeleted(const TopoDS_Shape& F) Standard_OVERRIDE; + //! Returns the list of generated Faces F. This list may be empty. - Standard_EXPORT virtual const TopTools_ListOfShape& Modified (const TopoDS_Shape& F) Standard_OVERRIDE; - + Standard_EXPORT virtual const TopTools_ListOfShape& Modified(const TopoDS_Shape& F) + Standard_OVERRIDE; + //! Returns a list TopTools_ListOfShape of the faces S created in the shape. - Standard_EXPORT virtual const TopTools_ListOfShape& Generated (const TopoDS_Shape& S) Standard_OVERRIDE; - + Standard_EXPORT virtual const TopTools_ListOfShape& Generated(const TopoDS_Shape& S) + Standard_OVERRIDE; + //! Returns the list of shapes created at the bottom of //! the created form. It may be an empty list. Standard_EXPORT const TopTools_ListOfShape& FirstShape() const; - + //! Returns the list of shapes created at the top of the //! created form. It may be an empty list. Standard_EXPORT const TopTools_ListOfShape& LastShape() const; - + //! Returns a list of the limiting and glueing faces //! generated by the feature. These faces did not originally exist in the basis shape. //! The list provides the information necessary for @@ -83,13 +82,13 @@ public: //! If a face has tangent edges, no draft is possible, and the tangent edges must //! subsequently be removed if you want to add a draft to the face. Standard_EXPORT const TopTools_ListOfShape& FacesForDraft() const; - + //! Returns a list of the limiting and glueing edges //! generated by the feature. These edges did not originally exist in the basis shape. //! The list provides the information necessary for //! subsequent addition of fillets. It may be an empty list. Standard_EXPORT const TopTools_ListOfShape& NewEdges() const; - + //! Returns a list of the tangent edges among the //! limiting and glueing edges generated by the //! feature. These edges did not originally exist in @@ -100,84 +99,129 @@ public: //! If an edge is tangent, no fillet is possible, and //! the edge must subsequently be removed if you want to add a fillet. Standard_EXPORT const TopTools_ListOfShape& TgtEdges() const; - - Standard_EXPORT static Standard_Real IntPar (const Handle(Geom_Curve)& C, const gp_Pnt& P); - - Standard_EXPORT static TopoDS_Face ChoiceOfFaces (TopTools_ListOfShape& faces, const Handle(Geom_Curve)& cc, const Standard_Real par, const Standard_Real bnd, const Handle(Geom_Plane)& Pln); - - Standard_EXPORT BRepFeat_StatusError CurrentStatusError() const; + Standard_EXPORT static Standard_Real IntPar(const Handle(Geom_Curve)& C, const gp_Pnt& P); + Standard_EXPORT static TopoDS_Face ChoiceOfFaces(TopTools_ListOfShape& faces, + const Handle(Geom_Curve)& cc, + const Standard_Real par, + const Standard_Real bnd, + const Handle(Geom_Plane)& Pln); + Standard_EXPORT BRepFeat_StatusError CurrentStatusError() const; protected: - - //! Redefines the empty constructor. - BRepFeat_RibSlot(); - + BRepFeat_RibSlot(); + //! General perform method... Standard_EXPORT void LFPerform(); - - Standard_EXPORT gp_Pnt CheckPoint (const TopoDS_Edge& e, const Standard_Real bnd, const Handle(Geom_Plane)& Pln); - - Standard_EXPORT gp_Dir Normal (const TopoDS_Face& F, const gp_Pnt& P); - - Standard_EXPORT void EdgeExtention (TopoDS_Edge& e, const Standard_Real bnd, const Standard_Boolean FirstLast); - - Standard_EXPORT Standard_Real HeightMax (const TopoDS_Shape& theSbase, const TopoDS_Shape& theSUntil, gp_Pnt& p1, gp_Pnt& p2); - - Standard_EXPORT Standard_Boolean ExtremeFaces (const Standard_Boolean RevolRib, const Standard_Real bnd, const Handle(Geom_Plane)& Pln, TopoDS_Edge& FirstEdge, TopoDS_Edge& LastEdge, TopoDS_Face& FirstFace, TopoDS_Face& LastFace, TopoDS_Vertex& FirstVertex, TopoDS_Vertex& LastVertex, Standard_Boolean& OnFirstFace, Standard_Boolean& OnLastFace, Standard_Boolean& PtOnFirstEdge, Standard_Boolean& PtOnLastEdge, TopoDS_Edge& OnFirstEdge, TopoDS_Edge& OnLastEdge); - - Standard_EXPORT void PtOnEdgeVertex (const Standard_Boolean RevolRib, const TopoDS_Shape& shape, const gp_Pnt& point, const TopoDS_Vertex& FirstVertex, const TopoDS_Vertex& LastVertex, Standard_Boolean& PtOnEdge, TopoDS_Edge& OnEdge, Standard_Boolean& PtOnVertex, TopoDS_Vertex& OnVertex); - - Standard_EXPORT Standard_Boolean SlidingProfile (TopoDS_Face& Prof, const Standard_Boolean RevolRib, const Standard_Real myTol, Standard_Integer& Concavite, const Handle(Geom_Plane)& myPln, const TopoDS_Face& BndFace, const gp_Pnt& CheckPnt, const TopoDS_Face& FirstFace, const TopoDS_Face& LastFace, const TopoDS_Vertex& FirstVertex, const TopoDS_Vertex& LastVertex, const TopoDS_Edge& FirstEdge, const TopoDS_Edge& LastEdge); - - Standard_EXPORT Standard_Boolean NoSlidingProfile (TopoDS_Face& Prof, const Standard_Boolean RevolRib, const Standard_Real myTol, Standard_Integer& Concavite, const Handle(Geom_Plane)& myPln, const Standard_Real bnd, const TopoDS_Face& BndFace, const gp_Pnt& CheckPnt, const TopoDS_Face& FirstFace, const TopoDS_Face& LastFace, const TopoDS_Vertex& FirstVertex, const TopoDS_Vertex& LastVertex, const TopoDS_Edge& FirstEdge, const TopoDS_Edge& LastEdge, const Standard_Boolean OnFirstFace, const Standard_Boolean OnLastFace); - + + Standard_EXPORT gp_Pnt CheckPoint(const TopoDS_Edge& e, + const Standard_Real bnd, + const Handle(Geom_Plane)& Pln); + + Standard_EXPORT gp_Dir Normal(const TopoDS_Face& F, const gp_Pnt& P); + + Standard_EXPORT void EdgeExtention(TopoDS_Edge& e, + const Standard_Real bnd, + const Standard_Boolean FirstLast); + + Standard_EXPORT Standard_Real HeightMax(const TopoDS_Shape& theSbase, + const TopoDS_Shape& theSUntil, + gp_Pnt& p1, + gp_Pnt& p2); + + Standard_EXPORT Standard_Boolean ExtremeFaces(const Standard_Boolean RevolRib, + const Standard_Real bnd, + const Handle(Geom_Plane)& Pln, + TopoDS_Edge& FirstEdge, + TopoDS_Edge& LastEdge, + TopoDS_Face& FirstFace, + TopoDS_Face& LastFace, + TopoDS_Vertex& FirstVertex, + TopoDS_Vertex& LastVertex, + Standard_Boolean& OnFirstFace, + Standard_Boolean& OnLastFace, + Standard_Boolean& PtOnFirstEdge, + Standard_Boolean& PtOnLastEdge, + TopoDS_Edge& OnFirstEdge, + TopoDS_Edge& OnLastEdge); + + Standard_EXPORT void PtOnEdgeVertex(const Standard_Boolean RevolRib, + const TopoDS_Shape& shape, + const gp_Pnt& point, + const TopoDS_Vertex& FirstVertex, + const TopoDS_Vertex& LastVertex, + Standard_Boolean& PtOnEdge, + TopoDS_Edge& OnEdge, + Standard_Boolean& PtOnVertex, + TopoDS_Vertex& OnVertex); + + Standard_EXPORT Standard_Boolean SlidingProfile(TopoDS_Face& Prof, + const Standard_Boolean RevolRib, + const Standard_Real myTol, + Standard_Integer& Concavite, + const Handle(Geom_Plane)& myPln, + const TopoDS_Face& BndFace, + const gp_Pnt& CheckPnt, + const TopoDS_Face& FirstFace, + const TopoDS_Face& LastFace, + const TopoDS_Vertex& FirstVertex, + const TopoDS_Vertex& LastVertex, + const TopoDS_Edge& FirstEdge, + const TopoDS_Edge& LastEdge); + + Standard_EXPORT Standard_Boolean NoSlidingProfile(TopoDS_Face& Prof, + const Standard_Boolean RevolRib, + const Standard_Real myTol, + Standard_Integer& Concavite, + const Handle(Geom_Plane)& myPln, + const Standard_Real bnd, + const TopoDS_Face& BndFace, + const gp_Pnt& CheckPnt, + const TopoDS_Face& FirstFace, + const TopoDS_Face& LastFace, + const TopoDS_Vertex& FirstVertex, + const TopoDS_Vertex& LastVertex, + const TopoDS_Edge& FirstEdge, + const TopoDS_Edge& LastEdge, + const Standard_Boolean OnFirstFace, + const Standard_Boolean OnLastFace); + //! Updates the data structures of descendant //! shapes during the glueing operation.Returns the modified, generated //! and deleted faces during the course of the glueing operation. - Standard_EXPORT void UpdateDescendants (const LocOpe_Gluer& G); - - Standard_EXPORT void UpdateDescendants (const BRepAlgoAPI_BooleanOperation& aBOP, const TopoDS_Shape& SResult, const Standard_Boolean SkipFace = Standard_False); + Standard_EXPORT void UpdateDescendants(const LocOpe_Gluer& G); + Standard_EXPORT void UpdateDescendants(const BRepAlgoAPI_BooleanOperation& aBOP, + const TopoDS_Shape& SResult, + const Standard_Boolean SkipFace = Standard_False); - gp_Pnt myFirstPnt; - gp_Pnt myLastPnt; - Standard_Boolean myFuse; - Standard_Boolean mySliding; + gp_Pnt myFirstPnt; + gp_Pnt myLastPnt; + Standard_Boolean myFuse; + Standard_Boolean mySliding; TopTools_DataMapOfShapeListOfShape myMap; TopTools_DataMapOfShapeListOfShape myLFMap; - TopoDS_Shape myFShape; - TopoDS_Shape myLShape; - BRepFeat_PerfSelection myPerfSelection; - TopoDS_Wire myWire; - TopoDS_Shape mySbase; - TopoDS_Face mySkface; - TopoDS_Face myPbase; - TopoDS_Shape myGShape; - TopoDS_Shape mySUntil; - TopTools_DataMapOfShapeShape myGluedF; - TopTools_ListOfShape myNewEdges; - TopTools_ListOfShape myTgtEdges; - TopTools_ListOfShape myFacesForDraft; - BRepFeat_StatusError myStatusError; - + TopoDS_Shape myFShape; + TopoDS_Shape myLShape; + BRepFeat_PerfSelection myPerfSelection; + TopoDS_Wire myWire; + TopoDS_Shape mySbase; + TopoDS_Face mySkface; + TopoDS_Face myPbase; + TopoDS_Shape myGShape; + TopoDS_Shape mySUntil; + TopTools_DataMapOfShapeShape myGluedF; + TopTools_ListOfShape myNewEdges; + TopTools_ListOfShape myTgtEdges; + TopTools_ListOfShape myFacesForDraft; + BRepFeat_StatusError myStatusError; private: - - - - - }; - #include - - - - #endif // _BRepFeat_RibSlot_HeaderFile diff --git a/opencascade/BRepFeat_RibSlot.lxx b/opencascade/BRepFeat_RibSlot.lxx index b58d3eb06..e01799d93 100644 --- a/opencascade/BRepFeat_RibSlot.lxx +++ b/opencascade/BRepFeat_RibSlot.lxx @@ -15,13 +15,13 @@ // commercial license or contractual agreement. //======================================================================= -//function : BRepFeatForm -//purpose : +// function : BRepFeatForm +// purpose : //======================================================================= -inline BRepFeat_RibSlot::BRepFeat_RibSlot () -: myFuse(Standard_False), - mySliding(Standard_False), - myStatusError(BRepFeat_OK) +inline BRepFeat_RibSlot::BRepFeat_RibSlot() + : myFuse(Standard_False), + mySliding(Standard_False), + myStatusError(BRepFeat_OK) { } diff --git a/opencascade/BRepFeat_SplitShape.hxx b/opencascade/BRepFeat_SplitShape.hxx index ee793bc4f..256bda196 100644 --- a/opencascade/BRepFeat_SplitShape.hxx +++ b/opencascade/BRepFeat_SplitShape.hxx @@ -33,7 +33,6 @@ class TopoDS_Face; class TopoDS_Edge; class TopoDS_Compound; - //! One of the most significant aspects of BRepFeat functionality is the use of local //! operations as opposed to global ones. In a global operation, you would first construct a //! form of the type you wanted in your final feature, and then remove matter so that it could @@ -47,16 +46,14 @@ class TopoDS_Compound; //! face in the basis shape to be used as a part of the feature are cut out and projected to a plane //! outside or inside the basis shape. By rebuilding the initial shape incorporating the edges and //! the faces of the tool, protrusion or depression features can be constructed. -class BRepFeat_SplitShape : public BRepBuilderAPI_MakeShape +class BRepFeat_SplitShape : public BRepBuilderAPI_MakeShape { public: - DEFINE_STANDARD_ALLOC - //! Empty constructor - BRepFeat_SplitShape(); - + BRepFeat_SplitShape(); + //! Creates the process with the shape . BRepFeat_SplitShape(const TopoDS_Shape& S); @@ -64,21 +61,21 @@ public: //! without additional specification edge->face, edge->edge //! This method puts edge on the corresponding faces from initial shape Standard_Boolean Add(const TopTools_SequenceOfShape& theEdges); - + //! Initializes the process on the shape . - void Init (const TopoDS_Shape& S); - + void Init(const TopoDS_Shape& S); + //! Set the flag of check internal intersections //! default value is True (to check) - void SetCheckInterior (const Standard_Boolean ToCheckInterior); - + void SetCheckInterior(const Standard_Boolean ToCheckInterior); + //! Adds the wire on the face . //! Raises NoSuchObject if does not belong to the original shape. - void Add (const TopoDS_Wire& W, const TopoDS_Face& F); - + void Add(const TopoDS_Wire& W, const TopoDS_Face& F); + //! Adds the edge on the face . - void Add (const TopoDS_Edge& E, const TopoDS_Face& F); - + void Add(const TopoDS_Edge& E, const TopoDS_Face& F); + //! Adds the compound on the face . The //! compound must consist of edges lying on the //! face . If edges are geometrically connected, @@ -86,59 +83,42 @@ public: //! must share common vertices. //! //! Raises NoSuchObject if does not belong to the original shape. - void Add (const TopoDS_Compound& Comp, const TopoDS_Face& F); - + void Add(const TopoDS_Compound& Comp, const TopoDS_Face& F); + //! Adds the edge on the existing edge . - void Add (const TopoDS_Edge& E, const TopoDS_Edge& EOn); - + void Add(const TopoDS_Edge& E, const TopoDS_Edge& EOn); + //! Returns the faces which are the left of the //! projected wires. Standard_EXPORT const TopTools_ListOfShape& DirectLeft() const; - + //! Returns the faces of the "left" part on the shape. //! (It is build from DirectLeft, with the faces //! connected to this set, and so on...). //! Raises NotDone if IsDone returns . Standard_EXPORT const TopTools_ListOfShape& Left() const; - + //! Returns the faces of the "right" part on the shape. Standard_EXPORT const TopTools_ListOfShape& Right() const; - - //! Builds the cut and the resulting faces and edges as well. - Standard_EXPORT void Build(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; - - //! Returns true if the shape has been deleted. - Standard_EXPORT virtual Standard_Boolean IsDeleted (const TopoDS_Shape& S) Standard_OVERRIDE; - - //! Returns the list of generated Faces. - Standard_EXPORT const TopTools_ListOfShape& Modified (const TopoDS_Shape& F) Standard_OVERRIDE; + //! Builds the cut and the resulting faces and edges as well. + Standard_EXPORT void Build(const Message_ProgressRange& theRange = Message_ProgressRange()) + Standard_OVERRIDE; + //! Returns true if the shape has been deleted. + Standard_EXPORT virtual Standard_Boolean IsDeleted(const TopoDS_Shape& S) Standard_OVERRIDE; + //! Returns the list of generated Faces. + Standard_EXPORT const TopTools_ListOfShape& Modified(const TopoDS_Shape& F) Standard_OVERRIDE; protected: - - - - - private: - - - - LocOpe_Spliter mySShape; + LocOpe_Spliter mySShape; Handle(LocOpe_WiresOnShape) myWOnShape; mutable TopTools_ListOfShape myRight; - - }; - #include - - - - #endif // _BRepFeat_SplitShape_HeaderFile diff --git a/opencascade/BRepFeat_SplitShape.lxx b/opencascade/BRepFeat_SplitShape.lxx index fffa3fcc6..5411bc546 100644 --- a/opencascade/BRepFeat_SplitShape.lxx +++ b/opencascade/BRepFeat_SplitShape.lxx @@ -16,56 +16,54 @@ #include - //======================================================================= -//function : BRepFeat_SplitShape -//purpose : +// function : BRepFeat_SplitShape +// purpose : //======================================================================= -inline BRepFeat_SplitShape::BRepFeat_SplitShape () {} - - - +inline BRepFeat_SplitShape::BRepFeat_SplitShape() {} //======================================================================= -//function : BRepFeat_SplitShape -//purpose : +// function : BRepFeat_SplitShape +// purpose : //======================================================================= -inline BRepFeat_SplitShape::BRepFeat_SplitShape (const TopoDS_Shape& S) : - mySShape(S) +inline BRepFeat_SplitShape::BRepFeat_SplitShape(const TopoDS_Shape& S) + : mySShape(S) { myWOnShape = new LocOpe_WiresOnShape(S); } //======================================================================= -//function : Add -//purpose : +// function : Add +// purpose : //======================================================================= - inline Standard_Boolean BRepFeat_SplitShape::Add(const TopTools_SequenceOfShape& theEdges) - { - return myWOnShape->Add(theEdges); - } +inline Standard_Boolean BRepFeat_SplitShape::Add(const TopTools_SequenceOfShape& theEdges) +{ + return myWOnShape->Add(theEdges); +} //======================================================================= -//function : Init -//purpose : +// function : Init +// purpose : //======================================================================= inline void BRepFeat_SplitShape::Init(const TopoDS_Shape& S) { mySShape.Init(S); - if (myWOnShape.IsNull()) { + if (myWOnShape.IsNull()) + { myWOnShape = new LocOpe_WiresOnShape(S); } - else { + else + { myWOnShape->Init(S); } } //======================================================================= -//function : SetCheckInterior -//purpose : +// function : SetCheckInterior +// purpose : //======================================================================= inline void BRepFeat_SplitShape::SetCheckInterior(const Standard_Boolean ToCheckInterior) @@ -74,49 +72,41 @@ inline void BRepFeat_SplitShape::SetCheckInterior(const Standard_Boolean ToCheck } //======================================================================= -//function : Add -//purpose : +// function : Add +// purpose : //======================================================================= -inline void BRepFeat_SplitShape::Add(const TopoDS_Wire& W, - const TopoDS_Face& F) +inline void BRepFeat_SplitShape::Add(const TopoDS_Wire& W, const TopoDS_Face& F) { - myWOnShape->Bind(W,F); + myWOnShape->Bind(W, F); } - //======================================================================= -//function : Add -//purpose : +// function : Add +// purpose : //======================================================================= -inline void BRepFeat_SplitShape::Add(const TopoDS_Edge& E, - const TopoDS_Face& F) +inline void BRepFeat_SplitShape::Add(const TopoDS_Edge& E, const TopoDS_Face& F) { - myWOnShape->Bind(E,F); + myWOnShape->Bind(E, F); } //======================================================================= -//function : Add -//purpose : +// function : Add +// purpose : //======================================================================= -inline void BRepFeat_SplitShape::Add(const TopoDS_Compound& Comp, - const TopoDS_Face& F) +inline void BRepFeat_SplitShape::Add(const TopoDS_Compound& Comp, const TopoDS_Face& F) { - myWOnShape->Bind(Comp,F); + myWOnShape->Bind(Comp, F); } - //======================================================================= -//function : Add -//purpose : +// function : Add +// purpose : //======================================================================= -inline void BRepFeat_SplitShape::Add(const TopoDS_Edge& E, - const TopoDS_Edge& EOn) +inline void BRepFeat_SplitShape::Add(const TopoDS_Edge& E, const TopoDS_Edge& EOn) { - myWOnShape->Bind(E,EOn); + myWOnShape->Bind(E, EOn); } - - diff --git a/opencascade/BRepFeat_Status.hxx b/opencascade/BRepFeat_Status.hxx index 7bfced31c..d8fd0b14c 100644 --- a/opencascade/BRepFeat_Status.hxx +++ b/opencascade/BRepFeat_Status.hxx @@ -17,12 +17,11 @@ #ifndef _BRepFeat_Status_HeaderFile #define _BRepFeat_Status_HeaderFile - enum BRepFeat_Status { -BRepFeat_NoError, -BRepFeat_InvalidPlacement, -BRepFeat_HoleTooLong + BRepFeat_NoError, + BRepFeat_InvalidPlacement, + BRepFeat_HoleTooLong }; #endif // _BRepFeat_Status_HeaderFile diff --git a/opencascade/BRepFeat_StatusError.hxx b/opencascade/BRepFeat_StatusError.hxx index 590613301..404ac2bdf 100644 --- a/opencascade/BRepFeat_StatusError.hxx +++ b/opencascade/BRepFeat_StatusError.hxx @@ -20,34 +20,34 @@ //! Describes the error. enum BRepFeat_StatusError { -BRepFeat_OK, -BRepFeat_BadDirect, -BRepFeat_BadIntersect, -BRepFeat_EmptyBaryCurve, -BRepFeat_EmptyCutResult, -BRepFeat_FalseSide, -BRepFeat_IncDirection, -BRepFeat_IncSlidFace, -BRepFeat_IncParameter, -BRepFeat_IncTypes, -BRepFeat_IntervalOverlap, -BRepFeat_InvFirstShape, -BRepFeat_InvOption, -BRepFeat_InvShape, -BRepFeat_LocOpeNotDone, -BRepFeat_LocOpeInvNotDone, -BRepFeat_NoExtFace, -BRepFeat_NoFaceProf, -BRepFeat_NoGluer, -BRepFeat_NoIntersectF, -BRepFeat_NoIntersectU, -BRepFeat_NoParts, -BRepFeat_NoProjPt, -BRepFeat_NotInitialized, -BRepFeat_NotYetImplemented, -BRepFeat_NullRealTool, -BRepFeat_NullToolF, -BRepFeat_NullToolU + BRepFeat_OK, + BRepFeat_BadDirect, + BRepFeat_BadIntersect, + BRepFeat_EmptyBaryCurve, + BRepFeat_EmptyCutResult, + BRepFeat_FalseSide, + BRepFeat_IncDirection, + BRepFeat_IncSlidFace, + BRepFeat_IncParameter, + BRepFeat_IncTypes, + BRepFeat_IntervalOverlap, + BRepFeat_InvFirstShape, + BRepFeat_InvOption, + BRepFeat_InvShape, + BRepFeat_LocOpeNotDone, + BRepFeat_LocOpeInvNotDone, + BRepFeat_NoExtFace, + BRepFeat_NoFaceProf, + BRepFeat_NoGluer, + BRepFeat_NoIntersectF, + BRepFeat_NoIntersectU, + BRepFeat_NoParts, + BRepFeat_NoProjPt, + BRepFeat_NotInitialized, + BRepFeat_NotYetImplemented, + BRepFeat_NullRealTool, + BRepFeat_NullToolF, + BRepFeat_NullToolU }; #endif // _BRepFeat_StatusError_HeaderFile diff --git a/opencascade/BRepFill.hxx b/opencascade/BRepFill.hxx index d3d74f088..e8016fc4a 100644 --- a/opencascade/BRepFill.hxx +++ b/opencascade/BRepFill.hxx @@ -32,45 +32,47 @@ class gp_Ax3; class gp_Pnt; class gp_Vec; - - -class BRepFill +class BRepFill { public: - DEFINE_STANDARD_ALLOC - //! Computes a ruled surface between two edges. - Standard_EXPORT static TopoDS_Face Face (const TopoDS_Edge& Edge1, const TopoDS_Edge& Edge2); - + Standard_EXPORT static TopoDS_Face Face(const TopoDS_Edge& Edge1, const TopoDS_Edge& Edge2); + //! Computes a ruled surface between two wires. //! The wires must have the same number of edges. - Standard_EXPORT static TopoDS_Shell Shell (const TopoDS_Wire& Wire1, const TopoDS_Wire& Wire2); - + Standard_EXPORT static TopoDS_Shell Shell(const TopoDS_Wire& Wire1, const TopoDS_Wire& Wire2); + //! Computes as Follow. is //! the Position of the nearest vertex V of //! to . is confused with the tangent //! to at the projected point of V on the Spine. //! is normal to . //! is a plane wire or a plane face. - Standard_EXPORT static void Axe (const TopoDS_Shape& Spine, const TopoDS_Wire& Profile, gp_Ax3& AxeProf, Standard_Boolean& ProfOnSpine, const Standard_Real Tol); - + Standard_EXPORT static void Axe(const TopoDS_Shape& Spine, + const TopoDS_Wire& Profile, + gp_Ax3& AxeProf, + Standard_Boolean& ProfOnSpine, + const Standard_Real Tol); + //! Compute ACR on a wire - Standard_EXPORT static void ComputeACR (const TopoDS_Wire& wire, TColStd_Array1OfReal& ACR); - + Standard_EXPORT static void ComputeACR(const TopoDS_Wire& wire, TColStd_Array1OfReal& ACR); + //! Insert ACR on a wire - Standard_EXPORT static TopoDS_Wire InsertACR (const TopoDS_Wire& wire, const TColStd_Array1OfReal& ACRcuts, const Standard_Real prec); + Standard_EXPORT static TopoDS_Wire InsertACR(const TopoDS_Wire& wire, + const TColStd_Array1OfReal& ACRcuts, + const Standard_Real prec); private: - //! Computes origins and orientation on a closed wire - Standard_EXPORT static void SearchOrigin (TopoDS_Wire& W, const gp_Pnt& P, const gp_Vec& V, const Standard_Real Tol); + Standard_EXPORT static void SearchOrigin(TopoDS_Wire& W, + const gp_Pnt& P, + const gp_Vec& V, + const Standard_Real Tol); private: - friend class BRepFill_PipeShell; - }; #endif // _BRepFill_HeaderFile diff --git a/opencascade/BRepFill_ACRLaw.hxx b/opencascade/BRepFill_ACRLaw.hxx index f06e64ef5..d50137d88 100644 --- a/opencascade/BRepFill_ACRLaw.hxx +++ b/opencascade/BRepFill_ACRLaw.hxx @@ -25,7 +25,6 @@ class TopoDS_Wire; class GeomFill_LocationGuide; - class BRepFill_ACRLaw; DEFINE_STANDARD_HANDLE(BRepFill_ACRLaw, BRepFill_LocationLaw) @@ -36,32 +35,14 @@ class BRepFill_ACRLaw : public BRepFill_LocationLaw { public: + Standard_EXPORT BRepFill_ACRLaw(const TopoDS_Wire& Path, + const Handle(GeomFill_LocationGuide)& Law); - - Standard_EXPORT BRepFill_ACRLaw(const TopoDS_Wire& Path, const Handle(GeomFill_LocationGuide)& Law); - - - - - DEFINE_STANDARD_RTTIEXT(BRepFill_ACRLaw,BRepFill_LocationLaw) + DEFINE_STANDARD_RTTIEXT(BRepFill_ACRLaw, BRepFill_LocationLaw) protected: - - - - private: - - Handle(TColStd_HArray1OfReal) OrigParam; - - }; - - - - - - #endif // _BRepFill_ACRLaw_HeaderFile diff --git a/opencascade/BRepFill_AdvancedEvolved.hxx b/opencascade/BRepFill_AdvancedEvolved.hxx index 8f4ce9343..64e965d49 100644 --- a/opencascade/BRepFill_AdvancedEvolved.hxx +++ b/opencascade/BRepFill_AdvancedEvolved.hxx @@ -33,22 +33,22 @@ class TopoDS_Face; class BRepFill_AdvancedEvolved { public: - DEFINE_STANDARD_ALLOC; //! Constructor - Standard_EXPORT BRepFill_AdvancedEvolved() :myErrorStatus(BRepFill_AdvancedEvolved_Empty), - myFuzzyValue(0.0), - myIsParallel(Standard_True), - myDebugShapesPath("C:\\Temp") + Standard_EXPORT BRepFill_AdvancedEvolved() + : myErrorStatus(BRepFill_AdvancedEvolved_Empty), + myFuzzyValue(0.0), + myIsParallel(Standard_True), + myDebugShapesPath("C:\\Temp") { } - - Standard_EXPORT void Perform(const TopoDS_Wire& theSpine, - const TopoDS_Wire& theProfile, - const Standard_Real theTolerance, + + Standard_EXPORT void Perform(const TopoDS_Wire& theSpine, + const TopoDS_Wire& theProfile, + const Standard_Real theTolerance, const Standard_Boolean theSolidReq = Standard_True); - + Standard_Boolean IsDone(unsigned int* theErrorCode = 0) const { if (theErrorCode) @@ -58,25 +58,15 @@ public: } //! returns the resulting shape. - const TopoDS_Shape& Shape() const - { - return myResult; - } - + const TopoDS_Shape& Shape() const { return myResult; } + //! Sets directory where the debug shapes will be saved - void SetTemporaryDirectory(const Standard_CString& thePath) - { - myDebugShapesPath = thePath; - } + void SetTemporaryDirectory(const Standard_CString& thePath) { myDebugShapesPath = thePath; } //! Sets/Unsets computation in parallel mode - void SetParallelMode(const Standard_Boolean theVal) - { - myIsParallel = theVal; - } + void SetParallelMode(const Standard_Boolean theVal) { myIsParallel = theVal; } protected: - Standard_EXPORT void PerformSweep(); Standard_EXPORT void GetLids(); @@ -84,12 +74,11 @@ protected: Standard_EXPORT void BuildSolid(); Standard_EXPORT void RemoveExcessSolids(const TopTools_ListOfShape& theLSplits, - const TopoDS_Shape& theShape, - TopTools_ListOfShape& theArgsList, - BOPAlgo_MakerVolume& theMV); + const TopoDS_Shape& theShape, + TopTools_ListOfShape& theArgsList, + BOPAlgo_MakerVolume& theMV); - Standard_EXPORT void ExtractOuterSolid(TopoDS_Shape& theShape, - TopTools_ListOfShape& theArgsList); + Standard_EXPORT void ExtractOuterSolid(TopoDS_Shape& theShape, TopTools_ListOfShape& theArgsList); Standard_EXPORT void GetSpineAndProfile(const TopoDS_Wire& theSpine, const TopoDS_Wire& theProfile); @@ -97,18 +86,18 @@ protected: Standard_EXPORT void UnifyShape(); Standard_EXPORT Standard_Boolean PerformBoolean(const TopTools_ListOfShape& theArgsList, - TopoDS_Shape& theResult) const; + TopoDS_Shape& theResult) const; - Standard_EXPORT Standard_Boolean CheckSingularityAndAdd(const TopoDS_Face& theF, - const Standard_Real theFuzzyToler, - TopTools_ListOfShape& theListOfFaces, - TopTools_ListOfShape& theListOfSplits) const; + Standard_EXPORT Standard_Boolean + CheckSingularityAndAdd(const TopoDS_Face& theF, + const Standard_Real theFuzzyToler, + TopTools_ListOfShape& theListOfFaces, + TopTools_ListOfShape& theListOfSplits) const; - Standard_EXPORT Standard_Boolean IsLid(const TopoDS_Face& theF, + Standard_EXPORT Standard_Boolean IsLid(const TopoDS_Face& theF, const TopTools_IndexedMapOfShape& theMapOfLids) const; private: - enum { BRepFill_AdvancedEvolved_Empty = 0, @@ -120,21 +109,14 @@ private: BRepFill_AdvancedEvolved_OK = UINT_MAX } myErrorStatus; - TopoDS_Wire mySpine; - TopoDS_Wire myProfile; - TopoDS_Shape myPipeShell; - TopoDS_Compound myTopBottom; // Lids can be split on several faces - TopoDS_Shape myResult; - Standard_Real myFuzzyValue; + TopoDS_Wire mySpine; + TopoDS_Wire myProfile; + TopoDS_Shape myPipeShell; + TopoDS_Compound myTopBottom; // Lids can be split on several faces + TopoDS_Shape myResult; + Standard_Real myFuzzyValue; Standard_Boolean myIsParallel; Standard_CString myDebugShapesPath; - }; - - - - - - #endif // _BRepFill_AdvancedEvolved_HeaderFile diff --git a/opencascade/BRepFill_ApproxSeewing.hxx b/opencascade/BRepFill_ApproxSeewing.hxx index 12e7a58a9..f12cfa90c 100644 --- a/opencascade/BRepFill_ApproxSeewing.hxx +++ b/opencascade/BRepFill_ApproxSeewing.hxx @@ -25,43 +25,39 @@ class Geom_Curve; class Geom2d_Curve; - //! Evaluate the 3dCurve and the PCurves described in a MultiLine from BRepFill. //! The parametrization of those curves is not imposed by the Bissectrice. //! The parametrization is given approximately by the abscissa of the curve3d. class BRepFill_ApproxSeewing { public: - DEFINE_STANDARD_ALLOC Standard_EXPORT BRepFill_ApproxSeewing(); - + Standard_EXPORT BRepFill_ApproxSeewing(const BRepFill_MultiLine& ML); - - Standard_EXPORT void Perform (const BRepFill_MultiLine& ML); - + + Standard_EXPORT void Perform(const BRepFill_MultiLine& ML); + Standard_EXPORT Standard_Boolean IsDone() const; - + //! returns the approximation of the 3d Curve Standard_EXPORT const Handle(Geom_Curve)& Curve() const; - + //! returns the approximation of the PCurve on the //! first face of the MultiLine Standard_EXPORT const Handle(Geom2d_Curve)& CurveOnF1() const; - + //! returns the approximation of the PCurve on the //! first face of the MultiLine Standard_EXPORT const Handle(Geom2d_Curve)& CurveOnF2() const; private: - - BRepFill_MultiLine myML; - Standard_Boolean myIsDone; - Handle(Geom_Curve) myCurve; + BRepFill_MultiLine myML; + Standard_Boolean myIsDone; + Handle(Geom_Curve) myCurve; Handle(Geom2d_Curve) myPCurve1; Handle(Geom2d_Curve) myPCurve2; - }; #endif // _BRepFill_ApproxSeewing_HeaderFile diff --git a/opencascade/BRepFill_CompatibleWires.hxx b/opencascade/BRepFill_CompatibleWires.hxx index fa7bc0ca2..839115ce2 100644 --- a/opencascade/BRepFill_CompatibleWires.hxx +++ b/opencascade/BRepFill_CompatibleWires.hxx @@ -26,97 +26,73 @@ #include class TopoDS_Edge; - //! Constructs a sequence of Wires (with good orientation //! and origin) agreed each other so that the surface passing //! through these sections is not twisted -class BRepFill_CompatibleWires +class BRepFill_CompatibleWires { public: - DEFINE_STANDARD_ALLOC - Standard_EXPORT BRepFill_CompatibleWires(); - + Standard_EXPORT BRepFill_CompatibleWires(const TopTools_SequenceOfShape& Sections); - - Standard_EXPORT void Init (const TopTools_SequenceOfShape& Sections); - - Standard_EXPORT void SetPercent (const Standard_Real percent = 0.01); - + + Standard_EXPORT void Init(const TopTools_SequenceOfShape& Sections); + + Standard_EXPORT void SetPercent(const Standard_Real percent = 0.01); + //! Performs CompatibleWires According to the orientation //! and the origin of each other - Standard_EXPORT void Perform (const Standard_Boolean WithRotation = Standard_True); - + Standard_EXPORT void Perform(const Standard_Boolean WithRotation = Standard_True); + Standard_EXPORT Standard_Boolean IsDone() const; - BRepFill_ThruSectionErrorStatus GetStatus() const - { - return myStatus; - } - + BRepFill_ThruSectionErrorStatus GetStatus() const { return myStatus; } + //! returns the generated sequence. Standard_EXPORT const TopTools_SequenceOfShape& Shape() const; - + //! Returns the shapes created from a subshape //! of a section. - Standard_EXPORT const TopTools_ListOfShape& GeneratedShapes (const TopoDS_Edge& SubSection) const; - + Standard_EXPORT const TopTools_ListOfShape& GeneratedShapes(const TopoDS_Edge& SubSection) const; + Standard_EXPORT const TopTools_DataMapOfShapeListOfShape& Generated() const; Standard_EXPORT Standard_Boolean IsDegeneratedFirstSection() const; Standard_EXPORT Standard_Boolean IsDegeneratedLastSection() const; - - protected: - - - - - private: - - //! Insert cutting points on closed wires to have same //! number of edges. The sequence of shapes must //! be a sequence of wires. - Standard_EXPORT void SameNumberByPolarMethod (const Standard_Boolean WithRotation = Standard_True); - + Standard_EXPORT void SameNumberByPolarMethod(const Standard_Boolean WithRotation = Standard_True); + //! Insert cutting points on open wires to have same //! number of edges. The sequence of shapes must //! be a sequence of wires. - Standard_EXPORT void SameNumberByACR (const Standard_Boolean report); - + Standard_EXPORT void SameNumberByACR(const Standard_Boolean report); + //! Computes origins and orientation on closed wires to //! avoid twisted results. The sequence of shapes must //! be a sequence of wires. must be true //! if SameNumberByPolarMethod was used before. - Standard_EXPORT void ComputeOrigin (const Standard_Boolean polar); - + Standard_EXPORT void ComputeOrigin(const Standard_Boolean polar); + //! Computes origins and orientation on open wires to //! avoid twisted results. The sequence of shapes must //! be a sequence of wires. Standard_EXPORT void SearchOrigin(); - - TopTools_SequenceOfShape myInit; - TopTools_SequenceOfShape myWork; - Standard_Real myPercent; - Standard_Boolean myDegen1; - Standard_Boolean myDegen2; - BRepFill_ThruSectionErrorStatus myStatus; + TopTools_SequenceOfShape myInit; + TopTools_SequenceOfShape myWork; + Standard_Real myPercent; + Standard_Boolean myDegen1; + Standard_Boolean myDegen2; + BRepFill_ThruSectionErrorStatus myStatus; TopTools_DataMapOfShapeListOfShape myMap; - - }; - - - - - - #endif // _BRepFill_CompatibleWires_HeaderFile diff --git a/opencascade/BRepFill_ComputeCLine.hxx b/opencascade/BRepFill_ComputeCLine.hxx index 939e64627..01ddc2274 100644 --- a/opencascade/BRepFill_ComputeCLine.hxx +++ b/opencascade/BRepFill_ComputeCLine.hxx @@ -28,38 +28,52 @@ #include class AppParCurves_MultiCurve; - - -class BRepFill_ComputeCLine +class BRepFill_ComputeCLine { public: - DEFINE_STANDARD_ALLOC - //! The MultiLine will be approximated until tolerances //! will be reached. //! The approximation will be done from degreemin to degreemax //! with a cutting if the corresponding boolean is True. - Standard_EXPORT BRepFill_ComputeCLine(const BRepFill_MultiLine& Line, const Standard_Integer degreemin = 3, const Standard_Integer degreemax = 8, const Standard_Real Tolerance3d = 1.0e-5, const Standard_Real Tolerance2d = 1.0e-5, const Standard_Boolean cutting = Standard_False, const AppParCurves_Constraint FirstC = AppParCurves_TangencyPoint, const AppParCurves_Constraint LastC = AppParCurves_TangencyPoint); - + Standard_EXPORT BRepFill_ComputeCLine( + const BRepFill_MultiLine& Line, + const Standard_Integer degreemin = 3, + const Standard_Integer degreemax = 8, + const Standard_Real Tolerance3d = 1.0e-5, + const Standard_Real Tolerance2d = 1.0e-5, + const Standard_Boolean cutting = Standard_False, + const AppParCurves_Constraint FirstC = AppParCurves_TangencyPoint, + const AppParCurves_Constraint LastC = AppParCurves_TangencyPoint); + //! Initializes the fields of the algorithm. - Standard_EXPORT BRepFill_ComputeCLine(const Standard_Integer degreemin = 3, const Standard_Integer degreemax = 8, const Standard_Real Tolerance3d = 1.0e-05, const Standard_Real Tolerance2d = 1.0e-05, const Standard_Boolean cutting = Standard_False, const AppParCurves_Constraint FirstC = AppParCurves_TangencyPoint, const AppParCurves_Constraint LastC = AppParCurves_TangencyPoint); - + Standard_EXPORT BRepFill_ComputeCLine( + const Standard_Integer degreemin = 3, + const Standard_Integer degreemax = 8, + const Standard_Real Tolerance3d = 1.0e-05, + const Standard_Real Tolerance2d = 1.0e-05, + const Standard_Boolean cutting = Standard_False, + const AppParCurves_Constraint FirstC = AppParCurves_TangencyPoint, + const AppParCurves_Constraint LastC = AppParCurves_TangencyPoint); + //! runs the algorithm after having initialized the fields. - Standard_EXPORT void Perform (const BRepFill_MultiLine& Line); - + Standard_EXPORT void Perform(const BRepFill_MultiLine& Line); + //! changes the degrees of the approximation. - Standard_EXPORT void SetDegrees (const Standard_Integer degreemin, const Standard_Integer degreemax); - + Standard_EXPORT void SetDegrees(const Standard_Integer degreemin, + const Standard_Integer degreemax); + //! Changes the tolerances of the approximation. - Standard_EXPORT void SetTolerances (const Standard_Real Tolerance3d, const Standard_Real Tolerance2d); - + Standard_EXPORT void SetTolerances(const Standard_Real Tolerance3d, + const Standard_Real Tolerance2d); + //! Changes the constraints of the approximation. - Standard_EXPORT void SetConstraints (const AppParCurves_Constraint FirstC, const AppParCurves_Constraint LastC); - + Standard_EXPORT void SetConstraints(const AppParCurves_Constraint FirstC, + const AppParCurves_Constraint LastC); + //! Changes the max number of segments, which is allowed for cutting. - Standard_EXPORT void SetMaxSegments (const Standard_Integer theMaxSegments); + Standard_EXPORT void SetMaxSegments(const Standard_Integer theMaxSegments); //! Set inverse order of degree selection: //! if theInvOrdr = true, current degree is chosen by inverse order - @@ -77,65 +91,55 @@ public: //! the status NoApproximation has been sent by the user //! when more points were needed. Standard_EXPORT Standard_Boolean IsAllApproximated() const; - + //! returns False if the status NoPointsAdded has been sent. Standard_EXPORT Standard_Boolean IsToleranceReached() const; - + //! returns the tolerances 2d and 3d of the MultiCurve. - Standard_EXPORT void Error (const Standard_Integer Index, Standard_Real& tol3d, Standard_Real& tol2d) const; - + Standard_EXPORT void Error(const Standard_Integer Index, + Standard_Real& tol3d, + Standard_Real& tol2d) const; + //! Returns the number of MultiCurve doing the approximation //! of the MultiLine. Standard_EXPORT Standard_Integer NbMultiCurves() const; - - //! returns the approximation MultiCurve of range . - Standard_EXPORT AppParCurves_MultiCurve Value (const Standard_Integer Index = 1) const; - - Standard_EXPORT void Parameters (const Standard_Integer Index, Standard_Real& firstp, Standard_Real& lastp) const; - + //! returns the approximation MultiCurve of range . + Standard_EXPORT AppParCurves_MultiCurve Value(const Standard_Integer Index = 1) const; + Standard_EXPORT void Parameters(const Standard_Integer Index, + Standard_Real& firstp, + Standard_Real& lastp) const; protected: - - - - - private: - - //! is internally used by the algorithms. - Standard_EXPORT Standard_Boolean Compute (const BRepFill_MultiLine& Line, const Standard_Real Ufirst, const Standard_Real Ulast, Standard_Real& TheTol3d, Standard_Real& TheTol2d); - + Standard_EXPORT Standard_Boolean Compute(const BRepFill_MultiLine& Line, + const Standard_Real Ufirst, + const Standard_Real Ulast, + Standard_Real& TheTol3d, + Standard_Real& TheTol2d); AppParCurves_SequenceOfMultiCurve myMultiCurves; - TColStd_SequenceOfReal myfirstparam; - TColStd_SequenceOfReal mylastparam; - AppParCurves_MultiCurve TheMultiCurve; - Standard_Boolean alldone; - Standard_Boolean tolreached; - TColStd_SequenceOfReal Tolers3d; - TColStd_SequenceOfReal Tolers2d; - Standard_Integer mydegremin; - Standard_Integer mydegremax; - Standard_Real mytol3d; - Standard_Real mytol2d; - Standard_Real currenttol3d; - Standard_Real currenttol2d; - Standard_Boolean mycut; - AppParCurves_Constraint myfirstC; - AppParCurves_Constraint mylastC; - Standard_Integer myMaxSegments; - Standard_Boolean myInvOrder; - Standard_Boolean myHangChecking; - + TColStd_SequenceOfReal myfirstparam; + TColStd_SequenceOfReal mylastparam; + AppParCurves_MultiCurve TheMultiCurve; + Standard_Boolean alldone; + Standard_Boolean tolreached; + TColStd_SequenceOfReal Tolers3d; + TColStd_SequenceOfReal Tolers2d; + Standard_Integer mydegremin; + Standard_Integer mydegremax; + Standard_Real mytol3d; + Standard_Real mytol2d; + Standard_Real currenttol3d; + Standard_Real currenttol2d; + Standard_Boolean mycut; + AppParCurves_Constraint myfirstC; + AppParCurves_Constraint mylastC; + Standard_Integer myMaxSegments; + Standard_Boolean myInvOrder; + Standard_Boolean myHangChecking; }; - - - - - - #endif // _BRepFill_ComputeCLine_HeaderFile diff --git a/opencascade/BRepFill_CurveConstraint.hxx b/opencascade/BRepFill_CurveConstraint.hxx index d9f006e8b..9aa4a8cad 100644 --- a/opencascade/BRepFill_CurveConstraint.hxx +++ b/opencascade/BRepFill_CurveConstraint.hxx @@ -33,8 +33,6 @@ class BRepFill_CurveConstraint : public GeomPlate_CurveConstraint { public: - - //! Create a constraint //! Order is the order of the constraint. The possible values for order are -1,0,1,2. //! Order i means constraints Gi @@ -43,31 +41,22 @@ public: //! TolAng is the maximum error to satisfy for G1 constraints //! TolCurv is the maximum error to satisfy for G2 constraints //! These errors can be replaced by laws of criterion. - Standard_EXPORT BRepFill_CurveConstraint(const Handle(Adaptor3d_CurveOnSurface)& Boundary, const Standard_Integer Order, const Standard_Integer NPt = 10, const Standard_Real TolDist = 0.0001, const Standard_Real TolAng = 0.01, const Standard_Real TolCurv = 0.1); - - Standard_EXPORT BRepFill_CurveConstraint(const Handle(Adaptor3d_Curve)& Boundary, const Standard_Integer Tang, const Standard_Integer NPt = 10, const Standard_Real TolDist = 0.0001); - - + Standard_EXPORT BRepFill_CurveConstraint(const Handle(Adaptor3d_CurveOnSurface)& Boundary, + const Standard_Integer Order, + const Standard_Integer NPt = 10, + const Standard_Real TolDist = 0.0001, + const Standard_Real TolAng = 0.01, + const Standard_Real TolCurv = 0.1); + Standard_EXPORT BRepFill_CurveConstraint(const Handle(Adaptor3d_Curve)& Boundary, + const Standard_Integer Tang, + const Standard_Integer NPt = 10, + const Standard_Real TolDist = 0.0001); - DEFINE_STANDARD_RTTIEXT(BRepFill_CurveConstraint,GeomPlate_CurveConstraint) + DEFINE_STANDARD_RTTIEXT(BRepFill_CurveConstraint, GeomPlate_CurveConstraint) protected: - - - - private: - - - - }; - - - - - - #endif // _BRepFill_CurveConstraint_HeaderFile diff --git a/opencascade/BRepFill_DataMapIteratorOfDataMapOfNodeDataMapOfShapeShape.hxx b/opencascade/BRepFill_DataMapIteratorOfDataMapOfNodeDataMapOfShapeShape.hxx index b6e5774f8..385873449 100644 --- a/opencascade/BRepFill_DataMapIteratorOfDataMapOfNodeDataMapOfShapeShape.hxx +++ b/opencascade/BRepFill_DataMapIteratorOfDataMapOfNodeDataMapOfShapeShape.hxx @@ -11,7 +11,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. - #ifndef BRepFill_DataMapIteratorOfDataMapOfNodeDataMapOfShapeShape_HeaderFile #define BRepFill_DataMapIteratorOfDataMapOfNodeDataMapOfShapeShape_HeaderFile diff --git a/opencascade/BRepFill_DataMapIteratorOfDataMapOfNodeShape.hxx b/opencascade/BRepFill_DataMapIteratorOfDataMapOfNodeShape.hxx index 3921eb9e0..0eb67f598 100644 --- a/opencascade/BRepFill_DataMapIteratorOfDataMapOfNodeShape.hxx +++ b/opencascade/BRepFill_DataMapIteratorOfDataMapOfNodeShape.hxx @@ -11,7 +11,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. - #ifndef BRepFill_DataMapIteratorOfDataMapOfNodeShape_HeaderFile #define BRepFill_DataMapIteratorOfDataMapOfNodeShape_HeaderFile diff --git a/opencascade/BRepFill_DataMapIteratorOfDataMapOfOrientedShapeListOfShape.hxx b/opencascade/BRepFill_DataMapIteratorOfDataMapOfOrientedShapeListOfShape.hxx index 857e7b900..0201a4aef 100644 --- a/opencascade/BRepFill_DataMapIteratorOfDataMapOfOrientedShapeListOfShape.hxx +++ b/opencascade/BRepFill_DataMapIteratorOfDataMapOfOrientedShapeListOfShape.hxx @@ -11,7 +11,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. - #ifndef BRepFill_DataMapIteratorOfDataMapOfOrientedShapeListOfShape_HeaderFile #define BRepFill_DataMapIteratorOfDataMapOfOrientedShapeListOfShape_HeaderFile diff --git a/opencascade/BRepFill_DataMapIteratorOfDataMapOfShapeDataMapOfShapeListOfShape.hxx b/opencascade/BRepFill_DataMapIteratorOfDataMapOfShapeDataMapOfShapeListOfShape.hxx index d05e7a67d..9d3851042 100644 --- a/opencascade/BRepFill_DataMapIteratorOfDataMapOfShapeDataMapOfShapeListOfShape.hxx +++ b/opencascade/BRepFill_DataMapIteratorOfDataMapOfShapeDataMapOfShapeListOfShape.hxx @@ -11,7 +11,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. - #ifndef BRepFill_DataMapIteratorOfDataMapOfShapeDataMapOfShapeListOfShape_HeaderFile #define BRepFill_DataMapIteratorOfDataMapOfShapeDataMapOfShapeListOfShape_HeaderFile diff --git a/opencascade/BRepFill_DataMapIteratorOfDataMapOfShapeHArray2OfShape.hxx b/opencascade/BRepFill_DataMapIteratorOfDataMapOfShapeHArray2OfShape.hxx index 85233279e..05305e927 100644 --- a/opencascade/BRepFill_DataMapIteratorOfDataMapOfShapeHArray2OfShape.hxx +++ b/opencascade/BRepFill_DataMapIteratorOfDataMapOfShapeHArray2OfShape.hxx @@ -11,7 +11,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. - #ifndef BRepFill_DataMapIteratorOfDataMapOfShapeHArray2OfShape_HeaderFile #define BRepFill_DataMapIteratorOfDataMapOfShapeHArray2OfShape_HeaderFile diff --git a/opencascade/BRepFill_DataMapIteratorOfDataMapOfShapeSequenceOfPnt.hxx b/opencascade/BRepFill_DataMapIteratorOfDataMapOfShapeSequenceOfPnt.hxx index 4763f35be..e1d26bcca 100644 --- a/opencascade/BRepFill_DataMapIteratorOfDataMapOfShapeSequenceOfPnt.hxx +++ b/opencascade/BRepFill_DataMapIteratorOfDataMapOfShapeSequenceOfPnt.hxx @@ -11,7 +11,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. - #ifndef BRepFill_DataMapIteratorOfDataMapOfShapeSequenceOfPnt_HeaderFile #define BRepFill_DataMapIteratorOfDataMapOfShapeSequenceOfPnt_HeaderFile diff --git a/opencascade/BRepFill_DataMapIteratorOfDataMapOfShapeSequenceOfReal.hxx b/opencascade/BRepFill_DataMapIteratorOfDataMapOfShapeSequenceOfReal.hxx index 873d177ea..efe8cd8c5 100644 --- a/opencascade/BRepFill_DataMapIteratorOfDataMapOfShapeSequenceOfReal.hxx +++ b/opencascade/BRepFill_DataMapIteratorOfDataMapOfShapeSequenceOfReal.hxx @@ -11,7 +11,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. - #ifndef BRepFill_DataMapIteratorOfDataMapOfShapeSequenceOfReal_HeaderFile #define BRepFill_DataMapIteratorOfDataMapOfShapeSequenceOfReal_HeaderFile diff --git a/opencascade/BRepFill_DataMapOfNodeDataMapOfShapeShape.hxx b/opencascade/BRepFill_DataMapOfNodeDataMapOfShapeShape.hxx index b6c63f82b..14b3ea85d 100644 --- a/opencascade/BRepFill_DataMapOfNodeDataMapOfShapeShape.hxx +++ b/opencascade/BRepFill_DataMapOfNodeDataMapOfShapeShape.hxx @@ -21,8 +21,9 @@ #include #include -typedef NCollection_DataMap BRepFill_DataMapOfNodeDataMapOfShapeShape; -typedef NCollection_DataMap::Iterator BRepFill_DataMapIteratorOfDataMapOfNodeDataMapOfShapeShape; - +typedef NCollection_DataMap + BRepFill_DataMapOfNodeDataMapOfShapeShape; +typedef NCollection_DataMap::Iterator + BRepFill_DataMapIteratorOfDataMapOfNodeDataMapOfShapeShape; #endif diff --git a/opencascade/BRepFill_DataMapOfNodeShape.hxx b/opencascade/BRepFill_DataMapOfNodeShape.hxx index 726165b76..c3f460cef 100644 --- a/opencascade/BRepFill_DataMapOfNodeShape.hxx +++ b/opencascade/BRepFill_DataMapOfNodeShape.hxx @@ -21,8 +21,8 @@ #include #include -typedef NCollection_DataMap BRepFill_DataMapOfNodeShape; -typedef NCollection_DataMap::Iterator BRepFill_DataMapIteratorOfDataMapOfNodeShape; - +typedef NCollection_DataMap BRepFill_DataMapOfNodeShape; +typedef NCollection_DataMap::Iterator + BRepFill_DataMapIteratorOfDataMapOfNodeShape; #endif diff --git a/opencascade/BRepFill_DataMapOfOrientedShapeListOfShape.hxx b/opencascade/BRepFill_DataMapOfOrientedShapeListOfShape.hxx index fc02ce704..edfc5cf9d 100644 --- a/opencascade/BRepFill_DataMapOfOrientedShapeListOfShape.hxx +++ b/opencascade/BRepFill_DataMapOfOrientedShapeListOfShape.hxx @@ -21,8 +21,9 @@ #include #include -typedef NCollection_DataMap BRepFill_DataMapOfOrientedShapeListOfShape; -typedef NCollection_DataMap::Iterator BRepFill_DataMapIteratorOfDataMapOfOrientedShapeListOfShape; - +typedef NCollection_DataMap + BRepFill_DataMapOfOrientedShapeListOfShape; +typedef NCollection_DataMap::Iterator + BRepFill_DataMapIteratorOfDataMapOfOrientedShapeListOfShape; #endif diff --git a/opencascade/BRepFill_DataMapOfShapeDataMapOfShapeListOfShape.hxx b/opencascade/BRepFill_DataMapOfShapeDataMapOfShapeListOfShape.hxx index 0ec98e0f0..d0d3a2be2 100644 --- a/opencascade/BRepFill_DataMapOfShapeDataMapOfShapeListOfShape.hxx +++ b/opencascade/BRepFill_DataMapOfShapeDataMapOfShapeListOfShape.hxx @@ -22,8 +22,13 @@ #include #include -typedef NCollection_DataMap BRepFill_DataMapOfShapeDataMapOfShapeListOfShape; -typedef NCollection_DataMap::Iterator BRepFill_DataMapIteratorOfDataMapOfShapeDataMapOfShapeListOfShape; - +typedef NCollection_DataMap + BRepFill_DataMapOfShapeDataMapOfShapeListOfShape; +typedef NCollection_DataMap::Iterator + BRepFill_DataMapIteratorOfDataMapOfShapeDataMapOfShapeListOfShape; #endif diff --git a/opencascade/BRepFill_DataMapOfShapeHArray2OfShape.hxx b/opencascade/BRepFill_DataMapOfShapeHArray2OfShape.hxx index b27cbc396..204a970af 100644 --- a/opencascade/BRepFill_DataMapOfShapeHArray2OfShape.hxx +++ b/opencascade/BRepFill_DataMapOfShapeHArray2OfShape.hxx @@ -22,8 +22,11 @@ #include #include -typedef NCollection_DataMap BRepFill_DataMapOfShapeHArray2OfShape; -typedef NCollection_DataMap::Iterator BRepFill_DataMapIteratorOfDataMapOfShapeHArray2OfShape; - +typedef NCollection_DataMap + BRepFill_DataMapOfShapeHArray2OfShape; +typedef NCollection_DataMap::Iterator + BRepFill_DataMapIteratorOfDataMapOfShapeHArray2OfShape; #endif diff --git a/opencascade/BRepFill_DataMapOfShapeSequenceOfPnt.hxx b/opencascade/BRepFill_DataMapOfShapeSequenceOfPnt.hxx index 80ba355b0..072d9bb53 100644 --- a/opencascade/BRepFill_DataMapOfShapeSequenceOfPnt.hxx +++ b/opencascade/BRepFill_DataMapOfShapeSequenceOfPnt.hxx @@ -22,8 +22,9 @@ #include #include -typedef NCollection_DataMap BRepFill_DataMapOfShapeSequenceOfPnt; -typedef NCollection_DataMap::Iterator BRepFill_DataMapIteratorOfDataMapOfShapeSequenceOfPnt; - +typedef NCollection_DataMap + BRepFill_DataMapOfShapeSequenceOfPnt; +typedef NCollection_DataMap::Iterator + BRepFill_DataMapIteratorOfDataMapOfShapeSequenceOfPnt; #endif diff --git a/opencascade/BRepFill_DataMapOfShapeSequenceOfReal.hxx b/opencascade/BRepFill_DataMapOfShapeSequenceOfReal.hxx index 16bb95079..90fb87475 100644 --- a/opencascade/BRepFill_DataMapOfShapeSequenceOfReal.hxx +++ b/opencascade/BRepFill_DataMapOfShapeSequenceOfReal.hxx @@ -22,8 +22,9 @@ #include #include -typedef NCollection_DataMap BRepFill_DataMapOfShapeSequenceOfReal; -typedef NCollection_DataMap::Iterator BRepFill_DataMapIteratorOfDataMapOfShapeSequenceOfReal; - +typedef NCollection_DataMap + BRepFill_DataMapOfShapeSequenceOfReal; +typedef NCollection_DataMap::Iterator + BRepFill_DataMapIteratorOfDataMapOfShapeSequenceOfReal; #endif diff --git a/opencascade/BRepFill_Draft.hxx b/opencascade/BRepFill_Draft.hxx index 4ea1c4983..10f84eb38 100644 --- a/opencascade/BRepFill_Draft.hxx +++ b/opencascade/BRepFill_Draft.hxx @@ -33,87 +33,73 @@ class BRepFill_SectionLaw; class Geom_Surface; class Bnd_Box; - - -class BRepFill_Draft +class BRepFill_Draft { public: - DEFINE_STANDARD_ALLOC - - Standard_EXPORT BRepFill_Draft(const TopoDS_Shape& Shape, const gp_Dir& Dir, const Standard_Real Angle); - - Standard_EXPORT void SetOptions (const BRepFill_TransitionStyle Style = BRepFill_Right, const Standard_Real AngleMin = 0.01, const Standard_Real AngleMax = 3.0); - - Standard_EXPORT void SetDraft (const Standard_Boolean IsInternal = Standard_False); - - Standard_EXPORT void Perform (const Standard_Real LengthMax); - - Standard_EXPORT void Perform (const Handle(Geom_Surface)& Surface, const Standard_Boolean KeepInsideSurface = Standard_True); - - Standard_EXPORT void Perform (const TopoDS_Shape& StopShape, const Standard_Boolean KeepOutSide = Standard_True); - + Standard_EXPORT BRepFill_Draft(const TopoDS_Shape& Shape, + const gp_Dir& Dir, + const Standard_Real Angle); + + Standard_EXPORT void SetOptions(const BRepFill_TransitionStyle Style = BRepFill_Right, + const Standard_Real AngleMin = 0.01, + const Standard_Real AngleMax = 3.0); + + Standard_EXPORT void SetDraft(const Standard_Boolean IsInternal = Standard_False); + + Standard_EXPORT void Perform(const Standard_Real LengthMax); + + Standard_EXPORT void Perform(const Handle(Geom_Surface)& Surface, + const Standard_Boolean KeepInsideSurface = Standard_True); + + Standard_EXPORT void Perform(const TopoDS_Shape& StopShape, + const Standard_Boolean KeepOutSide = Standard_True); + Standard_EXPORT Standard_Boolean IsDone() const; - + //! Returns the draft surface //! To have the complete shape //! you have to use the Shape() methode. Standard_EXPORT TopoDS_Shell Shell() const; - + //! Returns the list of shapes generated from the //! shape . - Standard_EXPORT const TopTools_ListOfShape& Generated (const TopoDS_Shape& S); - - Standard_EXPORT TopoDS_Shape Shape() const; - - + Standard_EXPORT const TopTools_ListOfShape& Generated(const TopoDS_Shape& S); + Standard_EXPORT TopoDS_Shape Shape() const; protected: +private: + Standard_EXPORT void Init(const Handle(Geom_Surface)& Surf, + const Standard_Real Length, + const Bnd_Box& Box); + Standard_EXPORT void BuildShell(const Handle(Geom_Surface)& Surf, + const Standard_Boolean KeepOutSide = Standard_False); + Standard_EXPORT Standard_Boolean Fuse(const TopoDS_Shape& S, const Standard_Boolean KeepOutSide); - - -private: - - - Standard_EXPORT void Init (const Handle(Geom_Surface)& Surf, const Standard_Real Length, const Bnd_Box& Box); - - Standard_EXPORT void BuildShell (const Handle(Geom_Surface)& Surf, const Standard_Boolean KeepOutSide = Standard_False); - - Standard_EXPORT Standard_Boolean Fuse (const TopoDS_Shape& S, const Standard_Boolean KeepOutSide); - Standard_EXPORT Standard_Boolean Sewing(); - - gp_Dir myDir; - Standard_Real myAngle; - Standard_Real angmin; - Standard_Real angmax; - Standard_Real myTol; - Handle(BRepFill_DraftLaw) myLoc; - Handle(BRepFill_SectionLaw) mySec; + gp_Dir myDir; + Standard_Real myAngle; + Standard_Real angmin; + Standard_Real angmax; + Standard_Real myTol; + Handle(BRepFill_DraftLaw) myLoc; + Handle(BRepFill_SectionLaw) mySec; Handle(TopTools_HArray2OfShape) mySections; Handle(TopTools_HArray2OfShape) myFaces; - TopTools_ListOfShape myGenerated; - TopoDS_Shape myShape; - TopoDS_Shape myTop; - TopoDS_Shell myShell; - TopoDS_Wire myWire; - GeomAbs_Shape myCont; - BRepFill_TransitionStyle myStyle; - Standard_Boolean IsInternal; - Standard_Boolean myDone; - - + TopTools_ListOfShape myGenerated; + TopoDS_Shape myShape; + TopoDS_Shape myTop; + TopoDS_Shell myShell; + TopoDS_Wire myWire; + GeomAbs_Shape myCont; + BRepFill_TransitionStyle myStyle; + Standard_Boolean IsInternal; + Standard_Boolean myDone; }; - - - - - - #endif // _BRepFill_Draft_HeaderFile diff --git a/opencascade/BRepFill_DraftLaw.hxx b/opencascade/BRepFill_DraftLaw.hxx index dc1956f56..1cb928a81 100644 --- a/opencascade/BRepFill_DraftLaw.hxx +++ b/opencascade/BRepFill_DraftLaw.hxx @@ -24,7 +24,6 @@ class TopoDS_Wire; class GeomFill_LocationDraft; - class BRepFill_DraftLaw; DEFINE_STANDARD_HANDLE(BRepFill_DraftLaw, BRepFill_Edge3DLaw) @@ -33,34 +32,16 @@ class BRepFill_DraftLaw : public BRepFill_Edge3DLaw { public: + Standard_EXPORT BRepFill_DraftLaw(const TopoDS_Wire& Path, + const Handle(GeomFill_LocationDraft)& Law); - - Standard_EXPORT BRepFill_DraftLaw(const TopoDS_Wire& Path, const Handle(GeomFill_LocationDraft)& Law); - //! To clean the little discontinuities. - Standard_EXPORT void CleanLaw (const Standard_Real TolAngular); - - + Standard_EXPORT void CleanLaw(const Standard_Real TolAngular); - - DEFINE_STANDARD_RTTIEXT(BRepFill_DraftLaw,BRepFill_Edge3DLaw) + DEFINE_STANDARD_RTTIEXT(BRepFill_DraftLaw, BRepFill_Edge3DLaw) protected: - - - - private: - - - - }; - - - - - - #endif // _BRepFill_DraftLaw_HeaderFile diff --git a/opencascade/BRepFill_Edge3DLaw.hxx b/opencascade/BRepFill_Edge3DLaw.hxx index 569f56dc5..59d7b3f8d 100644 --- a/opencascade/BRepFill_Edge3DLaw.hxx +++ b/opencascade/BRepFill_Edge3DLaw.hxx @@ -24,7 +24,6 @@ class TopoDS_Wire; class GeomFill_LocationLaw; - class BRepFill_Edge3DLaw; DEFINE_STANDARD_HANDLE(BRepFill_Edge3DLaw, BRepFill_LocationLaw) @@ -33,31 +32,13 @@ class BRepFill_Edge3DLaw : public BRepFill_LocationLaw { public: + Standard_EXPORT BRepFill_Edge3DLaw(const TopoDS_Wire& Path, + const Handle(GeomFill_LocationLaw)& Law); - - Standard_EXPORT BRepFill_Edge3DLaw(const TopoDS_Wire& Path, const Handle(GeomFill_LocationLaw)& Law); - - - - - DEFINE_STANDARD_RTTIEXT(BRepFill_Edge3DLaw,BRepFill_LocationLaw) + DEFINE_STANDARD_RTTIEXT(BRepFill_Edge3DLaw, BRepFill_LocationLaw) protected: - - - - private: - - - - }; - - - - - - #endif // _BRepFill_Edge3DLaw_HeaderFile diff --git a/opencascade/BRepFill_EdgeFaceAndOrder.hxx b/opencascade/BRepFill_EdgeFaceAndOrder.hxx index f01c94b1e..a5f8b14ee 100644 --- a/opencascade/BRepFill_EdgeFaceAndOrder.hxx +++ b/opencascade/BRepFill_EdgeFaceAndOrder.hxx @@ -25,44 +25,24 @@ #include #include - - -class BRepFill_EdgeFaceAndOrder +class BRepFill_EdgeFaceAndOrder { public: - DEFINE_STANDARD_ALLOC - Standard_EXPORT BRepFill_EdgeFaceAndOrder(); - - Standard_EXPORT BRepFill_EdgeFaceAndOrder(const TopoDS_Edge& anEdge, const TopoDS_Face& aFace, const GeomAbs_Shape anOrder); + Standard_EXPORT BRepFill_EdgeFaceAndOrder(const TopoDS_Edge& anEdge, + const TopoDS_Face& aFace, + const GeomAbs_Shape anOrder); -friend class BRepFill_Filling; - + friend class BRepFill_Filling; protected: - - - - - private: - - - - TopoDS_Edge myEdge; - TopoDS_Face myFace; + TopoDS_Edge myEdge; + TopoDS_Face myFace; GeomAbs_Shape myOrder; - - }; - - - - - - #endif // _BRepFill_EdgeFaceAndOrder_HeaderFile diff --git a/opencascade/BRepFill_EdgeOnSurfLaw.hxx b/opencascade/BRepFill_EdgeOnSurfLaw.hxx index e173e0098..41b5b1adb 100644 --- a/opencascade/BRepFill_EdgeOnSurfLaw.hxx +++ b/opencascade/BRepFill_EdgeOnSurfLaw.hxx @@ -23,7 +23,6 @@ class TopoDS_Wire; class TopoDS_Shape; - class BRepFill_EdgeOnSurfLaw; DEFINE_STANDARD_HANDLE(BRepFill_EdgeOnSurfLaw, BRepFill_LocationLaw) @@ -32,37 +31,18 @@ class BRepFill_EdgeOnSurfLaw : public BRepFill_LocationLaw { public: - - Standard_EXPORT BRepFill_EdgeOnSurfLaw(const TopoDS_Wire& Path, const TopoDS_Shape& Surf); - + //! returns if one Edge of do not have //! representation on . In this case it is //! impossible to use this object. Standard_EXPORT Standard_Boolean HasResult() const; - - - - DEFINE_STANDARD_RTTIEXT(BRepFill_EdgeOnSurfLaw,BRepFill_LocationLaw) + DEFINE_STANDARD_RTTIEXT(BRepFill_EdgeOnSurfLaw, BRepFill_LocationLaw) protected: - - - - private: - - Standard_Boolean hasresult; - - }; - - - - - - #endif // _BRepFill_EdgeOnSurfLaw_HeaderFile diff --git a/opencascade/BRepFill_Evolved.hxx b/opencascade/BRepFill_Evolved.hxx index 2bc725e43..ca2e79a19 100644 --- a/opencascade/BRepFill_Evolved.hxx +++ b/opencascade/BRepFill_Evolved.hxx @@ -35,136 +35,156 @@ class TopLoc_Location; class TopoDS_Edge; class TopoDS_Vertex; - //! Constructs an evolved volume from a spine (wire or face) //! and a profile ( wire). -class BRepFill_Evolved +class BRepFill_Evolved { public: - DEFINE_STANDARD_ALLOC - Standard_EXPORT BRepFill_Evolved(); - + //! Creates an evolved shape by sweeping the //! along the . is used to set the //! position of along as follows: //! slides on the profile with direction //! colinear to the normal to , and its //! mixed with the tangent to . - Standard_EXPORT BRepFill_Evolved(const TopoDS_Wire& Spine, const TopoDS_Wire& Profile, const gp_Ax3& AxeProf, const GeomAbs_JoinType Join = GeomAbs_Arc, const Standard_Boolean Solid = Standard_False); - + Standard_EXPORT BRepFill_Evolved(const TopoDS_Wire& Spine, + const TopoDS_Wire& Profile, + const gp_Ax3& AxeProf, + const GeomAbs_JoinType Join = GeomAbs_Arc, + const Standard_Boolean Solid = Standard_False); + //! Creates an evolved shape by sweeping the //! along the - Standard_EXPORT BRepFill_Evolved(const TopoDS_Face& Spine, const TopoDS_Wire& Profile, const gp_Ax3& AxeProf, const GeomAbs_JoinType Join = GeomAbs_Arc, const Standard_Boolean Solid = Standard_False); - + Standard_EXPORT BRepFill_Evolved(const TopoDS_Face& Spine, + const TopoDS_Wire& Profile, + const gp_Ax3& AxeProf, + const GeomAbs_JoinType Join = GeomAbs_Arc, + const Standard_Boolean Solid = Standard_False); + //! Performs an evolved shape by sweeping the //! along the - Standard_EXPORT void Perform (const TopoDS_Wire& Spine, const TopoDS_Wire& Profile, const gp_Ax3& AxeProf, const GeomAbs_JoinType Join = GeomAbs_Arc, const Standard_Boolean Solid = Standard_False); - + Standard_EXPORT void Perform(const TopoDS_Wire& Spine, + const TopoDS_Wire& Profile, + const gp_Ax3& AxeProf, + const GeomAbs_JoinType Join = GeomAbs_Arc, + const Standard_Boolean Solid = Standard_False); + //! Performs an evolved shape by sweeping the //! along the - Standard_EXPORT void Perform (const TopoDS_Face& Spine, const TopoDS_Wire& Profile, const gp_Ax3& AxeProf, const GeomAbs_JoinType Join = GeomAbs_Arc, const Standard_Boolean Solid = Standard_False); - + Standard_EXPORT void Perform(const TopoDS_Face& Spine, + const TopoDS_Wire& Profile, + const gp_Ax3& AxeProf, + const GeomAbs_JoinType Join = GeomAbs_Arc, + const Standard_Boolean Solid = Standard_False); + Standard_EXPORT Standard_Boolean IsDone() const; - + //! returns the generated shape. Standard_EXPORT const TopoDS_Shape& Shape() const; - + //! Returns the shapes created from a subshape //! of the spine and a subshape //! on the profile. - Standard_EXPORT const TopTools_ListOfShape& GeneratedShapes (const TopoDS_Shape& SpineShape, const TopoDS_Shape& ProfShape) const; - + Standard_EXPORT const TopTools_ListOfShape& GeneratedShapes(const TopoDS_Shape& SpineShape, + const TopoDS_Shape& ProfShape) const; + Standard_EXPORT GeomAbs_JoinType JoinType() const; - + //! Return the face Top if is True in the constructor. Standard_EXPORT const TopoDS_Shape& Top() const; - + //! Return the face Bottom if is True in the constructor. Standard_EXPORT const TopoDS_Shape& Bottom() const; - - - protected: +private: + Standard_EXPORT void PrivatePerform(const TopoDS_Face& Spine, + const TopoDS_Wire& Profile, + const gp_Ax3& AxeProf, + const GeomAbs_JoinType Join = GeomAbs_Arc, + const Standard_Boolean Solid = Standard_False); + + Standard_EXPORT void SetWork(const TopoDS_Face& Spine, const TopoDS_Wire& Profile); + + Standard_EXPORT void ElementaryPerform(const TopoDS_Face& Spine, + const TopoDS_Wire& Profile, + const BRepMAT2d_BisectingLocus& Locus, + BRepMAT2d_LinkTopoBilo& Link, + const GeomAbs_JoinType Join = GeomAbs_Arc); + + Standard_EXPORT void PlanarPerform(const TopoDS_Face& Spine, + const TopoDS_Wire& Profile, + const BRepMAT2d_BisectingLocus& Locus, + BRepMAT2d_LinkTopoBilo& Link, + const GeomAbs_JoinType Join = GeomAbs_Arc); + + Standard_EXPORT void VerticalPerform(const TopoDS_Face& Spine, + const TopoDS_Wire& Profile, + const BRepMAT2d_BisectingLocus& Locus, + BRepMAT2d_LinkTopoBilo& Link, + const GeomAbs_JoinType Join = GeomAbs_Arc); + Standard_EXPORT BRepFill_DataMapOfShapeDataMapOfShapeListOfShape& Generated(); + Standard_EXPORT void Add(BRepFill_Evolved& Vevo, const TopoDS_Wire& Prof, BRepTools_Quilt& Glue); + Standard_EXPORT TopoDS_Shape& ChangeShape(); + Standard_EXPORT void Transfert(BRepFill_Evolved& Vevo, + const TopTools_DataMapOfShapeShape& MapProf, + const TopTools_DataMapOfShapeShape& MapSpine, + const TopLoc_Location& LS, + const TopLoc_Location& InitLS, + const TopLoc_Location& InitLP); -private: - - - Standard_EXPORT void PrivatePerform (const TopoDS_Face& Spine, const TopoDS_Wire& Profile, const gp_Ax3& AxeProf, const GeomAbs_JoinType Join = GeomAbs_Arc, const Standard_Boolean Solid = Standard_False); - - Standard_EXPORT void SetWork (const TopoDS_Face& Spine, const TopoDS_Wire& Profile); - - Standard_EXPORT void ElementaryPerform (const TopoDS_Face& Spine, const TopoDS_Wire& Profile, const BRepMAT2d_BisectingLocus& Locus, BRepMAT2d_LinkTopoBilo& Link, const GeomAbs_JoinType Join = GeomAbs_Arc); - - Standard_EXPORT void PlanarPerform (const TopoDS_Face& Spine, const TopoDS_Wire& Profile, const BRepMAT2d_BisectingLocus& Locus, BRepMAT2d_LinkTopoBilo& Link, const GeomAbs_JoinType Join = GeomAbs_Arc); - - Standard_EXPORT void VerticalPerform (const TopoDS_Face& Spine, const TopoDS_Wire& Profile, const BRepMAT2d_BisectingLocus& Locus, BRepMAT2d_LinkTopoBilo& Link, const GeomAbs_JoinType Join = GeomAbs_Arc); - - Standard_EXPORT BRepFill_DataMapOfShapeDataMapOfShapeListOfShape& Generated(); - - Standard_EXPORT void Add (BRepFill_Evolved& Vevo, const TopoDS_Wire& Prof, BRepTools_Quilt& Glue); - - Standard_EXPORT TopoDS_Shape& ChangeShape(); - - Standard_EXPORT void Transfert (BRepFill_Evolved& Vevo, const TopTools_DataMapOfShapeShape& MapProf, const TopTools_DataMapOfShapeShape& MapSpine, const TopLoc_Location& LS, const TopLoc_Location& InitLS, const TopLoc_Location& InitLP); - //! Prepare the profil as follow //! - Project the profile in the yOz Plane //! - Cut the profile at the extrema of distance from the //! Profile to the Oz Axis. //! - building the new wires with the cutting edges. - Standard_EXPORT void PrepareProfile (TopTools_ListOfShape& WorkProf, TopTools_DataMapOfShapeShape& MapProf) const; - + Standard_EXPORT void PrepareProfile(TopTools_ListOfShape& WorkProf, + TopTools_DataMapOfShapeShape& MapProf) const; + //! Prepare the spine as follow //! - Cut the spine-Edges at the extrema of curvature and //! at the inflexion points. - Standard_EXPORT void PrepareSpine (TopoDS_Face& WorkSpine, TopTools_DataMapOfShapeShape& SpineProf) const; - - Standard_EXPORT void MakePipe (const TopoDS_Edge& SpineEdge, const gp_Ax3& ProfRef); - - Standard_EXPORT void MakeRevol (const TopoDS_Edge& SpineEdge, const TopoDS_Vertex& SpineVertex, const gp_Ax3& ProfRef); - + Standard_EXPORT void PrepareSpine(TopoDS_Face& WorkSpine, + TopTools_DataMapOfShapeShape& SpineProf) const; + + Standard_EXPORT void MakePipe(const TopoDS_Edge& SpineEdge, const gp_Ax3& ProfRef); + + Standard_EXPORT void MakeRevol(const TopoDS_Edge& SpineEdge, + const TopoDS_Vertex& SpineVertex, + const gp_Ax3& ProfRef); + //! Find the location transforming the planar shape //! in the plane xOy //! if the Shape is not planar. - Standard_EXPORT TopLoc_Location FindLocation (const TopoDS_Face& Face) const; - + Standard_EXPORT TopLoc_Location FindLocation(const TopoDS_Face& Face) const; + //! Apply the Location to and to //! //! in order to set the Shapes in the work space. - Standard_EXPORT void TransformInitWork (const TopLoc_Location& LS, const TopLoc_Location& LP); - - Standard_EXPORT void ContinuityOnOffsetEdge (const TopTools_ListOfShape& WorkProf); - - Standard_EXPORT void AddTopAndBottom (BRepTools_Quilt& Glue); - - Standard_EXPORT void MakeSolid(); + Standard_EXPORT void TransformInitWork(const TopLoc_Location& LS, const TopLoc_Location& LP); + Standard_EXPORT void ContinuityOnOffsetEdge(const TopTools_ListOfShape& WorkProf); - TopoDS_Face mySpine; - TopoDS_Wire myProfile; - TopoDS_Shape myShape; - Standard_Boolean myIsDone; - Standard_Boolean mySpineType; - GeomAbs_JoinType myJoinType; - BRepFill_DataMapOfShapeDataMapOfShapeListOfShape myMap; - TopoDS_Shape myTop; - TopoDS_Shape myBottom; + Standard_EXPORT void AddTopAndBottom(BRepTools_Quilt& Glue); + Standard_EXPORT void MakeSolid(); + TopoDS_Face mySpine; + TopoDS_Wire myProfile; + TopoDS_Shape myShape; + Standard_Boolean myIsDone; + Standard_Boolean mySpineType; + GeomAbs_JoinType myJoinType; + BRepFill_DataMapOfShapeDataMapOfShapeListOfShape myMap; + TopoDS_Shape myTop; + TopoDS_Shape myBottom; }; - - - - - - #endif // _BRepFill_Evolved_HeaderFile diff --git a/opencascade/BRepFill_FaceAndOrder.hxx b/opencascade/BRepFill_FaceAndOrder.hxx index d592f04ae..088ef73bb 100644 --- a/opencascade/BRepFill_FaceAndOrder.hxx +++ b/opencascade/BRepFill_FaceAndOrder.hxx @@ -24,43 +24,22 @@ #include #include - //! A structure containing Face and Order of constraint -class BRepFill_FaceAndOrder +class BRepFill_FaceAndOrder { public: - DEFINE_STANDARD_ALLOC - Standard_EXPORT BRepFill_FaceAndOrder(); - - Standard_EXPORT BRepFill_FaceAndOrder(const TopoDS_Face& aFace, const GeomAbs_Shape anOrder); + Standard_EXPORT BRepFill_FaceAndOrder(const TopoDS_Face& aFace, const GeomAbs_Shape anOrder); -friend class BRepFill_Filling; - + friend class BRepFill_Filling; protected: - - - - - private: - - - - TopoDS_Face myFace; + TopoDS_Face myFace; GeomAbs_Shape myOrder; - - }; - - - - - - #endif // _BRepFill_FaceAndOrder_HeaderFile diff --git a/opencascade/BRepFill_Filling.hxx b/opencascade/BRepFill_Filling.hxx index 74a4b31a4..963821f6f 100644 --- a/opencascade/BRepFill_Filling.hxx +++ b/opencascade/BRepFill_Filling.hxx @@ -62,16 +62,23 @@ class gp_Pnt; //! * Deformation of a face to satisfy internal constraints //! * Deformation of a face to improve Gi continuity with //! connected faces -class BRepFill_Filling +class BRepFill_Filling { public: - DEFINE_STANDARD_ALLOC - //! Constructor - Standard_EXPORT BRepFill_Filling(const Standard_Integer Degree = 3, const Standard_Integer NbPtsOnCur = 15, const Standard_Integer NbIter = 2, const Standard_Boolean Anisotropie = Standard_False, const Standard_Real Tol2d = 0.00001, const Standard_Real Tol3d = 0.0001, const Standard_Real TolAng = 0.01, const Standard_Real TolCurv = 0.1, const Standard_Integer MaxDeg = 8, const Standard_Integer MaxSegments = 9); - + Standard_EXPORT BRepFill_Filling(const Standard_Integer Degree = 3, + const Standard_Integer NbPtsOnCur = 15, + const Standard_Integer NbIter = 2, + const Standard_Boolean Anisotropie = Standard_False, + const Standard_Real Tol2d = 0.00001, + const Standard_Real Tol3d = 0.0001, + const Standard_Real TolAng = 0.01, + const Standard_Real TolCurv = 0.1, + const Standard_Integer MaxDeg = 8, + const Standard_Integer MaxSegments = 9); + //! Sets the values of Tolerances used to control the constraint. //! Tol2d: //! Tol3d: it is the maximum distance allowed between the support surface @@ -80,8 +87,11 @@ public: //! and the constraints //! TolCurv: it is the maximum difference of curvature allowed between //! the surface and the constraint - Standard_EXPORT void SetConstrParam (const Standard_Real Tol2d = 0.00001, const Standard_Real Tol3d = 0.0001, const Standard_Real TolAng = 0.01, const Standard_Real TolCurv = 0.1); - + Standard_EXPORT void SetConstrParam(const Standard_Real Tol2d = 0.00001, + const Standard_Real Tol3d = 0.0001, + const Standard_Real TolAng = 0.01, + const Standard_Real TolCurv = 0.1); + //! Sets the parameters used for resolution. //! The default values of these parameters have been chosen for a good //! ratio quality/performance. @@ -96,19 +106,23 @@ public: //! For each iteration the number of discretisation points is //! increased. //! Anisotropie: - Standard_EXPORT void SetResolParam (const Standard_Integer Degree = 3, const Standard_Integer NbPtsOnCur = 15, const Standard_Integer NbIter = 2, const Standard_Boolean Anisotropie = Standard_False); - + Standard_EXPORT void SetResolParam(const Standard_Integer Degree = 3, + const Standard_Integer NbPtsOnCur = 15, + const Standard_Integer NbIter = 2, + const Standard_Boolean Anisotropie = Standard_False); + //! Sets the parameters used for approximation of the surface - Standard_EXPORT void SetApproxParam (const Standard_Integer MaxDeg = 8, const Standard_Integer MaxSegments = 9); - + Standard_EXPORT void SetApproxParam(const Standard_Integer MaxDeg = 8, + const Standard_Integer MaxSegments = 9); + //! Loads the initial Surface //! The initial surface must have orthogonal local coordinates, //! i.e. partial derivatives dS/du and dS/dv must be orthogonal //! at each point of surface. //! If this condition breaks, distortions of resulting surface //! are possible. - Standard_EXPORT void LoadInitSurface (const TopoDS_Face& aFace); - + Standard_EXPORT void LoadInitSurface(const TopoDS_Face& aFace); + //! Adds a new constraint which also defines an edge of the wire //! of the face //! Order: Order of the constraint: @@ -120,8 +134,10 @@ public: //! GeomAbs_G2 : the surface has to pass by 3D representation //! of the edge and to respect tangency and curvature //! with the first face of the edge. - Standard_EXPORT Standard_Integer Add (const TopoDS_Edge& anEdge, const GeomAbs_Shape Order, const Standard_Boolean IsBound = Standard_True); - + Standard_EXPORT Standard_Integer Add(const TopoDS_Edge& anEdge, + const GeomAbs_Shape Order, + const Standard_Boolean IsBound = Standard_True); + //! Adds a new constraint which also defines an edge of the wire //! of the face //! Order: Order of the constraint: @@ -133,78 +149,82 @@ public: //! GeomAbs_G2 : the surface has to pass by 3D representation //! of the edge and to respect tangency and curvature //! with the given face. - Standard_EXPORT Standard_Integer Add (const TopoDS_Edge& anEdge, const TopoDS_Face& Support, const GeomAbs_Shape Order, const Standard_Boolean IsBound = Standard_True); - + Standard_EXPORT Standard_Integer Add(const TopoDS_Edge& anEdge, + const TopoDS_Face& Support, + const GeomAbs_Shape Order, + const Standard_Boolean IsBound = Standard_True); + //! Adds a free constraint on a face. The corresponding edge has to //! be automatically recomputed. //! It is always a bound. - Standard_EXPORT Standard_Integer Add (const TopoDS_Face& Support, const GeomAbs_Shape Order); - + Standard_EXPORT Standard_Integer Add(const TopoDS_Face& Support, const GeomAbs_Shape Order); + //! Adds a punctual constraint - Standard_EXPORT Standard_Integer Add (const gp_Pnt& Point); - + Standard_EXPORT Standard_Integer Add(const gp_Pnt& Point); + //! Adds a punctual constraint. - Standard_EXPORT Standard_Integer Add (const Standard_Real U, const Standard_Real V, const TopoDS_Face& Support, const GeomAbs_Shape Order); - + Standard_EXPORT Standard_Integer Add(const Standard_Real U, + const Standard_Real V, + const TopoDS_Face& Support, + const GeomAbs_Shape Order); + //! Builds the resulting faces Standard_EXPORT void Build(); - + Standard_EXPORT Standard_Boolean IsDone() const; - + Standard_EXPORT TopoDS_Face Face() const; - + //! Returns the list of shapes generated from the //! shape . - Standard_EXPORT const TopTools_ListOfShape& Generated (const TopoDS_Shape& S); - + Standard_EXPORT const TopTools_ListOfShape& Generated(const TopoDS_Shape& S); + Standard_EXPORT Standard_Real G0Error() const; - + Standard_EXPORT Standard_Real G1Error() const; - + Standard_EXPORT Standard_Real G2Error() const; - - Standard_EXPORT Standard_Real G0Error (const Standard_Integer Index); - - Standard_EXPORT Standard_Real G1Error (const Standard_Integer Index); - - Standard_EXPORT Standard_Real G2Error (const Standard_Integer Index); -private: + Standard_EXPORT Standard_Real G0Error(const Standard_Integer Index); + + Standard_EXPORT Standard_Real G1Error(const Standard_Integer Index); + Standard_EXPORT Standard_Real G2Error(const Standard_Integer Index); + +private: //! Adds constraints to builder - Standard_EXPORT void AddConstraints (const BRepFill_SequenceOfEdgeFaceAndOrder& SeqOfConstraints); - + Standard_EXPORT void AddConstraints(const BRepFill_SequenceOfEdgeFaceAndOrder& SeqOfConstraints); + //! Builds wires of maximum length - Standard_EXPORT void BuildWires (TopTools_ListOfShape& EdgeList, TopTools_ListOfShape& WireList); - + Standard_EXPORT void BuildWires(TopTools_ListOfShape& EdgeList, TopTools_ListOfShape& WireList); + //! Finds extremities of future edges to fix the holes between wires. //! Can properly operate only with convex contour - Standard_EXPORT void FindExtremitiesOfHoles (const TopTools_ListOfShape& WireList, TopTools_SequenceOfShape& VerSeq) const; + Standard_EXPORT void FindExtremitiesOfHoles(const TopTools_ListOfShape& WireList, + TopTools_SequenceOfShape& VerSeq) const; private: - std::shared_ptr myBuilder; - BRepFill_SequenceOfEdgeFaceAndOrder myBoundary; - BRepFill_SequenceOfEdgeFaceAndOrder myConstraints; - BRepFill_SequenceOfFaceAndOrder myFreeConstraints; - GeomPlate_SequenceOfPointConstraint myPoints; - TopTools_DataMapOfShapeShape myOldNewMap; - TopTools_ListOfShape myGenerated; - TopoDS_Face myFace; - TopoDS_Face myInitFace; - Standard_Real myTol2d; - Standard_Real myTol3d; - Standard_Real myTolAng; - Standard_Real myTolCurv; - Standard_Integer myMaxDeg; - Standard_Integer myMaxSegments; - Standard_Integer myDegree; - Standard_Integer myNbPtsOnCur; - Standard_Integer myNbIter; - Standard_Boolean myAnisotropie; - Standard_Boolean myIsInitFaceGiven; - Standard_Boolean myIsDone; - + BRepFill_SequenceOfEdgeFaceAndOrder myBoundary; + BRepFill_SequenceOfEdgeFaceAndOrder myConstraints; + BRepFill_SequenceOfFaceAndOrder myFreeConstraints; + GeomPlate_SequenceOfPointConstraint myPoints; + TopTools_DataMapOfShapeShape myOldNewMap; + TopTools_ListOfShape myGenerated; + TopoDS_Face myFace; + TopoDS_Face myInitFace; + Standard_Real myTol2d; + Standard_Real myTol3d; + Standard_Real myTolAng; + Standard_Real myTolCurv; + Standard_Integer myMaxDeg; + Standard_Integer myMaxSegments; + Standard_Integer myDegree; + Standard_Integer myNbPtsOnCur; + Standard_Integer myNbIter; + Standard_Boolean myAnisotropie; + Standard_Boolean myIsInitFaceGiven; + Standard_Boolean myIsDone; }; #endif // _BRepFill_Filling_HeaderFile diff --git a/opencascade/BRepFill_Generator.hxx b/opencascade/BRepFill_Generator.hxx index 65b31657a..8fc014acd 100644 --- a/opencascade/BRepFill_Generator.hxx +++ b/opencascade/BRepFill_Generator.hxx @@ -34,59 +34,51 @@ class TopoDS_Shape; //! generating wires. The face of the shell will be //! ruled surfaces passing by the wires. //! The wires must have the same number of edges. -class BRepFill_Generator +class BRepFill_Generator { public: - DEFINE_STANDARD_ALLOC - Standard_EXPORT BRepFill_Generator(); - - Standard_EXPORT void AddWire (const TopoDS_Wire& Wire); - + + Standard_EXPORT void AddWire(const TopoDS_Wire& Wire); + //! Compute the shell. Standard_EXPORT void Perform(); - - const TopoDS_Shell& Shell() const; - + + const TopoDS_Shell& Shell() const; + //! Returns all the shapes created Standard_EXPORT const TopTools_DataMapOfShapeListOfShape& Generated() const; - + //! Returns the shapes created from a subshape //! of a section. - Standard_EXPORT const TopTools_ListOfShape& GeneratedShapes (const TopoDS_Shape& SSection) const; + Standard_EXPORT const TopTools_ListOfShape& GeneratedShapes(const TopoDS_Shape& SSection) const; //! Returns a modified shape in the constructed shell, //! If shape is not changed (replaced) during operation => returns the same shape - Standard_EXPORT TopoDS_Shape ResultShape (const TopoDS_Shape& theShape) const; + Standard_EXPORT TopoDS_Shape ResultShape(const TopoDS_Shape& theShape) const; //! Sets the mutable input state - //! If true then the input profile can be modified + //! If true then the input profile can be modified //! inside the operation. Default value is true. Standard_EXPORT void SetMutableInput(const Standard_Boolean theIsMutableInput); - + //! Returns the current mutable input state Standard_EXPORT Standard_Boolean IsMutableInput() const; //! Returns status of the operation - BRepFill_ThruSectionErrorStatus GetStatus() const - { - return myStatus; - } + BRepFill_ThruSectionErrorStatus GetStatus() const { return myStatus; } protected: - private: - - TopTools_SequenceOfShape myWires; - TopoDS_Shell myShell; + TopTools_SequenceOfShape myWires; + TopoDS_Shell myShell; TopTools_DataMapOfShapeListOfShape myMap; - TopTools_DataMapOfShapeShape myOldNewShapes; - BRepTools_ReShape myReshaper; - Standard_Boolean myMutableInput; - BRepFill_ThruSectionErrorStatus myStatus; - + TopTools_DataMapOfShapeShape myOldNewShapes; + BRepTools_ReShape myReshaper; + Standard_Boolean myMutableInput; + BRepFill_ThruSectionErrorStatus myStatus; }; #include diff --git a/opencascade/BRepFill_Generator.lxx b/opencascade/BRepFill_Generator.lxx index ff2be361d..5b6e74871 100644 --- a/opencascade/BRepFill_Generator.lxx +++ b/opencascade/BRepFill_Generator.lxx @@ -15,11 +15,11 @@ // commercial license or contractual agreement. //======================================================================= -//function : Shell -//purpose : +// function : Shell +// purpose : //======================================================================= -inline const TopoDS_Shell& BRepFill_Generator::Shell() const +inline const TopoDS_Shell& BRepFill_Generator::Shell() const { return myShell; } diff --git a/opencascade/BRepFill_IndexedDataMapOfOrientedShapeListOfShape.hxx b/opencascade/BRepFill_IndexedDataMapOfOrientedShapeListOfShape.hxx index 1c57f67b7..73f75ff83 100644 --- a/opencascade/BRepFill_IndexedDataMapOfOrientedShapeListOfShape.hxx +++ b/opencascade/BRepFill_IndexedDataMapOfOrientedShapeListOfShape.hxx @@ -21,7 +21,7 @@ #include #include -typedef NCollection_IndexedDataMap BRepFill_IndexedDataMapOfOrientedShapeListOfShape; - +typedef NCollection_IndexedDataMap + BRepFill_IndexedDataMapOfOrientedShapeListOfShape; #endif diff --git a/opencascade/BRepFill_ListIteratorOfListOfOffsetWire.hxx b/opencascade/BRepFill_ListIteratorOfListOfOffsetWire.hxx index 4ac694feb..ca1b1be11 100644 --- a/opencascade/BRepFill_ListIteratorOfListOfOffsetWire.hxx +++ b/opencascade/BRepFill_ListIteratorOfListOfOffsetWire.hxx @@ -11,7 +11,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. - #ifndef BRepFill_ListIteratorOfListOfOffsetWire_HeaderFile #define BRepFill_ListIteratorOfListOfOffsetWire_HeaderFile diff --git a/opencascade/BRepFill_ListOfOffsetWire.hxx b/opencascade/BRepFill_ListOfOffsetWire.hxx index 5a500becd..6a2aeee85 100644 --- a/opencascade/BRepFill_ListOfOffsetWire.hxx +++ b/opencascade/BRepFill_ListOfOffsetWire.hxx @@ -20,8 +20,7 @@ #include #include -typedef NCollection_List BRepFill_ListOfOffsetWire; +typedef NCollection_List BRepFill_ListOfOffsetWire; typedef NCollection_List::Iterator BRepFill_ListIteratorOfListOfOffsetWire; - #endif diff --git a/opencascade/BRepFill_LocationLaw.hxx b/opencascade/BRepFill_LocationLaw.hxx index ef0c46038..afebbd1cc 100644 --- a/opencascade/BRepFill_LocationLaw.hxx +++ b/opencascade/BRepFill_LocationLaw.hxx @@ -34,7 +34,6 @@ class TopoDS_Edge; class TopoDS_Vertex; class TopoDS_Shape; - class BRepFill_LocationLaw; DEFINE_STANDARD_HANDLE(BRepFill_LocationLaw, Standard_Transient) @@ -43,44 +42,42 @@ class BRepFill_LocationLaw : public Standard_Transient { public: - - //! Return a error status, if the status is not PipeOk then //! it exist a parameter tlike the law is not valuable for t. Standard_EXPORT GeomFill_PipeError GetStatus() const; - + //! Apply a linear transformation on each law, to have //! continuity of the global law between the edges. Standard_EXPORT virtual void TransformInG0Law(); - + //! Apply a linear transformation on each law, to reduce //! the dicontinuities of law at one rotation. - Standard_EXPORT virtual void TransformInCompatibleLaw (const Standard_Real AngularTolerance); - + Standard_EXPORT virtual void TransformInCompatibleLaw(const Standard_Real AngularTolerance); + Standard_EXPORT void DeleteTransform(); - - Standard_EXPORT Standard_Integer NbHoles (const Standard_Real Tol = 1.0e-7); - - Standard_EXPORT void Holes (TColStd_Array1OfInteger& Interval) const; - + + Standard_EXPORT Standard_Integer NbHoles(const Standard_Real Tol = 1.0e-7); + + Standard_EXPORT void Holes(TColStd_Array1OfInteger& Interval) const; + //! Return the number of elementary Law Standard_EXPORT Standard_Integer NbLaw() const; - + //! Return the elementary Law of rank //! have to be in [1, NbLaw()] - Standard_EXPORT const Handle(GeomFill_LocationLaw)& Law (const Standard_Integer Index) const; - + Standard_EXPORT const Handle(GeomFill_LocationLaw)& Law(const Standard_Integer Index) const; + //! return the path Standard_EXPORT const TopoDS_Wire& Wire() const; - + //! Return the Edge of rank in the path //! have to be in [1, NbLaw()] - Standard_EXPORT const TopoDS_Edge& Edge (const Standard_Integer Index) const; - + Standard_EXPORT const TopoDS_Edge& Edge(const Standard_Integer Index) const; + //! Return the vertex of rank in the path //! have to be in [0, NbLaw()] - Standard_EXPORT TopoDS_Vertex Vertex (const Standard_Integer Index) const; - + Standard_EXPORT TopoDS_Vertex Vertex(const Standard_Integer Index) const; + //! Compute like a transformation of //! the transformation is given by //! evaluation of the location law in the vertex of @@ -89,73 +86,67 @@ public: //! - -1 : The law before the vertex is used. //! - 1 : The law after the vertex is used. //! - 0 : Average of the both laws is used. - Standard_EXPORT void PerformVertex (const Standard_Integer Index, const TopoDS_Vertex& InputVertex, const Standard_Real TolMin, TopoDS_Vertex& OutputVertex, const Standard_Integer Location = 0) const; - + Standard_EXPORT void PerformVertex(const Standard_Integer Index, + const TopoDS_Vertex& InputVertex, + const Standard_Real TolMin, + TopoDS_Vertex& OutputVertex, + const Standard_Integer Location = 0) const; + //! Return the Curvilinear Bounds of the Law - Standard_EXPORT void CurvilinearBounds (const Standard_Integer Index, Standard_Real& First, Standard_Real& Last) const; - + Standard_EXPORT void CurvilinearBounds(const Standard_Integer Index, + Standard_Real& First, + Standard_Real& Last) const; + Standard_EXPORT Standard_Boolean IsClosed() const; - + //! Compute the Law's continuity between 2 edges of the path //! The result can be : //! -1 : Case Not connex //! 0 : It is connex (G0) //! 1 : It is tangent (G1) - Standard_EXPORT Standard_Integer IsG1 (const Standard_Integer Index, const Standard_Real SpatialTolerance = 1.0e-7, const Standard_Real AngularTolerance = 1.0e-4) const; + Standard_EXPORT Standard_Integer IsG1(const Standard_Integer Index, + const Standard_Real SpatialTolerance = 1.0e-7, + const Standard_Real AngularTolerance = 1.0e-4) const; //! Apply the Law to a shape, for a given Curvilinear abscissa - Standard_EXPORT void D0 (const Standard_Real Abscissa, TopoDS_Shape& Section); + Standard_EXPORT void D0(const Standard_Real Abscissa, TopoDS_Shape& Section); //! Find the index Law and the parameter, for a given Curvilinear abscissa - Standard_EXPORT void Parameter (const Standard_Real Abscissa, Standard_Integer& Index, Standard_Real& Param); + Standard_EXPORT void Parameter(const Standard_Real Abscissa, + Standard_Integer& Index, + Standard_Real& Param); //! Return the curvilinear abscissa corresponding to a point //! of the path, defined by of Edge and a //! parameter on the edge. - Standard_EXPORT Standard_Real Abscissa (const Standard_Integer Index, const Standard_Real Param); - + Standard_EXPORT Standard_Real Abscissa(const Standard_Integer Index, const Standard_Real Param); - - - DEFINE_STANDARD_RTTIEXT(BRepFill_LocationLaw,Standard_Transient) + DEFINE_STANDARD_RTTIEXT(BRepFill_LocationLaw, Standard_Transient) protected: - - - //! Initialize all the fields, this methode have to + //! Initialize all the fields, this methode has to //! be called by the constructors of Inherited class. - Standard_EXPORT void Init (const TopoDS_Wire& Path); - - //! To preseve if possible the Tangent in transformations + Standard_EXPORT void Init(const TopoDS_Wire& Path); + + //! To preserve if possible the Tangent in transformations //! It is the default mode. Standard_EXPORT void TangentIsMain(); - - //! To preseve if possible the Normal in transformations + + //! To preserve if possible the Normal in transformations Standard_EXPORT void NormalIsMain(); - - //! To preseve if possible the BiNormal in transformations + + //! To preserve if possible the BiNormal in transformations Standard_EXPORT void BiNormalIsMain(); - TopoDS_Wire myPath; - Standard_Real myTol; + TopoDS_Wire myPath; + Standard_Real myTol; Handle(GeomFill_HArray1OfLocationLaw) myLaws; - Handle(TColStd_HArray1OfReal) myLength; - Handle(TopTools_HArray1OfShape) myEdges; - Handle(TColStd_HArray1OfInteger) myDisc; - + Handle(TColStd_HArray1OfReal) myLength; + Handle(TopTools_HArray1OfShape) myEdges; + Handle(TColStd_HArray1OfInteger) myDisc; private: - - Standard_Integer myType; - - }; - - - - - - #endif // _BRepFill_LocationLaw_HeaderFile diff --git a/opencascade/BRepFill_MultiLine.hxx b/opencascade/BRepFill_MultiLine.hxx index 2244f4b05..02459f043 100644 --- a/opencascade/BRepFill_MultiLine.hxx +++ b/opencascade/BRepFill_MultiLine.hxx @@ -36,7 +36,6 @@ class Geom_Curve; class gp_Pnt; class gp_Pnt2d; - //! Class used to compute the 3d curve and the //! two 2d curves resulting from the intersection of a //! surface of linear extrusion( Bissec, Dz) and the 2 @@ -52,61 +51,72 @@ public: Standard_EXPORT BRepFill_MultiLine(); - Standard_EXPORT BRepFill_MultiLine(const TopoDS_Face& Face1, const TopoDS_Face& Face2, const TopoDS_Edge& Edge1, const TopoDS_Edge& Edge2, const Standard_Boolean Inv1, const Standard_Boolean Inv2, const Handle(Geom2d_Curve)& Bissec); + Standard_EXPORT BRepFill_MultiLine(const TopoDS_Face& Face1, + const TopoDS_Face& Face2, + const TopoDS_Edge& Edge1, + const TopoDS_Edge& Edge2, + const Standard_Boolean Inv1, + const Standard_Boolean Inv2, + const Handle(Geom2d_Curve)& Bissec); //! Search if the Projection of the Bissectrice on the //! faces needs an approximation or not. //! Returns true if the approximation is not needed. - Standard_EXPORT Standard_Boolean IsParticularCase() const; + Standard_EXPORT Standard_Boolean IsParticularCase() const; - //! Returns the continuity betwwen the two faces + //! Returns the continuity between the two faces //! seShape from GeomAbsparated by myBis. - Standard_EXPORT GeomAbs_Shape Continuity() const; + Standard_EXPORT GeomAbs_Shape Continuity() const; //! raises if IsParticularCase is . - Standard_EXPORT void Curves (Handle(Geom_Curve)& Curve, Handle(Geom2d_Curve)& PCurve1, Handle(Geom2d_Curve)& PCurve2) const; + Standard_EXPORT void Curves(Handle(Geom_Curve)& Curve, + Handle(Geom2d_Curve)& PCurve1, + Handle(Geom2d_Curve)& PCurve2) const; //! returns the first parameter of the Bissectrice. - Standard_EXPORT virtual Standard_Real FirstParameter() const; + Standard_EXPORT virtual Standard_Real FirstParameter() const; //! returns the last parameter of the Bissectrice. - Standard_EXPORT virtual Standard_Real LastParameter() const; - + Standard_EXPORT virtual Standard_Real LastParameter() const; + //! Returns the current point on the 3d curve - Standard_EXPORT gp_Pnt Value (const Standard_Real U) const; + Standard_EXPORT gp_Pnt Value(const Standard_Real U) const; //! returns the current point on the PCurve of the //! first face - Standard_EXPORT gp_Pnt2d ValueOnF1 (const Standard_Real U) const; + Standard_EXPORT gp_Pnt2d ValueOnF1(const Standard_Real U) const; //! returns the current point on the PCurve of the //! first face - Standard_EXPORT gp_Pnt2d ValueOnF2 (const Standard_Real U) const; + Standard_EXPORT gp_Pnt2d ValueOnF2(const Standard_Real U) const; - Standard_EXPORT void Value3dOnF1OnF2 (const Standard_Real U, gp_Pnt& P3d, gp_Pnt2d& PF1, gp_Pnt2d& PF2) const; + Standard_EXPORT void Value3dOnF1OnF2(const Standard_Real U, + gp_Pnt& P3d, + gp_Pnt2d& PF1, + gp_Pnt2d& PF2) const; //! Returns the point at parameter . - Standard_EXPORT virtual Standard_Boolean Value(const Standard_Real theU, + Standard_EXPORT virtual Standard_Boolean Value(const Standard_Real theU, NCollection_Array1& thePnt2d, NCollection_Array1& thePnt) const; //! Returns the derivative at parameter . - Standard_EXPORT virtual Standard_Boolean D1(const Standard_Real theU, + Standard_EXPORT virtual Standard_Boolean D1(const Standard_Real theU, NCollection_Array1& theVec2d, NCollection_Array1& theVec) const; private: - TopoDS_Face myFace1; - TopoDS_Face myFace2; + TopoDS_Face myFace1; + TopoDS_Face myFace2; Geom2dAdaptor_Curve myU1; Geom2dAdaptor_Curve myV1; Geom2dAdaptor_Curve myU2; Geom2dAdaptor_Curve myV2; - Standard_Boolean myIsoU1; - Standard_Boolean myIsoU2; + Standard_Boolean myIsoU1; + Standard_Boolean myIsoU2; Geom2dAdaptor_Curve myBis; - Standard_Integer myKPart; - GeomAbs_Shape myCont; + Standard_Integer myKPart; + GeomAbs_Shape myCont; }; #endif // _BRepFill_MultiLine_HeaderFile diff --git a/opencascade/BRepFill_NSections.hxx b/opencascade/BRepFill_NSections.hxx index 506665023..73875410b 100644 --- a/opencascade/BRepFill_NSections.hxx +++ b/opencascade/BRepFill_NSections.hxx @@ -32,7 +32,6 @@ class GeomFill_SectionLaw; class TopoDS_Vertex; class TopoDS_Shape; - class BRepFill_NSections; DEFINE_STANDARD_HANDLE(BRepFill_NSections, BRepFill_SectionLaw) @@ -41,61 +40,53 @@ class BRepFill_NSections : public BRepFill_SectionLaw { public: - - //! Construct - Standard_EXPORT BRepFill_NSections(const TopTools_SequenceOfShape& S, const Standard_Boolean Build = Standard_True); - + Standard_EXPORT BRepFill_NSections(const TopTools_SequenceOfShape& S, + const Standard_Boolean Build = Standard_True); + //! Construct - Standard_EXPORT BRepFill_NSections(const TopTools_SequenceOfShape& S, const GeomFill_SequenceOfTrsf& Trsfs, const TColStd_SequenceOfReal& P, const Standard_Real VF, const Standard_Real VL, const Standard_Boolean Build = Standard_True); - + Standard_EXPORT BRepFill_NSections(const TopTools_SequenceOfShape& S, + const GeomFill_SequenceOfTrsf& Trsfs, + const TColStd_SequenceOfReal& P, + const Standard_Real VF, + const Standard_Real VL, + const Standard_Boolean Build = Standard_True); + //! Say if the input shape is a vertex. Standard_EXPORT virtual Standard_Boolean IsVertex() const Standard_OVERRIDE; - + //! Say if the Law is Constant. Standard_EXPORT virtual Standard_Boolean IsConstant() const Standard_OVERRIDE; - + //! Give the law build on a concatenated section Standard_EXPORT virtual Handle(GeomFill_SectionLaw) ConcatenedLaw() const Standard_OVERRIDE; - - Standard_EXPORT virtual GeomAbs_Shape Continuity (const Standard_Integer Index, const Standard_Real TolAngular) const Standard_OVERRIDE; - - Standard_EXPORT virtual Standard_Real VertexTol (const Standard_Integer Index, const Standard_Real Param) const Standard_OVERRIDE; - - Standard_EXPORT virtual TopoDS_Vertex Vertex (const Standard_Integer Index, const Standard_Real Param) const Standard_OVERRIDE; - - Standard_EXPORT virtual void D0 (const Standard_Real Param, TopoDS_Shape& S) Standard_OVERRIDE; - - + Standard_EXPORT virtual GeomAbs_Shape Continuity(const Standard_Integer Index, + const Standard_Real TolAngular) const + Standard_OVERRIDE; - DEFINE_STANDARD_RTTIEXT(BRepFill_NSections,BRepFill_SectionLaw) - -protected: + Standard_EXPORT virtual Standard_Real VertexTol(const Standard_Integer Index, + const Standard_Real Param) const + Standard_OVERRIDE; + Standard_EXPORT virtual TopoDS_Vertex Vertex(const Standard_Integer Index, + const Standard_Real Param) const Standard_OVERRIDE; + Standard_EXPORT virtual void D0(const Standard_Real Param, TopoDS_Shape& S) Standard_OVERRIDE; + DEFINE_STANDARD_RTTIEXT(BRepFill_NSections, BRepFill_SectionLaw) +protected: private: + Standard_EXPORT void Init(const TColStd_SequenceOfReal& P, const Standard_Boolean B); - - Standard_EXPORT void Init (const TColStd_SequenceOfReal& P, const Standard_Boolean B); - - Standard_Real VFirst; - Standard_Real VLast; - TopTools_SequenceOfShape myShapes; - GeomFill_SequenceOfTrsf myTrsfs; - TColStd_SequenceOfReal myParams; + Standard_Real VFirst; + Standard_Real VLast; + TopTools_SequenceOfShape myShapes; + GeomFill_SequenceOfTrsf myTrsfs; + TColStd_SequenceOfReal myParams; Handle(TopTools_HArray2OfShape) myEdges; - Handle(Geom_BSplineSurface) mySurface; - - + Handle(Geom_BSplineSurface) mySurface; }; - - - - - - #endif // _BRepFill_NSections_HeaderFile diff --git a/opencascade/BRepFill_OffsetAncestors.hxx b/opencascade/BRepFill_OffsetAncestors.hxx index 9155b8032..e8a35d36b 100644 --- a/opencascade/BRepFill_OffsetAncestors.hxx +++ b/opencascade/BRepFill_OffsetAncestors.hxx @@ -27,54 +27,32 @@ class BRepFill_OffsetWire; class TopoDS_Edge; class TopoDS_Shape; - //! this class is used to find the generating shapes //! of an OffsetWire. -class BRepFill_OffsetAncestors +class BRepFill_OffsetAncestors { public: - DEFINE_STANDARD_ALLOC - Standard_EXPORT BRepFill_OffsetAncestors(); - + Standard_EXPORT BRepFill_OffsetAncestors(BRepFill_OffsetWire& Paral); - - Standard_EXPORT void Perform (BRepFill_OffsetWire& Paral); - + + Standard_EXPORT void Perform(BRepFill_OffsetWire& Paral); + Standard_EXPORT Standard_Boolean IsDone() const; - - Standard_EXPORT Standard_Boolean HasAncestor (const TopoDS_Edge& S1) const; - + + Standard_EXPORT Standard_Boolean HasAncestor(const TopoDS_Edge& S1) const; + //! may return a Null Shape if S1 is not a subShape //! of ; //! if Perform is not done. - Standard_EXPORT const TopoDS_Shape& Ancestor (const TopoDS_Edge& S1) const; - - - + Standard_EXPORT const TopoDS_Shape& Ancestor(const TopoDS_Edge& S1) const; protected: - - - - - private: - - - - Standard_Boolean myIsPerform; + Standard_Boolean myIsPerform; TopTools_DataMapOfShapeShape myMap; - - }; - - - - - - #endif // _BRepFill_OffsetAncestors_HeaderFile diff --git a/opencascade/BRepFill_OffsetWire.hxx b/opencascade/BRepFill_OffsetWire.hxx index f5c89597c..1186e55e0 100644 --- a/opencascade/BRepFill_OffsetWire.hxx +++ b/opencascade/BRepFill_OffsetWire.hxx @@ -33,7 +33,6 @@ class Bisector_Bisec; class BRepFill_TrimEdgeTool; - //! Constructs a Offset Wire to a spine (wire or face). //! Offset direction will be to outer region in case of //! positive offset value and to inner region in case of @@ -46,93 +45,89 @@ class BRepFill_TrimEdgeTool; //! inside the wire (at that, edges orientation is not taken //! into account). //! The Wire or the Face must be planar and oriented correctly. -class BRepFill_OffsetWire +class BRepFill_OffsetWire { public: - DEFINE_STANDARD_ALLOC - Standard_EXPORT BRepFill_OffsetWire(); - - Standard_EXPORT BRepFill_OffsetWire(const TopoDS_Face& Spine, const GeomAbs_JoinType Join = GeomAbs_Arc, const Standard_Boolean IsOpenResult = Standard_False); - + + Standard_EXPORT BRepFill_OffsetWire(const TopoDS_Face& Spine, + const GeomAbs_JoinType Join = GeomAbs_Arc, + const Standard_Boolean IsOpenResult = Standard_False); + //! Initialize the evaluation of Offsetting. - Standard_EXPORT void Init (const TopoDS_Face& Spine, const GeomAbs_JoinType Join = GeomAbs_Arc, const Standard_Boolean IsOpenResult = Standard_False); - + Standard_EXPORT void Init(const TopoDS_Face& Spine, + const GeomAbs_JoinType Join = GeomAbs_Arc, + const Standard_Boolean IsOpenResult = Standard_False); + //! Performs an OffsetWire at an altitude from //! the face ( According to the orientation of the //! face) - Standard_EXPORT void Perform (const Standard_Real Offset, const Standard_Real Alt = 0.0); - + Standard_EXPORT void Perform(const Standard_Real Offset, const Standard_Real Alt = 0.0); + //! Performs an OffsetWire - Standard_EXPORT void PerformWithBiLo (const TopoDS_Face& WSP, const Standard_Real Offset, const BRepMAT2d_BisectingLocus& Locus, BRepMAT2d_LinkTopoBilo& Link, const GeomAbs_JoinType Join = GeomAbs_Arc, const Standard_Real Alt = 0.0); - + Standard_EXPORT void PerformWithBiLo(const TopoDS_Face& WSP, + const Standard_Real Offset, + const BRepMAT2d_BisectingLocus& Locus, + BRepMAT2d_LinkTopoBilo& Link, + const GeomAbs_JoinType Join = GeomAbs_Arc, + const Standard_Real Alt = 0.0); + Standard_EXPORT Standard_Boolean IsDone() const; - + Standard_EXPORT const TopoDS_Face& Spine() const; - + //! returns the generated shape. Standard_EXPORT const TopoDS_Shape& Shape() const; - + //! Returns the shapes created from a subshape //! of the spine. //! Returns the last computed Offset. - Standard_EXPORT const TopTools_ListOfShape& GeneratedShapes (const TopoDS_Shape& SpineShape); - - Standard_EXPORT GeomAbs_JoinType JoinType() const; - - + Standard_EXPORT const TopTools_ListOfShape& GeneratedShapes(const TopoDS_Shape& SpineShape); + Standard_EXPORT GeomAbs_JoinType JoinType() const; protected: - - - - - private: - - Standard_EXPORT BRepFill_IndexedDataMapOfOrientedShapeListOfShape& Generated(); - + //! Prepare the spine as follow //! - Cut the spine-Edges at the extrema of curvature and //! at the inflexion points. Standard_EXPORT void PrepareSpine(); - + //! Add the OffsetWire to and update - Standard_EXPORT void Add (const BRepFill_OffsetWire& Other); - - Standard_EXPORT void UpdateDetromp (BRepFill_DataMapOfOrientedShapeListOfShape& Detromp, const TopoDS_Shape& Shape1, const TopoDS_Shape& Shape2, const TopTools_SequenceOfShape& Vertices, const TColgp_SequenceOfPnt& Params, const Bisector_Bisec& Bisec, const Standard_Boolean SOnE, const Standard_Boolean EOnE, const BRepFill_TrimEdgeTool& Trim) const; - + Standard_EXPORT void Add(const BRepFill_OffsetWire& Other); + + Standard_EXPORT void UpdateDetromp(BRepFill_DataMapOfOrientedShapeListOfShape& Detromp, + const TopoDS_Shape& Shape1, + const TopoDS_Shape& Shape2, + const TopTools_SequenceOfShape& Vertices, + const TColgp_SequenceOfPnt& Params, + const Bisector_Bisec& Bisec, + const Standard_Boolean SOnE, + const Standard_Boolean EOnE, + const BRepFill_TrimEdgeTool& Trim) const; + //! Constructs the wires with the trimmed offset edges. Standard_EXPORT void MakeWires(); - + //! Fix holes between open wires where it is possible Standard_EXPORT void FixHoles(); - - TopoDS_Face mySpine; - TopoDS_Face myWorkSpine; - Standard_Real myOffset; - Standard_Boolean myIsOpenResult; - TopoDS_Shape myShape; - Standard_Boolean myIsDone; - GeomAbs_JoinType myJoinType; + TopoDS_Face mySpine; + TopoDS_Face myWorkSpine; + Standard_Real myOffset; + Standard_Boolean myIsOpenResult; + TopoDS_Shape myShape; + Standard_Boolean myIsDone; + GeomAbs_JoinType myJoinType; BRepFill_IndexedDataMapOfOrientedShapeListOfShape myMap; - BRepMAT2d_BisectingLocus myBilo; - BRepMAT2d_LinkTopoBilo myLink; - TopTools_DataMapOfShapeShape myMapSpine; - Standard_Boolean myCallGen; - - + BRepMAT2d_BisectingLocus myBilo; + BRepMAT2d_LinkTopoBilo myLink; + TopTools_DataMapOfShapeShape myMapSpine; + Standard_Boolean myCallGen; }; - - - - - - #endif // _BRepFill_OffsetWire_HeaderFile diff --git a/opencascade/BRepFill_Pipe.hxx b/opencascade/BRepFill_Pipe.hxx index bd26997ad..6e54d9616 100644 --- a/opencascade/BRepFill_Pipe.hxx +++ b/opencascade/BRepFill_Pipe.hxx @@ -37,134 +37,111 @@ class TopoDS_Vertex; class gp_Pnt; class BRepFill_Sweep; - //! Create a shape by sweeping a shape (the profile) //! along a wire (the spine). //! //! For each edge or vertex from the spine the user //! may ask for the shape generated from each subshape //! of the profile. -class BRepFill_Pipe +class BRepFill_Pipe { public: - DEFINE_STANDARD_ALLOC - Standard_EXPORT BRepFill_Pipe(); - - Standard_EXPORT BRepFill_Pipe(const TopoDS_Wire& Spine, - const TopoDS_Shape& Profile, - const GeomFill_Trihedron aMode = GeomFill_IsCorrectedFrenet, - const Standard_Boolean ForceApproxC1 = Standard_False, - const Standard_Boolean GeneratePartCase = Standard_False); - - Standard_EXPORT void Perform (const TopoDS_Wire& Spine, - const TopoDS_Shape& Profile, - const Standard_Boolean GeneratePartCase = Standard_False); - + + Standard_EXPORT BRepFill_Pipe(const TopoDS_Wire& Spine, + const TopoDS_Shape& Profile, + const GeomFill_Trihedron aMode = GeomFill_IsCorrectedFrenet, + const Standard_Boolean ForceApproxC1 = Standard_False, + const Standard_Boolean GeneratePartCase = Standard_False); + + Standard_EXPORT void Perform(const TopoDS_Wire& Spine, + const TopoDS_Shape& Profile, + const Standard_Boolean GeneratePartCase = Standard_False); + Standard_EXPORT const TopoDS_Shape& Spine() const; - + Standard_EXPORT const TopoDS_Shape& Profile() const; - + Standard_EXPORT const TopoDS_Shape& Shape() const; - + Standard_EXPORT Standard_Real ErrorOnSurface() const; - + Standard_EXPORT const TopoDS_Shape& FirstShape() const; - + Standard_EXPORT const TopoDS_Shape& LastShape() const; - + //! Returns the list of shapes generated from the //! shape . - Standard_EXPORT void Generated (const TopoDS_Shape& S, TopTools_ListOfShape& L); - + Standard_EXPORT void Generated(const TopoDS_Shape& S, TopTools_ListOfShape& L); + //! Returns the face created from an edge of the spine //! and an edge of the profile. //! if the edges are not in the spine or the profile - Standard_EXPORT TopoDS_Face Face (const TopoDS_Edge& ESpine, const TopoDS_Edge& EProfile); - + Standard_EXPORT TopoDS_Face Face(const TopoDS_Edge& ESpine, const TopoDS_Edge& EProfile); + //! Returns the edge created from an edge of the spine //! and a vertex of the profile. //! if the edge or the vertex are not in the spine or //! the profile. - Standard_EXPORT TopoDS_Edge Edge (const TopoDS_Edge& ESpine, const TopoDS_Vertex& VProfile); - + Standard_EXPORT TopoDS_Edge Edge(const TopoDS_Edge& ESpine, const TopoDS_Vertex& VProfile); + //! Returns the shape created from the profile at the //! position of the vertex VSpine. //! if the vertex is not in the Spine - Standard_EXPORT TopoDS_Shape Section (const TopoDS_Vertex& VSpine) const; - + Standard_EXPORT TopoDS_Shape Section(const TopoDS_Vertex& VSpine) const; + //! Create a Wire by sweeping the Point along the //! if the is undefined - Standard_EXPORT TopoDS_Wire PipeLine (const gp_Pnt& Point); - - - + Standard_EXPORT TopoDS_Wire PipeLine(const gp_Pnt& Point); protected: - - - - - private: - - //! Auxiliary recursive method used to build the //! result. - Standard_EXPORT TopoDS_Shape MakeShape (const TopoDS_Shape& S, - const TopoDS_Shape& theOriginalS, - const TopoDS_Shape& FirstShape, - const TopoDS_Shape& LastShape); - - //! Auxiliary recursive method used to find the edge's index - Standard_EXPORT Standard_Integer FindEdge (const TopoDS_Shape& S, - const TopoDS_Edge& E, - Standard_Integer& Init) const; - - Standard_EXPORT Standard_Integer FindVertex (const TopoDS_Shape& S, const - TopoDS_Vertex& V, - Standard_Integer& Init) const; - - Standard_EXPORT void DefineRealSegmax(); - - Standard_EXPORT void RebuildTopOrBottomFace (const TopoDS_Shape& aFace, - const Standard_Boolean IsTop) const; - - Standard_EXPORT void BuildHistory (const BRepFill_Sweep& theSweep, - const TopoDS_Shape& theSection); - - - TopoDS_Wire mySpine; - TopoDS_Shape myProfile; - TopoDS_Shape myShape; - gp_Trsf myTrsf; - Handle(BRepFill_LocationLaw) myLoc; - Handle(TopTools_HArray2OfShape) mySections; - Handle(TopTools_HArray2OfShape) myFaces; - Handle(TopTools_HArray2OfShape) myEdges; - TopTools_MapOfShape myReversedEdges; - BRepFill_DataMapOfShapeHArray2OfShape myTapes; - BRepFill_DataMapOfShapeHArray2OfShape myRails; - Standard_Integer myCurIndexOfSectionEdge; - TopoDS_Shape myFirst; - TopoDS_Shape myLast; - TopTools_DataMapOfShapeListOfShape myGenMap; - Standard_Integer myDegmax; - Standard_Integer mySegmax; - GeomAbs_Shape myContinuity; - GeomFill_Trihedron myMode; - Standard_Boolean myForceApproxC1; - Standard_Real myErrorOnSurf; - - -}; + Standard_EXPORT TopoDS_Shape MakeShape(const TopoDS_Shape& S, + const TopoDS_Shape& theOriginalS, + const TopoDS_Shape& FirstShape, + const TopoDS_Shape& LastShape); + //! Auxiliary recursive method used to find the edge's index + Standard_EXPORT Standard_Integer FindEdge(const TopoDS_Shape& S, + const TopoDS_Edge& E, + Standard_Integer& Init) const; + Standard_EXPORT Standard_Integer FindVertex(const TopoDS_Shape& S, + const TopoDS_Vertex& V, + Standard_Integer& Init) const; + Standard_EXPORT void DefineRealSegmax(); + Standard_EXPORT void RebuildTopOrBottomFace(const TopoDS_Shape& aFace, + const Standard_Boolean IsTop) const; + Standard_EXPORT void BuildHistory(const BRepFill_Sweep& theSweep, const TopoDS_Shape& theSection); + TopoDS_Wire mySpine; + TopoDS_Shape myProfile; + TopoDS_Shape myShape; + gp_Trsf myTrsf; + Handle(BRepFill_LocationLaw) myLoc; + Handle(TopTools_HArray2OfShape) mySections; + Handle(TopTools_HArray2OfShape) myFaces; + Handle(TopTools_HArray2OfShape) myEdges; + TopTools_MapOfShape myReversedEdges; + BRepFill_DataMapOfShapeHArray2OfShape myTapes; + BRepFill_DataMapOfShapeHArray2OfShape myRails; + Standard_Integer myCurIndexOfSectionEdge; + TopoDS_Shape myFirst; + TopoDS_Shape myLast; + TopTools_DataMapOfShapeListOfShape myGenMap; + Standard_Integer myDegmax; + Standard_Integer mySegmax; + GeomAbs_Shape myContinuity; + GeomFill_Trihedron myMode; + Standard_Boolean myForceApproxC1; + Standard_Real myErrorOnSurf; +}; #endif // _BRepFill_Pipe_HeaderFile diff --git a/opencascade/BRepFill_PipeShell.hxx b/opencascade/BRepFill_PipeShell.hxx index 3ff08b460..f4eb55fc5 100644 --- a/opencascade/BRepFill_PipeShell.hxx +++ b/opencascade/BRepFill_PipeShell.hxx @@ -43,45 +43,42 @@ class TopoDS_Vertex; class gp_Trsf; class BRepFill_Sweep; - class BRepFill_PipeShell; DEFINE_STANDARD_HANDLE(BRepFill_PipeShell, Standard_Transient) //! Computes a topological shell using some wires -//! (spines and profiles) and diplacement option +//! (spines and profiles) and displacement option //! Perform general sweeping construction class BRepFill_PipeShell : public Standard_Transient { public: - - //! Set an sweep's mode //! If no mode are set, the mode used in MakePipe is used Standard_EXPORT BRepFill_PipeShell(const TopoDS_Wire& Spine); - + //! Set an Frenet or an CorrectedFrenet trihedron //! to perform the sweeping - Standard_EXPORT void Set (const Standard_Boolean Frenet = Standard_False); - + Standard_EXPORT void Set(const Standard_Boolean Frenet = Standard_False); + //! Set a Discrete trihedron //! to perform the sweeping Standard_EXPORT void SetDiscrete(); - + //! Set an fixed trihedron to perform the sweeping //! all sections will be parallel. - Standard_EXPORT void Set (const gp_Ax2& Axe); - + Standard_EXPORT void Set(const gp_Ax2& Axe); + //! Set an fixed BiNormal direction to perform //! the sweeping - Standard_EXPORT void Set (const gp_Dir& BiNormal); - + Standard_EXPORT void Set(const gp_Dir& BiNormal); + //! Set support to the spine to define the BiNormal //! at the spine, like the normal the surfaces. //! Warning: To be effective, Each edge of the must //! have an representation on one face of - Standard_EXPORT Standard_Boolean Set (const TopoDS_Shape& SpineSupport); - + Standard_EXPORT Standard_Boolean Set(const TopoDS_Shape& SpineSupport); + //! Set an auxiliary spine to define the Normal //! For each Point of the Spine P, an Point Q is evalued //! on @@ -102,78 +99,98 @@ public: //! If equals BRepFill_ContactOnBorder: The auxiliary spine //! becomes a boundary of the swept surface and the width of section varies //! along the path. - Standard_EXPORT void Set (const TopoDS_Wire& AuxiliarySpine, const Standard_Boolean CurvilinearEquivalence = Standard_True, const BRepFill_TypeOfContact KeepContact = BRepFill_NoContact); - + Standard_EXPORT void Set(const TopoDS_Wire& AuxiliarySpine, + const Standard_Boolean CurvilinearEquivalence = Standard_True, + const BRepFill_TypeOfContact KeepContact = BRepFill_NoContact); + //! Define the maximum V degree of resulting surface - Standard_EXPORT void SetMaxDegree (const Standard_Integer NewMaxDegree); - + Standard_EXPORT void SetMaxDegree(const Standard_Integer NewMaxDegree); + //! Define the maximum number of spans in V-direction //! on resulting surface - Standard_EXPORT void SetMaxSegments (const Standard_Integer NewMaxSegments); - + Standard_EXPORT void SetMaxSegments(const Standard_Integer NewMaxSegments); + //! Set the flag that indicates attempt to approximate //! a C1-continuous surface if a swept surface proved //! to be C0. //! Give section to sweep. //! Possibilities are : - //! - Give one or sevral profile + //! - Give one or several profile //! - Give one profile and an homotetic law. //! - Automatic compute of correspondence between profile, and section on the sweeped shape - //! - correspondence between profile, and section on the sweeped shape defined by a vertex of the spine - Standard_EXPORT void SetForceApproxC1 (const Standard_Boolean ForceApproxC1); + //! - correspondence between profile, and section on the sweeped shape defined by a vertex of the + //! spine + Standard_EXPORT void SetForceApproxC1(const Standard_Boolean ForceApproxC1); //! Set an section. The correspondence with the spine, will be automatically performed. - Standard_EXPORT void Add (const TopoDS_Shape& Profile, const Standard_Boolean WithContact = Standard_False, const Standard_Boolean WithCorrection = Standard_False); + Standard_EXPORT void Add(const TopoDS_Shape& Profile, + const Standard_Boolean WithContact = Standard_False, + const Standard_Boolean WithCorrection = Standard_False); //! Set an section. The correspondence with the spine, is given by Location. - Standard_EXPORT void Add (const TopoDS_Shape& Profile, const TopoDS_Vertex& Location, const Standard_Boolean WithContact = Standard_False, const Standard_Boolean WithCorrection = Standard_False); - + Standard_EXPORT void Add(const TopoDS_Shape& Profile, + const TopoDS_Vertex& Location, + const Standard_Boolean WithContact = Standard_False, + const Standard_Boolean WithCorrection = Standard_False); + //! Set an section and an homotetic law. //! The homotetie's centers is given by point on the . - Standard_EXPORT void SetLaw (const TopoDS_Shape& Profile, const Handle(Law_Function)& L, const Standard_Boolean WithContact = Standard_False, const Standard_Boolean WithCorrection = Standard_False); - + Standard_EXPORT void SetLaw(const TopoDS_Shape& Profile, + const Handle(Law_Function)& L, + const Standard_Boolean WithContact = Standard_False, + const Standard_Boolean WithCorrection = Standard_False); + //! Set an section and an homotetic law. //! The homotetie center is given by point on the - Standard_EXPORT void SetLaw (const TopoDS_Shape& Profile, const Handle(Law_Function)& L, const TopoDS_Vertex& Location, const Standard_Boolean WithContact = Standard_False, const Standard_Boolean WithCorrection = Standard_False); - + Standard_EXPORT void SetLaw(const TopoDS_Shape& Profile, + const Handle(Law_Function)& L, + const TopoDS_Vertex& Location, + const Standard_Boolean WithContact = Standard_False, + const Standard_Boolean WithCorrection = Standard_False); + //! Delete an section. - Standard_EXPORT void DeleteProfile (const TopoDS_Shape& Profile); - + Standard_EXPORT void DeleteProfile(const TopoDS_Shape& Profile); + //! Say if is ready to build the shape //! return False if do not have section definition Standard_EXPORT Standard_Boolean IsReady() const; - + //! Get a status, when Simulate or Build failed. Standard_EXPORT GeomFill_PipeError GetStatus() const; - - Standard_EXPORT void SetTolerance (const Standard_Real Tol3d = 1.0e-4, const Standard_Real BoundTol = 1.0e-4, const Standard_Real TolAngular = 1.0e-2); - + + Standard_EXPORT void SetTolerance(const Standard_Real Tol3d = 1.0e-4, + const Standard_Real BoundTol = 1.0e-4, + const Standard_Real TolAngular = 1.0e-2); + //! Set the Transition Mode to manage discontinuities //! on the sweep. - Standard_EXPORT void SetTransition (const BRepFill_TransitionStyle Mode = BRepFill_Modified, const Standard_Real Angmin = 1.0e-2, const Standard_Real Angmax = 6.0); - + Standard_EXPORT void SetTransition(const BRepFill_TransitionStyle Mode = BRepFill_Modified, + const Standard_Real Angmin = 1.0e-2, + const Standard_Real Angmax = 6.0); + //! Perform simulation of the sweep : - //! Somes Section are returned. - Standard_EXPORT void Simulate (const Standard_Integer NumberOfSection, TopTools_ListOfShape& Sections); - + //! Some Section are returned. + Standard_EXPORT void Simulate(const Standard_Integer NumberOfSection, + TopTools_ListOfShape& Sections); + //! Builds the resulting shape (redefined from MakeShape). Standard_EXPORT Standard_Boolean Build(); - + //! Transform the sweeping Shell in Solid. //! If the section are not closed returns False Standard_EXPORT Standard_Boolean MakeSolid(); - + //! Returns the result Shape. Standard_EXPORT const TopoDS_Shape& Shape() const; - + Standard_EXPORT Standard_Real ErrorOnSurface() const; - + //! Returns the TopoDS Shape of the bottom of the sweep. Standard_EXPORT const TopoDS_Shape& FirstShape() const; - + //! Returns the TopoDS Shape of the top of the sweep. Standard_EXPORT const TopoDS_Shape& LastShape() const; - + //! Returns the list of original profiles void Profiles(TopTools_ListOfShape& theProfiles) { @@ -182,70 +199,53 @@ public: } //! Returns the spine - const TopoDS_Wire& Spine() - { - return mySpine; - } + const TopoDS_Wire& Spine() { return mySpine; } //! Returns the list of shapes generated from the //! shape . - Standard_EXPORT void Generated (const TopoDS_Shape& S, TopTools_ListOfShape& L); - + Standard_EXPORT void Generated(const TopoDS_Shape& S, TopTools_ListOfShape& L); - - - DEFINE_STANDARD_RTTIEXT(BRepFill_PipeShell,Standard_Transient) + DEFINE_STANDARD_RTTIEXT(BRepFill_PipeShell, Standard_Transient) protected: +private: + Standard_EXPORT void Prepare(); + Standard_EXPORT void Place(const BRepFill_Section& Sec, + TopoDS_Wire& W, + gp_Trsf& Trsf, + Standard_Real& param); + Standard_EXPORT void ResetLoc(); + Standard_EXPORT void BuildHistory(const BRepFill_Sweep& theSweep); -private: - - - Standard_EXPORT void Prepare(); - - Standard_EXPORT void Place (const BRepFill_Section& Sec, TopoDS_Wire& W, gp_Trsf& Trsf, Standard_Real& param); - - Standard_EXPORT void ResetLoc(); - - Standard_EXPORT void BuildHistory (const BRepFill_Sweep& theSweep); - - TopoDS_Wire mySpine; - TopoDS_Shape myFirst; - TopoDS_Shape myLast; - TopoDS_Shape myShape; - BRepFill_SequenceOfSection mySeq; - TopTools_SequenceOfShape WSeq; - TColStd_SequenceOfInteger myIndOfSec; + TopoDS_Wire mySpine; + TopoDS_Shape myFirst; + TopoDS_Shape myLast; + TopoDS_Shape myShape; + BRepFill_SequenceOfSection mySeq; + TopTools_SequenceOfShape WSeq; + TColStd_SequenceOfInteger myIndOfSec; TopTools_DataMapOfShapeListOfShape myEdgeNewEdges; TopTools_DataMapOfShapeListOfShape myGenMap; - Standard_Real myTol3d; - Standard_Real myBoundTol; - Standard_Real myTolAngular; - Standard_Real angmin; - Standard_Real angmax; - Standard_Integer myMaxDegree; - Standard_Integer myMaxSegments; - Standard_Boolean myForceApproxC1; - Handle(Law_Function) myLaw; - Standard_Boolean myIsAutomaticLaw; - Handle(BRepFill_LocationLaw) myLocation; - Handle(BRepFill_SectionLaw) mySection; - Handle(TopTools_HArray2OfShape) myFaces; - GeomFill_Trihedron myTrihedron; - BRepFill_TransitionStyle myTransition; - GeomFill_PipeError myStatus; - Standard_Real myErrorOnSurf; - - + Standard_Real myTol3d; + Standard_Real myBoundTol; + Standard_Real myTolAngular; + Standard_Real angmin; + Standard_Real angmax; + Standard_Integer myMaxDegree; + Standard_Integer myMaxSegments; + Standard_Boolean myForceApproxC1; + Handle(Law_Function) myLaw; + Standard_Boolean myIsAutomaticLaw; + Handle(BRepFill_LocationLaw) myLocation; + Handle(BRepFill_SectionLaw) mySection; + Handle(TopTools_HArray2OfShape) myFaces; + GeomFill_Trihedron myTrihedron; + BRepFill_TransitionStyle myTransition; + GeomFill_PipeError myStatus; + Standard_Real myErrorOnSurf; }; - - - - - - #endif // _BRepFill_PipeShell_HeaderFile diff --git a/opencascade/BRepFill_Section.hxx b/opencascade/BRepFill_Section.hxx index b07da5e4c..a41574777 100644 --- a/opencascade/BRepFill_Section.hxx +++ b/opencascade/BRepFill_Section.hxx @@ -23,65 +23,48 @@ #include #include - //! To store section definition -class BRepFill_Section +class BRepFill_Section { public: - DEFINE_STANDARD_ALLOC - Standard_EXPORT BRepFill_Section(); - - Standard_EXPORT BRepFill_Section(const TopoDS_Shape& Profile, const TopoDS_Vertex& V, const Standard_Boolean WithContact, const Standard_Boolean WithCorrection); - - Standard_EXPORT void Set (const Standard_Boolean IsLaw); - - const TopoDS_Shape& OriginalShape() const; - - const TopoDS_Wire& Wire() const; - - const TopoDS_Vertex& Vertex() const; - - Standard_EXPORT TopoDS_Shape ModifiedShape(const TopoDS_Shape& theShape) const; - - Standard_Boolean IsLaw() const; - - Standard_Boolean IsPunctual() const; - - Standard_Boolean WithContact() const; - - Standard_Boolean WithCorrection() const; - + Standard_EXPORT BRepFill_Section(const TopoDS_Shape& Profile, + const TopoDS_Vertex& V, + const Standard_Boolean WithContact, + const Standard_Boolean WithCorrection); + Standard_EXPORT void Set(const Standard_Boolean IsLaw); -protected: + const TopoDS_Shape& OriginalShape() const; + const TopoDS_Wire& Wire() const; + const TopoDS_Vertex& Vertex() const; + Standard_EXPORT TopoDS_Shape ModifiedShape(const TopoDS_Shape& theShape) const; + Standard_Boolean IsLaw() const; -private: + Standard_Boolean IsPunctual() const; + Standard_Boolean WithContact() const; + Standard_Boolean WithCorrection() const; - TopoDS_Shape myOriginalShape; - TopoDS_Wire wire; - TopoDS_Vertex vertex; +protected: +private: + TopoDS_Shape myOriginalShape; + TopoDS_Wire wire; + TopoDS_Vertex vertex; Standard_Boolean islaw; Standard_Boolean ispunctual; Standard_Boolean contact; Standard_Boolean correction; - }; - #include - - - - #endif // _BRepFill_Section_HeaderFile diff --git a/opencascade/BRepFill_Section.lxx b/opencascade/BRepFill_Section.lxx index c96eaec01..99d547109 100644 --- a/opencascade/BRepFill_Section.lxx +++ b/opencascade/BRepFill_Section.lxx @@ -16,36 +16,35 @@ inline const TopoDS_Shape& BRepFill_Section::OriginalShape() const { - return myOriginalShape; + return myOriginalShape; } inline const TopoDS_Wire& BRepFill_Section::Wire() const { - return wire; + return wire; } inline const TopoDS_Vertex& BRepFill_Section::Vertex() const { - return vertex; + return vertex; } -inline Standard_Boolean BRepFill_Section::IsLaw() const +inline Standard_Boolean BRepFill_Section::IsLaw() const { return islaw; } -inline Standard_Boolean BRepFill_Section::IsPunctual() const +inline Standard_Boolean BRepFill_Section::IsPunctual() const { return ispunctual; } -inline Standard_Boolean BRepFill_Section::WithContact() const +inline Standard_Boolean BRepFill_Section::WithContact() const { return contact; } -inline Standard_Boolean BRepFill_Section::WithCorrection() const +inline Standard_Boolean BRepFill_Section::WithCorrection() const { return correction; } - diff --git a/opencascade/BRepFill_SectionLaw.hxx b/opencascade/BRepFill_SectionLaw.hxx index 8e08fe6a9..91ef7531a 100644 --- a/opencascade/BRepFill_SectionLaw.hxx +++ b/opencascade/BRepFill_SectionLaw.hxx @@ -40,66 +40,51 @@ class BRepFill_SectionLaw : public Standard_Transient { public: - - Standard_EXPORT Standard_Integer NbLaw() const; - - Standard_EXPORT const Handle(GeomFill_SectionLaw)& Law (const Standard_Integer Index) const; - + + Standard_EXPORT const Handle(GeomFill_SectionLaw)& Law(const Standard_Integer Index) const; + Standard_EXPORT Standard_Integer IndexOfEdge(const TopoDS_Shape& anEdge) const; - + Standard_EXPORT virtual Standard_Boolean IsConstant() const = 0; - + Standard_EXPORT Standard_Boolean IsUClosed() const; - + Standard_EXPORT Standard_Boolean IsVClosed() const; - + Standard_EXPORT Standard_Boolean IsDone() const; - + //! Say if the input shape is a vertex. Standard_EXPORT virtual Standard_Boolean IsVertex() const = 0; - + Standard_EXPORT virtual Handle(GeomFill_SectionLaw) ConcatenedLaw() const = 0; - - Standard_EXPORT virtual GeomAbs_Shape Continuity (const Standard_Integer Index, const Standard_Real TolAngular) const = 0; - - Standard_EXPORT virtual Standard_Real VertexTol (const Standard_Integer Index, const Standard_Real Param) const = 0; - - Standard_EXPORT virtual TopoDS_Vertex Vertex (const Standard_Integer Index, const Standard_Real Param) const = 0; - - Standard_EXPORT virtual void D0 (const Standard_Real U, TopoDS_Shape& S) = 0; - - Standard_EXPORT void Init (const TopoDS_Wire& W); - - Standard_EXPORT TopoDS_Edge CurrentEdge(); + Standard_EXPORT virtual GeomAbs_Shape Continuity(const Standard_Integer Index, + const Standard_Real TolAngular) const = 0; + Standard_EXPORT virtual Standard_Real VertexTol(const Standard_Integer Index, + const Standard_Real Param) const = 0; + Standard_EXPORT virtual TopoDS_Vertex Vertex(const Standard_Integer Index, + const Standard_Real Param) const = 0; - DEFINE_STANDARD_RTTIEXT(BRepFill_SectionLaw,Standard_Transient) + Standard_EXPORT virtual void D0(const Standard_Real U, TopoDS_Shape& S) = 0; -protected: + Standard_EXPORT void Init(const TopoDS_Wire& W); + Standard_EXPORT TopoDS_Edge CurrentEdge(); - Handle(GeomFill_HArray1OfSectionLaw) myLaws; - Standard_Boolean uclosed; - Standard_Boolean vclosed; - Standard_Boolean myDone; - TopTools_DataMapOfShapeInteger myIndices; + DEFINE_STANDARD_RTTIEXT(BRepFill_SectionLaw, Standard_Transient) +protected: + Handle(GeomFill_HArray1OfSectionLaw) myLaws; + Standard_Boolean uclosed; + Standard_Boolean vclosed; + Standard_Boolean myDone; + TopTools_DataMapOfShapeInteger myIndices; private: - - BRepTools_WireExplorer myIterator; - - }; - - - - - - #endif // _BRepFill_SectionLaw_HeaderFile diff --git a/opencascade/BRepFill_SectionPlacement.hxx b/opencascade/BRepFill_SectionPlacement.hxx index aafc11761..3ec2b8821 100644 --- a/opencascade/BRepFill_SectionPlacement.hxx +++ b/opencascade/BRepFill_SectionPlacement.hxx @@ -26,53 +26,40 @@ #include class BRepFill_LocationLaw; - //! Place a shape in a local axis coordinate -class BRepFill_SectionPlacement +class BRepFill_SectionPlacement { public: - DEFINE_STANDARD_ALLOC - //! Automatic placement - Standard_EXPORT BRepFill_SectionPlacement(const Handle(BRepFill_LocationLaw)& Law, const TopoDS_Shape& Section, const Standard_Boolean WithContact = Standard_False, const Standard_Boolean WithCorrection = Standard_False); - - //! Placement on vertex - Standard_EXPORT BRepFill_SectionPlacement(const Handle(BRepFill_LocationLaw)& Law, const TopoDS_Shape& Section, const TopoDS_Shape& Vertex, const Standard_Boolean WithContact = Standard_False, const Standard_Boolean WithCorrection = Standard_False); - - Standard_EXPORT const gp_Trsf& Transformation() const; - - Standard_EXPORT Standard_Real AbscissaOnPath(); + Standard_EXPORT BRepFill_SectionPlacement(const Handle(BRepFill_LocationLaw)& Law, + const TopoDS_Shape& Section, + const Standard_Boolean WithContact = Standard_False, + const Standard_Boolean WithCorrection = Standard_False); + //! Placement on vertex + Standard_EXPORT BRepFill_SectionPlacement(const Handle(BRepFill_LocationLaw)& Law, + const TopoDS_Shape& Section, + const TopoDS_Shape& Vertex, + const Standard_Boolean WithContact = Standard_False, + const Standard_Boolean WithCorrection = Standard_False); + Standard_EXPORT const gp_Trsf& Transformation() const; + Standard_EXPORT Standard_Real AbscissaOnPath(); protected: - - - - - private: - - - Standard_EXPORT void Perform (const Standard_Boolean WithContact, const Standard_Boolean WithCorrection, const TopoDS_Shape& Vertex); - + Standard_EXPORT void Perform(const Standard_Boolean WithContact, + const Standard_Boolean WithCorrection, + const TopoDS_Shape& Vertex); Handle(BRepFill_LocationLaw) myLaw; - TopoDS_Shape mySection; - gp_Trsf myTrsf; - Standard_Real myParam; - Standard_Integer myIndex; - - + TopoDS_Shape mySection; + gp_Trsf myTrsf; + Standard_Real myParam; + Standard_Integer myIndex; }; - - - - - - #endif // _BRepFill_SectionPlacement_HeaderFile diff --git a/opencascade/BRepFill_SequenceOfEdgeFaceAndOrder.hxx b/opencascade/BRepFill_SequenceOfEdgeFaceAndOrder.hxx index b36c5cf04..a65069aa3 100644 --- a/opencascade/BRepFill_SequenceOfEdgeFaceAndOrder.hxx +++ b/opencascade/BRepFill_SequenceOfEdgeFaceAndOrder.hxx @@ -22,5 +22,4 @@ typedef NCollection_Sequence BRepFill_SequenceOfEdgeFaceAndOrder; - #endif diff --git a/opencascade/BRepFill_SequenceOfFaceAndOrder.hxx b/opencascade/BRepFill_SequenceOfFaceAndOrder.hxx index 7dc40bde4..e8214f706 100644 --- a/opencascade/BRepFill_SequenceOfFaceAndOrder.hxx +++ b/opencascade/BRepFill_SequenceOfFaceAndOrder.hxx @@ -22,5 +22,4 @@ typedef NCollection_Sequence BRepFill_SequenceOfFaceAndOrder; - #endif diff --git a/opencascade/BRepFill_SequenceOfSection.hxx b/opencascade/BRepFill_SequenceOfSection.hxx index fd749d70e..160c0e149 100644 --- a/opencascade/BRepFill_SequenceOfSection.hxx +++ b/opencascade/BRepFill_SequenceOfSection.hxx @@ -22,5 +22,4 @@ typedef NCollection_Sequence BRepFill_SequenceOfSection; - #endif diff --git a/opencascade/BRepFill_ShapeLaw.hxx b/opencascade/BRepFill_ShapeLaw.hxx index 9eaa4e47c..1721b97af 100644 --- a/opencascade/BRepFill_ShapeLaw.hxx +++ b/opencascade/BRepFill_ShapeLaw.hxx @@ -31,7 +31,6 @@ class TopoDS_Wire; class GeomFill_SectionLaw; class TopoDS_Edge; - class BRepFill_ShapeLaw; DEFINE_STANDARD_HANDLE(BRepFill_ShapeLaw, BRepFill_SectionLaw) @@ -40,64 +39,56 @@ class BRepFill_ShapeLaw : public BRepFill_SectionLaw { public: - - //! Construct an constant Law - Standard_EXPORT BRepFill_ShapeLaw(const TopoDS_Vertex& V, const Standard_Boolean Build = Standard_True); - + Standard_EXPORT BRepFill_ShapeLaw(const TopoDS_Vertex& V, + const Standard_Boolean Build = Standard_True); + //! Construct an constant Law - Standard_EXPORT BRepFill_ShapeLaw(const TopoDS_Wire& W, const Standard_Boolean Build = Standard_True); - + Standard_EXPORT BRepFill_ShapeLaw(const TopoDS_Wire& W, + const Standard_Boolean Build = Standard_True); + //! Construct an evolutive Law - Standard_EXPORT BRepFill_ShapeLaw(const TopoDS_Wire& W, const Handle(Law_Function)& L, const Standard_Boolean Build = Standard_True); - + Standard_EXPORT BRepFill_ShapeLaw(const TopoDS_Wire& W, + const Handle(Law_Function)& L, + const Standard_Boolean Build = Standard_True); + //! Say if the input shape is a vertex. Standard_EXPORT virtual Standard_Boolean IsVertex() const Standard_OVERRIDE; - + //! Say if the Law is Constant. Standard_EXPORT virtual Standard_Boolean IsConstant() const Standard_OVERRIDE; - + //! Give the law build on a concatenated section Standard_EXPORT virtual Handle(GeomFill_SectionLaw) ConcatenedLaw() const Standard_OVERRIDE; - - Standard_EXPORT virtual GeomAbs_Shape Continuity (const Standard_Integer Index, const Standard_Real TolAngular) const Standard_OVERRIDE; - - Standard_EXPORT virtual Standard_Real VertexTol (const Standard_Integer Index, const Standard_Real Param) const Standard_OVERRIDE; - - Standard_EXPORT virtual TopoDS_Vertex Vertex (const Standard_Integer Index, const Standard_Real Param) const Standard_OVERRIDE; - - Standard_EXPORT virtual void D0 (const Standard_Real Param, TopoDS_Shape& S) Standard_OVERRIDE; - - const TopoDS_Edge& Edge (const Standard_Integer Index) const; + Standard_EXPORT virtual GeomAbs_Shape Continuity(const Standard_Integer Index, + const Standard_Real TolAngular) const + Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Real VertexTol(const Standard_Integer Index, + const Standard_Real Param) const + Standard_OVERRIDE; + Standard_EXPORT virtual TopoDS_Vertex Vertex(const Standard_Integer Index, + const Standard_Real Param) const Standard_OVERRIDE; - DEFINE_STANDARD_RTTIEXT(BRepFill_ShapeLaw,BRepFill_SectionLaw) + Standard_EXPORT virtual void D0(const Standard_Real Param, TopoDS_Shape& S) Standard_OVERRIDE; -protected: + const TopoDS_Edge& Edge(const Standard_Integer Index) const; + DEFINE_STANDARD_RTTIEXT(BRepFill_ShapeLaw, BRepFill_SectionLaw) +protected: Standard_Boolean vertex; - private: + Standard_EXPORT void Init(const Standard_Boolean B); - - Standard_EXPORT void Init (const Standard_Boolean B); - - TopoDS_Shape myShape; + TopoDS_Shape myShape; Handle(TopTools_HArray1OfShape) myEdges; - Handle(Law_Function) TheLaw; - - + Handle(Law_Function) TheLaw; }; - #include - - - - #endif // _BRepFill_ShapeLaw_HeaderFile diff --git a/opencascade/BRepFill_ShapeLaw.lxx b/opencascade/BRepFill_ShapeLaw.lxx index 693017359..df30771c2 100644 --- a/opencascade/BRepFill_ShapeLaw.lxx +++ b/opencascade/BRepFill_ShapeLaw.lxx @@ -18,11 +18,10 @@ #include //======================================================================= -//function : Edge -//purpose : +// function : Edge +// purpose : //======================================================================= -inline const TopoDS_Edge& - BRepFill_ShapeLaw::Edge(const Standard_Integer Index) const +inline const TopoDS_Edge& BRepFill_ShapeLaw::Edge(const Standard_Integer Index) const { return TopoDS::Edge(myEdges->Value(Index)); } diff --git a/opencascade/BRepFill_Sweep.hxx b/opencascade/BRepFill_Sweep.hxx index 24979e63e..ad9417b12 100644 --- a/opencascade/BRepFill_Sweep.hxx +++ b/opencascade/BRepFill_Sweep.hxx @@ -35,21 +35,20 @@ class BRepFill_LocationLaw; class BRepFill_SectionLaw; class TopoDS_Edge; - //! Topological Sweep Algorithm //! Computes an Sweep shell using a generating //! wire, an SectionLaw and an LocationLaw. -class BRepFill_Sweep +class BRepFill_Sweep { public: - DEFINE_STANDARD_ALLOC - - Standard_EXPORT BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section, const Handle(BRepFill_LocationLaw)& Location, const Standard_Boolean WithKPart); - - Standard_EXPORT void SetBounds (const TopoDS_Wire& FirstShape, const TopoDS_Wire& LastShape); - + Standard_EXPORT BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section, + const Handle(BRepFill_LocationLaw)& Location, + const Standard_Boolean WithKPart); + + Standard_EXPORT void SetBounds(const TopoDS_Wire& FirstShape, const TopoDS_Wire& LastShape); + //! Set Approximation Tolerance //! Tol3d : Tolerance to surface approximation //! Tol2d : Tolerance used to perform curve approximation @@ -59,26 +58,30 @@ public: //! TolAngular : Tolerance (in radian) to control the angle //! between tangents on the section law and //! tangent of iso-v on approximated surface - Standard_EXPORT void SetTolerance (const Standard_Real Tol3d, const Standard_Real BoundTol = 1.0, const Standard_Real Tol2d = 1.0e-5, const Standard_Real TolAngular = 1.0e-2); - + Standard_EXPORT void SetTolerance(const Standard_Real Tol3d, + const Standard_Real BoundTol = 1.0, + const Standard_Real Tol2d = 1.0e-5, + const Standard_Real TolAngular = 1.0e-2); + //! Tolerance To controle Corner management. //! //! If the discontinuity is lesser than in radian The - //! Transition Performed will be alway "Modified" - Standard_EXPORT void SetAngularControl (const Standard_Real AngleMin = 0.01, const Standard_Real AngleMax = 6.0); - + //! Transition Performed will be always "Modified" + Standard_EXPORT void SetAngularControl(const Standard_Real AngleMin = 0.01, + const Standard_Real AngleMax = 6.0); + //! Set the flag that indicates attempt to approximate //! a C1-continuous surface if a swept surface proved //! to be C0. - Standard_EXPORT void SetForceApproxC1 (const Standard_Boolean ForceApproxC1); - - //! Build the Sweep Surface + Standard_EXPORT void SetForceApproxC1(const Standard_Boolean ForceApproxC1); + + //! Build the Sweep Surface //! Transition define Transition strategy //! Approx define Approximation Strategy //! - GeomFill_Section : The composed Function Location X Section //! is directly approximated. //! - GeomFill_Location : The location law is approximated, and the - //! SweepSurface is bulid algebric composition + //! SweepSurface builds an algebraic composition //! of approximated location law and section law //! This option is Ok, if Section.Surface() methode //! is effective. @@ -86,86 +89,92 @@ public: //! Degmax : The maximum degree in v required on the surface //! Segmax : The maximum number of span in v required on //! the surface. - Standard_EXPORT void Build (TopTools_MapOfShape& ReversedEdges, BRepFill_DataMapOfShapeHArray2OfShape& Tapes, BRepFill_DataMapOfShapeHArray2OfShape& Rails, const BRepFill_TransitionStyle Transition = BRepFill_Modified, const GeomAbs_Shape Continuity = GeomAbs_C2, const GeomFill_ApproxStyle Approx = GeomFill_Location, const Standard_Integer Degmax = 11, const Standard_Integer Segmax = 30); - + Standard_EXPORT void Build(TopTools_MapOfShape& ReversedEdges, + BRepFill_DataMapOfShapeHArray2OfShape& Tapes, + BRepFill_DataMapOfShapeHArray2OfShape& Rails, + const BRepFill_TransitionStyle Transition = BRepFill_Modified, + const GeomAbs_Shape Continuity = GeomAbs_C2, + const GeomFill_ApproxStyle Approx = GeomFill_Location, + const Standard_Integer Degmax = 11, + const Standard_Integer Segmax = 30); + //! Say if the Shape is Build. Standard_EXPORT Standard_Boolean IsDone() const; - + //! returns the Sweeping Shape Standard_EXPORT TopoDS_Shape Shape() const; - + //! Get the Approximation error. Standard_EXPORT Standard_Real ErrorOnSurface() const; - + Standard_EXPORT Handle(TopTools_HArray2OfShape) SubShape() const; - + Standard_EXPORT Handle(TopTools_HArray2OfShape) InterFaces() const; - + Standard_EXPORT Handle(TopTools_HArray2OfShape) Sections() const; //! returns the Tape corresponding to Index-th edge of section Standard_EXPORT TopoDS_Shape Tape(const Standard_Integer Index) const; +protected: + Standard_EXPORT Standard_Boolean CorrectApproxParameters(); + Standard_EXPORT Standard_Boolean BuildWire(const BRepFill_TransitionStyle Transition); -protected: + Standard_EXPORT Standard_Boolean BuildShell(const BRepFill_TransitionStyle Transition, + const Standard_Integer Vf, + const Standard_Integer Vl, + TopTools_MapOfShape& ReversedEdges, + BRepFill_DataMapOfShapeHArray2OfShape& Tapes, + BRepFill_DataMapOfShapeHArray2OfShape& Rails, + const Standard_Real ExtendFirst = 0.0, + const Standard_Real ExtendLast = 0.0); - Standard_EXPORT Standard_Boolean CorrectApproxParameters(); - - Standard_EXPORT Standard_Boolean BuildWire (const BRepFill_TransitionStyle Transition); - - Standard_EXPORT Standard_Boolean BuildShell (const BRepFill_TransitionStyle Transition, const Standard_Integer Vf, const Standard_Integer Vl, TopTools_MapOfShape& ReversedEdges, BRepFill_DataMapOfShapeHArray2OfShape& Tapes, BRepFill_DataMapOfShapeHArray2OfShape& Rails, const Standard_Real ExtendFirst = 0.0, const Standard_Real ExtendLast = 0.0); - - Standard_EXPORT Standard_Boolean PerformCorner (const Standard_Integer Index, const BRepFill_TransitionStyle Transition, const Handle(TopTools_HArray2OfShape)& Bounds); - - Standard_EXPORT Standard_Real EvalExtrapol (const Standard_Integer Index, const BRepFill_TransitionStyle Transition) const; - - Standard_EXPORT Standard_Boolean MergeVertex (const TopoDS_Shape& V1, TopoDS_Shape& V2) const; - - Standard_EXPORT void UpdateVertex (const Standard_Integer Ipath, const Standard_Integer Isec, const Standard_Real Error, const Standard_Real Param, TopoDS_Shape& V) const; - - Standard_EXPORT void RebuildTopOrBottomEdge (const TopoDS_Edge& aNewEdge, TopoDS_Edge& anEdge, TopTools_MapOfShape& ReversedEdges) const; + Standard_EXPORT Standard_Boolean PerformCorner(const Standard_Integer Index, + const BRepFill_TransitionStyle Transition, + const Handle(TopTools_HArray2OfShape)& Bounds); + Standard_EXPORT Standard_Real EvalExtrapol(const Standard_Integer Index, + const BRepFill_TransitionStyle Transition) const; + Standard_EXPORT Standard_Boolean MergeVertex(const TopoDS_Shape& V1, TopoDS_Shape& V2) const; + Standard_EXPORT void UpdateVertex(const Standard_Integer Ipath, + const Standard_Integer Isec, + const Standard_Real Error, + const Standard_Real Param, + TopoDS_Shape& V) const; -private: + Standard_EXPORT void RebuildTopOrBottomEdge(const TopoDS_Edge& aNewEdge, + TopoDS_Edge& anEdge, + TopTools_MapOfShape& ReversedEdges) const; - - - - Standard_Boolean isDone; - Standard_Boolean KPart; - Standard_Real myTol3d; - Standard_Real myBoundTol; - Standard_Real myTol2d; - Standard_Real myTolAngular; - Standard_Real myAngMin; - Standard_Real myAngMax; - GeomFill_ApproxStyle myApproxStyle; - GeomAbs_Shape myContinuity; - Standard_Integer myDegmax; - Standard_Integer mySegmax; - Standard_Boolean myForceApproxC1; - TopoDS_Shape myShape; - Handle(BRepFill_LocationLaw) myLoc; - Handle(BRepFill_SectionLaw) mySec; +private: + Standard_Boolean isDone; + Standard_Boolean KPart; + Standard_Real myTol3d; + Standard_Real myBoundTol; + Standard_Real myTol2d; + Standard_Real myTolAngular; + Standard_Real myAngMin; + Standard_Real myAngMax; + GeomFill_ApproxStyle myApproxStyle; + GeomAbs_Shape myContinuity; + Standard_Integer myDegmax; + Standard_Integer mySegmax; + Standard_Boolean myForceApproxC1; + TopoDS_Shape myShape; + Handle(BRepFill_LocationLaw) myLoc; + Handle(BRepFill_SectionLaw) mySec; Handle(TopTools_HArray2OfShape) myUEdges; Handle(TopTools_HArray2OfShape) myVEdges; - TopTools_DataMapOfShapeShape myVEdgesModified; + TopTools_DataMapOfShapeShape myVEdgesModified; Handle(TopTools_HArray2OfShape) myFaces; - TopTools_ListOfShape myAuxShape; + TopTools_ListOfShape myAuxShape; Handle(TopTools_HArray1OfShape) myTapes; - Standard_Real Error; - TopoDS_Wire FirstShape; - TopoDS_Wire LastShape; - + Standard_Real Error; + TopoDS_Wire FirstShape; + TopoDS_Wire LastShape; }; - - - - - - #endif // _BRepFill_Sweep_HeaderFile diff --git a/opencascade/BRepFill_ThruSectionErrorStatus.hxx b/opencascade/BRepFill_ThruSectionErrorStatus.hxx index 4700b2a93..f682e8a6f 100644 --- a/opencascade/BRepFill_ThruSectionErrorStatus.hxx +++ b/opencascade/BRepFill_ThruSectionErrorStatus.hxx @@ -17,13 +17,14 @@ //! Errors that can occur at thrusection algorithm. enum BRepFill_ThruSectionErrorStatus { - BRepFill_ThruSectionErrorStatus_Done, //!< Thrusection algorithm is done - BRepFill_ThruSectionErrorStatus_NotDone, //!< Thrusection algorithm is not done - BRepFill_ThruSectionErrorStatus_NotSameTopology, //!< All profiles have not same topology (they should be all closed or all opened) - BRepFill_ThruSectionErrorStatus_ProfilesInconsistent, //!< Profiles are inconsistent - BRepFill_ThruSectionErrorStatus_WrongUsage, //!< Wrong usage of punctual sections - BRepFill_ThruSectionErrorStatus_Null3DCurve, //!< Null 3D curve in edge - BRepFill_ThruSectionErrorStatus_Failed //!< Thrusection algorithm has failed + BRepFill_ThruSectionErrorStatus_Done, //!< Thrusection algorithm is done + BRepFill_ThruSectionErrorStatus_NotDone, //!< Thrusection algorithm is not done + BRepFill_ThruSectionErrorStatus_NotSameTopology, //!< All profiles have not same topology (they + //!< should be all closed or all opened) + BRepFill_ThruSectionErrorStatus_ProfilesInconsistent, //!< Profiles are inconsistent + BRepFill_ThruSectionErrorStatus_WrongUsage, //!< Wrong usage of punctual sections + BRepFill_ThruSectionErrorStatus_Null3DCurve, //!< Null 3D curve in edge + BRepFill_ThruSectionErrorStatus_Failed //!< Thrusection algorithm has failed }; #endif // _BRepFill_ThruSectionErrorStatus_HeaderFile diff --git a/opencascade/BRepFill_TransitionStyle.hxx b/opencascade/BRepFill_TransitionStyle.hxx index 09c7e18f9..c699eadba 100644 --- a/opencascade/BRepFill_TransitionStyle.hxx +++ b/opencascade/BRepFill_TransitionStyle.hxx @@ -17,12 +17,11 @@ #ifndef _BRepFill_TransitionStyle_HeaderFile #define _BRepFill_TransitionStyle_HeaderFile - enum BRepFill_TransitionStyle { -BRepFill_Modified, -BRepFill_Right, -BRepFill_Round + BRepFill_Modified, + BRepFill_Right, + BRepFill_Round }; #endif // _BRepFill_TransitionStyle_HeaderFile diff --git a/opencascade/BRepFill_TrimEdgeTool.hxx b/opencascade/BRepFill_TrimEdgeTool.hxx index 2fba09f55..97f41b52c 100644 --- a/opencascade/BRepFill_TrimEdgeTool.hxx +++ b/opencascade/BRepFill_TrimEdgeTool.hxx @@ -32,55 +32,47 @@ class TopoDS_Edge; class TopoDS_Shape; class TopoDS_Vertex; - //! Geometric Tool using to construct Offset Wires. -class BRepFill_TrimEdgeTool +class BRepFill_TrimEdgeTool { public: - DEFINE_STANDARD_ALLOC - Standard_EXPORT BRepFill_TrimEdgeTool(); - - Standard_EXPORT BRepFill_TrimEdgeTool(const Bisector_Bisec& Bisec, const Handle(Geom2d_Geometry)& S1, const Handle(Geom2d_Geometry)& S2, const Standard_Real Offset); - - Standard_EXPORT void IntersectWith (const TopoDS_Edge& Edge1, const TopoDS_Edge& Edge2, const TopoDS_Shape& InitShape1, const TopoDS_Shape& InitShape2, const TopoDS_Vertex& End1, const TopoDS_Vertex& End2, const GeomAbs_JoinType theJoinType, const Standard_Boolean IsOpenResult, TColgp_SequenceOfPnt& Params) ; - - Standard_EXPORT void AddOrConfuse (const Standard_Boolean Start, const TopoDS_Edge& Edge1, const TopoDS_Edge& Edge2, TColgp_SequenceOfPnt& Params) const; - - Standard_EXPORT Standard_Boolean IsInside (const gp_Pnt2d& P) const; - - - - -protected: + Standard_EXPORT BRepFill_TrimEdgeTool(const Bisector_Bisec& Bisec, + const Handle(Geom2d_Geometry)& S1, + const Handle(Geom2d_Geometry)& S2, + const Standard_Real Offset); + Standard_EXPORT void IntersectWith(const TopoDS_Edge& Edge1, + const TopoDS_Edge& Edge2, + const TopoDS_Shape& InitShape1, + const TopoDS_Shape& InitShape2, + const TopoDS_Vertex& End1, + const TopoDS_Vertex& End2, + const GeomAbs_JoinType theJoinType, + const Standard_Boolean IsOpenResult, + TColgp_SequenceOfPnt& Params); + Standard_EXPORT void AddOrConfuse(const Standard_Boolean Start, + const TopoDS_Edge& Edge1, + const TopoDS_Edge& Edge2, + TColgp_SequenceOfPnt& Params) const; + Standard_EXPORT Standard_Boolean IsInside(const gp_Pnt2d& P) const; +protected: private: - - - - Standard_Boolean isPoint1; - Standard_Boolean isPoint2; - gp_Pnt2d myP1; - gp_Pnt2d myP2; + Standard_Boolean isPoint1; + Standard_Boolean isPoint2; + gp_Pnt2d myP1; + gp_Pnt2d myP2; Handle(Geom2d_Curve) myC1; Handle(Geom2d_Curve) myC2; - Standard_Real myOffset; - Bisector_Bisec myBisec; - Geom2dAdaptor_Curve myBis; - - + Standard_Real myOffset; + Bisector_Bisec myBisec; + Geom2dAdaptor_Curve myBis; }; - - - - - - #endif // _BRepFill_TrimEdgeTool_HeaderFile diff --git a/opencascade/BRepFill_TrimShellCorner.hxx b/opencascade/BRepFill_TrimShellCorner.hxx index f25e1171d..489ce2197 100644 --- a/opencascade/BRepFill_TrimShellCorner.hxx +++ b/opencascade/BRepFill_TrimShellCorner.hxx @@ -29,90 +29,70 @@ #include #include - //! Trims sets of faces in the corner to make proper parts of pipe -class BRepFill_TrimShellCorner +class BRepFill_TrimShellCorner { public: - DEFINE_STANDARD_ALLOC - //! Constructor: takes faces to intersect, //! type of transition (it can be RightCorner or RoundCorner) //! and axis of bisector plane //! theIntersectPointCrossDirection : prev path direction at the origin point of theAxeOfBisPlane - //! cross next path direction at the origin point of theAxeOfBisPlane. used when EE has more than one vertices + //! cross next path direction at the origin point of theAxeOfBisPlane. used when EE has more than + //! one vertices Standard_EXPORT BRepFill_TrimShellCorner(const Handle(TopTools_HArray2OfShape)& theFaces, const BRepFill_TransitionStyle theTransition, const gp_Ax2& theAxeOfBisPlane, - const gp_Vec& theIntPointCrossDir); - - Standard_EXPORT void AddBounds (const Handle(TopTools_HArray2OfShape)& Bounds); - - Standard_EXPORT void AddUEdges (const Handle(TopTools_HArray2OfShape)& theUEdges); - - Standard_EXPORT void AddVEdges (const Handle(TopTools_HArray2OfShape)& theVEdges, - const Standard_Integer theIndex); - - Standard_EXPORT void Perform(); - - Standard_EXPORT Standard_Boolean IsDone() const; - - Standard_EXPORT Standard_Boolean HasSection() const; - - Standard_EXPORT void Modified (const TopoDS_Shape& S, TopTools_ListOfShape& theModified); + const gp_Vec& theIntPointCrossDir); + Standard_EXPORT void AddBounds(const Handle(TopTools_HArray2OfShape)& Bounds); + Standard_EXPORT void AddUEdges(const Handle(TopTools_HArray2OfShape)& theUEdges); + Standard_EXPORT void AddVEdges(const Handle(TopTools_HArray2OfShape)& theVEdges, + const Standard_Integer theIndex); -protected: - + Standard_EXPORT void Perform(); + Standard_EXPORT Standard_Boolean IsDone() const; + Standard_EXPORT Standard_Boolean HasSection() const; + Standard_EXPORT void Modified(const TopoDS_Shape& S, TopTools_ListOfShape& theModified); +protected: private: - - Standard_Boolean MakeFacesSec(const Standard_Integer theIndex, - const BOPDS_PDS& theDS, - const Standard_Integer theFaceIndex1, - const Standard_Integer theFaceIndex2, - const Standard_Integer theSSInterfIndex); - - Standard_Boolean MakeFacesNonSec(const Standard_Integer theIndex, - const BOPDS_PDS& theDS, - const Standard_Integer theFaceIndex1, - const Standard_Integer theFaceIndex2); - - Standard_Boolean ChooseSection(const TopoDS_Shape& Comp, + Standard_Boolean MakeFacesSec(const Standard_Integer theIndex, + const BOPDS_PDS& theDS, + const Standard_Integer theFaceIndex1, + const Standard_Integer theFaceIndex2, + const Standard_Integer theSSInterfIndex); + + Standard_Boolean MakeFacesNonSec(const Standard_Integer theIndex, + const BOPDS_PDS& theDS, + const Standard_Integer theFaceIndex1, + const Standard_Integer theFaceIndex2); + + Standard_Boolean ChooseSection(const TopoDS_Shape& Comp, const TopoDS_Vertex& theFirstVertex, const TopoDS_Vertex& theLastVertex, - TopoDS_Shape& resWire, - gp_Pln& resPlane, - Standard_Boolean& IsSingular); - - - BRepFill_TransitionStyle myTransition; - gp_Ax2 myAxeOfBisPlane; - gp_Vec myIntPointCrossDir; - TopoDS_Shape myShape1; - TopoDS_Shape myShape2; - Handle(TopTools_HArray2OfShape) myBounds; - Handle(TopTools_HArray2OfShape) myUEdges; - Handle(TopTools_HArray1OfShape) myVEdges; - Handle(TopTools_HArray2OfShape) myFaces; - Standard_Boolean myDone; - Standard_Boolean myHasSection; + TopoDS_Shape& resWire, + gp_Pln& resPlane, + Standard_Boolean& IsSingular); + + BRepFill_TransitionStyle myTransition; + gp_Ax2 myAxeOfBisPlane; + gp_Vec myIntPointCrossDir; + TopoDS_Shape myShape1; + TopoDS_Shape myShape2; + Handle(TopTools_HArray2OfShape) myBounds; + Handle(TopTools_HArray2OfShape) myUEdges; + Handle(TopTools_HArray1OfShape) myVEdges; + Handle(TopTools_HArray2OfShape) myFaces; + Standard_Boolean myDone; + Standard_Boolean myHasSection; TopTools_DataMapOfShapeListOfShape myHistMap; - - }; - - - - - - #endif // _BRepFill_TrimShellCorner_HeaderFile diff --git a/opencascade/BRepFill_TrimSurfaceTool.hxx b/opencascade/BRepFill_TrimSurfaceTool.hxx index 57ffa1438..7d5a4a555 100644 --- a/opencascade/BRepFill_TrimSurfaceTool.hxx +++ b/opencascade/BRepFill_TrimSurfaceTool.hxx @@ -29,18 +29,21 @@ class Geom2d_Curve; class gp_Pnt2d; class Geom_Curve; - //! Compute the Pcurves and the 3d curves resulting //! of the trimming of a face by an extruded surface. -class BRepFill_TrimSurfaceTool +class BRepFill_TrimSurfaceTool { public: - DEFINE_STANDARD_ALLOC - - Standard_EXPORT BRepFill_TrimSurfaceTool(const Handle(Geom2d_Curve)& Bis, const TopoDS_Face& Face1, const TopoDS_Face& Face2, const TopoDS_Edge& Edge1, const TopoDS_Edge& Edge2, const Standard_Boolean Inv1, const Standard_Boolean Inv2); - + Standard_EXPORT BRepFill_TrimSurfaceTool(const Handle(Geom2d_Curve)& Bis, + const TopoDS_Face& Face1, + const TopoDS_Face& Face2, + const TopoDS_Edge& Edge1, + const TopoDS_Edge& Edge2, + const Standard_Boolean Inv1, + const Standard_Boolean Inv2); + //! Intersect with the projection of the edges //! and returns the intersecting parameters //! on Bis and on the edges @@ -48,45 +51,33 @@ public: //! P.Y() : Parameter on EdgeOnF1 //! P.Z() : Parameter on EdgeOnF2 //! raises if is not a edge of Face1 or Face2. - Standard_EXPORT void IntersectWith (const TopoDS_Edge& EdgeOnF1, const TopoDS_Edge& EdgeOnF2, TColgp_SequenceOfPnt& Points) const; - + Standard_EXPORT void IntersectWith(const TopoDS_Edge& EdgeOnF1, + const TopoDS_Edge& EdgeOnF2, + TColgp_SequenceOfPnt& Points) const; + //! returns True if the Line (P, DZ) intersect the Faces - Standard_EXPORT Standard_Boolean IsOnFace (const gp_Pnt2d& Point) const; - + Standard_EXPORT Standard_Boolean IsOnFace(const gp_Pnt2d& Point) const; + //! returns the parameter of the point on the //! Edge , assuming that the point is on the edge. - Standard_EXPORT Standard_Real ProjOn (const gp_Pnt2d& Point, const TopoDS_Edge& Edge) const; - - Standard_EXPORT void Project (const Standard_Real U1, const Standard_Real U2, Handle(Geom_Curve)& Curve, Handle(Geom2d_Curve)& PCurve1, Handle(Geom2d_Curve)& PCurve2, GeomAbs_Shape& myCont) const; - - + Standard_EXPORT Standard_Real ProjOn(const gp_Pnt2d& Point, const TopoDS_Edge& Edge) const; + Standard_EXPORT void Project(const Standard_Real U1, + const Standard_Real U2, + Handle(Geom_Curve)& Curve, + Handle(Geom2d_Curve)& PCurve1, + Handle(Geom2d_Curve)& PCurve2, + GeomAbs_Shape& myCont) const; protected: - - - - - private: - - - - TopoDS_Face myFace1; - TopoDS_Face myFace2; - TopoDS_Edge myEdge1; - TopoDS_Edge myEdge2; - Standard_Boolean myInv1; - Standard_Boolean myInv2; + TopoDS_Face myFace1; + TopoDS_Face myFace2; + TopoDS_Edge myEdge1; + TopoDS_Edge myEdge2; + Standard_Boolean myInv1; + Standard_Boolean myInv2; Handle(Geom2d_Curve) myBis; - - }; - - - - - - #endif // _BRepFill_TrimSurfaceTool_HeaderFile diff --git a/opencascade/BRepFill_TypeOfContact.hxx b/opencascade/BRepFill_TypeOfContact.hxx index ad8fdfda6..18b45fd04 100644 --- a/opencascade/BRepFill_TypeOfContact.hxx +++ b/opencascade/BRepFill_TypeOfContact.hxx @@ -20,9 +20,9 @@ //! A pair of bound shapes with the result. enum BRepFill_TypeOfContact { -BRepFill_NoContact, -BRepFill_Contact, -BRepFill_ContactOnBorder + BRepFill_NoContact, + BRepFill_Contact, + BRepFill_ContactOnBorder }; #endif // _BRepFill_TypeOfContact_HeaderFile diff --git a/opencascade/BRepFilletAPI_LocalOperation.hxx b/opencascade/BRepFilletAPI_LocalOperation.hxx index 51d88284a..64425ea17 100644 --- a/opencascade/BRepFilletAPI_LocalOperation.hxx +++ b/opencascade/BRepFilletAPI_LocalOperation.hxx @@ -27,96 +27,78 @@ class TopoDS_Edge; class TopoDS_Vertex; - //! Construction of fillets on the edges of a Shell. -class BRepFilletAPI_LocalOperation : public BRepBuilderAPI_MakeShape +class BRepFilletAPI_LocalOperation : public BRepBuilderAPI_MakeShape { public: - DEFINE_STANDARD_ALLOC - //! Adds a contour in the builder (builds a //! contour of tangent edges). - Standard_EXPORT virtual void Add (const TopoDS_Edge& E) = 0; - + Standard_EXPORT virtual void Add(const TopoDS_Edge& E) = 0; + //! Reset the contour of index IC, there is nomore //! information in the contour. - Standard_EXPORT virtual void ResetContour (const Standard_Integer IC) = 0; - + Standard_EXPORT virtual void ResetContour(const Standard_Integer IC) = 0; + //! Number of contours. Standard_EXPORT virtual Standard_Integer NbContours() const = 0; - + //! Returns the index of the contour containing the edge //! E, returns 0 if E doesn't belong to any contour. - Standard_EXPORT virtual Standard_Integer Contour (const TopoDS_Edge& E) const = 0; - + Standard_EXPORT virtual Standard_Integer Contour(const TopoDS_Edge& E) const = 0; + //! Number of Edges in the contour I. - Standard_EXPORT virtual Standard_Integer NbEdges (const Standard_Integer I) const = 0; - + Standard_EXPORT virtual Standard_Integer NbEdges(const Standard_Integer I) const = 0; + //! Returns the Edge J in the contour I. - Standard_EXPORT virtual const TopoDS_Edge& Edge (const Standard_Integer I, const Standard_Integer J) const = 0; - + Standard_EXPORT virtual const TopoDS_Edge& Edge(const Standard_Integer I, + const Standard_Integer J) const = 0; + //! remove the contour containing the Edge E. - Standard_EXPORT virtual void Remove (const TopoDS_Edge& E) = 0; - + Standard_EXPORT virtual void Remove(const TopoDS_Edge& E) = 0; + //! returns the length the contour of index IC. - Standard_EXPORT virtual Standard_Real Length (const Standard_Integer IC) const = 0; - + Standard_EXPORT virtual Standard_Real Length(const Standard_Integer IC) const = 0; + //! Returns the first Vertex of the contour of index IC. - Standard_EXPORT virtual TopoDS_Vertex FirstVertex (const Standard_Integer IC) const = 0; - + Standard_EXPORT virtual TopoDS_Vertex FirstVertex(const Standard_Integer IC) const = 0; + //! Returns the last Vertex of the contour of index IC. - Standard_EXPORT virtual TopoDS_Vertex LastVertex (const Standard_Integer IC) const = 0; - + Standard_EXPORT virtual TopoDS_Vertex LastVertex(const Standard_Integer IC) const = 0; + //! returns the abscissa of the vertex V on //! the contour of index IC. - Standard_EXPORT virtual Standard_Real Abscissa (const Standard_Integer IC, const TopoDS_Vertex& V) const = 0; - + Standard_EXPORT virtual Standard_Real Abscissa(const Standard_Integer IC, + const TopoDS_Vertex& V) const = 0; + //! returns the relative abscissa([0.,1.]) of the //! vertex V on the contour of index IC. - Standard_EXPORT virtual Standard_Real RelativeAbscissa (const Standard_Integer IC, const TopoDS_Vertex& V) const = 0; - + Standard_EXPORT virtual Standard_Real RelativeAbscissa(const Standard_Integer IC, + const TopoDS_Vertex& V) const = 0; + //! returns true if the contour of index IC is closed //! an tangent. - Standard_EXPORT virtual Standard_Boolean ClosedAndTangent (const Standard_Integer IC) const = 0; - + Standard_EXPORT virtual Standard_Boolean ClosedAndTangent(const Standard_Integer IC) const = 0; + //! returns true if the contour of index IC is closed - Standard_EXPORT virtual Standard_Boolean Closed (const Standard_Integer IC) const = 0; - + Standard_EXPORT virtual Standard_Boolean Closed(const Standard_Integer IC) const = 0; + //! Reset all the fields updated by Build operation and //! leave the algorithm in the same state than before //! build call. It allows contours and radius //! modifications to build the result another time. Standard_EXPORT virtual void Reset() = 0; - - Standard_EXPORT virtual void Simulate (const Standard_Integer IC) = 0; - - Standard_EXPORT virtual Standard_Integer NbSurf (const Standard_Integer IC) const = 0; - - Standard_EXPORT virtual Handle(ChFiDS_SecHArray1) Sect (const Standard_Integer IC, const Standard_Integer IS) const = 0; + Standard_EXPORT virtual void Simulate(const Standard_Integer IC) = 0; + Standard_EXPORT virtual Standard_Integer NbSurf(const Standard_Integer IC) const = 0; + Standard_EXPORT virtual Handle(ChFiDS_SecHArray1) Sect(const Standard_Integer IC, + const Standard_Integer IS) const = 0; protected: - - - - - private: - - - - - }; - - - - - - #endif // _BRepFilletAPI_LocalOperation_HeaderFile diff --git a/opencascade/BRepFilletAPI_MakeChamfer.hxx b/opencascade/BRepFilletAPI_MakeChamfer.hxx index 3b7b37fcb..25b465e3c 100644 --- a/opencascade/BRepFilletAPI_MakeChamfer.hxx +++ b/opencascade/BRepFilletAPI_MakeChamfer.hxx @@ -34,7 +34,6 @@ class TopoDS_Face; class TopoDS_Vertex; class TopOpeBRepBuild_HBuilder; - //! Describes functions to build chamfers on edges of a shell or solid. //! Chamfered Edge of a Shell or Solid //! A MakeChamfer object provides a framework for: @@ -42,22 +41,20 @@ class TopOpeBRepBuild_HBuilder; //! - acquiring the data characterizing the chamfers, //! - building the chamfers and constructing the resulting shape, and //! - consulting the result. -class BRepFilletAPI_MakeChamfer : public BRepFilletAPI_LocalOperation +class BRepFilletAPI_MakeChamfer : public BRepFilletAPI_LocalOperation { public: - DEFINE_STANDARD_ALLOC - //! Initializes an algorithm for computing chamfers on the shape S. //! The edges on which chamfers are built are defined using the Add function. Standard_EXPORT BRepFilletAPI_MakeChamfer(const TopoDS_Shape& S); - + //! Adds edge E to the table of edges used by this //! algorithm to build chamfers, where the parameters //! of the chamfer must be set after the - Standard_EXPORT void Add (const TopoDS_Edge& E) Standard_OVERRIDE; - + Standard_EXPORT void Add(const TopoDS_Edge& E) Standard_OVERRIDE; + //! Adds edge E to the table of edges used by this //! algorithm to build chamfers, where //! the parameters of the chamfer are given by @@ -70,8 +67,8 @@ public: //! series of faces being located on either side of the contour. //! Warning //! Nothing is done if edge E or the face F does not belong to the initial shape. - Standard_EXPORT void Add (const Standard_Real Dis, const TopoDS_Edge& E); - + Standard_EXPORT void Add(const Standard_Real Dis, const TopoDS_Edge& E); + //! Sets the distances Dis1 and Dis2 which give the //! parameters of the chamfer along the contour of index //! IC generated using the Add function in the internal @@ -80,10 +77,12 @@ public: //! Warning //! Nothing is done if either the edge E or the face F //! does not belong to the initial shape. - Standard_EXPORT void SetDist (const Standard_Real Dis, const Standard_Integer IC, const TopoDS_Face& F); - - Standard_EXPORT void GetDist (const Standard_Integer IC, Standard_Real& Dis) const; - + Standard_EXPORT void SetDist(const Standard_Real Dis, + const Standard_Integer IC, + const TopoDS_Face& F); + + Standard_EXPORT void GetDist(const Standard_Integer IC, Standard_Real& Dis) const; + //! Adds edge E to the table of edges used by this //! algorithm to build chamfers, where //! the parameters of the chamfer are given by the two @@ -97,8 +96,11 @@ public: //! series of faces being located on either side of the contour. //! Warning //! Nothing is done if edge E or the face F does not belong to the initial shape. - Standard_EXPORT void Add (const Standard_Real Dis1, const Standard_Real Dis2, const TopoDS_Edge& E, const TopoDS_Face& F); - + Standard_EXPORT void Add(const Standard_Real Dis1, + const Standard_Real Dis2, + const TopoDS_Edge& E, + const TopoDS_Face& F); + //! Sets the distances Dis1 and Dis2 which give the //! parameters of the chamfer along the contour of index //! IC generated using the Add function in the internal @@ -107,108 +109,123 @@ public: //! Warning //! Nothing is done if either the edge E or the face F //! does not belong to the initial shape. - Standard_EXPORT void SetDists (const Standard_Real Dis1, const Standard_Real Dis2, const Standard_Integer IC, const TopoDS_Face& F); - + Standard_EXPORT void SetDists(const Standard_Real Dis1, + const Standard_Real Dis2, + const Standard_Integer IC, + const TopoDS_Face& F); + //! Returns the distances Dis1 and Dis2 which give the //! parameters of the chamfer along the contour of index IC //! in the internal data structure of this algorithm. //! Warning //! -1. is returned if IC is outside the bounds of the table of contours. - Standard_EXPORT void Dists (const Standard_Integer IC, Standard_Real& Dis1, Standard_Real& Dis2) const; - + Standard_EXPORT void Dists(const Standard_Integer IC, + Standard_Real& Dis1, + Standard_Real& Dis2) const; + //! Adds a fillet contour in the builder (builds a //! contour of tangent edges to and sets the //! distance and angle ( parameters of the chamfer ) ). - Standard_EXPORT void AddDA (const Standard_Real Dis, const Standard_Real Angle, const TopoDS_Edge& E, const TopoDS_Face& F); - + Standard_EXPORT void AddDA(const Standard_Real Dis, + const Standard_Real Angle, + const TopoDS_Edge& E, + const TopoDS_Face& F); + //! set the distance and of the fillet //! contour of index in the DS with on . //! if the face is not one of common faces //! of an edge of the contour - Standard_EXPORT void SetDistAngle (const Standard_Real Dis, const Standard_Real Angle, const Standard_Integer IC, const TopoDS_Face& F); - + Standard_EXPORT void SetDistAngle(const Standard_Real Dis, + const Standard_Real Angle, + const Standard_Integer IC, + const TopoDS_Face& F); + //! gives the distances and of the fillet //! contour of index in the DS - Standard_EXPORT void GetDistAngle (const Standard_Integer IC, Standard_Real& Dis, Standard_Real& Angle) const; - + Standard_EXPORT void GetDistAngle(const Standard_Integer IC, + Standard_Real& Dis, + Standard_Real& Angle) const; + //! Sets the mode of chamfer - Standard_EXPORT void SetMode (const ChFiDS_ChamfMode theMode); - + Standard_EXPORT void SetMode(const ChFiDS_ChamfMode theMode); + //! return True if chamfer symmetric false else. - Standard_EXPORT Standard_Boolean IsSymetric (const Standard_Integer IC) const; - + Standard_EXPORT Standard_Boolean IsSymetric(const Standard_Integer IC) const; + //! return True if chamfer is made with two distances false else. - Standard_EXPORT Standard_Boolean IsTwoDistances (const Standard_Integer IC) const; - + Standard_EXPORT Standard_Boolean IsTwoDistances(const Standard_Integer IC) const; + //! return True if chamfer is made with distance and angle false else. - Standard_EXPORT Standard_Boolean IsDistanceAngle (const Standard_Integer IC) const; - + Standard_EXPORT Standard_Boolean IsDistanceAngle(const Standard_Integer IC) const; + //! Erases the chamfer parameters on the contour of //! index IC in the internal data structure of this algorithm. //! Use the SetDists function to reset this data. //! Warning //! Nothing is done if IC is outside the bounds of the table of contours. - Standard_EXPORT void ResetContour (const Standard_Integer IC) Standard_OVERRIDE; - + Standard_EXPORT void ResetContour(const Standard_Integer IC) Standard_OVERRIDE; + //! Returns the number of contours generated using the //! Add function in the internal data structure of this algorithm. Standard_EXPORT Standard_Integer NbContours() const Standard_OVERRIDE; - + //! Returns the index of the contour in the internal data //! structure of this algorithm, which contains the edge E of the shape. //! This function returns 0 if the edge E does not belong to any contour. //! Warning //! This index can change if a contour is removed from the //! internal data structure of this algorithm using the function Remove. - Standard_EXPORT Standard_Integer Contour (const TopoDS_Edge& E) const Standard_OVERRIDE; - + Standard_EXPORT Standard_Integer Contour(const TopoDS_Edge& E) const Standard_OVERRIDE; + //! Returns the number of edges in the contour of index I in //! the internal data structure of this algorithm. //! Warning //! Returns 0 if I is outside the bounds of the table of contours. - Standard_EXPORT Standard_Integer NbEdges (const Standard_Integer I) const Standard_OVERRIDE; - + Standard_EXPORT Standard_Integer NbEdges(const Standard_Integer I) const Standard_OVERRIDE; + //! Returns the edge of index J in the contour of index I in //! the internal data structure of this algorithm. //! Warning //! Returns a null shape if: //! - I is outside the bounds of the table of contours, or //! - J is outside the bounds of the table of edges of the contour of index I. - Standard_EXPORT const TopoDS_Edge& Edge (const Standard_Integer I, const Standard_Integer J) const Standard_OVERRIDE; - + Standard_EXPORT const TopoDS_Edge& Edge(const Standard_Integer I, + const Standard_Integer J) const Standard_OVERRIDE; + //! Removes the contour in the internal data structure of //! this algorithm which contains the edge E of the shape. //! Warning //! Nothing is done if the edge E does not belong to the //! contour in the internal data structure of this algorithm. - Standard_EXPORT void Remove (const TopoDS_Edge& E) Standard_OVERRIDE; - + Standard_EXPORT void Remove(const TopoDS_Edge& E) Standard_OVERRIDE; + //! Returns the length of the contour of index IC in the //! internal data structure of this algorithm. //! Warning //! Returns -1. if IC is outside the bounds of the table of contours. - Standard_EXPORT Standard_Real Length (const Standard_Integer IC) const Standard_OVERRIDE; - + Standard_EXPORT Standard_Real Length(const Standard_Integer IC) const Standard_OVERRIDE; + //! Returns the first vertex of the contour of index IC //! in the internal data structure of this algorithm. //! Warning //! Returns a null shape if IC is outside the bounds of the table of contours. - Standard_EXPORT TopoDS_Vertex FirstVertex (const Standard_Integer IC) const Standard_OVERRIDE; - + Standard_EXPORT TopoDS_Vertex FirstVertex(const Standard_Integer IC) const Standard_OVERRIDE; + //! Returns the last vertex of the contour of index IC //! in the internal data structure of this algorithm. //! Warning //! Returns a null shape if IC is outside the bounds of the table of contours. - Standard_EXPORT TopoDS_Vertex LastVertex (const Standard_Integer IC) const Standard_OVERRIDE; - + Standard_EXPORT TopoDS_Vertex LastVertex(const Standard_Integer IC) const Standard_OVERRIDE; + //! Returns the curvilinear abscissa of the vertex V on the //! contour of index IC in the internal data structure of this algorithm. //! Warning //! Returns -1. if: //! - IC is outside the bounds of the table of contours, or //! - V is not on the contour of index IC. - Standard_EXPORT Standard_Real Abscissa (const Standard_Integer IC, const TopoDS_Vertex& V) const Standard_OVERRIDE; - + Standard_EXPORT Standard_Real Abscissa(const Standard_Integer IC, + const TopoDS_Vertex& V) const Standard_OVERRIDE; + //! Returns the relative curvilinear abscissa (i.e. between 0 //! and 1) of the vertex V on the contour of index IC in the //! internal data structure of this algorithm. @@ -216,20 +233,22 @@ public: //! Returns -1. if: //! - IC is outside the bounds of the table of contours, or //! - V is not on the contour of index IC. - Standard_EXPORT Standard_Real RelativeAbscissa (const Standard_Integer IC, const TopoDS_Vertex& V) const Standard_OVERRIDE; - + Standard_EXPORT Standard_Real RelativeAbscissa(const Standard_Integer IC, + const TopoDS_Vertex& V) const Standard_OVERRIDE; + //! eturns true if the contour of index IC in the internal //! data structure of this algorithm is closed and tangential at the point of closure. //! Warning //! Returns false if IC is outside the bounds of the table of contours. - Standard_EXPORT Standard_Boolean ClosedAndTangent (const Standard_Integer IC) const Standard_OVERRIDE; - + Standard_EXPORT Standard_Boolean + ClosedAndTangent(const Standard_Integer IC) const Standard_OVERRIDE; + //! Returns true if the contour of index IC in the internal //! data structure of this algorithm is closed. //! Warning //! Returns false if IC is outside the bounds of the table of contours. - Standard_EXPORT Standard_Boolean Closed (const Standard_Integer IC) const Standard_OVERRIDE; - + Standard_EXPORT Standard_Boolean Closed(const Standard_Integer IC) const Standard_OVERRIDE; + //! Builds the chamfers on all the contours in the internal //! data structure of this algorithm and constructs the resulting shape. //! Use the function IsDone to verify that the chamfered @@ -248,55 +267,40 @@ public: //! intersection of 4 or more edges of the shape, or //! - the intersection of the chamfer with a face which //! limits the contour is not fully contained in this face. - Standard_EXPORT virtual void Build(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; - + Standard_EXPORT virtual void Build( + const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; + //! Reinitializes this algorithm, thus canceling the effects of the Build function. //! This function allows modifications to be made to the //! contours and chamfer parameters in order to rebuild the shape. Standard_EXPORT void Reset() Standard_OVERRIDE; - + //! Returns the internal filleting algorithm. Standard_EXPORT Handle(TopOpeBRepBuild_HBuilder) Builder() const; - + //! Returns the list of shapes generated from the //! shape . - Standard_EXPORT virtual const TopTools_ListOfShape& Generated (const TopoDS_Shape& EorV) Standard_OVERRIDE; - + Standard_EXPORT virtual const TopTools_ListOfShape& Generated(const TopoDS_Shape& EorV) + Standard_OVERRIDE; + //! Returns the list of shapes modified from the shape //! . - Standard_EXPORT virtual const TopTools_ListOfShape& Modified (const TopoDS_Shape& F) Standard_OVERRIDE; - - Standard_EXPORT virtual Standard_Boolean IsDeleted (const TopoDS_Shape& F) Standard_OVERRIDE; - - Standard_EXPORT void Simulate (const Standard_Integer IC) Standard_OVERRIDE; - - Standard_EXPORT Standard_Integer NbSurf (const Standard_Integer IC) const Standard_OVERRIDE; - - Standard_EXPORT Handle(ChFiDS_SecHArray1) Sect (const Standard_Integer IC, const Standard_Integer IS) const Standard_OVERRIDE; - - - - -protected: + Standard_EXPORT virtual const TopTools_ListOfShape& Modified(const TopoDS_Shape& F) + Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean IsDeleted(const TopoDS_Shape& F) Standard_OVERRIDE; + Standard_EXPORT void Simulate(const Standard_Integer IC) Standard_OVERRIDE; + Standard_EXPORT Standard_Integer NbSurf(const Standard_Integer IC) const Standard_OVERRIDE; + Standard_EXPORT Handle(ChFiDS_SecHArray1) Sect(const Standard_Integer IC, + const Standard_Integer IS) const Standard_OVERRIDE; +protected: private: - - - - ChFi3d_ChBuilder myBuilder; + ChFi3d_ChBuilder myBuilder; TopTools_MapOfShape myMap; - - }; - - - - - - #endif // _BRepFilletAPI_MakeChamfer_HeaderFile diff --git a/opencascade/BRepFilletAPI_MakeFillet.hxx b/opencascade/BRepFilletAPI_MakeFillet.hxx index 6113821c2..20239473f 100644 --- a/opencascade/BRepFilletAPI_MakeFillet.hxx +++ b/opencascade/BRepFilletAPI_MakeFillet.hxx @@ -39,20 +39,17 @@ class TopoDS_Vertex; class TopOpeBRepBuild_HBuilder; class Geom_Surface; - //! Describes functions to build fillets on the broken edges of a shell or solid. //! A MakeFillet object provides a framework for: //! - initializing the construction algorithm with a given shape, //! - acquiring the data characterizing the fillets, //! - building the fillets and constructing the resulting shape, and //! - consulting the result. -class BRepFilletAPI_MakeFillet : public BRepFilletAPI_LocalOperation +class BRepFilletAPI_MakeFillet : public BRepFilletAPI_LocalOperation { public: - DEFINE_STANDARD_ALLOC - //! Initializes the computation of the fillets. //! sets the type of fillet surface. The //! default value is ChFi3d_Rational (classical nurbs @@ -61,39 +58,46 @@ public: //! which parameterisation matches the circle one. //! ChFi3d_Polynomial corresponds to a polynomial //! representation of circles. - Standard_EXPORT BRepFilletAPI_MakeFillet(const TopoDS_Shape& S, const ChFi3d_FilletShape FShape = ChFi3d_Rational); - - Standard_EXPORT void SetParams (const Standard_Real Tang, const Standard_Real Tesp, const Standard_Real T2d, const Standard_Real TApp3d, const Standard_Real TolApp2d, const Standard_Real Fleche); - + Standard_EXPORT BRepFilletAPI_MakeFillet(const TopoDS_Shape& S, + const ChFi3d_FilletShape FShape = ChFi3d_Rational); + + Standard_EXPORT void SetParams(const Standard_Real Tang, + const Standard_Real Tesp, + const Standard_Real T2d, + const Standard_Real TApp3d, + const Standard_Real TolApp2d, + const Standard_Real Fleche); + //! Changes the parameters of continiuity //! InternalContinuity to produce fillet'surfaces with //! an continuity Ci (i=0,1 or 2). //! By defaultInternalContinuity = GeomAbs_C1. //! AngularTolerance is the G1 tolerance between fillet //! and support'faces. - Standard_EXPORT void SetContinuity (const GeomAbs_Shape InternalContinuity, const Standard_Real AngularTolerance); - + Standard_EXPORT void SetContinuity(const GeomAbs_Shape InternalContinuity, + const Standard_Real AngularTolerance); + //! Adds a fillet contour in the builder (builds a //! contour of tangent edges). //! The Radius must be set after. - Standard_EXPORT void Add (const TopoDS_Edge& E) Standard_OVERRIDE; - + Standard_EXPORT void Add(const TopoDS_Edge& E) Standard_OVERRIDE; + //! Adds a fillet description in the builder //! - builds a contour of tangent edges, //! - sets the radius. - Standard_EXPORT void Add (const Standard_Real Radius, const TopoDS_Edge& E); - + Standard_EXPORT void Add(const Standard_Real Radius, const TopoDS_Edge& E); + //! Adds a fillet description in the builder //! - builds a contour of tangent edges, //! - sets a linear radius evolution law between //! the first and last vertex of the spine. - Standard_EXPORT void Add (const Standard_Real R1, const Standard_Real R2, const TopoDS_Edge& E); - + Standard_EXPORT void Add(const Standard_Real R1, const Standard_Real R2, const TopoDS_Edge& E); + //! Adds a fillet description in the builder //! - builds a contour of tangent edges, //! - sest the radius evolution law. - Standard_EXPORT void Add (const Handle(Law_Function)& L, const TopoDS_Edge& E); - + Standard_EXPORT void Add(const Handle(Law_Function)& L, const TopoDS_Edge& E); + //! Adds a fillet description in the builder //! - builds a contour of tangent edges, //! - sets the radius evolution law interpolating the values @@ -101,28 +105,35 @@ public: //! //! p2d.X() = relative parameter on the spine [0,1] //! p2d.Y() = value of the radius. - Standard_EXPORT void Add (const TColgp_Array1OfPnt2d& UandR, const TopoDS_Edge& E); - + Standard_EXPORT void Add(const TColgp_Array1OfPnt2d& UandR, const TopoDS_Edge& E); + //! Sets the parameters of the fillet //! along the contour of index IC generated using the Add function //! in the internal data structure of //! this algorithm, where Radius is the radius of the fillet. - Standard_EXPORT void SetRadius (const Standard_Real Radius, const Standard_Integer IC, const Standard_Integer IinC); - + Standard_EXPORT void SetRadius(const Standard_Real Radius, + const Standard_Integer IC, + const Standard_Integer IinC); + //! Sets the parameters of the fillet //! along the contour of index IC generated using the Add function //! in the internal data structure of this algorithm, where the radius of the //! fillet evolves according to a linear evolution law defined //! from R1 to R2, between the first and last vertices of the contour of index IC. - Standard_EXPORT void SetRadius (const Standard_Real R1, const Standard_Real R2, const Standard_Integer IC, const Standard_Integer IinC); - + Standard_EXPORT void SetRadius(const Standard_Real R1, + const Standard_Real R2, + const Standard_Integer IC, + const Standard_Integer IinC); + //! Sets the parameters of the fillet //! along the contour of index IC generated using the Add function //! in the internal data structure of this algorithm, where the radius of the //! fillet evolves according to the evolution law L, between the //! first and last vertices of the contour of index IC. - Standard_EXPORT void SetRadius (const Handle(Law_Function)& L, const Standard_Integer IC, const Standard_Integer IinC); - + Standard_EXPORT void SetRadius(const Handle(Law_Function)& L, + const Standard_Integer IC, + const Standard_Integer IinC); + //! Sets the parameters of the fillet //! along the contour of index IC generated using the Add function //! in the internal data structure of this algorithm, @@ -134,122 +145,135 @@ public: //! - the Y coordinate of a point in UandR gives the //! corresponding value of the radius, and the radius evolves //! between the first and last vertices of the contour of index IC. - Standard_EXPORT void SetRadius (const TColgp_Array1OfPnt2d& UandR, const Standard_Integer IC, const Standard_Integer IinC); - + Standard_EXPORT void SetRadius(const TColgp_Array1OfPnt2d& UandR, + const Standard_Integer IC, + const Standard_Integer IinC); + //! Erases the radius information on the contour of index //! IC in the internal data structure of this algorithm. //! Use the SetRadius function to reset this data. //! Warning //! Nothing is done if IC is outside the bounds of the table of contours. - Standard_EXPORT void ResetContour (const Standard_Integer IC) Standard_OVERRIDE; - + Standard_EXPORT void ResetContour(const Standard_Integer IC) Standard_OVERRIDE; + //! Returns true if the radius of the fillet along the contour of index IC //! in the internal data structure of this algorithm is constant, //! Warning //! False is returned if IC is outside the bounds of the table //! of contours or if E does not belong to the contour of index IC. - Standard_EXPORT Standard_Boolean IsConstant (const Standard_Integer IC); - + Standard_EXPORT Standard_Boolean IsConstant(const Standard_Integer IC); + //! Returns the radius of the fillet along the contour of index IC in the //! internal data structure of this algorithm //! Warning //! - Use this function only if the radius is constant. //! - -1. is returned if IC is outside the bounds of the //! table of contours or if E does not belong to the contour of index IC. - Standard_EXPORT Standard_Real Radius (const Standard_Integer IC); - + Standard_EXPORT Standard_Real Radius(const Standard_Integer IC); + //! Returns true if the radius of the fillet along the edge E of the //! contour of index IC in the internal data structure of //! this algorithm is constant. //! Warning //! False is returned if IC is outside the bounds of the table //! of contours or if E does not belong to the contour of index IC. - Standard_EXPORT Standard_Boolean IsConstant (const Standard_Integer IC, const TopoDS_Edge& E); - + Standard_EXPORT Standard_Boolean IsConstant(const Standard_Integer IC, const TopoDS_Edge& E); + //! Returns the radius of the fillet along the edge E of the contour of index //! IC in the internal data structure of this algorithm. //! Warning //! - Use this function only if the radius is constant. //! - -1 is returned if IC is outside the bounds of the //! table of contours or if E does not belong to the contour of index IC. - Standard_EXPORT Standard_Real Radius (const Standard_Integer IC, const TopoDS_Edge& E); - + Standard_EXPORT Standard_Real Radius(const Standard_Integer IC, const TopoDS_Edge& E); + //! Assigns Radius as the radius of the fillet on the edge E - Standard_EXPORT void SetRadius (const Standard_Real Radius, const Standard_Integer IC, const TopoDS_Edge& E); - - Standard_EXPORT void SetRadius (const Standard_Real Radius, const Standard_Integer IC, const TopoDS_Vertex& V); - - Standard_EXPORT Standard_Boolean GetBounds (const Standard_Integer IC, const TopoDS_Edge& E, Standard_Real& F, Standard_Real& L); - - Standard_EXPORT Handle(Law_Function) GetLaw (const Standard_Integer IC, const TopoDS_Edge& E); - - Standard_EXPORT void SetLaw (const Standard_Integer IC, const TopoDS_Edge& E, const Handle(Law_Function)& L); - + Standard_EXPORT void SetRadius(const Standard_Real Radius, + const Standard_Integer IC, + const TopoDS_Edge& E); + + Standard_EXPORT void SetRadius(const Standard_Real Radius, + const Standard_Integer IC, + const TopoDS_Vertex& V); + + Standard_EXPORT Standard_Boolean GetBounds(const Standard_Integer IC, + const TopoDS_Edge& E, + Standard_Real& F, + Standard_Real& L); + + Standard_EXPORT Handle(Law_Function) GetLaw(const Standard_Integer IC, const TopoDS_Edge& E); + + Standard_EXPORT void SetLaw(const Standard_Integer IC, + const TopoDS_Edge& E, + const Handle(Law_Function)& L); + //! Assigns FShape as the type of fillet shape built by this algorithm. - Standard_EXPORT void SetFilletShape (const ChFi3d_FilletShape FShape); - + Standard_EXPORT void SetFilletShape(const ChFi3d_FilletShape FShape); + //! Returns the type of fillet shape built by this algorithm. Standard_EXPORT ChFi3d_FilletShape GetFilletShape() const; - + //! Returns the number of contours generated using the //! Add function in the internal data structure of this algorithm. Standard_EXPORT Standard_Integer NbContours() const Standard_OVERRIDE; - + //! Returns the index of the contour in the internal data //! structure of this algorithm which contains the edge E of the shape. //! This function returns 0 if the edge E does not belong to any contour. //! Warning //! This index can change if a contour is removed from the //! internal data structure of this algorithm using the function Remove. - Standard_EXPORT Standard_Integer Contour (const TopoDS_Edge& E) const Standard_OVERRIDE; - + Standard_EXPORT Standard_Integer Contour(const TopoDS_Edge& E) const Standard_OVERRIDE; + //! Returns the number of edges in the contour of index I in //! the internal data structure of this algorithm. //! Warning //! Returns 0 if I is outside the bounds of the table of contours. - Standard_EXPORT Standard_Integer NbEdges (const Standard_Integer I) const Standard_OVERRIDE; - + Standard_EXPORT Standard_Integer NbEdges(const Standard_Integer I) const Standard_OVERRIDE; + //! Returns the edge of index J in the contour of index I in //! the internal data structure of this algorithm. //! Warning //! Returns a null shape if: //! - I is outside the bounds of the table of contours, or //! - J is outside the bounds of the table of edges of the index I contour. - Standard_EXPORT const TopoDS_Edge& Edge (const Standard_Integer I, const Standard_Integer J) const Standard_OVERRIDE; - + Standard_EXPORT const TopoDS_Edge& Edge(const Standard_Integer I, + const Standard_Integer J) const Standard_OVERRIDE; + //! Removes the contour in the internal data structure of //! this algorithm which contains the edge E of the shape. //! Warning //! Nothing is done if the edge E does not belong to the //! contour in the internal data structure of this algorithm. - Standard_EXPORT void Remove (const TopoDS_Edge& E) Standard_OVERRIDE; - + Standard_EXPORT void Remove(const TopoDS_Edge& E) Standard_OVERRIDE; + //! Returns the length of the contour of index IC in the //! internal data structure of this algorithm. //! Warning //! Returns -1. if IC is outside the bounds of the table of contours. - Standard_EXPORT Standard_Real Length (const Standard_Integer IC) const Standard_OVERRIDE; - + Standard_EXPORT Standard_Real Length(const Standard_Integer IC) const Standard_OVERRIDE; + //! Returns the first vertex of the contour of index IC //! in the internal data structure of this algorithm. //! Warning //! Returns a null shape if IC is outside the bounds of the table of contours. - Standard_EXPORT TopoDS_Vertex FirstVertex (const Standard_Integer IC) const Standard_OVERRIDE; - + Standard_EXPORT TopoDS_Vertex FirstVertex(const Standard_Integer IC) const Standard_OVERRIDE; + //! Returns the last vertex of the contour of index IC //! in the internal data structure of this algorithm. //! Warning //! Returns a null shape if IC is outside the bounds of the table of contours. - Standard_EXPORT TopoDS_Vertex LastVertex (const Standard_Integer IC) const Standard_OVERRIDE; - + Standard_EXPORT TopoDS_Vertex LastVertex(const Standard_Integer IC) const Standard_OVERRIDE; + //! Returns the curvilinear abscissa of the vertex V on the //! contour of index IC in the internal data structure of this algorithm. //! Warning //! Returns -1. if: //! - IC is outside the bounds of the table of contours, or //! - V is not on the contour of index IC. - Standard_EXPORT Standard_Real Abscissa (const Standard_Integer IC, const TopoDS_Vertex& V) const Standard_OVERRIDE; - + Standard_EXPORT Standard_Real Abscissa(const Standard_Integer IC, + const TopoDS_Vertex& V) const Standard_OVERRIDE; + //! Returns the relative curvilinear abscissa (i.e. between 0 //! and 1) of the vertex V on the contour of index IC in the //! internal data structure of this algorithm. @@ -257,21 +281,23 @@ public: //! Returns -1. if: //! - IC is outside the bounds of the table of contours, or //! - V is not on the contour of index IC. - Standard_EXPORT Standard_Real RelativeAbscissa (const Standard_Integer IC, const TopoDS_Vertex& V) const Standard_OVERRIDE; - + Standard_EXPORT Standard_Real RelativeAbscissa(const Standard_Integer IC, + const TopoDS_Vertex& V) const Standard_OVERRIDE; + //! Returns true if the contour of index IC in the internal //! data structure of this algorithm is closed and tangential //! at the point of closure. //! Warning //! Returns false if IC is outside the bounds of the table of contours. - Standard_EXPORT Standard_Boolean ClosedAndTangent (const Standard_Integer IC) const Standard_OVERRIDE; - + Standard_EXPORT Standard_Boolean + ClosedAndTangent(const Standard_Integer IC) const Standard_OVERRIDE; + //! Returns true if the contour of index IC in the internal //! data structure of this algorithm is closed. //! Warning //! Returns false if IC is outside the bounds of the table of contours. - Standard_EXPORT Standard_Boolean Closed (const Standard_Integer IC) const Standard_OVERRIDE; - + Standard_EXPORT Standard_Boolean Closed(const Standard_Integer IC) const Standard_OVERRIDE; + //! Builds the fillets on all the contours in the internal data //! structure of this algorithm and constructs the resulting shape. //! Use the function IsDone to verify that the filleted shape @@ -290,69 +316,74 @@ public: //! intersection of 4 or more edges of the shape, or //! - the intersection of the fillet with a face which limits //! the contour is not fully contained in this face. - Standard_EXPORT virtual void Build(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; - + Standard_EXPORT virtual void Build( + const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; + //! Reinitializes this algorithm, thus canceling the effects of the Build function. //! This function allows modifications to be made to the //! contours and fillet parameters in order to rebuild the shape. Standard_EXPORT void Reset() Standard_OVERRIDE; - + //! Returns the internal topology building algorithm. Standard_EXPORT Handle(TopOpeBRepBuild_HBuilder) Builder() const; - + //! Returns the list of shapes generated from the //! shape . - Standard_EXPORT virtual const TopTools_ListOfShape& Generated (const TopoDS_Shape& EorV) Standard_OVERRIDE; - + Standard_EXPORT virtual const TopTools_ListOfShape& Generated(const TopoDS_Shape& EorV) + Standard_OVERRIDE; + //! Returns the list of shapes modified from the shape //! . - Standard_EXPORT virtual const TopTools_ListOfShape& Modified (const TopoDS_Shape& F) Standard_OVERRIDE; - - Standard_EXPORT virtual Standard_Boolean IsDeleted (const TopoDS_Shape& F) Standard_OVERRIDE; - + Standard_EXPORT virtual const TopTools_ListOfShape& Modified(const TopoDS_Shape& F) + Standard_OVERRIDE; + + Standard_EXPORT virtual Standard_Boolean IsDeleted(const TopoDS_Shape& F) Standard_OVERRIDE; + //! returns the number of surfaces //! after the shape creation. Standard_EXPORT Standard_Integer NbSurfaces() const; - + //! Return the faces created for surface . - Standard_EXPORT const TopTools_ListOfShape& NewFaces (const Standard_Integer I); - - Standard_EXPORT void Simulate (const Standard_Integer IC) Standard_OVERRIDE; - - Standard_EXPORT Standard_Integer NbSurf (const Standard_Integer IC) const Standard_OVERRIDE; - - Standard_EXPORT Handle(ChFiDS_SecHArray1) Sect (const Standard_Integer IC, const Standard_Integer IS) const Standard_OVERRIDE; - + Standard_EXPORT const TopTools_ListOfShape& NewFaces(const Standard_Integer I); + + Standard_EXPORT void Simulate(const Standard_Integer IC) Standard_OVERRIDE; + + Standard_EXPORT Standard_Integer NbSurf(const Standard_Integer IC) const Standard_OVERRIDE; + + Standard_EXPORT Handle(ChFiDS_SecHArray1) Sect(const Standard_Integer IC, + const Standard_Integer IS) const Standard_OVERRIDE; + //! Returns the number of contours where the computation //! of the fillet failed Standard_EXPORT Standard_Integer NbFaultyContours() const; - + //! for each I in [1.. NbFaultyContours] returns the index IC of //! the contour where the computation of the fillet failed. //! the method NbEdges(IC) gives the number of edges in the contour IC //! the method Edge(IC,ie) gives the edge number ie of the contour IC - Standard_EXPORT Standard_Integer FaultyContour (const Standard_Integer I) const; - + Standard_EXPORT Standard_Integer FaultyContour(const Standard_Integer I) const; + //! returns the number of surfaces which have been //! computed on the contour IC - Standard_EXPORT Standard_Integer NbComputedSurfaces (const Standard_Integer IC) const; - + Standard_EXPORT Standard_Integer NbComputedSurfaces(const Standard_Integer IC) const; + //! returns the surface number IS concerning the contour IC - Standard_EXPORT Handle(Geom_Surface) ComputedSurface (const Standard_Integer IC, const Standard_Integer IS) const; - + Standard_EXPORT Handle(Geom_Surface) ComputedSurface(const Standard_Integer IC, + const Standard_Integer IS) const; + //! returns the number of vertices where the computation failed Standard_EXPORT Standard_Integer NbFaultyVertices() const; - + //! returns the vertex where the computation failed - Standard_EXPORT TopoDS_Vertex FaultyVertex (const Standard_Integer IV) const; - + Standard_EXPORT TopoDS_Vertex FaultyVertex(const Standard_Integer IV) const; + //! returns true if a part of the result has been computed //! if the filling in a corner failed a shape with a hole is returned Standard_EXPORT Standard_Boolean HasResult() const; - + //! if (HasResult()) returns the partial result Standard_EXPORT TopoDS_Shape BadShape() const; - + //! returns the status concerning the contour IC in case of error //! ChFiDS_Ok : the computation is Ok //! ChFiDS_StartsolFailure : the computation can't start, perhaps the @@ -361,31 +392,12 @@ public: //! surface //! ChFiDS_WalkingFailure : there is a problem in the walking //! ChFiDS_Error: other error different from above - Standard_EXPORT ChFiDS_ErrorStatus StripeStatus (const Standard_Integer IC) const; - - - + Standard_EXPORT ChFiDS_ErrorStatus StripeStatus(const Standard_Integer IC) const; protected: - - - - - private: - - - - ChFi3d_FilBuilder myBuilder; + ChFi3d_FilBuilder myBuilder; TopTools_MapOfShape myMap; - - }; - - - - - - #endif // _BRepFilletAPI_MakeFillet_HeaderFile diff --git a/opencascade/BRepFilletAPI_MakeFillet2d.hxx b/opencascade/BRepFilletAPI_MakeFillet2d.hxx index 63c24f723..132cfbf94 100644 --- a/opencascade/BRepFilletAPI_MakeFillet2d.hxx +++ b/opencascade/BRepFilletAPI_MakeFillet2d.hxx @@ -48,13 +48,11 @@ class TopoDS_Shape; //! Warning //! Only segments of straight lines and arcs of circles are //! treated. BSplines are not processed. -class BRepFilletAPI_MakeFillet2d : public BRepBuilderAPI_MakeShape +class BRepFilletAPI_MakeFillet2d : public BRepBuilderAPI_MakeShape { public: - DEFINE_STANDARD_ALLOC - //! Initializes an empty algorithm for computing fillets and //! chamfers. The face on which the fillets and //! chamfers are built is defined using the Init function. @@ -67,7 +65,7 @@ public: //! - ChFi2d_NotPlanar if F is not planar, //! - ChFi2d_NoFace if F is a null face. Standard_EXPORT BRepFilletAPI_MakeFillet2d(); - + //! Initializes an algorithm for computing fillets and chamfers on the face F. //! The vertices on which fillets or chamfers are built are //! defined using the AddFillet or AddChamfer function. @@ -78,7 +76,7 @@ public: //! - ChFi2d_NotPlanar if F is not planar, //! - ChFi2d_NoFace if F is a null face. Standard_EXPORT BRepFilletAPI_MakeFillet2d(const TopoDS_Face& F); - + //! Initializes this algorithm for constructing fillets or //! chamfers with the face F. //! Warning @@ -87,12 +85,12 @@ public: //! - ChFi2d_Ready if the initialization is correct, //! - ChFi2d_NotPlanar if F is not planar, //! - ChFi2d_NoFace if F is a null face. - Standard_EXPORT void Init (const TopoDS_Face& F); + Standard_EXPORT void Init(const TopoDS_Face& F); //! This initialize method allow to init the builder //! from a face RefFace and another face ModFace which derive from RefFace. //! This is useful to modify a fillet or a chamfer already created on ModFace. - Standard_EXPORT void Init (const TopoDS_Face& RefFace, const TopoDS_Face& ModFace); + Standard_EXPORT void Init(const TopoDS_Face& RefFace, const TopoDS_Face& ModFace); //! Adds a fillet of radius Radius between the two edges //! adjacent to the vertex V on the face modified by this @@ -112,8 +110,8 @@ public: //! Do not use the returned fillet if the status of the construction is not ChFi2d_IsDone. //! Exceptions //! Standard_NegativeValue if Radius is less than or equal to zero. - Standard_EXPORT TopoDS_Edge AddFillet (const TopoDS_Vertex& V, const Standard_Real Radius); - + Standard_EXPORT TopoDS_Edge AddFillet(const TopoDS_Vertex& V, const Standard_Real Radius); + //! Assigns the radius Radius to the fillet Fillet already //! built on the face modified by this algorithm. //! This function returns the new fillet and modifies the existing face. @@ -129,8 +127,8 @@ public: //! construction is not ChFi2d_IsDone. //! Exceptions //! Standard_NegativeValue if Radius is less than or equal to zero. - Standard_EXPORT TopoDS_Edge ModifyFillet (const TopoDS_Edge& Fillet, const Standard_Real Radius); - + Standard_EXPORT TopoDS_Edge ModifyFillet(const TopoDS_Edge& Fillet, const Standard_Real Radius); + //! Removes the fillet Fillet already built on the face //! modified by this algorithm. //! This function returns the vertex connecting the two @@ -140,8 +138,8 @@ public: //! function returns ChFi2d_IsDone. //! - A null vertex is returned if the edge Fillet does not //! belong to the initial face. - Standard_EXPORT TopoDS_Vertex RemoveFillet (const TopoDS_Edge& Fillet); - + Standard_EXPORT TopoDS_Vertex RemoveFillet(const TopoDS_Edge& Fillet); + //! Adds a chamfer on the face modified by this algorithm //! between the two adjacent edges E1 and E2, where //! the extremities of the chamfer are on E1 and E2 at @@ -152,8 +150,11 @@ public: //! tangent at the corresponding point. //! The angle Ang is given in radians. //! This function returns the chamfer and builds the resulting face. - Standard_EXPORT TopoDS_Edge AddChamfer (const TopoDS_Edge& E1, const TopoDS_Edge& E2, const Standard_Real D1, const Standard_Real D2); - + Standard_EXPORT TopoDS_Edge AddChamfer(const TopoDS_Edge& E1, + const TopoDS_Edge& E2, + const Standard_Real D1, + const Standard_Real D2); + //! Adds a chamfer on the face modified by this algorithm //! between the two edges connected by the vertex V, //! where E is one of the two edges. The chamfer makes @@ -181,15 +182,22 @@ public: //! - a curve other than a straight line or an arc of a circle is used as E, E1 or E2. //! Do not use the returned chamfer if //! the status of the construction is not ChFi2d_IsDone. - Standard_EXPORT TopoDS_Edge AddChamfer (const TopoDS_Edge& E, const TopoDS_Vertex& V, const Standard_Real D, const Standard_Real Ang); - + Standard_EXPORT TopoDS_Edge AddChamfer(const TopoDS_Edge& E, + const TopoDS_Vertex& V, + const Standard_Real D, + const Standard_Real Ang); + //! Modifies the chamfer Chamfer on the face modified //! by this algorithm, where: //! E1 and E2 are the two adjacent edges on which //! Chamfer is already built; the extremities of the new //! chamfer are on E1 and E2 at distances D1 and D2 respectively. - Standard_EXPORT TopoDS_Edge ModifyChamfer (const TopoDS_Edge& Chamfer, const TopoDS_Edge& E1, const TopoDS_Edge& E2, const Standard_Real D1, const Standard_Real D2); - + Standard_EXPORT TopoDS_Edge ModifyChamfer(const TopoDS_Edge& Chamfer, + const TopoDS_Edge& E1, + const TopoDS_Edge& E2, + const Standard_Real D1, + const Standard_Real D2); + //! Modifies the chamfer Chamfer on the face modified //! by this algorithm, where: //! E is one of the two adjacent edges on which @@ -217,8 +225,11 @@ public: //! - ChFi2d_NotAuthorized if E1 or E2 is a fillet or chamfer. //! Do not use the returned chamfer if the status of the //! construction is not ChFi2d_IsDone. - Standard_EXPORT TopoDS_Edge ModifyChamfer (const TopoDS_Edge& Chamfer, const TopoDS_Edge& E, const Standard_Real D, const Standard_Real Ang); - + Standard_EXPORT TopoDS_Edge ModifyChamfer(const TopoDS_Edge& Chamfer, + const TopoDS_Edge& E, + const Standard_Real D, + const Standard_Real Ang); + //! Removes the chamfer Chamfer already built on the face //! modified by this algorithm. //! This function returns the vertex connecting the two @@ -228,82 +239,66 @@ public: //! function returns ChFi2d_IsDone. //! - A null vertex is returned if the edge Chamfer does //! not belong to the initial face. - Standard_EXPORT TopoDS_Vertex RemoveChamfer (const TopoDS_Edge& Chamfer); - + Standard_EXPORT TopoDS_Vertex RemoveChamfer(const TopoDS_Edge& Chamfer); + //! Returns true if the edge E on the face modified by this //! algorithm is chamfered or filleted. //! Warning //! Returns false if E does not belong to the face modified by this algorithm. - Standard_Boolean IsModified (const TopoDS_Edge& E) const; - + Standard_Boolean IsModified(const TopoDS_Edge& E) const; + //! Returns the table of fillets on the face modified by this algorithm. - const TopTools_SequenceOfShape& FilletEdges() const; - + const TopTools_SequenceOfShape& FilletEdges() const; + //! Returns the number of fillets on the face modified by this algorithm. - Standard_Integer NbFillet() const; - + Standard_Integer NbFillet() const; + //! Returns the table of chamfers on the face modified by this algorithm. - const TopTools_SequenceOfShape& ChamferEdges() const; - + const TopTools_SequenceOfShape& ChamferEdges() const; + //! Returns the number of chamfers on the face modified by this algorithm. - Standard_Integer NbChamfer() const; - + Standard_Integer NbChamfer() const; + //! Returns the list of shapes modified from the shape //! . - Standard_EXPORT virtual const TopTools_ListOfShape& Modified (const TopoDS_Shape& S) Standard_OVERRIDE; - + Standard_EXPORT virtual const TopTools_ListOfShape& Modified(const TopoDS_Shape& S) + Standard_OVERRIDE; + //! returns the number of new curves //! after the shape creation. Standard_EXPORT Standard_Integer NbCurves() const; - + //! Return the Edges created for curve I. - Standard_EXPORT const TopTools_ListOfShape& NewEdges (const Standard_Integer I); - - Standard_Boolean HasDescendant (const TopoDS_Edge& E) const; - + Standard_EXPORT const TopTools_ListOfShape& NewEdges(const Standard_Integer I); + + Standard_Boolean HasDescendant(const TopoDS_Edge& E) const; + //! Returns the chamfered or filleted edge built from the //! edge E on the face modified by this algorithm. If E has //! not been modified, this function returns E. //! Exceptions //! Standard_NoSuchObject if the edge E does not //! belong to the initial face. - const TopoDS_Edge& DescendantEdge (const TopoDS_Edge& E) const; - + const TopoDS_Edge& DescendantEdge(const TopoDS_Edge& E) const; + //! Returns the basis edge on the face modified by this //! algorithm from which the chamfered or filleted edge E is //! built. If E has not been modified, this function returns E. //! Warning //! E is returned if it does not belong to the initial face. - Standard_EXPORT const TopoDS_Edge& BasisEdge (const TopoDS_Edge& E) const; - - ChFi2d_ConstructionError Status() const; - - //! Update the result and set the Done flag - Standard_EXPORT virtual void Build(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; - + Standard_EXPORT const TopoDS_Edge& BasisEdge(const TopoDS_Edge& E) const; + ChFi2d_ConstructionError Status() const; + //! Update the result and set the Done flag + Standard_EXPORT virtual void Build( + const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; protected: - - - - - private: - - - ChFi2d_Builder myMakeChFi2d; - - }; - #include - - - - #endif // _BRepFilletAPI_MakeFillet2d_HeaderFile diff --git a/opencascade/BRepFilletAPI_MakeFillet2d.lxx b/opencascade/BRepFilletAPI_MakeFillet2d.lxx index 47caab6ba..9edee307b 100644 --- a/opencascade/BRepFilletAPI_MakeFillet2d.lxx +++ b/opencascade/BRepFilletAPI_MakeFillet2d.lxx @@ -15,82 +15,81 @@ // commercial license or contractual agreement. //======================================================================= -//function : IsModified -//purpose : +// function : IsModified +// purpose : //======================================================================= -inline Standard_Boolean BRepFilletAPI_MakeFillet2d::IsModified(const TopoDS_Edge& E) const +inline Standard_Boolean BRepFilletAPI_MakeFillet2d::IsModified(const TopoDS_Edge& E) const { return myMakeChFi2d.IsModified(E); } //======================================================================= -//function : FilletEdges -//purpose : +// function : FilletEdges +// purpose : //======================================================================= -inline const TopTools_SequenceOfShape& BRepFilletAPI_MakeFillet2d::FilletEdges() const +inline const TopTools_SequenceOfShape& BRepFilletAPI_MakeFillet2d::FilletEdges() const { return myMakeChFi2d.FilletEdges(); } //======================================================================= -//function : NbFillet -//purpose : +// function : NbFillet +// purpose : //======================================================================= -inline Standard_Integer BRepFilletAPI_MakeFillet2d::NbFillet() const +inline Standard_Integer BRepFilletAPI_MakeFillet2d::NbFillet() const { return myMakeChFi2d.NbFillet(); } //======================================================================= -//function : ChamferEdges -//purpose : +// function : ChamferEdges +// purpose : //======================================================================= -inline const TopTools_SequenceOfShape& BRepFilletAPI_MakeFillet2d::ChamferEdges() const +inline const TopTools_SequenceOfShape& BRepFilletAPI_MakeFillet2d::ChamferEdges() const { return myMakeChFi2d.ChamferEdges(); } //======================================================================= -//function : NbChamfer -//purpose : +// function : NbChamfer +// purpose : //======================================================================= -inline Standard_Integer BRepFilletAPI_MakeFillet2d::NbChamfer() const +inline Standard_Integer BRepFilletAPI_MakeFillet2d::NbChamfer() const { - return myMakeChFi2d.NbChamfer(); + return myMakeChFi2d.NbChamfer(); } //======================================================================= -//function : HasDescendant -//purpose : +// function : HasDescendant +// purpose : //======================================================================= -inline Standard_Boolean BRepFilletAPI_MakeFillet2d::HasDescendant(const TopoDS_Edge& E) const +inline Standard_Boolean BRepFilletAPI_MakeFillet2d::HasDescendant(const TopoDS_Edge& E) const { return myMakeChFi2d.HasDescendant(E); } //======================================================================= -//function : DescendantEdge -//purpose : +// function : DescendantEdge +// purpose : //======================================================================= -inline const TopoDS_Edge& BRepFilletAPI_MakeFillet2d::DescendantEdge(const TopoDS_Edge& E) const +inline const TopoDS_Edge& BRepFilletAPI_MakeFillet2d::DescendantEdge(const TopoDS_Edge& E) const { return myMakeChFi2d.DescendantEdge(E); } //======================================================================= -//function : Status -//purpose : +// function : Status +// purpose : //======================================================================= -inline ChFi2d_ConstructionError BRepFilletAPI_MakeFillet2d::Status() const +inline ChFi2d_ConstructionError BRepFilletAPI_MakeFillet2d::Status() const { return myMakeChFi2d.Status(); } - diff --git a/opencascade/BRepGProp.hxx b/opencascade/BRepGProp.hxx index 977b5affb..28b78d347 100644 --- a/opencascade/BRepGProp.hxx +++ b/opencascade/BRepGProp.hxx @@ -28,7 +28,6 @@ class TopoDS_Shape; class GProp_GProps; class gp_Pln; - //! Provides global functions to compute a shape's global //! properties for lines, surfaces or volumes, and bring //! them together with the global properties already @@ -41,13 +40,11 @@ class gp_Pln; //! - its radius of gyration about an axis, //! - and its principal properties of inertia such as //! principal axis, principal moments, principal radius of gyration. -class BRepGProp +class BRepGProp { public: - DEFINE_STANDARD_ALLOC - //! Computes the linear global properties of the shape S, //! i.e. the global properties induced by each edge of the //! shape S, and brings them together with the global @@ -77,20 +74,22 @@ public: //! No check is performed to verify that the shape S //! retains truly linear properties. If S is simply a vertex, it //! is not considered to present any additional global properties. - //! SkipShared is a special flag, which allows taking in calculation + //! SkipShared is a special flag, which allows taking in calculation //! shared topological entities or not. - //! For ex., if SkipShared = True, edges, shared by two or more faces, + //! For ex., if SkipShared = True, edges, shared by two or more faces, //! are taken into calculation only once. - //! If we have cube with sizes 1, 1, 1, its linear properties = 12 + //! If we have cube with sizes 1, 1, 1, its linear properties = 12 //! for SkipEdges = true and 24 for SkipEdges = false. - //! UseTriangulation is a special flag, which defines preferable + //! UseTriangulation is a special flag, which defines preferable //! source of geometry data. If UseTriangulation = Standard_False, - //! exact geometry objects (curves) are used, otherwise polygons of + //! exact geometry objects (curves) are used, otherwise polygons of //! triangulation are used first. - Standard_EXPORT static void LinearProperties(const TopoDS_Shape& S, GProp_GProps& LProps, - const Standard_Boolean SkipShared = Standard_False, - const Standard_Boolean UseTriangulation = Standard_False); - + Standard_EXPORT static void LinearProperties( + const TopoDS_Shape& S, + GProp_GProps& LProps, + const Standard_Boolean SkipShared = Standard_False, + const Standard_Boolean UseTriangulation = Standard_False); + //! Computes the surface global properties of the //! shape S, i.e. the global properties induced by each //! face of the shape S, and brings them together with @@ -123,18 +122,20 @@ public: //! retains truly surface properties. If S is simply a //! vertex, an edge or a wire, it is not considered to //! present any additional global properties. - //! SkipShared is a special flag, which allows taking in calculation + //! SkipShared is a special flag, which allows taking in calculation //! shared topological entities or not. - //! For ex., if SkipShared = True, faces, shared by two or more shells, + //! For ex., if SkipShared = True, faces, shared by two or more shells, //! are taken into calculation only once. - //! UseTriangulation is a special flag, which defines preferable + //! UseTriangulation is a special flag, which defines preferable //! source of geometry data. If UseTriangulation = Standard_False, - //! exact geometry objects (surfaces) are used, + //! exact geometry objects (surfaces) are used, //! otherwise face triangulations are used first. - Standard_EXPORT static void SurfaceProperties(const TopoDS_Shape& S, GProp_GProps& SProps, - const Standard_Boolean SkipShared = Standard_False, - const Standard_Boolean UseTriangulation = Standard_False); - + Standard_EXPORT static void SurfaceProperties( + const TopoDS_Shape& S, + GProp_GProps& SProps, + const Standard_Boolean SkipShared = Standard_False, + const Standard_Boolean UseTriangulation = Standard_False); + //! Updates with the shape , that contains its principal properties. //! The surface properties of all the faces in are computed. //! Adaptive 2D Gauss integration is used. @@ -143,12 +144,15 @@ public: //! for two successive steps of adaptive integration. //! Method returns estimation of relative error reached for whole shape. //! WARNING: if Eps > 0.001 algorithm performs non-adaptive integration. - //! SkipShared is a special flag, which allows taking in calculation + //! SkipShared is a special flag, which allows taking in calculation //! shared topological entities or not - //! For ex., if SkipShared = True, faces, shared by two or more shells, + //! For ex., if SkipShared = True, faces, shared by two or more shells, //! are taken into calculation only once. - Standard_EXPORT static Standard_Real SurfaceProperties (const TopoDS_Shape& S, GProp_GProps& SProps, - const Standard_Real Eps, const Standard_Boolean SkipShared = Standard_False); + Standard_EXPORT static Standard_Real SurfaceProperties( + const TopoDS_Shape& S, + GProp_GProps& SProps, + const Standard_Real Eps, + const Standard_Boolean SkipShared = Standard_False); //! //! Computes the global volume properties of the solid //! S, and brings them together with the global @@ -181,21 +185,23 @@ public: //! oriented in a coherent way. Nonetheless, S must be //! exempt of any free boundary. Note that these //! conditions of coherence are not checked by this - //! algorithm, and results will be false if they are not respected. - //! SkipShared a is special flag, which allows taking in calculation + //! algorithm, and results will be false if they are not respected. + //! SkipShared a is special flag, which allows taking in calculation //! shared topological entities or not. - //! For ex., if SkipShared = True, the volumes formed by the equal - //! (the same TShape, location and orientation) faces are taken + //! For ex., if SkipShared = True, the volumes formed by the equal + //! (the same TShape, location and orientation) faces are taken //! into calculation only once. //! UseTriangulation is a special flag, which defines preferable //! source of geometry data. If UseTriangulation = Standard_False, - //! exact geometry objects (surfaces) are used, + //! exact geometry objects (surfaces) are used, //! otherwise face triangulations are used first. - Standard_EXPORT static void VolumeProperties(const TopoDS_Shape& S, GProp_GProps& VProps, - const Standard_Boolean OnlyClosed = Standard_False, - const Standard_Boolean SkipShared = Standard_False, - const Standard_Boolean UseTriangulation = Standard_False); - + Standard_EXPORT static void VolumeProperties( + const TopoDS_Shape& S, + GProp_GProps& VProps, + const Standard_Boolean OnlyClosed = Standard_False, + const Standard_Boolean SkipShared = Standard_False, + const Standard_Boolean UseTriangulation = Standard_False); + //! Updates with the shape , that contains its principal properties. //! The volume properties of all the FORWARD and REVERSED faces in are computed. //! If OnlyClosed is True then computed faces must belong to closed Shells. @@ -207,13 +213,16 @@ public: //! WARNING: if Eps > 0.001 algorithm performs non-adaptive integration. //! SkipShared is a special flag, which allows taking in calculation shared //! topological entities or not. - //! For ex., if SkipShared = True, the volumes formed by the equal - //! (the same TShape, location and orientation) + //! For ex., if SkipShared = True, the volumes formed by the equal + //! (the same TShape, location and orientation) //! faces are taken into calculation only once. - Standard_EXPORT static Standard_Real VolumeProperties (const TopoDS_Shape& S, GProp_GProps& VProps, - const Standard_Real Eps, const Standard_Boolean OnlyClosed = Standard_False, - const Standard_Boolean SkipShared = Standard_False); - + Standard_EXPORT static Standard_Real VolumeProperties( + const TopoDS_Shape& S, + GProp_GProps& VProps, + const Standard_Real Eps, + const Standard_Boolean OnlyClosed = Standard_False, + const Standard_Boolean SkipShared = Standard_False); + //! Updates with the shape , that contains its principal properties. //! The volume properties of all the FORWARD and REVERSED faces in are computed. //! If OnlyClosed is True then computed faces must belong to closed Shells. @@ -227,26 +236,28 @@ public: //! Returns negative value if the computation is failed. //! SkipShared is a special flag, which allows taking in calculation //! shared topological entities or not. - //! For ex., if SkipShared = True, the volumes formed by the equal + //! For ex., if SkipShared = True, the volumes formed by the equal //! (the same TShape, location and orientation) faces are taken into calculation only once. - Standard_EXPORT static Standard_Real VolumePropertiesGK (const TopoDS_Shape& S, - GProp_GProps& VProps, - const Standard_Real Eps = 0.001, - const Standard_Boolean OnlyClosed = Standard_False, - const Standard_Boolean IsUseSpan = Standard_False, - const Standard_Boolean CGFlag = Standard_False, - const Standard_Boolean IFlag = Standard_False, - const Standard_Boolean SkipShared = Standard_False); - - Standard_EXPORT static Standard_Real VolumePropertiesGK (const TopoDS_Shape& S, - GProp_GProps& VProps, - const gp_Pln& thePln, const Standard_Real Eps = 0.001, - const Standard_Boolean OnlyClosed = Standard_False, - const Standard_Boolean IsUseSpan = Standard_False, - const Standard_Boolean CGFlag = Standard_False, - const Standard_Boolean IFlag = Standard_False, + Standard_EXPORT static Standard_Real VolumePropertiesGK( + const TopoDS_Shape& S, + GProp_GProps& VProps, + const Standard_Real Eps = 0.001, + const Standard_Boolean OnlyClosed = Standard_False, + const Standard_Boolean IsUseSpan = Standard_False, + const Standard_Boolean CGFlag = Standard_False, + const Standard_Boolean IFlag = Standard_False, const Standard_Boolean SkipShared = Standard_False); + Standard_EXPORT static Standard_Real VolumePropertiesGK( + const TopoDS_Shape& S, + GProp_GProps& VProps, + const gp_Pln& thePln, + const Standard_Real Eps = 0.001, + const Standard_Boolean OnlyClosed = Standard_False, + const Standard_Boolean IsUseSpan = Standard_False, + const Standard_Boolean CGFlag = Standard_False, + const Standard_Boolean IFlag = Standard_False, + const Standard_Boolean SkipShared = Standard_False); }; #endif // _BRepGProp_HeaderFile diff --git a/opencascade/BRepGProp_Cinert.hxx b/opencascade/BRepGProp_Cinert.hxx index 291260426..08891e0ea 100644 --- a/opencascade/BRepGProp_Cinert.hxx +++ b/opencascade/BRepGProp_Cinert.hxx @@ -24,50 +24,27 @@ class BRepAdaptor_Curve; class gp_Pnt; - - //! Computes the global properties of bounded curves //! in 3D space. The curve must have at least a continuity C1. //! It can be a curve as defined in the template CurveTool from //! package GProp. This template gives the minimum of methods //! required to evaluate the global properties of a curve 3D with //! the algorithms of GProp. -class BRepGProp_Cinert : public GProp_GProps +class BRepGProp_Cinert : public GProp_GProps { public: - DEFINE_STANDARD_ALLOC - Standard_EXPORT BRepGProp_Cinert(); - - Standard_EXPORT BRepGProp_Cinert(const BRepAdaptor_Curve& C, const gp_Pnt& CLocation); - - Standard_EXPORT void SetLocation (const gp_Pnt& CLocation); - - Standard_EXPORT void Perform (const BRepAdaptor_Curve& C); + Standard_EXPORT BRepGProp_Cinert(const BRepAdaptor_Curve& C, const gp_Pnt& CLocation); + Standard_EXPORT void SetLocation(const gp_Pnt& CLocation); + Standard_EXPORT void Perform(const BRepAdaptor_Curve& C); protected: - - - - - private: - - - - - }; - - - - - - #endif // _BRepGProp_Cinert_HeaderFile diff --git a/opencascade/BRepGProp_Domain.hxx b/opencascade/BRepGProp_Domain.hxx index 133c6dd07..cd2d6c9ae 100644 --- a/opencascade/BRepGProp_Domain.hxx +++ b/opencascade/BRepGProp_Domain.hxx @@ -26,63 +26,40 @@ class TopoDS_Face; class TopoDS_Edge; - //! Arc iterator. Returns only Forward and Reversed edges from //! the face in an undigested order. -class BRepGProp_Domain +class BRepGProp_Domain { public: - DEFINE_STANDARD_ALLOC - //! Empty constructor. - BRepGProp_Domain(); - + BRepGProp_Domain(); + //! Constructor. Initializes the domain with the face. - BRepGProp_Domain(const TopoDS_Face& F); - + BRepGProp_Domain(const TopoDS_Face& F); + //! Initializes the domain with the face. - void Init (const TopoDS_Face& F); - + void Init(const TopoDS_Face& F); //! Returns True if there is another arc of curve in the list. - Standard_Boolean More(); - + Standard_Boolean More(); + //! Initializes the exploration with the face already set. - void Init(); - + void Init(); + //! Returns the current edge. - const TopoDS_Edge& Value(); - + const TopoDS_Edge& Value(); //! Sets the index of the arc iterator to the next arc of //! curve. Standard_EXPORT void Next(); - - - protected: - - - - - private: - - - TopExp_Explorer myExplorer; - - }; - #include - - - - #endif // _BRepGProp_Domain_HeaderFile diff --git a/opencascade/BRepGProp_Domain.lxx b/opencascade/BRepGProp_Domain.lxx index a0b0c3ede..19ec83d07 100644 --- a/opencascade/BRepGProp_Domain.lxx +++ b/opencascade/BRepGProp_Domain.lxx @@ -18,60 +18,58 @@ #include //======================================================================= -//function : BRepGProp_Domain -//purpose : Empty constructor. +// function : BRepGProp_Domain +// purpose : Empty constructor. //======================================================================= -inline BRepGProp_Domain::BRepGProp_Domain () -{ -} +inline BRepGProp_Domain::BRepGProp_Domain() {} //======================================================================= -//function : BRepGProp_Domain -//purpose : Constructor. Initializes the domain with the face. +// function : BRepGProp_Domain +// purpose : Constructor. Initializes the domain with the face. //======================================================================= -inline BRepGProp_Domain::BRepGProp_Domain (const TopoDS_Face& F) : - myExplorer(F.Oriented(TopAbs_FORWARD),TopAbs_EDGE) +inline BRepGProp_Domain::BRepGProp_Domain(const TopoDS_Face& F) + : myExplorer(F.Oriented(TopAbs_FORWARD), TopAbs_EDGE) { } //======================================================================= -//function : Init -//purpose : Initializes the domain with the face. +// function : Init +// purpose : Initializes the domain with the face. //======================================================================= inline void BRepGProp_Domain::Init(const TopoDS_Face& F) { - myExplorer.Init(F.Oriented(TopAbs_FORWARD),TopAbs_EDGE); + myExplorer.Init(F.Oriented(TopAbs_FORWARD), TopAbs_EDGE); } //======================================================================= -//function : More -//purpose : Returns True if there is another arc of curve in the list. +// function : More +// purpose : Returns True if there is another arc of curve in the list. //======================================================================= -inline Standard_Boolean BRepGProp_Domain::More () +inline Standard_Boolean BRepGProp_Domain::More() { return myExplorer.More(); } //======================================================================= -//function : Init -//purpose : Initializes the exploration with the face already set. +// function : Init +// purpose : Initializes the exploration with the face already set. //======================================================================= -inline void BRepGProp_Domain::Init () +inline void BRepGProp_Domain::Init() { myExplorer.ReInit(); } //======================================================================= -//function : Value -//purpose : Returns the current edge. +// function : Value +// purpose : Returns the current edge. //======================================================================= -inline const TopoDS_Edge& BRepGProp_Domain::Value () +inline const TopoDS_Edge& BRepGProp_Domain::Value() { return TopoDS::Edge(myExplorer.Current()); } diff --git a/opencascade/BRepGProp_EdgeTool.hxx b/opencascade/BRepGProp_EdgeTool.hxx index 2e4197d77..3c87befd9 100644 --- a/opencascade/BRepGProp_EdgeTool.hxx +++ b/opencascade/BRepGProp_EdgeTool.hxx @@ -27,76 +27,56 @@ class BRepAdaptor_Curve; class gp_Pnt; class gp_Vec; - //! Provides the required methods to instantiate //! CGProps from GProp with a Curve from BRepAdaptor. -class BRepGProp_EdgeTool +class BRepGProp_EdgeTool { public: - DEFINE_STANDARD_ALLOC - - //! Returns the parametric value of the start point of //! the curve. The curve is oriented from the start point //! to the end point. - Standard_EXPORT static Standard_Real FirstParameter (const BRepAdaptor_Curve& C); - + Standard_EXPORT static Standard_Real FirstParameter(const BRepAdaptor_Curve& C); //! Returns the parametric value of the end point of //! the curve. The curve is oriented from the start point //! to the end point. - Standard_EXPORT static Standard_Real LastParameter (const BRepAdaptor_Curve& C); - + Standard_EXPORT static Standard_Real LastParameter(const BRepAdaptor_Curve& C); //! Returns the number of Gauss points required to do //! the integration with a good accuracy using the //! Gauss method. For a polynomial curve of degree n //! the maxima of accuracy is obtained with an order //! of integration equal to 2*n-1. - Standard_EXPORT static Standard_Integer IntegrationOrder (const BRepAdaptor_Curve& C); - + Standard_EXPORT static Standard_Integer IntegrationOrder(const BRepAdaptor_Curve& C); + //! Returns the point of parameter U on the loaded curve. - Standard_EXPORT static gp_Pnt Value (const BRepAdaptor_Curve& C, const Standard_Real U); - + Standard_EXPORT static gp_Pnt Value(const BRepAdaptor_Curve& C, const Standard_Real U); //! Returns the point of parameter U and the first derivative //! at this point. - Standard_EXPORT static void D1 (const BRepAdaptor_Curve& C, const Standard_Real U, gp_Pnt& P, gp_Vec& V1); - + Standard_EXPORT static void D1(const BRepAdaptor_Curve& C, + const Standard_Real U, + gp_Pnt& P, + gp_Vec& V1); + //! Returns the number of intervals for continuity //! . May be one if Continuity(me) >= - Standard_EXPORT static Standard_Integer NbIntervals (const BRepAdaptor_Curve& C, const GeomAbs_Shape S); - + Standard_EXPORT static Standard_Integer NbIntervals(const BRepAdaptor_Curve& C, + const GeomAbs_Shape S); + //! Stores in the parameters bounding the intervals //! of continuity . //! //! The array must provide enough room to accommodate //! for the parameters. i.e. T.Length() > NbIntervals() - Standard_EXPORT static void Intervals (const BRepAdaptor_Curve& C, TColStd_Array1OfReal& T, const GeomAbs_Shape S); - - - + Standard_EXPORT static void Intervals(const BRepAdaptor_Curve& C, + TColStd_Array1OfReal& T, + const GeomAbs_Shape S); protected: - - - - - private: - - - - - }; - - - - - - #endif // _BRepGProp_EdgeTool_HeaderFile diff --git a/opencascade/BRepGProp_Face.hxx b/opencascade/BRepGProp_Face.hxx index 7dd3a32b6..9606179cd 100644 --- a/opencascade/BRepGProp_Face.hxx +++ b/opencascade/BRepGProp_Face.hxx @@ -35,89 +35,91 @@ class TopoDS_Edge; class gp_Pnt2d; class gp_Vec2d; - - -class BRepGProp_Face +class BRepGProp_Face { public: - DEFINE_STANDARD_ALLOC - //! Constructor. Initializes the object with a flag IsUseSpan //! that says if it is necessary to define spans on a face. //! This option has an effect only for BSpline faces. Spans //! are returned by the methods GetUKnots and GetTKnots. - BRepGProp_Face(const Standard_Boolean IsUseSpan = Standard_False); - + BRepGProp_Face(const Standard_Boolean IsUseSpan = Standard_False); + //! Constructor. Initializes the object with the face and the //! flag IsUseSpan that says if it is necessary to define //! spans on a face. This option has an effect only for //! BSpline faces. Spans are returned by the methods GetUKnots //! and GetTKnots. - BRepGProp_Face(const TopoDS_Face& F, const Standard_Boolean IsUseSpan = Standard_False); - - Standard_EXPORT void Load (const TopoDS_Face& F); - + BRepGProp_Face(const TopoDS_Face& F, const Standard_Boolean IsUseSpan = Standard_False); + + Standard_EXPORT void Load(const TopoDS_Face& F); + Standard_EXPORT Standard_Integer VIntegrationOrder() const; - + //! Returns Standard_True if the face is not trimmed. - Standard_Boolean NaturalRestriction() const; + Standard_Boolean NaturalRestriction() const; //! Returns the TopoDS face. - const TopoDS_Face& GetFace() const; - + const TopoDS_Face& GetFace() const; + //! Returns the value of the boundary curve of the face. - gp_Pnt2d Value2d (const Standard_Real U) const; - - Standard_EXPORT Standard_Integer SIntOrder (const Standard_Real Eps) const; - + gp_Pnt2d Value2d(const Standard_Real U) const; + + Standard_EXPORT Standard_Integer SIntOrder(const Standard_Real Eps) const; + Standard_EXPORT Standard_Integer SVIntSubs() const; - + Standard_EXPORT Standard_Integer SUIntSubs() const; - - Standard_EXPORT void UKnots (TColStd_Array1OfReal& Knots) const; - - Standard_EXPORT void VKnots (TColStd_Array1OfReal& Knots) const; - - Standard_EXPORT Standard_Integer LIntOrder (const Standard_Real Eps) const; - + + Standard_EXPORT void UKnots(TColStd_Array1OfReal& Knots) const; + + Standard_EXPORT void VKnots(TColStd_Array1OfReal& Knots) const; + + Standard_EXPORT Standard_Integer LIntOrder(const Standard_Real Eps) const; + Standard_EXPORT Standard_Integer LIntSubs() const; - - Standard_EXPORT void LKnots (TColStd_Array1OfReal& Knots) const; - + + Standard_EXPORT void LKnots(TColStd_Array1OfReal& Knots) const; + //! Returns the number of points required to do the //! integration in the U parametric direction with //! a good accuracy. Standard_EXPORT Standard_Integer UIntegrationOrder() const; - + //! Returns the parametric bounds of the Face. - Standard_EXPORT void Bounds (Standard_Real& U1, Standard_Real& U2, Standard_Real& V1, Standard_Real& V2) const; - + Standard_EXPORT void Bounds(Standard_Real& U1, + Standard_Real& U2, + Standard_Real& V1, + Standard_Real& V2) const; + //! Computes the point of parameter U, V on the Face and //! the normal to the face at this point. - Standard_EXPORT void Normal (const Standard_Real U, const Standard_Real V, gp_Pnt& P, gp_Vec& VNor) const; - + Standard_EXPORT void Normal(const Standard_Real U, + const Standard_Real V, + gp_Pnt& P, + gp_Vec& VNor) const; + //! Loading the boundary arc. //! Returns FALSE if edge has no P-Curve. - Standard_EXPORT bool Load (const TopoDS_Edge& E); - + Standard_EXPORT bool Load(const TopoDS_Edge& E); + //! Returns the parametric value of the start point of //! the current arc of curve. - Standard_Real FirstParameter() const; - + Standard_Real FirstParameter() const; + //! Returns the parametric value of the end point of //! the current arc of curve. - Standard_Real LastParameter() const; - + Standard_Real LastParameter() const; + //! Returns the number of points required to do the //! integration along the parameter of curve. Standard_EXPORT Standard_Integer IntegrationOrder() const; - + //! Returns the point of parameter U and the first derivative //! at this point of a boundary curve. - void D12d (const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V1) const; - + void D12d(const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V1) const; + //! Loading the boundary arc. This arc is either a top, bottom, //! left or right bound of a UV rectangle in which the //! parameters of surface are defined. @@ -127,16 +129,18 @@ public: //! If theIsoType is equal to GeomAbs_IsoU, the face is //! initialized with either left or right bound. Otherwise - //! with either top or bottom one. - Standard_EXPORT void Load (const Standard_Boolean IsFirstParam, const GeomAbs_IsoType theIsoType); - + Standard_EXPORT void Load(const Standard_Boolean IsFirstParam, const GeomAbs_IsoType theIsoType); + //! Returns an array of U knots of the face. The first and last //! elements of the array will be theUMin and theUMax. The //! middle elements will be the U Knots of the face greater //! then theUMin and lower then theUMax in increasing order. //! If the face is not a BSpline, the array initialized with //! theUMin and theUMax only. - Standard_EXPORT void GetUKnots (const Standard_Real theUMin, const Standard_Real theUMax, Handle(TColStd_HArray1OfReal)& theUKnots) const; - + Standard_EXPORT void GetUKnots(const Standard_Real theUMin, + const Standard_Real theUMax, + Handle(TColStd_HArray1OfReal)& theUKnots) const; + //! Returns an array of combination of T knots of the arc and //! V knots of the face. The first and last elements of the //! array will be theTMin and theTMax. The middle elements will @@ -146,34 +150,18 @@ public: //! theTMin and lower then theTMax in increasing order. //! If the face is not a BSpline, the array initialized with //! theTMin and theTMax only. - Standard_EXPORT void GetTKnots (const Standard_Real theTMin, const Standard_Real theTMax, Handle(TColStd_HArray1OfReal)& theTKnots) const; - - - + Standard_EXPORT void GetTKnots(const Standard_Real theTMin, + const Standard_Real theTMax, + Handle(TColStd_HArray1OfReal)& theTKnots) const; protected: - - - - - private: - - - BRepAdaptor_Surface mySurface; Geom2dAdaptor_Curve myCurve; - Standard_Boolean mySReverse; - Standard_Boolean myIsUseSpan; - - + Standard_Boolean mySReverse; + Standard_Boolean myIsUseSpan; }; - #include - - - - #endif // _BRepGProp_Face_HeaderFile diff --git a/opencascade/BRepGProp_Face.lxx b/opencascade/BRepGProp_Face.lxx index 4c5661c3a..fc14d4733 100644 --- a/opencascade/BRepGProp_Face.lxx +++ b/opencascade/BRepGProp_Face.lxx @@ -16,42 +16,42 @@ #include //======================================================================= -//function : BRepGProp_Face -//purpose : Constructor. Initializes the object with IsUseSpan. +// function : BRepGProp_Face +// purpose : Constructor. Initializes the object with IsUseSpan. //======================================================================= inline BRepGProp_Face::BRepGProp_Face(const Standard_Boolean IsUseSpan) - : mySReverse (Standard_False), - myIsUseSpan(IsUseSpan) + : mySReverse(Standard_False), + myIsUseSpan(IsUseSpan) { } //======================================================================= -//function : BRepGProp_Face -//purpose : Constructor.Initializes the object with the face and +// function : BRepGProp_Face +// purpose : Constructor.Initializes the object with the face and // IsUseSpan flan. //======================================================================= -inline BRepGProp_Face::BRepGProp_Face(const TopoDS_Face &F, - const Standard_Boolean IsUseSpan) - : myIsUseSpan(IsUseSpan) +inline BRepGProp_Face::BRepGProp_Face(const TopoDS_Face& F, const Standard_Boolean IsUseSpan) + : myIsUseSpan(IsUseSpan) { Load(F); } //======================================================================= -//function : NaturalRestriction -//purpose : Returns Standard_True if the face is not trimmed. +// function : NaturalRestriction +// purpose : Returns Standard_True if the face is not trimmed. //======================================================================= inline Standard_Boolean BRepGProp_Face::NaturalRestriction() const { return BRep_Tool::NaturalRestriction(mySurface.Face()); } + // //======================================================================= -//function : GetFace -//purpose : Returns TopoDS Face. +// function : GetFace +// purpose : Returns TopoDS Face. //======================================================================= inline const TopoDS_Face& BRepGProp_Face::GetFace() const @@ -60,8 +60,8 @@ inline const TopoDS_Face& BRepGProp_Face::GetFace() const } //======================================================================= -//function : Value2d -//purpose : Returns the value of the boundary curve of the face. +// function : Value2d +// purpose : Returns the value of the boundary curve of the face. //======================================================================= inline gp_Pnt2d BRepGProp_Face::Value2d(const Standard_Real U) const @@ -70,21 +70,19 @@ inline gp_Pnt2d BRepGProp_Face::Value2d(const Standard_Real U) const } //======================================================================= -//function : D12d -//purpose : Returns the point of parameter U and the first derivative +// function : D12d +// purpose : Returns the point of parameter U and the first derivative // at this point of a boundary curve. //======================================================================= -inline void BRepGProp_Face::D12d(const Standard_Real U, - gp_Pnt2d &P, - gp_Vec2d &V1) const +inline void BRepGProp_Face::D12d(const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V1) const { - myCurve.D1(U,P,V1); + myCurve.D1(U, P, V1); } //======================================================================= -//function : FirstParameter -//purpose : Returns the parametric value of the start point of +// function : FirstParameter +// purpose : Returns the parametric value of the start point of // the current arc of curve. //======================================================================= @@ -94,8 +92,8 @@ inline Standard_Real BRepGProp_Face::FirstParameter() const } //======================================================================= -//function : LastParameter -//purpose : Returns the parametric value of the end point of +// function : LastParameter +// purpose : Returns the parametric value of the end point of // the current arc of curve. //======================================================================= diff --git a/opencascade/BRepGProp_Gauss.hxx b/opencascade/BRepGProp_Gauss.hxx index aeff51845..c41f201dc 100644 --- a/opencascade/BRepGProp_Gauss.hxx +++ b/opencascade/BRepGProp_Gauss.hxx @@ -17,7 +17,8 @@ #include #include -template class math_VectorBase; +template +class math_VectorBase; using math_Vector = math_VectorBase; //! Class performs computing of the global inertia properties @@ -52,18 +53,21 @@ class BRepGProp_Gauss void Reset(); }; - typedef NCollection_Handle< NCollection_Array1 > InertiaArray; - typedef Standard_Real(*BRepGProp_GaussFunc)(const Standard_Real, const Standard_Real); + typedef NCollection_Handle> InertiaArray; + typedef Standard_Real (*BRepGProp_GaussFunc)(const Standard_Real, const Standard_Real); public: //! @name public API - //! Describes types of geometric objects. //! - Vinert is 3D closed region of space delimited with: //! -- Surface; //! -- Point and Surface; //! -- Plane and Surface. //! - Sinert is face in 3D space. - typedef enum { Vinert = 0, Sinert } BRepGProp_GaussType; + typedef enum + { + Vinert = 0, + Sinert + } BRepGProp_GaussType; //! Constructor Standard_EXPORT explicit BRepGProp_Gauss(const BRepGProp_GaussType theType); @@ -78,17 +82,16 @@ public: //! @name public API //! @param theLocation - location of the point or the plane; //! @param theCoeff - plane coefficients; //! @param theIsByPoint - flag of restricition (point/plane); - //! @param theOutMass[out] - mass (volume) of region; - //! @param theOutGravityCenter[out] - garvity center of region; - //! @param theOutInertia[out] - matrix of inertia; - Standard_EXPORT void Compute( - const BRepGProp_Face& theSurface, - const gp_Pnt& theLocation, - const Standard_Real theCoeff[], - const Standard_Boolean theIsByPoint, - Standard_Real& theOutMass, - gp_Pnt& theOutGravityCenter, - gp_Mat& theOutInertia); + //! @param[out] theOutMass - mass (volume) of region; + //! @param[out] theOutGravityCenter - garvity center of region; + //! @param[out] theOutInertia - matrix of inertia; + Standard_EXPORT void Compute(const BRepGProp_Face& theSurface, + const gp_Pnt& theLocation, + const Standard_Real theCoeff[], + const Standard_Boolean theIsByPoint, + Standard_Real& theOutMass, + gp_Pnt& theOutGravityCenter, + gp_Mat& theOutInertia); //! Computes the global properties of a surface. Surface can be closed. //! The method is quick and its precision is enough for many cases of analytical surfaces. @@ -97,15 +100,14 @@ public: //! @name public API //! Error of the computation is not calculated. //! @param theSurface - bounding surface of the region; //! @param theLocation - surface location; - //! @param theOutMass[out] - mass (volume) of region; - //! @param theOutGravityCenter[out] - garvity center of region; - //! @param theOutInertia[out] - matrix of inertia; - Standard_EXPORT void Compute( - const BRepGProp_Face& theSurface, - const gp_Pnt& theLocation, - Standard_Real& theOutMass, - gp_Pnt& theOutGravityCenter, - gp_Mat& theOutInertia); + //! @param[out] theOutMass - mass (volume) of region; + //! @param[out] theOutGravityCenter - garvity center of region; + //! @param[out] theOutInertia - matrix of inertia; + Standard_EXPORT void Compute(const BRepGProp_Face& theSurface, + const gp_Pnt& theLocation, + Standard_Real& theOutMass, + gp_Pnt& theOutGravityCenter, + gp_Mat& theOutInertia); //! Computes the global properties of a region of 3D space which can be //! delimited by the surface and point or surface and plane. Surface can be closed. @@ -118,18 +120,17 @@ public: //! @name public API //! @param theLocation - location of the point or the plane; //! @param theCoeff - plane coefficients; //! @param theIsByPoint - flag of restricition (point/plane); - //! @param theOutMass[out] - mass (volume) of region; - //! @param theOutGravityCenter[out] - garvity center of region; - //! @param theOutInertia[out] - matrix of inertia; - Standard_EXPORT void Compute( - BRepGProp_Face& theSurface, - BRepGProp_Domain& theDomain, - const gp_Pnt& theLocation, - const Standard_Real theCoeff[], - const Standard_Boolean theIsByPoint, - Standard_Real& theOutMass, - gp_Pnt& theOutGravityCenter, - gp_Mat& theOutInertia); + //! @param[out] theOutMass - mass (volume) of region; + //! @param[out] theOutGravityCenter - garvity center of region; + //! @param[out] theOutInertia - matrix of inertia; + Standard_EXPORT void Compute(BRepGProp_Face& theSurface, + BRepGProp_Domain& theDomain, + const gp_Pnt& theLocation, + const Standard_Real theCoeff[], + const Standard_Boolean theIsByPoint, + Standard_Real& theOutMass, + gp_Pnt& theOutGravityCenter, + gp_Mat& theOutInertia); //! Computes the global properties of a surface. Surface can be closed. //! The method is quick and its precision is enough for many cases of analytical surfaces. @@ -139,16 +140,15 @@ public: //! @name public API //! @param theSurface - bounding surface of the region; //! @param theDomain - surface boundings; //! @param theLocation - surface location; - //! @param theOutMass[out] - mass (volume) of region; - //! @param theOutGravityCenter[out] - garvity center of region; - //! @param theOutInertia[out] - matrix of inertia; - Standard_EXPORT void Compute( - BRepGProp_Face& theSurface, - BRepGProp_Domain& theDomain, - const gp_Pnt& theLocation, - Standard_Real& theOutMass, - gp_Pnt& theOutGravityCenter, - gp_Mat& theOutInertia); + //! @param[out] theOutMass - mass (volume) of region; + //! @param[out] theOutGravityCenter - garvity center of region; + //! @param[out] theOutInertia - matrix of inertia; + Standard_EXPORT void Compute(BRepGProp_Face& theSurface, + BRepGProp_Domain& theDomain, + const gp_Pnt& theLocation, + Standard_Real& theOutMass, + gp_Pnt& theOutGravityCenter, + gp_Mat& theOutInertia); //! Computes the global properties of the region of 3D space which can be //! delimited by the surface and point or surface and plane. @@ -160,22 +160,21 @@ public: //! @name public API //! @param theEps - maximal relative error of computed mass (volume) for face; //! @param theCoeff - plane coefficients; //! @param theIsByPoint - flag of restricition (point/plane); - //! @param theOutMass[out] - mass (volume) of region; - //! @param theOutGravityCenter[out] - garvity center of region; - //! @param theOutInertia[out] - matrix of inertia; + //! @param[out] theOutMass - mass (volume) of region; + //! @param[out] theOutGravityCenter - garvity center of region; + //! @param[out] theOutInertia - matrix of inertia; //! @return value of error which is calculated as //! Abs((M(i+1)-M(i))/M(i+1)), M(i+1) and M(i) are values //! for two successive steps of adaptive integration. - Standard_EXPORT Standard_Real Compute( - BRepGProp_Face& theSurface, - BRepGProp_Domain& theDomain, - const gp_Pnt& theLocation, - const Standard_Real theEps, - const Standard_Real theCoeff[], - const Standard_Boolean theByPoint, - Standard_Real& theOutMass, - gp_Pnt& theOutGravityCenter, - gp_Mat& theOutInertia); + Standard_EXPORT Standard_Real Compute(BRepGProp_Face& theSurface, + BRepGProp_Domain& theDomain, + const gp_Pnt& theLocation, + const Standard_Real theEps, + const Standard_Real theCoeff[], + const Standard_Boolean theByPoint, + Standard_Real& theOutMass, + gp_Pnt& theOutGravityCenter, + gp_Mat& theOutInertia); //! Computes the global properties of the face. Adaptive 2D Gauss integration is used. //! If Epsilon more than 0.001 then algorithm performs non-adaptive integration. @@ -183,99 +182,84 @@ public: //! @name public API //! @param theDomain - surface boundings; //! @param theLocation - surface location; //! @param theEps - maximal relative error of computed mass (square) for face; - //! @param theOutMass[out] - mass (volume) of region; - //! @param theOutGravityCenter[out] - garvity center of region; - //! @param theOutInertia[out] - matrix of inertia; + //! @param[out] theOutMass - mass (volume) of region; + //! @param[out] theOutGravityCenter - garvity center of region; + //! @param[out] theOutInertia - matrix of inertia; //! @return value of error which is calculated as //! Abs((M(i+1)-M(i))/M(i+1)), M(i+1) and M(i) are values //! for two successive steps of adaptive integration. - Standard_EXPORT Standard_Real Compute( - BRepGProp_Face& theSurface, - BRepGProp_Domain& theDomain, - const gp_Pnt& theLocation, - const Standard_Real theEps, - Standard_Real& theOutMass, - gp_Pnt& theOutGravityCenter, - gp_Mat& theOutInertia); + Standard_EXPORT Standard_Real Compute(BRepGProp_Face& theSurface, + BRepGProp_Domain& theDomain, + const gp_Pnt& theLocation, + const Standard_Real theEps, + Standard_Real& theOutMass, + gp_Pnt& theOutGravityCenter, + gp_Mat& theOutInertia); private: //! @name private methods - BRepGProp_Gauss(BRepGProp_Gauss const&); - BRepGProp_Gauss& operator= (BRepGProp_Gauss const&); - - void computeVInertiaOfElementaryPart( - const gp_Pnt& thePoint, - const gp_Vec& theNormal, - const gp_Pnt& theLocation, - const Standard_Real theWeight, - const Standard_Real theCoeff[], - const Standard_Boolean theIsByPoint, - BRepGProp_Gauss::Inertia& theOutInertia); - - void computeSInertiaOfElementaryPart( - const gp_Pnt& thePoint, - const gp_Vec& theNormal, - const gp_Pnt& theLocation, - const Standard_Real theWeight, - BRepGProp_Gauss::Inertia& theOutInertia); - - void checkBounds( - const Standard_Real theU1, - const Standard_Real theU2, - const Standard_Real theV1, - const Standard_Real theV2); - - void addAndRestoreInertia( - const BRepGProp_Gauss::Inertia& theInInertia, - BRepGProp_Gauss::Inertia& theOutInertia); - - void multAndRestoreInertia( - const Standard_Real theValue, - BRepGProp_Gauss::Inertia& theInertia); - - void convert( - const BRepGProp_Gauss::Inertia& theInertia, - gp_Pnt& theOutGravityCenter, - gp_Mat& theOutMatrixOfInertia, - Standard_Real& theOutMass); - - void convert( - const BRepGProp_Gauss::Inertia& theInertia, - const Standard_Real theCoeff[], - const Standard_Boolean theIsByPoint, - gp_Pnt& theOutGravityCenter, - gp_Mat& theOutMatrixOfInertia, - Standard_Real& theOutMass); - - static Standard_Integer MaxSubs( - const Standard_Integer theN, - const Standard_Integer theCoeff = 32); - - static void Init( - NCollection_Handle& theOutVec, - const Standard_Real theValue, - const Standard_Integer theFirst = 0, - const Standard_Integer theLast = 0); - - static void InitMass( - const Standard_Real theValue, - const Standard_Integer theFirst, - const Standard_Integer theLast, - InertiaArray& theArray); - - static Standard_Integer FillIntervalBounds( - const Standard_Real theA, - const Standard_Real theB, - const TColStd_Array1OfReal& theKnots, - const Standard_Integer theNumSubs, - InertiaArray& theInerts, - NCollection_Handle& theParam1, - NCollection_Handle& theParam2, - NCollection_Handle& theError, - NCollection_Handle& theCommonError); - -private: //! @name private fields - + BRepGProp_Gauss& operator=(BRepGProp_Gauss const&); + + void computeVInertiaOfElementaryPart(const gp_Pnt& thePoint, + const gp_Vec& theNormal, + const gp_Pnt& theLocation, + const Standard_Real theWeight, + const Standard_Real theCoeff[], + const Standard_Boolean theIsByPoint, + BRepGProp_Gauss::Inertia& theOutInertia); + + void computeSInertiaOfElementaryPart(const gp_Pnt& thePoint, + const gp_Vec& theNormal, + const gp_Pnt& theLocation, + const Standard_Real theWeight, + BRepGProp_Gauss::Inertia& theOutInertia); + + void checkBounds(const Standard_Real theU1, + const Standard_Real theU2, + const Standard_Real theV1, + const Standard_Real theV2); + + void addAndRestoreInertia(const BRepGProp_Gauss::Inertia& theInInertia, + BRepGProp_Gauss::Inertia& theOutInertia); + + void multAndRestoreInertia(const Standard_Real theValue, BRepGProp_Gauss::Inertia& theInertia); + + void convert(const BRepGProp_Gauss::Inertia& theInertia, + gp_Pnt& theOutGravityCenter, + gp_Mat& theOutMatrixOfInertia, + Standard_Real& theOutMass); + + void convert(const BRepGProp_Gauss::Inertia& theInertia, + const Standard_Real theCoeff[], + const Standard_Boolean theIsByPoint, + gp_Pnt& theOutGravityCenter, + gp_Mat& theOutMatrixOfInertia, + Standard_Real& theOutMass); + + static Standard_Integer MaxSubs(const Standard_Integer theN, + const Standard_Integer theCoeff = 32); + + static void Init(NCollection_Handle& theOutVec, + const Standard_Real theValue, + const Standard_Integer theFirst = 0, + const Standard_Integer theLast = 0); + + static void InitMass(const Standard_Real theValue, + const Standard_Integer theFirst, + const Standard_Integer theLast, + InertiaArray& theArray); + + static Standard_Integer FillIntervalBounds(const Standard_Real theA, + const Standard_Real theB, + const TColStd_Array1OfReal& theKnots, + const Standard_Integer theNumSubs, + InertiaArray& theInerts, + NCollection_Handle& theParam1, + NCollection_Handle& theParam2, + NCollection_Handle& theError, + NCollection_Handle& theCommonError); + +private: //! @name private fields BRepGProp_GaussType myType; //!< Type of geometric object BRepGProp_GaussFunc add; //!< Pointer on the add function BRepGProp_GaussFunc mult; //!< Pointer on the mult function diff --git a/opencascade/BRepGProp_MeshCinert.hxx b/opencascade/BRepGProp_MeshCinert.hxx index d9f2d8bde..838610d7a 100644 --- a/opencascade/BRepGProp_MeshCinert.hxx +++ b/opencascade/BRepGProp_MeshCinert.hxx @@ -22,46 +22,34 @@ class gp_Pnt; class TopoDS_Edge; - - -//! Computes the global properties of +//! Computes the global properties of //! of polylines represented by set of points. //! This class is used for computation of global //! properties of edge, which has no exact geometry //! (3d or 2d curve), but has any of allowed //! polygons. -//! -class BRepGProp_MeshCinert : public GProp_GProps +//! +class BRepGProp_MeshCinert : public GProp_GProps { public: - DEFINE_STANDARD_ALLOC - Standard_EXPORT BRepGProp_MeshCinert(); - - Standard_EXPORT void SetLocation (const gp_Pnt& CLocation); - - //! Computes the global properties of + + Standard_EXPORT void SetLocation(const gp_Pnt& CLocation); + + //! Computes the global properties of //! of polylines represented by set of points. Standard_EXPORT void Perform(const TColgp_Array1OfPnt& theNodes); //! Prepare set of 3d points on base of any available edge polygons: //! 3D polygon, polygon on triangulation, 2d polygon on surface //! If edge has no polygons, array thePolyg is left unchanged - Standard_EXPORT static void PreparePolygon(const TopoDS_Edge& theE, Handle(TColgp_HArray1OfPnt)& thePolyg); + Standard_EXPORT static void PreparePolygon(const TopoDS_Edge& theE, + Handle(TColgp_HArray1OfPnt)& thePolyg); protected: - - - - - private: - - - - }; #endif // _BRepGProp_MeshCinert_HeaderFile diff --git a/opencascade/BRepGProp_MeshProps.hxx b/opencascade/BRepGProp_MeshProps.hxx index 4b0dc9ab0..ab3930b26 100644 --- a/opencascade/BRepGProp_MeshProps.hxx +++ b/opencascade/BRepGProp_MeshProps.hxx @@ -21,63 +21,62 @@ class Poly_Triangulation; class TopLoc_Location; - //! Computes the global properties of a surface mesh. The mesh can be //! interpreted as just a surface or as a piece of volume limited by this surface. class BRepGProp_MeshProps : public GProp_GProps { public: - DEFINE_STANDARD_ALLOC //! Describes types of geometric objects. //! - Vinert is 3D closed region of space delimited with //! Point and surface mesh; //! - Sinert is surface mesh in 3D space. - typedef enum { Vinert = 0, Sinert } BRepGProp_MeshObjType; + typedef enum + { + Vinert = 0, + Sinert + } BRepGProp_MeshObjType; //! Constructor takes the type of object. - BRepGProp_MeshProps(const BRepGProp_MeshObjType theType) : - myType(theType) - {} + BRepGProp_MeshProps(const BRepGProp_MeshObjType theType) + : myType(theType) + { + } //! Sets the point relative which the calculation is to be done void SetLocation(const gp_Pnt& theLocation) { loc = theLocation; } //! Computes the global properties of a surface mesh of 3D space. //! Calculation of surface properties is performed by numerical integration - //! over triangle surfaces using Gauss cubature formulas. - //! Depending on the mesh object type used in constructor this method can + //! over triangle surfaces using Gauss cubature formulas. + //! Depending on the mesh object type used in constructor this method can //! calculate the surface or volume properties of the mesh. Standard_EXPORT void Perform(const Handle(Poly_Triangulation)& theMesh, - const TopLoc_Location& theLoc, - const TopAbs_Orientation theOri); + const TopLoc_Location& theLoc, + const TopAbs_Orientation theOri); Standard_EXPORT void Perform(const Handle(Poly_Triangulation)& theMesh, - const TopAbs_Orientation theOri); + const TopAbs_Orientation theOri); - //! Computes the global properties of triangle {p1, p2, p3} relatively + //! Computes the global properties of triangle {p1, p2, p3} relatively //! point Apex //! If isVolume = true, volume properties are calculated //! otherwise - surface ones - Standard_EXPORT static void CalculateProps(const gp_Pnt& p1, const gp_Pnt& p2, const gp_Pnt& p3, - const gp_Pnt& Apex, + Standard_EXPORT static void CalculateProps(const gp_Pnt& p1, + const gp_Pnt& p2, + const gp_Pnt& p3, + const gp_Pnt& Apex, const Standard_Boolean isVolume, - Standard_Real GProps[10], + Standard_Real GProps[10], const Standard_Integer NbGaussPoints, - const Standard_Real* GaussPnts); + const Standard_Real* GaussPnts); //! Get type of mesh object - BRepGProp_MeshObjType GetMeshObjType() const - { - return myType; - } - -private: //! @name private fields - + BRepGProp_MeshObjType GetMeshObjType() const { return myType; } +private: //! @name private fields BRepGProp_MeshObjType myType; //!< Type of geometric object - }; #endif // _BRepGProp_MeshProps_HeaderFile diff --git a/opencascade/BRepGProp_Sinert.hxx b/opencascade/BRepGProp_Sinert.hxx index 654ef3acd..7491bef0d 100644 --- a/opencascade/BRepGProp_Sinert.hxx +++ b/opencascade/BRepGProp_Sinert.hxx @@ -25,70 +25,52 @@ class BRepGProp_Face; class gp_Pnt; class BRepGProp_Domain; - - //! Computes the global properties of a face in 3D space. //! The face 's requirements to evaluate the global properties //! are defined in the template FaceTool from package GProp. -class BRepGProp_Sinert : public GProp_GProps +class BRepGProp_Sinert : public GProp_GProps { public: - DEFINE_STANDARD_ALLOC - Standard_EXPORT BRepGProp_Sinert(); - + Standard_EXPORT BRepGProp_Sinert(const BRepGProp_Face& S, const gp_Pnt& SLocation); - //! Builds a Sinert to evaluate the global properties of //! the face . If isNaturalRestriction is true the domain of S is defined //! with the natural bounds, else it defined with an iterator //! of Edge from TopoDS (see DomainTool from GProp) Standard_EXPORT BRepGProp_Sinert(BRepGProp_Face& S, BRepGProp_Domain& D, const gp_Pnt& SLocation); - - Standard_EXPORT BRepGProp_Sinert(BRepGProp_Face& S, const gp_Pnt& SLocation, const Standard_Real Eps); - - Standard_EXPORT BRepGProp_Sinert(BRepGProp_Face& S, BRepGProp_Domain& D, const gp_Pnt& SLocation, const Standard_Real Eps); - - Standard_EXPORT void SetLocation (const gp_Pnt& SLocation); - - Standard_EXPORT void Perform (const BRepGProp_Face& S); - - Standard_EXPORT void Perform (BRepGProp_Face& S, BRepGProp_Domain& D); - - Standard_EXPORT Standard_Real Perform (BRepGProp_Face& S, const Standard_Real Eps); - - Standard_EXPORT Standard_Real Perform (BRepGProp_Face& S, BRepGProp_Domain& D, const Standard_Real Eps); - - - //! If previously used method contained Eps parameter - //! get actual relative error of the computation, else return 1.0. - Standard_EXPORT Standard_Real GetEpsilon(); + Standard_EXPORT BRepGProp_Sinert(BRepGProp_Face& S, + const gp_Pnt& SLocation, + const Standard_Real Eps); + Standard_EXPORT BRepGProp_Sinert(BRepGProp_Face& S, + BRepGProp_Domain& D, + const gp_Pnt& SLocation, + const Standard_Real Eps); + Standard_EXPORT void SetLocation(const gp_Pnt& SLocation); -protected: + Standard_EXPORT void Perform(const BRepGProp_Face& S); + Standard_EXPORT void Perform(BRepGProp_Face& S, BRepGProp_Domain& D); + Standard_EXPORT Standard_Real Perform(BRepGProp_Face& S, const Standard_Real Eps); + Standard_EXPORT Standard_Real Perform(BRepGProp_Face& S, + BRepGProp_Domain& D, + const Standard_Real Eps); + //! If previously used method contained Eps parameter + //! get actual relative error of the computation, else return 1.0. + Standard_EXPORT Standard_Real GetEpsilon(); +protected: private: - - - Standard_Real myEpsilon; - - }; - - - - - - #endif // _BRepGProp_Sinert_HeaderFile diff --git a/opencascade/BRepGProp_TFunction.hxx b/opencascade/BRepGProp_TFunction.hxx index e2655b6a1..2394c8b62 100644 --- a/opencascade/BRepGProp_TFunction.hxx +++ b/opencascade/BRepGProp_TFunction.hxx @@ -27,18 +27,15 @@ #include class gp_Pnt; - //! This class represents the integrand function for the outer //! integral computation. The returned value represents the //! integral of UFunction. It depends on the value type and the //! flag IsByPoint. -class BRepGProp_TFunction : public math_Function +class BRepGProp_TFunction : public math_Function { public: - DEFINE_STANDARD_ALLOC - //! Constructor. Initializes the function with the face, the //! location point, the flag IsByPoint, the coefficients //! theCoeff that have different meaning depending on the value @@ -54,15 +51,15 @@ public: //! If IsByPoint is equal to Standard_False, the number of the //! coefficients is 4 and they represent the combination of //! plane parameters and shift values. - Standard_EXPORT BRepGProp_TFunction (const BRepGProp_Face& theSurface, - const gp_Pnt& theVertex, - const Standard_Boolean IsByPoint, - const Standard_Real* theCoeffs, - const Standard_Real theUMin, - const Standard_Real theTolerance); - + Standard_EXPORT BRepGProp_TFunction(const BRepGProp_Face& theSurface, + const gp_Pnt& theVertex, + const Standard_Boolean IsByPoint, + const Standard_Real* theCoeffs, + const Standard_Real theUMin, + const Standard_Real theTolerance); + Standard_EXPORT void Init(); - + //! Setting the expected number of Kronrod points for the outer //! integral computation. This number is required for //! computation of a value of tolerance for inner integral @@ -73,28 +70,29 @@ public: //! current number. If the law in math_KronrodSingleIntegration //! is changed, the modification algo should be modified //! accordingly. - void SetNbKronrodPoints (const Standard_Integer theNbPoints); - + void SetNbKronrodPoints(const Standard_Integer theNbPoints); + //! Setting the type of the value to be returned. This //! parameter is directly passed to the UFunction. - void SetValueType (const GProp_ValueType aType); - + void SetValueType(const GProp_ValueType aType); + //! Setting the tolerance for inner integration - void SetTolerance (const Standard_Real aTol); - + void SetTolerance(const Standard_Real aTol); + //! Returns the relative reached error of all values computation since //! the last call of GetStateNumber method. - Standard_Real ErrorReached() const; - + Standard_Real ErrorReached() const; + //! Returns the absolut reached error of all values computation since //! the last call of GetStateNumber method. - Standard_Real AbsolutError() const; - + Standard_Real AbsolutError() const; + //! Returns a value of the function. The value represents an //! integral of UFunction. It is computed with the predefined //! tolerance using the adaptive Gauss-Kronrod method. - Standard_EXPORT virtual Standard_Boolean Value (const Standard_Real X, Standard_Real& F) Standard_OVERRIDE; - + Standard_EXPORT virtual Standard_Boolean Value(const Standard_Real X, + Standard_Real& F) Standard_OVERRIDE; + //! Redefined method. Remembers the error reached during //! computation of integral values since the object creation //! or the last call of GetStateNumber. It is invoked in each @@ -103,38 +101,20 @@ public: //! compute the integral of TFunction. Standard_EXPORT virtual Standard_Integer GetStateNumber() Standard_OVERRIDE; - - - protected: - - - - - private: - - - - BRepGProp_Face mySurface; + BRepGProp_Face mySurface; BRepGProp_UFunction myUFunction; - Standard_Real myUMin; - Standard_Real myTolerance; - Standard_Real myTolReached; - Standard_Real myErrReached; - Standard_Real myAbsError; - GProp_ValueType myValueType; - Standard_Boolean myIsByPoint; - Standard_Integer myNbPntOuter; - - + Standard_Real myUMin; + Standard_Real myTolerance; + Standard_Real myTolReached; + Standard_Real myErrReached; + Standard_Real myAbsError; + GProp_ValueType myValueType; + Standard_Boolean myIsByPoint; + Standard_Integer myNbPntOuter; }; - #include - - - - #endif // _BRepGProp_TFunction_HeaderFile diff --git a/opencascade/BRepGProp_TFunction.lxx b/opencascade/BRepGProp_TFunction.lxx index d746a8c9c..93c7021e8 100644 --- a/opencascade/BRepGProp_TFunction.lxx +++ b/opencascade/BRepGProp_TFunction.lxx @@ -14,19 +14,18 @@ // commercial license or contractual agreement. //======================================================================= -//function : SetNbKronrodPoints -//purpose : +// function : SetNbKronrodPoints +// purpose : //======================================================================= -inline void BRepGProp_TFunction::SetNbKronrodPoints - (const Standard_Integer theNbPoints) +inline void BRepGProp_TFunction::SetNbKronrodPoints(const Standard_Integer theNbPoints) { - myNbPntOuter = (theNbPoints%2 == 0) ? theNbPoints + 1 : theNbPoints; + myNbPntOuter = (theNbPoints % 2 == 0) ? theNbPoints + 1 : theNbPoints; } - + //======================================================================= -//function : SetValueType -//purpose : +// function : SetValueType +// purpose : //======================================================================= inline void BRepGProp_TFunction::SetValueType(const GProp_ValueType theType) @@ -36,8 +35,8 @@ inline void BRepGProp_TFunction::SetValueType(const GProp_ValueType theType) } //======================================================================= -//function : SetTolerance -//purpose : +// function : SetTolerance +// purpose : //======================================================================= inline void BRepGProp_TFunction::SetTolerance(const Standard_Real theTolerance) @@ -46,8 +45,8 @@ inline void BRepGProp_TFunction::SetTolerance(const Standard_Real theTolerance) } //======================================================================= -//function : TolReached -//purpose : +// function : TolReached +// purpose : //======================================================================= inline Standard_Real BRepGProp_TFunction::ErrorReached() const @@ -56,8 +55,8 @@ inline Standard_Real BRepGProp_TFunction::ErrorReached() const } //======================================================================= -//function : ErrorReached -//purpose : +// function : ErrorReached +// purpose : //======================================================================= inline Standard_Real BRepGProp_TFunction::AbsolutError() const diff --git a/opencascade/BRepGProp_UFunction.hxx b/opencascade/BRepGProp_UFunction.hxx index 893b8804c..9e02837ce 100644 --- a/opencascade/BRepGProp_UFunction.hxx +++ b/opencascade/BRepGProp_UFunction.hxx @@ -27,7 +27,6 @@ #include class gp_XYZ; - //! This class represents the integrand function for //! computation of an inner integral. The returned value //! depends on the value type and the flag IsByPoint. @@ -47,13 +46,11 @@ class gp_XYZ; //! surface and a point. Otherwise all computations are //! performed for the region of space delimited by a surface //! and a plane. -class BRepGProp_UFunction : public math_Function +class BRepGProp_UFunction : public math_Function { public: - DEFINE_STANDARD_ALLOC - //! Constructor. Initializes the function with the face, the //! location point, the flag IsByPoint and the coefficients //! theCoeff that have different meaning depending on the value @@ -66,59 +63,57 @@ public: //! If IsByPoint is equal to Standard_False, the number of the //! coefficients is 4 and they represent the combination of //! plane parameters and shift values. - Standard_EXPORT BRepGProp_UFunction(const BRepGProp_Face& theSurface, const gp_Pnt& theVertex, const Standard_Boolean IsByPoint, const Standard_Real* theCoeffs); - + Standard_EXPORT BRepGProp_UFunction(const BRepGProp_Face& theSurface, + const gp_Pnt& theVertex, + const Standard_Boolean IsByPoint, + const Standard_Real* theCoeffs); + //! Setting the type of the value to be returned. - void SetValueType (const GProp_ValueType theType); - + void SetValueType(const GProp_ValueType theType); + //! Setting the V parameter that is constant during the //! integral computation. - void SetVParam (const Standard_Real theVParam); - + void SetVParam(const Standard_Real theVParam); + //! Returns a value of the function. - Standard_EXPORT virtual Standard_Boolean Value (const Standard_Real X, Standard_Real& F) Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean Value(const Standard_Real X, + Standard_Real& F) Standard_OVERRIDE; private: - //! Private method. Returns the value for volume computation. //! Other returned values are: //! - thePMP0 - PSurf(X,Y) minus Location. - //! - theS and theD1 coeffitients that are computed and used + //! - theS and theD1 coefficients that are computed and used //! for computation of center of mass and inertia values //! by plane. - Standard_EXPORT Standard_Real VolumeValue (const Standard_Real X, gp_XYZ& thePMP0, Standard_Real& theS, Standard_Real& theD1); - + Standard_EXPORT Standard_Real VolumeValue(const Standard_Real X, + gp_XYZ& thePMP0, + Standard_Real& theS, + Standard_Real& theD1); + //! Private method. Returns a value for the center of mass //! computation. If the value type other then GProp_CenterMassX, //! GProp_CenterMassY or GProp_CenterMassZ this method returns //! Standard_False. Returns Standard_True in case of successful //! computation of a value. - Standard_EXPORT Standard_Boolean CenterMassValue (const Standard_Real X, Standard_Real& F); - - //! Private method. Computes the value of intertia. The type of + Standard_EXPORT Standard_Boolean CenterMassValue(const Standard_Real X, Standard_Real& F); + + //! Private method. Computes the value of inertia. The type of //! a value returned is defined by the value type. If it is //! other then GProp_InertiaXX, GProp_InertiaYY, //! GProp_InertiaZZ, GProp_InertiaXY, GProp_InertiaXZ or //! GProp_InertiaYZ, the method returns Standard_False. Returns //! Standard_True in case of successful computation of a value - Standard_EXPORT Standard_Boolean InertiaValue (const Standard_Real X, Standard_Real& F); + Standard_EXPORT Standard_Boolean InertiaValue(const Standard_Real X, Standard_Real& F); - - BRepGProp_Face mySurface; - gp_Pnt myVertex; + BRepGProp_Face mySurface; + gp_Pnt myVertex; const Standard_Real* myCoeffs; - Standard_Real myVParam; - GProp_ValueType myValueType; - Standard_Boolean myIsByPoint; - - + Standard_Real myVParam; + GProp_ValueType myValueType; + Standard_Boolean myIsByPoint; }; - #include - - - - #endif // _BRepGProp_UFunction_HeaderFile diff --git a/opencascade/BRepGProp_UFunction.lxx b/opencascade/BRepGProp_UFunction.lxx index e74afe9f8..fcc686fca 100644 --- a/opencascade/BRepGProp_UFunction.lxx +++ b/opencascade/BRepGProp_UFunction.lxx @@ -14,8 +14,8 @@ // commercial license or contractual agreement. //======================================================================= -//function : SetValueType -//purpose : Setting the type of the value to be returned. +// function : SetValueType +// purpose : Setting the type of the value to be returned. //======================================================================= inline void BRepGProp_UFunction::SetValueType(const GProp_ValueType theType) @@ -24,8 +24,8 @@ inline void BRepGProp_UFunction::SetValueType(const GProp_ValueType theType) } //======================================================================= -//function : SetVParam -//purpose : Setting the V parameter that is constant during the +// function : SetVParam +// purpose : Setting the V parameter that is constant during the // integral computation. //======================================================================= diff --git a/opencascade/BRepGProp_Vinert.hxx b/opencascade/BRepGProp_Vinert.hxx index 5c4cf05c1..85da1c66f 100644 --- a/opencascade/BRepGProp_Vinert.hxx +++ b/opencascade/BRepGProp_Vinert.hxx @@ -26,8 +26,6 @@ class gp_Pnt; class gp_Pln; class BRepGProp_Domain; - - //! Computes the global properties of a geometric solid //! (3D closed region of space) delimited with : //! . a surface @@ -40,15 +38,12 @@ class BRepGProp_Domain; //! //! The surface 's requirements to evaluate the global properties //! are defined in the template SurfaceTool from package GProp. -class BRepGProp_Vinert : public GProp_GProps +class BRepGProp_Vinert : public GProp_GProps { public: - DEFINE_STANDARD_ALLOC - Standard_EXPORT BRepGProp_Vinert(); - //! Computes the global properties of a region of 3D space //! delimited with the surface and the point VLocation. S can be closed @@ -58,7 +53,6 @@ public: //! is used. Numbers of points depend on types of surfaces and curves. //! Error of the computation is not calculated. Standard_EXPORT BRepGProp_Vinert(const BRepGProp_Face& S, const gp_Pnt& VLocation); - //! Computes the global properties of a region of 3D space //! delimited with the surface and the point VLocation. S can be closed @@ -66,8 +60,9 @@ public: //! Parameter Eps sets maximal relative error of computed mass (volume) for face. //! Error is calculated as Abs((M(i+1)-M(i))/M(i+1)), M(i+1) and M(i) are values //! for two successive steps of adaptive integration. - Standard_EXPORT BRepGProp_Vinert(BRepGProp_Face& S, const gp_Pnt& VLocation, const Standard_Real Eps); - + Standard_EXPORT BRepGProp_Vinert(BRepGProp_Face& S, + const gp_Pnt& VLocation, + const Standard_Real Eps); //! Computes the global properties of the region of 3D space //! delimited with the surface and the point VLocation. @@ -76,8 +71,9 @@ public: //! Non-adaptive 2D Gauss integration with predefined numbers of Gauss points //! is used. Numbers of points depend on types of surfaces and curves. //! Error of the computation is not calculated. - Standard_EXPORT BRepGProp_Vinert(const BRepGProp_Face& S, const gp_Pnt& O, const gp_Pnt& VLocation); - + Standard_EXPORT BRepGProp_Vinert(const BRepGProp_Face& S, + const gp_Pnt& O, + const gp_Pnt& VLocation); //! Computes the global properties of the region of 3D space //! delimited with the surface and the point VLocation. @@ -86,8 +82,10 @@ public: //! Error is calculated as Abs((M(i+1)-M(i))/M(i+1)), M(i+1) and M(i) are values //! for two successive steps of adaptive integration. //! WARNING: if Eps > 0.001 algorithm performs non-adaptive integration. - Standard_EXPORT BRepGProp_Vinert(BRepGProp_Face& S, const gp_Pnt& O, const gp_Pnt& VLocation, const Standard_Real Eps); - + Standard_EXPORT BRepGProp_Vinert(BRepGProp_Face& S, + const gp_Pnt& O, + const gp_Pnt& VLocation, + const Standard_Real Eps); //! Computes the global properties of the region of 3D space //! delimited with the surface and the plane Pln. @@ -96,8 +94,9 @@ public: //! Non-adaptive 2D Gauss integration with predefined numbers of Gauss points //! is used. Numbers of points depend on types of surfaces and curves. //! Error of the computation is not calculated. - Standard_EXPORT BRepGProp_Vinert(const BRepGProp_Face& S, const gp_Pln& Pl, const gp_Pnt& VLocation); - + Standard_EXPORT BRepGProp_Vinert(const BRepGProp_Face& S, + const gp_Pln& Pl, + const gp_Pnt& VLocation); //! Computes the global properties of the region of 3D space //! delimited with the surface and the plane Pln. @@ -106,8 +105,10 @@ public: //! Error is calculated as Abs((M(i+1)-M(i))/M(i+1)), M(i+1) and M(i) are values //! for two successive steps of adaptive integration. //! WARNING: if Eps > 0.001 algorithm performs non-adaptive integration. - Standard_EXPORT BRepGProp_Vinert(BRepGProp_Face& S, const gp_Pln& Pl, const gp_Pnt& VLocation, const Standard_Real Eps); - + Standard_EXPORT BRepGProp_Vinert(BRepGProp_Face& S, + const gp_Pln& Pl, + const gp_Pnt& VLocation, + const Standard_Real Eps); //! Computes the global properties of a region of 3D space //! delimited with the surface and the point VLocation. S can be closed @@ -117,7 +118,6 @@ public: //! is used. Numbers of points depend on types of surfaces and curves. //! Error of the computation is not calculated. Standard_EXPORT BRepGProp_Vinert(BRepGProp_Face& S, BRepGProp_Domain& D, const gp_Pnt& VLocation); - //! Computes the global properties of a region of 3D space //! delimited with the surface and the point VLocation. S can be closed @@ -125,8 +125,10 @@ public: //! Parameter Eps sets maximal relative error of computed mass (volume) for face. //! Error is calculated as Abs((M(i+1)-M(i))/M(i+1)), M(i+1) and M(i) are values //! for two successive steps of adaptive integration. - Standard_EXPORT BRepGProp_Vinert(BRepGProp_Face& S, BRepGProp_Domain& D, const gp_Pnt& VLocation, const Standard_Real Eps); - + Standard_EXPORT BRepGProp_Vinert(BRepGProp_Face& S, + BRepGProp_Domain& D, + const gp_Pnt& VLocation, + const Standard_Real Eps); //! Computes the global properties of the region of 3D space //! delimited with the surface and the point VLocation. @@ -135,8 +137,10 @@ public: //! Non-adaptive 2D Gauss integration with predefined numbers of Gauss points //! is used. Numbers of points depend on types of surfaces and curves. //! Error of the computation is not calculated. - Standard_EXPORT BRepGProp_Vinert(BRepGProp_Face& S, BRepGProp_Domain& D, const gp_Pnt& O, const gp_Pnt& VLocation); - + Standard_EXPORT BRepGProp_Vinert(BRepGProp_Face& S, + BRepGProp_Domain& D, + const gp_Pnt& O, + const gp_Pnt& VLocation); //! Computes the global properties of the region of 3D space //! delimited with the surface and the point VLocation. @@ -145,8 +149,11 @@ public: //! Error is calculated as Abs((M(i+1)-M(i))/M(i+1)), M(i+1) and M(i) are values //! for two successive steps of adaptive integration. //! WARNING: if Eps > 0.001 algorithm performs non-adaptive integration. - Standard_EXPORT BRepGProp_Vinert(BRepGProp_Face& S, BRepGProp_Domain& D, const gp_Pnt& O, const gp_Pnt& VLocation, const Standard_Real Eps); - + Standard_EXPORT BRepGProp_Vinert(BRepGProp_Face& S, + BRepGProp_Domain& D, + const gp_Pnt& O, + const gp_Pnt& VLocation, + const Standard_Real Eps); //! Computes the global properties of the region of 3D space //! delimited with the surface and the plane Pln. @@ -155,8 +162,10 @@ public: //! Non-adaptive 2D Gauss integration with predefined numbers of Gauss points //! is used. Numbers of points depend on types of surfaces and curves. //! Error of the computation is not calculated. - Standard_EXPORT BRepGProp_Vinert(BRepGProp_Face& S, BRepGProp_Domain& D, const gp_Pln& Pl, const gp_Pnt& VLocation); - + Standard_EXPORT BRepGProp_Vinert(BRepGProp_Face& S, + BRepGProp_Domain& D, + const gp_Pln& Pl, + const gp_Pnt& VLocation); //! Computes the global properties of the region of 3D space //! delimited with the surface and the plane Pln. @@ -165,61 +174,57 @@ public: //! Error is calculated as Abs((M(i+1)-M(i))/M(i+1)), M(i+1) and M(i) are values //! for two successive steps of adaptive integration. //! WARNING: if Eps > 0.001 algorithm performs non-adaptive integration. - Standard_EXPORT BRepGProp_Vinert(BRepGProp_Face& S, BRepGProp_Domain& D, const gp_Pln& Pl, const gp_Pnt& VLocation, const Standard_Real Eps); - - Standard_EXPORT void SetLocation (const gp_Pnt& VLocation); - - Standard_EXPORT void Perform (const BRepGProp_Face& S); - - Standard_EXPORT Standard_Real Perform (BRepGProp_Face& S, const Standard_Real Eps); - - Standard_EXPORT void Perform (const BRepGProp_Face& S, const gp_Pnt& O); - - Standard_EXPORT Standard_Real Perform (BRepGProp_Face& S, const gp_Pnt& O, const Standard_Real Eps); - - Standard_EXPORT void Perform (const BRepGProp_Face& S, const gp_Pln& Pl); - - Standard_EXPORT Standard_Real Perform (BRepGProp_Face& S, const gp_Pln& Pl, const Standard_Real Eps); - - Standard_EXPORT void Perform (BRepGProp_Face& S, BRepGProp_Domain& D); - - Standard_EXPORT Standard_Real Perform (BRepGProp_Face& S, BRepGProp_Domain& D, const Standard_Real Eps); - - Standard_EXPORT void Perform (BRepGProp_Face& S, BRepGProp_Domain& D, const gp_Pnt& O); - - Standard_EXPORT Standard_Real Perform (BRepGProp_Face& S, BRepGProp_Domain& D, const gp_Pnt& O, const Standard_Real Eps); - - Standard_EXPORT void Perform (BRepGProp_Face& S, BRepGProp_Domain& D, const gp_Pln& Pl); - - Standard_EXPORT Standard_Real Perform (BRepGProp_Face& S, BRepGProp_Domain& D, const gp_Pln& Pl, const Standard_Real Eps); - + Standard_EXPORT BRepGProp_Vinert(BRepGProp_Face& S, + BRepGProp_Domain& D, + const gp_Pln& Pl, + const gp_Pnt& VLocation, + const Standard_Real Eps); - //! If previously used methods containe Eps parameter - //! gets actual relative error of the computation, else returns 1.0. - Standard_EXPORT Standard_Real GetEpsilon(); + Standard_EXPORT void SetLocation(const gp_Pnt& VLocation); + Standard_EXPORT void Perform(const BRepGProp_Face& S); + Standard_EXPORT Standard_Real Perform(BRepGProp_Face& S, const Standard_Real Eps); + Standard_EXPORT void Perform(const BRepGProp_Face& S, const gp_Pnt& O); -protected: + Standard_EXPORT Standard_Real Perform(BRepGProp_Face& S, + const gp_Pnt& O, + const Standard_Real Eps); + Standard_EXPORT void Perform(const BRepGProp_Face& S, const gp_Pln& Pl); + Standard_EXPORT Standard_Real Perform(BRepGProp_Face& S, + const gp_Pln& Pl, + const Standard_Real Eps); + Standard_EXPORT void Perform(BRepGProp_Face& S, BRepGProp_Domain& D); + Standard_EXPORT Standard_Real Perform(BRepGProp_Face& S, + BRepGProp_Domain& D, + const Standard_Real Eps); -private: + Standard_EXPORT void Perform(BRepGProp_Face& S, BRepGProp_Domain& D, const gp_Pnt& O); + Standard_EXPORT Standard_Real Perform(BRepGProp_Face& S, + BRepGProp_Domain& D, + const gp_Pnt& O, + const Standard_Real Eps); + Standard_EXPORT void Perform(BRepGProp_Face& S, BRepGProp_Domain& D, const gp_Pln& Pl); - Standard_Real myEpsilon; + Standard_EXPORT Standard_Real Perform(BRepGProp_Face& S, + BRepGProp_Domain& D, + const gp_Pln& Pl, + const Standard_Real Eps); + //! If previously used methods containe Eps parameter + //! gets actual relative error of the computation, else returns 1.0. + Standard_EXPORT Standard_Real GetEpsilon(); +protected: +private: + Standard_Real myEpsilon; }; - - - - - - #endif // _BRepGProp_Vinert_HeaderFile diff --git a/opencascade/BRepGProp_VinertGK.hxx b/opencascade/BRepGProp_VinertGK.hxx index c37dae4a8..9fe3ba5d1 100644 --- a/opencascade/BRepGProp_VinertGK.hxx +++ b/opencascade/BRepGProp_VinertGK.hxx @@ -24,7 +24,6 @@ class BRepGProp_Face; class BRepGProp_Domain; class gp_Pln; - //! Computes the global properties of a geometric solid //! (3D closed region of space) delimited with : //! - a point and a surface @@ -50,114 +49,160 @@ class gp_Pln; //! The outer integral is computed along T parameter of a //! bounding curve. The integrand function is encapsulated in //! the support class TFunction that is defined below. -class BRepGProp_VinertGK : public GProp_GProps +class BRepGProp_VinertGK : public GProp_GProps { public: - DEFINE_STANDARD_ALLOC - //! Empty constructor. BRepGProp_VinertGK() - : myErrorReached (0.), myAbsolutError (0.) + : myErrorReached(0.), + myAbsolutError(0.) { } - + //! Constructor. Computes the global properties of a region of //! 3D space delimited with the naturally restricted surface //! and the point VLocation. - Standard_EXPORT BRepGProp_VinertGK(BRepGProp_Face& theSurface, const gp_Pnt& theLocation, const Standard_Real theTolerance = 0.001, const Standard_Boolean theCGFlag = Standard_False, const Standard_Boolean theIFlag = Standard_False); - + Standard_EXPORT BRepGProp_VinertGK(BRepGProp_Face& theSurface, + const gp_Pnt& theLocation, + const Standard_Real theTolerance = 0.001, + const Standard_Boolean theCGFlag = Standard_False, + const Standard_Boolean theIFlag = Standard_False); + //! Constructor. Computes the global properties of a region of //! 3D space delimited with the naturally restricted surface //! and the point VLocation. The inertia is computed with //! respect to thePoint. - Standard_EXPORT BRepGProp_VinertGK(BRepGProp_Face& theSurface, const gp_Pnt& thePoint, const gp_Pnt& theLocation, const Standard_Real theTolerance = 0.001, const Standard_Boolean theCGFlag = Standard_False, const Standard_Boolean theIFlag = Standard_False); - + Standard_EXPORT BRepGProp_VinertGK(BRepGProp_Face& theSurface, + const gp_Pnt& thePoint, + const gp_Pnt& theLocation, + const Standard_Real theTolerance = 0.001, + const Standard_Boolean theCGFlag = Standard_False, + const Standard_Boolean theIFlag = Standard_False); + //! Constructor. Computes the global properties of a region of //! 3D space delimited with the surface bounded by the domain //! and the point VLocation. - Standard_EXPORT BRepGProp_VinertGK(BRepGProp_Face& theSurface, BRepGProp_Domain& theDomain, const gp_Pnt& theLocation, const Standard_Real theTolerance = 0.001, const Standard_Boolean theCGFlag = Standard_False, const Standard_Boolean theIFlag = Standard_False); - + Standard_EXPORT BRepGProp_VinertGK(BRepGProp_Face& theSurface, + BRepGProp_Domain& theDomain, + const gp_Pnt& theLocation, + const Standard_Real theTolerance = 0.001, + const Standard_Boolean theCGFlag = Standard_False, + const Standard_Boolean theIFlag = Standard_False); + //! Constructor. Computes the global properties of a region of //! 3D space delimited with the surface bounded by the domain //! and the point VLocation. The inertia is computed with //! respect to thePoint. - Standard_EXPORT BRepGProp_VinertGK(BRepGProp_Face& theSurface, BRepGProp_Domain& theDomain, const gp_Pnt& thePoint, const gp_Pnt& theLocation, const Standard_Real theTolerance = 0.001, const Standard_Boolean theCGFlag = Standard_False, const Standard_Boolean theIFlag = Standard_False); - + Standard_EXPORT BRepGProp_VinertGK(BRepGProp_Face& theSurface, + BRepGProp_Domain& theDomain, + const gp_Pnt& thePoint, + const gp_Pnt& theLocation, + const Standard_Real theTolerance = 0.001, + const Standard_Boolean theCGFlag = Standard_False, + const Standard_Boolean theIFlag = Standard_False); + //! Constructor. Computes the global properties of a region of //! 3D space delimited with the naturally restricted surface //! and the plane. - Standard_EXPORT BRepGProp_VinertGK(BRepGProp_Face& theSurface, const gp_Pln& thePlane, const gp_Pnt& theLocation, const Standard_Real theTolerance = 0.001, const Standard_Boolean theCGFlag = Standard_False, const Standard_Boolean theIFlag = Standard_False); - + Standard_EXPORT BRepGProp_VinertGK(BRepGProp_Face& theSurface, + const gp_Pln& thePlane, + const gp_Pnt& theLocation, + const Standard_Real theTolerance = 0.001, + const Standard_Boolean theCGFlag = Standard_False, + const Standard_Boolean theIFlag = Standard_False); + //! Constructor. Computes the global properties of a region of //! 3D space delimited with the surface bounded by the domain //! and the plane. - Standard_EXPORT BRepGProp_VinertGK(BRepGProp_Face& theSurface, BRepGProp_Domain& theDomain, const gp_Pln& thePlane, const gp_Pnt& theLocation, const Standard_Real theTolerance = 0.001, const Standard_Boolean theCGFlag = Standard_False, const Standard_Boolean theIFlag = Standard_False); - + Standard_EXPORT BRepGProp_VinertGK(BRepGProp_Face& theSurface, + BRepGProp_Domain& theDomain, + const gp_Pln& thePlane, + const gp_Pnt& theLocation, + const Standard_Real theTolerance = 0.001, + const Standard_Boolean theCGFlag = Standard_False, + const Standard_Boolean theIFlag = Standard_False); + //! Sets the vertex that delimit 3D closed region of space. - void SetLocation (const gp_Pnt& theLocation) - { - loc = theLocation; - } - + void SetLocation(const gp_Pnt& theLocation) { loc = theLocation; } + //! Computes the global properties of a region of 3D space //! delimited with the naturally restricted surface and the //! point VLocation. - Standard_EXPORT Standard_Real Perform (BRepGProp_Face& theSurface, const Standard_Real theTolerance = 0.001, const Standard_Boolean theCGFlag = Standard_False, const Standard_Boolean theIFlag = Standard_False); - + Standard_EXPORT Standard_Real Perform(BRepGProp_Face& theSurface, + const Standard_Real theTolerance = 0.001, + const Standard_Boolean theCGFlag = Standard_False, + const Standard_Boolean theIFlag = Standard_False); + //! Computes the global properties of a region of 3D space //! delimited with the naturally restricted surface and the //! point VLocation. The inertia is computed with respect to //! thePoint. - Standard_EXPORT Standard_Real Perform (BRepGProp_Face& theSurface, const gp_Pnt& thePoint, const Standard_Real theTolerance = 0.001, const Standard_Boolean theCGFlag = Standard_False, const Standard_Boolean theIFlag = Standard_False); - + Standard_EXPORT Standard_Real Perform(BRepGProp_Face& theSurface, + const gp_Pnt& thePoint, + const Standard_Real theTolerance = 0.001, + const Standard_Boolean theCGFlag = Standard_False, + const Standard_Boolean theIFlag = Standard_False); + //! Computes the global properties of a region of 3D space //! delimited with the surface bounded by the domain and the //! point VLocation. - Standard_EXPORT Standard_Real Perform (BRepGProp_Face& theSurface, BRepGProp_Domain& theDomain, const Standard_Real theTolerance = 0.001, const Standard_Boolean theCGFlag = Standard_False, const Standard_Boolean theIFlag = Standard_False); - + Standard_EXPORT Standard_Real Perform(BRepGProp_Face& theSurface, + BRepGProp_Domain& theDomain, + const Standard_Real theTolerance = 0.001, + const Standard_Boolean theCGFlag = Standard_False, + const Standard_Boolean theIFlag = Standard_False); + //! Computes the global properties of a region of 3D space //! delimited with the surface bounded by the domain and the //! point VLocation. The inertia is computed with respect to //! thePoint. - Standard_EXPORT Standard_Real Perform (BRepGProp_Face& theSurface, BRepGProp_Domain& theDomain, const gp_Pnt& thePoint, const Standard_Real theTolerance = 0.001, const Standard_Boolean theCGFlag = Standard_False, const Standard_Boolean theIFlag = Standard_False); - + Standard_EXPORT Standard_Real Perform(BRepGProp_Face& theSurface, + BRepGProp_Domain& theDomain, + const gp_Pnt& thePoint, + const Standard_Real theTolerance = 0.001, + const Standard_Boolean theCGFlag = Standard_False, + const Standard_Boolean theIFlag = Standard_False); + //! Computes the global properties of a region of 3D space //! delimited with the naturally restricted surface and the //! plane. - Standard_EXPORT Standard_Real Perform (BRepGProp_Face& theSurface, const gp_Pln& thePlane, const Standard_Real theTolerance = 0.001, const Standard_Boolean theCGFlag = Standard_False, const Standard_Boolean theIFlag = Standard_False); - + Standard_EXPORT Standard_Real Perform(BRepGProp_Face& theSurface, + const gp_Pln& thePlane, + const Standard_Real theTolerance = 0.001, + const Standard_Boolean theCGFlag = Standard_False, + const Standard_Boolean theIFlag = Standard_False); + //! Computes the global properties of a region of 3D space //! delimited with the surface bounded by the domain and the //! plane. - Standard_EXPORT Standard_Real Perform (BRepGProp_Face& theSurface, BRepGProp_Domain& theDomain, const gp_Pln& thePlane, const Standard_Real theTolerance = 0.001, const Standard_Boolean theCGFlag = Standard_False, const Standard_Boolean theIFlag = Standard_False); - + Standard_EXPORT Standard_Real Perform(BRepGProp_Face& theSurface, + BRepGProp_Domain& theDomain, + const gp_Pln& thePlane, + const Standard_Real theTolerance = 0.001, + const Standard_Boolean theCGFlag = Standard_False, + const Standard_Boolean theIFlag = Standard_False); + //! Returns the relative reached computation error. - Standard_Real GetErrorReached () const - { - return myErrorReached; - } - + Standard_Real GetErrorReached() const { return myErrorReached; } + //! Returns the absolut reached computation error. - Standard_Real GetAbsolutError() const; + Standard_Real GetAbsolutError() const; private: - //! Main method for computation of the global properties that //! is invoked by each Perform method. - Standard_EXPORT Standard_Real PrivatePerform (BRepGProp_Face& theSurface, - const Standard_Address thePtrDomain, - const Standard_Boolean IsByPoint, - const Standard_Real* theCoeffs, - const Standard_Real theTolerance, - const Standard_Boolean theCGFlag, - const Standard_Boolean theIFlag); - + Standard_EXPORT Standard_Real PrivatePerform(BRepGProp_Face& theSurface, + const Standard_Address thePtrDomain, + const Standard_Boolean IsByPoint, + const Standard_Real* theCoeffs, + const Standard_Real theTolerance, + const Standard_Boolean theCGFlag, + const Standard_Boolean theIFlag); Standard_Real myErrorReached; Standard_Real myAbsolutError; }; - #endif // _BRepGProp_VinertGK_HeaderFile diff --git a/opencascade/BRepIntCurveSurface_Inter.hxx b/opencascade/BRepIntCurveSurface_Inter.hxx index 1694ed1ca..ef49cceac 100644 --- a/opencascade/BRepIntCurveSurface_Inter.hxx +++ b/opencascade/BRepIntCurveSurface_Inter.hxx @@ -31,14 +31,13 @@ class IntCurveSurface_IntersectionPoint; class gp_Pnt; class TopoDS_Face; - //! Computes the intersection between a face and a //! curve. To intersect one curve with shape method -//! Init(Shape, curve, tTol) should be used. To +//! Init(Shape, curve, tTol) should be used. To //! intersect a few curves with specified shape it is //! necessary to load shape one time using method //! Load(shape, tol) and find intersection points for -//! each curve using method Init(curve). For +//! each curve using method Init(curve). For //! iteration by intersection points method More() and //! Next() should be used. //! @@ -52,107 +51,90 @@ class TopoDS_Face; //! ....... //! } //! } -class BRepIntCurveSurface_Inter +class BRepIntCurveSurface_Inter { public: - DEFINE_STANDARD_ALLOC - //! Empty constructor; Standard_EXPORT BRepIntCurveSurface_Inter(); - - //! Load the Shape, the curve and initialize the + + //! Load the Shape, the curve and initialize the //! tolerance used for the classification. - Standard_EXPORT void Init (const TopoDS_Shape& theShape, const GeomAdaptor_Curve& theCurve, const Standard_Real theTol); - - //! Load the Shape, the curve and initialize the + Standard_EXPORT void Init(const TopoDS_Shape& theShape, + const GeomAdaptor_Curve& theCurve, + const Standard_Real theTol); + + //! Load the Shape, the curve and initialize the //! tolerance used for the classification. - Standard_EXPORT void Init (const TopoDS_Shape& theShape, const gp_Lin& theLine, const Standard_Real theTol); - - //! Load the Shape, and initialize the + Standard_EXPORT void Init(const TopoDS_Shape& theShape, + const gp_Lin& theLine, + const Standard_Real theTol); + + //! Load the Shape, and initialize the //! tolerance used for the classification. - Standard_EXPORT void Load (const TopoDS_Shape& theShape, const Standard_Real theTol); - + Standard_EXPORT void Load(const TopoDS_Shape& theShape, const Standard_Real theTol); + //! Method to find intersections of specified curve with loaded shape. - Standard_EXPORT void Init (const GeomAdaptor_Curve& theCurve); - + Standard_EXPORT void Init(const GeomAdaptor_Curve& theCurve); + //! returns True if there is a current face. Standard_EXPORT Standard_Boolean More() const; - + //! Sets the next intersection point to check. Standard_EXPORT void Next(); - + //! returns the current Intersection point. Standard_EXPORT IntCurveSurface_IntersectionPoint Point() const; - + //! returns the current geometric Point Standard_EXPORT const gp_Pnt& Pnt() const; - + //! returns the U parameter of the current point //! on the current face. Standard_EXPORT Standard_Real U() const; - + //! returns the V parameter of the current point //! on the current face. Standard_EXPORT Standard_Real V() const; - - //! returns the parameter of the current point + + //! returns the parameter of the current point //! on the curve. Standard_EXPORT Standard_Real W() const; - - //! returns the current state (IN or ON) + + //! returns the current state (IN or ON) Standard_EXPORT TopAbs_State State() const; - + //! returns the transition of the line on the surface (IN or OUT or UNKNOWN) Standard_EXPORT IntCurveSurface_TransitionOnCurve Transition() const; - + //! returns the current face. Standard_EXPORT const TopoDS_Face& Face() const; - - - protected: - - //! Internal function Standard_EXPORT void Find(); - - //! Method chec found intersection point + + //! Method check found intersection point Standard_EXPORT Standard_Boolean FindPoint(); - + //! Method to clear fields of class Standard_EXPORT void Clear(); - - - private: - - - - Standard_Real myTolerance; - Handle(GeomAdaptor_Curve) myCurve; - IntCurveSurface_HInter myIntcs; - Standard_Integer myCurrentindex; - Standard_Integer myCurrentnbpoints; + Standard_Real myTolerance; + Handle(GeomAdaptor_Curve) myCurve; + IntCurveSurface_HInter myIntcs; + Standard_Integer myCurrentindex; + Standard_Integer myCurrentnbpoints; Handle(BRepTopAdaptor_TopolTool) myFastClass; - TopAbs_State myCurrentstate; - Standard_Real myCurrentU; - Standard_Real myCurrentV; - Bnd_Box myCurveBox; - Standard_Integer myIndFace; - TopTools_SequenceOfShape myFaces; - Handle(Bnd_HArray1OfBox) myFaceBoxes; - - + TopAbs_State myCurrentstate; + Standard_Real myCurrentU; + Standard_Real myCurrentV; + Bnd_Box myCurveBox; + Standard_Integer myIndFace; + TopTools_SequenceOfShape myFaces; + Handle(Bnd_HArray1OfBox) myFaceBoxes; }; - - - - - - #endif // _BRepIntCurveSurface_Inter_HeaderFile diff --git a/opencascade/BRepLProp.hxx b/opencascade/BRepLProp.hxx index 63e04a5ef..648a33254 100644 --- a/opencascade/BRepLProp.hxx +++ b/opencascade/BRepLProp.hxx @@ -25,26 +25,30 @@ #include class BRepAdaptor_Curve; - //! These global functions compute the degree of //! continuity of a curve built by concatenation of two //! edges at their junction point. -class BRepLProp +class BRepLProp { public: - DEFINE_STANDARD_ALLOC - //! Computes the regularity at the junction between C1 and //! C2. The point u1 on C1 and the point u2 on C2 must be //! confused. tl and ta are the linear and angular //! tolerance used two compare the derivative. - Standard_EXPORT static GeomAbs_Shape Continuity (const BRepAdaptor_Curve& C1, const BRepAdaptor_Curve& C2, const Standard_Real u1, const Standard_Real u2, const Standard_Real tl, const Standard_Real ta); - - //! The same as preceding but using the standard tolerances from package Precision. - Standard_EXPORT static GeomAbs_Shape Continuity (const BRepAdaptor_Curve& C1, const BRepAdaptor_Curve& C2, const Standard_Real u1, const Standard_Real u2); + Standard_EXPORT static GeomAbs_Shape Continuity(const BRepAdaptor_Curve& C1, + const BRepAdaptor_Curve& C2, + const Standard_Real u1, + const Standard_Real u2, + const Standard_Real tl, + const Standard_Real ta); + //! The same as preceding but using the standard tolerances from package Precision. + Standard_EXPORT static GeomAbs_Shape Continuity(const BRepAdaptor_Curve& C1, + const BRepAdaptor_Curve& C2, + const Standard_Real u1, + const Standard_Real u2); }; #endif // _BRepLProp_HeaderFile diff --git a/opencascade/BRepLProp_CLProps.hxx b/opencascade/BRepLProp_CLProps.hxx index 3f1597c43..c9ce64d2f 100644 --- a/opencascade/BRepLProp_CLProps.hxx +++ b/opencascade/BRepLProp_CLProps.hxx @@ -35,15 +35,11 @@ class gp_Pnt; class gp_Dir; class BRepLProp_CurveTool; - - -class BRepLProp_CLProps +class BRepLProp_CLProps { public: - DEFINE_STANDARD_ALLOC - //! Initializes the local properties of the curve //! The current point and the derivatives are //! computed at the same time, which allows an @@ -53,13 +49,18 @@ public: //! only the tangent, N should be equal to 1. //! is the linear tolerance (it is used to test //! if a vector is null). - Standard_EXPORT BRepLProp_CLProps(const BRepAdaptor_Curve& C, const Standard_Integer N, const Standard_Real Resolution); - + Standard_EXPORT BRepLProp_CLProps(const BRepAdaptor_Curve& C, + const Standard_Integer N, + const Standard_Real Resolution); + //! Same as previous constructor but here the parameter is //! set to the value . //! All the computations done will be related to and . - Standard_EXPORT BRepLProp_CLProps(const BRepAdaptor_Curve& C, const Standard_Real U, const Standard_Integer N, const Standard_Real Resolution); - + Standard_EXPORT BRepLProp_CLProps(const BRepAdaptor_Curve& C, + const Standard_Real U, + const Standard_Integer N, + const Standard_Real Resolution); + //! Same as previous constructor but here the parameter is //! set to the value and the curve is set //! with SetCurve. @@ -67,79 +68,60 @@ public: //! All the computations done will be related to and //! when the functions "set" will be done. Standard_EXPORT BRepLProp_CLProps(const Standard_Integer N, const Standard_Real Resolution); - + //! Initializes the local properties of the curve //! for the parameter value . - Standard_EXPORT void SetParameter (const Standard_Real U); - + Standard_EXPORT void SetParameter(const Standard_Real U); + //! Initializes the local properties of the curve //! for the new curve. - Standard_EXPORT void SetCurve (const BRepAdaptor_Curve& C); - + Standard_EXPORT void SetCurve(const BRepAdaptor_Curve& C); + //! Returns the Point. Standard_EXPORT const gp_Pnt& Value() const; - + //! Returns the first derivative. //! The derivative is computed if it has not been yet. Standard_EXPORT const gp_Vec& D1(); - + //! Returns the second derivative. //! The derivative is computed if it has not been yet. Standard_EXPORT const gp_Vec& D2(); - + //! Returns the third derivative. //! The derivative is computed if it has not been yet. Standard_EXPORT const gp_Vec& D3(); - + //! Returns True if the tangent is defined. //! For example, the tangent is not defined if the //! three first derivatives are all null. Standard_EXPORT Standard_Boolean IsTangentDefined(); - + //! output the tangent direction - Standard_EXPORT void Tangent (gp_Dir& D); - + Standard_EXPORT void Tangent(gp_Dir& D); + //! Returns the curvature. Standard_EXPORT Standard_Real Curvature(); - - //! Returns the normal direction . - Standard_EXPORT void Normal (gp_Dir& N); - - //! Returns the centre of curvature

. - Standard_EXPORT void CentreOfCurvature (gp_Pnt& P); - + //! Returns the normal direction . + Standard_EXPORT void Normal(gp_Dir& N); + //! Returns the centre of curvature

. + Standard_EXPORT void CentreOfCurvature(gp_Pnt& P); protected: - - - - - private: - - - BRepAdaptor_Curve myCurve; - Standard_Real myU; - Standard_Integer myDerOrder; - Standard_Real myCN; - Standard_Real myLinTol; - gp_Pnt myPnt; - gp_Vec myDerivArr[3]; - gp_Dir myTangent; - Standard_Real myCurvature; - LProp_Status myTangentStatus; - Standard_Integer mySignificantFirstDerivativeOrder; - - + Standard_Real myU; + Standard_Integer myDerOrder; + Standard_Real myCN; + Standard_Real myLinTol; + gp_Pnt myPnt; + gp_Vec myDerivArr[3]; + gp_Dir myTangent; + Standard_Real myCurvature; + LProp_Status myTangentStatus; + Standard_Integer mySignificantFirstDerivativeOrder; }; - - - - - - #endif // _BRepLProp_CLProps_HeaderFile diff --git a/opencascade/BRepLProp_CurveTool.hxx b/opencascade/BRepLProp_CurveTool.hxx index fb693eaef..fc2a744d0 100644 --- a/opencascade/BRepLProp_CurveTool.hxx +++ b/opencascade/BRepLProp_CurveTool.hxx @@ -25,65 +25,54 @@ class BRepAdaptor_Curve; class gp_Pnt; class gp_Vec; - - -class BRepLProp_CurveTool +class BRepLProp_CurveTool { public: - DEFINE_STANDARD_ALLOC - //! Computes the point

of parameter on the curve . - Standard_EXPORT static void Value (const BRepAdaptor_Curve& C, const Standard_Real U, gp_Pnt& P); - + Standard_EXPORT static void Value(const BRepAdaptor_Curve& C, const Standard_Real U, gp_Pnt& P); + //! Computes the point

and first derivative of //! parameter on the curve . - Standard_EXPORT static void D1 (const BRepAdaptor_Curve& C, const Standard_Real U, gp_Pnt& P, gp_Vec& V1); - + Standard_EXPORT static void D1(const BRepAdaptor_Curve& C, + const Standard_Real U, + gp_Pnt& P, + gp_Vec& V1); + //! Computes the point

, the first derivative and second //! derivative of parameter on the curve . - Standard_EXPORT static void D2 (const BRepAdaptor_Curve& C, const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2); - + Standard_EXPORT static void D2(const BRepAdaptor_Curve& C, + const Standard_Real U, + gp_Pnt& P, + gp_Vec& V1, + gp_Vec& V2); + //! Computes the point

, the first derivative , the //! second derivative and third derivative of //! parameter on the curve . - Standard_EXPORT static void D3 (const BRepAdaptor_Curve& C, const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, gp_Vec& V3); - + Standard_EXPORT static void D3(const BRepAdaptor_Curve& C, + const Standard_Real U, + gp_Pnt& P, + gp_Vec& V1, + gp_Vec& V2, + gp_Vec& V3); + //! returns the order of continuity of the curve . //! returns 1 : first derivative only is computable //! returns 2 : first and second derivative only are computable. //! returns 3 : first, second and third are computable. - Standard_EXPORT static Standard_Integer Continuity (const BRepAdaptor_Curve& C); - + Standard_EXPORT static Standard_Integer Continuity(const BRepAdaptor_Curve& C); + //! returns the first parameter bound of the curve. - Standard_EXPORT static Standard_Real FirstParameter (const BRepAdaptor_Curve& C); - + Standard_EXPORT static Standard_Real FirstParameter(const BRepAdaptor_Curve& C); + //! returns the last parameter bound of the curve. //! FirstParameter must be less than LastParamenter. - Standard_EXPORT static Standard_Real LastParameter (const BRepAdaptor_Curve& C); - - - + Standard_EXPORT static Standard_Real LastParameter(const BRepAdaptor_Curve& C); protected: - - - - - private: - - - - - }; - - - - - - #endif // _BRepLProp_CurveTool_HeaderFile diff --git a/opencascade/BRepLProp_SLProps.hxx b/opencascade/BRepLProp_SLProps.hxx index 0ea0a2238..5a73a8bbb 100644 --- a/opencascade/BRepLProp_SLProps.hxx +++ b/opencascade/BRepLProp_SLProps.hxx @@ -36,15 +36,11 @@ class gp_Pnt; class gp_Vec; class gp_Dir; - - -class BRepLProp_SLProps +class BRepLProp_SLProps { public: - DEFINE_STANDARD_ALLOC - //! Initializes the local properties of the surface //! for the parameter values (, ). //! The current point and the derivatives are @@ -55,139 +51,126 @@ public: //! only the tangent, N should be equal to 1. //! is the linear tolerance (it is used to test //! if a vector is null). - Standard_EXPORT BRepLProp_SLProps(const BRepAdaptor_Surface& S, const Standard_Real U, const Standard_Real V, const Standard_Integer N, const Standard_Real Resolution); - + Standard_EXPORT BRepLProp_SLProps(const BRepAdaptor_Surface& S, + const Standard_Real U, + const Standard_Real V, + const Standard_Integer N, + const Standard_Real Resolution); + //! idem as previous constructor but without setting the value //! of parameters and . - Standard_EXPORT BRepLProp_SLProps(const BRepAdaptor_Surface& S, const Standard_Integer N, const Standard_Real Resolution); - + Standard_EXPORT BRepLProp_SLProps(const BRepAdaptor_Surface& S, + const Standard_Integer N, + const Standard_Real Resolution); + //! idem as previous constructor but without setting the value //! of parameters and and the surface. //! the surface can have an empty constructor. Standard_EXPORT BRepLProp_SLProps(const Standard_Integer N, const Standard_Real Resolution); - + //! Initializes the local properties of the surface S //! for the new surface. - Standard_EXPORT void SetSurface (const BRepAdaptor_Surface& S); - + Standard_EXPORT void SetSurface(const BRepAdaptor_Surface& S); + //! Initializes the local properties of the surface S //! for the new parameter values (, ). - Standard_EXPORT void SetParameters (const Standard_Real U, const Standard_Real V); - + Standard_EXPORT void SetParameters(const Standard_Real U, const Standard_Real V); + //! Returns the point. Standard_EXPORT const gp_Pnt& Value() const; - + //! Returns the first U derivative. //! The derivative is computed if it has not been yet. Standard_EXPORT const gp_Vec& D1U(); - + //! Returns the first V derivative. //! The derivative is computed if it has not been yet. Standard_EXPORT const gp_Vec& D1V(); - + //! Returns the second U derivatives //! The derivative is computed if it has not been yet. Standard_EXPORT const gp_Vec& D2U(); - + //! Returns the second V derivative. //! The derivative is computed if it has not been yet. Standard_EXPORT const gp_Vec& D2V(); - + //! Returns the second UV cross-derivative. //! The derivative is computed if it has not been yet. Standard_EXPORT const gp_Vec& DUV(); - + //! returns True if the U tangent is defined. //! For example, the tangent is not defined if the //! two first U derivatives are null. Standard_EXPORT Standard_Boolean IsTangentUDefined(); - + //! Returns the tangent direction on the iso-V. - Standard_EXPORT void TangentU (gp_Dir& D); - + Standard_EXPORT void TangentU(gp_Dir& D); + //! returns if the V tangent is defined. //! For example, the tangent is not defined if the //! two first V derivatives are null. Standard_EXPORT Standard_Boolean IsTangentVDefined(); - + //! Returns the tangent direction on the iso-V. - Standard_EXPORT void TangentV (gp_Dir& D); - + Standard_EXPORT void TangentV(gp_Dir& D); + //! Tells if the normal is defined. Standard_EXPORT Standard_Boolean IsNormalDefined(); - + //! Returns the normal direction. Standard_EXPORT const gp_Dir& Normal(); - + //! returns True if the curvature is defined. Standard_EXPORT Standard_Boolean IsCurvatureDefined(); - + //! returns True if the point is umbilic (i.e. if the //! curvature is constant). Standard_EXPORT Standard_Boolean IsUmbilic(); - + //! Returns the maximum curvature Standard_EXPORT Standard_Real MaxCurvature(); - + //! Returns the minimum curvature Standard_EXPORT Standard_Real MinCurvature(); - + //! Returns the direction of the maximum and minimum curvature //! and - Standard_EXPORT void CurvatureDirections (gp_Dir& MaxD, gp_Dir& MinD); - + Standard_EXPORT void CurvatureDirections(gp_Dir& MaxD, gp_Dir& MinD); + //! Returns the mean curvature. Standard_EXPORT Standard_Real MeanCurvature(); - + //! Returns the Gaussian curvature Standard_EXPORT Standard_Real GaussianCurvature(); - - - protected: - - - - - private: - - - BRepAdaptor_Surface mySurf; - Standard_Real myU; - Standard_Real myV; - Standard_Integer myDerOrder; - Standard_Integer myCN; - Standard_Real myLinTol; - gp_Pnt myPnt; - gp_Vec myD1u; - gp_Vec myD1v; - gp_Vec myD2u; - gp_Vec myD2v; - gp_Vec myDuv; - gp_Dir myNormal; - Standard_Real myMinCurv; - Standard_Real myMaxCurv; - gp_Dir myDirMinCurv; - gp_Dir myDirMaxCurv; - Standard_Real myMeanCurv; - Standard_Real myGausCurv; - Standard_Integer mySignificantFirstDerivativeOrderU; - Standard_Integer mySignificantFirstDerivativeOrderV; - LProp_Status myUTangentStatus; - LProp_Status myVTangentStatus; - LProp_Status myNormalStatus; - LProp_Status myCurvatureStatus; - - + Standard_Real myU; + Standard_Real myV; + Standard_Integer myDerOrder; + Standard_Integer myCN; + Standard_Real myLinTol; + gp_Pnt myPnt; + gp_Vec myD1u; + gp_Vec myD1v; + gp_Vec myD2u; + gp_Vec myD2v; + gp_Vec myDuv; + gp_Dir myNormal; + Standard_Real myMinCurv; + Standard_Real myMaxCurv; + gp_Dir myDirMinCurv; + gp_Dir myDirMaxCurv; + Standard_Real myMeanCurv; + Standard_Real myGausCurv; + Standard_Integer mySignificantFirstDerivativeOrderU; + Standard_Integer mySignificantFirstDerivativeOrderV; + LProp_Status myUTangentStatus; + LProp_Status myVTangentStatus; + LProp_Status myNormalStatus; + LProp_Status myCurvatureStatus; }; - - - - - - #endif // _BRepLProp_SLProps_HeaderFile diff --git a/opencascade/BRepLProp_SurfaceTool.hxx b/opencascade/BRepLProp_SurfaceTool.hxx index 5f3d64cad..f041eeb98 100644 --- a/opencascade/BRepLProp_SurfaceTool.hxx +++ b/opencascade/BRepLProp_SurfaceTool.hxx @@ -25,58 +25,59 @@ class BRepAdaptor_Surface; class gp_Pnt; class gp_Vec; - - -class BRepLProp_SurfaceTool +class BRepLProp_SurfaceTool { public: - DEFINE_STANDARD_ALLOC - //! Computes the point

of parameter and on the //! Surface . - Standard_EXPORT static void Value (const BRepAdaptor_Surface& S, const Standard_Real U, const Standard_Real V, gp_Pnt& P); - + Standard_EXPORT static void Value(const BRepAdaptor_Surface& S, + const Standard_Real U, + const Standard_Real V, + gp_Pnt& P); + //! Computes the point

and first derivative of //! parameter and on the Surface . - Standard_EXPORT static void D1 (const BRepAdaptor_Surface& S, const Standard_Real U, const Standard_Real V, gp_Pnt& P, gp_Vec& D1U, gp_Vec& D1V); - + Standard_EXPORT static void D1(const BRepAdaptor_Surface& S, + const Standard_Real U, + const Standard_Real V, + gp_Pnt& P, + gp_Vec& D1U, + gp_Vec& D1V); + //! Computes the point

, the first derivative and second //! derivative of parameter and on the Surface . - Standard_EXPORT static void D2 (const BRepAdaptor_Surface& S, const Standard_Real U, const Standard_Real V, gp_Pnt& P, gp_Vec& D1U, gp_Vec& D1V, gp_Vec& D2U, gp_Vec& D2V, gp_Vec& DUV); - - Standard_EXPORT static gp_Vec DN (const BRepAdaptor_Surface& S, const Standard_Real U, const Standard_Real V, const Standard_Integer IU, const Standard_Integer IV); - + Standard_EXPORT static void D2(const BRepAdaptor_Surface& S, + const Standard_Real U, + const Standard_Real V, + gp_Pnt& P, + gp_Vec& D1U, + gp_Vec& D1V, + gp_Vec& D2U, + gp_Vec& D2V, + gp_Vec& DUV); + + Standard_EXPORT static gp_Vec DN(const BRepAdaptor_Surface& S, + const Standard_Real U, + const Standard_Real V, + const Standard_Integer IU, + const Standard_Integer IV); + //! returns the order of continuity of the Surface . //! returns 1 : first derivative only is computable //! returns 2 : first and second derivative only are computable. - Standard_EXPORT static Standard_Integer Continuity (const BRepAdaptor_Surface& S); - - //! returns the bounds of the Surface. - Standard_EXPORT static void Bounds (const BRepAdaptor_Surface& S, Standard_Real& U1, Standard_Real& V1, Standard_Real& U2, Standard_Real& V2); - - + Standard_EXPORT static Standard_Integer Continuity(const BRepAdaptor_Surface& S); + //! returns the bounds of the Surface. + Standard_EXPORT static void Bounds(const BRepAdaptor_Surface& S, + Standard_Real& U1, + Standard_Real& V1, + Standard_Real& U2, + Standard_Real& V2); protected: - - - - - private: - - - - - }; - - - - - - #endif // _BRepLProp_SurfaceTool_HeaderFile diff --git a/opencascade/BRepLib.hxx b/opencascade/BRepLib.hxx index 1acb765bf..af82fe5c3 100644 --- a/opencascade/BRepLib.hxx +++ b/opencascade/BRepLib.hxx @@ -38,7 +38,6 @@ class TopoDS_Solid; class TopoDS_Face; class BRepTools_ReShape; - //! The BRepLib package provides general utilities for //! BRep. //! @@ -46,35 +45,33 @@ class BRepTools_ReShape; //! a set of edges. //! //! * Compute missing 3d curve on an edge. -class BRepLib +class BRepLib { public: - DEFINE_STANDARD_ALLOC - - //! Computes the max distance between edge //! and its 2d representation on the face. //! Sets the default precision. The current Precision //! is returned. - Standard_EXPORT static void Precision (const Standard_Real P); - + Standard_EXPORT static void Precision(const Standard_Real P); + //! Returns the default precision. Standard_EXPORT static Standard_Real Precision(); - + //! Sets the current plane to P. - Standard_EXPORT static void Plane (const Handle(Geom_Plane)& P); - + Standard_EXPORT static void Plane(const Handle(Geom_Plane)& P); + //! Returns the current plane. Standard_EXPORT static const Handle(Geom_Plane)& Plane(); - + //! checks if the Edge is same range IGNORING //! the same range flag of the edge //! Confusion argument is to compare real numbers //! idenpendently of any model space tolerance - Standard_EXPORT static Standard_Boolean CheckSameRange (const TopoDS_Edge& E, const Standard_Real Confusion = 1.0e-12); - + Standard_EXPORT static Standard_Boolean CheckSameRange(const TopoDS_Edge& E, + const Standard_Real Confusion = 1.0e-12); + //! will make all the curve representation have //! the same range domain for the parameters. //! This will IGNORE the same range flag value @@ -83,34 +80,47 @@ public: //! range of that curve. If not the first curve representation //! encountered in the list will give its range to //! the all the other curves. - Standard_EXPORT static void SameRange (const TopoDS_Edge& E, const Standard_Real Tolerance = 1.0e-5); - + Standard_EXPORT static void SameRange(const TopoDS_Edge& E, + const Standard_Real Tolerance = 1.0e-5); + //! Computes the 3d curve for the edge if it does //! not exist. Returns True if the curve was computed //! or existed. Returns False if there is no planar //! pcurve or the computation failed. //! >= 30 in approximation - Standard_EXPORT static Standard_Boolean BuildCurve3d (const TopoDS_Edge& E, const Standard_Real Tolerance = 1.0e-5, const GeomAbs_Shape Continuity = GeomAbs_C1, const Standard_Integer MaxDegree = 14, const Standard_Integer MaxSegment = 0); - + Standard_EXPORT static Standard_Boolean BuildCurve3d(const TopoDS_Edge& E, + const Standard_Real Tolerance = 1.0e-5, + const GeomAbs_Shape Continuity = GeomAbs_C1, + const Standard_Integer MaxDegree = 14, + const Standard_Integer MaxSegment = 0); + //! Computes the 3d curves for all the edges of //! return False if one of the computation failed. //! >= 30 in approximation - Standard_EXPORT static Standard_Boolean BuildCurves3d (const TopoDS_Shape& S, const Standard_Real Tolerance, const GeomAbs_Shape Continuity = GeomAbs_C1, const Standard_Integer MaxDegree = 14, const Standard_Integer MaxSegment = 0); - + Standard_EXPORT static Standard_Boolean BuildCurves3d(const TopoDS_Shape& S, + const Standard_Real Tolerance, + const GeomAbs_Shape Continuity = GeomAbs_C1, + const Standard_Integer MaxDegree = 14, + const Standard_Integer MaxSegment = 0); + //! Computes the 3d curves for all the edges of //! return False if one of the computation failed. - Standard_EXPORT static Standard_Boolean BuildCurves3d (const TopoDS_Shape& S); + Standard_EXPORT static Standard_Boolean BuildCurves3d(const TopoDS_Shape& S); //! Builds pcurve of edge on face if the surface is plane, and updates the edge. - Standard_EXPORT static void BuildPCurveForEdgeOnPlane(const TopoDS_Edge& theE, const TopoDS_Face& theF); + Standard_EXPORT static void BuildPCurveForEdgeOnPlane(const TopoDS_Edge& theE, + const TopoDS_Face& theF); //! Builds pcurve of edge on face if the surface is plane, but does not update the edge. //! The output are the pcurve and the flag telling that pcurve was built. - Standard_EXPORT static void BuildPCurveForEdgeOnPlane(const TopoDS_Edge& theE, const TopoDS_Face& theF, - Handle(Geom2d_Curve)& aC2D, Standard_Boolean& bToUpdate); + Standard_EXPORT static void BuildPCurveForEdgeOnPlane(const TopoDS_Edge& theE, + const TopoDS_Face& theF, + Handle(Geom2d_Curve)& aC2D, + Standard_Boolean& bToUpdate); //! Builds pcurves of edges on face if the surface is plane, and update the edges. - template static void BuildPCurveForEdgesOnPlane(const TCont& theLE, const TopoDS_Face& theF) + template + static void BuildPCurveForEdgesOnPlane(const TCont& theLE, const TopoDS_Face& theF) { for (typename TCont::Iterator aIt(theLE); aIt.More(); aIt.Next()) { @@ -128,8 +138,10 @@ public: //! Usually it should be around 10e-5 //! contains all -- the curve representation of the edge //! returns True if the Edge tolerance had to be updated - Standard_EXPORT static Standard_Boolean UpdateEdgeTol (const TopoDS_Edge& E, const Standard_Real MinToleranceRequest, const Standard_Real MaxToleranceToCheck); - + Standard_EXPORT static Standard_Boolean UpdateEdgeTol(const TopoDS_Edge& E, + const Standard_Real MinToleranceRequest, + const Standard_Real MaxToleranceToCheck); + //! -- Checks all the edges of the shape whose -- -- -- //! Tolerance is smaller than MaxToleranceToCheck -- //! Returns True if at least one edge was updated -- @@ -139,13 +151,17 @@ public: //! //! Warning :The method is very slow as it checks all. //! Use only in interfaces or processing assimilate batch - Standard_EXPORT static Standard_Boolean UpdateEdgeTolerance (const TopoDS_Shape& S, const Standard_Real MinToleranceRequest, const Standard_Real MaxToleranceToCheck); - + Standard_EXPORT static Standard_Boolean UpdateEdgeTolerance( + const TopoDS_Shape& S, + const Standard_Real MinToleranceRequest, + const Standard_Real MaxToleranceToCheck); + //! Computes new 2d curve(s) for the edge to have //! the same parameter as the 3d curve. //! The algorithm is not done if the flag SameParameter //! was True on the Edge. - Standard_EXPORT static void SameParameter (const TopoDS_Edge& theEdge, const Standard_Real Tolerance = 1.0e-5); + Standard_EXPORT static void SameParameter(const TopoDS_Edge& theEdge, + const Standard_Real Tolerance = 1.0e-5); //! Computes new 2d curve(s) for the edge to have //! the same parameter as the 3d curve. @@ -156,52 +172,61 @@ public: //! If IsUseOldEdge is true then the input edge will be modified, //! otherwise the new copy of input edge will be created. //! Returns the new edge as a result, can be ignored if IsUseOldEdge is true. - Standard_EXPORT static TopoDS_Edge SameParameter(const TopoDS_Edge& theEdge, - const Standard_Real theTolerance, Standard_Real& theNewTol, const Standard_Boolean IsUseOldEdge); - + Standard_EXPORT static TopoDS_Edge SameParameter(const TopoDS_Edge& theEdge, + const Standard_Real theTolerance, + Standard_Real& theNewTol, + const Standard_Boolean IsUseOldEdge); + //! Computes new 2d curve(s) for all the edges of //! to have the same parameter as the 3d curve. //! The algorithm is not done if the flag SameParameter //! was True on an Edge. - Standard_EXPORT static void SameParameter(const TopoDS_Shape& S, - const Standard_Real Tolerance = 1.0e-5, const Standard_Boolean forced = Standard_False); + Standard_EXPORT static void SameParameter(const TopoDS_Shape& S, + const Standard_Real Tolerance = 1.0e-5, + const Standard_Boolean forced = Standard_False); //! Computes new 2d curve(s) for all the edges of //! to have the same parameter as the 3d curve. //! The algorithm is not done if the flag SameParameter //! was True on an Edge.
- //! theReshaper is used to record the modifications of input shape to prevent any + //! theReshaper is used to record the modifications of input shape to prevent any //! modifications on the shape itself. - //! Thus the input shape (and its subshapes) will not be modified, instead the reshaper will + //! Thus the input shape (and its subshapes) will not be modified, instead the reshaper will //! contain a modified empty-copies of original subshapes as substitutions. - Standard_EXPORT static void SameParameter(const TopoDS_Shape& S, BRepTools_ReShape& theReshaper, - const Standard_Real Tolerance = 1.0e-5, const Standard_Boolean forced = Standard_False ); - + Standard_EXPORT static void SameParameter(const TopoDS_Shape& S, + BRepTools_ReShape& theReshaper, + const Standard_Real Tolerance = 1.0e-5, + const Standard_Boolean forced = Standard_False); + //! Replaces tolerance of FACE EDGE VERTEX by the //! tolerance Max of their connected handling shapes. //! It is not necessary to use this call after //! SameParameter. (called in) - Standard_EXPORT static void UpdateTolerances (const TopoDS_Shape& S, const Standard_Boolean verifyFaceTolerance = Standard_False); + Standard_EXPORT static void UpdateTolerances( + const TopoDS_Shape& S, + const Standard_Boolean verifyFaceTolerance = Standard_False); //! Replaces tolerance of FACE EDGE VERTEX by the //! tolerance Max of their connected handling shapes. //! It is not necessary to use this call after //! SameParameter. (called in)
- //! theReshaper is used to record the modifications of input shape to prevent any + //! theReshaper is used to record the modifications of input shape to prevent any //! modifications on the shape itself. - //! Thus the input shape (and its subshapes) will not be modified, instead the reshaper will + //! Thus the input shape (and its subshapes) will not be modified, instead the reshaper will //! contain a modified empty-copies of original subshapes as substitutions. - Standard_EXPORT static void UpdateTolerances (const TopoDS_Shape& S, BRepTools_ReShape& theReshaper, - const Standard_Boolean verifyFaceTolerance = Standard_False ); - + Standard_EXPORT static void UpdateTolerances( + const TopoDS_Shape& S, + BRepTools_ReShape& theReshaper, + const Standard_Boolean verifyFaceTolerance = Standard_False); + //! Checks tolerances of edges (including inner points) and vertices //! of a shape and updates them to satisfy "SameParameter" condition - Standard_EXPORT static void UpdateInnerTolerances (const TopoDS_Shape& S); - + Standard_EXPORT static void UpdateInnerTolerances(const TopoDS_Shape& S); + //! Orients the solid forward and the shell with the //! orientation to have matter in the solid. Returns //! False if the solid is unOrientable (open or incoherent) - Standard_EXPORT static Standard_Boolean OrientClosedSolid (TopoDS_Solid& solid); + Standard_EXPORT static Standard_Boolean OrientClosedSolid(TopoDS_Solid& solid); //! Returns the order of continuity between two faces //! connected by an edge @@ -214,81 +239,95 @@ public: //! Warning: is an angular tolerance, expressed in Rad. //! Warning: If the edges's regularity are coded before, nothing //! is done. - Standard_EXPORT static void EncodeRegularity (const TopoDS_Shape& S, const Standard_Real TolAng = 1.0e-10); + Standard_EXPORT static void EncodeRegularity(const TopoDS_Shape& S, + const Standard_Real TolAng = 1.0e-10); //! Encodes the Regularity of edges in list on the shape //! Warning: is an angular tolerance, expressed in Rad. //! Warning: If the edges's regularity are coded before, nothing //! is done. - Standard_EXPORT static void EncodeRegularity(const TopoDS_Shape& S, const TopTools_ListOfShape& LE, const Standard_Real TolAng = 1.0e-10); - + Standard_EXPORT static void EncodeRegularity(const TopoDS_Shape& S, + const TopTools_ListOfShape& LE, + const Standard_Real TolAng = 1.0e-10); + //! Encodes the Regularity between and by //! Warning: is an angular tolerance, expressed in Rad. //! Warning: If the edge's regularity is coded before, nothing //! is done. - Standard_EXPORT static void EncodeRegularity (TopoDS_Edge& E, const TopoDS_Face& F1, const TopoDS_Face& F2, const Standard_Real TolAng = 1.0e-10); - + Standard_EXPORT static void EncodeRegularity(TopoDS_Edge& E, + const TopoDS_Face& F1, + const TopoDS_Face& F2, + const Standard_Real TolAng = 1.0e-10); + //! Sorts in LF the Faces of S on the complexity of //! their surfaces //! (Plane,Cylinder,Cone,Sphere,Torus,other) - Standard_EXPORT static void SortFaces (const TopoDS_Shape& S, TopTools_ListOfShape& LF); - + Standard_EXPORT static void SortFaces(const TopoDS_Shape& S, TopTools_ListOfShape& LF); + //! Sorts in LF the Faces of S on the reverse //! complexity of their surfaces //! (other,Torus,Sphere,Cone,Cylinder,Plane) - Standard_EXPORT static void ReverseSortFaces (const TopoDS_Shape& S, TopTools_ListOfShape& LF); - + Standard_EXPORT static void ReverseSortFaces(const TopoDS_Shape& S, TopTools_ListOfShape& LF); + //! Corrects the normals in Poly_Triangulation of faces, //! in such way that normals at nodes lying along smooth //! edges have the same value on both adjacent triangulations. //! Returns TRUE if any correction is done. - Standard_EXPORT static Standard_Boolean EnsureNormalConsistency (const TopoDS_Shape& S, const Standard_Real theAngTol = 0.001, const Standard_Boolean ForceComputeNormals = Standard_False); + Standard_EXPORT static Standard_Boolean EnsureNormalConsistency( + const TopoDS_Shape& S, + const Standard_Real theAngTol = 0.001, + const Standard_Boolean ForceComputeNormals = Standard_False); //! Updates value of deflection in Poly_Triangulation of faces //! by the maximum deviation measured on existing triangulation. - Standard_EXPORT static void UpdateDeflection (const TopoDS_Shape& S); + Standard_EXPORT static void UpdateDeflection(const TopoDS_Shape& S); //! Calculates the bounding sphere around the set of vertexes from the theLV list. //! Returns the center (theNewCenter) and the radius (theNewTol) of this sphere. //! This can be used to construct the new vertex which covers the given set of //! other vertices. - Standard_EXPORT static void BoundingVertex(const NCollection_List& theLV, - gp_Pnt& theNewCenter, Standard_Real& theNewTol); + Standard_EXPORT static void BoundingVertex(const NCollection_List& theLV, + gp_Pnt& theNewCenter, + Standard_Real& theNewTol); //! For an edge defined by 3d curve and tolerance and vertices defined by points, //! parameters on curve and tolerances, //! finds a range of curve between vertices not covered by vertices tolerances. - //! Returns false if there is no such range. Otherwise, sets theFirst and + //! Returns false if there is no such range. Otherwise, sets theFirst and //! theLast as its bounds. - Standard_EXPORT static Standard_Boolean FindValidRange - (const Adaptor3d_Curve& theCurve, const Standard_Real theTolE, - const Standard_Real theParV1, const gp_Pnt& thePntV1, const Standard_Real theTolV1, - const Standard_Real theParV2, const gp_Pnt& thePntV2, const Standard_Real theTolV2, - Standard_Real& theFirst, Standard_Real& theLast); + Standard_EXPORT static Standard_Boolean FindValidRange(const Adaptor3d_Curve& theCurve, + const Standard_Real theTolE, + const Standard_Real theParV1, + const gp_Pnt& thePntV1, + const Standard_Real theTolV1, + const Standard_Real theParV2, + const gp_Pnt& thePntV2, + const Standard_Real theTolV2, + Standard_Real& theFirst, + Standard_Real& theLast); //! Finds a range of 3d curve of the edge not covered by vertices tolerances. - //! Returns false if there is no such range. Otherwise, sets theFirst and + //! Returns false if there is no such range. Otherwise, sets theFirst and //! theLast as its bounds. - Standard_EXPORT static Standard_Boolean FindValidRange - (const TopoDS_Edge& theEdge, Standard_Real& theFirst, Standard_Real& theLast); - + Standard_EXPORT static Standard_Boolean FindValidRange(const TopoDS_Edge& theEdge, + Standard_Real& theFirst, + Standard_Real& theLast); //! Enlarges the face on the given value. - //! @param theF [in] The face to extend - //! @param theExtVal [in] The extension value - //! @param theExtUMin [in] Defines whether to extend the face in UMin direction - //! @param theExtUMax [in] Defines whether to extend the face in UMax direction - //! @param theExtVMin [in] Defines whether to extend the face in VMin direction - //! @param theExtVMax [in] Defines whether to extend the face in VMax direction - //! @param theFExtended [in] The extended face - Standard_EXPORT static void ExtendFace(const TopoDS_Face& theF, - const Standard_Real theExtVal, + //! @param[in] theF The face to extend + //! @param[in] theExtVal The extension value + //! @param[in] theExtUMin Defines whether to extend the face in UMin direction + //! @param[in] theExtUMax Defines whether to extend the face in UMax direction + //! @param[in] theExtVMin Defines whether to extend the face in VMin direction + //! @param[in] theExtVMax Defines whether to extend the face in VMax direction + //! @param[in] theFExtended The extended face + Standard_EXPORT static void ExtendFace(const TopoDS_Face& theF, + const Standard_Real theExtVal, const Standard_Boolean theExtUMin, const Standard_Boolean theExtUMax, const Standard_Boolean theExtVMin, const Standard_Boolean theExtVMax, - TopoDS_Face& theFExtended); - + TopoDS_Face& theFExtended); }; #endif // _BRepLib_HeaderFile diff --git a/opencascade/BRepLib_CheckCurveOnSurface.hxx b/opencascade/BRepLib_CheckCurveOnSurface.hxx index 84e4a5fb3..e8090b1f1 100644 --- a/opencascade/BRepLib_CheckCurveOnSurface.hxx +++ b/opencascade/BRepLib_CheckCurveOnSurface.hxx @@ -20,46 +20,36 @@ //! Computes the max distance between edge and its 2d representation on the face. //! This class is not intended to process non-sameparameter edges. -class BRepLib_CheckCurveOnSurface +class BRepLib_CheckCurveOnSurface { public: - DEFINE_STANDARD_ALLOC //! Default constructor - BRepLib_CheckCurveOnSurface() - : myIsParallel(Standard_False) + BRepLib_CheckCurveOnSurface() + : myIsParallel(Standard_False) { } - + //! Constructor Standard_EXPORT BRepLib_CheckCurveOnSurface(const TopoDS_Edge& theEdge, const TopoDS_Face& theFace); - + //! Sets the data for the algorithm - Standard_EXPORT void Init (const TopoDS_Edge& theEdge, const TopoDS_Face& theFace); + Standard_EXPORT void Init(const TopoDS_Edge& theEdge, const TopoDS_Face& theFace); //! Performs the calculation //! If myIsParallel == Standard_True then computation will be performed in parallel. Standard_EXPORT void Perform(); - + //! Returns true if the max distance has been found - Standard_Boolean IsDone() const - { - return myCOnSurfGeom.ErrorStatus() == 0; - } - + Standard_Boolean IsDone() const { return myCOnSurfGeom.ErrorStatus() == 0; } + //! Sets parallel flag - void SetParallel(const Standard_Boolean theIsParallel) - { - myIsParallel = theIsParallel; - } + void SetParallel(const Standard_Boolean theIsParallel) { myIsParallel = theIsParallel; } //! Returns true if parallel flag is set - Standard_Boolean IsParallel() - { - return myIsParallel; - } + Standard_Boolean IsParallel() { return myIsParallel; } //! Returns error status //! The possible values are: @@ -67,36 +57,25 @@ public: //! 1 - null curve or surface or 2d curve; //! 2 - invalid parametric range; //! 3 - error in calculations. - Standard_Integer ErrorStatus() const - { - return myCOnSurfGeom.ErrorStatus(); - } - + Standard_Integer ErrorStatus() const { return myCOnSurfGeom.ErrorStatus(); } + //! Returns max distance - Standard_Real MaxDistance() const - { - return myCOnSurfGeom.MaxDistance(); - } - + Standard_Real MaxDistance() const { return myCOnSurfGeom.MaxDistance(); } + //! Returns parameter in which the distance is maximal - Standard_Real MaxParameter() const - { - return myCOnSurfGeom.MaxParameter(); - } + Standard_Real MaxParameter() const { return myCOnSurfGeom.MaxParameter(); } protected: - //! Computes the max distance for the 3d curve of //! and 2d curve //! If isMultiThread == Standard_True then computation will be performed in parallel. - Standard_EXPORT void Compute (const Handle(Adaptor3d_CurveOnSurface)& theCurveOnSurface); + Standard_EXPORT void Compute(const Handle(Adaptor3d_CurveOnSurface)& theCurveOnSurface); private: - - GeomLib_CheckCurveOnSurface myCOnSurfGeom; + GeomLib_CheckCurveOnSurface myCOnSurfGeom; Handle(Adaptor3d_CurveOnSurface) myAdaptorCurveOnSurface; Handle(Adaptor3d_CurveOnSurface) myAdaptorCurveOnSurface2; - Standard_Boolean myIsParallel; + Standard_Boolean myIsParallel; }; #endif // _BRepLib_CheckCurveOnSurface_HeaderFile diff --git a/opencascade/BRepLib_Command.hxx b/opencascade/BRepLib_Command.hxx index dd00a81cb..0c21b4c82 100644 --- a/opencascade/BRepLib_Command.hxx +++ b/opencascade/BRepLib_Command.hxx @@ -23,7 +23,6 @@ #include - //! Root class for all commands in BRepLib. //! //! Provides : @@ -33,50 +32,30 @@ //! * Catching of exceptions (not implemented). //! //! * Logging (not implemented). -class BRepLib_Command +class BRepLib_Command { public: - DEFINE_STANDARD_ALLOC Standard_EXPORT virtual ~BRepLib_Command(); - + Standard_EXPORT Standard_Boolean IsDone() const; - + //! Raises NotDone if done is false. Standard_EXPORT void Check() const; - - - protected: - - //! Set done to False. Standard_EXPORT BRepLib_Command(); - + //! Set done to true. Standard_EXPORT void Done(); - + //! Set done to false. Standard_EXPORT void NotDone(); - - - private: - - - Standard_Boolean myDone; - - }; - - - - - - #endif // _BRepLib_Command_HeaderFile diff --git a/opencascade/BRepLib_EdgeError.hxx b/opencascade/BRepLib_EdgeError.hxx index c24f257b5..23317f738 100644 --- a/opencascade/BRepLib_EdgeError.hxx +++ b/opencascade/BRepLib_EdgeError.hxx @@ -21,13 +21,13 @@ //! no error enum BRepLib_EdgeError { -BRepLib_EdgeDone, -BRepLib_PointProjectionFailed, -BRepLib_ParameterOutOfRange, -BRepLib_DifferentPointsOnClosedCurve, -BRepLib_PointWithInfiniteParameter, -BRepLib_DifferentsPointAndParameter, -BRepLib_LineThroughIdenticPoints + BRepLib_EdgeDone, + BRepLib_PointProjectionFailed, + BRepLib_ParameterOutOfRange, + BRepLib_DifferentPointsOnClosedCurve, + BRepLib_PointWithInfiniteParameter, + BRepLib_DifferentsPointAndParameter, + BRepLib_LineThroughIdenticPoints }; #endif // _BRepLib_EdgeError_HeaderFile diff --git a/opencascade/BRepLib_FaceError.hxx b/opencascade/BRepLib_FaceError.hxx index d767e4086..3c3e76903 100644 --- a/opencascade/BRepLib_FaceError.hxx +++ b/opencascade/BRepLib_FaceError.hxx @@ -22,11 +22,11 @@ //! not initialised enum BRepLib_FaceError { -BRepLib_FaceDone, -BRepLib_NoFace, -BRepLib_NotPlanar, -BRepLib_CurveProjectionFailed, -BRepLib_ParametersOutOfRange + BRepLib_FaceDone, + BRepLib_NoFace, + BRepLib_NotPlanar, + BRepLib_CurveProjectionFailed, + BRepLib_ParametersOutOfRange }; #endif // _BRepLib_FaceError_HeaderFile diff --git a/opencascade/BRepLib_FindSurface.hxx b/opencascade/BRepLib_FindSurface.hxx index dc682feee..80e6abc13 100644 --- a/opencascade/BRepLib_FindSurface.hxx +++ b/opencascade/BRepLib_FindSurface.hxx @@ -25,7 +25,6 @@ class Geom_Surface; class TopoDS_Shape; - //! Provides an algorithm to find a Surface through a //! set of edges. //! @@ -46,15 +45,13 @@ class TopoDS_Shape; //! //! When Existed returns True the Surface may have a //! location given by the Location method. -class BRepLib_FindSurface +class BRepLib_FindSurface { public: - DEFINE_STANDARD_ALLOC - Standard_EXPORT BRepLib_FindSurface(); - + //! Computes the Surface from the edges of with the //! given tolerance. //! if is true, the computed surface will be @@ -63,8 +60,11 @@ public: //! If is true, then S should be a wire //! and the existing surface, on which wire S is not //! closed in 2D, will be ignored. - Standard_EXPORT BRepLib_FindSurface(const TopoDS_Shape& S, const Standard_Real Tol = -1, const Standard_Boolean OnlyPlane = Standard_False, const Standard_Boolean OnlyClosed = Standard_False); - + Standard_EXPORT BRepLib_FindSurface(const TopoDS_Shape& S, + const Standard_Real Tol = -1, + const Standard_Boolean OnlyPlane = Standard_False, + const Standard_Boolean OnlyClosed = Standard_False); + //! Computes the Surface from the edges of with the //! given tolerance. //! if is true, the computed surface will be @@ -73,46 +73,30 @@ public: //! If is true, then S should be a wire //! and the existing surface, on which wire S is not //! closed in 2D, will be ignored. - Standard_EXPORT void Init (const TopoDS_Shape& S, const Standard_Real Tol = -1, const Standard_Boolean OnlyPlane = Standard_False, const Standard_Boolean OnlyClosed = Standard_False); - + Standard_EXPORT void Init(const TopoDS_Shape& S, + const Standard_Real Tol = -1, + const Standard_Boolean OnlyPlane = Standard_False, + const Standard_Boolean OnlyClosed = Standard_False); + Standard_EXPORT Standard_Boolean Found() const; - + Standard_EXPORT Handle(Geom_Surface) Surface() const; - + Standard_EXPORT Standard_Real Tolerance() const; - - Standard_EXPORT Standard_Real ToleranceReached() const; - - Standard_EXPORT Standard_Boolean Existed() const; - - Standard_EXPORT TopLoc_Location Location() const; + Standard_EXPORT Standard_Real ToleranceReached() const; + Standard_EXPORT Standard_Boolean Existed() const; + Standard_EXPORT TopLoc_Location Location() const; protected: - - - - - private: - - - Handle(Geom_Surface) mySurface; - Standard_Real myTolerance; - Standard_Real myTolReached; - Standard_Boolean isExisted; - TopLoc_Location myLocation; - - + Standard_Real myTolerance; + Standard_Real myTolReached; + Standard_Boolean isExisted; + TopLoc_Location myLocation; }; - - - - - - #endif // _BRepLib_FindSurface_HeaderFile diff --git a/opencascade/BRepLib_FuseEdges.hxx b/opencascade/BRepLib_FuseEdges.hxx index 75de84282..7ffbec403 100644 --- a/opencascade/BRepLib_FuseEdges.hxx +++ b/opencascade/BRepLib_FuseEdges.hxx @@ -31,7 +31,6 @@ class TopoDS_Vertex; class TopoDS_Edge; - //! This class can detect vertices in a face that can //! be considered useless and then perform the fuse of //! the edges and remove the useless vertices. By @@ -41,97 +40,84 @@ class TopoDS_Edge; //! exactly the same 2 connex faces . //! * The edges connex to the vertex must have the //! same geometric support. -class BRepLib_FuseEdges +class BRepLib_FuseEdges { public: - DEFINE_STANDARD_ALLOC - //! Initialise members and build construction of map //! of ancestors. - Standard_EXPORT BRepLib_FuseEdges(const TopoDS_Shape& theShape, const Standard_Boolean PerformNow = Standard_False); - + Standard_EXPORT BRepLib_FuseEdges(const TopoDS_Shape& theShape, + const Standard_Boolean PerformNow = Standard_False); + //! set edges to avoid being fused - Standard_EXPORT void AvoidEdges (const TopTools_IndexedMapOfShape& theMapEdg); - + Standard_EXPORT void AvoidEdges(const TopTools_IndexedMapOfShape& theMapEdg); + //! set mode to enable concatenation G1 BSpline edges in one //! End Modified by IFV 19.04.07 - Standard_EXPORT void SetConcatBSpl (const Standard_Boolean theConcatBSpl = Standard_True); - + Standard_EXPORT void SetConcatBSpl(const Standard_Boolean theConcatBSpl = Standard_True); + //! returns all the list of edges to be fused //! each list of the map represent a set of connex edges //! that can be fused. - Standard_EXPORT void Edges (TopTools_DataMapOfIntegerListOfShape& theMapLstEdg); - + Standard_EXPORT void Edges(TopTools_DataMapOfIntegerListOfShape& theMapLstEdg); + //! returns all the fused edges. each integer entry in //! the map corresponds to the integer in the //! DataMapOfIntegerListOfShape we get in method //! Edges. That is to say, to the list of edges in //! theMapLstEdg(i) corresponds the resulting edge theMapEdge(i) - Standard_EXPORT void ResultEdges (TopTools_DataMapOfIntegerShape& theMapEdg); - + Standard_EXPORT void ResultEdges(TopTools_DataMapOfIntegerShape& theMapEdg); + //! returns the map of modified faces. - Standard_EXPORT void Faces (TopTools_DataMapOfShapeShape& theMapFac); - + Standard_EXPORT void Faces(TopTools_DataMapOfShapeShape& theMapFac); + //! returns myShape modified with the list of internal //! edges removed from it. Standard_EXPORT TopoDS_Shape& Shape(); - + //! returns the number of vertices candidate to be removed Standard_EXPORT Standard_Integer NbVertices(); - + //! Using map of list of connex edges, fuse each list to //! one edge and then update myShape Standard_EXPORT void Perform(); - - - protected: - - - - - private: - //! Build the all the lists of edges that are to be fused Standard_EXPORT void BuildListEdges(); - + //! Build result fused edges according to the list //! builtin BuildLisEdges Standard_EXPORT void BuildListResultEdges(); - - Standard_EXPORT void BuildListConnexEdge (const TopoDS_Shape& theEdge, TopTools_MapOfShape& theMapUniq, TopTools_ListOfShape& theLstEdg); - - Standard_EXPORT Standard_Boolean NextConnexEdge (const TopoDS_Vertex& theVertex, const TopoDS_Shape& theEdge, TopoDS_Shape& theEdgeConnex) const; - - Standard_EXPORT Standard_Boolean SameSupport (const TopoDS_Edge& E1, const TopoDS_Edge& E2) const; - - Standard_EXPORT Standard_Boolean UpdatePCurve (const TopoDS_Edge& theOldEdge, TopoDS_Edge& theNewEdge, const TopTools_ListOfShape& theLstEdg) const; - - - TopoDS_Shape myShape; - Standard_Boolean myShapeDone; - Standard_Boolean myEdgesDone; - Standard_Boolean myResultEdgesDone; - TopTools_IndexedDataMapOfShapeListOfShape myMapVerLstEdg; - TopTools_IndexedDataMapOfShapeListOfShape myMapEdgLstFac; - TopTools_DataMapOfIntegerListOfShape myMapLstEdg; - TopTools_DataMapOfIntegerShape myMapEdg; - TopTools_DataMapOfShapeShape myMapFaces; - Standard_Integer myNbConnexEdge; - TopTools_IndexedMapOfShape myAvoidEdg; - Standard_Boolean myConcatBSpl; - - -}; - + Standard_EXPORT void BuildListConnexEdge(const TopoDS_Shape& theEdge, + TopTools_MapOfShape& theMapUniq, + TopTools_ListOfShape& theLstEdg); + Standard_EXPORT Standard_Boolean NextConnexEdge(const TopoDS_Vertex& theVertex, + const TopoDS_Shape& theEdge, + TopoDS_Shape& theEdgeConnex) const; + Standard_EXPORT Standard_Boolean SameSupport(const TopoDS_Edge& E1, const TopoDS_Edge& E2) const; + Standard_EXPORT Standard_Boolean UpdatePCurve(const TopoDS_Edge& theOldEdge, + TopoDS_Edge& theNewEdge, + const TopTools_ListOfShape& theLstEdg) const; + TopoDS_Shape myShape; + Standard_Boolean myShapeDone; + Standard_Boolean myEdgesDone; + Standard_Boolean myResultEdgesDone; + TopTools_IndexedDataMapOfShapeListOfShape myMapVerLstEdg; + TopTools_IndexedDataMapOfShapeListOfShape myMapEdgLstFac; + TopTools_DataMapOfIntegerListOfShape myMapLstEdg; + TopTools_DataMapOfIntegerShape myMapEdg; + TopTools_DataMapOfShapeShape myMapFaces; + Standard_Integer myNbConnexEdge; + TopTools_IndexedMapOfShape myAvoidEdg; + Standard_Boolean myConcatBSpl; +}; #endif // _BRepLib_FuseEdges_HeaderFile diff --git a/opencascade/BRepLib_MakeEdge.hxx b/opencascade/BRepLib_MakeEdge.hxx index ed3b47968..321cec1fa 100644 --- a/opencascade/BRepLib_MakeEdge.hxx +++ b/opencascade/BRepLib_MakeEdge.hxx @@ -35,7 +35,6 @@ class Geom2d_Curve; class Geom_Surface; class TopoDS_Edge; - //! Provides methods to build edges. //! //! The methods have the following syntax, where @@ -67,143 +66,202 @@ class TopoDS_Edge; //! V1 and V2. Same as the previous but no vertices //! are created. If a vertex is Null the curve will //! be open in this direction. -class BRepLib_MakeEdge : public BRepLib_MakeShape +class BRepLib_MakeEdge : public BRepLib_MakeShape { public: - DEFINE_STANDARD_ALLOC - Standard_EXPORT BRepLib_MakeEdge(); - + Standard_EXPORT BRepLib_MakeEdge(const TopoDS_Vertex& V1, const TopoDS_Vertex& V2); - + Standard_EXPORT BRepLib_MakeEdge(const gp_Pnt& P1, const gp_Pnt& P2); - + Standard_EXPORT BRepLib_MakeEdge(const gp_Lin& L); - + Standard_EXPORT BRepLib_MakeEdge(const gp_Lin& L, const Standard_Real p1, const Standard_Real p2); - + Standard_EXPORT BRepLib_MakeEdge(const gp_Lin& L, const gp_Pnt& P1, const gp_Pnt& P2); - - Standard_EXPORT BRepLib_MakeEdge(const gp_Lin& L, const TopoDS_Vertex& V1, const TopoDS_Vertex& V2); - + + Standard_EXPORT BRepLib_MakeEdge(const gp_Lin& L, + const TopoDS_Vertex& V1, + const TopoDS_Vertex& V2); + Standard_EXPORT BRepLib_MakeEdge(const gp_Circ& L); - - Standard_EXPORT BRepLib_MakeEdge(const gp_Circ& L, const Standard_Real p1, const Standard_Real p2); - + + Standard_EXPORT BRepLib_MakeEdge(const gp_Circ& L, + const Standard_Real p1, + const Standard_Real p2); + Standard_EXPORT BRepLib_MakeEdge(const gp_Circ& L, const gp_Pnt& P1, const gp_Pnt& P2); - - Standard_EXPORT BRepLib_MakeEdge(const gp_Circ& L, const TopoDS_Vertex& V1, const TopoDS_Vertex& V2); - + + Standard_EXPORT BRepLib_MakeEdge(const gp_Circ& L, + const TopoDS_Vertex& V1, + const TopoDS_Vertex& V2); + Standard_EXPORT BRepLib_MakeEdge(const gp_Elips& L); - - Standard_EXPORT BRepLib_MakeEdge(const gp_Elips& L, const Standard_Real p1, const Standard_Real p2); - + + Standard_EXPORT BRepLib_MakeEdge(const gp_Elips& L, + const Standard_Real p1, + const Standard_Real p2); + Standard_EXPORT BRepLib_MakeEdge(const gp_Elips& L, const gp_Pnt& P1, const gp_Pnt& P2); - - Standard_EXPORT BRepLib_MakeEdge(const gp_Elips& L, const TopoDS_Vertex& V1, const TopoDS_Vertex& V2); - + + Standard_EXPORT BRepLib_MakeEdge(const gp_Elips& L, + const TopoDS_Vertex& V1, + const TopoDS_Vertex& V2); + Standard_EXPORT BRepLib_MakeEdge(const gp_Hypr& L); - - Standard_EXPORT BRepLib_MakeEdge(const gp_Hypr& L, const Standard_Real p1, const Standard_Real p2); - + + Standard_EXPORT BRepLib_MakeEdge(const gp_Hypr& L, + const Standard_Real p1, + const Standard_Real p2); + Standard_EXPORT BRepLib_MakeEdge(const gp_Hypr& L, const gp_Pnt& P1, const gp_Pnt& P2); - - Standard_EXPORT BRepLib_MakeEdge(const gp_Hypr& L, const TopoDS_Vertex& V1, const TopoDS_Vertex& V2); - + + Standard_EXPORT BRepLib_MakeEdge(const gp_Hypr& L, + const TopoDS_Vertex& V1, + const TopoDS_Vertex& V2); + Standard_EXPORT BRepLib_MakeEdge(const gp_Parab& L); - - Standard_EXPORT BRepLib_MakeEdge(const gp_Parab& L, const Standard_Real p1, const Standard_Real p2); - + + Standard_EXPORT BRepLib_MakeEdge(const gp_Parab& L, + const Standard_Real p1, + const Standard_Real p2); + Standard_EXPORT BRepLib_MakeEdge(const gp_Parab& L, const gp_Pnt& P1, const gp_Pnt& P2); - - Standard_EXPORT BRepLib_MakeEdge(const gp_Parab& L, const TopoDS_Vertex& V1, const TopoDS_Vertex& V2); - + + Standard_EXPORT BRepLib_MakeEdge(const gp_Parab& L, + const TopoDS_Vertex& V1, + const TopoDS_Vertex& V2); + Standard_EXPORT BRepLib_MakeEdge(const Handle(Geom_Curve)& L); - - Standard_EXPORT BRepLib_MakeEdge(const Handle(Geom_Curve)& L, const Standard_Real p1, const Standard_Real p2); - + + Standard_EXPORT BRepLib_MakeEdge(const Handle(Geom_Curve)& L, + const Standard_Real p1, + const Standard_Real p2); + Standard_EXPORT BRepLib_MakeEdge(const Handle(Geom_Curve)& L, const gp_Pnt& P1, const gp_Pnt& P2); - - Standard_EXPORT BRepLib_MakeEdge(const Handle(Geom_Curve)& L, const TopoDS_Vertex& V1, const TopoDS_Vertex& V2); - - Standard_EXPORT BRepLib_MakeEdge(const Handle(Geom_Curve)& L, const gp_Pnt& P1, const gp_Pnt& P2, const Standard_Real p1, const Standard_Real p2); - - Standard_EXPORT BRepLib_MakeEdge(const Handle(Geom_Curve)& L, const TopoDS_Vertex& V1, const TopoDS_Vertex& V2, const Standard_Real p1, const Standard_Real p2); - + + Standard_EXPORT BRepLib_MakeEdge(const Handle(Geom_Curve)& L, + const TopoDS_Vertex& V1, + const TopoDS_Vertex& V2); + + Standard_EXPORT BRepLib_MakeEdge(const Handle(Geom_Curve)& L, + const gp_Pnt& P1, + const gp_Pnt& P2, + const Standard_Real p1, + const Standard_Real p2); + + Standard_EXPORT BRepLib_MakeEdge(const Handle(Geom_Curve)& L, + const TopoDS_Vertex& V1, + const TopoDS_Vertex& V2, + const Standard_Real p1, + const Standard_Real p2); + Standard_EXPORT BRepLib_MakeEdge(const Handle(Geom2d_Curve)& L, const Handle(Geom_Surface)& S); - - Standard_EXPORT BRepLib_MakeEdge(const Handle(Geom2d_Curve)& L, const Handle(Geom_Surface)& S, const Standard_Real p1, const Standard_Real p2); - - Standard_EXPORT BRepLib_MakeEdge(const Handle(Geom2d_Curve)& L, const Handle(Geom_Surface)& S, const gp_Pnt& P1, const gp_Pnt& P2); - - Standard_EXPORT BRepLib_MakeEdge(const Handle(Geom2d_Curve)& L, const Handle(Geom_Surface)& S, const TopoDS_Vertex& V1, const TopoDS_Vertex& V2); - - Standard_EXPORT BRepLib_MakeEdge(const Handle(Geom2d_Curve)& L, const Handle(Geom_Surface)& S, const gp_Pnt& P1, const gp_Pnt& P2, const Standard_Real p1, const Standard_Real p2); - - Standard_EXPORT BRepLib_MakeEdge(const Handle(Geom2d_Curve)& L, const Handle(Geom_Surface)& S, const TopoDS_Vertex& V1, const TopoDS_Vertex& V2, const Standard_Real p1, const Standard_Real p2); - - Standard_EXPORT void Init (const Handle(Geom_Curve)& C); - - Standard_EXPORT void Init (const Handle(Geom_Curve)& C, const Standard_Real p1, const Standard_Real p2); - - Standard_EXPORT void Init (const Handle(Geom_Curve)& C, const gp_Pnt& P1, const gp_Pnt& P2); - - Standard_EXPORT void Init (const Handle(Geom_Curve)& C, const TopoDS_Vertex& V1, const TopoDS_Vertex& V2); - - Standard_EXPORT void Init (const Handle(Geom_Curve)& C, const gp_Pnt& P1, const gp_Pnt& P2, const Standard_Real p1, const Standard_Real p2); - - Standard_EXPORT void Init (const Handle(Geom_Curve)& C, const TopoDS_Vertex& V1, const TopoDS_Vertex& V2, const Standard_Real p1, const Standard_Real p2); - - Standard_EXPORT void Init (const Handle(Geom2d_Curve)& C, const Handle(Geom_Surface)& S); - - Standard_EXPORT void Init (const Handle(Geom2d_Curve)& C, const Handle(Geom_Surface)& S, const Standard_Real p1, const Standard_Real p2); - - Standard_EXPORT void Init (const Handle(Geom2d_Curve)& C, const Handle(Geom_Surface)& S, const gp_Pnt& P1, const gp_Pnt& P2); - - Standard_EXPORT void Init (const Handle(Geom2d_Curve)& C, const Handle(Geom_Surface)& S, const TopoDS_Vertex& V1, const TopoDS_Vertex& V2); - - Standard_EXPORT void Init (const Handle(Geom2d_Curve)& C, const Handle(Geom_Surface)& S, const gp_Pnt& P1, const gp_Pnt& P2, const Standard_Real p1, const Standard_Real p2); - - Standard_EXPORT void Init (const Handle(Geom2d_Curve)& C, const Handle(Geom_Surface)& S, const TopoDS_Vertex& V1, const TopoDS_Vertex& V2, const Standard_Real p1, const Standard_Real p2); - - //! Returns the error description when NotDone. - Standard_EXPORT BRepLib_EdgeError Error() const; - - Standard_EXPORT const TopoDS_Edge& Edge(); - Standard_EXPORT operator TopoDS_Edge(); - - //! Returns the first vertex of the edge. May be Null. - Standard_EXPORT const TopoDS_Vertex& Vertex1() const; - - //! Returns the second vertex of the edge. May be Null. - Standard_EXPORT const TopoDS_Vertex& Vertex2() const; + Standard_EXPORT BRepLib_MakeEdge(const Handle(Geom2d_Curve)& L, + const Handle(Geom_Surface)& S, + const Standard_Real p1, + const Standard_Real p2); + Standard_EXPORT BRepLib_MakeEdge(const Handle(Geom2d_Curve)& L, + const Handle(Geom_Surface)& S, + const gp_Pnt& P1, + const gp_Pnt& P2); + Standard_EXPORT BRepLib_MakeEdge(const Handle(Geom2d_Curve)& L, + const Handle(Geom_Surface)& S, + const TopoDS_Vertex& V1, + const TopoDS_Vertex& V2); -protected: + Standard_EXPORT BRepLib_MakeEdge(const Handle(Geom2d_Curve)& L, + const Handle(Geom_Surface)& S, + const gp_Pnt& P1, + const gp_Pnt& P2, + const Standard_Real p1, + const Standard_Real p2); + Standard_EXPORT BRepLib_MakeEdge(const Handle(Geom2d_Curve)& L, + const Handle(Geom_Surface)& S, + const TopoDS_Vertex& V1, + const TopoDS_Vertex& V2, + const Standard_Real p1, + const Standard_Real p2); + Standard_EXPORT void Init(const Handle(Geom_Curve)& C); + Standard_EXPORT void Init(const Handle(Geom_Curve)& C, + const Standard_Real p1, + const Standard_Real p2); + Standard_EXPORT void Init(const Handle(Geom_Curve)& C, const gp_Pnt& P1, const gp_Pnt& P2); -private: + Standard_EXPORT void Init(const Handle(Geom_Curve)& C, + const TopoDS_Vertex& V1, + const TopoDS_Vertex& V2); + Standard_EXPORT void Init(const Handle(Geom_Curve)& C, + const gp_Pnt& P1, + const gp_Pnt& P2, + const Standard_Real p1, + const Standard_Real p2); + Standard_EXPORT void Init(const Handle(Geom_Curve)& C, + const TopoDS_Vertex& V1, + const TopoDS_Vertex& V2, + const Standard_Real p1, + const Standard_Real p2); - BRepLib_EdgeError myError; - TopoDS_Vertex myVertex1; - TopoDS_Vertex myVertex2; + Standard_EXPORT void Init(const Handle(Geom2d_Curve)& C, const Handle(Geom_Surface)& S); + Standard_EXPORT void Init(const Handle(Geom2d_Curve)& C, + const Handle(Geom_Surface)& S, + const Standard_Real p1, + const Standard_Real p2); -}; + Standard_EXPORT void Init(const Handle(Geom2d_Curve)& C, + const Handle(Geom_Surface)& S, + const gp_Pnt& P1, + const gp_Pnt& P2); + Standard_EXPORT void Init(const Handle(Geom2d_Curve)& C, + const Handle(Geom_Surface)& S, + const TopoDS_Vertex& V1, + const TopoDS_Vertex& V2); + Standard_EXPORT void Init(const Handle(Geom2d_Curve)& C, + const Handle(Geom_Surface)& S, + const gp_Pnt& P1, + const gp_Pnt& P2, + const Standard_Real p1, + const Standard_Real p2); + Standard_EXPORT void Init(const Handle(Geom2d_Curve)& C, + const Handle(Geom_Surface)& S, + const TopoDS_Vertex& V1, + const TopoDS_Vertex& V2, + const Standard_Real p1, + const Standard_Real p2); + //! Returns the error description when NotDone. + Standard_EXPORT BRepLib_EdgeError Error() const; + Standard_EXPORT const TopoDS_Edge& Edge(); + Standard_EXPORT operator TopoDS_Edge(); + //! Returns the first vertex of the edge. May be Null. + Standard_EXPORT const TopoDS_Vertex& Vertex1() const; + + //! Returns the second vertex of the edge. May be Null. + Standard_EXPORT const TopoDS_Vertex& Vertex2() const; + +protected: +private: + BRepLib_EdgeError myError; + TopoDS_Vertex myVertex1; + TopoDS_Vertex myVertex2; +}; #endif // _BRepLib_MakeEdge_HeaderFile diff --git a/opencascade/BRepLib_MakeEdge2d.hxx b/opencascade/BRepLib_MakeEdge2d.hxx index d42b5d2dc..c56bc14fb 100644 --- a/opencascade/BRepLib_MakeEdge2d.hxx +++ b/opencascade/BRepLib_MakeEdge2d.hxx @@ -33,7 +33,6 @@ class gp_Parab2d; class Geom2d_Curve; class TopoDS_Edge; - //! Provides methods to build edges. //! //! The methods have the following syntax, where @@ -65,117 +64,142 @@ class TopoDS_Edge; //! V1 and V2. Same as the previous but no vertices //! are created. If a vertex is Null the curve will //! be open in this direction. -class BRepLib_MakeEdge2d : public BRepLib_MakeShape +class BRepLib_MakeEdge2d : public BRepLib_MakeShape { public: - DEFINE_STANDARD_ALLOC - Standard_EXPORT BRepLib_MakeEdge2d(const TopoDS_Vertex& V1, const TopoDS_Vertex& V2); - + Standard_EXPORT BRepLib_MakeEdge2d(const gp_Pnt2d& P1, const gp_Pnt2d& P2); - + Standard_EXPORT BRepLib_MakeEdge2d(const gp_Lin2d& L); - - Standard_EXPORT BRepLib_MakeEdge2d(const gp_Lin2d& L, const Standard_Real p1, const Standard_Real p2); - + + Standard_EXPORT BRepLib_MakeEdge2d(const gp_Lin2d& L, + const Standard_Real p1, + const Standard_Real p2); + Standard_EXPORT BRepLib_MakeEdge2d(const gp_Lin2d& L, const gp_Pnt2d& P1, const gp_Pnt2d& P2); - - Standard_EXPORT BRepLib_MakeEdge2d(const gp_Lin2d& L, const TopoDS_Vertex& V1, const TopoDS_Vertex& V2); - + + Standard_EXPORT BRepLib_MakeEdge2d(const gp_Lin2d& L, + const TopoDS_Vertex& V1, + const TopoDS_Vertex& V2); + Standard_EXPORT BRepLib_MakeEdge2d(const gp_Circ2d& L); - - Standard_EXPORT BRepLib_MakeEdge2d(const gp_Circ2d& L, const Standard_Real p1, const Standard_Real p2); - + + Standard_EXPORT BRepLib_MakeEdge2d(const gp_Circ2d& L, + const Standard_Real p1, + const Standard_Real p2); + Standard_EXPORT BRepLib_MakeEdge2d(const gp_Circ2d& L, const gp_Pnt2d& P1, const gp_Pnt2d& P2); - - Standard_EXPORT BRepLib_MakeEdge2d(const gp_Circ2d& L, const TopoDS_Vertex& V1, const TopoDS_Vertex& V2); - + + Standard_EXPORT BRepLib_MakeEdge2d(const gp_Circ2d& L, + const TopoDS_Vertex& V1, + const TopoDS_Vertex& V2); + Standard_EXPORT BRepLib_MakeEdge2d(const gp_Elips2d& L); - - Standard_EXPORT BRepLib_MakeEdge2d(const gp_Elips2d& L, const Standard_Real p1, const Standard_Real p2); - + + Standard_EXPORT BRepLib_MakeEdge2d(const gp_Elips2d& L, + const Standard_Real p1, + const Standard_Real p2); + Standard_EXPORT BRepLib_MakeEdge2d(const gp_Elips2d& L, const gp_Pnt2d& P1, const gp_Pnt2d& P2); - - Standard_EXPORT BRepLib_MakeEdge2d(const gp_Elips2d& L, const TopoDS_Vertex& V1, const TopoDS_Vertex& V2); - + + Standard_EXPORT BRepLib_MakeEdge2d(const gp_Elips2d& L, + const TopoDS_Vertex& V1, + const TopoDS_Vertex& V2); + Standard_EXPORT BRepLib_MakeEdge2d(const gp_Hypr2d& L); - - Standard_EXPORT BRepLib_MakeEdge2d(const gp_Hypr2d& L, const Standard_Real p1, const Standard_Real p2); - + + Standard_EXPORT BRepLib_MakeEdge2d(const gp_Hypr2d& L, + const Standard_Real p1, + const Standard_Real p2); + Standard_EXPORT BRepLib_MakeEdge2d(const gp_Hypr2d& L, const gp_Pnt2d& P1, const gp_Pnt2d& P2); - - Standard_EXPORT BRepLib_MakeEdge2d(const gp_Hypr2d& L, const TopoDS_Vertex& V1, const TopoDS_Vertex& V2); - + + Standard_EXPORT BRepLib_MakeEdge2d(const gp_Hypr2d& L, + const TopoDS_Vertex& V1, + const TopoDS_Vertex& V2); + Standard_EXPORT BRepLib_MakeEdge2d(const gp_Parab2d& L); - - Standard_EXPORT BRepLib_MakeEdge2d(const gp_Parab2d& L, const Standard_Real p1, const Standard_Real p2); - - Standard_EXPORT BRepLib_MakeEdge2d(const gp_Parab2d& L, const gp_Pnt2d& P1, const gp_Pnt2d& P2); - - Standard_EXPORT BRepLib_MakeEdge2d(const gp_Parab2d& L, const TopoDS_Vertex& V1, const TopoDS_Vertex& V2); - - Standard_EXPORT BRepLib_MakeEdge2d(const Handle(Geom2d_Curve)& L); - - Standard_EXPORT BRepLib_MakeEdge2d(const Handle(Geom2d_Curve)& L, const Standard_Real p1, const Standard_Real p2); - - Standard_EXPORT BRepLib_MakeEdge2d(const Handle(Geom2d_Curve)& L, const gp_Pnt2d& P1, const gp_Pnt2d& P2); - - Standard_EXPORT BRepLib_MakeEdge2d(const Handle(Geom2d_Curve)& L, const TopoDS_Vertex& V1, const TopoDS_Vertex& V2); - - Standard_EXPORT BRepLib_MakeEdge2d(const Handle(Geom2d_Curve)& L, const gp_Pnt2d& P1, const gp_Pnt2d& P2, const Standard_Real p1, const Standard_Real p2); - - Standard_EXPORT BRepLib_MakeEdge2d(const Handle(Geom2d_Curve)& L, const TopoDS_Vertex& V1, const TopoDS_Vertex& V2, const Standard_Real p1, const Standard_Real p2); - - Standard_EXPORT void Init (const Handle(Geom2d_Curve)& C); - - Standard_EXPORT void Init (const Handle(Geom2d_Curve)& C, const Standard_Real p1, const Standard_Real p2); - - Standard_EXPORT void Init (const Handle(Geom2d_Curve)& C, const gp_Pnt2d& P1, const gp_Pnt2d& P2); - - Standard_EXPORT void Init (const Handle(Geom2d_Curve)& C, const TopoDS_Vertex& V1, const TopoDS_Vertex& V2); - - Standard_EXPORT void Init (const Handle(Geom2d_Curve)& C, const gp_Pnt2d& P1, const gp_Pnt2d& P2, const Standard_Real p1, const Standard_Real p2); - - Standard_EXPORT void Init (const Handle(Geom2d_Curve)& C, const TopoDS_Vertex& V1, const TopoDS_Vertex& V2, const Standard_Real p1, const Standard_Real p2); - - //! Returns the error description when NotDone. - Standard_EXPORT BRepLib_EdgeError Error() const; - - Standard_EXPORT const TopoDS_Edge& Edge(); - Standard_EXPORT operator TopoDS_Edge(); - - //! Returns the first vertex of the edge. May be Null. - Standard_EXPORT const TopoDS_Vertex& Vertex1() const; - - //! Returns the second vertex of the edge. May be Null. - Standard_EXPORT const TopoDS_Vertex& Vertex2() const; + Standard_EXPORT BRepLib_MakeEdge2d(const gp_Parab2d& L, + const Standard_Real p1, + const Standard_Real p2); + Standard_EXPORT BRepLib_MakeEdge2d(const gp_Parab2d& L, const gp_Pnt2d& P1, const gp_Pnt2d& P2); + Standard_EXPORT BRepLib_MakeEdge2d(const gp_Parab2d& L, + const TopoDS_Vertex& V1, + const TopoDS_Vertex& V2); -protected: + Standard_EXPORT BRepLib_MakeEdge2d(const Handle(Geom2d_Curve)& L); + Standard_EXPORT BRepLib_MakeEdge2d(const Handle(Geom2d_Curve)& L, + const Standard_Real p1, + const Standard_Real p2); + Standard_EXPORT BRepLib_MakeEdge2d(const Handle(Geom2d_Curve)& L, + const gp_Pnt2d& P1, + const gp_Pnt2d& P2); + Standard_EXPORT BRepLib_MakeEdge2d(const Handle(Geom2d_Curve)& L, + const TopoDS_Vertex& V1, + const TopoDS_Vertex& V2); + Standard_EXPORT BRepLib_MakeEdge2d(const Handle(Geom2d_Curve)& L, + const gp_Pnt2d& P1, + const gp_Pnt2d& P2, + const Standard_Real p1, + const Standard_Real p2); -private: + Standard_EXPORT BRepLib_MakeEdge2d(const Handle(Geom2d_Curve)& L, + const TopoDS_Vertex& V1, + const TopoDS_Vertex& V2, + const Standard_Real p1, + const Standard_Real p2); + Standard_EXPORT void Init(const Handle(Geom2d_Curve)& C); + Standard_EXPORT void Init(const Handle(Geom2d_Curve)& C, + const Standard_Real p1, + const Standard_Real p2); - BRepLib_EdgeError myError; - TopoDS_Vertex myVertex1; - TopoDS_Vertex myVertex2; + Standard_EXPORT void Init(const Handle(Geom2d_Curve)& C, const gp_Pnt2d& P1, const gp_Pnt2d& P2); + Standard_EXPORT void Init(const Handle(Geom2d_Curve)& C, + const TopoDS_Vertex& V1, + const TopoDS_Vertex& V2); -}; + Standard_EXPORT void Init(const Handle(Geom2d_Curve)& C, + const gp_Pnt2d& P1, + const gp_Pnt2d& P2, + const Standard_Real p1, + const Standard_Real p2); + Standard_EXPORT void Init(const Handle(Geom2d_Curve)& C, + const TopoDS_Vertex& V1, + const TopoDS_Vertex& V2, + const Standard_Real p1, + const Standard_Real p2); + //! Returns the error description when NotDone. + Standard_EXPORT BRepLib_EdgeError Error() const; + Standard_EXPORT const TopoDS_Edge& Edge(); + Standard_EXPORT operator TopoDS_Edge(); + //! Returns the first vertex of the edge. May be Null. + Standard_EXPORT const TopoDS_Vertex& Vertex1() const; + //! Returns the second vertex of the edge. May be Null. + Standard_EXPORT const TopoDS_Vertex& Vertex2() const; +protected: +private: + BRepLib_EdgeError myError; + TopoDS_Vertex myVertex1; + TopoDS_Vertex myVertex2; +}; #endif // _BRepLib_MakeEdge2d_HeaderFile diff --git a/opencascade/BRepLib_MakeFace.hxx b/opencascade/BRepLib_MakeFace.hxx index 1bbc39fd9..57370dbe6 100644 --- a/opencascade/BRepLib_MakeFace.hxx +++ b/opencascade/BRepLib_MakeFace.hxx @@ -33,7 +33,6 @@ class Geom_Surface; class TopoDS_Wire; class Geom_Curve; - //! Provides methods to build faces. //! //! A face may be built : @@ -59,141 +58,167 @@ class Geom_Curve; //! * From a face and a wire. //! //! - The new wire is a perforation. -class BRepLib_MakeFace : public BRepLib_MakeShape +class BRepLib_MakeFace : public BRepLib_MakeShape { public: - DEFINE_STANDARD_ALLOC - //! Not done. Standard_EXPORT BRepLib_MakeFace(); - + //! Load a face. Useful to add wires. Standard_EXPORT BRepLib_MakeFace(const TopoDS_Face& F); - + //! Make a face from a plane. Standard_EXPORT BRepLib_MakeFace(const gp_Pln& P); - + //! Make a face from a cylinder. Standard_EXPORT BRepLib_MakeFace(const gp_Cylinder& C); - + //! Make a face from a cone. Standard_EXPORT BRepLib_MakeFace(const gp_Cone& C); - + //! Make a face from a sphere. Standard_EXPORT BRepLib_MakeFace(const gp_Sphere& S); - + //! Make a face from a torus. Standard_EXPORT BRepLib_MakeFace(const gp_Torus& C); - + //! Make a face from a Surface. Accepts tolerance value (TolDegen) //! for resolution of degenerated edges. Standard_EXPORT BRepLib_MakeFace(const Handle(Geom_Surface)& S, const Standard_Real TolDegen); - + //! Make a face from a plane. - Standard_EXPORT BRepLib_MakeFace(const gp_Pln& P, const Standard_Real UMin, const Standard_Real UMax, const Standard_Real VMin, const Standard_Real VMax); - + Standard_EXPORT BRepLib_MakeFace(const gp_Pln& P, + const Standard_Real UMin, + const Standard_Real UMax, + const Standard_Real VMin, + const Standard_Real VMax); + //! Make a face from a cylinder. - Standard_EXPORT BRepLib_MakeFace(const gp_Cylinder& C, const Standard_Real UMin, const Standard_Real UMax, const Standard_Real VMin, const Standard_Real VMax); - + Standard_EXPORT BRepLib_MakeFace(const gp_Cylinder& C, + const Standard_Real UMin, + const Standard_Real UMax, + const Standard_Real VMin, + const Standard_Real VMax); + //! Make a face from a cone. - Standard_EXPORT BRepLib_MakeFace(const gp_Cone& C, const Standard_Real UMin, const Standard_Real UMax, const Standard_Real VMin, const Standard_Real VMax); - + Standard_EXPORT BRepLib_MakeFace(const gp_Cone& C, + const Standard_Real UMin, + const Standard_Real UMax, + const Standard_Real VMin, + const Standard_Real VMax); + //! Make a face from a sphere. - Standard_EXPORT BRepLib_MakeFace(const gp_Sphere& S, const Standard_Real UMin, const Standard_Real UMax, const Standard_Real VMin, const Standard_Real VMax); - + Standard_EXPORT BRepLib_MakeFace(const gp_Sphere& S, + const Standard_Real UMin, + const Standard_Real UMax, + const Standard_Real VMin, + const Standard_Real VMax); + //! Make a face from a torus. - Standard_EXPORT BRepLib_MakeFace(const gp_Torus& C, const Standard_Real UMin, const Standard_Real UMax, const Standard_Real VMin, const Standard_Real VMax); - + Standard_EXPORT BRepLib_MakeFace(const gp_Torus& C, + const Standard_Real UMin, + const Standard_Real UMax, + const Standard_Real VMin, + const Standard_Real VMax); + //! Make a face from a Surface. Accepts min & max parameters //! to construct the face's bounds. Also accepts tolerance value (TolDegen) //! for resolution of degenerated edges. - Standard_EXPORT BRepLib_MakeFace(const Handle(Geom_Surface)& S, const Standard_Real UMin, const Standard_Real UMax, const Standard_Real VMin, const Standard_Real VMax, const Standard_Real TolDegen); - + Standard_EXPORT BRepLib_MakeFace(const Handle(Geom_Surface)& S, + const Standard_Real UMin, + const Standard_Real UMax, + const Standard_Real VMin, + const Standard_Real VMax, + const Standard_Real TolDegen); + //! Find a surface from the wire and make a face. //! if is true, the computed surface will be //! a plane. If it is not possible to find a plane, the //! flag NotDone will be set. - Standard_EXPORT BRepLib_MakeFace(const TopoDS_Wire& W, const Standard_Boolean OnlyPlane = Standard_False); - + Standard_EXPORT BRepLib_MakeFace(const TopoDS_Wire& W, + const Standard_Boolean OnlyPlane = Standard_False); + //! Make a face from a plane and a wire. - Standard_EXPORT BRepLib_MakeFace(const gp_Pln& P, const TopoDS_Wire& W, const Standard_Boolean Inside = Standard_True); - + Standard_EXPORT BRepLib_MakeFace(const gp_Pln& P, + const TopoDS_Wire& W, + const Standard_Boolean Inside = Standard_True); + //! Make a face from a cylinder and a wire. - Standard_EXPORT BRepLib_MakeFace(const gp_Cylinder& C, const TopoDS_Wire& W, const Standard_Boolean Inside = Standard_True); - + Standard_EXPORT BRepLib_MakeFace(const gp_Cylinder& C, + const TopoDS_Wire& W, + const Standard_Boolean Inside = Standard_True); + //! Make a face from a cone and a wire. - Standard_EXPORT BRepLib_MakeFace(const gp_Cone& C, const TopoDS_Wire& W, const Standard_Boolean Inside = Standard_True); - + Standard_EXPORT BRepLib_MakeFace(const gp_Cone& C, + const TopoDS_Wire& W, + const Standard_Boolean Inside = Standard_True); + //! Make a face from a sphere and a wire. - Standard_EXPORT BRepLib_MakeFace(const gp_Sphere& S, const TopoDS_Wire& W, const Standard_Boolean Inside = Standard_True); - + Standard_EXPORT BRepLib_MakeFace(const gp_Sphere& S, + const TopoDS_Wire& W, + const Standard_Boolean Inside = Standard_True); + //! Make a face from a torus and a wire. - Standard_EXPORT BRepLib_MakeFace(const gp_Torus& C, const TopoDS_Wire& W, const Standard_Boolean Inside = Standard_True); - + Standard_EXPORT BRepLib_MakeFace(const gp_Torus& C, + const TopoDS_Wire& W, + const Standard_Boolean Inside = Standard_True); + //! Make a face from a Surface and a wire. - Standard_EXPORT BRepLib_MakeFace(const Handle(Geom_Surface)& S, const TopoDS_Wire& W, const Standard_Boolean Inside = Standard_True); - + Standard_EXPORT BRepLib_MakeFace(const Handle(Geom_Surface)& S, + const TopoDS_Wire& W, + const Standard_Boolean Inside = Standard_True); + //! Adds the wire in the face Standard_EXPORT BRepLib_MakeFace(const TopoDS_Face& F, const TopoDS_Wire& W); - + //! Load the face. - Standard_EXPORT void Init (const TopoDS_Face& F); - + Standard_EXPORT void Init(const TopoDS_Face& F); + //! Creates the face from the surface. If Bound is //! True a wire is made from the natural bounds. //! Accepts tolerance value (TolDegen) for resolution //! of degenerated edges. - Standard_EXPORT void Init (const Handle(Geom_Surface)& S, const Standard_Boolean Bound, const Standard_Real TolDegen); - + Standard_EXPORT void Init(const Handle(Geom_Surface)& S, + const Standard_Boolean Bound, + const Standard_Real TolDegen); + //! Creates the face from the surface and the min-max //! values. Accepts tolerance value (TolDegen) for resolution //! of degenerated edges. - Standard_EXPORT void Init (const Handle(Geom_Surface)& S, const Standard_Real UMin, const Standard_Real UMax, const Standard_Real VMin, const Standard_Real VMax, const Standard_Real TolDegen); - + Standard_EXPORT void Init(const Handle(Geom_Surface)& S, + const Standard_Real UMin, + const Standard_Real UMax, + const Standard_Real VMin, + const Standard_Real VMax, + const Standard_Real TolDegen); + //! Adds the wire in the current face. - Standard_EXPORT void Add (const TopoDS_Wire& W); - + Standard_EXPORT void Add(const TopoDS_Wire& W); + Standard_EXPORT BRepLib_FaceError Error() const; - + //! Returns the new face. Standard_EXPORT const TopoDS_Face& Face() const; -Standard_EXPORT operator TopoDS_Face() const; - + Standard_EXPORT operator TopoDS_Face() const; + //! Checks the specified curve is degenerated //! according to specified tolerance. //! Returns less than , which shows //! actual tolerance to decide the curve is degenerated. //! Warning: For internal use of BRepLib_MakeFace and BRepLib_MakeShell. - Standard_EXPORT static Standard_Boolean IsDegenerated (const Handle(Geom_Curve)& theCurve, const Standard_Real theMaxTol, Standard_Real& theActTol); - - - + Standard_EXPORT static Standard_Boolean IsDegenerated(const Handle(Geom_Curve)& theCurve, + const Standard_Real theMaxTol, + Standard_Real& theActTol); protected: - - - - - private: - - //! Reorient the current face if the boundary is not //! finite. Standard_EXPORT void CheckInside(); - BRepLib_FaceError myError; - - }; - - - - - - #endif // _BRepLib_MakeFace_HeaderFile diff --git a/opencascade/BRepLib_MakePolygon.hxx b/opencascade/BRepLib_MakePolygon.hxx index 96e006b05..053c6944c 100644 --- a/opencascade/BRepLib_MakePolygon.hxx +++ b/opencascade/BRepLib_MakePolygon.hxx @@ -26,7 +26,6 @@ class gp_Pnt; class TopoDS_Wire; - //! Class to build polygonal wires. //! //! A polygonal wire may be build from @@ -42,73 +41,66 @@ class TopoDS_Wire; //! When a point or vertex is added to the polygon if //! it is identic to the previous point no edge is //! built. The method added can be used to test it. -class BRepLib_MakePolygon : public BRepLib_MakeShape +class BRepLib_MakePolygon : public BRepLib_MakeShape { public: - DEFINE_STANDARD_ALLOC - //! Creates an empty MakePolygon. Standard_EXPORT BRepLib_MakePolygon(); - + Standard_EXPORT BRepLib_MakePolygon(const gp_Pnt& P1, const gp_Pnt& P2); - - Standard_EXPORT BRepLib_MakePolygon(const gp_Pnt& P1, const gp_Pnt& P2, const gp_Pnt& P3, const Standard_Boolean Close = Standard_False); - - Standard_EXPORT BRepLib_MakePolygon(const gp_Pnt& P1, const gp_Pnt& P2, const gp_Pnt& P3, const gp_Pnt& P4, const Standard_Boolean Close = Standard_False); - + + Standard_EXPORT BRepLib_MakePolygon(const gp_Pnt& P1, + const gp_Pnt& P2, + const gp_Pnt& P3, + const Standard_Boolean Close = Standard_False); + + Standard_EXPORT BRepLib_MakePolygon(const gp_Pnt& P1, + const gp_Pnt& P2, + const gp_Pnt& P3, + const gp_Pnt& P4, + const Standard_Boolean Close = Standard_False); + Standard_EXPORT BRepLib_MakePolygon(const TopoDS_Vertex& V1, const TopoDS_Vertex& V2); - - Standard_EXPORT BRepLib_MakePolygon(const TopoDS_Vertex& V1, const TopoDS_Vertex& V2, const TopoDS_Vertex& V3, const Standard_Boolean Close = Standard_False); - - Standard_EXPORT BRepLib_MakePolygon(const TopoDS_Vertex& V1, const TopoDS_Vertex& V2, const TopoDS_Vertex& V3, const TopoDS_Vertex& V4, const Standard_Boolean Close = Standard_False); - - Standard_EXPORT void Add (const gp_Pnt& P); - - Standard_EXPORT void Add (const TopoDS_Vertex& V); - + + Standard_EXPORT BRepLib_MakePolygon(const TopoDS_Vertex& V1, + const TopoDS_Vertex& V2, + const TopoDS_Vertex& V3, + const Standard_Boolean Close = Standard_False); + + Standard_EXPORT BRepLib_MakePolygon(const TopoDS_Vertex& V1, + const TopoDS_Vertex& V2, + const TopoDS_Vertex& V3, + const TopoDS_Vertex& V4, + const Standard_Boolean Close = Standard_False); + + Standard_EXPORT void Add(const gp_Pnt& P); + + Standard_EXPORT void Add(const TopoDS_Vertex& V); + //! Returns True if the last vertex or point was //! successfully added. Standard_EXPORT Standard_Boolean Added() const; - + Standard_EXPORT void Close(); - + Standard_EXPORT const TopoDS_Vertex& FirstVertex() const; - + Standard_EXPORT const TopoDS_Vertex& LastVertex() const; - + //! Returns the last edge added to the polygon. Standard_EXPORT const TopoDS_Edge& Edge() const; -Standard_EXPORT operator TopoDS_Edge() const; - - Standard_EXPORT const TopoDS_Wire& Wire(); - Standard_EXPORT operator TopoDS_Wire(); - - + Standard_EXPORT operator TopoDS_Edge() const; + Standard_EXPORT const TopoDS_Wire& Wire(); + Standard_EXPORT operator TopoDS_Wire(); protected: - - - - - private: - - - TopoDS_Vertex myFirstVertex; TopoDS_Vertex myLastVertex; - TopoDS_Edge myEdge; - - + TopoDS_Edge myEdge; }; - - - - - - #endif // _BRepLib_MakePolygon_HeaderFile diff --git a/opencascade/BRepLib_MakeShape.hxx b/opencascade/BRepLib_MakeShape.hxx index 8d7a00d59..2aef99590 100644 --- a/opencascade/BRepLib_MakeShape.hxx +++ b/opencascade/BRepLib_MakeShape.hxx @@ -28,74 +28,53 @@ class TopoDS_Face; class TopoDS_Edge; - //! This is the root class for all shape //! constructions. It stores the result. //! //! It provides deferred methods to trace the history //! of sub-shapes. -class BRepLib_MakeShape : public BRepLib_Command +class BRepLib_MakeShape : public BRepLib_Command { public: - DEFINE_STANDARD_ALLOC - //! This is called by Shape(). It does nothing but //! may be redefined. Standard_EXPORT void Build(); - + Standard_EXPORT const TopoDS_Shape& Shape(); - Standard_EXPORT operator TopoDS_Shape(); - + Standard_EXPORT operator TopoDS_Shape(); + //! returns the status of the Face after //! the shape creation. - Standard_EXPORT virtual BRepLib_ShapeModification FaceStatus (const TopoDS_Face& F) const; - + Standard_EXPORT virtual BRepLib_ShapeModification FaceStatus(const TopoDS_Face& F) const; + //! Returns True if the Face generates new topology. - Standard_EXPORT virtual Standard_Boolean HasDescendants (const TopoDS_Face& F) const; - + Standard_EXPORT virtual Standard_Boolean HasDescendants(const TopoDS_Face& F) const; + //! returns the list of generated Faces. - Standard_EXPORT virtual const TopTools_ListOfShape& DescendantFaces (const TopoDS_Face& F); - + Standard_EXPORT virtual const TopTools_ListOfShape& DescendantFaces(const TopoDS_Face& F); + //! returns the number of surfaces //! after the shape creation. Standard_EXPORT virtual Standard_Integer NbSurfaces() const; - + //! Return the faces created for surface I. - Standard_EXPORT virtual const TopTools_ListOfShape& NewFaces (const Standard_Integer I); - + Standard_EXPORT virtual const TopTools_ListOfShape& NewFaces(const Standard_Integer I); + //! returns a list of the created faces //! from the edge . - Standard_EXPORT virtual const TopTools_ListOfShape& FacesFromEdges (const TopoDS_Edge& E); - - - + Standard_EXPORT virtual const TopTools_ListOfShape& FacesFromEdges(const TopoDS_Edge& E); protected: - - Standard_EXPORT BRepLib_MakeShape(); - - TopoDS_Shape myShape; + TopoDS_Shape myShape; TopTools_ListOfShape myGenFaces; TopTools_ListOfShape myNewFaces; TopTools_ListOfShape myEdgFaces; - private: - - - - - }; - - - - - - #endif // _BRepLib_MakeShape_HeaderFile diff --git a/opencascade/BRepLib_MakeShell.hxx b/opencascade/BRepLib_MakeShell.hxx index 8fd81a723..6232fe2e7 100644 --- a/opencascade/BRepLib_MakeShell.hxx +++ b/opencascade/BRepLib_MakeShell.hxx @@ -26,58 +26,47 @@ class Geom_Surface; class TopoDS_Shell; - //! Provides methods to build shells. //! //! Build a shell from a set of faces. //! Build untied shell from a non C2 surface //! splitting it into C2-continuous parts. -class BRepLib_MakeShell : public BRepLib_MakeShape +class BRepLib_MakeShell : public BRepLib_MakeShape { public: - DEFINE_STANDARD_ALLOC - //! Not done. Standard_EXPORT BRepLib_MakeShell(); - - Standard_EXPORT BRepLib_MakeShell(const Handle(Geom_Surface)& S, const Standard_Boolean Segment = Standard_False); - - Standard_EXPORT BRepLib_MakeShell(const Handle(Geom_Surface)& S, const Standard_Real UMin, const Standard_Real UMax, const Standard_Real VMin, const Standard_Real VMax, const Standard_Boolean Segment = Standard_False); - + + Standard_EXPORT BRepLib_MakeShell(const Handle(Geom_Surface)& S, + const Standard_Boolean Segment = Standard_False); + + Standard_EXPORT BRepLib_MakeShell(const Handle(Geom_Surface)& S, + const Standard_Real UMin, + const Standard_Real UMax, + const Standard_Real VMin, + const Standard_Real VMax, + const Standard_Boolean Segment = Standard_False); + //! Creates the shell from the surface and the min-max //! values. - Standard_EXPORT void Init (const Handle(Geom_Surface)& S, const Standard_Real UMin, const Standard_Real UMax, const Standard_Real VMin, const Standard_Real VMax, const Standard_Boolean Segment = Standard_False); - + Standard_EXPORT void Init(const Handle(Geom_Surface)& S, + const Standard_Real UMin, + const Standard_Real UMax, + const Standard_Real VMin, + const Standard_Real VMax, + const Standard_Boolean Segment = Standard_False); + Standard_EXPORT BRepLib_ShellError Error() const; - + //! Returns the new Shell. Standard_EXPORT const TopoDS_Shell& Shell() const; -Standard_EXPORT operator TopoDS_Shell() const; - - - + Standard_EXPORT operator TopoDS_Shell() const; protected: - - - - - private: - - - BRepLib_ShellError myError; - - }; - - - - - - #endif // _BRepLib_MakeShell_HeaderFile diff --git a/opencascade/BRepLib_MakeSolid.hxx b/opencascade/BRepLib_MakeSolid.hxx index 54d0a08ce..8d4d30beb 100644 --- a/opencascade/BRepLib_MakeSolid.hxx +++ b/opencascade/BRepLib_MakeSolid.hxx @@ -27,69 +27,51 @@ class TopoDS_Shell; class TopoDS_Solid; class TopoDS_Face; - //! Makes a solid from compsolid or shells. -class BRepLib_MakeSolid : public BRepLib_MakeShape +class BRepLib_MakeSolid : public BRepLib_MakeShape { public: - DEFINE_STANDARD_ALLOC - //! Solid covers whole space. Standard_EXPORT BRepLib_MakeSolid(); - + //! Make a solid from a CompSolid. Standard_EXPORT BRepLib_MakeSolid(const TopoDS_CompSolid& S); - + //! Make a solid from a shell. Standard_EXPORT BRepLib_MakeSolid(const TopoDS_Shell& S); - + //! Make a solid from two shells. Standard_EXPORT BRepLib_MakeSolid(const TopoDS_Shell& S1, const TopoDS_Shell& S2); - + //! Make a solid from three shells. - Standard_EXPORT BRepLib_MakeSolid(const TopoDS_Shell& S1, const TopoDS_Shell& S2, const TopoDS_Shell& S3); - + Standard_EXPORT BRepLib_MakeSolid(const TopoDS_Shell& S1, + const TopoDS_Shell& S2, + const TopoDS_Shell& S3); + //! Make a solid from a solid. Useful for adding later. Standard_EXPORT BRepLib_MakeSolid(const TopoDS_Solid& So); - + //! Add a shell to a solid. Standard_EXPORT BRepLib_MakeSolid(const TopoDS_Solid& So, const TopoDS_Shell& S); - + //! Add the shell to the current solid. - Standard_EXPORT void Add (const TopoDS_Shell& S); - + Standard_EXPORT void Add(const TopoDS_Shell& S); + //! Returns the new Solid. Standard_EXPORT const TopoDS_Solid& Solid(); - Standard_EXPORT operator TopoDS_Solid(); - + Standard_EXPORT operator TopoDS_Solid(); + //! returns the status of the Face after //! the shape creation. - Standard_EXPORT virtual BRepLib_ShapeModification FaceStatus (const TopoDS_Face& F) const Standard_OVERRIDE; - - - + Standard_EXPORT virtual BRepLib_ShapeModification FaceStatus(const TopoDS_Face& F) const + Standard_OVERRIDE; protected: - - - TopTools_ListOfShape myDeletedFaces; - private: - - - - - }; - - - - - - #endif // _BRepLib_MakeSolid_HeaderFile diff --git a/opencascade/BRepLib_MakeVertex.hxx b/opencascade/BRepLib_MakeVertex.hxx index ea39532f1..a8969ae0d 100644 --- a/opencascade/BRepLib_MakeVertex.hxx +++ b/opencascade/BRepLib_MakeVertex.hxx @@ -24,41 +24,19 @@ class gp_Pnt; class TopoDS_Vertex; - //! Provides methods to build vertices. -class BRepLib_MakeVertex : public BRepLib_MakeShape +class BRepLib_MakeVertex : public BRepLib_MakeShape { public: - DEFINE_STANDARD_ALLOC - Standard_EXPORT BRepLib_MakeVertex(const gp_Pnt& P); - - Standard_EXPORT const TopoDS_Vertex& Vertex(); - Standard_EXPORT operator TopoDS_Vertex(); - - + Standard_EXPORT const TopoDS_Vertex& Vertex(); + Standard_EXPORT operator TopoDS_Vertex(); protected: - - - - - private: - - - - - }; - - - - - - #endif // _BRepLib_MakeVertex_HeaderFile diff --git a/opencascade/BRepLib_MakeWire.hxx b/opencascade/BRepLib_MakeWire.hxx index 195b826eb..1442e9f30 100644 --- a/opencascade/BRepLib_MakeWire.hxx +++ b/opencascade/BRepLib_MakeWire.hxx @@ -75,136 +75,116 @@ class TopoDS_Wire; //! //! TopoDS_Wire W = MW; -class BRepLib_MakeWire : public BRepLib_MakeShape +class BRepLib_MakeWire : public BRepLib_MakeShape { public: - DEFINE_STANDARD_ALLOC - //! NotDone MakeWire. Standard_EXPORT BRepLib_MakeWire(); - + //! Make a Wire from an edge. Standard_EXPORT BRepLib_MakeWire(const TopoDS_Edge& E); - + //! Make a Wire from two edges. Standard_EXPORT BRepLib_MakeWire(const TopoDS_Edge& E1, const TopoDS_Edge& E2); - + //! Make a Wire from three edges. - Standard_EXPORT BRepLib_MakeWire(const TopoDS_Edge& E1, const TopoDS_Edge& E2, const TopoDS_Edge& E3); - + Standard_EXPORT BRepLib_MakeWire(const TopoDS_Edge& E1, + const TopoDS_Edge& E2, + const TopoDS_Edge& E3); + //! Make a Wire from four edges. - Standard_EXPORT BRepLib_MakeWire(const TopoDS_Edge& E1, const TopoDS_Edge& E2, const TopoDS_Edge& E3, const TopoDS_Edge& E4); - + Standard_EXPORT BRepLib_MakeWire(const TopoDS_Edge& E1, + const TopoDS_Edge& E2, + const TopoDS_Edge& E3, + const TopoDS_Edge& E4); + //! Make a Wire from a Wire. Useful for adding later. Standard_EXPORT BRepLib_MakeWire(const TopoDS_Wire& W); - + //! Add an edge to a wire. Standard_EXPORT BRepLib_MakeWire(const TopoDS_Wire& W, const TopoDS_Edge& E); - + //! Add the edge to the current wire. - Standard_EXPORT void Add (const TopoDS_Edge& E); - + Standard_EXPORT void Add(const TopoDS_Edge& E); + //! Add the edges of to the current wire. - Standard_EXPORT void Add (const TopoDS_Wire& W); - + Standard_EXPORT void Add(const TopoDS_Wire& W); + //! Add the edges of to the current wire. //! The edges are not to be consecutive. But they are //! to be all connected geometrically or topologically. - Standard_EXPORT void Add (const TopTools_ListOfShape& L); - + Standard_EXPORT void Add(const TopTools_ListOfShape& L); + Standard_EXPORT BRepLib_WireError Error() const; - + //! Returns the new wire. Standard_EXPORT const TopoDS_Wire& Wire(); - Standard_EXPORT operator TopoDS_Wire(); - + Standard_EXPORT operator TopoDS_Wire(); + //! Returns the last edge added to the wire. Standard_EXPORT const TopoDS_Edge& Edge() const; - + //! Returns the last connecting vertex. Standard_EXPORT const TopoDS_Vertex& Vertex() const; private: - class BRepLib_BndBoxVertexSelector : public NCollection_UBTree ::Selector + class BRepLib_BndBoxVertexSelector + : public NCollection_UBTree::Selector { public: BRepLib_BndBoxVertexSelector(const TopTools_IndexedMapOfShape& theMapOfShape) - : BRepLib_BndBoxVertexSelector::Selector(), - myMapOfShape (theMapOfShape), - myTolP(0.0), - myVInd(0) + : BRepLib_BndBoxVertexSelector::Selector(), + myMapOfShape(theMapOfShape), + myTolP(0.0), + myVInd(0) { } - Standard_Boolean Reject (const Bnd_Box& theBox) const - { - return theBox.IsOut(myVBox); - } + Standard_Boolean Reject(const Bnd_Box& theBox) const { return theBox.IsOut(myVBox); } - Standard_Boolean Accept (const Standard_Integer& theObj); + Standard_Boolean Accept(const Standard_Integer& theObj); - void SetCurrentVertex (const gp_Pnt& theP, Standard_Real theTol, - Standard_Integer theVInd); + void SetCurrentVertex(const gp_Pnt& theP, Standard_Real theTol, Standard_Integer theVInd); - const NCollection_List& GetResultInds () const - { - return myResultInd; - } + const NCollection_List& GetResultInds() const { return myResultInd; } - void ClearResInds() - { - myResultInd.Clear(); - } + void ClearResInds() { myResultInd.Clear(); } private: - - BRepLib_BndBoxVertexSelector(const BRepLib_BndBoxVertexSelector& ); - BRepLib_BndBoxVertexSelector& operator=(const BRepLib_BndBoxVertexSelector& ); - - const TopTools_IndexedMapOfShape& myMapOfShape; //vertices - gp_Pnt myP; - Standard_Real myTolP; - Standard_Integer myVInd; - Bnd_Box myVBox; - NCollection_List myResultInd; + BRepLib_BndBoxVertexSelector(const BRepLib_BndBoxVertexSelector&); + BRepLib_BndBoxVertexSelector& operator=(const BRepLib_BndBoxVertexSelector&); + + const TopTools_IndexedMapOfShape& myMapOfShape; // vertices + gp_Pnt myP; + Standard_Real myTolP; + Standard_Integer myVInd; + Bnd_Box myVBox; + NCollection_List myResultInd; }; - void CollectCoincidentVertices(const TopTools_ListOfShape& theL, + void CollectCoincidentVertices(const TopTools_ListOfShape& theL, NCollection_List>& theGrVL); - void CreateNewVertices(const NCollection_List>& theGrVL, - TopTools_DataMapOfShapeShape& theO2NV); + void CreateNewVertices(const NCollection_List>& theGrVL, + TopTools_DataMapOfShapeShape& theO2NV); - void CreateNewListOfEdges(const TopTools_ListOfShape& theL, + void CreateNewListOfEdges(const TopTools_ListOfShape& theL, const TopTools_DataMapOfShapeShape& theO2NV, - TopTools_ListOfShape& theNewEList); + TopTools_ListOfShape& theNewEList); void Add(const TopoDS_Edge& E, Standard_Boolean IsCheckGeometryProximity); - - protected: - - - private: - - BRepLib_WireError myError; - TopoDS_Edge myEdge; - TopoDS_Vertex myVertex; + BRepLib_WireError myError; + TopoDS_Edge myEdge; + TopoDS_Vertex myVertex; TopTools_IndexedMapOfShape myVertices; - TopoDS_Vertex FirstVertex; - TopoDS_Vertex VF; - TopoDS_Vertex VL; - + TopoDS_Vertex FirstVertex; + TopoDS_Vertex VF; + TopoDS_Vertex VL; }; - - - - - - #endif // _BRepLib_MakeWire_HeaderFile diff --git a/opencascade/BRepLib_PointCloudShape.hxx b/opencascade/BRepLib_PointCloudShape.hxx index a771d5e86..e73453df7 100644 --- a/opencascade/BRepLib_PointCloudShape.hxx +++ b/opencascade/BRepLib_PointCloudShape.hxx @@ -28,12 +28,11 @@ class BRepLib_PointCloudShape { public: - DEFINE_STANDARD_ALLOC //! Constructor initialized by shape - Standard_EXPORT BRepLib_PointCloudShape (const TopoDS_Shape& theShape = TopoDS_Shape(), - const Standard_Real theTol = Precision::Confusion()); + Standard_EXPORT BRepLib_PointCloudShape(const TopoDS_Shape& theShape = TopoDS_Shape(), + const Standard_Real theTol = Precision::Confusion()); //! Virtual destructor Standard_EXPORT virtual ~BRepLib_PointCloudShape(); @@ -42,23 +41,24 @@ public: const TopoDS_Shape& Shape() const { return myShape; } //! Set shape. - void SetShape (const TopoDS_Shape& theShape) { myShape = theShape; } + void SetShape(const TopoDS_Shape& theShape) { myShape = theShape; } //! Return tolerance. Standard_Real Tolerance() const { return myTol; } //! Set tolerance. - void SetTolerance (Standard_Real theTol) { myTol = theTol; } + void SetTolerance(Standard_Real theTol) { myTol = theTol; } - //! Returns value of the distance to define deflection of points from shape along normal to shape; 0.0 by default. + //! Returns value of the distance to define deflection of points from shape along normal to shape; + //! 0.0 by default. Standard_Real GetDistance() const { return myDist; } //! Sets value of the distance to define deflection of points from shape along normal to shape. //! Negative values of theDist parameter are ignored. - void SetDistance (const Standard_Real theDist) { myDist = theDist; } + void SetDistance(const Standard_Real theDist) { myDist = theDist; } //! Returns size of the point cloud for specified density. - Standard_EXPORT Standard_Integer NbPointsByDensity (const Standard_Real theDensity = 0.0); + Standard_EXPORT Standard_Integer NbPointsByDensity(const Standard_Real theDensity = 0.0); //! Returns size of the point cloud for using triangulation. Standard_EXPORT Standard_Integer NbPointsByTriangulation() const; @@ -68,27 +68,27 @@ public: //! - 10 points per minimal unreduced face area. //! //! Note: this function should not be called from concurrent threads without external lock. - Standard_EXPORT Standard_Boolean GeneratePointsByDensity (const Standard_Real theDensity = 0.0); + Standard_EXPORT Standard_Boolean GeneratePointsByDensity(const Standard_Real theDensity = 0.0); //! Get points from triangulation existing in the shape. Standard_EXPORT Standard_Boolean GeneratePointsByTriangulation(); protected: - //! Compute area of the specified face. - Standard_EXPORT Standard_Real faceArea (const TopoDS_Shape& theShape); + Standard_EXPORT Standard_Real faceArea(const TopoDS_Shape& theShape); //! Computes default density points per face. Standard_EXPORT Standard_Real computeDensity(); - //! Adds points to face in accordance with the specified density randomly in the specified range [0, Dist]. - Standard_EXPORT Standard_Boolean addDensityPoints (const TopoDS_Shape& theFace); + //! Adds points to face in accordance with the specified density randomly in the specified range + //! [0, Dist]. + Standard_EXPORT Standard_Boolean addDensityPoints(const TopoDS_Shape& theFace); - //! Adds points to face by nodes of the existing triangulation randomly in the specified range [0, Dist]. - Standard_EXPORT Standard_Boolean addTriangulationPoints (const TopoDS_Shape& theFace); + //! Adds points to face by nodes of the existing triangulation randomly in the specified range [0, + //! Dist]. + Standard_EXPORT Standard_Boolean addTriangulationPoints(const TopoDS_Shape& theFace); protected: - //! Method to clear maps. Standard_EXPORT virtual void clear(); @@ -97,20 +97,18 @@ protected: //! @param[in] theNorm surface normal at this point //! @param[in] theUV surface UV parameters //! @param[in] theFace surface (face) definition - Standard_EXPORT virtual void addPoint (const gp_Pnt& thePoint, - const gp_Vec& theNorm, - const gp_Pnt2d& theUV, - const TopoDS_Shape& theFace) = 0; + Standard_EXPORT virtual void addPoint(const gp_Pnt& thePoint, + const gp_Vec& theNorm, + const gp_Pnt2d& theUV, + const TopoDS_Shape& theFace) = 0; protected: - - TopoDS_Shape myShape; - Standard_Real myDist; - Standard_Real myTol; + TopoDS_Shape myShape; + Standard_Real myDist; + Standard_Real myTol; TopTools_DataMapOfShapeReal myFaceArea; TopTools_DataMapOfShapeInteger myFacePoints; - Standard_Integer myNbPoints; - + Standard_Integer myNbPoints; }; #endif // _BRepLib_PointCloudShape_HeaderFile diff --git a/opencascade/BRepLib_ShapeModification.hxx b/opencascade/BRepLib_ShapeModification.hxx index a876eff2e..d85570dc8 100644 --- a/opencascade/BRepLib_ShapeModification.hxx +++ b/opencascade/BRepLib_ShapeModification.hxx @@ -20,11 +20,11 @@ //! Modification type after a topologic operation. enum BRepLib_ShapeModification { -BRepLib_Preserved, -BRepLib_Deleted, -BRepLib_Trimmed, -BRepLib_Merged, -BRepLib_BoundaryModified + BRepLib_Preserved, + BRepLib_Deleted, + BRepLib_Trimmed, + BRepLib_Merged, + BRepLib_BoundaryModified }; #endif // _BRepLib_ShapeModification_HeaderFile diff --git a/opencascade/BRepLib_ShellError.hxx b/opencascade/BRepLib_ShellError.hxx index 0396e58b2..d04c24f99 100644 --- a/opencascade/BRepLib_ShellError.hxx +++ b/opencascade/BRepLib_ShellError.hxx @@ -20,10 +20,10 @@ //! Errors that can occur at shell construction. enum BRepLib_ShellError { -BRepLib_ShellDone, -BRepLib_EmptyShell, -BRepLib_DisconnectedShell, -BRepLib_ShellParametersOutOfRange + BRepLib_ShellDone, + BRepLib_EmptyShell, + BRepLib_DisconnectedShell, + BRepLib_ShellParametersOutOfRange }; #endif // _BRepLib_ShellError_HeaderFile diff --git a/opencascade/BRepLib_ToolTriangulatedShape.hxx b/opencascade/BRepLib_ToolTriangulatedShape.hxx index ebfb1ae9c..9b9c47789 100644 --- a/opencascade/BRepLib_ToolTriangulatedShape.hxx +++ b/opencascade/BRepLib_ToolTriangulatedShape.hxx @@ -24,16 +24,14 @@ class Poly_Triangulation; class BRepLib_ToolTriangulatedShape { public: - //! Computes nodal normals for Poly_Triangulation structure using UV coordinates and surface. //! Does nothing if triangulation already defines normals. //! @param[in] theFace the face //! @param[in] theTris the definition of a face triangulation - static void ComputeNormals (const TopoDS_Face& theFace, - const Handle(Poly_Triangulation)& theTris) + static void ComputeNormals(const TopoDS_Face& theFace, const Handle(Poly_Triangulation)& theTris) { Poly_Connect aPolyConnect; - ComputeNormals (theFace, theTris, aPolyConnect); + ComputeNormals(theFace, theTris, aPolyConnect); } //! Computes nodal normals for Poly_Triangulation structure using UV coordinates and surface. @@ -41,10 +39,9 @@ public: //! @param[in] theFace the face //! @param[in] theTris the definition of a face triangulation //! @param[in,out] thePolyConnect optional, initialized tool for exploring triangulation - Standard_EXPORT static void ComputeNormals (const TopoDS_Face& theFace, - const Handle(Poly_Triangulation)& theTris, - Poly_Connect& thePolyConnect); - + Standard_EXPORT static void ComputeNormals(const TopoDS_Face& theFace, + const Handle(Poly_Triangulation)& theTris, + Poly_Connect& thePolyConnect); }; #endif diff --git a/opencascade/BRepLib_ValidateEdge.hxx b/opencascade/BRepLib_ValidateEdge.hxx index e5698dcb6..a1dae8f44 100644 --- a/opencascade/BRepLib_ValidateEdge.hxx +++ b/opencascade/BRepLib_ValidateEdge.hxx @@ -11,54 +11,41 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. - #ifndef _BRepLib_ValidateEdge_HeaderFile #define _BRepLib_ValidateEdge_HeaderFile -#include -#include +#include +#include class Adaptor3d_Curve; class Adaptor3d_CurveOnSurface; //! Computes the max distance between 3D-curve and curve on surface. //! This class uses 2 methods: approximate using finite -//! number of points (default) and exact +//! number of points (default) and exact class BRepLib_ValidateEdge { public: //! Initialization constructor - Standard_EXPORT BRepLib_ValidateEdge(const Handle(Adaptor3d_Curve) theReferenceCurve, + Standard_EXPORT BRepLib_ValidateEdge(const Handle(Adaptor3d_Curve) theReferenceCurve, const Handle(Adaptor3d_CurveOnSurface) theOtherCurve, - Standard_Boolean theSameParameter); + Standard_Boolean theSameParameter); //! Sets method to calculate distance: Calculating in finite number of points (if theIsExact - //! is false, faster, but possible not correct result) or exact calculating by using + //! is false, faster, but possible not correct result) or exact calculating by using //! BRepLib_CheckCurveOnSurface class (if theIsExact is true, slowly, but more correctly). //! Exact method is used only when edge is SameParameter. //! Default method is calculating in finite number of points - void SetExactMethod(Standard_Boolean theIsExact) - { - myIsExactMethod = theIsExact; - } + void SetExactMethod(Standard_Boolean theIsExact) { myIsExactMethod = theIsExact; } //! Returns true if exact method selected - Standard_Boolean IsExactMethod() - { - return myIsExactMethod; - } + Standard_Boolean IsExactMethod() { return myIsExactMethod; } //! Sets parallel flag - void SetParallel(Standard_Boolean theIsMultiThread) - { - myIsMultiThread = theIsMultiThread; - } + void SetParallel(Standard_Boolean theIsMultiThread) { myIsMultiThread = theIsMultiThread; } //! Returns true if parallel flag is set - Standard_Boolean IsParallel() - { - return myIsMultiThread; - } + Standard_Boolean IsParallel() { return myIsMultiThread; } //! Set control points number (if you need a value other than 22) void SetControlPointsNumber(Standard_Integer theControlPointsNumber) @@ -66,23 +53,20 @@ public: myControlPointsNumber = theControlPointsNumber; } - //! Sets limit to compute a distance in the Process() function. If the distance greater than - //! theToleranceForChecking the Process() function stopped. Use this in case checking of + //! Sets limit to compute a distance in the Process() function. If the distance greater than + //! theToleranceForChecking the Process() function stopped. Use this in case checking of //! tolerance for best performcnce. Has no effect in case using exact method. void SetExitIfToleranceExceeded(Standard_Real theToleranceForChecking); //! Computes the max distance for the 3d curve //! and curve on surface . If the SetExitIfToleranceExceeded() - //! function was called before contains first - //! greater than SetExitIfToleranceExceeded() parameter value. In case + //! function was called before contains first + //! greater than SetExitIfToleranceExceeded() parameter value. In case //! using exact method always computes real max distance. Standard_EXPORT void Process(); //! Returns true if the distance has been found for all points - Standard_Boolean IsDone() const - { - return myIsDone; - } + Standard_Boolean IsDone() const { return myIsDone; } //! Returns true if computed distance is less than Standard_EXPORT Standard_Boolean CheckTolerance(Standard_Real theToleranceToCheck); @@ -104,16 +88,16 @@ private: void processExact(); private: - Handle(Adaptor3d_Curve) myReferenceCurve; + Handle(Adaptor3d_Curve) myReferenceCurve; Handle(Adaptor3d_CurveOnSurface) myOtherCurve; - Standard_Boolean mySameParameter; - Standard_Integer myControlPointsNumber; - Standard_Real myToleranceForChecking; - Standard_Real myCalculatedDistance; - Standard_Boolean myExitIfToleranceExceeded; - Standard_Boolean myIsDone; - Standard_Boolean myIsExactMethod; - Standard_Boolean myIsMultiThread; + Standard_Boolean mySameParameter; + Standard_Integer myControlPointsNumber; + Standard_Real myToleranceForChecking; + Standard_Real myCalculatedDistance; + Standard_Boolean myExitIfToleranceExceeded; + Standard_Boolean myIsDone; + Standard_Boolean myIsExactMethod; + Standard_Boolean myIsMultiThread; }; #endif // _BRepLib_ValidateEdge_HeaderFile diff --git a/opencascade/BRepLib_WireError.hxx b/opencascade/BRepLib_WireError.hxx index 58a0b46bf..2c06a2268 100644 --- a/opencascade/BRepLib_WireError.hxx +++ b/opencascade/BRepLib_WireError.hxx @@ -21,10 +21,10 @@ //! no error enum BRepLib_WireError { -BRepLib_WireDone, -BRepLib_EmptyWire, -BRepLib_DisconnectedWire, -BRepLib_NonManifoldWire + BRepLib_WireDone, + BRepLib_EmptyWire, + BRepLib_DisconnectedWire, + BRepLib_NonManifoldWire }; #endif // _BRepLib_WireError_HeaderFile diff --git a/opencascade/BRepMAT2d_BisectingLocus.hxx b/opencascade/BRepMAT2d_BisectingLocus.hxx index 8f03b2985..fa151eb8f 100644 --- a/opencascade/BRepMAT2d_BisectingLocus.hxx +++ b/opencascade/BRepMAT2d_BisectingLocus.hxx @@ -36,7 +36,6 @@ class MAT_Node; class Bisector_Bisec; class MAT_Arc; - //! BisectingLocus generates and contains the Bisecting_Locus //! of a set of lines from Geom2d, defined by . //! @@ -71,87 +70,76 @@ class MAT_Arc; //! the figure described by the Explorer from BRepMAT2d. //! - The Arcs correspond to the bisectors. //! - The Nodes are the extremities of the arcs. -class BRepMAT2d_BisectingLocus +class BRepMAT2d_BisectingLocus { public: - DEFINE_STANDARD_ALLOC - Standard_EXPORT BRepMAT2d_BisectingLocus(); - + //! Computation of the Bisector_Locus in a set of Lines //! defined in . //! The bisecting locus are computed on the side