Automatically update code with clang-format disabling for avoiding formatting.
You can check the python script in GitHub PR
{
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) {}
};
// (thus the halves of first and last intervals have solid color)
aTriangles = new Graphic3d_ArrayOfTriangles ((aColors.Length() + 1) * 4, // quads
(aColors.Length() + 1) * 2 * 3, // quads as triangles
+// clang-format off
false, true); // per-vertex colors
+// clang-format on
Quantity_Color aColor1 (aColors.Value (1)), aColor2;
Standard_Integer aSizeY = Standard_Integer(aStepY / 2);
const Standard_Integer anYBottom = theBarBottom + aSizeY;
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
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
+// clang-format on
Aspect_TypeOfColorScalePosition myTitlePos; //!< title position
Standard_Integer myXPos; //!< left position
Standard_Integer myYPos; //!< bottom position
aMapIter.More(); aMapIter.Next())
{
const Handle(AIS_ColoredDrawer)& aCustomDrawer = aMapIter.Key();
+// clang-format off
const TopoDS_Compound& aShapeDraw = aMapIter.Value(); // compound of subshapes with <aShType> type
+// clang-format on
Handle(Prs3d_Drawer) aDrawer;
if (!aCustomDrawer.IsNull())
{
protected:
+// clang-format off
AIS_InteractiveContext* myCTXPtr; //!< pointer to Interactive Context, where object is currently displayed; @sa SetContext()
+// clang-format on
Handle(Standard_Transient) myOwner; //!< application-specific owner object
};
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
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
+// 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
// overlapping of sensitive areas when size of manipulator is small.
// Sensitivity is calculated relative to the default size of the manipulator (100.0f).
const Standard_ShortReal aSensitivityCoef = myAxes[0].Size() / 100.0f;
+// clang-format off
const Standard_Integer aHighSensitivity = Max (Min (RealToInt (aSensitivityCoef * 15), 15), 3); // clamp sensitivity within range [3, 15]
const Standard_Integer aLowSensitivity = Max (Min (RealToInt (aSensitivityCoef * 10), 10), 2); // clamp sensitivity within range [2, 10]
+// clang-format on
switch (aMode)
{
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.
Standard_Integer myCurrentIndex; //!< Index of active axis.
NCollection_Sequence<gp_Trsf> myStartTrsfs; //!< Owning object transformation for start. It is used internally.
Standard_Boolean myHasStartedTransformation; //!< Shows if transformation is processed (sequential calls of Transform()).
+// 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.
// selection priorities
memset (mySelectionPriority, 0, sizeof(mySelectionPriority));
+// clang-format off
mySelectionPriority[Prs3d_DatumParts_None] = 5; // complete trihedron: priority 5 (same as faces)
+// clang-format on
mySelectionPriority[Prs3d_DatumParts_Origin] = 8; // origin: priority 8
for (int aPartIter = Prs3d_DatumParts_XAxis; aPartIter <= Prs3d_DatumParts_ZAxis; ++aPartIter)
{
const gp_Dir& aDir = aCam->Direction();
const gp_Ax3 aCameraCS (aCam->Center(), aDir.Reversed(), aDir ^ aCam->Up());
const gp_XYZ anEyeToPnt = myPanPnt3d.XYZ() - aCam->Eye().XYZ();
+// clang-format off
const gp_Pnt aViewDims = aCam->ViewDimensions (anEyeToPnt.Dot (aCam->Direction().XYZ())); // view dimensions at 3D point
+// clang-format on
const Graphic3d_Vec2d aDxy (-aViewDims.X() * myGL.Panning.Delta.x() / double(aWinSize.x()),
-aViewDims.X() * myGL.Panning.Delta.y() / double(aWinSize.x()));
}
handleMoveTo (theCtx, theView);
handleCameraActions (theCtx, theView, aWalk);
+// clang-format off
theView->View()->SynchronizeXRPosedToBaseCamera(); // handleCameraActions() may modify posed camera position - copy this modifications also to the base camera
+// clang-format on
handleXRPresentations (theCtx, theView);
handleViewRedraw (theCtx, theView);
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)
protected: //! @name XR input variables
NCollection_Array1<Handle(AIS_XRTrackedDevice)> myXRPrsDevices; //!< array of XR tracked devices presentations
+// clang-format on
Quantity_Color myXRLaserTeleColor; //!< color of teleport laser
Quantity_Color myXRLaserPickColor; //!< color of picking laser
Aspect_XRTrackedDeviceRole myXRLastTeleportHand;//!< active hand for teleport
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
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
};
myDrawer->TextAspect()->SetColor (Quantity_NOC_BLACK);
myDrawer->TextAspect()->SetFont (Font_NOF_SANS_SERIF);
myDrawer->TextAspect()->SetHeight (16.0);
+// clang-format off
myDrawer->TextAspect()->Aspect()->SetTextZoomable (true); // the whole object is drawn within transformation-persistence
// this should be forced back-face culling regardless Closed flag
+// clang-format on
myDrawer->TextAspect()->Aspect()->SetFaceCulling (Graphic3d_TypeOfBackfacingModel_BackCulled);
Graphic3d_MaterialAspect aMat (Graphic3d_NameOfMaterial_UserDefined);
}
const Standard_Integer aFirstNode = aSegs->VertexNumber();
+// clang-format off
for (Standard_Integer aVertIter = (aNbTris - aTriFrom) > 2 ? aTriNodesFrom + 2 : aTriNodesFrom + 1; // skip triangle fan center
+// clang-format on
aVertIter <= aTris->VertexNumber(); ++aVertIter)
{
aSegs->AddVertex (aTris->Vertice (aVertIter));
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
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
+// clang-format on
protected: //! @name Animation options
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
};
if (fn.IsNull()) fn = new HeaderSection_FileName;
Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString(nameval);
fn->SetName(name);
+// clang-format off
Interface_MSG::TDate (timestamp,0,0,0,0,0,1,"C:%4.4d-%2.2d-%2.2dT%2.2d:%2.2d:%2.2d"); // actually
+// clang-format on
Handle(TCollection_HAsciiString) tst =
new TCollection_HAsciiString(timestamp);
fn->SetTimeStamp(tst);
AveErr += Dist;
}
+// clang-format off
NumPoints = NumPoints + myFirstPoint - 1;// Setting NumPoints to interval [myFirstPoint, myLastPoint]
+// clang-format on
}
struct Aspect_OpenVRSession::VRContext
{
#ifdef HAVE_OPENVR
+// clang-format off
vr::TrackedDevicePose_t TrackedPoses[vr::k_unMaxTrackedDeviceCount]; //!< array of tracked devices poses
+// clang-format on
vr::IVRSystem* System; //!< OpenVR session object
//! Empty constructor.
NCollection_Vec2<Standard_Real> From; //!< original touch position
NCollection_Vec2<Standard_Real> 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<Standard_Real> Delta() const { return To - From; }
struct Aspect_XRAnalogActionData
{
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<float> VecXYZ; //!< the current state of this action
NCollection_Vec3<float> 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<float> (0.0f, 0.0f, 0.0f)); }
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_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) {}
protected:
NCollection_Array1<Handle(Aspect_XRAction)>
+// clang-format off
myRoleActions[Aspect_XRTrackedDeviceRole_NB]; //!< generic actions
Aspect_XRActionSetMap myActionSets; //!< actions sets
TrackingUniverseOrigin myTrackOrigin; //!< tracking origin
Aspect_FrustumLRBT<double> myFrustumL; //!< left eye projection frustum
Aspect_FrustumLRBT<double> myFrustumR; //!< right eye projection frustum
Standard_Real myUnitFactor; //!< unit scale factor defined as scale factor for m (meters)
+// clang-format on
Standard_Real myAspect; //!< aspect ratio
Standard_Real myFieldOfView; //!< field of view
Standard_Real myIod; //!< intra-ocular distance in meters
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
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
};
// fields
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
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
};
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
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
NCollection_List<EdgeRangeDistance>>
myDistances; //!< Map to store minimal distances between shapes
//! which have no real intersections
+// clang-format on
};
private: //! @name Fields
// Inputs
+// clang-format off
Standard_Boolean myRunParallel; //!< Defines the mode of processing of the single feature
TopoDS_Shape myFeature; //!< Feature to remove
TopTools_IndexedDataMapOfShapeListOfShape* myEFMap; //!< EF Connection map to find adjacent faces
TopTools_IndexedMapOfShape mySolids; //!< Solids participating in the feature removal
TopTools_IndexedDataMapOfShapeListOfShape myFaces; //!< Reconstructed adjacent faces
Handle(BRepTools_History) myHistory; //!< History of the adjacent faces reconstruction
+// clang-format on
};
typedef NCollection_Vector<FillGap> VectorOfFillGap;
//! Binds main thread context
void SetContext (const opencascade::handle<TypeContext>& 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.
Standard_True,Standard_True,
toler, TolAngular)>=GeomAbs_G1))
{
+// clang-format off
closed_tolerance =toler; //if ClosedG1!=0 it will be True and
+// clang-format on
closed_flag = Standard_True ;
} //with the toler value
Handle(TColGeom_HArray1OfBSplineCurve) concatcurve; //array of the concatenated curves
// Inputs
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
Standard_Real dist = p0.SquareDistance(points(i));
if (dist > disMax) {
disMax = dist;
+// clang-format off
p1 = points(i); // it will be faster to store the point, otherwise it is necessary to find a value in a sequence
+// clang-format on
}
}
}
// Add the vertices in the good sense
TopoDS_Shape anEdge = edge.Oriented(TopAbs_FORWARD);
+// clang-format off
TopoDS_Shape aLocalEdge = V1New.Oriented(TopAbs_FORWARD); //(listNode.First()).Oriented(TopAbs_FORWARD);
+// clang-format on
aBuilder.Add(anEdge,aLocalEdge);
aLocalEdge = V2New.Oriented(TopAbs_REVERSED); //(listNode.Last()).Oriented(TopAbs_REVERSED);
aBuilder.Add(anEdge,aLocalEdge);
}
}
if(isSmall == nume) return Standard_True;
+// clang-format off
Standard_Real tol = BRep_Tool::Tolerance(V1)+BRep_Tool::Tolerance(V2);//Max(BRep_Tool::Tolerance(V1),BRep_Tool::Tolerance(V2));
+// clang-format on
if (wireLength > tol) return Standard_False;
return Standard_True;
}
// Construct edgeSections
Standard_Integer i;
//TopTools_DataMapOfShapeListOfShape edgeSections;
+// clang-format off
TopTools_IndexedDataMapOfShapeListOfShape edgeSections; //use index map for regulating free edges
+// clang-format on
for (i = 1; i <= myBoundFaces.Extent(); i++) {
const TopoDS_Shape& bound = myBoundFaces.FindKey(i);
TopTools_ListOfShape lsect;
locProj.Initialize(GAC, first, last);
gp_Pnt pfirst = GAC.Value(first), plast = GAC.Value(last);
Standard_Integer find = 1;//(isConsiderEnds ? 1 : 2);
+// clang-format off
Standard_Integer lind = arrPnt.Length();//(isConsiderEnds ? arrPnt.Length() : arrPnt.Length() -1);
+// clang-format on
for (Standard_Integer i1 = find; i1 <= lind ; i1++) {
gp_Pnt pt = arrPnt(i1);
}
gp_Vec N = nf1^nf2;
+// clang-format off
gp_Dir ProjL = N.XYZ() ^ LDir.XYZ() ^ N.XYZ(); //proj LDir on the plane defined by nf1/nf2 directions
+// clang-format on
Standard_Real fAD = nf1.Dot(ProjL);
Standard_Real sAD = nf2.Dot(ProjL);
T.Normalize();
P.SetCoord (P.X() + TolInit * T.X(), P.Y() + TolInit * T.Y());
+// clang-format off
FClassifier.Reset (gp_Lin2d (P, T), ParamInit, RealEpsilon()); //-- Length and Tolerance #######
+// clang-format on
TopExp_Explorer otherfaceexplorer;
Standard_Integer aNbEdges = 0;
aContTrg = aPolyConnect.Value();
Standard_Integer aContTrgNodes[3];
+// clang-format off
theTr->Triangle (aContTrg).Get (aContTrgNodes[0], aContTrgNodes[1], aContTrgNodes[2]); //indices of nodes of the triangle
Standard_Integer aAdjTrg[3];
aPolyConnect.Triangles (aContTrg, aAdjTrg[0], aAdjTrg[1], aAdjTrg[2]); //indices of adjacent triangles
+// clang-format on
for (Standard_Integer j = 0; j < 3; j++)
{
Poly_Connect aPolyConnect (theTr);
Standard_Integer aAdjTrg[3];
+// clang-format off
aPolyConnect.Triangles (theTrgIdx, aAdjTrg[0], aAdjTrg[1], aAdjTrg[2]); //indices of adjacent triangles
+// clang-format on
for (Standard_Integer j = 0; j < 3; j++)
{
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:
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
//! Is vertex corresponding to proximity point of 1st shape from additional set
Standard_Integer myIsProxVtx1FromAddSet;
BVH_Array3d myAddVertices1; //!< Additional vertices on the 1st shape
+// clang-format off
NCollection_Vector<ProxPnt_Status> 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;
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<ProxPnt_Status> myAddStatus1; //!< Status of additional vertices on the 1st shape.
NCollection_Vector<ProxPnt_Status> 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?
}
else
{
+// clang-format off
GeomPlate_MakeApprox Approx( GPlate, myTol3d, myMaxSegments, myMaxDeg, dmax, 0 ); //?????????????
//GeomConvert_ApproxSurface Approx( GPlate, myTol3d, GeomAbs_C1, GeomAbs_C1, myMaxDeg, myMaxDeg, myMaxSegments, 1 );
//Approx.Dump( std::cout );
+// clang-format on
Surface = Approx.Surface();
}
for (j = 1; j <= NbPath; j++)
Tapes(StartEdges(isec))->SetValue(6, j, myFaces->Value(isec, j));
TopoDS_Vertex Vfirst, Vlast;
+// clang-format off
TopExp::Vertices(TopoDS::Edge(StartEdges(isec)), Vfirst, Vlast, Standard_True); //with orientation
+// clang-format on
if (!Rails.IsBound(Vfirst))
{
Handle(TopTools_HArray2OfShape) anArray = new TopTools_HArray2OfShape(1, 2, 1, NbPath+1);
// modified by NIZHNY-MKK Thu Jun 9 12:15:15 2005.BEGIN
Standard_Integer BRepGProp_EdgeTool::NbIntervals(const BRepAdaptor_Curve& C,const GeomAbs_Shape S)
{
+// clang-format off
BRepAdaptor_Curve* pC = (BRepAdaptor_Curve*) &C; // at the moment actually NbIntervals() does not modify the
// object "C". So it is safe to do such a cast.
return pC->NbIntervals(S);
{
BRepAdaptor_Curve* pC = (BRepAdaptor_Curve*) &C; // at the moment actually Intervals() does not modify the
// object "C". So it is safe to do such a cast.
+// clang-format on
pC->Intervals(T, S);
}
// modified by NIZHNY-MKK Thu Jun 9 12:15:18 2005.END
//
const Standard_Integer NumSubs = SUBS_POWER;
const TopoDS_Face& aF = theSurface.GetFace();
+// clang-format off
const Standard_Boolean isNaturalRestriction = (aF.NbChildren () == 0); //theSurface.NaturalRestriction();
+// clang-format on
Standard_Real CIx, CIy, CIz, CIxy, CIxz, CIyz;
Standard_Real CDim[2], CIxx[2], CIyy[2], CIzz[2];
Standard_Real& theL3d, TopLoc_Location& theLoc3d, BRep_ListOfCurveRepresentation& theCList)
{
const Handle(BRep_TEdge)& aTE = *((Handle(BRep_TEdge)*) &theEdge.TShape());
+// clang-format off
theCList = aTE->ChangeCurves(); // current function (i.e. GetCurve3d()) will not change any of this curves
+// clang-format on
BRep_ListIteratorOfListOfCurveRepresentation anIt(theCList);
Standard_Boolean NotDone = Standard_True;
while (NotDone && anIt.More()) {
}
else
{
+// clang-format off
aNE = TopoDS::Edge(theEdge.EmptyCopied()); //will be modified a little bit later, so copy anyway
GetCurve3d(aNE, C3d, f3d, l3d, L3d, CList); //C3d pointer and CList will be differ after copying
+// clang-format on
aNTE = *((Handle(BRep_TEdge)*) &aNE.TShape());
TopoDS_Iterator sit(theEdge);
for (;sit.More();sit.Next()) //add vertices from old edge to the new ones
{
return;
}
+// clang-format off
InsertionBaseClass::postProcessMesh (theMesher, Message_ProgressRange()); // shouldn't be range passed here?
+// clang-format on
if (!myIsPreProcessSurfaceNodes)
{
// num of verts returned from last call to Triangulate()
virtual int GetNumOutputVerts() const = 0;
+// clang-format off
virtual const DelaBella_Triangle* GetFirstDelaunayTriangle() const = 0; // valid only if Triangulate() > 0
virtual const DelaBella_Triangle* GetFirstHullTriangle() const = 0; // valid only if Triangulate() > 0
virtual const DelaBella_Vertex* GetFirstHullVertex() const = 0; // if Triangulate() < 0 it is list, otherwise closed contour!
+// clang-format on
};
#else
void* DelaBella_Create();
// determine if all poles of the side fit into:
Standard_Boolean isCollapsed = Standard_True; // aCenter precisely (with gp::Resolution())
Standard_Boolean isSingular = Standard_True; // aCenter with thePrecision
+// clang-format off
NCollection_LocalArray<Standard_Boolean,4> isDegenerated (aDegenPnt.Extent()); // degenerated vertex
+// clang-format on
for (size_t iDegen = 0; iDegen < isDegenerated.Size(); ++iDegen) isDegenerated[iDegen] = Standard_True;
for (int iPole = 0; iPole < NbSteps[iSide]; iPole++)
{
// Results
Standard_Boolean myDone; //!< Status of the algorithm
+// clang-format off
BRepOffset_DataMapOfShapeListOfInterval myMapEdgeType; //!< Map containing the list of intervals on the edge
TopTools_IndexedDataMapOfShapeListOfShape myAncestors; //!< Ancestors map
NCollection_DataMap<TopoDS_Shape,
TopTools_ListOfShape myNewFaces; //!< New faces generated to close the gaps between adjacent
//! tangential faces having different offset values
TopTools_DataMapOfShapeShape myGenerated; //!< Binding between edge and face generated from the edge
+// clang-format on
};
#endif // _BRepOffset_Analyse_HeaderFile
//=======================================================================
void BRepOffset_MakeOffset::MakeMissingWalls (const Message_ProgressRange& theRange)
{
+// clang-format off
TopTools_IndexedDataMapOfShapeListOfShape Contours; //Start vertex + list of connected edges (free boundary)
+// clang-format on
TopTools_DataMapOfShapeShape MapEF; //Edges of contours: edge + face
Standard_Real OffsetVal = Abs(myOffset);
Handle(BRepAlgo_AsDes) myAsDes; //!< Ascendants/descendants of the edges faces
const BRepOffset_Analyse* myAnalyzer; //!< Analyzer of the input parameters
+// clang-format off
TopTools_DataMapOfShapeListOfShape* myEdgesOrigins; //!< Origins of the offset edges (binding between offset edge and original edge)
TopTools_DataMapOfShapeShape* myFacesOrigins; //!< Origins of the offset faces (binding between offset face and original face)
TopTools_DataMapOfShapeShape* myETrimEInf; //!< Binding between trimmed and infinite edge
TopTools_IndexedDataMapOfShapeListOfShape myFacesToRebuild; //!< Faces that have to be rebuilt (invalid and close to invalid faces)
TopTools_MapOfShape myFSelfRebAvoid; //!< Faces that have to be avoided when rebuilding splits of the same offset face
+// clang-format on
TopoDS_Shape mySolids; //!< Solids built from the splits of faces
B.Range(aCopyEdge, aFace, f, l);
}
}
+// clang-format off
aShapeShapeMap.Bind(aCopyEdge, anOrigEdge); // Bind the reversed copy of Edge to the original
+// clang-format on
}
aShapeShapeMap.Bind(start, aFace); // Bind the original face to the reversed copy
}
index->SetValue(itab, myindex);
myorient = Seqorient.Value(itab);
orient->SetValue(itab, myorient);
+// clang-format off
mynbcurve = ( Seq2d->Value(itab).IsNull() ? 0 : 1 ); // abv 31 Jan 00: to be able not to write pcurves: was 1
+// clang-format on
nbcurves->SetValue(itab, mynbcurve);
myisoflag = 0;
flag = new TColStd_HArray1OfInteger(1,1);
Message_ProgressScope aPS(theProgress, NULL, nbf);
for (Ex.Init(start,TopAbs_FACE); Ex.More() && aPS.More(); Ex.Next(), aPS.Next()) {
TopoDS_Face F = TopoDS::Face(Ex.Current());
+// clang-format off
if ( start.Orientation() == TopAbs_REVERSED ) F.Reverse(); //:l4 abv 12 Jan 99: CTS22022-2: writing reversed shells
+// clang-format on
if (F.IsNull()) {
AddWarning(start," a Face is a null entity");
}
else {
if(fromGC->PCurve().IsNull()) continue; }
+// clang-format off
if ( ! isC3d && ! fromGC->IsCurveOnSurface()) continue; // only 3d curves and pcurves are treated
+// clang-format on
Handle(Geom_Surface) surface;
TopLoc_Location L;
Standard_Integer nitems = 0;
for ( TopoDS_Iterator subit(newsh); subit.More(); subit.Next(), nitems++ ) {
const TopoDS_Shape& subsh = subit.Value();
+// clang-format off
if ( subsh.ShapeType() == sh.ShapeType() ) B.Add ( result, subsh );//fix for SAMTECH bug OCC322 about absent internal vertices after sewing.
else locStatus |= EncodeStatus(10);//ShapeExtend::EncodeStatus ( ShapeExtend_FAIL1 );
}
if ( ! nitems ) locStatus |= EncodeStatus(10);//ShapeExtend::EncodeStatus ( ShapeExtend_FAIL1 );
+// clang-format on
}
if ( ! modif ) return shape;
// Bin(Brep)Tools_ShapeSet::AddGeometry() is called from Bin(Brep)Tools_ShapeSet::Add()
// that processes shapes recursively from complex to elementary ones.
// As a result, the TopAbs_FACE's will be processed earlier than the TopAbs_EDGE's.
+// clang-format off
myTriangulations.Add(CR->Triangulation(), Standard_False); // edge triangulation does not need normals
+// clang-format on
myNodes.Add(CR->PolygonOnTriangulation());
ChangeLocations().Add(CR->Location());
if (CR->IsPolygonOnClosedTriangulation())
TColStd_IndexedMapOfTransient myPolygons2D;
TColStd_IndexedMapOfTransient myPolygons3D;
NCollection_IndexedDataMap<Handle(Poly_Triangulation),
+// clang-format off
Standard_Boolean> myTriangulations; //!< Contains a boolean flag with information
//! to save normals for triangulation
+// clang-format on
TColStd_IndexedMapOfTransient myNodes;
Standard_Boolean myWithTriangles;
Standard_Boolean myWithNormals;
for (Standard_Integer ind = myParams.Degree * aDimension; ind < (theDerivative + 1) * aDimension; ind++)
{
aPntDeriv[ind] = 0.0;
+// clang-format off
(&theDerivArray)[ind] = 0.0; // should be cleared separately, because aPntDeriv may look to another memory area
+// clang-format on
}
}
void operator = (const BSplCLib_Cache&);
private:
+// clang-format off
Standard_Boolean myIsRational; //!< identifies the rationality of Bezier/B-spline curve
BSplCLib_CacheParams myParams; //!< cache parameters
Handle(TColStd_HArray2OfReal) myPolesWeights; //!< array of poles and weights of calculated cache
// x1 y1 [z1] [w1]
// x2 y2 [z2] [w2] etc
// for 2D-curves there is no z conponent, for non-rational curves there is no weight
+// clang-format on
};
DEFINE_STANDARD_HANDLE(BSplCLib_Cache, Standard_Transient)
aParameters[1] = aNewV;
}
+// clang-format off
NCollection_LocalArray<Standard_Real> aTransientCoeffs(aCacheCols); // array for intermediate results
+// clang-format on
// Calculate intermediate value of cached polynomial along columns
PLib::NoDerivativeEvalPolynomial(aParameters[1], aMinMaxDegree[1],
aParameters[1] = aNewV;
}
+// clang-format off
NCollection_LocalArray<Standard_Real> aTransientCoeffs(aCacheCols<<1); // array for intermediate results
+// clang-format on
// Calculate intermediate values and derivatives of bivariate polynomial along variable with maximal degree
PLib::EvalPolynomial(aParameters[1], 1, aMinMaxDegree[1], aCacheCols, aPolesArray[0], aTransientCoeffs[0]);
aParameters[1] = aNewV;
}
+// clang-format off
NCollection_LocalArray<Standard_Real> aTransientCoeffs(3 * aCacheCols); // array for intermediate results
// Calculating derivative to be evaluate and
// nulling transient coefficients when max or min derivative is less than 2
+// clang-format on
Standard_Integer aMinMaxDeriv[2] = {Min(2, aMinMaxDegree[0]),
Min(2, aMinMaxDegree[1])};
for (Standard_Integer i = aMinMaxDeriv[1] + 1; i < 3; i++)
void operator = (const BSplSLib_Cache&);
private:
+// clang-format off
Standard_Boolean myIsRational; //!< identifies the rationality of Bezier/B-spline surface
BSplCLib_CacheParams myParamsU, myParamsV; //!< cache parameters by U and V directions
Handle(TColStd_HArray2OfReal) myPolesWeights; //!< array of poles and weights of calculated cache
// x21 y21 z21 [w21] x22 y22 z22 [w22] etc
// for non-rational surfaces there is no weight;
// size of array: (max(myDegree)+1) * A*(min(myDegree)+1), where A = 4 or 3
+// clang-format on
};
DEFINE_STANDARD_HANDLE(BSplSLib_Cache, Standard_Transient)
private:
+// clang-format off
Standard_Boolean myUseMainAxis; //!< Defines whether to search for the best split or use the widest axis
+// clang-format on
};
const Standard_Integer aNodeEndPrimitive = theBVH->EndPrimitive (theNode);
if (aNodeEndPrimitive - aNodeBegPrimitive < BVH_Builder<T, N>::myLeafNodeSize)
{
+// clang-format off
return typename BVH_QueueBuilder<T, N>::BVH_ChildNodes(); // node does not require partitioning
+// clang-format on
}
const BVH_Box<T, N> anAABB (theBVH->MinPoint (theNode),
const Standard_Integer aNodeNbPrimitives = theBVH->NbPrimitives (theNode);
if (aNodeEndPrimitive - aNodeBegPrimitive < BVH_Builder<T, N>::myLeafNodeSize)
{
+// clang-format off
return typename BVH_QueueBuilder<T, N>::BVH_ChildNodes(); // node does not require partitioning
+// clang-format on
}
// Parameters for storing best split
// Create stack
BVH_NodeInStack<MetricType> aStack[BVH_Constants_MaxTreeDepth];
+// clang-format off
BVH_NodeInStack<MetricType> aNode (0); // Currently processed node, starting with the root node
+// clang-format on
BVH_NodeInStack<MetricType> aPrevNode = aNode; // Previously processed node
Standard_Integer aHead = -1; // End of the stack
theData->ApplicationVersion(),
theData->DataType(),
theData->UserInfo(),
+// clang-format off
Standard_True); // only count the size of the section
+// clang-format on
// calculate comment section
TColStd_SequenceOfExtendedString aComments;
BinObjMgt_RRelocationTable& theRelocTable) const Standard_OVERRIDE
{
Standard_Boolean aResult = myBaseDirver->Paste (theSource, theTarget, theRelocTable);
+// clang-format off
theTarget->AfterRetrieval(); // to allow synchronization of the derived attribute with the base content
+// clang-format on
return aResult;
}
case TNaming_MODIFY : return 'M';
case TNaming_DELETE : return 'D';
case TNaming_SELECTED : return 'S';
+// clang-format off
case TNaming_REPLACE : return 'M'; // for compatibility case TNaming_REPLACE : return 'R';
+// clang-format on
default:
throw Standard_DomainError("TNaming_Evolution:: Evolution Unknown");
}
aBuilder.Select (aNewIt.Value(), anOldIt.Value());
break;
case TNaming_REPLACE:
+// clang-format off
aBuilder.Modify (anOldIt.Value(), aNewIt.Value()); // for compatibility aBuilder.Replace(anOldShape, aNewShape);
+// clang-format on
break;
default:
throw Standard_DomainError("TNaming_Evolution:: Evolution Unknown");
Standard_Integer i;
// read array
for(i=1; i<=aNbArgs;i++) {
+// clang-format off
if(!aNewF && i > OBSOLETE_NUM) break;//interrupt reading as old format can have only 4 items
+// clang-format on
ok = theSource >> anIndx;
if (!ok)
break;
Standard_OStream* myOStream; ///< stream to write in case direct writing is enabled
Standard_IStream* myIStream; ///< stream to write in case direct reading is enabled
Standard_Boolean myDirectWritingIsEnabled;
+// clang-format off
Handle(BinObjMgt_Position) myStreamStart; ///< position where the direct writing to the script is started
+// clang-format on
};
private:
Standard_OStream* myStream; ///< pointer to the stream
+// clang-format off
uint64_t myPosition; ///< the current position relatively to the OStream position at the moment of creation of this class instance
+// clang-format on
Standard_Real myRealBuf[12]; ///< buffer for 12 reals storage
Standard_Integer myIntBuf[3]; ///< buffer for 3 integers storage
float myFloatBuf[3]; ///< buffer for 3 floats storage
// Bin(Brep)Tools_ShapeSet::AddGeometry() is called from Bin(Brep)Tools_ShapeSet::Add()
// that processes shapes recursively from complex to elementary ones.
// As a result, the TopAbs_FACE's will be processed earlier than the TopAbs_EDGE's.
+// clang-format off
myTriangulations.Add(CR->Triangulation(), Standard_False); // edge triangulation does not need normals
+// clang-format on
myNodes.Add(CR->PolygonOnTriangulation());
ChangeLocations().Add(CR->Location());
if (CR->IsPolygonOnClosedTriangulation())
NCollection_IndexedMap<Handle(Poly_Polygon2D)> myPolygons2D;
NCollection_IndexedMap<Handle(Poly_Polygon3D)> myPolygons3D;
NCollection_IndexedDataMap<Handle(Poly_Triangulation),
+// clang-format off
Standard_Boolean> myTriangulations; //!< Contains a boolean flag with information
//! to save normals for triangulation
+// clang-format on
NCollection_IndexedMap<Handle(Poly_PolygonOnTriangulation)> myNodes;
};
Geom2dAPI_ProjectPointOnCurve Projector( P2d, Cd );
Standard_Real par = Projector.LowerDistanceParameter();
Standard_Integer Ideg = DStr.AddShape(Edeg);
+// clang-format off
TopAbs_Orientation ori = (par < fd)? TopAbs_FORWARD : TopAbs_REVERSED; //if par<fd => par>ld
+// clang-format on
Interfp1 = ChFi3d_FilPointInDS( ori, Ideg, indvertex, par, Standard_True );
DStr.ChangeShapeInterferences(Ideg).Append(Interfp1);
}
const Handle(Adaptor3d_Surface)& Surf = SFunc.Surface();
Contap_TFunction TypeFunc(SFunc.FunctionType());
+// clang-format off
toler(1) = ureso; //-- Trop long !!! Adaptor3d_HSurfaceTool::UResolution(Surf,SFunc.Tolerance());
toler(2) = vreso; //---Beaucoup trop long !!! Adaptor3d_HSurfaceTool::VResolution(Surf,SFunc.Tolerance());
+// clang-format on
infb(1) = Adaptor3d_HSurfaceTool::FirstUParameter(Surf);
infb(2) = Adaptor3d_HSurfaceTool::FirstVParameter(Surf);
supb(1) = Adaptor3d_HSurfaceTool::LastUParameter(Surf);
void* myGlD3dDevice; //!< WGL/D3D device handle
void* myGlD3dSurf; //!< WGL/D3D surface handle
Standard_Integer myLockCount; //!< locking counter
+// clang-format off
Standard_Boolean myD3dFallback; //!< indicates that FBO has been initialized without WGL/D3D interop
+// clang-format on
Standard_Boolean myIsSRGBReady; //!< indicates that color buffer is sRGB ready
public:
myIsD3dEx,
myWindow->Width(),
myWindow->Height(),
+// clang-format off
0); // do not request depth-stencil attachment since buffer will be flipped using addition FBO (myToFlipOutput)
+// clang-format on
}
if (toD3dFallback)
{
//!< Internal parameters for transfer process
struct DE_SectionGlobal
{
- Standard_Real LengthUnit =
- 1.0; //!< Target Unit (scaling based on MM) for the transfer process, default 1.0 (MM)
+// clang-format off
+ Standard_Real LengthUnit = 1.0; //!< Target Unit (scaling based on MM) for the transfer process, default 1.0 (MM)
Standard_Real SystemUnit = 1.0; //!< System Unit (scaling based on MM) to be used when initial
//!< unit is unknown, default 1.0 (MM)
} GlobalParameters;
private:
- Standard_Boolean
- myIsEnabled; //!< Flag to use a current provider for Read or Write process via DE_Wrapper
+ Standard_Boolean myIsEnabled; //!< Flag to use a current provider for Read or Write process via DE_Wrapper
+// clang-format on
};
#endif // _DE_ConfigurationNode_HeaderFile
void sort(const Handle(DE_ConfigurationContext)& theResource);
public:
- DE_ConfigurationNode::DE_SectionGlobal
- GlobalParameters; //!< Internal parameters for the all translators
+// clang-format off
+ DE_ConfigurationNode::DE_SectionGlobal GlobalParameters; //!< Internal parameters for the all translators
private:
- Standard_Boolean
- myKeepUpdates; //!< Flag that keeps changes on configuration nodes which are being updated
+ Standard_Boolean myKeepUpdates; //!< Flag that keeps changes on configuration nodes which are being updated
+// clang-format on
DE_ConfigurationFormatMap myConfiguration; //!< Internal map of formats
};
{
// Write
bool WriteBinary = true; //!< Defines the binary file format
+// clang-format off
BinTools_FormatVersion WriteVersionBin = BinTools_FormatVersion_CURRENT; //!< Defines the writer version for the binary format
TopTools_FormatVersion WriteVersionAscii = TopTools_FormatVersion_CURRENT; //!< Defines the writer version for the ASCII format
+// clang-format on
bool WriteTriangles = true; //!< Defines the flag for storing shape with(without) triangles
bool WriteNormals = true; //!< Defines the flag for storing shape with(without) normals
struct XCAFDoc_InternalSection
{
// Read
+// clang-format off
PCDM_ReaderFilter::AppendMode ReadAppendMode = PCDM_ReaderFilter::AppendMode::AppendMode_Forbid; //!< Setting up the append mode
TColStd_ListOfAsciiString ReadSkipValues; //!< Overwrites the existing attributes by the loaded ones
TColStd_ListOfAsciiString ReadValues; //!< Adds sub-tree path or adds attribute to read by typename
+// clang-format on
} InternalParameters;
};
}
TopTools_MapOfShape anEdgesToDelete;
+// clang-format off
TopExp_Explorer anEx(S,TopAbs_EDGE); // mpv: new explorer iterator because we need keep edges order
+// clang-format on
for(;anEx.More();anEx.Next()) {
Standard_Boolean aC0 = Standard_False;
const TopoDS_Shape& anEdge1 = anEx.Current();
if(!aFun.IsNull()) {
TCollection_AsciiString aFName = TCollection_AsciiString(a[3]) + "_Function";
TDataStd_Name::Set(aFun->Label(), aFName);
+// clang-format off
TDF_Reference::Set(objLabel, aFun->Label().FindChild(FUNCTION_RESULT_LABEL)); //result is here
+// clang-format on
DDF::ReturnLabel(di, aFun->Label());
return 0;
}
if(aFun.IsNull()) return 1;
TDataStd_Name::Set(aFun->Label(), "Box_Function");
+// clang-format off
TDF_Reference::Set(anObj->Label(), aFun->Label().FindChild(FUNCTION_RESULT_LABEL)); //result is here
+// clang-format on
Standard_Real dx,dy,dz;
dx = Draw::Atof(theArg[2]);
dy = Draw::Atof(theArg[3]);
if(aFun.IsNull()) return 1;
TDataStd_Name::Set(aFun->Label(), "Cyl_Function");
+// clang-format off
TDF_Reference::Set(anObj->Label(), aFun->Label().FindChild(FUNCTION_RESULT_LABEL)); //result is here
+// clang-format on
Standard_Real aR, aH;
aR = Draw::Atof(theArg[2]);
if(aFun.IsNull()) return 1;
TDataStd_Name::Set(aFun->Label(), "Fuse");
+// clang-format off
TDF_Reference::Set(anObject->Label(), aFun->Label().FindChild(FUNCTION_RESULT_LABEL)); //result is here
+// clang-format on
DNaming::SetObjectArg(aFun, BOOL_TOOL, aTool);
DDF::ReturnLabel(theDI, aFun->Label());
return 0;
if(aFun.IsNull()) return 1;
TDataStd_Name::Set(aFun->Label(), "Cut");
+// clang-format off
TDF_Reference::Set(anObject->Label(), aFun->Label().FindChild(FUNCTION_RESULT_LABEL)); //result is here
+// clang-format on
DNaming::SetObjectArg(aFun, BOOL_TOOL, aTool);
DDF::ReturnLabel(theDI, aFun->Label());
return 0;
if(aFun.IsNull()) return 1;
TDataStd_Name::Set(aFun->Label(), "Common");
+// clang-format off
TDF_Reference::Set(anObject->Label(), aFun->Label().FindChild(FUNCTION_RESULT_LABEL)); //result is here
+// clang-format on
DNaming::SetObjectArg(aFun, BOOL_TOOL, aTool);
DDF::ReturnLabel(theDI, aFun->Label());
return 0;
if(aFun.IsNull()) return 1;
TDataStd_Name::Set(aFun->Label(), "Section");
+// clang-format off
TDF_Reference::Set(anObject->Label(), aFun->Label().FindChild(FUNCTION_RESULT_LABEL)); //result is here
+// clang-format on
DNaming::SetObjectArg(aFun, BOOL_TOOL, aTool);
DDF::ReturnLabel(theDI, aFun->Label());
return 0;
if(aFun.IsNull()) return 1;
TDataStd_Name::Set(aFun->Label(), "Fillet");
+// clang-format off
TDF_Reference::Set(anObject->Label(), aFun->Label().FindChild(FUNCTION_RESULT_LABEL)); //result is here
+// clang-format on
Standard_Real aRadius = Draw::Atof(theArg[3]);
DNaming::GetReal(aFun,FILLET_RADIUS)->Set(aRadius);
Handle(TFunction_Function) aFun = SetFunctionDS(anObj->Label(), funGUID);
if(aFun.IsNull()) return 1;
TDataStd_Name::Set(aFun->Label(), "Prism_Function");
+// clang-format off
TDF_Reference::Set(anObj->Label(), aFun->Label().FindChild(FUNCTION_RESULT_LABEL)); //result is here
+// clang-format on
// arguments
Handle(TDataStd_UAttribute) aBasisObj;
TDataStd_Name::Set(aFun->Label(), "FulRevol_Function");
else
TDataStd_Name::Set(aFun->Label(), "SecRevol_Function");
+// clang-format off
TDF_Reference::Set(anObj->Label(), aFun->Label().FindChild(FUNCTION_RESULT_LABEL)); //result is here
+// clang-format on
DNaming::SetObjectArg(aFun, REVOL_BASIS, aBasisObj);
DNaming::SetObjectArg(aFun, REVOL_AXIS, anAxObj);
Handle(TFunction_Function) aFun = SetFunctionDS(anObj->Label(), funGUID);
if(aFun.IsNull()) return 1;
TDataStd_Name::Set(aFun->Label(), "Sphere_Function");
+// clang-format off
TDF_Reference::Set(anObj->Label(), aFun->Label().FindChild(FUNCTION_RESULT_LABEL)); //result is here
+// clang-format on
Handle(TDataStd_UAttribute) aCenterObj;
if (!DDocStd::Find(aDocument, theArg[2], GEOMOBJECT_GUID, aCenterObj)) return 1;
if(aFun.IsNull()) return 1;
TDataStd_Name::Set(aFun->Label(), "PntXYZ_Function");
+// clang-format off
TDF_Reference::Set(anObj->Label(), aFun->Label().FindChild(FUNCTION_RESULT_LABEL)); //result is here
+// clang-format on
Standard_Real x,y,z;
x = Draw::Atof(theArg[2]);
y = Draw::Atof(theArg[3]);
if(aFun.IsNull()) return 1;
TDataStd_Name::Set(aFun->Label(), "PntRLT_Function");
+// clang-format off
TDF_Reference::Set(anObj->Label(), aFun->Label().FindChild(FUNCTION_RESULT_LABEL)); //result is here
+// clang-format on
Handle(TDataStd_UAttribute) aRefPnt;
if (!DDocStd::Find(aDocument, theArg[2], GEOMOBJECT_GUID, aRefPnt)) return 1;
Handle(TFunction_Function) aFun = SetFunctionDS(anObj->Label(), funGUID);
if(aFun.IsNull()) return 1;
TDataStd_Name::Set(aFun->Label(), "Line3D_Function");
+// clang-format off
TDF_Reference::Set(anObj->Label(), aFun->Label().FindChild(FUNCTION_RESULT_LABEL)); //result is here
+// clang-format on
Standard_Integer aType = Draw::Atoi(theArg[2]);
DNaming::GetInteger(aFun,LINE3D_TYPE)->Set(aType);
gp_Pnt P1 = ElCLib::Value(0., myCircle);
gp_Pnt P2 = ElCLib::Value(M_PI, myCircle);
+// clang-format off
gce_MakePln mkPln(P1, P2, Apex); // create a plane which defines plane for projection aPosition on it
+// clang-format on
gp_Vec aVector( mkPln.Value().Location(), aPosition ); //project aPosition on a plane
gp_Vec Normal = mkPln.Value().Axis().Direction();
OppositePnt = P1;
}
+// clang-format off
aPnt = AttachmentPnt ; // Creating of circle which defines a plane for a dimension arc
gp_Vec Vec(AttachmentPnt, Apex); // Dimension arc is a part of the circle
Vec.Scale(2.);
Standard_Integer i;
Standard_Real AttParam = ElCLib::Parameter(aCircle2, AttachmentPnt); //must be equal to zero (look circle construction)
+// clang-format on
Standard_Real OppParam = ElCLib::Parameter(aCircle2, OppositePnt);
while ( AttParam >= 2. * M_PI ) AttParam -= 2. * M_PI;
Standard_Boolean IsArrowOut = Standard_True; //Is arrows inside or outside of the cone
if( ElCLib::Parameter(aCircle2, tmpPnt) < OppParam )
+// clang-format off
if( 2. * myCircle.Radius() > 4. * myArrowSize ) IsArrowOut = Standard_False; //four times more than an arrow size
+// clang-format on
Standard_Real angle = OppParam - AttParam;
Standard_Real param = AttParam;
if(!IsInDomain)
{
const Standard_Real uLast = ElCLib::Parameter ( anEllipse, anEndOfArrow );
+// clang-format off
const Standard_Real Alpha = DsgPrs::DistanceFromApex(anEllipse, anEndOfArrow, uFirst);//length of ellipse arc
+// clang-format on
gp_Vec Vapex(aCenter, ElCLib::Value( uLast, anEllipse )) ;
gp_Vec Vpnt(aCenter, ElCLib::Value( uFirst, anEllipse )) ;
gp_Dir dir(Vpnt ^ Vapex);
aBEllipse.SetMajorRadius(aBEllipse.MajorRadius() + Offset);
aBEllipse.SetMinorRadius(aBEllipse.MinorRadius() + Offset);
const Standard_Real uLast = ElCLib::Parameter ( aBEllipse, anEndOfArrow );
+// clang-format off
const Standard_Real Alpha = DsgPrs::DistanceFromApex(aBEllipse, anEndOfArrow, uFirst);//length of ellipse arc
+// clang-format on
gp_Pnt p1;
aCurve->D0(uFirst, p1);
gp_Vec Vapex(aCenter, anEndOfArrow) ;
// segment from mid point to the text position
aPrims->AddBound(2);
+// clang-format off
aPrims->AddVertex(Position.IsEqual(MidPoint,rad)? MidPoint : ElCLib::Value(ElCLib::Parameter(aCircleM,Position),aCircleM)); // mid point
+// clang-format on
aPrims->AddVertex(Position); // text position
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
// segment from mid point to the geometry
Handle(Graphic3d_ArrayOfSegments) aPrims = new Graphic3d_ArrayOfSegments(2);
+// clang-format off
aPrims->AddVertex(ElCLib::Value(ElCLib::Parameter(aCircleM,AttachPoint),aCircleM)); // mid point
+// clang-format on
aPrims->AddVertex(AttachPoint); // attach point to the geometry
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
}
// segment from mid point to the text position
aPrims->AddBound(2);
+// clang-format off
aPrims->AddVertex(Position.IsEqual(MidPoint,rad)? MidPoint : ElCLib::Value(ElCLib::Parameter(aCircleM,Position),aCircleM)); // mid point
+// clang-format on
aPrims->AddVertex(Position); // text position
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
// segment from mid point to the text position
aPrims->AddBound(2);
+// clang-format off
aPrims->AddVertex(Position.IsEqual(MidPoint,rad)? MidPoint : ElCLib::Value(ElCLib::Parameter(aCircleM,Position),aCircleM)); // mid point
+// clang-format on
aPrims->AddVertex(Position); // text position
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
{
// segment from mid point to the geometry
aPrims = new Graphic3d_ArrayOfSegments(2);
+// clang-format off
aPrims->AddVertex(ElCLib::Value(ElCLib::Parameter(aCircleM,AttachPoint),aCircleM)); // mid point
+// clang-format on
aPrims->AddVertex(AttachPoint); // attach point to the geometry
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
}
// segment from mid point to the text position
aPrims->AddBound(2);
+// clang-format off
aPrims->AddVertex(Position.IsEqual(MidPoint,rad)? MidPoint : ElCLib::Value(ElCLib::Parameter(aCircleM,Position),aCircleM)); // mid point
+// clang-format on
aPrims->AddVertex(Position); // text position
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
{
// segment from mid point to the geometry
aPrims = new Graphic3d_ArrayOfSegments(2);
+// clang-format off
aPrims->AddVertex(ElCLib::Value(ElCLib::Parameter(aCircleM,AttachPoint),aCircleM)); // mid point
+// clang-format on
aPrims->AddVertex(AttachPoint); // attach point to the geometry
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
}
for (Standard_Integer i = 2; i <= myInherit->Length(); i++)
{
Handle(Express_Entity) anEntity = myInherit->Value (i);
+// clang-format off
anOS << " Handle(" << anEntity->CPPName() << ") my" << anEntity->Name() << "; //!< supertype\n";
+// clang-format on
}
for (Standard_Integer i = 1; i <= myFields->Length(); i++)
{
// write method Share
Express::WriteMethodStamp (anOS, "Share");
std::ostringstream aStringOS;
+// clang-format off
Standard_Integer aNnFileds2 = writeRWShareCode (aStringOS, 1, Standard_True); // write code for filling graph of references
+// clang-format on
if (aRWCPPName.Length() < 40)
{
anOS << "void " << aRWCPPName << "::Share (const Handle(" << aCPPName << ")&" << ((aNnFileds2 > 1) ? "theEnt," : ",") << "\n";
Extrema_ExtElC anExtC(C, aCInt);
Standard_Boolean isExtremaCircCircValid = anExtC.IsDone() // Check if intersection is done
&& !anExtC.IsParallel() // Parallel case has already been considered
+// clang-format off
&& anExtC.NbExt() > 0; // Check that some solutions have been found
+// clang-format on
if (!isExtremaCircCircValid)
// not done
return;
//======================================================================================
{
Standard_Boolean Ok=Standard_True, End=Standard_False;
+// clang-format off
Standard_Real AngleMax = 0.7; // parameter regulating the function of increment ( 40 degrees )
+// clang-format on
Standard_Real AngleMin = 2*M_PI/100; // parameter regulating the function of increment
// full passage should not contain more than 100 steps.
Standard_Real DAngle1, DAngle2, DRho1, DRho2, Ratio, Fraction, Toler;
gp_Vec2d VOld(OldP1, OldP2), VNew( -(OldP1.XY()+DeltaP1.XY()) + (OldP2.XY()+DeltaP2.XY()) );
Standard_Real DAngleRef = VNew.Angle(VOld);
Standard_Real DAngle1 = DeltaAngle1 - DAngleRef,
+// clang-format off
DAngle2 = DAngleRef - DeltaAngle2; // Correction of Delta by the Delta induced by the points.
+// clang-format on
ADelta(1) = DeltaP1.XY();
struct Font_FTFontParams
{
unsigned int PointSize; //!< face size in points (1/72 inch)
+// clang-format off
unsigned int Resolution; //!< resolution of the target device in dpi for FT_Set_Char_Size()
Font_Hinting FontHinting; //!< request hinting (exclude FT_LOAD_NO_HINTING flag), Font_Hinting_Off by default;
//! hinting improves readability of thin text on low-resolution screen,
//! but adds distortions to original font depending on font family and font library version
bool ToSynthesizeItalic; //!< generate italic style (e.g. for font family having no italic style); FALSE by default
+// clang-format on
bool IsSingleStrokeFont; //!< single-stroke (one-line) font, FALSE by default
//! Empty constructor.
Image_PixMap myGlyphImg; //!< cached glyph plane
Standard_Utf32Char myUChar; //!< currently loaded unicode character
+// clang-format off
Standard_Boolean myToUseUnicodeSubsetFallback; //!< use default fallback fonts for extended Unicode sub-sets (Korean, CJK, etc.)
+// clang-format on
};
(LPBYTE )aPathBuff, &aPathSize) != ERROR_NO_MORE_ITEMS;
++anIter, aNameSize = aBufferSize, aPathSize = aBufferSize)
{
+// clang-format off
aPathBuff[(aPathSize < aBufferSize) ? aPathSize : (aBufferSize - 1)] = '\0'; // ensure string is NULL-terminated
+// clang-format on
TCollection_AsciiString aFontName (aNameBuff), aFontPath (aPathBuff);
if (aFontPath.Search ("\\") == -1)
{
aMaxLineWidth = Max (aMaxLineWidth, LineWidth (aLineIt));
}
+// clang-format off
aMaxLineWidth = Max (aMaxLineWidth, LineWidth (myNewLines.Size())); // processing the last line also
+// clang-format on
}
}
protected:
IterationFilter myFilter; //!< possibility to filter not-necessary symbols
+// clang-format off
NCollection_Utf8Iter myIter; //!< the next symbol iterator value over the text formatter string
Standard_Integer mySymbolPosition; //!< the current position
Standard_Utf32Char mySymbolChar; //!< the current symbol
Standard_Integer mySymbolNext; //!< position of the next symbol in iterator, if zero, the iterator is finished
+// clang-format on
Standard_Utf32Char mySymbolCharNext; //!< the current symbol
};
Graphic3d_HorizontalTextAlignment myAlignX; //!< horizontal alignment style
Graphic3d_VerticalTextAlignment myAlignY; //!< vertical alignment style
+// clang-format off
Standard_Integer myTabSize; //!< horizontal tabulation width (number of space symbols)
Standard_ShortReal myWrappingWidth; //!< text is wrapped by the width if defined (more 0)
Standard_Boolean myIsWordWrapping; //!< if TRUE try not to break words when wrapping text (true by default)
Standard_ShortReal myLastSymbolWidth; //!< width of the last symbol
Standard_ShortReal myMaxSymbolWidth; //!< maximum symbol width of the formatter string
+// clang-format on
protected: //! @name input data
myCorners; //!< The bottom left corners of a formatted rectangles.
NCollection_Vector<Standard_ShortReal>
myNewLines; //!< position at LF
+// clang-format off
Standard_ShortReal myLineSpacing; //!< line spacing (computed as maximum of all fonts involved in text formatting)
Standard_ShortReal myAscender; //!< line spacing for the first line
bool myIsFormatted; //!< formatting state
protected: //! @name temporary variables for formatting routines
Standard_Integer myLinesNb; //!< overall (new)lines number (including splitting by width limit)
+// clang-format on
Standard_Integer myRectLineStart; //!< id of first rectangle on the current line
Standard_Integer myNewLineNb;
TheSame1(NbrSol) = 0;
gp_Dir2d dc(center1.XY()-Center.XY());
if (qualifier1(NbrSol) == GccEnt_enclosed)
+// clang-format off
dc.Reverse(); // if tangent circle is inside the source circle, moving to edge of source circle
+// clang-format on
pnttg1sol(NbrSol)=gp_Pnt2d(Center.XY()+Radius(k1)*dc.XY());
par1sol(NbrSol)=ElCLib::Parameter(cirsol(NbrSol),
pnttg1sol(NbrSol));
TheSame1(NbrSol) = 0;
gp_Dir2d dc(center1.XY()-Center.XY());
if (qualifier1(NbrSol) == GccEnt_enclosed)
+// clang-format off
dc.Reverse(); // if tangent circle is inside the source circle, moving to edge of source circle
+// clang-format on
pnttg1sol(NbrSol)=gp_Pnt2d(Center.XY()+Radius(nbsol3)*dc.XY());
par1sol(NbrSol)=ElCLib::Parameter(cirsol(NbrSol), pnttg1sol(NbrSol));
pararg1(NbrSol)=ElCLib::Parameter(C1,pnttg1sol(NbrSol));
PreLast,First,
Standard_True,
Standard_True)<GeomAbs_C0)
+// clang-format off
throw Standard_ConstructionError("Geom2dConvert curves not C0") ; //renvoi d'une erreur
+// clang-format on
else{
if (Continuity(ArrayOfCurves(i-1),
ArrayOfCurves(i),
}
else
+// clang-format off
for (i=0;i<=nb_group-1;i++){ //boucle principale sur chaque groupe de
nb_vertexG1=0; //continuite interne G1
else{
Geom2dConvert_CompCurveToBSplineCurve C(ArrayOfConcatenated->Value(i));
fusion=C.Add(Curve1,ArrayOfToler(j-1)); //fusion de deux courbes adjacentes
+// clang-format on
if (fusion==Standard_False)
throw Standard_ConstructionError("Geom2dConvert Concatenation Error") ;
ArrayOfConcatenated->SetValue(i,C.BSplineCurve());
Standard_True,
ArrayOfToler(i-1),
AngularTolerance)<GeomAbs_C0)
+// clang-format off
throw Standard_ConstructionError("Geom2dConvert curves not C0") ; //renvoi d'une erreur
+// clang-format on
else{
if (Continuity(ArrayOfCurves(i-1),
ArrayOfCurves(i),
}
else
+// clang-format off
for (i=0;i<=nb_group-1;i++){ //boucle principale sur chaque groupe de
+// clang-format on
nb_vertexG1=0; //continuite interne G1
while (((index+nb_vertexG1)<=nb_curve-2)&&(tabG1(index+nb_vertexG1)==Standard_True))
ArrayOfIndices->SetValue(k,nb_vertex_group0+1);
}
+// clang-format off
for (j=index;j<=index+nb_vertexG1;j++){ //boucle secondaire a l'interieur de chaque groupe
+// clang-format on
if (NeedToBeTreated(ArrayOfCurves(j)))
Curve1=MultNumandDenom(Hermit::Solution(ArrayOfCurves(j)),ArrayOfCurves(j));
else
ArrayOfConcatenated->SetValue(i,Curve1);
else{
Geom2dConvert_CompCurveToBSplineCurve C (ArrayOfConcatenated->Value(i));
+// clang-format off
fusion=C.Add(Curve1,ArrayOfToler(j-1)); //fusion de deux courbes adjacentes
+// clang-format on
if (fusion==Standard_False)
throw Standard_ConstructionError("Geom2dConvert Concatenation Error") ;
ArrayOfConcatenated->SetValue(i,C.BSplineCurve());
mutable Handle(BSplSLib_Cache) mySurfaceCache; ///< Cached data for B-spline or Bezier surface
GeomAbs_SurfaceType mySurfaceType;
+// clang-format off
Handle(GeomEvaluator_Surface) myNestedEvaluator; ///< Calculates values of nested complex surfaces (offset surface, surface of extrusion or revolution)
+// clang-format on
};
#endif // _GeomAdaptor_Surface_HeaderFile
gp_Vec Vec1,Vec2; //consecutive tangential vectors
gp_Pnt Pint;
Handle(Geom_BSplineCurve) Curve1,Curve2;
+// clang-format off
TColStd_Array1OfBoolean tabG1(0,nb_curve-2); //array of the G1 continuity at the intersections
+// clang-format on
TColStd_Array1OfReal local_tolerance(0,
ArrayOfToler.Length()-1) ;
}
else
+// clang-format off
for (i=0;i<=nb_group-1;i++){ //principal loop on each G1 continuity
+// clang-format on
nb_vertexG1=0; //group
while (((index+nb_vertexG1)<=nb_curve-2)&&(tabG1(index+nb_vertexG1)==Standard_True))
ArrayOfConcatenated->SetValue(i,Curve1);
else{
GeomConvert_CompCurveToBSplineCurve C (ArrayOfConcatenated->Value(i));
+// clang-format off
fusion=C.Add(Curve1,ArrayOfToler(j-1)); //merge of two consecutive curves
+// clang-format on
if (fusion==Standard_False)
throw Standard_ConstructionError("GeomConvert Concatenation Error") ;
ArrayOfConcatenated->SetValue(i,C.BSplineCurve());
gp_Vec Vec1,Vec2; //consecutive tangential vectors
gp_Pnt Pint;
Handle(Geom_BSplineCurve) Curve1,Curve2;
+// clang-format off
TColStd_Array1OfBoolean tabG1(0,nb_curve-2); //array of the G1 continuity at the intersections
+// clang-format on
TColStd_Array1OfReal local_tolerance(0,
ArrayOfToler.Length()-1) ;
}
else
+// clang-format off
for (i=0;i<=nb_group-1;i++){ //principal loop on each G1 continuity
+// clang-format on
nb_vertexG1=0; //group
while (((index+nb_vertexG1)<=nb_curve-2)&&(tabG1(index+nb_vertexG1)==Standard_True))
BS->Knots(BSKnots);
BS->Multiplicities(BSMults);
+// clang-format off
for (i=BS->FirstUKnotIndex() ;i<=(BS->LastUKnotIndex()-1);i++){ //give the number of C1 curves
+// clang-format on
if (BSMults(i)==BS->Degree())
nbcurveC1++;
}
case IntPatch_Restriction:
{
Handle(IntPatch_RLine) rlin = Handle(IntPatch_RLine)::DownCast(L);
+// clang-format off
return (rlin->HasFirstPoint()? rlin->FirstPoint().ParameterOnLine() : -Precision::Infinite()); // a voir selon le type de la ligne 2d
+// clang-format on
}
case IntPatch_Walking:
case IntPatch_Restriction:
{
Handle(IntPatch_RLine) rlin = Handle(IntPatch_RLine)::DownCast(L);
+// clang-format off
return (rlin->HasLastPoint()? rlin->LastPoint().ParameterOnLine() : Precision::Infinite()); // a voir selon le type de la ligne 2d
+// clang-format on
}
case IntPatch_Walking:
if(found) {
// check point
+// clang-format off
Standard_Real aCriteria =aTolSum;// BRep_Tool::Tolerance(theFace1) + BRep_Tool::Tolerance(theFace2);
//GeomAPI_ProjectPointOnSurf& aProjector = (surfit == 0) ? aPrj2 : aPrj1;
+// clang-format on
ProjectPointOnSurf& aProjector = (surfit == 0) ? aPrj2 : aPrj1;
Handle(GeomAdaptor_Surface) aSurface = (surfit == 0) ? theSurface1 : theSurface2;
return Standard_False;
else {
lambda=(BSurf->Weight(1,1)/BSurf->Weight(BSurf->NbUPoles(),1));
+// clang-format off
for (i=1;i<=BSurf->NbVPoles();i++) //test of the proportionnality of the denominator on the boundaries
+// clang-format on
if ((BSurf->Weight(1,i)/(lambda*BSurf->Weight(BSurf->NbUPoles(),i))<(1-Precision::Confusion()))||
(BSurf->Weight(1,i)/(lambda*BSurf->Weight(BSurf->NbUPoles(),i))>(1+Precision::Confusion())))
return Standard_False;
gp_Vec NormVec = Pln.Axis().Direction();
NormVec = (aVec * NormVec) * NormVec;
+// clang-format off
ElSLib::Parameters( Pln, myPts->Value(i).Translated( -NormVec ), U, V ); //????? Real projecting?
+// clang-format on
if (U > myUmax)
myUmax = U;
if (U < myUmin)
Handle( Geom_Surface ) InitPlane =
(Handle( Geom_RectangularTrimmedSurface )::DownCast(mySurfInit))->BasisSurface();
+// clang-format off
Standard_Real Ratio = 0., R1 = 2., R2 = 0.6; //R1 = 3, R2 = 0.5;//R1 = 1.4, R2 = 0.8; //R1 = 5., R2 = 0.2;
+// clang-format on
Handle( GeomAdaptor_Surface ) hsur =
new GeomAdaptor_Surface( InitPlane );
Standard_Integer NbPoint = 20;
OffsetC->Init( BaseCurve, 1,voident, 0, 0, (start->Offset()/GetUnit()), 0.,
(start->Offset()/GetUnit()), 0.,
+// clang-format off
start->Direction().XYZ().Reversed(), U1, U2); //%11 pdn 12.01.99 // valeur (0,0,1) pour l'instant
+// clang-format on
res = OffsetC;
return res;
//
aLowBorder(1) = u1;
aUppBorder(1) = u2;
+// clang-format off
aSteps(1) =(aUppBorder(1) - aLowBorder(1)) * 0.01; // Run PSO on even distribution with 100 points.
//
GCPnts_DistFunction aFunc1(theCurve, u1, u2);
GCPnts_DistFunctionMV aFunc(aFunc1);
math_PSO aFinder(&aFunc, aLowBorder, aUppBorder, aSteps); // Choose 32 best points from 100 above.
+// clang-format on
aFinder.Perform(aSteps, aValue, aT);
Standard_Real d = 0.;
protected:
Graphic3d_BufferRange myInvalidatedRange; //!< invalidated buffer data range (as byte offsets)
+// clang-format off
Standard_Boolean myIsInterleaved; //!< flag indicating the vertex attributes being interleaved
+// clang-format on
Standard_Boolean myIsMutable; //!< flag indicating that data can be invalidated
};
//! Vertex attribute definition.
struct Graphic3d_Attribute
{
+// clang-format off
Graphic3d_TypeOfAttribute Id; //!< attribute identifier in vertex shader, 0 is reserved for vertex position
+// clang-format on
Graphic3d_TypeOfData DataType; //!< vec2,vec3,vec4,vec4ub
Standard_Integer Stride() const { return Stride (DataType); }
public:
+// clang-format off
Standard_Integer Stride; //!< the distance to the attributes of the next vertex within interleaved array
Standard_Integer NbElements; //!< number of the elements (@sa NbMaxElements() specifying the number of initially allocated number of elements)
+// clang-format on
Standard_Integer NbAttributes; //!< number of vertex attributes
};
private:
+// clang-format off
NCollection_IndexedMap<const Graphic3d_CStructure*> myStructs; //!< Indexed map of structures.
+// clang-format on
};
Quantity_ColorRGBA myColor; //!< light color
Graphic3d_Vec4 myDirection; //!< direction of directional/spot light
Graphic3d_Vec4 myParams; //!< packed light parameters
+// clang-format off
Standard_ShortReal mySmoothness; //!< radius for point light or cone angle for directional light
+// clang-format on
Standard_ShortReal myIntensity; //!< intensity multiplier for light
const Graphic3d_TypeOfLightSource myType; //!< Graphic3d_TypeOfLightSource enumeration
Standard_Size myRevision; //!< modification counter
Handle(TopLoc_Datum3D) myTrsf;
Handle(Graphic3d_TransformPers) myTrsfPers;
Handle(Graphic3d_SequenceOfHClipPlane) myClipPlanes;
+// clang-format off
Handle(Graphic3d_PresentationAttributes) myHighlightStyle; //! Current highlight style; is set only if highlight flag is true
Standard_Integer myId;
unsigned stick : 1; //!< displaying state - should be set when structure has been added to scene graph (but can be in hidden state)
unsigned highlight : 1;
unsigned visible : 1; //!< visibility flag - can be used to suppress structure while leaving it in the scene graph
+// clang-format on
unsigned HLRValidation : 1;
unsigned IsForHighlight : 1;
unsigned IsMutable : 1;
const Graphic3d_TypeOfAnswer anAnswer = acceptDisplay (aStructIter.Key()->Visual());
if (anAnswer == Graphic3d_TOA_COMPUTE)
{
+// clang-format off
aStructsSeq.Append (aStructIter.Key()); // if the structure was calculated, it is recalculated
+// clang-format on
}
}
NCollection_Sequence<Handle(Graphic3d_CView)> mySubviews; //!< list of child views
Graphic3d_CView* myParentView; //!< back-pointer to the parent view
+// clang-format off
Standard_Boolean myIsSubviewComposer; //!< flag to skip rendering of viewer contents
Aspect_TypeOfTriedronPosition mySubviewCorner; //!< position within parent view
Graphic3d_Vec2i mySubviewTopLeft; //!< subview top-left position relative to parent view
Graphic3d_Vec2i mySubviewMargins; //!< subview margins in pixels
Graphic3d_Vec2d mySubviewSize; //!< subview size
Graphic3d_Vec2d mySubviewOffset; //!< subview corner offset within parent view
+// clang-format on
Handle(Graphic3d_StructureManager) myStructureManager;
Handle(Graphic3d_Camera) myCamera;
Graphic3d_TypeOfBackfacingModel myBackfacing;
Graphic3d_TypeOfVisualization myVisualization;
+// clang-format off
Graphic3d_ZLayerId myZLayerTarget; //!< ZLayerId for redrawing the content of specific zlayers.
Standard_Boolean myZLayerRedrawMode; //!< If true redraws single layer, otherwise redraws group of layers.
+// clang-format on
Quantity_ColorRGBA myBgColor;
Handle(Graphic3d_TextureMap) myBackgroundImage;
Standard_Boolean myToUpdateSkydome;
Handle(Aspect_XRSession) myXRSession;
+// clang-format off
Handle(Graphic3d_Camera) myBackXRCamera; //!< camera projection parameters to restore after closing XR session (FOV, aspect and similar)
Handle(Graphic3d_Camera) myBaseXRCamera; //!< neutral camera orientation defining coordinate system in which head tracking is defined
Handle(Graphic3d_Camera) myPosedXRCamera; //!< transient XR camera orientation with tracked head orientation applied (based on myBaseXRCamera)
Handle(Graphic3d_Camera) myPosedXRCameraCopy; //!< neutral camera orientation copy at the beginning of processing input
Standard_Real myUnitFactor; //!< unit scale factor defined as scale factor for m (meters)
+// clang-format on
};
Aspect_FrustumLRBT<Standard_Real> myCustomFrustumL; //!< left custom frustum
Aspect_FrustumLRBT<Standard_Real> myCustomFrustumR; //!< right custom frustum
Standard_Boolean myIsCustomProjMatM; //!< flag indicating usage of custom projection matrix
+// clang-format off
Standard_Boolean myIsCustomProjMatLR; //!< flag indicating usage of custom stereo projection matrices
+// clang-format on
Standard_Boolean myIsCustomFrustomLR; //!< flag indicating usage of custom stereo frustums
mutable TransformMatrices<Standard_Real> myMatricesD;
Graphic3d_Vec2i TotalSize; //!< total size of the View area, in pixels
Graphic3d_Vec2i TileSize; //!< size of the Tile, in pixels
+// clang-format off
Graphic3d_Vec2i Offset; //!< the lower-left corner of the Tile relative to the View area (or upper-left if IsTopDown is true), in pixels
bool IsTopDown; //!< indicate the offset coordinate system - lower-left (default) or top-down
+// clang-format on
public:
private:
Handle(Graphic3d_AspectFillArea3d) myAspect; //!< fill area aspect
+// clang-format off
Handle(Graphic3d_ClipPlane) myNextInChain; //!< next plane in a chain of planes defining logical AND operation
Graphic3d_ClipPlane* myPrevInChain; //!< previous plane in a chain of planes defining logical AND operation
TCollection_AsciiString myId; //!< resource id
Graphic3d_Vec4d myEquation; //!< plane equation vector
Graphic3d_Vec4d myEquationRev; //!< reversed plane equation
Standard_Integer myChainLenFwd; //!< chain length in forward direction (including this item)
+// clang-format on
unsigned int myFlags; //!< capping flags
unsigned int myEquationMod; //!< modification counter for equation
unsigned int myAspectMod; //!< modification counter of aspect
protected:
Graphic3d_CubeMapSide myCurrentSide; //!< Iterator state
+// clang-format off
Standard_Boolean myEndIsReached; //!< Indicates whether end of iteration has been reached or hasn't
Standard_Boolean myZIsInverted; //!< Indicates whether Z axis is inverted that allows to synchronize vertical flip of cubemap
+// clang-format on
};
// for caching clip points projections onto viewing area normals once per traverse
// ORDER: LEFT, RIGHT, BOTTOM, TOP, NEAR, FAR
+// clang-format off
Standard_Real myMaxClipProjectionPts[PlanesNB]; //!< Max view volume's vertices projections onto its normals
Standard_Real myMinClipProjectionPts[PlanesNB]; //!< Min view volume's vertices projections onto its normals
// ORDER: E0, E1, E2
Standard_Real myMaxOrthoProjectionPts[3]; //!< Max view volume's vertices projections onto normalized dimensions of AABB
Standard_Real myMinOrthoProjectionPts[3]; //!< Min view volume's vertices projections onto normalized dimensions of AABB
+// clang-format on
Standard_Boolean myIsProjectionParallel;
{
const Standard_Integer aValWidth = 5;
std::stringstream aBuf;
+// clang-format off
const Standard_Boolean isCompact = theFlags == Graphic3d_RenderingParams::PerfCounters_FrameRate; // only FPS is displayed
+// clang-format on
const Graphic3d_FrameStatsData& aStats = LastDataFrame();
if (myIsLongLineFormat
&& (theFlags & Graphic3d_RenderingParams::PerfCounters_FrameRate) != 0
Standard_Real myFrameStartTime; //!< time at the beginning of frame redraw
Standard_Real myFrameDuration; //!< frame duration
Standard_Real myUpdateInterval; //!< interval to update meters
+// clang-format off
Standard_Size myFpsFrameCount; //!< FPS counter (within short measurement time slice)
NCollection_Array1<Graphic3d_FrameStatsData> myCounters; //!< data frames history
Graphic3d_FrameStatsDataTmp myCountersTmp; //!< data frame values filled to be filled between FrameStart() and FrameEnd() calls
Graphic3d_FrameStatsData myCountersMax; //!< data frame values with absolute maximum values in the history
Standard_Integer myLastFrameIndex; //!< last data frame index
Standard_Boolean myIsLongLineFormat; //!< prefer longer lines over greater number of lines
+// clang-format on
};
protected:
+// clang-format off
MinMaxValuesCallback myCubicAxesCallback; //!< Callback function to define boundary box of displayed objects
TCollection_AsciiString myNamesFont; //!< Font name of names of axes: Courier, Arial, ...
Font_FontAspect myNamesStyle; //!< Style of names of axes: OSD_FA_Regular, OSD_FA_Bold,..
+// clang-format on
Standard_Integer myNamesSize; //!< Size of names of axes: 8, 10,..
protected:
}
const Standard_Boolean isBigObject = (Abs (aConvertedMaxX - aConvertedMinX) > 2.0) // width of zoom pers. object greater than width of window
+// clang-format off
|| (Abs (aConvertedMaxY - aConvertedMinY) > 2.0); // height of zoom pers. object greater than height of window
+// clang-format on
const Standard_Boolean isAlreadyInScreen = (aConvertedMinX > -1.0 && aConvertedMinX < 1.0)
&& (aConvertedMaxX > -1.0 && aConvertedMaxX < 1.0)
&& (aConvertedMinY > -1.0 && aConvertedMinY < 1.0)
protected:
NCollection_IndexedDataMap<Handle(Graphic3d_CLight), Standard_Size>
+// clang-format off
myLights; //!< list of light sources with their cached state (revision)
Graphic3d_Vec4 myAmbient; //!< cached value of cumulative ambient color
TCollection_AsciiString myKeyEnabledLong; //!< key identifying the list of enabled light sources by their type
Standard_Integer myLightTypesEnabled[Graphic3d_TypeOfLightSource_NB]; //!< counters per each light source type enabled in the list
Standard_Integer myNbEnabled; //!< number of enabled light sources, excluding ambient
Standard_Integer myNbCastShadows; //!< number of enabled light sources casting shadows
+// clang-format on
Standard_Size myRevision; //!< current revision of light source set
Standard_Size myCacheRevision; //!< revision of cached state
};
TCollection_AsciiString myImageId; //!< resource identifier
TCollection_AsciiString myImageAlphaId; //!< resource identifier
+// clang-format off
Handle(TColStd_HArray1OfByte) myBitMap; //!< bytes array with bitmap definition (for compatibility with old code)
Handle(Image_PixMap) myImage; //!< full-color marker definition
Handle(Image_PixMap) myImageAlpha; //!< alpha-color marker definition (for dynamic hi-lighting)
Standard_Integer myMargin; //!< extra margin from boundaries for bitmap -> point sprite conversion, 1 px by default
+// clang-format on
Standard_Integer myWidth; //!< marker width
Standard_Integer myHeight; //!< marker height
Standard_ShortReal TransparencyCoef;
Standard_ShortReal RefractionIndex;
Standard_ShortReal Shininess;
+// clang-format off
Standard_ShortReal AmbientCoef; //!< coefficient for Graphic3d_MaterialAspect::SetColor()
Standard_ShortReal DiffuseCoef; //!< coefficient for Graphic3d_MaterialAspect::SetColor()
+// clang-format on
Graphic3d_TypeOfMaterial MaterialType;
Graphic3d_NameOfMaterial MaterialName;
Standard_Real myDuration; //!< stream duration
Standard_Integer myFront; //!< index of front texture
Standard_Boolean myToPresentFrame; //!< flag
+// clang-format off
Standard_Boolean myIsPlanarYUV; //!< front frame contains planar YUV data or native texture format
Standard_Boolean myIsFullRangeYUV; //!< front frame defines full-range or reduced-range YUV
+// clang-format on
};
public: //! @name general parameters
+// clang-format off
Graphic3d_RenderingMode Method; //!< specifies rendering mode, Graphic3d_RM_RASTERIZATION by default
Graphic3d_TypeOfShadingModel ShadingModel; //!< specified default shading model, Graphic3d_TypeOfShadingModel_Phong by default
Graphic3d_RenderTransparentMethod TransparencyMethod; //!< specifies rendering method for transparent graphics
Standard_Boolean ToShowStats; //!< display performance statistics, FALSE by default;
//! note that counters specified within CollectedStats will be updated nevertheless
//! of visibility of widget managed by ToShowStats flag (e.g. stats can be retrieved by application for displaying using other methods)
+// clang-format on
};
EOL" float aQuadArea = abs (aSideB.x * aSideC.y - aSideB.y * aSideC.x);"
EOL" vec3 aLenABC = vec3 (length (aSideA), length (aSideB), length (aSideC));"
EOL" vec3 aHeightABC = vec3 (aQuadArea) / aLenABC;"
+// clang-format off
EOL" aHeightABC = max (aHeightABC, vec3 (10.0 * occLineWidth));" // avoid shrunk presentation disappearing at distance
+// clang-format on
EOL" float aQuadModeHeightC = occIsQuadMode ? occLineWidth + 1.0 : 0.0;";
}
Standard_Boolean myHasFlatShading; //!< flag indicating flat shading usage
Standard_Boolean myToReverseDFdxSign; //!< flag to reverse flat shading normal (workaround)
Standard_Boolean mySetPointSize; //!< always set gl_PointSize variable
+// clang-format off
Standard_Boolean myUseRedAlpha; //!< use RED channel instead of ALPHA (e.g. GAPI supports only GL_RED textures and not GL_ALPHA)
+// clang-format on
Standard_Boolean myToEmulateDepthClamp; //!< emulate depth clamping in GLSL program
Standard_Boolean mySRgbState; //!< track sRGB state
Graphic3d_ShaderObjectList myShaderObjects; //!< the list of attached shader objects
Graphic3d_ShaderVariableList myVariables; //!< the list of custom uniform variables
Graphic3d_ShaderAttributeList myAttributes; //!< the list of custom vertex attributes
+// clang-format off
TCollection_AsciiString myHeader; //!< GLSL header with version code and used extensions
Standard_Integer myNbLightsMax; //!< length of array of light sources (THE_MAX_LIGHTS)
Standard_Integer myNbShadowMaps; //!< length of array of shadow maps (THE_NB_SHADOWMAPS)
Standard_Boolean myHasDefSampler; //!< flag indicating that program defines default texture sampler occSampler0
Standard_Boolean myHasAlphaTest; //!< flag indicating that Fragment Shader performs alpha test
Standard_Boolean myIsPBR; //!< flag indicating that program defines functions and variables used in PBR pipeline
+// clang-format on
};
private:
+// clang-format off
Graphic3d_Vec4 myGenPlaneS; //!< texture coordinates generation plane S
Graphic3d_Vec4 myGenPlaneT; //!< texture coordinates generation plane T
Graphic3d_Vec2 myScale; //!< texture coordinates scale factor vector; (1,1) by default
Standard_ShortReal myRotAngle; //!< texture coordinates rotation angle in degrees, 0 by default
Standard_Boolean myToModulate; //!< flag to modulate texture with material color, FALSE by default
Standard_Boolean myToRepeat; //!< flag to repeat (true) or wrap (false) texture coordinates out of [0,1] range
+// clang-format on
};
protected:
Handle(Graphic3d_TextureParams) myParams; //!< associated texture parameters
+// clang-format off
TCollection_AsciiString myTexId; //!< unique identifier of this resource (for sharing graphic resource); should never be modified outside constructor
Handle(Image_PixMap) myPixMap; //!< image pixmap - as one of the ways for defining the texture source
OSD_Path myPath; //!< image file path - as one of the ways for defining the texture source
Standard_Boolean myIsColorMap; //!< flag indicating color nature of values within the texture
Standard_Boolean myIsTopDown; //!< Stores rows's memory layout
Standard_Boolean myHasMipmaps; //!< Indicates whether mipmaps should be generated or not
+// clang-format on
};
Handle(Graphic3d_Camera) aProxyCamera = theCamera;
if (IsOrthoPers() && !aProxyCamera->IsOrthographic())
{
+// clang-format off
aProxyCamera = new Graphic3d_Camera(*theCamera); // If OrthoPers, copy camera and set to orthographic projection
+// clang-format on
aProxyCamera->SetProjectionType (Graphic3d_Camera::Projection_Orthographic);
}
TCollection_AsciiString myName; //!< user-provided name
Handle(Graphic3d_LightSet) myLights; //!< lights list
Handle(TopLoc_Datum3D) myOriginTrsf; //!< transformation to the origin
+// clang-format off
gp_XYZ myOrigin; //!< the origin of all objects within the layer
Standard_Real myCullingDistance; //!< distance to discard objects
Standard_Real myCullingSize; //!< size to discard objects
Standard_Boolean myToEnableDepthWrite; //!< option to enable write depth values
Standard_Boolean myToClearDepth; //!< option to clear depth values before drawing the layer
Standard_Boolean myToRenderInDepthPrepass;//!< option to render layer within depth pre-pass
+// clang-format on
};
class TableauRejection {
public:
+// clang-format off
Standard_Real **UV; //-- UV[i][j] contient le param (U sur Ci) de l intersection de Ci avec C(IndUV[j])
+// clang-format on
Standard_Integer **IndUV; //-- IndUV[i][j] = J0 -> Intersection entre i et J0
Standard_Integer *nbUV; //-- nbUV[i][j] nombre de valeurs pour la ligne i
Standard_Integer N;
if (st != TopAbs_OUT) {
if (Tr2->PositionOnCurve() != IntRes2d_Middle) { // correction de la transition sur myFE
+// clang-format off
if (mySameVertex) return Standard_True; // si intersection a une extremite verticale !
+// clang-format on
Standard_Boolean douteux = Standard_False;
Standard_Real psav = p2;
Standard_Real& theZ,
const Standard_Boolean theVPO) const
{
+// clang-format off
Standard_Real Xt = TMat[0][0] * theX + TMat[0][1] * theY + TMat[0][2] * theZ + (theVPO ? 0 : TLoc[0]);//OCC349
Standard_Real Yt = TMat[1][0] * theX + TMat[1][1] * theY + TMat[1][2] * theZ + (theVPO ? 0 : TLoc[1]);//OCC349
theZ = TMat[2][0] * theX + TMat[2][1] * theY + TMat[2][2] * theZ + (theVPO ? 0 : TLoc[2]);//OCC349
+// clang-format on
theX = Xt;
theY = Yt;
}
Standard_Real& theZ,
const Standard_Boolean theVPO) const
{
+// clang-format off
Standard_Real Xt = TTMa[0][0] * theX + TTMa[0][1] * theY + TTMa[0][2] * theZ + (theVPO ? 0 : TTLo[0]);//OCC349
Standard_Real Yt = TTMa[1][0] * theX + TTMa[1][1] * theY + TTMa[1][2] * theZ + (theVPO ? 0 : TTLo[1]);//OCC349
theZ = TTMa[2][0] * theX + TTMa[2][1] * theY + TTMa[2][2] * theZ + (theVPO ? 0 : TTLo[2]);//OCC349
+// clang-format on
theX = Xt;
theY = Yt;
}
Standard_Real& theZ,
const Standard_Boolean theVPO) const
{
+// clang-format off
Standard_Real Xt = TIMa[0][0] * theX + TIMa[0][1] * theY + TIMa[0][2] * theZ + (theVPO ? 0 : TILo[0]);//OCC349
Standard_Real Yt = TIMa[1][0] * theX + TIMa[1][1] * theY + TIMa[1][2] * theZ + (theVPO ? 0 : TILo[1]);//OCC349
theZ = TIMa[2][0] * theX + TIMa[2][1] * theY + TIMa[2][2] * theZ + (theVPO ? 0 : TILo[2]);//OCC349
+// clang-format on
theX = Xt;
theY = Yt;
}
void Closed (const Standard_Boolean flag) { ClosedPolygon = flag; }
+// clang-format off
Standard_Boolean Closed() const { return Standard_False; } // -- Voir si le cas Closed est traitable
+// clang-format on
//! Give the number of Segments in the polyline.
Standard_Integer NbSegments() const { return NbPntIn - 1; }
TColStd_Array1OfReal Knots(1,BS->NbKnots());
TColStd_Array1OfReal Weights(1,BS->NbPoles());
TColStd_Array1OfInteger Mults(1,BS->NbKnots());
+// clang-format off
Standard_Integer Degree,Index0,Index1; // denominateur value for u=0 & u=1
Standard_Real Denom0,Denom1, // denominator value for u=0 & u=1
Deriv0,Deriv1 ; // derivative denominator value for u=0 & 1
+// clang-format on
Standard_Boolean Periodic;
BS->Knots(Knots);
TColStd_Array1OfInteger Mults(1,BS->NbKnots());
Standard_Integer Degree,Index0,Index1;
Standard_Real Denom0,Denom1, // denominateur value for u=0 & u=1
+// clang-format off
Deriv0,Deriv1 ; // denominator value for u=0 & u=1
Standard_Boolean Periodic; // derivative denominatur value for u=0 & 1
+// clang-format on
BS->Knots(Knots);
BSplCLib::Reparametrize(0.0,1.0,Knots); //affinity on the nodal vector
{
// Standard_Integer i,index=0;
Standard_Integer i;
+// clang-format off
Standard_Real Max,Min; //intermediate value of max and min ordinates
min=0;max=0; //initialisation of the indices
Min=Poles(0).Y(); //initialisation of the intermediate value
+// clang-format on
Max=Poles(0).Y();
for (i=1;i<=(Poles.Length()-1);i++){
if (Poles(i).Y()<Min){
Standard_Integer index,i,
I1=0,I2=0,I3=0,I4=0; //knots index
TColgp_Array1OfPnt2d Polesinit(0,3) ;
+// clang-format off
Handle(TColStd_HArray1OfReal) Knots; //array of the BSpline knots + the ones inserted
Standard_Integer cas=0,mark=0,dercas=0, //loop marks
min,max; //Pole min and max indices
Standard_Real Us1,Us2,a; //boundaries value of the knots to be inserted
+// clang-format on
U4=0.0;U5=1.0; //default value
if (Ux!=1.0){
//sort of the array of knots
std::sort (knots.begin(), knots.end());
+// clang-format off
Polesinit(0).SetCoord(0.0,Herm(0)); //poles of the Hermite polynome in the BSpline form
+// clang-format on
Polesinit(1).SetCoord(0.0,Herm(0)+Herm(1)/3.0);
Polesinit(2).SetCoord(0.0,Herm(3)-Herm(2)/3.0);
Polesinit(3).SetCoord(0.0,Herm(3));
Standard_Integer index,i,
I1=0,I2=0,I3=0,I4=0; //knots index
TColgp_Array1OfPnt2d Polesinit(0,3) ;
+// clang-format off
Handle(TColStd_HArray1OfReal) Knots; //array of the BSpline knots + the ones inserted
Standard_Integer cas=0,mark=0,dercas=0, //loop marks
min,max; //Pole min and max indices
Standard_Real Us1,Us2,a; //boundaries value of the knots to be inserted
+// clang-format on
U4=0.0;U5=1.0; //default value
if (Ux!=1.0){
//sort of the array of knots
std::sort (knots.begin(), knots.end());
+// clang-format off
Polesinit(0).SetCoord(0.0,Herm(0)); //poles of the Hermite polynome in the BSpline form
+// clang-format on
Polesinit(1).SetCoord(0.0,Herm(0)+Herm(1)/3.0);
Polesinit(2).SetCoord(0.0,Herm(3)-Herm(2)/3.0);
Polesinit(3).SetCoord(0.0,Herm(3));
Standard_Integer zeroboucle = 0 ;
HermiteCoeff(BS,Herm); //computation of the Hermite coefficient
+// clang-format off
Poles(1).SetCoord(0.0,Herm(0)); //poles of the Hermite polynome in the BSpline form
Poles(2).SetCoord(0.0,Herm(0)+Herm(1)/3.0);
Poles(3).SetCoord(0.0,Herm(3)-Herm(2)/3.0);
Handle(Geom2d_BSplineCurve) BS2=new Geom2d_BSplineCurve(Poles,Knots,Multiplicities,3);//BSpline without modif
PolyTest(Herm,BS,Upos1,Upos2,zeroboucle,Precision::Confusion(),Precision::Confusion(),1.0,0.0);//computation of the positivity knots
+// clang-format on
InsertKnots(BS2,Upos1,Upos2); //and insertion
if (Upos1!=0.0)
Uy=Upos2;
}
+// clang-format off
Herm(0)=BS2->Pole(1).Y(); //computation of the Hermite coefficient on the
Herm(1)=3*(BS2->Pole(2).Y()-BS2->Pole(1).Y()); //positive BSpline
Herm(2)=3*(BS2->Pole(BS2->NbPoles()).Y()-BS2->Pole(BS2->NbPoles()-1).Y());
Herm(3)=BS2->Pole(BS2->NbPoles()).Y();
PolyTest(Herm,BS,Utol1,Utol2,boucle,TolPoles,TolKnots,Ux,Uy); //computation of the tolerance knots
+// clang-format on
InsertKnots(BS2,Utol1,Utol2); //and insertion
if (boucle==2){ //insertion of two knots
Standard_Integer zeroboucle = 0 ;
HermiteCoeff(BS,Herm); //computation of the Hermite coefficient
+// clang-format off
Poles(1).SetCoord(0.0,Herm(0)); //poles of the Hermite polynome in the BSpline form
Poles(2).SetCoord(0.0,Herm(0)+Herm(1)/3.0);
Poles(3).SetCoord(0.0,Herm(3)-Herm(2)/3.0);
Handle(Geom2d_BSplineCurve) BS2=new Geom2d_BSplineCurve(Poles,Knots,Multiplicities,3);//BSpline without modif
PolyTest(Herm,BS,Upos1,Upos2,zeroboucle,Precision::Confusion(),Precision::Confusion(),1.0,0.0);//computation of the positivity knots
+// clang-format on
InsertKnots(BS2,Upos1,Upos2); //and insertion
if (Upos1!=0.0)
Uy=Upos2;
}
+// clang-format off
Herm(0)=BS2->Pole(1).Y(); //computation of the Hermite coefficient on the
Herm(1)=3*(BS2->Pole(2).Y()-BS2->Pole(1).Y()); //positive BSpline
Herm(2)=3*(BS2->Pole(BS2->NbPoles()).Y()-BS2->Pole(BS2->NbPoles()-1).Y());
Herm(3)=BS2->Pole(BS2->NbPoles()).Y();
PolyTest(Herm,BS,Utol1,Utol2,boucle,TolPoles,TolKnots,Ux,Uy); //computation of the tolerance knots
+// clang-format on
InsertKnots(BS2,Utol1,Utol2); //and insertion
if (boucle==2){ //insertion of two knots
Standard_Integer zeroboucle = 0 ;
HermiteCoeff(BS,Herm); //computation of the Hermite coefficient
+// clang-format off
Poles(1).SetCoord(0.0,Herm(0)); //poles of the Hermite polynome in the BSpline form
Poles(2).SetCoord(0.0,Herm(0)+Herm(1)/3.0);
Poles(3).SetCoord(0.0,Herm(3)-Herm(2)/3.0);
//BSpline without modif
PolyTest(Herm,BS,Upos1,Upos2,zeroboucle,Precision::Confusion(),Precision::Confusion(),1.0,0.0);//computation of the positivity knots
+// clang-format on
InsertKnots(BS2,Upos1,Upos2); //and insertion
if (Upos1!=0.0)
Uy=Upos2;
}
+// clang-format off
Herm(0)=BS2->Pole(1).Y(); //computation of the Hermite coefficient on the
Herm(1)=3*(BS2->Pole(2).Y()-BS2->Pole(1).Y()); //positive BSpline
Herm(2)=3*(BS2->Pole(BS2->NbPoles()).Y()-BS2->Pole(BS2->NbPoles()-1).Y());
Herm(3)=BS2->Pole(BS2->NbPoles()).Y();
PolyTest(Herm,BS,Utol1,Utol2,boucle,TolPoles,TolKnots,Ux,Uy); //computation of the tolerance knots
+// clang-format on
InsertKnots(BS2,Utol1,Utol2); //and insertion
if (boucle==2){ //insertion of two knots
void IFSelect_WorkSession::TraceDumpModel
(const Standard_Integer mode)
{
+// clang-format off
Message_Messenger::StreamBuffer sout = Message::SendInfo(); // should it be changed to SendTrace()?
+// clang-format on
DumpModel (mode, sout);
// if (mode <= 4) { DumpModel (mode,sout); return; }
void IFSelect_WorkSession::TraceDumpEntity
(const Handle(Standard_Transient)& ent, const Standard_Integer level) const
{
+// clang-format off
Message_Messenger::StreamBuffer sout = Message::SendInfo(); // should it be changed to SendTrace()?
+// clang-format on
DumpEntity (ent, level, sout);
}
allNbResultDataLocs->SetValue (nume,nrl);
if (PR.ReadInts (PR.CurrentList(nrl), "Result data locations", rdrl))
allResultDataLoc->SetValue (nume,rdrl);
+// clang-format off
PR.ReadInteger (PR.Current(), "Nb. of result data locations", numv); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
if (PR.ReadReals (PR.CurrentList(numv), "Result Data", vres))
allResultData->SetValue(nume,vres);
}
Standard_Integer tempType;
Handle(TCollection_HAsciiString) tempName;
if (PR.DefinedElseSkip())
+// clang-format off
PR.ReadInteger(PR.Current(), "Number of data fields", tempNbData); //szv#4:S4163:12Mar99 `st=` not needed
else
tempNbData = 2;
PR.ReadInteger(PR.Current(), "Type of attached associativity",tempType); //szv#4:S4163:12Mar99 `st=` not needed
PR.ReadText(PR.Current(), "Name of attached associativity", tempName); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
DirChecker(ent).CheckTypeAndForm(PR.CCheck(),ent);
ent->Init(tempNbData, tempType, tempName);
}
//Standard_Boolean st; //szv#4:S4163:12Mar99 not needed
Handle(TCollection_HAsciiString) tempLibName;
Handle(TCollection_HAsciiString) tempExtRefEntitySymbName;
+// clang-format off
PR.ReadText(PR.Current(), "Name of Library", tempLibName); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
PR.ReadText(PR.Current(), "External Reference Symbolic Name",
tempExtRefEntitySymbName); //szv#4:S4163:12Mar99 `st=` not needed
if (st && num > 0) tempNames = new Interface_HArray1OfHAsciiString(1, num);
else PR.AddFail("Number of list entries: Not Positive");
if (!tempNames.IsNull())
+// clang-format off
PR.ReadTexts(PR.CurrentList(num), "External Reference Entity", tempNames); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
DirChecker(ent).CheckTypeAndForm(PR.CCheck(),ent);
ent->Init(tempNames);
Handle(TCollection_HAsciiString) tempName;
//Standard_Boolean st; //szv#4:S4163:12Mar99 not needed
+// clang-format off
PR.ReadInteger(PR.Current(),"Number of property values",tempNbPropertyValues); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
PR.ReadText(PR.Current(),"Name",tempName); //szv#4:S4163:12Mar99 `st=` not needed
DirChecker(ent).CheckTypeAndForm(PR.CCheck(),ent);
Handle(IGESData_HArray1OfIGESEntity) EntArray;
if (PR.ReadInteger( PR.Current(), "Count of Entities", nbval)) { //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format off
PR.ReadEnts (IR,PR.CurrentList(nbval),"Entities",EntArray); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
/*
EntArray = new IGESData_HArray1OfIGESEntity(1,nbval);
for (Standard_Integer i = 1;i <= nbval;i++)
Handle(IGESData_HArray1OfIGESEntity) EntArray;
if (PR.ReadInteger( PR.Current(), "Count of Entities", nbval)) { //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format off
PR.ReadEnts (IR,PR.CurrentList(nbval),"Entities",EntArray); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
/*
EntArray = new IGESData_HArray1OfIGESEntity(1,nbval);
for (Standard_Integer i = 1;i <= nbval;i++)
}
}
+// clang-format off
if (nbval > 0) PR.ReadEnts (IR,PR.CurrentList(nbval),Msg207,tempChildren); //szv#4:S4163:12Mar99 `st=` not needed
//st = PR.ReadEnts (IR,PR.CurrentList(nbval),"Child Entities",tempChildren);
+// clang-format on
DirChecker(ent).CheckTypeAndForm(PR.CCheck(),ent);
ent->Init(tempNbParentEntities,tempParent,tempChildren);
}
struct IGESCAFControl_InternalSection
{
// Common
+// clang-format off
ReadMode_BSplineContinuity ReadBSplineContinuity = ReadMode_BSplineContinuity_C1; //<! Manages the continuity of BSpline curves
ReadMode_Precision ReadPrecisionMode = ReadMode_Precision_File; //<! Reads the precision mode value
double ReadPrecisionVal = 0.0001; //<! ReadMode_Precision for shape construction (if enabled user mode)
WriteMode_PrecisionMode WritePrecisionMode = WriteMode_PrecisionMode_Average; //<! Specifies the mode of writing the resolution value into the IGES file
double WritePrecisionVal = 0.0001; //<! Resolution value for an IGES file when WriteMode_PrecisionMode is Greatest
WriteMode_PlaneMode WritePlaneMode = WriteMode_PlaneMode_Plane; //<! Flag to convert plane to the BSline
+// clang-format on
bool WriteOffsetMode = false; //<! Writing offset curves like BSplines
bool WriteColor = true; //<! ColorMode is used to indicate write Colors or not
bool WriteName = true; //<! NameMode is used to indicate write Name or not
if (!Result) {
mysewd->Clear();
if (okCurve3d && mysewd3d->NbEdges() > 0) {
+// clang-format off
Message_Msg Msg1070("IGES_1070");//"Representations in the file are inconsistent. Recomputation from 3d"
Msg1070.Arg(3);
myCS.SendWarning(myentity,Msg1070);
}
else if (okCurve2d && mysewd2d->NbEdges() > 0) {
Message_Msg Msg1070("IGES_1070");//"Representations in the file are inconsistent. Recomputation from 2d"
+// clang-format on
Msg1070.Arg(2);
myCS.SendWarning(myentity,Msg1070);
mysewd = mysewd2d;
Handle(ShapeExtend_WireData)& Gsewd)
{
Gsewd = new ShapeExtend_WireData;//local translation (for mysewd)
+// clang-format off
Handle(ShapeExtend_WireData) Gsewd3d = new ShapeExtend_WireData;//local translation (for mysewd3d)
Handle(ShapeExtend_WireData) Gsewd2d = new ShapeExtend_WireData;//local translation (for mysewd2d)
+// clang-format on
Standard_Boolean revsewd, revnextsewd;
Standard_Real distmin, precision = myCS.GetEpsGeom() * myCS.GetUnitFactor(), maxtol = myCS.GetMaxTol();
for(; aMapCountIter.More(); aMapCountIter.Next()) {
char mess[80];
sprintf(mess, aMapCountIter.Key().ToCString(), aMapCountIter.Value());
+// clang-format off
TF->SendInfo() << mess << std::endl; //dicoCountIter.Value() << dicoCountIter.Name() << std::endl;
+// clang-format on
}
break;
}
GS.SetEndMark (';');
GS.SetSendName (new TCollection_HAsciiString(Interface_Static::CVal("write.iges.header.product")));
GS.SetFileName (new TCollection_HAsciiString("Filename.iges"));
+// clang-format off
GS.SetSystemId (new TCollection_HAsciiString(XSTEP_SYSTEM_VERSION));//#58 rln "MATRA-DATAVISION EUCLID-QUANTUM"
+// clang-format on
GS.SetInterfaceVersion (gsys);
GS.SetIntegerBits ( IntegerSize() );
GS.SetMaxPower10Single ( RealLast10Exp() );
theDate.Nullify();
theResolution = 0.; theMaxCoord = 0.; hasMaxCoord = Standard_False;
theAuthorName.Nullify(); theCompanyName.Nullify();
+// clang-format off
theIGESVersion = 11;//3 //#66 rln Setting IGES 5.3 by default(To avoid misleading fails below)
+// clang-format on
theDraftingStandard = 0;
theCascadeUnit = UnitsMethods::GetCasCadeLengthUnit();
theLastChangeDate.Nullify(); // nouveaute 5.1 (peut etre absente)
Standard_Integer fn = ent->FormNumber();
if (PR.DefinedElseSkip())
+// clang-format off
PR.ReadText(PR.Current(), "Attribute Table Name", aName); //szv#4:S4163:12Mar99 `st=` not needed
PR.ReadInteger(PR.Current(), "Attribute List Type", aListType); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
Standard_Boolean st = PR.ReadInteger(PR.Current(), "Number of Attributes", nbval);
if (st && nbval > 0)
Handle(TColStd_HArray1OfInteger) tempTypes;
Handle(TColStd_HArray1OfTransient) tempValues;
+// clang-format off
PR.ReadInteger(PR.Current(), "Number of property values", tempNbPropVal); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
PR.ReadText(PR.Current(), "Property Name", tempName); //szv#4:S4163:12Mar99 `st=` not needed
PR.ReadText(PR.Current(), "MACRO", macro); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format off
PR.ReadInteger(PR.Current(), "Entity Type ID", entityTypeID); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
Standard_Integer tempCurrent = PR.CurrentNumber();
// Counting the no. of language statements.
//Standard_Boolean st; //szv#4:S4163:12Mar99 moved down
Standard_Integer i;
+// clang-format off
PR.ReadInteger(PR.Current(), "Number of Property values", nbProps); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
PR.ReadInteger(PR.Current(), "Property type", propType); //szv#4:S4163:12Mar99 `st=` not needed
"Type of independent variables", typesInd); //szv#4:S4163:12Mar99 `st=` not needed
PR.ReadInts(PR.CurrentList(nbIndeps),
+// clang-format off
"No. of values of independent variables", nbValuesInd); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
for (i=1; i<=nbIndeps; i++)
{
if (nbd > 0) somedeps = new TColStd_HArray1OfReal(1,nbd);
for (i = 1; i <= nbd; i ++) {
Standard_Real treal;
+// clang-format off
PR.ReadReal(PR.Current(), "Value of dependent variable", treal); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
somedeps->SetValue(i, treal);
}
if (nbDeps > 0) valuesDep->SetValue(1,somedeps);
STANDARD_TYPE(IGESDimen_GeneralNote), note); //szv#4:S4163:12Mar99 `st=` not needed
PR.ReadEntity (IR, PR.Current(), "First Witness Entity",
+// clang-format off
STANDARD_TYPE(IGESDimen_WitnessLine), firstWitness, Standard_True); //szv#4:S4163:12Mar99 `st=` not needed
PR.ReadEntity (IR,PR.Current(),"Second Witness Entity",
PR.ReadXY(PR.CurrentList(1, 2), "Vertex Point Co-ords", vertex); //szv#4:S4163:12Mar99 `st=` not needed
PR.ReadReal(PR.Current(), "Radius of Leader arcs", radius); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
PR.ReadEntity(IR, PR.Current(), "First Leader Entity",
STANDARD_TYPE(IGESDimen_LeaderArrow), firstLeader); //szv#4:S4163:12Mar99 `st=` not needed
gp_XY tempur;
gp_XY tempul;
+// clang-format off
PR.ReadInteger(PR.Current(),"Number of Property Values",nbPropVal); //szv#4:S4163:12Mar99 `st=` not needed
PR.ReadXY(PR.CurrentList(1, 2),"Lower Left Corner", templl); //szv#4:S4163:12Mar99 `st=` not needed
PR.ReadXY(PR.CurrentList(1, 2),"Lower Right Corner", templr); //szv#4:S4163:12Mar99 `st=` not needed
PR.ReadXY(PR.CurrentList(1, 2),"Upper Right Corner", tempur); //szv#4:S4163:12Mar99 `st=` not needed
PR.ReadXY(PR.CurrentList(1, 2),"Upper Left Corner", tempul); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
DirChecker(ent).CheckTypeAndForm(PR.CCheck(),ent);
ent->Init(nbPropVal, templl, templr, tempur, tempul);
Standard_Integer nbval;
Handle(TColgp_HArray1OfXY) dataPoints;
+// clang-format off
PR.ReadInteger(PR.Current(), "Interpretation Flag", datatype); //szv#4:S4163:12Mar99 `st=` not needed
Standard_Boolean st = PR.ReadInteger(PR.Current(), "Number of data points", nbval);
else PR.AddFail("Number of data points: Not Positive");
PR.ReadReal(PR.Current(), "Common Z Displacement", zDisplacement); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
if (! dataPoints.IsNull())
for (Standard_Integer i = 1; i <= nbval; i++)
PR.ReadEntity(IR, PR.Current(), "General Note Entity",
STANDARD_TYPE(IGESDimen_GeneralNote), note); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format off
PR.ReadEntity(IR, PR.Current(), "First Curve Entity", firstCurve); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
PR.ReadEntity(IR,PR.Current(),"Second Curve Entity",
secondCurve,Standard_True); //szv#4:S4163:12Mar99 `st=` not needed
STANDARD_TYPE(IGESDimen_LeaderArrow), secondLeader); //szv#4:S4163:12Mar99 `st=` not needed
PR.ReadEntity (IR, PR.Current(), "First Witness Entity",
+// clang-format off
STANDARD_TYPE(IGESDimen_WitnessLine), firstWitness, Standard_True); //szv#4:S4163:12Mar99 `st=` not needed
PR.ReadEntity (IR,PR.Current(),"Second Witness Entity",
STANDARD_TYPE(IGESDimen_WitnessLine), secondWitness, Standard_True); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
DirChecker(ent).CheckTypeAndForm(PR.CCheck(),ent);
ent->Init
STANDARD_TYPE(IGESDimen_LeaderArrow), firstLeader); //szv#4:S4163:12Mar99 `st=` not needed
PR.ReadEntity (IR,PR.Current(),"Second Leader Entity",
+// clang-format off
STANDARD_TYPE(IGESDimen_LeaderArrow), secondLeader, Standard_True); //szv#4:S4163:12Mar99 `st=` not needed
PR.ReadXY(PR.CurrentList(1, 2), "Arc Center Co-ords", center); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
DirChecker(ent).CheckTypeAndForm(PR.CCheck(),ent);
ent->Init(note, firstLeader, secondLeader, center);
PR.ReadInteger(PR.Current(),"Dimension Type", tempDimType);
PR.ReadInteger(PR.Current(),"Label Position", tempLabelPos);
if (PR.DefinedElseSkip())
+// clang-format off
PR.ReadInteger(PR.Current(),"Character Set", tempCharSet); //szv#4:S4163:12Mar99 `st=` not needed
else
tempCharSet = 1;
if (PR.DefinedElseSkip())
PR.ReadInteger(PR.Current(),"Text Place",tempTextPlace); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
else
tempTextPlace = 0;
Standard_Integer tempPrecision;
if (PR.DefinedElseSkip())
+// clang-format off
PR.ReadInteger(PR.Current(), "Number of properties", tempNbProps); //szv#4:S4163:12Mar99 `st=` not needed
else
tempNbProps = 8;
PR.ReadBoolean(PR.Current(), "Sign Suppression Flag",
tempSignSupFlag); //szv#4:S4163:12Mar99 `st=` not needed
PR.ReadInteger(PR.Current(), "Fraction Flag", tempFracFlag); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
PR.ReadInteger(PR.Current(), "Precision", tempPrecision); //szv#4:S4163:12Mar99 `st=` not needed
DirChecker(ent).CheckTypeAndForm(PR.CCheck(),ent);
Handle(TCollection_HAsciiString) tempFormatString;
if (PR.DefinedElseSkip())
+// clang-format off
PR.ReadInteger(PR.Current(), "Number of Properties", tempNbProps); //szv#4:S4163:12Mar99 `st=` not needed
else
tempNbProps = 6;
PR.ReadText(PR.Current(), "Format String", tempFormatString); //szv#4:S4163:12Mar99 `st=` not needed
PR.ReadInteger(PR.Current(), "Fraction Flag", tempFracFlag); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
PR.ReadInteger(PR.Current(), "Precision", tempPrecision); //szv#4:S4163:12Mar99 `st=` not needed
DirChecker(ent).CheckTypeAndForm(PR.CCheck(),ent);
Standard_Integer nbgeom = 0;
Handle(IGESData_HArray1OfIGESEntity) GeomEntities;
+// clang-format off
PR.ReadInteger(PR.Current(),"Number of Dimensions",tempNbDimen); //szv#4:S4163:12Mar99 `st=` not needed
PR.ReadInteger(PR.Current(),"number of entities",nbgeom); //szv#4:S4163:12Mar99 `st=` not needed
PR.ReadEntity(IR,PR.Current(),"Dimension Entity",aDimEntity); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
if (nbgeom > 0)
PR.ReadEnts (IR,PR.CurrentList(nbgeom),
Standard_Integer nbval;
Handle(IGESDimen_HArray1OfLeaderArrow) leaders;
+// clang-format off
PR.ReadXYZ (PR.CurrentList(1, 3), "Lower Left Corner Co-ords", lowerLeft); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
PR.ReadReal(PR.Current(), "Rotation Angle", angle); //szv#4:S4163:12Mar99 `st=` not needed
if (PR.DefinedElseSkip())
{
// Reading fontCode(Integer, must be positive)
+// clang-format off
PR.ReadInteger (PR.Current(), "Font Code", fontCode); //szv#4:S4163:12Mar99 `st=` not needed
// Reading fontEnt(TextFontDef) ?
+// clang-format on
if (fontCode < 0) {
fontEntity = GetCasted(IGESGraph_TextFontDef,PR.ParamEntity (IR,curnum));
if (fontEntity.IsNull()) PR.AddFail ("Font Entity : incorrect reference");
Standard_Boolean st = PR.ReadInteger(PR.Current(), "Number of Geometries", num);
if (!st || num <= 0) PR.AddFail("Number of Geometries: Not Positive");
if (num > 0) {
+// clang-format off
PR.ReadEnts (IR,PR.CurrentList(num),"Geometry Entities",tempGeoms); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
/*
tempGeoms = new IGESData_HArray1OfIGESEntity(1, num);
for ( i = 1; i <= num; i++)
STANDARD_TYPE(IGESDimen_LeaderArrow), secondLeader); //szv#4:S4163:12Mar99 `st=` not needed
PR.ReadEntity(IR, PR.Current(), "First Witness Entity",
+// clang-format off
STANDARD_TYPE(IGESDimen_WitnessLine), firstWitness, Standard_True); //szv#4:S4163:12Mar99 `st=` not needed
PR.ReadEntity(IR,PR.Current(),"Second Witness Entity",
STANDARD_TYPE(IGESDimen_WitnessLine), secondWitness, Standard_True); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
DirChecker(ent).CheckTypeAndForm(PR.CCheck(),ent);
ent->Init (note, firstLeader, secondLeader, firstWitness, secondWitness);
Handle(TColgp_HArray1OfXYZ) tempPoints;
if (PR.DefinedElseSkip())
+// clang-format off
PR.ReadInteger(PR.Current(), "Number of Dimensions", tempNbDimens); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
else
tempNbDimens = 1;
{
Handle(IGESData_IGESEntity) tempEnt;
//szv#4:S4163:12Mar99 `st=` not needed
+// clang-format off
PR.ReadEntity(IR, PR.Current(), "Geometry Entity", tempEnt, (i == num)); // The last one may be Null
tempGeomEnts->SetValue(i, tempEnt);
Standard_Integer tempInt;
PR.ReadInteger(PR.Current(), "Dimension Location Flag", tempInt); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
tempDimLocFlags->SetValue(i, tempInt);
gp_XYZ tempPnt;
if (PR.DefinedElseSkip())
{
// Reading fontCode(Integer, must be positive)
+// clang-format off
PR.ReadInteger(PR.Current(), "Character Set Interpretation Code",charSetCode); //szv#4:S4163:12Mar99 `st=` not needed
// Reading charSetEnt
+// clang-format on
if (charSetCode < 0) {
charSetEntity = PR.ParamEntity (IR,curnum);
if (charSetEntity.IsNull())
STANDARD_TYPE(IGESDimen_LeaderArrow), leadArr); //szv#4:S4163:12Mar99 `st=` not needed
if (PR.IsParamEntity(PR.CurrentNumber()))
+// clang-format off
PR.ReadEntity(IR, PR.Current(), "Enclosing entity", tempGeom); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
DirChecker(ent).CheckTypeAndForm(PR.CCheck(),ent);
ent->Init(tempNote, leadArr, tempGeom);
if (ent->FormNumber() == 1)
PR.ReadEntity(IR, PR.Current(), "Leader arrow 2",
+// clang-format off
STANDARD_TYPE(IGESDimen_LeaderArrow), leadArr2, Standard_True); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
DirChecker(ent).CheckTypeAndForm(PR.CCheck(),ent);
ent->Init(tempNote, leadArr, arcCenter, leadArr2);
Standard_Integer nbval;
Handle(TColgp_HArray1OfXY) dataPoints;
+// clang-format off
PR.ReadInteger(PR.Current(), "Interpretation Flag", datatype); //szv#4:S4163:12Mar99 `st=` not needed
Standard_Boolean st = PR.ReadInteger(PR.Current(), "Number of data points", nbval);
else PR.AddFail("Number of data points: Not Positive");
PR.ReadReal(PR.Current(), "Common Z Displacement", zDisplacement); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
if (! dataPoints.IsNull())
for (Standard_Integer i = 1; i <= nbval; i++)
PR.ReadReal(PR.Current(), "Distance between lines", tempDistance);
if (PR.DefinedElseSkip())
+// clang-format off
PR.ReadReal(PR.Current(), "Angle between line and X axis", tempAngle); //szv#4:S4163:12Mar99 `st=` not needed
else
tempAngle = M_PI / 4.0;
Standard_Boolean st = PR.ReadInteger(PR.Current(), "Number of island curves", nbislands);
if (st && nbislands > 0)
PR.ReadEnts (IR,PR.CurrentList(nbislands),"Island curves",tempIslands); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
/*
{
tempIslands = new IGESData_HArray1OfIGESEntity(1, nbislands);
Standard_Integer nbval;
Handle(TColgp_HArray1OfXY) dataPoints;
+// clang-format off
PR.ReadInteger(PR.Current(), "Interpretation Flag", datatype); //szv#4:S4163:12Mar99 `st=` not needed
Standard_Boolean st = PR.ReadInteger(PR.Current(), "Number of data points", nbval);
else PR.AddFail("Number of data points: Not Positive");
PR.ReadReal(PR.Current(), "Common Z Displacement", zDisplacement); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
if (! dataPoints.IsNull())
for (Standard_Integer i = 1; i <= nbval; i++)
Handle(IGESGraph_TextDisplayTemplate) tempFunctionTemplate;
Handle(IGESGraph_TextDisplayTemplate) tempIdentifierTemplate;
+// clang-format off
PR.ReadXYZ(PR.CurrentList(1, 3), "Connect Point Coordinate", tempPoint); //szv#4:S4163:12Mar99 `st=` not needed
PR.ReadEntity(IR, PR.Current(), "Display Symbol Geometry Entity",
PR.ReadInteger(PR.Current(), "Type Flag", tempTypeFlag); //szv#4:S4163:12Mar99 `st=` not needed
PR.ReadInteger(PR.Current(), "Function Flag", tempFunctionFlag); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
PR.ReadText(PR.Current(), "Function Identifier",
tempFunctionIdentifier); //szv#4:S4163:12Mar99 `st=` not needed
tempFunctionCode); //szv#4:S4163:12Mar99 `st=` not needed
if (PR.DefinedElseSkip())
+// clang-format off
PR.ReadInteger(PR.Current(), "Swap Flag", tempSwapFlag); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
else tempSwapFlag = 0; // default
PR.ReadEntity(IR, PR.Current(), "Owner Network Subfigure Entity",
//st = PR.ReadInteger(PR.Current(),"Count of array of Annotation entities", nbval); //szv#4:S4163:12Mar99 moved in if
if (PR.ReadInteger(PR.Current(),"Count of array of Annotation entities", nbval)) {
if ( nbval > 0 )
+// clang-format off
PR.ReadEnts (IR,PR.CurrentList(nbval), "Annotation Entities", annotations); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
/*
{
// Reading annotations(HArray1OfIGESEntity)
//st = PR.ReadInteger(PR.Current(), "Count of array of Annotation entities", nbval); //szv#4:S4163:12Mar99 moved in if
if (PR.ReadInteger(PR.Current(), "Count of array of Annotation entities", nbval)) {
if ( nbval > 0 )
+// clang-format off
PR.ReadEnts (IR,PR.CurrentList(nbval), "Annotation Entities", annotations); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
/*
{
// Reading annotations(HArray1OfIGESEntity)
// Reading definition(Instance of NetworkSubfigureDef)
PR.ReadEntity(IR, PR.Current(), "Instance of NetworkSubfigureDef",
+// clang-format off
STANDARD_TYPE(IGESDraw_NetworkSubfigureDef), definition); //szv#4:S4163:12Mar99 `st=` not needed
// Reading translation(XYZ)
PR.ReadXYZ( PR.CurrentList(1, 3), "Translation data", translation); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
// Reading scale(XYZ)
if (PR.DefinedElseSkip()) // Reading scale(X)
// Reading designator(String)
if (PR.DefinedElseSkip())
+// clang-format off
PR.ReadText(PR.Current(), "Primary reference designator", designator); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
else PR.AddWarning("Primary reference designator : Null definition");
// Reading textTemplate(Instance of TextDisplayTemplate or Null)
// Reading nbval(Integer)
if (PR.DefinedElseSkip())
+// clang-format off
st = PR.ReadInteger(PR.Current(),"Count of Connect Points", nbval); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
else nbval = 0;
if (st && nbval > 0)
{
if (tempNbEntities1 < 0)
PR.AddFail("Number Of Child Entities : Not Positive");
else if (tempNbEntities1 > 0)
+// clang-format off
PR.ReadEnts(IR,PR.CurrentList(tempNbEntities1),"Child Entities",tempEntities); //szv#4:S4163:12Mar99 `st=` not needed
// tempEntities = new IGESData_HArray1OfIGESEntity (1,tempNbEntities1);
+// clang-format on
}
// Read the HArray1 only if its Length was read without any Error
PR.ReadInteger(PR.Current(), "Type Flag", tempTypeFlag); //szv#4:S4163:12Mar99 `st=` not needed
if (PR.DefinedElseSkip())
+// clang-format off
PR.ReadText(PR.Current(), "Primary Reference Designator", tempDesignator); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
else PR.AddWarning("Primary Reference Designator : Null");
Standard_Boolean st = PR.ReadEntity(IR, PR.Current(), "Primary Reference Designator",
Standard_Real tempColumnSeparation, tempRowSeparation, tempRotationAngle;
Standard_Integer tempNbColumns, tempNbRows, tempDoDontFlag, tempListCount;
+// clang-format off
PR.ReadEntity(IR, PR.Current(), "Base Entity", tempBaseEntity); //szv#4:S4163:12Mar99 `st=` not needed
if (PR.DefinedElseSkip())
PR.ReadReal(PR.Current(), "Scale Factor", tempScaleFactor); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
else
tempScaleFactor = 1.0; // Setting to default value of 1.0
PR.AddFail("DO-DONT List Count : Less than Zero");
}
+// clang-format off
PR.ReadInteger(PR.Current(), "DO-DONT Flag", tempDoDontFlag); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
// Read the HArray1 only if its Length was read without any Error
if (! tempPositions.IsNull()) {
Standard_Integer curnum = PR.CurrentNumber();
// Reading Color : Value (>0) or Definition (<0 = D.E. Pointer)
+// clang-format off
PR.ReadInteger( PR.Current(), "array colorValues", tempColorValue); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
if (tempColorValue < 0) {
colorValues->SetValue(i, -1);
tempColorDef = GetCasted(IGESGraph_Color,PR.ParamEntity(IR,curnum));
curnum = PR.CurrentNumber();
// Reading Line Font : Value (>0) or Definition (<0 = D.E. Pointer)
+// clang-format off
PR.ReadInteger( PR.Current(), "array lineFontValues", tempLineFontValue ); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
if (tempLineFontValue < 0 ) {
lineFontValues->SetValue(i, -1);
tempLineFontDef = GetCasted(IGESData_LineFontEntity,
Handle(IGESGeom_Plane) tempLeftPlane, tempTopPlane, tempRightPlane;
Handle(IGESGeom_Plane) tempBottomPlane, tempBackPlane, tempFrontPlane;
+// clang-format off
PR.ReadInteger(PR.Current(), "View Number", tempViewNumber); //szv#4:S4163:12Mar99 `st=` not needed
if (PR.DefinedElseSkip())
PR.ReadEntity(IR, PR.Current(), "Front Side Of View Volume",
STANDARD_TYPE(IGESGeom_Plane), tempFrontPlane, Standard_True); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
DirChecker(ent).CheckTypeAndForm(PR.CCheck(),ent);
ent->Init
Standard_Integer curnum = PR.CurrentNumber();
// Reading Color : Value (>0) or Definition (<0 = D.E. Pointer)
if (PR.DefinedElseSkip())
+// clang-format off
PR.ReadInteger( PR.Current(), "Color Value", tempColorValue); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
else {
tempColorValue = 0;
PR.AddWarning ("Color Value : undefined, set to Zero");
Standard_Integer nbKnots = anIndex + aDegree + 2;
// Reading all the knot sequences
+// clang-format off
PR.ReadReals(PR.CurrentList(nbKnots), Msg103 , allKnots, -aDegree); //szv#4:S4163:12Mar99 `st=` not needed
//st = PR.ReadReals
Message_Msg Msg105("XSTEP_105");
PR.ReadReals(PR.CurrentList(anIndex+1), Msg104, allWeights,0); //szv#4:S4163:12Mar99 `st=` not needed
//st = PR.ReadReals(PR.CurrentList(anIndex+1), "Weights", allWeights,0);
+// clang-format on
for (Standard_Integer I = 0; I <= anIndex; I ++)
{
{
// allKnotsU = new TColStd_HArray1OfReal(-aDegU, anIndexU+1); done by :
Standard_Integer tempind = anIndexU+aDegU+2;
+// clang-format off
PR.ReadReals(PR.CurrentList(tempind), Msg103, allKnotsU, -aDegU); //szv#4:S4163:12Mar99 `st=` not needed
//st = PR.ReadReals(PR.CurrentList(tempind), "First knot sequence values", allKnotsU, -aDegU);
}
Standard_Integer tempind = anIndexV+aDegV+2;
PR.ReadReals(PR.CurrentList(tempind), Msg103, allKnotsV, -aDegV); //szv#4:S4163:12Mar99 `st=` not needed
//st = PR.ReadReals(PR.CurrentList(tempind), "Second knot sequence values", allKnotsV, -aDegV);
+// clang-format on
}
if ( FlagindexU && FlagindexV )
}
if (!tempSenses.IsNull() && !tempModelCurves.IsNull() && !tempParameterCurves.IsNull() ) {
+// clang-format off
for ( Standard_Integer i = 1; i <= num; i++ ) //szv#4:S4163:12Mar99 Standard_Integer moved in `for`
+// clang-format on
{
Handle(IGESData_IGESEntity) tempEnt;
//st = PR.ReadEntity(IR, PR.Current(), Msg127, tempEnt); //szv#4:S4163:12Mar99 moved in if
Handle(IGESData_HArray1OfIGESEntity) tempParCurves;
if (tempCount > 0){
Message_Msg Msg130("XTSEP_130");
+// clang-format off
PR.ReadEnts (IR,PR.CurrentList(tempCount), Msg130, tempParCurves); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
}
tempParameterCurves->SetValue(i, tempParCurves);
}
// st = PR.ReadInteger(PR.Current(), "Number of Components", num);
if (st && (num > 0)){
Message_Msg Msg80("XSTEP_80");
+// clang-format off
PR.ReadEnts (IR,PR.CurrentList(num),Msg80,tempEntities); //szv#4:S4163:12Mar99 `st=` not needed
//else st = PR.ReadEnts (IR,PR.CurrentList(num),"List of Components",tempEntities);
+// clang-format on
}
//if (st && num <= 0) PR.SendFail(Msg79);
else{
}
}
} //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format off
if (!PR.ReadEntity(IR, PR.Current(), aStatus, aCurve3D, Standard_True)){; //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
Message_Msg Msg133("XSTEP_133");
switch(aStatus) {
case IGESData_ReferenceError: {
aDim1 = aDim2 = aRotation = 0.; // default values
// Reading reference of flash
+// clang-format off
PR.ReadXY(PR.CurrentList(1, 2), "Reference of Flash", aPoint); //szv#4:S4163:12Mar99 `st=` not needed
// Reading first flash sizing parameter
// Reading the referenced entity
PR.ReadEntity(IR, PR.Current(), "Referenced entity", aReference); //szv#4:S4163:12Mar99 `st=` not needed
// "else" not necessary as this is the last field
+// clang-format on
DirChecker(ent).CheckTypeAndForm(PR.CCheck(),ent);
ent->Init (aPoint, aDim1, aDim2, aRotation, aReference);
allBreakPoints = new TColStd_HArray1OfReal (1, (nbSegments + 1));
}
Message_Msg Msg95("XSTEP_95");
+// clang-format off
PR.ReadReals(PR.CurrentList(nbSegments + 1), Msg95, allBreakPoints); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
/*
st = PR.ReadReals(PR.CurrentList(nbSegments + 1), "Break Points",
allBreakPoints);
if (!allUBreakPoints.IsNull()){
Message_Msg Msg143("XSTEP_143");
+// clang-format off
PR.ReadReals(PR.CurrentList(allNbUSegments+1), Msg143, allUBreakPoints); //szv#4:S4163:12Mar99 `st=` not needed
//st = PR.ReadReals(PR.CurrentList(allNbUSegments+1), "U Break Points", allUBreakPoints);
}
Message_Msg Msg144("XSTEP_144");
PR.ReadReals(PR.CurrentList(allNbVSegments+1), Msg144, allVBreakPoints); //szv#4:S4163:12Mar99 `st=` not needed
//st = PR.ReadReals(PR.CurrentList(allNbVSegments+1), "V Break Points", allVBreakPoints);
+// clang-format on
}
if (ubreak && vbreak)
{
// Reading levelNumbers(HArray1OfInteger)
// levelNumbers = new TColStd_HArray1OfInteger(1, nbval); done by :
+// clang-format off
PR.ReadInts(PR.CurrentList(nbval), "array levelNumbers", levelNumbers, 1); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
}
else PR.AddFail("No. of Property Values : Not Positive");
Standard_Real ySize;
// Reading nbPropertyValues(Integer)
+// clang-format off
PR.ReadInteger(PR.Current(), "No. of property values", nbPropertyValues); //szv#4:S4163:12Mar99 `st=` not needed
if (nbPropertyValues != 2)
PR.AddFail("No. of Property values : Value is not 2");
// Reading ySize(Real)
PR.ReadReal (PR.Current(), "Drawing extent along +ve YD axis", ySize); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
DirChecker(ent).CheckTypeAndForm(PR.CCheck(),ent);
ent->Init(nbPropertyValues, xSize, ySize);
Handle(TCollection_HAsciiString) unit;
// Reading nbPropertyValues(Integer)
+// clang-format off
PR.ReadInteger(PR.Current(), "No. of property values", nbPropertyValues); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
if (nbPropertyValues != 2)
PR.AddFail("No. of Property values : Value is not 2");
Standard_Real iSpace;
// Reading nbPropertyValues(Integer)
+// clang-format off
PR.ReadInteger(PR.Current(), "No. of property values", nbPropertyValues); //szv#4:S4163:12Mar99 `st=` not needed
if (nbPropertyValues != 1)
PR.AddFail("No. of Property values : Value is not 1");
// Reading iSpace(Real)
PR.ReadReal(PR.Current(), "Intercharacter space in % of text height", iSpace); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
DirChecker(ent).CheckTypeAndForm(PR.CCheck(),ent);
ent->Init(nbPropertyValues, iSpace);
}
}
+// clang-format off
PR.ReadText(PR.Current(), "Visible-Blank Display Pattern", tempDisplayPattern); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
DirChecker(ent).CheckTypeAndForm(PR.CCheck(),ent);
ent->Init(tempSegmentLengths, tempDisplayPattern);
Standard_Real tempDistance, tempScale;
Handle(IGESBasic_SubfigureDef) tempTemplateEntity;
+// clang-format off
PR.ReadInteger(PR.Current(), "Template Orientation", tempOrientation); //szv#4:S4163:12Mar99 `st=` not needed
PR.ReadEntity(IR, PR.Current(),
tempDistance); //szv#4:S4163:12Mar99 `st=` not needed
PR.ReadReal(PR.Current(), "Scale Factor For Subfigure", tempScale); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
DirChecker(ent).CheckTypeAndForm(PR.CCheck(),ent);
ent->Init (tempOrientation, tempTemplateEntity, tempDistance, tempScale);
Standard_Integer lineFontPatternCode;
// Reading nbPropertyValues(Integer)
+// clang-format off
PR.ReadInteger(PR.Current(), "No. of property values", nbPropertyValues); //szv#4:S4163:12Mar99 `st=` not needed
if (nbPropertyValues != 1)
PR.AddFail("No. of Property values : Value is not 1");
// Reading lineFontPatternCode(Integer)
PR.ReadInteger(PR.Current(), "Line Font Pattern Code", lineFontPatternCode); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
DirChecker(ent).CheckTypeAndForm(PR.CCheck(),ent);
ent->Init(nbPropertyValues, lineFontPatternCode);
Handle(TCollection_HAsciiString) standardName;
// Reading nbPropertyValues(Integer)
+// clang-format off
PR.ReadInteger(PR.Current(), "No. of property values", nbPropertyValues); //szv#4:S4163:12Mar99 `st=` not needed
if ( (nbPropertyValues != 2) && (nbPropertyValues != 3) )
PR.AddFail("No. of Property values : Value is not 2/3");
// Reading nominalSizeName(String)
PR.ReadText (PR.Current(), "Nominal size name", nominalSizeName); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
if ( PR.NbParams() >= PR.CurrentNumber() )
{
gp_XYZ corner;
// Reading boxWidth(Real)
+// clang-format off
PR.ReadReal(PR.Current(), "Character box width", boxWidth); //szv#4:S4163:12Mar99 `st=` not needed
// Reading boxHeight(Real)
PR.ReadReal(PR.Current(), "Character box height", boxHeight); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
Standard_Integer curnum = PR.CurrentNumber();
if (PR.DefinedElseSkip())
slantAngle = M_PI/2.0; // Default Value
// Reading rotationAngle(Real)
+// clang-format off
PR.ReadReal (PR.Current(), "Rotation Angle", rotationAngle); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
// Reading mirrorFlag(Integer)
PR.ReadInteger (PR.Current(), "Mirror Flag", mirrorFlag); //szv#4:S4163:12Mar99 `st=` not needed
// Reading supersededEntity(TextFontDef)
PR.ReadEntity (IR, PR.Current(), "Text Definition Entity",
+// clang-format off
STANDARD_TYPE(IGESGraph_TextFontDef), supersededEntity); //szv#4:S4163:12Mar99 `st=` not needed
}
else
// Reading scale(Integer)
PR.ReadInteger(PR.Current(), "Grid units eqvt to one text height", scale); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
// Reading nbval(Integer)
Standard_Boolean st = PR.ReadInteger(PR.Current(), "No. of characters in this defn", nbval);
case 7 : if (uncar != '.') return Standard_False; break;
case 8 : if (uncar < '0' || uncar > '2') return Standard_False; break;
case 9 : if (uncar < '0' || uncar > '9') return Standard_False;
+// clang-format off
if (dizheur == '2' && (uncar < '0' || uncar > '3')) return Standard_False; //szv#4:S4163:12Mar99 extra break
+// clang-format on
break;
case 10 : if (uncar < '0' || uncar > '5') return Standard_False; break;
case 11 : if (uncar < '0' || uncar > '9') return Standard_False; break;
Standard_Real tempreal;
//Standard_Boolean st; //szv#4:S4163:12Mar99 not needed
+// clang-format off
PR.ReadXYZ(PR.CurrentList(1, 3), "Size of Block", tempSize); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
if (PR.DefinedElseSkip())
{
for (Standard_Integer i = 3; i < length; i++)
{
Standard_Integer curnum = PR.CurrentNumber();
+// clang-format off
PR.ReadInteger(PR.Current(), "Operation code", intvalue); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
if (intvalue < 0) {
entvalue = PR.ParamEntity (IR,curnum);
if (entvalue.IsNull()) PR.AddFail("Operand : incorrect reference");
PR.ReadReal(PR.Current(), "Larger face radius", tempR1); //szv#4:S4163:12Mar99 `st=` not needed
if (PR.DefinedElseSkip())
+// clang-format off
PR.ReadReal(PR.Current(), "Smaller face radius", tempR2); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
else
tempR2 = 0.0;
Standard_Real tempreal;
//Standard_Boolean st; //szv#4:S4163:12Mar99 not needed
+// clang-format off
PR.ReadXYZ(PR.CurrentList(1, 3), "Size of RightAngularWedge", tempSize); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
PR.ReadReal(PR.Current(), "Small X length", lowX); //szv#4:S4163:12Mar99 `st=` not needed
PR.ReadEntity(IR, PR.Current(), "Boolean Tree Entity",
STANDARD_TYPE(IGESSolid_BooleanTree), tempEntity); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format off
PR.ReadXYZ(PR.CurrentList(1, 3), "Select Point", tempSelectPoint); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
DirChecker(ent).CheckTypeAndForm(PR.CCheck(),ent);
ent->Init(tempEntity, tempSelectPoint);
Handle(IGESData_IGESEntity) tempEntity;
//Standard_Boolean st; //szv#4:S4163:12Mar99 not needed
+// clang-format off
PR.ReadEntity(IR, PR.Current(), "Solid Entity", tempEntity); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
DirChecker(ent).CheckTypeAndForm(PR.CCheck(),ent);
ent->Init(tempEntity);
Standard_Real tempreal;
//Standard_Boolean st; //szv#4:S4163:12Mar99 not needed
+// clang-format off
PR.ReadEntity(IR, PR.Current(), "Curve Entity", tempEntity); //szv#4:S4163:12Mar99 `st=` not needed
PR.ReadReal(PR.Current(), "Length of extrusion", tempLength); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
if (PR.DefinedElseSkip())
{
Standard_Real tempreal;
//Standard_Boolean st; //szv#4:S4163:12Mar99 not needed
+// clang-format off
PR.ReadEntity(IR, PR.Current(), "Curve Entity", tempEntity); //szv#4:S4163:12Mar99 `st=` not needed
if (PR.DefinedElseSkip())
PR.ReadReal(PR.Current(), "Fraction of rotation", tempFraction); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
else
tempFraction = 1.0;
if (PR.DefinedElseSkip())
PR.ReadReal(PR.Current(), "Minor Radius", minRad); //szv#4:S4163:12Mar99 `st=` not needed
if (ent->FormNumber() == 1) // Parametrised surface
+// clang-format off
PR.ReadEntity(IR, PR.Current(), "Reference direction", tempRefdir); //szv#4:S4163:12Mar99 `st=` not needed
+// clang-format on
DirChecker(ent).CheckTypeAndForm(PR.CCheck(),ent);
ent->Init (tempCenter, tempAxis, majRad, minRad, Handle(IGESGeom_Direction)::DownCast (tempRefdir));
B.Add(E,V1);
V2.Orientation(TopAbs_REVERSED);
B.Add(E,V2);
+// clang-format off
B.UpdateVertex(V1, first, E, 0.);//S4054 1.001 * dist1f //:77 GetEpsGeom()*GetUnitFactor();
B.UpdateVertex(V2, last, E, 0.);//S4054 1.001 * dist2l //:77 GetEpsGeom()*GetUnitFactor();
+// clang-format on
B.Range (E, first, last);
}
// modif mjm du 13/10/97 : Reverse de l`edge ?
B.Add(E,V1);
V2.Orientation(TopAbs_REVERSED);
B.Add(E,V2);
+// clang-format off
B.UpdateVertex(V1, last, E, 0.);//S4054 1.001 * dist1l //:77 GetEpsGeom()*GetUnitFactor();
B.UpdateVertex(V2, first, E, 0.);//S4054 1.001 * dist2f //:77 GetEpsGeom()*GetUnitFactor();
B.Range (E, first, last);
else if (Sh.ShapeType() == TopAbs_WIRE) {
// pas traite
Message_Msg Msg1325("IGES_1325"); //"Item %d of EdgeList cannot be represented by single edge (non-continuous or composite curve)."
+// clang-format on
Msg1325.Arg(inum);
SendWarning(start,Msg1325);
AddShapeResult(start,Sh);
TopoDS_Shape Sh = TransferEdge(thelist,indexlist);
if (Sh.IsNull())
{
+// clang-format off
continue; // skip non-translated edge hoping for the best; warning is already generated by TransferEdge()
+// clang-format on
}
curve3d->Add(Sh);
}
if (!st->IsClosed()) {
+// clang-format off
gp_Elips2d elips = Handle(Geom2d_Ellipse)::DownCast(res)->Elips2d();//#45 rln (frame, majorRadius, minorRadius);
+// clang-format on
t1 = ElCLib::Parameter(elips, startPoint);
t2 = ElCLib::Parameter(elips, endPoint);
if (st->TransformedAxis().IsOpposite (st->Axis(), GetEpsilon()))
res->Reverse();
+// clang-format off
gp_Hypr2d hpr = Handle(Geom2d_Hyperbola)::DownCast(res)->Hypr2d();//#45 rln (frame, majorRadius, minorRadius);
+// clang-format on
t1 = ElCLib::Parameter(hpr, startPoint);
t2 = ElCLib::Parameter(hpr, endPoint);
if (!st->TransformedAxis().IsParallel /*#45 rln 23.11.98 IsEqual*/(st->Axis(), GetEpsilon())) {
SetModeTransfer(Standard_True); // Only not to use Trsf
Message_Msg msg1165("IGES_1165");
+// clang-format off
SendWarning(st, msg1165); //"The Trsf is not compatible with a transfer2d, it will not applied."
+// clang-format on
}
if (!GetModeTransfer() && st->HasTransf()) {
Handle(ShapeExtend_WireData)& Gsewd)
{
Gsewd = new ShapeExtend_WireData;//local translation (for mysewd)
+// clang-format off
Handle(ShapeExtend_WireData) Gsewd3d = new ShapeExtend_WireData;//local translation (for mysewd3d)
Handle(ShapeExtend_WireData) Gsewd2d = new ShapeExtend_WireData;//local translation (for mysewd2d)
+// clang-format on
Standard_Boolean GTranslate3d = Standard_True, GTranslate2d = Standard_True,
Preferred3d = Standard_True, Preferred2d = Standard_True;
//added by rln 26/12/97 CSR# UKI60028 entity 3117
if (i > 1 && IgesEnt == start->Curve (i-1)) {
// char mess[80];
+// clang-format off
Message_Msg Msg1045("IGES_1045"); //"The entities of the CompositeCurve are the same: %d & %d"
+// clang-format on
Msg1045.Arg(i);
SendWarning(start,Msg1045);
//sprintf (mess, "The entities of the CompositeCurve are the same: %d & %d", i-1, i);
revsewd, revnextsewd);
if (isConnected) {
if (revsewd) {
+// clang-format off
Message_Msg Msg1051("IGES_1051"); //"All curvAll curves %dd before rank %d have been to be reversed."
+// clang-format on
Msg1051.Arg((is2d ? 2 : 3));
Msg1051.Arg(i);
SendWarning(start,Msg1051);
geomSupport = BRep_Tool::Surface (TopoDS::Face(res));
if (geomSupport->Continuity() == GeomAbs_C0) {
Message_Msg msg1266("IGES_1266");
+// clang-format off
SendFail(st, msg1266);//Basis surface is C0-continuous and cannot be corrected to C1-continuous.
+// clang-format on
res.Nullify();
return res;
}
virtual ~IVtkTools_DisplayModeFilter();
protected:
+// clang-format off
IVtk_DisplayMode myDisplayMode; //!< Display mode defining mesh types to pass through this filter
IVtk_IdTypeMap myModesDefinition[2];
bool myDoDisplaySharedVertices;
bool myDrawFaceBoundaries; //!< Draw Face boundaries within shading display mode
bool myIsSmoothShading; //!< include vertex normals for smooth shading or not
+// clang-format on
};
#ifdef _MSC_VER
theDst->GetPointData()->SetNormals (aNewNormals);
}
+// clang-format off
vtkSmartPointer<vtkIdList> aPntMap = vtkSmartPointer<vtkIdList>::New(); // maps old pt ids into new
+// clang-format on
aPntMap->SetNumberOfIds (aNbPts);
for (vtkIdType i = 0; i < aNbPts; ++i)
{
case Image_Format_RGB: return GUID_WICPixelFormat24bppRGB;
case Image_Format_BGR: return GUID_WICPixelFormat24bppBGR;
case Image_Format_Gray: return GUID_WICPixelFormat8bppGray;
+// clang-format off
case Image_Format_Alpha: return GUID_WICPixelFormat8bppGray; // GUID_WICPixelFormat8bppAlpha
+// clang-format on
case Image_Format_Gray16: return GUID_WICPixelFormat16bppGray;
case Image_Format_GrayF: // GUID_WICPixelFormat32bppGrayFloat
case Image_Format_AlphaF:
Standard_Integer mySizeY; //!< surface height
Image_Format myBaseFormat; //!< base (uncompressed) pixel format
Image_CompressedFormat myFormat; //!< compressed format
+// clang-format off
Standard_Boolean myIsCompleteMips; //!< flag indicating complete mip map level set (up to 1x1 resolution)
+// clang-format on
};
Handle(Image_PixMap) myImageRef; //!< reference image to compare (from)
Handle(Image_PixMap) myImageNew; //!< new image to compare (to)
+// clang-format off
Standard_Real myColorTolerance; //!< tolerance for equality check (0..1, 0 - any not equal, 1 - opposite colors)
Standard_Boolean myIsBorderFilterOn; //!< perform algorithm with border effect filter
+// clang-format on
//! coordinates of different pixels, packed in one int using 16-bit integers to save memory
NCollection_Vector<Standard_Integer> myDiffPixels;
case Image_Format_GrayF:
{
const Standard_ShortReal& aPixel = *reinterpret_cast<const Standard_ShortReal*> (theRawValue);
+// clang-format off
return Quantity_ColorRGBA (NCollection_Vec4<float> (aPixel, aPixel, aPixel, 1.0f)); // opaque
+// clang-format on
}
case Image_Format_AlphaF:
{
case Image_Format_RGBF:
{
const Image_ColorRGBF& aPixel = *reinterpret_cast<const Image_ColorRGBF*> (theRawValue);
+// clang-format off
return Quantity_ColorRGBA (NCollection_Vec4<float> (aPixel.r(), aPixel.g(), aPixel.b(), 1.0f)); // opaque
}
case Image_Format_BGRF:
{
const Image_ColorBGRF& aPixel = *reinterpret_cast<const Image_ColorBGRF*> (theRawValue);
return Quantity_ColorRGBA (NCollection_Vec4<float> (aPixel.r(), aPixel.g(), aPixel.b(), 1.0f)); // opaque
+// clang-format on
}
case Image_Format_GrayF_half:
{
const uint32_t m = (theHalf & 0x03FF) << 13; // mantissa
FloatUint32 mf, aRes;
mf.Float32 = (float )m;
+// clang-format off
const uint32_t v = mf.UInt32 >> 23; // evil log2 bit hack to count leading zeros in denormalized format
aRes.UInt32 = (theHalf & 0x8000)<<16 | (e != 0) * ((e + 112) << 23 | m) | ((e == 0) & (m != 0)) * ((v - 37) << 23 | ((m << (150 - v)) & 0x007FE000)); // sign : normalized : denormalized
+// clang-format on
return aRes.Float32;
}
union FloatUint32 { float Float32; uint32_t UInt32; };
FloatUint32 anInput;
anInput.Float32 = theFloat;
+// clang-format off
const uint32_t b = anInput.UInt32 + 0x00001000; // round-to-nearest-even: add last bit after truncated mantissa
const uint32_t e = (b & 0x7F800000) >> 23; // exponent
const uint32_t m = b & 0x007FFFFF; // mantissa; in line below: 0x007FF000 = 0x00800000-0x00001000 = decimal indicator flag - initial rounding
return (uint16_t)((b & 0x80000000) >> 16 | (e > 112) * ((((e - 112) << 10) & 0x7C00) | m >> 13)
| ((e < 113) & (e > 101)) * ((((0x007FF000 + m) >> (125 - e)) + 1) >> 1) | (e > 143) * 0x7FFF); // sign : normalized : denormalized : saturate
+// clang-format on
}
protected:
protected:
+// clang-format off
Standard_Byte* myTopRowPtr; //!< pointer to the topmost row (depending on scanlines order in memory)
+// clang-format on
public:
protected:
NCollection_Array1<bool> myFormats; //!< list of supported formats
+// clang-format off
Standard_Boolean myHasCompressed; //!< flag indicating that some compressed image formats are supported
+// clang-format on
};
|| aCodecCtx->codec == avcodec_find_encoder_by_name ("libx264"))
{
// use CRF (Constant Rate Factor) as best single-pass compressing method
+// clang-format off
av_dict_set (&anOptions, "crf", "20", 0); // quality 18-28, 23 is default (normal), 18 is almost lossless
av_dict_set (&anOptions, "preset", "slow", 0); // good compression (see also "veryslow", "ultrafast")
+// clang-format on
// live-capturing
//av_dict_set (&anOptions, "qp", "0", 0); // instead of crf
//! Please refer to FFmpeg documentation for defining text values.
struct Image_VideoParams
{
+// clang-format off
TCollection_AsciiString Format; //!< [optional] video format (container), if empty - will be determined from the file name
TCollection_AsciiString VideoCodec; //!< [optional] codec identifier, if empty - default codec from file format will be used
TCollection_AsciiString PixelFormat; //!< [optional] pixel format, if empty - default codec pixel format will be used
+// clang-format on
Standard_Integer Width; //!< [mandatory] video frame width
Standard_Integer Height; //!< [mandatory] video frame height
Standard_Integer FpsNum; //!< [mandatory] framerate numerator
const Standard_Real aPIpPI = M_PI + M_PI,
anEpsAng = 1.e-8,
InternalPrecision = 1.e-8; //precision of internal algorithm of values computation
+// clang-format off
constexpr Standard_Real aSqTolPrecision = Precision::SquareConfusion(); //for boundary points to check their coincidence with others
+// clang-format on
Standard_Real aTheta = 0.0;
//
lpnt[0].SetValue(XS,YS,u,ang);
}
else { // 2 points d intersection
+// clang-format off
Standard_Real h, XS1,YS1, XS2,YS2, ang1,ang2, u1,u2;//,cost,sint angt;
+// clang-format on
nbp=2;
h=Sqrt(C.Radius()*C.Radius()-d*d);
//modified by NIZNHY-PKV Fri Jun 15 09:55:47 2007f
void Closed (const Standard_Boolean flag) { ClosedPolygon = flag; }
+// clang-format off
Standard_Boolean Closed() const { return Standard_False; } // -- Voir si le cas Closed est traitable
+// clang-format on
//! Give the number of Segments in the polyline.
Standard_Integer NbSegments() const { return NbPntIn - 1; }
{
if(VTXM1.IsVertexOnS1())
{
+// clang-format off
kill=Standard_True; //-- OnS2 == OnS2 OnS1 == OnS1 Vtx PasVtx
}
else
{
killm1=Standard_True; //-- OnS2 == OnS2 OnS1 == OnS1 PasVtx Vtx
+// clang-format on
}
}
}
situC2 = IntSurf_Outside;
if (aR1 > aR2)
{ // Intersection line parametrizes from Apex1 to Apex2,
+// clang-format off
situC1 = IntSurf_Outside; // So the distance between ptbid and aLAx1 is greater than the
+// clang-format on
situC2 = IntSurf_Inside; // distance between ptbid and aLAx2 and in that case Cone2
// is inside Cone 1
}
Standard_Integer i=1,nbvtx;
Standard_Real firstp,lastp;
+// clang-format off
Standard_Real Tol = Precision::PConfusion()*100.; // JMB le 13 Jan 2000. Report de la correction du PRO19653
+// clang-format on
GeomAbs_SurfaceType typs1 = mySurf1->GetType();
GeomAbs_SurfaceType typs2 = mySurf2->GetType();
//-- std::cout<<"WLine : firtsp="<<firstp<<" lastp="<<lastp<<" Vtx:"<<i<<","<<i+1<<std::endl;
TabIndex[i]=TabIndex[i+1]=++numline;
AddLine(L,i,i+1,typs1,typs2,TabIndex,slin);
+// clang-format off
TestWLineToRLine(slinref,slin,mySurf1,myDom1,mySurf2,myDom2,TolArc); //-- on teste la derniere entree de slin
+// clang-format on
}
} //end of if (in1 != TopAbs_OUT && in2 != TopAbs_OUT)
} //end of if(firstp!=lastp && !IsSegmentSmall(WLine,i,i+1/*,TolArc*/))
// Dans le cas d une ligne de cheminement, il faudrait voir la projection
// et le calcul de la tangente.
+// clang-format off
Handle(IntPatch_RLine) rlin (Handle(IntPatch_RLine)::DownCast (L)); //-- aucune verification n est
+// clang-format on
Handle(IntPatch_WLine) wlin (Handle(IntPatch_WLine)::DownCast (L)); //-- faite au cast.
gp_Pnt ptbid;
gp_Vec d1u,d1v;
Standard_Integer i,j,k;
TColgp_SequenceOfPnt locpt;
TColgp_SequenceOfPnt2d locpt2;
+// clang-format off
Handle(IntPatch_RLine) rlin (Handle(IntPatch_RLine)::DownCast (L)); //-- aucune verification n est
+// clang-format on
Handle(IntPatch_WLine) wlin (Handle(IntPatch_WLine)::DownCast (L)); //-- faite au cast.
Standard_Integer Nbvtx =0;
Standard_Real tolPLin = Surf->UResolution(Precision::Confusion());
// Inputs
Handle(Adaptor3d_Surface) mySurf1; //!< First surface
Handle(Adaptor3d_Surface) mySurf2; //!< Second surface
+// clang-format off
Standard_Integer myNbSU1; //!< Number of samples in U direction for first surface
Standard_Integer myNbSV1; //!< Number of samples in V direction for first surface
Standard_Integer myNbSU2; //!< Number of samples in U direction for second surface
Standard_Integer myNbSV2; //!< Number of samples in V direction for second surface
// Results
+// clang-format on
Standard_Boolean myIsDone; //!< State of the operation
IntPolyh_ArrayOfSectionLines mySectionLines; //!< Section lines
IntPolyh_ArrayOfTangentZones myTangentZones; //!< Tangent zones
NCollection_DataMap<TopoDS_Shape, IntTools_SurfaceRangeLocalizeData*, TopTools_ShapeMapHasher> myProjSDataMap;
NCollection_DataMap<TopoDS_Shape, Bnd_Box*, TopTools_ShapeMapHasher> myBndBoxDataMap;
NCollection_DataMap<TopoDS_Shape, BRepAdaptor_Surface*, TopTools_ShapeMapHasher> mySurfAdaptorMap;
+// clang-format off
NCollection_DataMap<TopoDS_Shape, Bnd_OBB*, TopTools_ShapeMapHasher> myOBBMap; // Map of oriented bounding boxes
+// clang-format on
Standard_Integer myCreateFlag;
Standard_Real myPOnSTolerance;
DPc = Param(i)-Uvp[im1]; //-- Current - Previous
DPb = Uvf[im1]-Uvp[im1]; //-- Bound Sup - Previous
ParC[im1] = Uvf[im1]; //-- Param Corrige
+// clang-format off
dv = Param(k)-Uvp[k-1]; //-- Current - Previous (other Direction)
+// clang-format on
dv2 = dv*dv;
if(dv2>RealEpsilon()) { //-- Progress in other Direction ?
Duv[im1] = DPc*DPb + dv2;
void Interface_Check::Trace(const Standard_Integer level,
const Standard_Integer final) const
{
+// clang-format off
Message_Messenger::StreamBuffer sout = Message::SendInfo(); // shouldn't it be changed to SendTrace()?
+// clang-format on
Print (sout, level, final);
}
// Attention : la recuperation peut elle-meme planter ... (cf ierr)
catch (Standard_Failure const& anException) {
// Au passage suivant, on attaquera le record suivant
+// clang-format off
num0 = thereader->FindNextRecord(num); //:g9 abv 28 May 98: tr8_as2_ug.stp - infinite cycle: (0);
+// clang-format on
#ifdef _WIN32
if (anException.IsKind(STANDARD_TYPE(OSD_Exception))) ierr = 2;
// Evaluation d un Graphe de dependances : sur chaque Entite, on prend sa
// liste "Shared". On en deduit les "Sharing" directement
Standard_Integer n = Size();
+// clang-format off
thesharings = new TColStd_HArray1OfListOfInteger(1,n);//TColStd_HArray1OfTransient(1,n);//Clear();
+// clang-format on
if(themodel->GTool().IsNull())
return;
Standard_Real aTolV[2];
aTolV[0] =BRep_Tool::Tolerance(theVertices[0]);
aTolV[1] =BRep_Tool::Tolerance(theVertices[1]);
+// clang-format off
Standard_Real ext = 16.; // = 4 * 4 - to avoid creating microedges, area around vertices is increased
// up to 4 vertex tolerance. Such approach is usual for other topological
// algorithms, for example, Boolean Operations.
+// clang-format on
Standard_Real aTolVExt[2] = { ext * aTolV[0] * aTolV[0], ext * aTolV[1] * aTolV[1] };
BRepAdaptor_Curve2d thePCurve(theEdge, theFace);
Media_IFrameQueue* myFrameQueue; //!< frame queue
OSD_Thread myThread; //!< working thread
Standard_Mutex myMutex; //!< mutex for events
+// clang-format off
Standard_Condition myWakeEvent; //!< event to wake up working thread and proceed new playback event
Standard_Condition myNextEvent; //!< event to check if working thread processed next file event (e.g. released file handles of previous input)
Media_Timer myTimer; //!< playback timer
Handle(Media_Frame) myFrameTmp; //!< temporary object holding decoded frame
Handle(Media_Scaler) myScaler; //!< pixel format conversion tool
bool myToForceRgb; //!< flag indicating if queue requires RGB pixel format or can handle also YUV pixel format
+// clang-format on
volatile bool myToShutDown; //!< flag to terminate working thread
TCollection_AsciiString myInputPath; //!< new input to open
Handle(MeshVS_DataSource) myDataSource; //!< mesh data source
NCollection_Vector<Standard_Integer> myItemIndexes; //!< indices for BVH tree reordering
MeshVS_MeshSelectionMethod mySelMethod; //!< selection mode
+// clang-format off
Standard_Integer myMaxFaceNodes; //!< maximum nodes within the element in mesh
+// clang-format on
gp_Pnt myCOG; //!< center of gravity
Select3D_BndBox3d myBndBox; //!< bounding box
}
}
+// clang-format off
for (Standard_Integer aNodeIdx = 0; aNodeIdx < aNbPolyNodes - 2; ++aNodeIdx) // triangulate polygon
+// clang-format on
{
for (Standard_Integer aSubIdx = 0; aSubIdx < 3; ++aSubIdx) // generate sub-triangle
{
if (aType == MeshVS_ET_Face)
{
+// clang-format off
for (Standard_Integer aNodeIdx = 0; aNodeIdx < NbNodes - 2; ++aNodeIdx) // triangulate polygon
+// clang-format on
{
for (Standard_Integer aSubIdx = 0; aSubIdx < 3; ++aSubIdx) // generate sub-triangle
{
}
}
+// clang-format off
for (Standard_Integer aNodeIdx = 0; aNodeIdx < aFaceNodes.Length() - 2; ++aNodeIdx) // triangulate polygon
+// clang-format on
{
for (Standard_Integer aSubIdx = 0; aSubIdx < 3; ++aSubIdx) // generate sub-triangle
{
protected:
+// clang-format off
Handle(Message_CompositeAlerts) myCompositAlerts; //!< class provided hierarchical structure of alerts
+// clang-format on
Handle(Message_Attribute) myAttribute; //!< container of the alert attributes
};
private:
typedef std::pair<Standard_Real, Standard_Real> StartToStopValue;
+// clang-format off
NCollection_IndexedDataMap<Message_MetricType, StartToStopValue> myMetrics; //!< computed metrics
+// clang-format on
};
#endif // _Message_AttributeMeter_HeaderFile
protected:
// store messages in a lists sorted by gravity;
// here we rely on knowledge that Message_Fail is the last element of the enum
+// clang-format off
Message_ListOfAlert myAlerts[Message_Fail + 1]; //!< container of child alert for each type of gravity
+// clang-format on
};
DEFINE_STANDARD_HANDLE(Message_CompositeAlerts, Standard_Transient)
{}
private:
+// clang-format off
Message_Messenger* myMessenger; // don't make a Handle since this object should be created on stack
+// clang-format on
Message_Gravity myGravity;
Standard_SStream myStream;
};
Standard_CString myName; //!< Name of the operation being done in this scope, or null
Standard_Real myStart; //!< Start position on the global scale [0, 1]
+// clang-format off
Standard_Real myPortion; //!< The portion of the global scale covered by this scope [0, 1]
+// clang-format on
Standard_Real myMax; //!< Maximal value of progress in this scope
Standard_Real myValue; //!< Current position advanced within this scope [0, Max]
Handle(Message_CompositeAlerts) myCompositAlerts; //!< container of alerts
+// clang-format off
NCollection_Sequence<Message_Level*> myAlertLevels; //!< container of active levels, new alerts are added below the latest level
+// clang-format on
NCollection_IndexedMap<Message_MetricType> myActiveMetrics; //!< metrics to compute on alerts
Standard_Integer myLimit; //!< Maximum number of collected alerts on the top level
namespace
{
// Bounds for checking block size level
+// clang-format off
static constexpr unsigned THE_SMALL_BOUND_BLOCK_SIZE = NCollection_IncAllocator::THE_DEFAULT_BLOCK_SIZE * 16; // 196 KB
static constexpr unsigned THE_MEDIUM_BOUND_BLOCK_SIZE = NCollection_IncAllocator::THE_DEFAULT_BLOCK_SIZE * 64; // 786 KB
static constexpr unsigned THE_LARGE_BOUND_BLOCK_SIZE = NCollection_IncAllocator::THE_DEFAULT_BLOCK_SIZE * 1024; // 12 MB
+// clang-format on
//=======================================================================
//function : computeLevel
Type* myString; //!< string buffer
Standard_Integer mySize; //!< buffer size in bytes, excluding NULL-termination symbol
+// clang-format off
Standard_Integer myLength; //!< length of the string in Unicode symbols (cached value, excluding NULL-termination symbol)
+// clang-format on
};
Numbers* myArray; //!< indexed from 0 to myMaxAllocSize-1
ptrdiff_t myTotalLeftSize; //!< currently remained allocated size
size_t myTotalPeakSize; //!< maximum cumulative allocated size
+// clang-format off
size_t myBreakSize; //!< user defined allocation size to debug (see place_for_breakpoint())
+// clang-format on
size_t myBreakPeak; //!< user defined peak size limit to debug
};
else if (IsActive (MemWorkingSet)
&& strncmp (aBuff, "VmRSS:", strlen ("VmRSS:")) == 0)
{
+// clang-format off
myCounters[MemWorkingSet] = atol (aBuff + strlen ("VmRSS:")) * 1024; // RSS - resident set size
}
else if (IsActive (MemWorkingSetPeak)
&& strncmp (aBuff, "VmHWM:", strlen ("VmHWM:")) == 0)
{
myCounters[MemWorkingSetPeak] = atol (aBuff + strlen ("VmHWM:")) * 1024; // HWM - high water mark
+// clang-format on
}
else if (IsActive (MemPrivate)
&& strncmp (aBuff, "VmData:", strlen ("VmData:")) == 0)
const OSD_Parallel::UniversalIterator& myBegin; //!< First element of range.
const OSD_Parallel::UniversalIterator& myEnd; //!< Last element of range.
+// clang-format off
mutable OSD_Parallel::UniversalIterator myIt; //!< First non processed element of range.
mutable Standard_Mutex myMutex; //!< Access controller for the first non processed element.
+// clang-format on
};
//! Auxiliary wrapper class for thread function.
TCollection_AsciiString& theName,
TCollection_AsciiString& theExtension)
{
+// clang-format off
const Standard_Integer THE_EXT_MAX_LEN = 20; // this method is supposed to be used with normal extension
+// clang-format on
const Standard_Integer aLen = theFilePath.Length();
for (Standard_Integer anExtLen = 1; anExtLen < aLen && anExtLen < THE_EXT_MAX_LEN; ++anExtLen)
{
Launcher& operator=(const Launcher& theCopy);
private:
+// clang-format off
NCollection_Array1<EnumeratedThread*> myThreads; //!< array of locked threads (including self-thread)
+// clang-format on
EnumeratedThread mySelfThread;
int myNbThreads; //!< amount of locked threads
};
private:
+// clang-format off
NCollection_Array1<EnumeratedThread> myThreads; //!< array of defined threads (excluding self-thread)
+// clang-format on
int myNbDefThreads; //!< maximum number of threads to be locked by a single Launcher by default
bool myShutDown; //!< flag to shut down (destroy) the thread pool
ExceptionInformation0 = theExcPtr->ExceptionRecord->ExceptionInformation[0];
}
+// clang-format off
Standard_Mutex::Sentry aSentry (THE_SIGNAL_MUTEX); // lock the mutex to prevent simultaneous handling
+// clang-format on
static char aBuffer[2048];
bool isFloatErr = false;
//=======================================================================
static void SIGWntHandler (int signum, int sub_code)
{
+// clang-format off
Standard_Mutex::Sentry aSentry (THE_SIGNAL_MUTEX); // lock the mutex to prevent simultaneous handling
+// clang-format on
switch( signum ) {
case SIGFPE :
if ( signal( signum , (void(*)(int))SIGWntHandler ) == SIG_ERR )
static void TranslateSE( unsigned int theCode, EXCEPTION_POINTERS* theExcPtr )
{
+// clang-format off
Standard_Mutex::Sentry aSentry (THE_SIGNAL_MUTEX); // lock the mutex to prevent simultaneous handling
+// clang-format on
CallHandler (theCode, theExcPtr);
}
#endif
void OSD::SetSignal (OSD_SignalMode theSignalMode,
Standard_Boolean theFloatingSignal)
{
+// clang-format off
Standard_Mutex::Sentry aSentry (THE_SIGNAL_MUTEX); // lock the mutex to prevent simultaneous handling
+// clang-format on
OSD_WasSetSignal = theSignalMode;
#if !defined(OCCT_UWP) || defined(NTDDI_WIN10_TH2)
Handle(OpenGl_PointSprite)& aSpriteA = mySpriteA;
if (!aNewKey.IsEmpty())
{
+// clang-format off
theCtx->GetResource<Handle(OpenGl_PointSprite)> (aNewKeyA, aSpriteA); // alpha sprite could be shared
+// clang-format on
theCtx->GetResource<Handle(OpenGl_PointSprite)> (aNewKey, aSprite);
}
theCtx->core11ffp->glNewList (aBitmapList, GL_COMPILE);
const Standard_Integer aWidth = (Standard_Integer )anImage->Width(), aHeight = (Standard_Integer )anImage->Height();
+// clang-format off
theCtx->core11ffp->glBitmap (0, 0, 0, 0, GLfloat(-0.5f * aWidth), GLfloat(-0.5f * aHeight), NULL); // make offsets that will be added to the current raster position
+// clang-format on
theCtx->core11ffp->glDrawPixels (GLsizei(anImage->Width()), GLsizei(anImage->Height()), aFormat.PixelFormat(), aFormat.DataType(), anImage->Data());
theCtx->core11ffp->glEndList();
theCtx->core11fwd->glPixelStorei (GL_UNPACK_ALIGNMENT, 1);
protected:
+// clang-format off
Graphic3d_TypeOfBackground myType; //!< Type of background: texture or gradient.
Aspect_FillMethod myFillMethod; //!< Texture parameters
mutable OpenGl_GradientParameters myGradientParams; //!< Gradient parameters
mutable Standard_Integer myViewWidth; //!< view width used for array initialization
mutable Standard_Integer myViewHeight; //!< view height used for array initialization
mutable Standard_Boolean myToUpdate; //!< Shows if array parameters were changed and data (myAttribs storage) is to be updated
+// clang-format on
};
Standard_Byte* myOffset; //!< offset to data
unsigned int myBufferId; //!< VBO name (index)
+// clang-format off
unsigned int myComponentsNb; //!< Number of components per generic vertex attribute, must be 1, 2, 3, or 4
Standard_Integer myElemsNb; //!< Number of vertex attributes / number of vertices
unsigned int myDataType; //!< Data type (GL_FLOAT, GL_UNSIGNED_INT, GL_UNSIGNED_BYTE etc.)
+// clang-format on
};
public: //! @name flags to disable particular functionality, should be used only for testing purposes!
Standard_Boolean sRGBDisable; //!< Disables sRGB rendering (OFF by default)
+// clang-format off
Standard_Boolean compressedTexturesDisable; //!< Disables uploading of compressed texture formats native to GPU (OFF by default)
Standard_Boolean vboDisable; //!< disallow VBO usage for debugging purposes (OFF by default)
Standard_Boolean pntSpritesDisable; //!< flag permits Point Sprites usage, will significantly affect performance (OFF by default)
Standard_Boolean useSystemBuffer; //!< Enables usage of system backbuffer for blitting (OFF by default on desktop OpenGL and ON on OpenGL ES for testing)
Standard_Integer swapInterval; //!< controls swap interval - 0 for VSync off and 1 for VSync on, 1 by default
Standard_Boolean useZeroToOneDepth; //!< use [0, 1] depth range instead of [-1, 1] range, when possible (OFF by default)
+// clang-format on
public: //! @name context creation parameters
Handle(Graphic3d_SequenceOfHClipPlane) myPlanesLocal; //!< object clipping planes
NCollection_Vector<Standard_Boolean> myDisabledPlanes; //!< ids of disabled planes
+// clang-format off
Handle(Graphic3d_ClipPlane) myCappedChain; //!< chain which is either temporary disabled or the only one enabled for Capping algorithm
Standard_Integer myCappedSubPlane; //!< sub-plane index within filtered chain; positive number for DisableAllExcept and negative for EnableAllExcept
Standard_Integer myNbCapping; //!< number of enabled capping planes
Standard_Integer myNbChains; //!< number of enabled chains
Standard_Integer myNbDisabled; //!< number of defined but disabled planes
+// clang-format on
private:
//! Copying allowed only within Handles
}
}
+// clang-format off
myDepthPeelingDepthTexUnit = static_cast<Graphic3d_TextureUnit>(myMaxTexCombined + Graphic3d_TextureUnit_DepthPeelingDepth); // -6
myDepthPeelingFrontColorTexUnit = static_cast<Graphic3d_TextureUnit>(myMaxTexCombined + Graphic3d_TextureUnit_DepthPeelingFrontColor); // -5
myShadowMapTexUnit = static_cast<Graphic3d_TextureUnit>(myMaxTexCombined + Graphic3d_TextureUnit_ShadowMap); // -4
myPBREnvLUTTexUnit = static_cast<Graphic3d_TextureUnit>(myMaxTexCombined + Graphic3d_TextureUnit_PbrEnvironmentLUT); // -3
myPBRDiffIBLMapSHTexUnit = static_cast<Graphic3d_TextureUnit>(myMaxTexCombined + Graphic3d_TextureUnit_PbrIblDiffuseSH); // -2
myPBRSpecIBLMapTexUnit = static_cast<Graphic3d_TextureUnit>(myMaxTexCombined + Graphic3d_TextureUnit_PbrIblSpecular); // -1
+// clang-format on
if (!myHasPBR)
{
myDepthPeelingDepthTexUnit = static_cast<Graphic3d_TextureUnit>(myDepthPeelingDepthTexUnit + 3);
OpenGl_GlCore45* core45; //!< OpenGL 4.5 core profile
OpenGl_GlCore46* core46; //!< OpenGL 4.6 core profile
+// clang-format off
OpenGl_GlCore15* core15fwd; //!< obsolete entry left for code portability; core15 should be used instead
OpenGl_GlCore20* core20fwd; //!< obsolete entry left for code portability; core20 should be used instead
OpenGl_ExtGS* extGS; //!< GL_EXT_geometry_shader4
Standard_Boolean extBgra; //!< GL_EXT_bgra or GL_EXT_texture_format_BGRA8888 on OpenGL ES
Standard_Boolean extTexR16; //!< GL_EXT_texture_norm16 on OpenGL ES; always available on desktop
+// clang-format on
Standard_Boolean extAnis; //!< GL_EXT_texture_filter_anisotropic
Standard_Boolean extPDS; //!< GL_EXT_packed_depth_stencil
Standard_Boolean atiMem; //!< GL_ATI_meminfo
Aspect_Drawable myWindow; //!< surface EGLSurface | HWND | GLXDrawable
Aspect_Display myDisplay; //!< display EGLDisplay | HDC | Display*
+// clang-format off
Aspect_RenderingContext myGContext; //!< rendering context EGLContext | HGLRC | GLXContext | EAGLContext* | NSOpenGLContext*
private: // context info
typedef NCollection_Shared< NCollection_List<Handle(OpenGl_Resource)> > OpenGl_ResourcesStack;
Handle(OpenGl_ResourcesMap) mySharedResources; //!< shared resources with unique identification key
+// clang-format on
Handle(OpenGl_DelayReleaseMap) myDelayed; //!< shared resources for delayed release
Handle(OpenGl_ResourcesStack) myUnusedResources; //!< stack of resources for delayed clean up
Standard_Integer myTexClamp; //!< either GL_CLAMP_TO_EDGE (1.2+) or GL_CLAMP (1.1)
Standard_Integer myMaxTexDim; //!< value for GL_MAX_TEXTURE_SIZE
Standard_Integer myMaxTexCombined; //!< value for GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS
+// clang-format off
Standard_Integer myMaxTexUnitsFFP; //!< value for GL_MAX_TEXTURE_UNITS (fixed-function pipeline only)
+// clang-format on
Standard_Integer myMaxDumpSizeX; //!< maximum FBO width for image dump
Standard_Integer myMaxDumpSizeY; //!< maximum FBO height for image dump
Standard_Integer myMaxClipPlanes; //!< value for GL_MAX_CLIP_PLANES
Standard_Boolean myHasMsaaTextures; //!< context supports MSAA textures
Standard_Boolean myIsGlNormalizeEnabled; //!< GL_NORMALIZE flag
//!< Used to tell OpenGl that normals should be normalized
+// clang-format off
Graphic3d_TextureUnit mySpriteTexUnit; //!< sampler2D occSamplerPointSprite, texture unit for point sprite texture
Standard_Boolean myHasRayTracing; //! indicates whether ray tracing mode is supported
Graphic3d_TextureUnit myDepthPeelingDepthTexUnit; //!< sampler2D occDepthPeelingDepth, texture unit for Depth Peeling lookups
Graphic3d_TextureUnit myDepthPeelingFrontColorTexUnit; //!< sampler2D occDepthPeelingFrontColor, texture unit for Depth Peeling lookups
+// clang-format on
Handle(OpenGl_ShaderManager) myShaderManager; //! support object for managing shader programs
//!< currently active sampler objects
Standard_Integer myActiveMockTextures; //!< currently active mock sampler objects
Handle(OpenGl_FrameBuffer) myDefaultFbo; //!< default Frame Buffer Object
+// clang-format off
Handle(OpenGl_LineAttributes) myHatchStyles; //!< resource holding predefined hatch styles patterns
Standard_Integer myActiveHatchType; //!< currently activated type of polygon hatch
Standard_Boolean myHatchIsEnabled; //!< current enabled state of polygon hatching rasterization
Standard_ShortReal myRenderScale; //!< scaling factor for rendering resolution
Standard_ShortReal myRenderScaleInv; //!< scaling factor for rendering resolution (inverted value)
OpenGl_Material myMaterial; //!< current front/back material state (cached to reduce GL context updates)
+// clang-format on
private:
}
// setup alignment
+// clang-format off
const GLint anAligment = Min (GLint(theImage.MaxRowAligmentBytes()), 8); // limit to 8 bytes for OpenGL
+// clang-format on
theGlCtx->core11fwd->glPixelStorei (GL_PACK_ALIGNMENT, anAligment);
bool isBatchCopy = !theImage.IsTopDown();
protected:
+// clang-format off
Standard_Integer myInitVPSizeX; //!< viewport width specified during initialization (kept even on failure)
Standard_Integer myInitVPSizeY; //!< viewport height specified during initialization (kept even on failure)
Standard_Integer myVPSizeX; //!< viewport width (should be <= texture width)
bool myIsOwnBuffer; //!< flag indicating that FBO should be deallocated by this class
bool myIsOwnColor; //!< flag indicating that color textures should be deallocated by this class
bool myIsOwnDepth; //!< flag indicating that depth texture should be deallocated by this class
+// clang-format on
OpenGl_TextureArray myColorTextures; //!< color texture objects
Handle(OpenGl_Texture) myDepthStencilTexture; //!< depth-stencil texture object
aMaxDuration = Max (aMaxDuration, aFrame.TimerValue (Graphic3d_FrameStatsTimer_ElapsedFrame));
}
aMaxDuration = Ceiling (aMaxDuration * 1000.0 * 0.1) * 0.001 * 10.0; // round number
+// clang-format off
aMaxDuration = Max (Min (aMaxDuration, 0.1), 0.005); // limit by 100 ms (10 FPS) and 5 ms (200 FPS)
+// clang-format on
}
const Standard_Integer aNbTimers = 4;
protected:
Handle(OpenGl_FrameStats) myStatsPrev; //!< currently displayed stats
+// clang-format off
Handle(Graphic3d_TransformPers) myCountersTrsfPers; //!< transformation persistence for counters presentation
OpenGl_Text myCountersText; //!< counters presentation
OpenGl_Aspects myTextAspect; //!< text aspect
Handle(Graphic3d_TransformPers) myChartTrsfPers; //!< transformation persistence for chart presentation
+// clang-format on
Handle(Graphic3d_ArrayOfTriangles) myChartArray; //!< array of chart triangles
Handle(OpenGl_VertexBuffer) myChartVertices; //!< VBO with chart triangles
Handle(OpenGl_IndexBuffer) myChartIndices; //!< VBO with chart triangle indexes
|| checkExtensionShort ("GL_OES_fbo_render_mipmap");
theCtx.hasSRGBControl = checkExtensionShort ("GL_EXT_sRGB_write_control");
theCtx.hasPackRowLength = isGlGreaterEqualShort (3, 0);
+// clang-format off
theCtx.hasUnpackRowLength = isGlGreaterEqualShort (3, 0); // || checkExtensionShort ("GL_EXT_unpack_subimage");
// NPOT textures has limited support within OpenGL ES 2.0
// which are relaxed by OpenGL ES 3.0 or some extensions
//theCtx.arbNPTW = isGlGreaterEqualShort (3, 0)
// || checkExtensionShort ("GL_OES_texture_npot")
// || checkExtensionShort ("GL_NV_texture_npot_2D_mipmap");
+// clang-format on
theCtx.arbNPTW = true;
theCtx.arbTexRG = isGlGreaterEqualShort (3, 0)
|| checkExtensionShort ("GL_EXT_texture_rg");
theCtx.checkWrongVersion (3, 2, aLastFailedProc);
}
+// clang-format off
theCtx.arbTboRGB32 = isGlGreaterEqualShort (3, 2); // OpenGL ES 3.2 introduces TBO already supporting RGB32 format
+// clang-format on
theCtx.extDrawBuffers = checkExtensionShort ("GL_EXT_draw_buffers") && theCtx.FindProc ("glDrawBuffersEXT", this->glDrawBuffers);
theCtx.arbDrawBuffers = checkExtensionShort ("GL_ARB_draw_buffers") && theCtx.FindProc ("glDrawBuffersARB", this->glDrawBuffers);
protected:
+// clang-format off
Standard_Boolean myIsOwnContext; //!< indicates that shared context has been created within OpenGl_GraphicDriver
+// clang-format on
Aspect_Display myEglDisplay; //!< EGL connection to the Display : EGLDisplay
Aspect_RenderingContext myEglContext; //!< EGL rendering context : EGLContext
theIndex = ((theIndex & 0x0f0f0f0f) << 4) | ((theIndex & 0xf0f0f0f0) >> 4);
theIndex = ((theIndex & 0x33333333) << 2) | ((theIndex & 0xcccccccc) >> 2);
theIndex = ((theIndex & 0x55555555) << 1) | ((theIndex & 0xaaaaaaaa) >> 1);
+// clang-format off
union Result { unsigned u; float f; } aResult; // Write reversed bits directly into floating-point mantissa.
+// clang-format on
aResult.u = 0x3f800000u | (theIndex >> 9);
return aResult.f - 1.0f;
}
theOitAccumFbo->BindBuffer (aCtx);
aCtx->SetDrawBuffers (2, THE_DRAW_BUFFERS01);
+// clang-format off
aCtx->SetColorMaskRGBA (NCollection_Vec4<bool> (true)); // force writes into all components, including alpha
+// clang-format on
aCtx->core11fwd->glClearColor (0.0f, 0.0f, 0.0f, 1.0f);
aCtx->core11fwd->glClear (GL_COLOR_BUFFER_BIT);
aCtx->core15fwd->glBlendFuncSeparate (GL_ONE, GL_ONE, GL_ZERO, GL_ONE_MINUS_SRC_ALPHA);
// initialize min/max depth buffer
aGlBlendBackFBO->BindDrawBuffer (aCtx);
aCtx->SetDrawBuffers (1, THE_DRAW_BUFFERS0);
+// clang-format off
aCtx->SetColorMaskRGBA (NCollection_Vec4<bool> (true)); // force writes into all components, including alpha
+// clang-format on
aCtx->core20fwd->glClearColor (0.0f, 0.0f, 0.0f, 0.0f);
aCtx->core20fwd->glClear (GL_COLOR_BUFFER_BIT);
Handle(BVH_Builder3d) myBVHBuilder; //!< BVH tree builder for frustum culling
Standard_Integer myNbStructures;
+// clang-format off
Standard_Integer myImmediateNbStructures; //!< number of structures within immediate layers
+// clang-format on
mutable Standard_Size myModifStateOfRaytraceable;
{
OpenGl_Vec4 BaseColor; //!< base color of PBR material with alpha component
+// clang-format off
OpenGl_Vec4 EmissionIOR; //!< light intensity which is emitted by PBR material and index of refraction
+// clang-format on
OpenGl_Vec4 Params; //!< extra packed parameters
float Metallic() const { return Params.b(); }
private:
+// clang-format off
NCollection_Vector<typename OpenGl::MatrixType<T>::Mat4> myStack; //!< Collection used to maintenance matrix stack
+// clang-format on
typename OpenGl::MatrixType<T>::Mat4 myCurrent; //!< Current matrix
Standard_Integer myStackHead; //!< Index of stack head
};
myContext->core11fwd->glDepthMask (GL_FALSE);
myContext->core11fwd->glDisable (GL_BLEND);
myContext->core11fwd->glDisable (GL_SCISSOR_TEST);
+// clang-format off
myContext->SetColorMaskRGBA (NCollection_Vec4<bool> (true)); // force writes into all components, including alpha
+// clang-format on
}
void restore()
private:
+// clang-format off
unsigned int myPow2Size; //!< size of IBL maps sides (real size can be calculated as 2^myPow2Size)
unsigned int mySpecMapLevelsNumber; //!< number of mipmap levels used in specular IBL map
Standard_Boolean myIsComplete; //!< completeness of PBR environment
Standard_Boolean myIsNeededToBeBound; //!< indicates whether IBL map's textures have to be bound or it is not obligate
Standard_Boolean myCanRenderFloat; //!< indicates whether driver supports rendering into floating point texture or not
+// clang-format on
};
protected:
+// clang-format off
GLuint myBitmapList; //!< if of display list to draw sprite using glBitmap (for backward compatibility)
+// clang-format on
};
}
Graphic3d_TypeOfShadingModel aShadingModel = Graphic3d_TypeOfShadingModel_Unlit;
+// clang-format off
anAspectFace = theWorkspace->ApplyAspects (false); // do not bind textures before binding the program
+// clang-format on
const Handle(OpenGl_TextureSet)& aTextureSet = theWorkspace->TextureSet();
const bool toEnableEnvMap = !aTextureSet.IsNull()
&& aTextureSet == theWorkspace->EnvironmentTexture();
protected:
Handle(Graphic3d_TextureParams) myParams; //!< texture parameters
+// clang-format off
unsigned int mySamplerRevision; //!< modification counter of parameters related to sampler state
unsigned int mySamplerID; //!< OpenGL sampler object ID
bool myIsImmutable; //!< immutable flag preventing further modifications of sampler parameters, FALSE by default
+// clang-format on
};
|| !aTexture->Sampler()->IsImmutable())
{
// need to recreate texture sampler handle
+// clang-format off
aHandle = GLuint64(-1); // specs do not define value for invalid handle, set -1 to initialize something
+// clang-format on
if (!aTexture->InitSamplerObject (theContext))
{
continue;
for (NCollection_Vector<Handle(OpenGl_Texture)>::Iterator aTexSrcIter (myTextures); aTexSrcIter.More(); aTexSrcIter.Next(), ++aTexIter)
{
GLuint64& aHandle = myTextureHandles[aTexIter];
+// clang-format off
aHandle = GLuint64(-1); // specs do not define value for invalid handle, set -1 to initialize something
+// clang-format on
const Handle(OpenGl_Texture)& aTexture = aTexSrcIter.Value();
if (!aTexture->Sampler()->IsValid()
protected:
+// clang-format off
NCollection_Vector<Handle(OpenGl_Texture)> myTextures; //!< Array of texture maps shared between rendered objects
std::vector<GLuint64> myTextureHandles; //!< Array of unique 64-bit texture handles obtained from OpenGL
Standard_Integer myTopLevelTreeDepth; //!< Depth of high-level scene BVH from last build
Standard_Integer myBotLevelTreeDepth; //!< Maximum depth of bottom-level scene BVHs from last build
+// clang-format on
QuadBvhHandle myQuadBVH; //!< QBVH produced from binary BVH tree.
}
protected:
+// clang-format off
Handle(OpenGl_SetOfPrograms) myPrograms[Graphic3d_TypeOfShadingModel_NB - 1]; //!< programs array, excluding Graphic3d_TypeOfShadingModel_Unlit
+// clang-format on
};
typedef NCollection_DataMap<TCollection_AsciiString, Handle(OpenGl_SetOfShaderPrograms)> OpenGl_MapOfShaderPrograms;
Graphic3d_TypeOfShadingModel myShadingModel; //!< lighting shading model
OpenGl_ShaderProgramList myProgramList; //!< The list of shader programs
+// clang-format off
Handle(OpenGl_SetOfShaderPrograms) myLightPrograms; //!< pointer to active lighting programs matrix
Handle(OpenGl_SetOfPrograms) myUnlitPrograms; //!< programs matrix without lighting
Handle(OpenGl_SetOfPrograms) myOutlinePrograms; //!< programs matrix without lighting for outline presentation
gp_XYZ myLocalOrigin; //!< local camera transformation
Standard_Boolean myHasLocalOrigin; //!< flag indicating that local camera transformation has been set
+// clang-format on
mutable NCollection_Array1<Standard_Integer> myLightTypeArray;
mutable NCollection_Array1<OpenGl_ShaderLightParameters> myLightParamsArray;
+ aHeaderConstants
+ Shaders_Declarations_glsl // common declarations (global constants and Vertex Shader inputs)
+ Shaders_DeclarationsImpl_glsl
+// clang-format off
+ anIter.Value()->Source(); // the source code itself (defining main() function)
+// clang-format on
if (!aShader->LoadAndCompile (theCtx, myResourceId, aSource))
{
aShader->Release (theCtx.operator->());
GLuint myProgramID; //!< Handle of OpenGL shader program
OpenGl_ShaderList myShaderObjects; //!< List of attached shader objects
+// clang-format off
Handle(Graphic3d_ShaderProgram) myProxy; //!< Proxy shader program (from application layer)
Standard_Integer myShareCount; //!< program users count, initialized with 1 (already shared by one user)
Standard_Integer myNbLightsMax; //!< length of array of light sources (THE_MAX_LIGHTS)
protected:
Standard_Size myCurrentState[OpenGl_UniformStateType_NB]; //!< defines last modification for variables of each state type
+// clang-format on
//! Stores locations of OCCT state uniform variables.
OpenGl_ShaderUniformLocation myStateLocations[OpenGl_OCCT_NUMBER_OF_STATE_VARIABLES];
private:
Handle(Graphic3d_LightSet) myLightSources; //!< List of OCCT light sources
+// clang-format off
Standard_Integer mySpecIBLMapLevels; //!< Number of mipmap levels used in specular IBL map (0 by default or in case of using non-PBR shading model)
+// clang-format on
Handle(OpenGl_ShadowMapArray) myShadowMaps; //!< active shadowmap
Standard_Boolean myToCastShadows; //!< enable/disable shadowmap
private:
+// clang-format off
Graphic3d_RenderTransparentMethod myOitMode; //!< active OIT method for the main GLSL program
+// clang-format on
float myDepthFactor; //!< factor of depth influence to coverage
};
bool OpenGl_ShadowMap::UpdateCamera (const Graphic3d_CView& theView,
const gp_XYZ* theOrigin)
{
+// clang-format off
const Bnd_Box aMinMaxBox = theOrigin == NULL ? theView.MinMaxValues (false) : Bnd_Box(); // applicative min max boundaries
+// clang-format on
const Bnd_Box aGraphicBox = aMinMaxBox;
switch (myShadowLight->Type())
// so that shadow range will be limited to some reasonable distance from current eye.
if (myShadowCamera->FitMinMax (aMinMaxBox, 10.0 * Precision::Confusion(), false))
{
+// clang-format off
myShadowCamera->SetScale (Max (myShadowCamera->ViewDimensions().X() * 1.1, myShadowCamera->ViewDimensions().Y() * 1.1)); // add margin
+// clang-format on
}
myShadowCamera->ZFitAll (1.0, aMinMaxBox, aGraphicBox);
myLightMatrix = myShadowCamera->ProjectionMatrixF() * myShadowCamera->OrientationMatrixF();
Graphic3d_Vec4 anAnchorPoint = aModelWorld * Graphic3d_Vec4 ((Standard_ShortReal)aStartPnt.X(),
(Standard_ShortReal)aStartPnt.Y(),
(Standard_ShortReal)aStartPnt.Z(), 1.0f);
+// clang-format off
aModelWorld.SetColumn (3, Graphic3d_Vec4 (Graphic3d_Vec3 (0.0), 1.0)); // reset translation part
+// clang-format on
aStartPnt.SetCoord (anAnchorPoint.x(), anAnchorPoint.y(), anAnchorPoint.z());
theTrsfPers->Apply (theCtx->Camera(),
protected:
OpenGl_Structure* myInstancedStructure;
+// clang-format off
Graphic3d_Mat4 myRenderTrsf; //!< transformation, actually used for rendering (includes Local Origin shift)
mutable Standard_Boolean myIsRaytracable;
mutable Standard_Size myModificationState;
Standard_Boolean myIsMirrored; //!< Used to tell OpenGl to interpret polygons in clockwise order.
+// clang-format on
};
// =======================================================================
void OpenGl_Text::Render (const Handle(OpenGl_Workspace)& theWorkspace) const
{
+// clang-format off
const OpenGl_Aspects* aTextAspect = theWorkspace->ApplyAspects (false); // do not bind textures as they will be disabled anyway
+// clang-format on
const Handle(OpenGl_Context)& aCtx = theWorkspace->GetGlContext();
// Bind custom shader program or generate default version
mutable Handle(OpenGl_Font) myFont;
mutable NCollection_Vector<GLuint> myTextures; //!< textures' IDs
mutable NCollection_Vector<Handle(OpenGl_VertexBuffer)> myVertsVbo; //!< VBOs of vertices
+// clang-format off
mutable NCollection_Vector<Handle(OpenGl_VertexBuffer)> myTCrdsVbo; //!< VBOs of texture coordinates
mutable Handle(OpenGl_VertexBuffer) myBndVertsVbo;//!< VBOs of vertices for bounding box
+// clang-format on
mutable Font_Rect myBndBox;
protected:
if (aDataPtr != NULL)
{
+// clang-format off
const GLint anAligment = Min ((GLint )theImage->MaxRowAligmentBytes(), 8); // OpenGL supports alignment upto 8 bytes
+// clang-format on
theCtx->core11fwd->glPixelStorei (GL_UNPACK_ALIGNMENT, anAligment);
const GLint anExtraBytes = GLint(theImage->RowExtraBytes());
const GLint aPixelsWidth = GLint(theImage->SizeRowBytes() / theImage->SizePixelBytes());
if (!anImage.IsNull())
{
+// clang-format off
const GLint anAligment = Min ((GLint)anImage->MaxRowAligmentBytes(), 8); // OpenGL supports alignment upto 8 bytes
+// clang-format on
const GLint anExtraBytes = GLint(anImage->RowExtraBytes());
const GLint aPixelsWidth = GLint(anImage->SizeRowBytes() / anImage->SizePixelBytes());
const GLint aRowLength = (anExtraBytes >= anAligment) ? aPixelsWidth : 0;
memcpy (aCopyImage->ChangeRow (y), anImage->ChangeRow (y), aRowBytesPacked);
}
anImage = aCopyImage;
+// clang-format off
const GLint anAligment2 = Min((GLint)anImage->MaxRowAligmentBytes(), 8); // OpenGL supports alignment upto 8 bytes
+// clang-format on
theCtx->core11fwd->glPixelStorei (GL_UNPACK_ALIGNMENT, anAligment2);
}
else
return false;
}
+// clang-format off
const GLint anAligment = Min (GLint(theImage.MaxRowAligmentBytes()), 8); // limit to 8 bytes for OpenGL
+// clang-format on
theCtx->core11fwd->glPixelStorei (GL_PACK_ALIGNMENT, anAligment);
if (theCtx->hasPackRowLength)
{
Standard_Integer myNbSamples; //!< number of MSAA samples
Standard_Integer myMaxMipLevel;//!< upper mipmap level index (0 means no mipmaps)
bool myIsAlpha; //!< indicates alpha format
+// clang-format off
bool myIsTopDown; //!< indicates if 2D surface is defined top-down (TRUE) or bottom-up (FALSE)
+// clang-format on
};
protected:
+// clang-format off
Image_PixMapTypedData<unsigned int> myTiles; //!< number of samples per tile (initially all 1)
Image_PixMapTypedData<unsigned int> myTileSamples; //!< number of samples for all pixels within the tile (initially equals to Tile area)
Image_PixMapTypedData<float> myVarianceMap; //!< Estimation of visual error per tile
OpenGl_HaltonSampler mySampler; //!< Halton sequence generator
unsigned int myLastSample; //!< Index of generated sample
float myScaleFactor; //!< scale factor for quantization of visual error (float) into signed integer
+// clang-format on
int myTileSize; //!< tile size
Graphic3d_Vec2i myViewSize; //!< ray-tracing viewport
aGlCtx->core11fwd->glReadBuffer (aDrawBufferPrev);
}
// Setup alignment.
+// clang-format off
const GLint anAligment = Min (GLint(theImage.MaxRowAligmentBytes()), 8); // limit to 8 bytes for OpenGL.
+// clang-format on
aGlCtx->core11fwd->glPixelStorei (GL_PACK_ALIGNMENT, anAligment);
// Read data.
aGlCtx->core11fwd->glReadPixels (0, 0, GLsizei(theImage.SizeX()), GLsizei(theImage.SizeY()), GL_DEPTH_COMPONENT, GL_FLOAT, theImage.ChangeData());
aCtx->core11fwd->glClearDepth (1.0);
const OpenGl_Vec4 aBgColor = aCtx->Vec4FromQuantityColor (myBgColor);
+// clang-format off
aCtx->SetColorMaskRGBA (NCollection_Vec4<bool> (true)); // force writes into all components, including alpha
+// clang-format on
aCtx->core11fwd->glClearColor (aBgColor.r(), aBgColor.g(), aBgColor.b(), aCtx->caps->buffersOpaqueAlpha ? 1.0f : 0.0f);
aCtx->core11fwd->glClear (toClear);
aCtx->SetColorMask (true); // restore default alpha component write state
aCtx->SetFrameBufferSRGB (false);
}
+// clang-format off
Graphic3d_Vec2i aWinSize (aCtx->Viewport()[2], aCtx->Viewport()[3]); //aSubView->GlWindow()->PlatformWindow()->Dimensions();
+// clang-format on
Graphic3d_Vec2i aSubViewSize = aChildFbo->GetVPSize();
Graphic3d_Vec2i aSubViewPos = aSubView->SubviewTopLeft();
Graphic3d_Vec2i aDestSize = aSubViewSize;
const Standard_Integer aViewport[4] = { 0, 0, aDrawSizeX, aDrawSizeY };
aCtx->ResizeViewport (aViewport);
+// clang-format off
aCtx->SetColorMaskRGBA (NCollection_Vec4<bool> (true)); // force writes into all components, including alpha
+// clang-format on
aCtx->core20fwd->glClearDepth (1.0);
aCtx->core20fwd->glClearColor (0.0f, 0.0f, 0.0f, aCtx->caps->buffersOpaqueAlpha ? 1.0f : 0.0f);
aCtx->core20fwd->glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
Handle(Graphic3d_LightSet) myNoShadingLight;
Handle(Graphic3d_LightSet) myLights;
+// clang-format off
OpenGl_LayerList myZLayers; //!< main list of displayed structure, sorted by layers
+// clang-format on
Graphic3d_WorldViewProjState myWorldViewProjState; //!< camera modification state
OpenGl_StateCounter* myStateCounter;
//! of the view (without presentation of immediate layers).
Standard_Integer mySRgbState; //!< track sRGB state
GLint myFboColorFormat; //!< sized format for color attachments
+// clang-format off
GLint myFboDepthFormat; //!< sized format for depth-stencil attachments
OpenGl_ColorFormats myFboOitColorConfig; //!< selected color format configuration for OIT color attachments
Handle(OpenGl_FrameBuffer) myMainSceneFbos[2];
OpenGl_Aspects* myCubeMapParams; //!< Stores cubemap and its parameters for cubemap background
OpenGl_Aspects* myColoredQuadParams; //!< Stores parameters for gradient (corner mode) background
OpenGl_BackgroundArray* myBackgrounds[Graphic3d_TypeOfBackground_NB]; //!< Array of primitive arrays of different background types
+// clang-format on
Handle(OpenGl_TextureSet) myTextureEnv;
Handle(OpenGl_Texture) mySkydomeTexture;
if (myRenderParams.IsAntialiasingEnabled)
{
+// clang-format off
theGlContext->core11fwd->glDisable (GL_DEPTH_TEST); // improve jagged edges without depth buffer
+// clang-format on
// bind ray-tracing output image as input
myRaytraceFBO1[aFBOIdx]->ColorTexture()->Bind (theGlContext, OpenGl_RT_FsaaInputTexture);
{
// extend viewport here, so that tiles at boundaries (cut tile size by target rendering viewport)
// redirected to inner tiles (full tile size) are drawn entirely
+// clang-format off
const Graphic3d_Vec2i anOffsetViewport = myTileSampler.OffsetTilesViewport (myAccumFrames > 1); // shrunk offsets texture will be uploaded since 3rd frame
theGlContext->core11fwd->glViewport (0, 0, anOffsetViewport.x(), anOffsetViewport.y());
}
const NCollection_Vec4<bool> aColorMask = theGlContext->ColorMaskRGBA();
theGlContext->SetColorMaskRGBA (NCollection_Vec4<bool> (true)); // force writes into all components, including alpha
+// clang-format on
// Generate for the given RNG seed
theGlContext->core11fwd->glDisable (GL_DEPTH_TEST);
protected:
Handle(OpenGl_Context) myGlContext;
+// clang-format off
Standard_Boolean myOwnGContext; //!< set to TRUE if GL context was not created by this class
+// clang-format on
Handle(Aspect_Window) myPlatformWindow; //!< software platform window wrapper
Handle(Aspect_Window) mySizeWindow; //!< window object defining dimensions
#if defined(__APPLE__)
const OpenGl_Vec3& aSrcDif = theMat.DiffuseColor();
const OpenGl_Vec3& aSrcSpe = theMat.SpecularColor();
const OpenGl_Vec3& aSrcEms = theMat.EmissiveColor();
+// clang-format off
aCommon.SpecularShininess.SetValues (aSrcSpe,128.0f * theMat.Shininess()); // interior color is ignored for Specular
+// clang-format on
switch (theMat.MaterialType())
{
case Graphic3d_MATERIAL_ASPECT:
protected: //! @name fields related to status
+// clang-format off
Standard_Integer myNbSkippedTranspElems; //!< counter of skipped transparent elements for OpenGl_LayerList two rendering passes method
Standard_Integer myRenderFilter; //!< active filter for skipping rendering of elements by some criteria (multiple render passes)
+// clang-format on
OpenGl_Aspects myDefaultAspects;
const OpenGl_Aspects* myAspectsSet;
Extrema_ExtCC anExtCC;
anExtCC.SetCurve(1, *theSplitDS.myExtCCCurve1);
anExtCC.SetCurve(2, *theSplitDS.myCurve);
+// clang-format off
anExtCC.SetSingleSolutionFlag (Standard_True); // Search only one solution since multiple invocations are needed.
+// clang-format on
anExtCC.SetRange(1, 0, theSplitDS.myExtCCLast2DParam);
anExtCC.SetRange(2, theMinParam, theMaxParam);
anExtCC.Perform();
Standard_Boolean myUnFreeBoundaryDraw;
Standard_Boolean myHasOwnUnFreeBoundaryDraw;
Handle(Prs3d_LineAspect) myFaceBoundaryAspect;
+// clang-format off
Standard_Integer myFaceBoundaryUpperContinuity; //!< the most edge continuity class (GeomAbs_Shape) to be included to face boundaries presentation, or -1 if undefined
+// clang-format on
Standard_Boolean myFaceBoundaryDraw;
Standard_Boolean myHasOwnFaceBoundaryDraw;
protected:
+// clang-format off
Standard_Real myMajorRadius; //!< distance from the center of the pipe to the center of the torus
+// clang-format on
Standard_Real myMinorRadius; //!< radius of the pipe
Standard_Real myAngle; //!< angle to create a torus pipe segment
Standard_Real myVMin; //!< first angle to create a torus ring segment
gp_Dir TextDir; //!< Direction of text label.
Standard_Real TextWidth; //!< Width of text label.
Standard_Real TextHeight; //!< Height of text label.
+// clang-format off
SeqOfCurves DimensionLine; //!< Sequence of points for composing the segments of dimension line.
+// clang-format on
SeqOfArrows Arrows; //!< Sequence of arrow geometries.
Standard_Boolean IsComputed; //!< Shows if the selection geometry was filled.
ValueType myValueType; //! type of value (computed or user-defined)
Standard_Real myCustomValue; //!< Value of the dimension (computed or user-defined).
+// clang-format off
TCollection_ExtendedString myCustomStringValue; //!< Value of the dimension (computed or user-defined).
+// clang-format on
protected: //! @name Fixed text position properties
protected: //! @name Geometrical properties
+// clang-format off
GeometryType myGeometryType; //!< defines type of shapes on which the dimension is to be built.
gp_Pln myPlane; //!< Plane where dimension will be built (computed or user defined).
Standard_Boolean myIsPlaneCustom; //!< Is plane defined by user (otherwise it will be computed automatically).
+// clang-format on
Standard_Real myFlyout; //!< Flyout distance.
Standard_Boolean myIsGeometryValid; //!< Is dimension geometry properly defined.
#include <NCollection_List.hxx>
+// clang-format off
class PrsMgr_PresentableObject; // use forward declaration since PrsMgr_PresentableObject.hxx uses PrsMgr_ListOfPresentableObjects
+// clang-format on
typedef NCollection_List<Handle(PrsMgr_PresentableObject)> PrsMgr_ListOfPresentableObjects;
typedef NCollection_List<Handle(PrsMgr_PresentableObject)>::Iterator PrsMgr_ListOfPresentableObjectsIter;
protected:
+// clang-format off
PrsMgr_PresentableObject* myParent; //!< pointer to the parent object
PrsMgr_Presentations myPresentations; //!< list of presentations
Handle(Graphic3d_ViewAffinity) myViewAffinity; //!< view affinity mask
Standard_Boolean myHasOwnPresentations; //!< flag indicating if object should have own presentations
Standard_Boolean myToPropagateVisualState; //!< flag indicating if visual state (display/erase/color) should be propagated to all children
+// clang-format on
};
DEFINE_STANDARD_HANDLE(PrsMgr_PresentableObject, Standard_Transient)
{
if (!base_type::IsDisplayed())
{
+// clang-format off
base_type::SetIsForHighlight (theIsHighlight); // optimization - disable frustum culling for this presentation
+// clang-format on
base_type::Display();
}
else if (!base_type::IsVisible())
{//==== Test Underflow (Real) ===============================================
try{
OCC_CATCH_SIGNALS
+// clang-format off
std::cout << "(Real) Underflow" << std::endl; // to have message in log even if process crashed
+// clang-format on
di << "(Real) Underflow";
//std::cout.flush();
di << "\n";
gp_Trsf2d mirror11 = mirror1;
mirror11.PreMultiply(mirror1);
+// clang-format off
BRepExtrema_DistShapeShape distShapeShape2(grossPlateFace,step2ModifiedShape);//,Extrema_ExtFlag_MIN);
+// clang-format on
if(!distShapeShape2.IsDone())
return Standard_False;
Standard_Integer anArgIter = 1;
TCollection_ExtendedString aFileName = theArgVec[anArgIter++];
TCollection_AsciiString aPlugin = "TKXml";
+// clang-format off
TCollection_AsciiString aSaver = "03a56820-8269-11d5-aab2-0050044b1af1"; // XmlStorageDriver in XmlDrivers.cxx
TCollection_AsciiString aLoader = "03a56822-8269-11d5-aab2-0050044b1af1"; // XmlRetrievalDriver in XmlDrivers.cxx
+// clang-format on
if (anArgIter < theArgNb)
{
aPlugin = theArgVec[anArgIter++];
protected:
opencascade::handle<BVH_BoxSet<Standard_Real, 3, TopoDS_Shape>> mySBSet1; //!< First ShapeBoxSet
+// clang-format off
opencascade::handle<BVH_BoxSet<Standard_Real, 3, TopoDS_Shape>> mySBSet2; //!< Second ShapeBoxSet
+// clang-format on
NCollection_List <std::pair <TopoDS_Shape, TopoDS_Shape> > myPairs; //!< Selected pairs
};
gunc (cLine); // passing const handle as non-const reference to base type
pLine = cLine.get(); // getting non-const pointer to contained object from const handle
Handle(Geom_Line) xLine = cCurve; // copy from handle to base type
+// clang-format off
Handle(Geom_BSplineCurve) aBSpl (new Geom_Line (gp::Origin(), gp::DX())); // construction from pointer to incompatible type
+// clang-format on
CHECK(theDI, aLine == aSurf, "equality of handles of incompatible types");
CHECK(theDI, aSurf == cLine, "equality of const and non-const handle");
// random values within specified range
// std::default_random_engine aRandomEngine;
// std::uniform_real_distribution<double> aRandomDistr (aRangeMin, aRangeMax);
+// clang-format off
const uint64_t aMaxUInt64 = ~(uint64_t)0; // could be (not supported by old GCC): std::numeric_limits<uint64_t>::max()
+// clang-format on
for (int i = 0; i < aNbToTest; i++)
{
// double aVal = aRandomDistr (aRandomEngine);
strcpy (&aValuesStr(i++,0), "-INF");
strcpy (&aValuesStr(i++,0), " ."); // standalone period should not be considered as a number
+// clang-format off
strcpy (&aValuesStr(i++,0), "nanabcdef_128 xx"); // extra non-parenthised sequence after "nan"
strcpy (&aValuesStr(i++,0), "905791934.11394954"); // value that gets rounded in a wrong way by fast Strtod()
strcpy (&aValuesStr(i++,0), "1000000000000000000000000000012345678901234567890"); // huge mantissa
strcpy (&aValuesStr(i++,0), "0000000000.00000000000000000012345678901234567890"); // leading zeros
strcpy (&aValuesStr(i++,0), "1.00000000000000000000000000012345678901234567890"); // long fractional part
+// clang-format on
strcpy (&aValuesStr(i++,0), "0.0000000001e318"); // large exponent but no overflow
strcpy (&aValuesStr(i++,0), "-1.7976931348623158e+308"); // -DBL_MAX
if (!aPolyData.IsNull())
{
BRep_Builder aBuilder;
+// clang-format off
aBuilder.UpdateFace (aFace, aPolyData); // replace all "proxy"-triangulations of face by loaded active one.
+// clang-format on
}
if (myThreadPool.HasThreads())
{
Standard_Boolean myToParallel; //!< flag to use multithreading; FALSE by default
Standard_Boolean myToSkipEmptyNodes; //!< ignore nodes without Geometry; TRUE by default
+// clang-format off
Standard_Boolean myToLoadAllScenes; //!< flag to load all scenes in the document, FALSE by default
Standard_Boolean myUseMeshNameAsFallback; //!< flag to use Mesh name in case if Node name is empty, TRUE by default
Standard_Boolean myIsDoublePrecision; //!< flag to fill in triangulation using single or double precision
Standard_Boolean myToSkipLateDataLoading; //!< flag to skip triangulation loading
Standard_Boolean myToKeepLateData; //!< flag to keep information about deferred storage to load/unload triangulation later
+// clang-format on
Standard_Boolean myToPrintDebugMessages; //!< flag to print additional debug information
};
{
case RWGltf_GltfArrayType_Position:
{
+// clang-format off
aGltfFace->NbIndexedNodes = 0; // reset to zero before RWGltf_GltfArrayType_Indices step
+// clang-format on
saveNodes (*aGltfFace, *aBinFile, aFaceIter, aNbAccessors, aMeshPtr);
break;
}
protected:
TCollection_AsciiString myFile; //!< output glTF file
+// clang-format off
TCollection_AsciiString myBinFileNameFull; //!< output file with binary data (full path)
TCollection_AsciiString myBinFileNameShort; //!< output file with binary data (short path)
RWGltf_WriterTrsfFormat myTrsfFormat; //!< transformation format to write into glTF file
std::vector<RWGltf_GltfBufferView> myBuffViewsDraco; //!< vector of buffers view with compression data
Standard_Boolean myToParallel; //!< flag to use multithreading; FALSE by default
+// clang-format on
RWGltf_DracoParameters myDracoParameters; //!< Draco parameters
};
struct RWGltf_InternalSection
{
// Common
+// clang-format off
double FileLengthUnit = 1.; //!< File length units to convert from while reading the file, defined as scale factor for m (meters)
RWMesh_CoordinateSystem SystemCS = RWMesh_CoordinateSystem_Zup; //!< System origin coordinate system to perform conversion into during read
RWMesh_CoordinateSystem FileCS = RWMesh_CoordinateSystem_Yup; //!< File origin coordinate system to perform conversion during read
bool WriteEmbedTexturesInGlb = true; //!< Flag to write image textures into GLB file
bool WriteMergeFaces = false; //!< Flag to merge faces within a single part
bool WriteSplitIndices16 = false; //!< Flag to prefer keeping 16-bit indexes while merging face
+// clang-format on
} InternalParameters;
};
UnifiedQuantization (false)
{}
+// clang-format off
bool DracoCompression; //!< flag to use Draco compression (FALSE by default). If it is TRUE, compression is used
int CompressionLevel; //!< Draco compression level [0-10] (7 by default)
int QuantizePositionBits; //!< quantization bits for position attribute (14 by default)
int QuantizeColorBits; //!< quantization bits for color attributes (8 by default)
int QuantizeGenericBits; //!< quantization bits for skinning and custom attributes (12 by default)
bool UnifiedQuantization; //!< quantize positions of all primitives using the same quantization grid (FALSE by default)
+// clang-format on
};
#endif
RWGltf_GltfAccessor Indices; //!< accessor for indexes
TopoDS_Shape Shape; //!< original Face or face list
XCAFPrs_Style Style; //!< face style
+// clang-format off
Standard_Integer NbIndexedNodes; //!< transient variable for merging several faces into one while writing Indices
+// clang-format on
RWGltf_GltfFace() : NbIndexedNodes (0) {}
};
Handle(TDataStd_NamedData)& getResult();
private:
+// clang-format off
const TCollection_AsciiString& myParentID; //!< ID of the Json object that contains "extras" value. For printing messages.
+// clang-format on
const RWGltf_JsonValue& myExtrasValue; //!< "extras" value to parse.
Handle(TDataStd_NamedData) myResult; //!< Result of parsing.
};
const RWGltf_JsonValue* aByteOffset = theCompBuffView == NULL
? findObjectMember (theAccessor, "byteOffset")
: 0;
+// clang-format off
const RWGltf_JsonValue* aByteStride = findObjectMember (theAccessor, "byteStride"); // byteStride was part of bufferView in glTF 1.0
+// clang-format on
const RWGltf_JsonValue* aCompType = findObjectMember (theAccessor, "componentType");
const RWGltf_JsonValue* aCount = findObjectMember (theAccessor, "count");
if (aTypeStr == NULL
const RWGltf_JsonValue* aBufferName = findObjectMember (theBufferView, "buffer");
const RWGltf_JsonValue* aByteLength = findObjectMember (theBufferView, "byteLength");
const RWGltf_JsonValue* aByteOffset = findObjectMember (theBufferView, "byteOffset");
+// clang-format off
const RWGltf_JsonValue* aByteStride = findObjectMember (theBufferView, "byteStride"); // byteStride is part of bufferView since glTF 2.0
+// clang-format on
const RWGltf_JsonValue* aTarget = findObjectMember (theBufferView, "target");
if (aBufferName == NULL)
{
RWMesh_NodeAttributeMap* myAttribMap; //!< shape attributes
NCollection_IndexedMap<TCollection_AsciiString>*
myExternalFiles; //!< list of external file references
+// clang-format off
RWMesh_CoordinateSystemConverter myCSTrsf; //!< transformation from glTF to OCCT coordinate system
+// clang-format on
TColStd_IndexedDataMapOfStringString* myMetadata; //!< file metadata
NCollection_DataMap<TCollection_AsciiString, Handle(RWGltf_MaterialMetallicRoughness)> myMaterialsPbr;
bool myIsBinary; //!< binary document
bool myIsGltf1; //!< obsolete glTF 1.0 version format
bool myToSkipEmptyNodes; //!< ignore nodes without Geometry
+// clang-format off
bool myToLoadAllScenes; //!< flag to load all scenes in the document, FALSE by default
bool myUseMeshNameAsFallback; //!< flag to use Mesh name in case if Node name is empty, TRUE by default
bool myToProbeHeader; //!< flag to probe header without full reading, FALSE by default
bool myToReadAssetExtras; //!< flag to translate asset.extras into metadata, TRUE by default
+// clang-format on
#ifdef HAVE_RAPIDJSON
GltfElementMap myGltfRoots[RWGltf_GltfRootElement_NB]; //!< glTF format root elements
return;
}
+// clang-format off
const Standard_Integer anImgKey = myImageMap.FindIndex (theTexture) - 1; // glTF indexation starts from 0
+// clang-format on
myTextureMap.Add (theTexture);
if (!theIsStarted)
public:
Handle(Image_Texture) BaseColorTexture; //!< RGB texture for the base color
+// clang-format off
Handle(Image_Texture) MetallicRoughnessTexture; //!< RG texture packing the metallic and roughness properties together
Handle(Image_Texture) EmissiveTexture; //!< RGB emissive map controls the color and intensity of the light being emitted by the material
Handle(Image_Texture) OcclusionTexture; //!< R occlusion map indicating areas of indirect lighting
Standard_ShortReal AlphaCutOff; //!< alpha cutoff value; 0.5 by default
RWGltf_GltfAlphaMode AlphaMode; //!< alpha mode; RWGltf_GltfAlphaMode_Opaque by default
Standard_Boolean IsDoubleSided; //!< specifies whether the material is double sided; FALSE by default
+// clang-format on
RWGltf_MaterialMetallicRoughness()
: BaseColor (1.0f, 1.0f, 1.0f, 1.0f),
RWGltf_WriterTrsfFormat_Mat4 = 1, //!< 4x4 transformation Matrix
RWGltf_WriterTrsfFormat_TRS = 2, //!< transformation decomposed into Translation vector, Rotation quaternion and Scale factor (T * R * S)
};
+// clang-format off
enum { RWGltf_WriterTrsfFormat_LOWER = 0, RWGltf_WriterTrsfFormat_UPPER = RWGltf_WriterTrsfFormat_TRS }; // aliases
+// clang-format on
#endif // _RWGltf_WriterTrsfFormat_HeaderFile
TColStd_IndexedDataMapOfStringString
myMetadata; //!< metadata map
NCollection_IndexedMap<TCollection_AsciiString>
+// clang-format off
myExternalFiles; //!< the list of complementary files - external references (textures, data, etc.)
TCollection_AsciiString myRootPrefix; //!< root folder for generating root labels names
TopTools_SequenceOfShape myRootShapes; //!< sequence of result root shapes
myCoordSysConverter; //!< coordinate system converter
Standard_Boolean myToFillDoc; //!< fill document from shape sequence
Standard_Boolean myToFillIncomplete; //!< fill the document with partially retrieved data even if reader has failed with error
+// clang-format on
Standard_Integer myMemoryLimitMiB; //!< memory usage limit
Standard_Integer myExtraStatus; //!< extra status bitmask
gp_Ax3 myInputAx3; //!< source coordinate system
gp_Ax3 myOutputAx3; //!< destination coordinate system
+// clang-format off
Standard_Real myInputLengthUnit; //!< source length units, defined as scale factor to m (meters); -1.0 by default which means UNDEFINED
Standard_Real myOutputLengthUnit; //!< destination length units, defined as scale factor to m (meters); -1.0 by default which means UNDEFINED
Standard_Boolean myHasInputAx3; //!< flag indicating if source coordinate system is defined or not
Graphic3d_Mat4 myNormTrsf; //!< transformation 4x4 matrix from input Ax3 to output Ax3
Standard_Real myUnitFactor; //!< unit scale factor
Standard_Boolean myHasScale; //!< flag indicating that length unit transformation should be performed
+// clang-format on
Standard_Boolean myIsEmpty; //!< flag indicating that transformation is empty
};
NCollection_DataMap<TopoDS_Shape, XCAFPrs_Style, TopTools_ShapeMapHasher>
myStyles; //!< Face -> Style map
+// clang-format off
XCAFPrs_Style myDefStyle; //!< default style for faces without dedicated style
Standard_Boolean myToMapColors; //!< flag to dispatch styles
XCAFPrs_Style myFaceStyle; //!< current face style
Quantity_ColorRGBA myFaceColor; //!< current face color
Standard_Boolean myHasFaceColor; //!< flag indicating that current face has assigned color
+// clang-format on
};
myStyles; //!< map of processed styles
NCollection_Map<Handle(Image_Texture)>
myImageFailMap; //!< map of images failed to be copied
+// clang-format off
XCAFPrs_Style myDefaultStyle; //!< default material definition to be used for nodes with only color defined
+// clang-format on
Standard_Integer myNbMaterials; //!< number of registered materials
Standard_Boolean myIsFailed; //!< flag indicating failure
Standard_Boolean myMatNameAsKey; //!< flag indicating usage of material name as key
protected:
RWMesh_CoordinateSystemConverter myCoordSysConverter; //!< coordinate system converter
+// clang-format off
TCollection_AsciiString myFileName; //!< file name to use during message printing
mutable Standard_Mutex myMutex; //!< internal mutex to collect nodes/triangles statistic
mutable LoadingStatistic* myLoadingStatistic; //!< statistic of loaded triangulation
Standard_Boolean myIsDoublePrecision; //!< flag to fill in triangulation using single or double precision
Standard_Boolean myToSkipDegenerateTris; //!< flag to skip degenerate triangles during loading, FALSE by default
Standard_Boolean myToPrintDebugMessages; //!< flag to print additional debug information
+// clang-format on
};
#endif // _RWMesh_TriangulationReader_HeaderFile
protected:
NCollection_DataMap<TCollection_AsciiString, Handle(XCAFDoc_VisMaterial)> myObjMaterialMap;
+// clang-format off
Standard_Boolean myIsSinglePrecision; //!< flag for reading vertex data with single or double floating point precision
+// clang-format on
};
#endif // _RWObj_CafReader_HeaderFile
++theWriter.NbFaces;
{
const bool hasNormals = aFaceIter.HasNormals();
+// clang-format off
const bool hasTexCoords = aFaceIter.HasTexCoords(); //&& !aFaceIter.FaceStyle().Texture().IsEmpty();
+// clang-format on
if (theWriter.NbFaces != 1)
{
toCreateGroup = toCreateGroup
protected:
TCollection_AsciiString myFile; //!< output OBJ file
+// clang-format off
RWMesh_CoordinateSystemConverter myCSTrsf; //!< transformation from OCCT to OBJ coordinate system
XCAFPrs_Style myDefaultStyle; //!< default material definition to be used for nodes with only color defined
+// clang-format on
};
struct RWObj_InternalSection
{
// Common
+// clang-format off
double FileLengthUnit = 1.; //!< File length units to convert from while reading the file, defined as scale factor for m (meters)
RWMesh_CoordinateSystem SystemCS = RWMesh_CoordinateSystem_Zup; //!< System origin coordinate system to perform conversion into during read
RWMesh_CoordinateSystem FileCS = RWMesh_CoordinateSystem_Yup; //!< File origin coordinate system to perform conversion during read
TCollection_AsciiString ReadRootPrefix; //!< Root folder for generating root labels names
bool ReadFillDoc = true; //!< Flag for fill document from shape sequence
bool ReadFillIncomplete = true; //!< Flag for fill the document with partially retrieved data even if reader has failed with error
+// clang-format on
int ReadMemoryLimitMiB = -1; //!< Memory usage limit
// Writing
TCollection_AsciiString WriteComment; //!< Export special comment
struct RWObj_Material
{
TCollection_AsciiString Name; //!< material name (identifier) as defined in MTL file
+// clang-format off
TCollection_AsciiString DiffuseTexture; //!< path to the texture image file defining diffuse color
TCollection_AsciiString SpecularTexture; //!< path to the texture image file defining specular color
+// clang-format on
TCollection_AsciiString BumpTexture; //!< path to the texture image file defining normal map
Quantity_Color AmbientColor;
Quantity_Color DiffuseColor;
RWMesh_CoordinateSystemConverter myCSTrsf; //!< coordinate system flipper
Standard_Size myMemLimitBytes; //!< memory limit in bytes
Standard_Size myMemEstim; //!< estimated memory occupation in bytes
+// clang-format off
Standard_Integer myNbLines; //!< number of parsed lines (e.g. current line)
Standard_Integer myNbProbeNodes; //!< number of probed nodes
Standard_Integer myNbProbeElems; //!< number of probed elements
Standard_Integer myNbElemsBig; //!< number of big elements (polygons with 5+ nodes)
Standard_Boolean myToAbort; //!< flag indicating abort state (e.g. syntax error)
+// clang-format on
// Each node in the Element specifies independent indices of Vertex position, Texture coordinates and Normal.
// This scheme does not match natural definition of Primitive Array
RWObj_IShapeReceiver* myShapeReceiver; //!< optional shape receiver
TopoDS_Compound myResultShape; //!< result shape as Compound of objects
TopoDS_Compound myLastObjectShape; //!< Compound containing current object groups
+// clang-format off
TopoDS_Shape myLastGroupShape; //!< current group shape - either a single Face or Compound of Faces
+// clang-format on
TCollection_AsciiString myLastGroupName; //!< current group name
TCollection_AsciiString myLastFaceMaterial;//!< last face material name
Standard_Boolean myToCreateShapes; //!< create a single triangulation
protected:
TCollection_AsciiString myFile; //!< output PLY file
+// clang-format off
RWMesh_CoordinateSystemConverter myCSTrsf; //!< transformation from OCCT to PLY coordinate system
XCAFPrs_Style myDefaultStyle; //!< default material definition to be used for nodes with only color defined
+// clang-format on
Standard_Boolean myIsDoublePrec;
Standard_Boolean myHasNormals;
Standard_Boolean myHasColors;
struct RWPly_InternalSection
{
// Common
+// clang-format off
double FileLengthUnit = 1.; //!< File length units to convert from while reading the file, defined as scale factor for m (meters)
RWMesh_CoordinateSystem SystemCS = RWMesh_CoordinateSystem_Zup; //!< System origin coordinate system to perform conversion into during read
RWMesh_CoordinateSystem FileCS = RWMesh_CoordinateSystem_Yup; //!< File origin coordinate system to perform conversion during read
bool WriteTexCoords = false; //!< Flag for write UV / texture coordinates
bool WritePartId = true; //!< Flag for write part Id as element attribute
bool WriteFaceId = false; //!< Flag for write face Id as element attribute. Cannot be combined with HasPartId
+// clang-format on
TCollection_AsciiString WriteComment; //!< Export special comment
TCollection_AsciiString WriteAuthor; //!< Author of exported file name
} InternalParameters;
{
static const Standard_Integer THE_STL_SIZEOF_FACET = 50;
+// clang-format off
static const Standard_Integer IND_THRESHOLD = 1000; // increment the indicator every 1k triangles
+// clang-format on
static const size_t THE_BUFFER_SIZE = 1024; // The length of buffer to read (in bytes)
//! Writing a Little Endian 32 bits integer
Standard_Real LengthUncertainty = aUMWU->ValueComponent();
// Update it according to the Length Unit Factor
//pdn r_47-sd.stp to choose minimal uncertainty
+// clang-format off
if(theUncertainty > LengthUncertainty) theUncertainty = LengthUncertainty; // *lengthFactor; fait par appelant
+// clang-format on
hasUncertainty = Standard_True;
}
}
//:j2
shbinder = new TransferBRep_ShapeBinder;
+// clang-format off
TP->Bind ( start, shbinder ); //:j3 abv 23 Oct 98: rp1sd.stp: bind something to protect against loops
+// clang-format on
if (!binder.IsNull()) {
TopoDS_Shape theResult = TransferBRep::ShapeResult (binder);
if (!theResult.IsNull()) {
shapeRep = new StepShape_ShapeRepresentation;
SDR0->SetUsedRepresentation(shapeRep); // to be used by MakeItem
}
+// clang-format off
binder = TransientResult(SDR0); // set SDR as first item in order to be found first (but not SDR of subshape!)
+// clang-format on
binder->AddResult ( TransientResult(shapeRep) );
// translate components
// Note: the numbers should be consistent with Resource_FormatType enumeration
Interface_Static::Init("step", "read.step.codepage", 'e', "");
Interface_Static::Init("step", "read.step.codepage", '&', "enum 0");
+// clang-format off
Interface_Static::Init("step", "read.step.codepage", '&', "eval SJIS"); // Resource_FormatType_SJIS 0
Interface_Static::Init("step", "read.step.codepage", '&', "eval EUC"); // Resource_FormatType_EUC 1
Interface_Static::Init("step", "read.step.codepage", '&', "eval NoConversion"); // Resource_FormatType_NoConversion 2
Interface_Static::Init("step", "read.step.codepage", '&', "eval iso8859-8"); // Resource_FormatType_iso8859_8 22
Interface_Static::Init("step", "read.step.codepage", '&', "eval iso8859-9"); // Resource_FormatType_iso8859_9 23
Interface_Static::Init("step", "read.step.codepage", '&', "eval CP850"); // Resource_FormatType_CP850 24
+// clang-format on
Interface_Static::SetCVal("read.step.codepage", "UTF8");
// Tessellated geometry reading: Off by default
Interface_Static::Init("step", "write.step.tessellated", '&', "eval OnNoBRep"); // 2
Interface_Static::SetCVal("write.step.tessellated", "OnNoBRep");
+// clang-format off
Standard_STATIC_ASSERT((int)Resource_FormatType_CP850 - (int)Resource_FormatType_CP1250 == 18); // "Error: Invalid Codepage Enumeration"
+// clang-format on
init = Standard_True;
}
if (Shape.IsNull()) { di<<"Shape unknown : "<<arg2<<"\n"; return 1 /* Error */; }
ShapeProcessAPI_ApplySequence seq (arg3, arg4);
+// clang-format off
TopoDS_Shape result = seq.PrepareShape(Shape, Standard_True, TopAbs_FACE);//fill history map for faces and above
+// clang-format on
seq.PrintPreparationResult();
DBRep::Set (arg1,result);
return 0;
return 1;
}
+// clang-format off
Handle(ShapeUpgrade_SplitSurfaceContinuity) theTool = new ShapeUpgrade_SplitSurfaceContinuity;//S4137
+// clang-format on
Standard_Real Tol=Draw::Atof(a[3]);
Standard_Integer Split = Draw::Atoi(a[4]);
private:
Select3D_TypeOfSensitivity mySensType; //!< Type of sensitivity: interior or boundary
+// clang-format off
Handle(Select3D_SensitiveSet) myFacePoints; //!< Wrapper for overlap detection created depending on sensitivity type
+// clang-format on
};
DEFINE_STANDARD_HANDLE(Select3D_SensitiveFace, Select3D_SensitiveEntity)
private:
Select3D_IndexedMapOfEntity myEntities; //!< Grouped sensitive entities
+// clang-format off
Standard_Boolean myMustMatchAll; //!< Determines whether all entities in the group should be overlapped or not
Standard_Boolean myToCheckOverlapAll; //!< flag to check overlapping with all entities within rectangular/polygonal selection
gp_Pnt myCenter; //!< Center of geometry of the group
mutable Select3D_BndBox3d myBndBox; //!< Bounding box of the group
NCollection_Vector<Standard_Integer> myBVHPrimIndexes; //!< Vector of sub-entities indexes for BVH tree build
+// clang-format on
};
DEFINE_STANDARD_HANDLE(Select3D_SensitiveGroup, Select3D_SensitiveEntity)
mutable gp_Pnt myCOG; //!< Center of the poly
Handle(TColStd_HArray1OfInteger) mySegmentIndexes; //!< Segment indexes for BVH tree build
Select3D_BndBox3d myBndBox; //!< Bounding box of the poly
+// clang-format off
Select3D_TypeOfSensitivity mySensType; //!< Type of sensitivity: boundary or interior
mutable Standard_Boolean myIsComputed; //!< Is true if all the points and data structures of polygon are initialized
+// clang-format on
};
DEFINE_STANDARD_HANDLE(Select3D_SensitivePoly, Select3D_SensitiveSet)
Handle(Graphic3d_Buffer) myVerts; //!< source data - nodes position
Handle(Graphic3d_IndexBuffer) myIndices; //!< source data - primitive indexes
const Standard_Byte* myPosData; //!< position vertex attribute data
+// clang-format off
Standard_Size myPosStride; //!< position vertex attribute stride in bytes
Graphic3d_TypeOfPrimitiveArray myPrimType; //!< primitives type
Standard_Integer myIndexLower; //!< index range - first index in myIndices (inclusive)
bool myToDetectElem; //!< flag to keep info about last detected element
bool myToDetectNode; //!< flag to keep info about last detected node
bool myToDetectEdge; //!< flag to keep info about last detected edge
+// clang-format on
public:
Standard_Boolean theIsFullInside = false) : Id (theId), IsFullInside (theIsFullInside) {}
Standard_Integer Id; //!< node identifier
+// clang-format off
Standard_Boolean IsFullInside; //!< if the node is completely inside the current selection volume
+// clang-format on
};
}
TopLoc_Location myInitLocation;
gp_Pnt myCDG3D; //!< Center of the whole triangulation
Handle(TColStd_HArray1OfInteger) myFreeEdges;
+// clang-format off
Standard_Boolean mySensType; //!< Type of sensitivity: boundary or interior
Standard_Integer myPrimitivesNb; //!< Amount of free edges or triangles depending on sensitivity type
Handle(TColStd_HArray1OfInteger) myBVHPrimIndexes; //!< Indexes of edges or triangles for BVH build
mutable Select3D_BndBox3d myBndBox; //!< Bounding box of the whole triangulation
+// clang-format on
gp_GTrsf myInvInitLocation;
};
private:
+// clang-format off
NCollection_Vector<Handle(Select3D_SensitiveEntity)> myEntities; //!< Vector of sub-entities
NCollection_Vector<Standard_Integer> myEntityIndexes; //!< Indexes of entities for BVH build
gp_Pnt myCenter; //!< Center of the whole wire
mutable Select3D_BndBox3d myBndBox; //!< Bounding box of the whole wire
+// clang-format on
};
DEFINE_STANDARD_HANDLE(Select3D_SensitiveWire, Select3D_SensitiveEntity)
gp_Pnt myObjPickedPnt; //!< User-picked selection point onto object
NCollection_Vec3<float> myNormal; //!< surface normal
Standard_Real myDepth; //!< Depth to detected point
+// clang-format off
Standard_Real myDistToCenter; //!< Distance from 3d projection user-picked selection point to entity's geometry center
+// clang-format on
};
#endif // _SelectBasics_PickResult_HeaderFile
Handle(Graphic3d_NMapOfTransient) myDisabledObjects; //!< disabled objects.
//! Selection isn't applied to these objects.
+// clang-format off
SelectMgr_FilterType myFilterType; //!< selection filter type. SelectMgr_TypeFilter_OR by default.
+// clang-format on
};
#endif // _SelectMgr_AndOrFilter_HeaderFile
protected:
+// clang-format off
NCollection_List<Handle(Select3D_SensitiveEntity)> myBVHToBuildList; //!< list of queued sensitive entities
NCollection_Array1<BVHThread> myBVHThreads; //!< threads to build BVH
Standard_Boolean myToStopBVHThread; //!< flag to stop BVH threads
Standard_Condition myWakeEvent; //!< raises when any sensitive is added to the BVH list
Standard_Condition myIdleEvent; //!< raises when BVH list become empty
Standard_Boolean myIsStarted; //!< indicates that threads are running
+// clang-format on
};
#endif
protected:
+// clang-format off
Handle(Graphic3d_Camera) myCamera; //!< camera definition (if builder isn't NULL it is the same as its camera)
+// clang-format on
SelectMgr_SelectionType mySelectionType; //!< type of selection
};
protected:
SelectMgr_SelectableObject* mySelectable; //!< raw pointer to selectable object
+// clang-format off
Standard_Integer mypriority; //!< selection priority (for result with the same depth)
Standard_Boolean myIsSelected; //!< flag indicating selected state
Standard_Boolean myFromDecomposition; //!< flag indicating this owner points to a part of object (TRUE) or to entire object (FALSE)
+// clang-format on
};
gp_Vec myPlanes[N + 2]; //!< Plane equations
gp_Pnt myVertices[N * 2]; //!< Vertices coordinates
+// clang-format off
Standard_Real myMaxVertsProjections[N + 2]; //!< Cached projections of vertices onto frustum plane directions
Standard_Real myMinVertsProjections[N + 2]; //!< Cached projections of vertices onto frustum plane directions
Standard_Real myMaxOrthoVertsProjections[3]; //!< Cached projections of vertices onto directions of ortho unit vectors
Standard_Real myMinOrthoVertsProjections[3]; //!< Cached projections of vertices onto directions of ortho unit vectors
+// clang-format on
gp_Vec myEdgeDirs[6]; //!< Cached edge directions
};
SelectBasics_PickResult& thePickResult) const
{
gp_XYZ anU = theSegPnt2.XYZ() - theSegPnt1.XYZ();
+// clang-format off
gp_XYZ aV = myFarPickedPnt.XYZ() - myNearPickedPnt.XYZ(); // use unnormalized vector instead of myViewRayDir to clip solutions behind Far plane
+// clang-format on
gp_XYZ aW = theSegPnt1.XYZ() - myNearPickedPnt.XYZ();
Standard_Real anA = anU.Dot (anU);
const gp_Pnt& thePntOnPlane,
SelectBasics_PickResult& thePickResult) const
{
+// clang-format off
gp_XYZ anU = myFarPickedPnt.XYZ() - myNearPickedPnt.XYZ(); // use unnormalized vector instead of myViewRayDir to clip solutions behind Far plane by > 1.0 check
+// clang-format on
gp_XYZ aW = myNearPickedPnt.XYZ() - thePntOnPlane.XYZ();
Standard_Real aD = thePlane.Dot (anU);
Standard_Real aN = -thePlane.Dot (aW);
// to simplify calculations.
Standard_Integer aVertIdxs[6] = { LeftTopNear, LeftBottomNear, // opposite planes in height direction
LeftBottomNear, RightBottomNear, // opposite planes in width direction
+// clang-format off
LeftBottomFar, RightBottomNear }; // opposite planes in depth direction
+// clang-format on
for (Standard_Integer aPlaneIdx = 0; aPlaneIdx < 5; aPlaneIdx += 2)
{
Standard_Real aProj1 = theFrustum->myPlanes[aPlaneIdx].XYZ().Dot (theFrustum->myVertices[aVertIdxs[aPlaneIdx]].XYZ());
private:
+// clang-format off
SelectionRectangle mySelRectangle; //!< parameters for selection by point or box (it is used to build frustum)
gp_Pnt myNearPickedPnt; //!< 3d projection of user-picked selection point onto near view plane
gp_Pnt myFarPickedPnt; //!< 3d projection of user-picked selection point onto far view plane
gp_Dir myViewRayDir; //!< view ray direction
Standard_Real myScale; //!< Scale factor of applied transformation, if there was any
+// clang-format on
};
protected:
SelectMgr_SequenceOfSelection myselections; //!< list of selections
+// clang-format off
Handle(Prs3d_Presentation) mySelectionPrs; //!< optional presentation for highlighting selected object
Handle(Prs3d_Presentation) myHilightPrs; //!< optional presentation for highlighting detected object
+// clang-format on
Standard_Integer myGlobalSelMode; //!< global selection mode
Standard_Boolean myAutoHilight; //!< auto-highlighting flag defining
|| myLastViewState.IsChanged (aViewState)
|| isWinSizeChanged))
{
+// clang-format off
Handle(Graphic3d_Camera) aNewOrthoCam = new Graphic3d_Camera (*theCam); // If OrthoPers, copy camera and set to orthographic projection
+// clang-format on
aNewOrthoCam->SetProjectionType (Graphic3d_Camera::Projection_Orthographic);
// construct adaptor over private fields to provide direct access for the BVH builder
|| myLastViewState.IsProjectionChanged (aViewState)
|| isWinSizeChanged))
{
+// clang-format off
Handle(Graphic3d_Camera) aNewOrthoCam = new Graphic3d_Camera (*theCam); // If OrthoPers, copy camera and set to orthographic projection
+// clang-format on
aNewOrthoCam->SetProjectionType (Graphic3d_Camera::Projection_Orthographic);
// construct adaptor over private fields to provide direct access for the BVH builder
private:
+// clang-format off
NCollection_IndexedMap<Handle(SelectMgr_SelectableObject)> myObjects[BVHSubsetNb]; //!< Map of objects for each subset
opencascade::handle<BVH_Tree<Standard_Real, 3> > myBVH[BVHSubsetNb]; //!< BVH tree computed for each subset
Handle(Select3D_BVHBuilder3d) myBuilder[BVHSubsetNb]; //!< Builder allocated for each subset
Standard_Boolean myIsDirty[BVHSubsetNb]; //!< Dirty flag for each subset
Graphic3d_WorldViewProjState myLastViewState; //!< Last view-projection state used for construction of BVH
Graphic3d_Vec2i myLastWinSize; //!< Last viewport's (window's) width used for construction of BVH
+// clang-format on
friend class Iterator;
};
private:
Handle(SelectMgr_BaseIntersector) myActiveSelectingVolume;
+// clang-format off
Handle(Graphic3d_SequenceOfHClipPlane) myViewClipPlanes; //!< view clipping planes
Handle(Graphic3d_SequenceOfHClipPlane) myObjectClipPlanes; //!< object clipping planes
SelectMgr_ViewClipRange myViewClipRange;
Standard_Boolean myToAllowOverlap; //!< Defines if partially overlapped entities will me detected or not
+// clang-format on
};
#endif
: SelectMgr_SelectionImageFiller (thePixMap, theSelector)
{
// generate standard modes in proper order, consider custom objects would use similar scheme
+// clang-format off
myMapSelectionModeColors.Bind ( 0, Quantity_NOC_WHITE); // default (entire object selection)
+// clang-format on
myMapSelectionModeColors.Bind ( 1, Quantity_NOC_YELLOW); // TopAbs_VERTEX
myMapSelectionModeColors.Bind ( 2, Quantity_NOC_GREEN); // TopAbs_EDGE
myMapSelectionModeColors.Bind ( 3, Quantity_NOC_RED); // TopAbs_WIRE
private:
+// clang-format off
SelectMgr_IndexedMapOfHSensitive mySensitives; //!< Map of entities and its corresponding index in BVH
SelectMgr_MapOfOwners myOwnersMap; //!< Map of entity owners and its corresponding number of sensitives
Standard_Integer myNbEntityWithPersistence; //!< number of sensitive entities that have own transform persistence
+// clang-format on
};
#endif // _SelectMgr_SensitiveEntitySet_HeaderFile
gp_Pnt Point; //!< 3D point
Graphic3d_Vec3 Normal; //!< surface normal or 0 vector if undefined
Standard_Real Depth; //!< distance from the view plane to the entity
+// clang-format off
Standard_Real MinDist; //!< distance from the clicked point to the entity on the view plane
Standard_Real Tolerance; //!< tolerance used for selecting candidates
Standard_Integer SelectionPriority; //!< selection priority
Standard_Integer DisplayPriority; //!< display priority
Standard_Integer ZLayerPosition; //!< ZLayer rendering order index, stronger than a depth
Standard_Integer NbOwnerMatches; //!< overall number of entities collected for the same owner
+// clang-format on
Standard_Boolean IsPreferPriority; //!< flag to signal comparison to be done over priority
public:
protected:
+// clang-format off
SelectionTriangle mySelTriangle; //!< parameters of selection triangle (it is used to build triangle frustum)
+// clang-format on
public:
private:
SelectMgr_TriangFrustums myFrustums; //!< set of triangular frustums
+// clang-format off
SelectionPolyline mySelPolyline; //!< parameters of selection polyline (it is used to build triangle frustum set)
TColgp_Array1OfPnt myBoundaryPoints; //!< boundary points
//! 1_____2
//! | / \ |
//! 8|/_________\|7
Standard_Boolean myToAllowOverlap; //!< flag to detect only fully included sensitives or not
+// clang-format on
};
#endif // _SelectMgr_TriangularFrustumSet_HeaderFile
" ivec2 aFragCoord = ivec2 (gl_FragCoord.xy);\n"
" vec2 aLastDepth = texelFetch (occDepthPeelingDepth, aFragCoord, 0).rg;\n"
" occPeelFrontColor = texelFetch (occDepthPeelingFrontColor, aFragCoord, 0);\n"
+// clang-format off
" occPeelDepth.rg = vec2 (THE_DEPTH_CLEAR_VALUE); // depth value always increases, so that MAX blend equation can be used\n"
+// clang-format on
" occPeelBackColor = vec4 (0.0); // back color is blend after each peeling pass\n"
"\n"
" float aNearDepth = -aLastDepth.x;\n"
"\n"
"#if defined(THE_MAX_LIGHTS) && (THE_MAX_LIGHTS > 0)\n"
"// arrays of light sources\n"
+// clang-format off
"uniform vec4 occLightSources[THE_MAX_LIGHTS * 4]; //!< packed light sources parameters\n"
"uniform THE_PREC_ENUM int occLightSourcesTypes[THE_MAX_LIGHTS]; //!< packed light sources types\n"
+// clang-format on
"#endif\n"
"\n"
"#if defined(THE_IS_PBR)\n"
"uniform mat4 occProjectionMatrixTranspose; //!< Transpose of the projection matrix\n"
"uniform mat4 occModelWorldMatrixTranspose; //!< Transpose of the model-world matrix\n"
"\n"
+// clang-format off
"uniform mat4 occWorldViewMatrixInverseTranspose; //!< Transpose of the inverse of the world-view matrix\n"
"uniform mat4 occProjectionMatrixInverseTranspose; //!< Transpose of the inverse of the projection matrix\n"
"uniform mat4 occModelWorldMatrixInverseTranspose; //!< Transpose of the inverse of the model-world matrix\n"
"uniform int occNbSpecIBLLevels; //!< Number of mipmap levels used in occSpecIBLMap to store different roughness values maps\n"
"\n"
"vec3 occDiffIBLMap (in vec3 theNormal); //!< Unpacks spherical harmonics coefficients to diffuse IBL map's values\n"
+// clang-format on
"#endif\n"
"\n"
"// light type enumeration (same as Graphic3d_TypeOfLightSource)\n"
"// Front/back material properties accessors\n"
"vec4 occPBRMaterial_Color(in bool theIsFront); //!< Base color of PBR material\n"
"float occPBRMaterial_Metallic(in bool theIsFront); //!< Metallic coefficient\n"
+// clang-format off
"float occPBRMaterial_NormalizedRoughness(in bool theIsFront); //!< Normalized roughness coefficient\n"
+// clang-format on
"vec3 occPBRMaterial_Emission(in bool theIsFront); //!< Light intensity emitted by material\n"
"float occPBRMaterial_IOR(in bool theIsFront); //!< Index of refraction\n"
"#define occMaterial_Emission occPBRMaterial_Emission\n"
"#endif\n"
"\n"
"#if defined(THE_HAS_TEXTURE_NORMAL) && defined(FRAGMENT_SHADER)\n"
+// clang-format off
"uniform sampler2D occSamplerNormal; //!< XYZ normal texture sampler with W==0 indicating no texture\n"
+// clang-format on
"#define occTextureNormal(theTexCoord) occTexture2D(occSamplerNormal, theTexCoord)\n"
"#else\n"
"#define occTextureNormal(theTexCoord) vec4(0.0) // no normal map\n"
"#define occMaterialMetallic(theIsFront, theTexCoord) occPBRMaterial_Metallic(theIsFront)\n"
"#endif\n"
"\n"
+// clang-format off
"uniform vec4 occColor; //!< color value (in case of disabled lighting)\n"
"uniform THE_PREC_ENUM int occDistinguishingMode; //!< Are front and back faces distinguished?\n"
"uniform THE_PREC_ENUM int occTextureEnable; //!< Is texture enabled?\n"
"#if defined(THE_MAX_CLIP_PLANES) && (THE_MAX_CLIP_PLANES > 0)\n"
"uniform vec4 occClipPlaneEquations[THE_MAX_CLIP_PLANES];\n"
"uniform THE_PREC_ENUM int occClipPlaneChains[THE_MAX_CLIP_PLANES]; //! Indicating the number of planes in the Chain\n"
+// clang-format on
"uniform THE_PREC_ENUM int occClipPlaneCount; //!< Total number of clip planes\n"
"#endif\n"
"//! @endfile Declarations.glsl\n";
"#endif\n"
"\n"
"#ifdef THE_TO_BAKE_SPECULAR\n"
+// clang-format off
"uniform int uCurrentLevel; //!< current level of specular IBL map (ignored in case of diffuse map's processing)\n"
"uniform float uEnvSolidAngleSource; //!< source solid angle sample computed from one edge's size of source environment map's zero mipmap level\n"
+// clang-format on
"#endif\n"
"\n"
"//! Returns coordinates of point theNumber from Hammersley point set having size theSize.\n"
"const float THE_G2 = THE_G * THE_G;\n"
"const float THE_HR = 8000.0; // Thickness of the atmosphere\n"
"const float THE_HM = 1000.0; // Same as above but for Mie\n"
+// clang-format off
"const vec3 THE_BETA_R = vec3 (5.8e-6, 13.5e-6, 33.1e-6); // Reyleigh scattering normal earth\n"
"const vec3 THE_BETA_M = vec3 (21e-6); // Normal Mie scattering\n"
"\n"
"const float THE_HorizonWidth = 0.002;\n"
"const int THE_NbSamples = 8;\n"
"const int THE_NbSamplesLight = 8; // integral sampling rate (might highly hit performance)\n"
+// clang-format on
"const float THE_SunPower = 5.0;\n"
"const float THE_StarTreshold = 0.98;\n"
"\n"
GeomAdaptor_Curve GAC(C3D, uMin, uMax);
if (C3D->IsKind(STANDARD_TYPE(Geom_BoundedCurve))) {
+// clang-format off
Standard_Real prec = ( AdjustToEnds ? preci : Precision::Confusion() ); //:j8 abv 10 Dec 98: tr10_r0501_db.stp #9423: protection against densing of points near one end
+// clang-format on
gp_Pnt LowBound = GAC.Value(uMin);
gp_Pnt HigBound = GAC.Value(uMax);
distmin = LowBound.Distance(P3D);
return ProjectAct(C3D, P3D, preci, proj, param);
Standard_Real distmin_L = Precision::Infinite(), distmin_H = Precision::Infinite();
+// clang-format off
Standard_Real prec = ( AdjustToEnds ? preci : Precision::Confusion() ); //:j8 abv 10 Dec 98: tr10_r0501_db.stp #9423: protection against densing of points near one end
+// clang-format on
gp_Pnt LowBound = C3D.Value(uMin);
gp_Pnt HigBound = C3D.Value(uMax);
distmin_L = LowBound.Distance(P3D);
Standard_Real distmin = Precision::Infinite();
GeomAdaptor_Curve GAC(C3D, uMin, uMax);
if (C3D->IsKind(STANDARD_TYPE(Geom_BoundedCurve))) {
+// clang-format off
Standard_Real prec = ( AdjustToEnds ? preci : Precision::Confusion() ); //:j8 abv 10 Dec 98: tr10_r0501_db.stp #9423: protection against densing of points near one end
+// clang-format on
gp_Pnt LowBound = GAC.Value(uMin);
gp_Pnt HigBound = GAC.Value(uMax);
distmin = LowBound.Distance(P3D);
// 15.11.2002 PTV OCC966
if (ShapeAnalysis_Curve::IsPeriodic(theCurve)) {
+// clang-format off
ElCLib::AdjustPeriodic(cf,cl,Precision::PConfusion(),First,Last); //:a7 abv 11 Feb 98: preci -> PConfusion()
+// clang-format on
}
else if (First < Last) {
// nothing to fix
{
TopLoc_Location L;
const Handle(Geom_Surface)& S = BRep_Tool::Surface(face, L);
+// clang-format off
return CheckVerticesWithPCurve (edge, S, L, preci, vtx); //szv#4:S4163:12Mar99 `vtx,preci` wrong parameters order
+// clang-format on
}
{
case 0: myStatus = ShapeExtend::EncodeStatus (ShapeExtend_OK); break;
case 1: myStatus = ShapeExtend::EncodeStatus (ShapeExtend_DONE1); break;
+// clang-format off
case 2: myStatus = ShapeExtend::EncodeStatus (ShapeExtend_DONE2); break; // this value is not returned
case -1: myStatus = ShapeExtend::EncodeStatus (ShapeExtend_DONE3); break;
case -2: myStatus = ShapeExtend::EncodeStatus (ShapeExtend_DONE4); break; // this value is not returned
case 3: myStatus = ShapeExtend::EncodeStatus (ShapeExtend_DONE5); break; // only shifted
case -10: myStatus = ShapeExtend::EncodeStatus (ShapeExtend_FAIL1); break; // this value is not returned
+// clang-format on
}
return LastCheckStatus (ShapeExtend_DONE);
}
return Standard_False;
}
if ( Abs ( a1 - b1 ) <= ::Precision::PConfusion() ||
+// clang-format off
Abs ( a2 - b2 ) <= ::Precision::PConfusion() ) return Standard_False; //:f7 abv 6 May 98: BUC50070 on #42276
+// clang-format on
Standard_Boolean isForward1 = ( edge1.Orientation() == TopAbs_FORWARD );
Standard_Boolean isForward2 = ( edge2.Orientation() == TopAbs_FORWARD );
param2-b2 > ::Precision::PConfusion() ) continue;
//:82 abv 21 Jan 98: point of intersection on Crv1 and Crv2 is different
+// clang-format off
gp_Pnt pi1 = GetPointOnEdge ( edge1, mySurf, C1, param1 ); //:h0: thesurf.Value ( Crv1->Value ( param1 ) );
gp_Pnt pi2 = GetPointOnEdge ( edge2, mySurf, C2, param2 ); //:h0: thesurf.Value ( Crv2->Value ( param2 ) );
+// clang-format on
gp_Pnt pint = 0.5 * ( pi1.XYZ() + pi2.XYZ() );
Standard_Real di1 = pi1.SquareDistance ( pnt );
Standard_Real di2 = pi2.SquareDistance ( pnt );
Tr2.PositionOnCurve() != IntRes2d_Middle ) continue;
Standard_Real param1 = IP.ParamOnFirst();
Standard_Real param2 = IP.ParamOnSecond();
+// clang-format off
gp_Pnt pi1 = GetPointOnEdge ( edge1, mySurf, C1, param1 ); //:h0: thesurf.Value ( Crv1->Value ( param1 ) );
+// clang-format on
gp_Pnt pi2 = GetPointOnEdge ( edge2, mySurf, C2, param2 );
Standard_Boolean OK1 = Standard_False;
Standard_Boolean OK2 = Standard_False;
if ( GC->IsCurve3D() )
B.Range ( E, first, last );
else if ( GC->IsCurveOnSurface() )
+// clang-format off
B.Range (E, GC->Surface(), edge.Location().Multiplied (GC->Location()), first, last);//BUC50003 entity 132 edge 1
+// clang-format on
}
*/
return E;
else {
if(fromGC->PCurve().IsNull()) continue; }
+// clang-format off
if ( ! isC3d && ! fromGC->IsCurveOnSurface()) continue; // only 3d curves and pcurves are treated
+// clang-format on
Handle(Geom_Surface) surface;
TopLoc_Location L;
if(result->IsKind(STANDARD_TYPE(Geom2d_Conic))) {
//gp_Pln pln(gp_Pnt(0,0,0),gp_Dir(0,0,1));
//Handle(Geom_Curve) curve = GeomAPI::To3d(result,pln);
+// clang-format off
Handle(Geom2d_Curve) tcurve = new Geom2d_TrimmedCurve(result,aFirst,aLast); //protection against parabols ets
+// clang-format on
Geom2dConvert_ApproxCurve approx (tcurve, Precision::Approximation(),
GeomAbs_C1, 100, 6 );
if ( approx.HasResult() )
if(C3D->IsKind(STANDARD_TYPE(Geom_Conic)))
MaxDeg = Min(MaxDeg,6);
+// clang-format off
Handle(Geom_Curve) tcurve = new Geom_TrimmedCurve(C3D,First,Last); //protection against parabols ets
+// clang-format on
try {
OCC_CATCH_SIGNALS
GeomConvert_ApproxCurve approx (tcurve, Tol3d, Continuity, MaxSegments, MaxDeg);
{
Handle(Geom2d_BSplineCurve) aBSpline2d;
if(C2D->IsKind(STANDARD_TYPE(Geom2d_Conic))) {
+// clang-format off
Handle(Geom2d_Curve) tcurve = new Geom2d_TrimmedCurve(C2D,First,Last); //protection against parabols ets
+// clang-format on
Geom2dConvert_ApproxCurve approx (tcurve, Tol2d, Continuity, MaxSegments, MaxDegree);
if ( approx.HasResult() )
aBSpline2d = approx.Curve();
}
}
if (DistMin2 < RealLast())
+// clang-format off
preci = 0.9 * Sqrt (DistMin2); // preci est la distance min entre les points on la reduit un peu
+// clang-format on
if (nbPntDropped == 0)
return;
if (mp[0] > 0 &&
( ! p1OnIso || currd2[0] < mind2[0] ) ) {
p1OnIso = Standard_True;
+// clang-format off
mind2[0] = currd2[0]; // LP2.stp #105899: FLT_INVALID_OPERATION on Windows 7 VC 9 Release mode on the whole file
+// clang-format on
if (isoU) valueP1.SetCoord(isoVal, tp[0]);
else valueP1.SetCoord(tp[0], isoVal);
}
for (Standard_Integer i=2; i < nbrPnt && isoByDistance; i++) {
Standard_Real dist = sac.NextProject (prevParam,cIso,points(i),
prec,pt,t,Cf,Cl,
+// clang-format off
Standard_False); //:j8 abv 10.12.98: TR10 r0501_db.stp #9423: avoid adjusting to ends
+// clang-format on
prevParam = t;
pout(i)=t;
if( (dist > prec) || (t < Cf) || (t > Cl) )
if (aCurve->IsKind(STANDARD_TYPE(Geom_Conic)) && myParameters->ConvertCurve3d()) {
Handle(Geom_BSplineCurve) aBSpline;
+// clang-format off
Handle(Geom_Curve) tcurve = new Geom_TrimmedCurve(aCurve,First,Last); //protection against parabols ets
+// clang-format on
GeomConvert_ApproxCurve approx (tcurve, myTol3d/*Precision::Approximation()*/, myContinuity2d, myNbMaxSeg, 6 );
if ( approx.HasResult() )
aBSpline = approx.Curve();
if (aCurve->IsKind(STANDARD_TYPE(Geom2d_Conic)) && myParameters->ConvertCurve2d()) {
Handle(Geom2d_BSplineCurve) aBSpline2d;
+// clang-format off
Handle(Geom2d_Curve) tcurve = new Geom2d_TrimmedCurve(aCurve,First,Last); //protection against parabols ets
+// clang-format on
Geom2dConvert_ApproxCurve approx (tcurve, myTol2d,myContinuity2d,myNbMaxSeg , 6 );
if ( approx.HasResult() )
aBSpline2d = approx.Curve();
Standard_Real u1, u2, v1, v2;
myPatches->Value(i,j)->Bounds ( u1, u2, v1, v2 );
Standard_Real scale = ( myUJointValues->Value(i+1) - myUJointValues->Value(i) ) / ( u2 - u1 );
+// clang-format off
return u * scale + ( myUJointValues->Value(i) - u1 * scale ); // ! this formula is stable if u1 is infinite
+// clang-format on
}
//=======================================================================
Standard_Real u1, u2, v1, v2;
myPatches->Value(i,j)->Bounds ( u1, u2, v1, v2 );
Standard_Real scale = ( myVJointValues->Value(j+1) - myVJointValues->Value(j) ) / ( v2 - v1 );
+// clang-format off
return v * scale + ( myVJointValues->Value(j) - v1 * scale ); // ! this formula is stable if v1 is infinite
+// clang-format on
}
//=======================================================================
Standard_Real u1, u2, v1, v2;
myPatches->Value(i,j)->Bounds ( u1, u2, v1, v2 );
Standard_Real scale = ( u2 - u1 ) / ( myUJointValues->Value(i+1) - myUJointValues->Value(i) );
+// clang-format off
return U * scale + ( u1 - myUJointValues->Value(i) * scale ); // ! this formula is stable if u1 is infinite
+// clang-format on
}
//=======================================================================
Standard_Real u1, u2, v1, v2;
myPatches->Value(i,j)->Bounds ( u1, u2, v1, v2 );
Standard_Real scale = ( v2 - v1 ) / ( myVJointValues->Value(j+1) - myVJointValues->Value(j) );
+// clang-format off
return V * scale + ( v1 - myVJointValues->Value(j) * scale ); // ! this formula is stable if v1 is infinite
+// clang-format on
}
//=======================================================================
if(nbNMEdges)
{
+// clang-format off
ShapeFix_WireSegment seg ( sbwdNM, TopAbs_INTERNAL); //(( isOuter ? TopAbs_REVERSED : TopAbs_FORWARD ) );
+// clang-format on
seqw.Append ( seg );
}
sbwdM->Reverse(face);
}
+// clang-format off
ShapeFix_WireSegment seg ( sbwdM, TopAbs_REVERSED ); //(( isOuter ? TopAbs_REVERSED : TopAbs_FORWARD ) );
+// clang-format on
seqw.Append ( seg );
}
}
if ( iedge ==1 ) { firstCode = code; firstPos = pos; firstDev = dev; }
else if ( code == IOR_UNDEF || code != prevCode ) {
if ( ! closedDir || Abs ( dev - prevDev ) < halfPeriod ) {
+// clang-format off
IntLinePar.Append ( ParamPointsOnLine ( pos, prevPos, line ) ); // !! - maybe compute exactly ?
+// clang-format on
IntEdgePar.Append ( isreversed ? l : f );
IntEdgeInd.Append ( iedge );
}
// split by u lines
for ( i = ( myUClosed ? 1 : 2 ); i <= myGrid->NbUPatches(); i++ ) {
+// clang-format off
gp_Pnt2d pos ( myGrid->UJointValue(i), 0. ); // 0. - for infinite ranges: myGrid->VJointValue(1) ;
+// clang-format on
gp_Lin2d line ( pos, gp_Dir2d ( 0., 1. ) );
if ( ! myClosedMode && myUClosed ) {
Standard_Real period = Umax - Umin;
// Handle(ShapeExtend_WireData)
sbwd = wires(j).WireData();
for ( Standard_Integer k=1; k <= sbwd->NbEdges(); k++ ) {
+// clang-format off
if ( !V.IsSame ( sae.FirstVertex ( sbwd->Edge(k) ) ) ) continue; //pdn I suppose that short segment should be inserted into the SAME vertex.
+// clang-format on
Standard_Boolean sp = IsSamePatch ( wires(j), myGrid->NbUPatches(), myGrid->NbVPatches(),
iumin, iumax, ivmin, ivmax );
theBuilder.Add( theEdge, theNewVertex );
if (use_start && use_end) {
// process special case for closed edge
+// clang-format off
theBuilder.Remove( theEdge, theOldVertex.Oriented(TopAbs_REVERSED) ); // remove reversed from closed edge
theBuilder.Add( theEdge, theNewVertex.Oriented(TopAbs_REVERSED) ); // add reversed to closed edge
+// clang-format on
}
theEdge.Free(freeflag);
}
TopTools_SequenceOfShape aLoopWires;
if(NeedFix ( myFixLoopWiresMode) && FixLoopWire(aLoopWires)) {
if (aLoopWires.Length() > 1)
+// clang-format off
SendWarning ( wire, Message_Msg ( "FixAdvFace.FixLoopWire.MSG0" ) );// Wire was split on several wires
+// clang-format on
myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE7 );
fixed = Standard_True;
Standard_Integer k=1;
}
// B.UpdateFace (myFace,myPrecision);
+// clang-format off
SendWarning ( myFace, Message_Msg ( "FixAdvFace.FixOrientation.MSG0" ) );// Face created with natural bounds
+// clang-format on
BRepTools::Update(myFace);
myResult = myFace;
return Standard_True;
#ifdef OCCT_DEBUG
std::cout<<"Natural bound on sphere or torus with holes added"<<std::endl; // mise au point !
#endif
+// clang-format off
SendWarning ( myFace, Message_Msg ( "FixAdvFace.FixOrientation.MSG0" ) );// Face created with natural bounds
+// clang-format on
return Standard_True;
}
new ShapeExtend_WireData(TopoDS::Wire(ws.Value(1)));
sbdw->Reverse(myFace);
ws.SetValue(1, sbdw->Wire());
+// clang-format off
SendWarning(sbdw->Wire(), Message_Msg("FixAdvFace.FixOrientation.MSG5"));// Wire on face was reversed
+// clang-format on
done = Standard_True;
}
}
}
if (sta == TopAbs_UNKNOWN) { // ERREUR
+// clang-format off
SendWarning ( aw, Message_Msg ( "FixAdvFace.FixOrientation.MSG11" ) );// Cannot orient wire
+// clang-format on
}
else {
MW.Bind(aw,IntWires);
ShapeExtend_WireData sewd (aw);
sewd.Reverse(myFace);
ws.SetValue (i,sewd.Wire());
+// clang-format off
SendWarning ( sewd.Wire(), Message_Msg ( "FixAdvFace.FixOrientation.MSG5" ) );// Wire on face was reversed
+// clang-format on
aSeqReversed.Append(i);
done = Standard_True;
SI.Bind(ws.Value(i),1);
ShapeExtend_WireData sewd (aw);
sewd.Reverse(myFace);
ws.SetValue (i,sewd.Wire());
+// clang-format off
SendWarning ( sewd.Wire(), Message_Msg ( "FixAdvFace.FixOrientation.MSG5" ) );// Wire on face was reversed
+// clang-format on
aSeqReversed.Append(i);
done = Standard_True;
MapWires.Bind(ws.Value(i),IW);
ShapeExtend_WireData sewd (aw);
sewd.Reverse(myFace);
ws.SetValue (i,sewd.Wire());
+// clang-format off
SendWarning ( sewd.Wire(), Message_Msg ( "FixAdvFace.FixOrientation.MSG5" ) );// Wire on face was reversed
+// clang-format on
aSeqReversed.Append(i);
done = Standard_True;
}
for( ; k <= aSeqReversed.Length(); k++ )
{
#ifdef OCCT_DEBUG
+// clang-format off
std::cout<<"Wire no "<<aSeqReversed.Value(k)<<" of "<<nb<<" reversed"<<std::endl; // mise au point !
+// clang-format on
#endif
}
if (aSas.HasFreeEdges())
{
aCurShell.Closed (Standard_False);
+// clang-format off
SendWarning (Message_Msg ("FixAdvShell.FixClosedFlag.MSG0"));//Shell has incorrect flag isClosed
+// clang-format on
}
aSas.Clear();
}
if (BRep_Tool::IsClosed(myShell)? isFreeBoundaries : !isFreeBoundaries)
{
myShell.Closed (!isFreeBoundaries);
+// clang-format off
SendWarning (Message_Msg ("FixAdvShell.FixClosedFlag.MSG0"));//Shell has incorrect flag isClosed
+// clang-format on
}
Standard_Boolean isGetShells = Standard_True;
//Gets possible shells with taking in account of multiconnexity.
done = Standard_True;
myStatus = ShapeExtend::EncodeStatus (ShapeExtend_FAIL);
+// clang-format off
SendWarning ( Message_Msg ( "FixAdvShell.FixOrientation.MSG20" ) );// Impossible to orient faces in shell, several shells created
+// clang-format on
return Standard_True;
}
if(aNumMultShell >1) {
if(!Context().IsNull())
Context()->Replace(shell, myShape);
if ( myNbShells == 1 )
+// clang-format off
SendWarning ( Message_Msg ( "FixAdvShell.FixOrientation.MSG0" ) );// Faces were incorrectly oriented in the shell, corrected
else
SendWarning ( Message_Msg ( "FixAdvShell.FixOrientation.MSG30" ) );// Improperly connected shell split into parts
+// clang-format on
return Standard_True;
}
else return Standard_False;
if(!aShell.IsNull()) {
TopoDS_Solid aSol = SolidFromShell(aShell);
if(ShapeExtend::DecodeStatus(myStatus,ShapeExtend_DONE2)) {
+// clang-format off
SendWarning (Message_Msg ("FixAdvSolid.FixOrientation.MSG20"));// Orientation of shell was corrected.
+// clang-format on
Context()->Replace(tmpShape,aSol);
tmpShape = aSol;
}
myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE3 );
TopoDS_Iterator aIt(tmpShape,Standard_False);
Context()->Replace(tmpShape,aIt.Value());
+// clang-format off
SendFail (Message_Msg ("FixAdvSolid.FixShell.MSG10")); // Solid can not be created from open shell.
}
}
TopTools_IndexedMapOfShape aMapSolids;
if(CreateSolids(aResShape,aMapSolids)) {
SendWarning (Message_Msg ("FixAdvSolid.FixOrientation.MSG20"));// Orientation of shell was corrected..
+// clang-format on
if(aMapSolids.Extent() ==1) {
const TopoDS_Shape& aResSol = aMapSolids.FindKey(1);
if(aResShape.ShapeType() == TopAbs_SHELL && myCreateOpenSolidMode) {
else {
mySolid =aResSol;
if(aResSol.ShapeType() == TopAbs_SHELL)
+// clang-format off
SendFail (Message_Msg ("FixAdvSolid.FixShell.MSG10")); // Solid can not be created from open shell.
}
Context()->Replace(aResShape,mySolid);
}
else if(aMapSolids.Extent() >1) {
SendWarning (Message_Msg ("FixAdvSolid.FixOrientation.MSG30"));// Bad connected solid a few solids were created.
+// clang-format on
BRep_Builder aB;
TopoDS_Compound aComp;
aB.MakeCompound(aComp);
aResSh = solid;
}
else if (aResShape.ShapeType() == TopAbs_SHELL)
+// clang-format off
SendFail(Message_Msg ("FixAdvSolid.FixShell.MSG10")); // Solid can not be created from open shell.
+// clang-format on
aB.Add(aComp,aResSh);
}
BRep_Tool::CurveOnSurface ( sbwd->Edge(i), C, S, L, first, last );
if ( C.IsNull() || Abs (last - first) < Precision::PConfusion())
{
+// clang-format off
SendWarning ( sbwd->Edge ( i ), Message_Msg ( "FixWire.FixCurve3d.Removed" ) );// Incomplete edge (with no pcurves or 3d curve) removed
+// clang-format on
sbwd->Remove ( i-- );
nb--;
myStatusEdgeCurves |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE5 );
// action: remove edge
if ( ! Context().IsNull() )
Context()->Remove(WireData()->Edge(n));
+// clang-format off
SendWarning ( WireData()->Edge ( n ), Message_Msg ( "FixAdvWire.FixSmall.MSG0" ) ); //Small edge(s) removed
+// clang-format on
WireData()->Remove ( n );
// call FixConnected in the case if vertices of the small edge were not the same
Seq2d->Append((t1+t2)/2);
Handle(TColStd_HSequenceOfReal) Seq3d = SFTP.Perform(Seq2d,Standard_False);
+// clang-format off
Standard_Real dist1 = pcurPnt.Distance(crv->Value(Seq3d->Value(1)));// correcting Seq3d already project
+// clang-format on
Standard_Real dist2 = pcurPnt.Distance(crv->Value(Seq3d->Value(2)));
Standard_Real dist3 = pcurPnt.Distance(crv->Value(Seq3d->Value(3)));
Standard_Real ftrim,ltrim;
Seq2d->Append((t1+t2)/2);
Handle (TColStd_HSequenceOfReal) Seq3d = SFTP.Perform(Seq2d,Standard_False);
+// clang-format off
Standard_Real dist1 = pcurPnt.Distance(crv->Value(Seq3d->Value(1)));// correcting Seq3d already project
+// clang-format on
Standard_Real dist2 = pcurPnt.Distance(crv->Value(Seq3d->Value(2)));
Standard_Real dist3 = pcurPnt.Distance(crv->Value(Seq3d->Value(3)));
Standard_Real ftrim,ltrim;
}
if ( LastFixStatus ( ShapeExtend_DONE ) && ! myShape.IsNull() ) {
+// clang-format off
SendWarning ( E, Message_Msg ( "FixAdvWire.FixIntersection.MSG5" ) );// Edge was self-intersecting, corrected
+// clang-format on
}
return LastFixStatus ( ShapeExtend_DONE );
myLastFixStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE7 );
}
if ( ! myShape.IsNull() ) {
+// clang-format off
SendWarning ( Message_Msg ( "FixAdvWire.FixIntersection.MSG10" ) );// Edges were intersecting, corrected
+// clang-format on
}
return Standard_True;
}
if(newTolers(i)>0) B.UpdateVertex(TopoDS::Vertex(vertices(i)),newTolers(i));
if ( ! myShape.IsNull() ) {
+// clang-format off
SendWarning ( Message_Msg ( "FixAdvWire.FixIntersection.MSG10" ) );// Edges were intersecting, corrected
+// clang-format on
}
return Standard_True;
}
//gka protection against joining seem edges with other edges
Standard_Boolean same_set1 = (theList1.Extent()==theList2.Extent() &&
+// clang-format off
((!isSeam && !isSeam1)|| (isSeam && isSeam1))); //gka
+// clang-format on
Standard_Boolean same_set2 = (theList3.Extent()==theList2.Extent() &&
((!isSeam && !isSeam2)|| (isSeam && isSeam2)));
TopTools_MapOfShape theSetOfFaces;
//gka protection against joining seem edges with other edges
Standard_Boolean same_set1 = (theList1.Extent()==theList2.Extent() &&
+// clang-format off
((!isSeam && !isSeam1)|| (isSeam && isSeam1))); //gka
+// clang-format on
Standard_Boolean same_set2 = (theList3.Extent()==theList2.Extent() &&
((!isSeam && !isSeam2)|| (isSeam && isSeam2)));
TopTools_MapOfShape theSetOfFaces;
Standard_Integer NewNbPoles = BSplCLib::NbPoles(deg, Standard_False, newMults);
TColgp_Array1OfPnt newPoles (1, NewNbPoles);
TColStd_Array1OfReal newWeights (1, NewNbPoles);
+// clang-format off
Standard_Integer PoleIndex = StartFlatIndex - deg;//Index of starting pole when splitting B-Spline is an index of starting knot
+// clang-format on
for (j = 1; j <= NewNbPoles; j++) {
newWeights (j) = Weights (j + PoleIndex - 1);
newPoles (j) = Poles (j + PoleIndex - 1);
Handle(Geom2d_BSplineCurve) aBSpline2d;
Standard_Real Shift = 0.;
if(myCurve->IsKind(STANDARD_TYPE(Geom2d_Conic))) {
+// clang-format off
Handle(Geom2d_Curve) tcurve = new Geom2d_TrimmedCurve(myCurve,First,Last); //protection against parabols ets
+// clang-format on
Geom2dConvert_ApproxCurve approx (tcurve, Precision::Approximation(),
GeomAbs_C1, 100, 6 );
if ( approx.HasResult() )
Handle(Geom_BSplineCurve) aBSpline;
Standard_Real Shift = 0.;
if(myCurve->IsKind(STANDARD_TYPE(Geom_Conic))) {
+// clang-format off
Handle(Geom_Curve) tcurve = new Geom_TrimmedCurve(myCurve,First,Last); //protection against parabols ets
+// clang-format on
GeomConvert_ApproxCurve approx (tcurve, Precision::Approximation(),
GeomAbs_C1, 100, 6 );
if ( approx.HasResult() )
//pdn
Standard_Real u1,u2,v1,v2;
bspline->Bounds(u1,u2,v1,v2);
+// clang-format off
GeomConvert_BSplineSurfaceToBezierSurface converter(bspline);//,UFirst,ULast,VFirst,VLast,precision;
+// clang-format on
Standard_Integer nbUPatches = converter.NbUPatches();
Standard_Integer nbVPatches = converter.NbVPatches();
TColStd_Array1OfReal UJoints(1, nbUPatches+1);
B.Range(edgenext,face,0,1);
}
+// clang-format off
if(bezier.IsNull() || beziernext.IsNull() ) continue; //gka fix against small edges ; merging ends of pcurves
+// clang-format on
Standard_Real f1,l1,f2,l2;
f1 = bezier->FirstParameter();
l1 = bezier->LastParameter();
for (exp.Init (myShape, TopAbs_EDGE, TopAbs_WIRE); exp.More(); exp.Next()) {
//smh#8
TopoDS_Shape tmpE = exp.Current().Oriented ( TopAbs_FORWARD );
+// clang-format off
TopoDS_Edge E = TopoDS::Edge (tmpE ); // protection against INTERNAL shapes
+// clang-format on
TopoDS_Vertex V1,V2;
TopExp::Vertices(E,V2,V1);
if( V1.IsNull() && V2.IsNull() ) continue; // skl 27.10.2004 for OCC5624
{
aBB.Add (aNewWire, CurEdge);
+// clang-format off
const TopoDS_Vertex& aVertex = TopExp::LastVertex (CurEdge, Standard_True); //with orientation
+// clang-format on
if (aVertex.IsSame(anOrigin))
break;
//gp_Pnt pntV2 = BRep_Tool::Pnt(V2); // pntV2 not used - see below (skl)
//Standard_Real V2Tol = LimitTolerance( BRep_Tool::Tolerance(V2) ); // V2Tol not used - see below (skl)
+// clang-format off
Handle(ShapeUpgrade_FixSmallCurves) FixSmallCurveTool = GetFixSmallCurveTool(); //gka Precision
+// clang-format on
FixSmallCurveTool->SetMinTolerance(MinTolerance());
FixSmallCurveTool->Init(E, myFace);
FixSmallCurveTool->SetSplitCurve3dTool(theSplit3dTool);
}
// initialize free lists
+// clang-format off
myFreeListMax = INDEX_CELL(ROUNDUP_CELL(myThreshold-BLOCK_SHIFT)); // all blocks less than myThreshold are to be recycled
+// clang-format on
myFreeList = (Standard_Size **) calloc (myFreeListMax+1, sizeof(Standard_Size *));
myCellSize = ROUNDUP16(myCellSize);
}
Standard_Size * myNextAddr; //!< next free address in the active memory pool
Standard_Size * myEndBlock; //!< end of the active memory pool
+// clang-format off
Standard_Integer myMMap; //!< non-null if using memory mapped files for allocation of large blocks
+// clang-format on
Standard_Size myThreshold; //!< large block size
Standard_Mutex myMutex; //!< Mutex to protect free lists data
const char* myBufferEnd; //!< end of the buffer
int64_t myDataLen; //!< length of entire data to read
int64_t myDataRead; //!< amount of data already processed
+// clang-format off
size_t myChunkLen; //!< length of single chunk that caller would like to read (e.g. iterator increment)
size_t myNbChunks; //!< number of cached chunks
size_t myBufferLen; //!< effective length of the buffer to be read at once (multiple of chunk length)
+// clang-format on
};
std::vector<char> myReadBuffer; //!< Temp read buffer
std::vector<char> myReadBufferLastStr; //!< Part of last string of myReadBuffer
+// clang-format off
bool myUseReadBufferLastStr; //!< Flag to use myReadBufferLastStr during next line reading
bool myIsMultilineMode; //!< Flag to process of the special multi-line case at the end of the line
bool myToPutGapInMultiline; //!< Flag to put gap space while joining lines in multi-line syntax
size_t myBufferPos; //!< Current position in myReadBuffer
size_t myBytesLastRead; //!< The number of characters that were read last time from myReadBuffer.
+// clang-format on
};
#endif // _Standard_ReadLineBuffer_HeaderFile
typedef char16_t Standard_Utf16Char; //!< UTF-16 char (always unsigned)
typedef char32_t Standard_Utf32Char; //!< UTF-32 char (always unsigned)
#endif
+// clang-format off
typedef wchar_t Standard_WideChar; //!< wide char (unsigned UTF-16 on Windows platform and signed UTF-32 on Linux)
+// clang-format on
//
typedef const Standard_Character* Standard_CString;
Handle(Geom_Surface) mySurface; //!< surface to place glyphs on to
Standard_Real myPrecision; //!< algorithm precision
Standard_Real myScaleUnits; //!< scale font rendering units into model units
+// clang-format off
Standard_Boolean myIsCompositeCurve; //!< flag to merge C1 curves of each contour into single C0 curve, OFF by default
+// clang-format on
protected: //! @name Shared temporary variables for glyph construction
public:
// Common
+// clang-format off
ReadMode_BSplineContinuity ReadBSplineContinuity = ReadMode_BSplineContinuity_C1; //<! Manages the continuity of BSpline curves
ReadMode_Precision ReadPrecisionMode = ReadMode_Precision_File; //<! Reads the precision mode value
double ReadPrecisionVal = 0.0001; //<! ReadMode_Precision for shape construction (if enabled user mode)
bool WriteLayer = true; //<! LayerMode is used to indicate write Layers or not
bool WriteProps = true; //<! PropsMode is used to indicate write Validation properties or not
STEPControl_StepModelType WriteModelType = STEPControl_AsIs; //<! Gives you the choice of translation mode for an Open CASCADE shape that is being translated to STEP
+// clang-format on
};
#endif // _StepData_ConfParameters_HeaderFile
Standard_Integer aResStringSize = aResString.Length() - 1; // skip the last apostrophe
TCollection_ExtendedString aTempExtString; // string for characters within control directives
Standard_Integer aSetCharInd = 1; // index to set value to result string
+// clang-format off
Resource_FormatType aLocalFormatType = Resource_FormatType_iso8859_1; // a code page for a "\S\" control directive
+// clang-format on
for (Standard_Integer aStringInd = 1; aStringInd <= aResStringSize; ++aStringInd)
{
const Standard_ExtCharacter aChar = aResString.Value(aStringInd);
Standard_Character aResChar = (char)convertCharacterTo16bit(aResString.Value(aStringInd + 3));
aResChar = (aResChar << 4) | (char)convertCharacterTo16bit(aResString.Value(aStringInd + 4));
const char aStrForConvert[2] = { aResChar, '\0' };
+// clang-format off
aTempExtString = TCollection_ExtendedString(aStrForConvert, Standard_False); // pass through without conversion
+// clang-format on
isConverted = Standard_True;
aStringInd += 4;
}
{
if (toConversion) // else skip moving
{
+// clang-format off
aResStringSize -= aStringInd - aSetCharInd - aTempExtString.Length() + 1; // change the string size to remove unused symbols
+// clang-format on
aResString.SetValue(aSetCharInd, aTempExtString);
aSetCharInd += aTempExtString.Length(); // move to the new position
aResString.SetValue(aSetCharInd, aResString.ToExtString() + aStringInd);
const Standard_ExtCharacter aCharNext = aResString.Value(aStringInd + 1);
if (aCharNext == aChar && (aChar == '\'' || aChar == '\\'))
{
+// clang-format off
aResString.SetValue(aSetCharInd, aResString.ToExtString() + aStringInd); // move the string,removing one symbol
+// clang-format on
aResStringSize--; // change the string size to remove unused symbol
aResString.Trunc(aResStringSize);
}
if (aCharNext == 'N')
{
aResString.SetValue(aSetCharInd++, '\n');
+// clang-format off
aResString.SetValue(aSetCharInd, aResString.ToExtString() + aStringInd + 2); // move the string,removing two symbols
aResStringSize-=2; // change the string size to remove unused symbols
aResString.Trunc(aResStringSize);
{
aResString.SetValue(aSetCharInd++, '\t');
aResString.SetValue(aSetCharInd, aResString.ToExtString() + aStringInd + 2); // move the string,removing two symbols
+// clang-format on
aResStringSize-=2; // change the string size to remove unused symbols
aResString.Trunc(aResStringSize);
continue;
{
if (atype.Length() == 0) return;
if (themult) {
+// clang-format off
if (thelevel != 1) throw Interface_InterfaceMismatch("StepWriter : StartEntity"); // decompte de parentheses mauvais ...
+// clang-format on
AddString(textendlist);
AddString(" ",1); //skl 29.01.2003
}
void StepData_StepWriter::EndEntity ()
{
+// clang-format off
if (thelevel != 1) throw Interface_InterfaceMismatch("StepWriter : EndEntity"); // decompte de parentheses mauvais ...
+// clang-format on
AddString(textendent);
thelevel = 0; // on garde theindval : sera traite au prochain NewLine
Standard_Boolean indent = theindent; theindent = Standard_False;
Standard_Integer nbhead, nbrec, nbpar;
aFileDataModel.GetFileNbR (&nbhead,&nbrec,&nbpar); // renvoi par lex/yacc
Handle(StepData_StepReaderData) undirec =
+// clang-format off
new StepData_StepReaderData(nbhead,nbrec,nbpar, theStepModel->SourceCodePage()); // creation tableau de records
+// clang-format on
for ( Standard_Integer nr = 1; nr <= nbrec; nr ++) {
int nbarg; char* ident; char* typrec = 0;
aFileDataModel.GetRecordDescription(&ident, &typrec, &nbarg);
Standard_Integer myNbPar; //!< Total number of parameters read
Standard_Integer myYaRec; //!< Presence record already created (after 1 Ident)
Standard_Integer myNumSub; //!< Number of current sublist
+// clang-format off
Standard_Boolean myErrorArg; //!< Control of error argument (true - error argument was created)
char* myResText; //!< Text value written by Flex and passed to Bison to create record
+// clang-format on
char* myCurrType; //!< Type of last record read
char* mySubArg; //!< Ident last record (possible sub-list)
Interface_ParamType myTypeArg; //!< Type of last argument read
Standard_Real myUpperLimitActualTranslation; //!< optional
Standard_Real myLowerLimitActualRotation; //!< optional
Standard_Real myUpperLimitActualRotation; //!< optional
+// clang-format off
Standard_Boolean defLowerLimitActualTranslation; //!< flag "is LowerLimitActualTranslation defined"
Standard_Boolean defUpperLimitActualTranslation; //!< flag "is UpperLimitActualTranslation defined"
+// clang-format on
Standard_Boolean defLowerLimitActualRotation; //!< flag "is LowerLimitActualRotation defined"
Standard_Boolean defUpperLimitActualRotation; //!< flag "is UpperLimitActualRotation defined"
Standard_Boolean defUpperLimitActualRotationY; //!< flag "is UpperLimitActualRotationY defined"
Standard_Boolean defLowerLimitActualRotationZ; //!< flag "is LowerLimitActualRotationZ defined"
Standard_Boolean defUpperLimitActualRotationZ; //!< flag "is UpperLimitActualRotationZ defined"
+// clang-format off
Standard_Boolean defLowerLimitActualTranslationX; //!< flag "is LowerLimitActualTranslationX defined"
Standard_Boolean defUpperLimitActualTranslationX; //!< flag "is UpperLimitActualTranslationX defined"
Standard_Boolean defLowerLimitActualTranslationY; //!< flag "is LowerLimitActualTranslationY defined"
Standard_Boolean defUpperLimitActualTranslationY; //!< flag "is UpperLimitActualTranslationY defined"
Standard_Boolean defLowerLimitActualTranslationZ; //!< flag "is LowerLimitActualTranslationZ defined"
Standard_Boolean defUpperLimitActualTranslationZ; //!< flag "is UpperLimitActualTranslationZ defined"
+// clang-format on
};
#endif // _StepKinematics_LowOrderKinematicPairWithRange_HeaderFile_
DEFINE_STANDARD_RTTIEXT(StepKinematics_PairRepresentationRelationship, StepGeom_GeometricRepresentationItem)
private:
+// clang-format off
Handle(StepRepr_RepresentationRelationshipWithTransformation) myRepresentationRelationshipWithTransformation; //!< supertype
+// clang-format on
};
#endif // _StepKinematics_PairRepresentationRelationship_HeaderFile_
Standard_Real myUpperLimitActualTranslationY; //!< optional
Standard_Boolean defLowerLimitActualRotation; //!< flag "is LowerLimitActualRotation defined"
Standard_Boolean defUpperLimitActualRotation; //!< flag "is UpperLimitActualRotation defined"
+// clang-format off
Standard_Boolean defLowerLimitActualTranslationX; //!< flag "is LowerLimitActualTranslationX defined"
Standard_Boolean defUpperLimitActualTranslationX; //!< flag "is UpperLimitActualTranslationX defined"
Standard_Boolean defLowerLimitActualTranslationY; //!< flag "is LowerLimitActualTranslationY defined"
Standard_Boolean defUpperLimitActualTranslationY; //!< flag "is UpperLimitActualTranslationY defined"
+// clang-format on
};
#endif // _StepKinematics_PlanarPairWithRange_HeaderFile_
private:
Standard_Real myLowerLimitActualTranslation; //!< optional
Standard_Real myUpperLimitActualTranslation; //!< optional
+// clang-format off
Standard_Boolean defLowerLimitActualTranslation; //!< flag "is LowerLimitActualTranslation defined"
Standard_Boolean defUpperLimitActualTranslation; //!< flag "is UpperLimitActualTranslation defined"
+// clang-format on
};
#endif // _StepKinematics_PrismaticPairWithRange_HeaderFile_
private:
Standard_Real myLowerLimitRackDisplacement; //!< optional
Standard_Real myUpperLimitRackDisplacement; //!< optional
+// clang-format off
Standard_Boolean defLowerLimitRackDisplacement; //!< flag "is LowerLimitRackDisplacement defined"
Standard_Boolean defUpperLimitRackDisplacement; //!< flag "is UpperLimitRackDisplacement defined"
+// clang-format on
};
#endif // _StepKinematics_RackAndPinionPairWithRange_HeaderFile_
Standard_Real uFact = 1.;
Standard_Real vFact = 1.;
const Standard_Real LengthFact = theLocalFactors.LengthFactor();
+// clang-format off
const Standard_Real AngleFact = theLocalFactors.PlaneAngleFactor(); // abv 30.06.00 trj4_k1_geo-tc-214.stp #1477: PI/180.;
+// clang-format on
if (theBasis->IsKind(STANDARD_TYPE(Geom_SphericalSurface)) ||
theBasis->IsKind(STANDARD_TYPE(Geom_ToroidalSurface))) {
Abs(line1->Dir()->Orientation()->DirectionRatiosValue(2) -
line2->Dir()->Orientation()->DirectionRatiosValue(2));
+// clang-format off
Standard_Real preci2d = Precision::PConfusion(); //:S4136: Parametric(BRepAPI::Precision(),10);
+// clang-format on
if ((DeltaX < preci2d) || (DeltaY < preci2d))
return ((DeltaDirX < preci2d) && (DeltaDirY < preci2d));
if (theCurve->IsPeriodic())
{
+// clang-format off
ElCLib::AdjustPeriodic(cf, cl, Precision::PConfusion(), w1, w2); //:a7 abv 11 Feb 98: preci -> PConfusion()
+// clang-format on
}
else if (theCurve->IsClosed())
{
// isLikeSeam = Two faces on the same Surface
StepPCurve1 = SurfCurve->AssociatedGeometryValue(1).Pcurve();
StepPCurve2 = SurfCurve->AssociatedGeometryValue(2).Pcurve();
+// clang-format off
if (StepPCurve1.IsNull() || StepPCurve2.IsNull()) hasPcurve = Standard_False; //smh : BUC60810
+// clang-format on
else {
C2d1 = myTranEdge.MakePCurve(StepPCurve1, ConvSurf, theLocalFactors);
C2d2 = myTranEdge.MakePCurve(StepPCurve2, ConvSurf, theLocalFactors);
TColStd_intMapNode** myData1; //!< data array
Standard_Integer myNbBuckets; //!< number of buckets (size of data array)
Standard_Integer myNbPackedMapNodes; //!< amount of packed map nodes
+// clang-format off
Standard_Size myExtent; //!< extent of this map (number of unpacked integer keys)
+// clang-format on
};
#endif
private:
Standard_PExtCharacter mystring{}; //!< NULL-terminated string
+// clang-format off
Standard_Integer mylength{}; //!< length in 16-bit code units (excluding terminating NULL symbol)
+// clang-format on
};
namespace std
{
myIsDone = Standard_False;
if(mySL.Data()->Root().IsDifferent(myTL.Data()->Root()) && //TDF_Data is not the same
+// clang-format off
!TDF_Tool::IsSelfContained(mySL, myFilter)) return; //source label isn't self-contained
+// clang-format on
Standard_Boolean extReferers =
ExternalReferences(mySL, myMapOfExt, myFilter);
void TDF_Reference::References(const Handle(TDF_DataSet)& aDataSet) const
{
+// clang-format off
if (!Label().IsImported()) aDataSet->AddLabel( myOrigin); //pour real et entier mais surtout pas les parts ...
+// clang-format on
}
//=======================================================================
Standard_Integer TDataXtd_Presentation::getOldColorNameFromNewEnum (Quantity_NameOfColor theNew)
{
Standard_Integer anOld = theNew;
+// clang-format off
if (theNew >= Quantity_NOC_CHARTREUSE2) { ++anOld; } // Quantity_NOC_CHARTREUSE1 merged to Quantity_NOC_CHARTREUSE1
if (theNew >= Quantity_NOC_GOLD2) { ++anOld; } // Quantity_NOC_GOLD1 merged to Quantity_NOC_GOLD
+// clang-format on
if (theNew >= Quantity_NOC_GRAY2 && theNew <= Quantity_NOC_GRAY89)
{
if (theNew == Quantity_NOC_GRAY2) { return 146; }
if (theNew == Quantity_NOC_GRAY99) { return 237; }
if (theNew >= Quantity_NOC_GREEN) { anOld -= 3; } // moved Quantity_NOC_GRAY96, 97, 98
+// clang-format off
if (theNew >= Quantity_NOC_GREEN2) { ++anOld; } // Quantity_NOC_GREEN1 merged to Quantity_NOC_GREEN
if (theNew >= Quantity_NOC_HONEYDEW) { anOld += 3; } // moved Quantity_NOC_GRAY96, 97, 98
if (theNew >= Quantity_NOC_ORANGE2) { ++anOld; } // Quantity_NOC_ORANGE1 merged to Quantity_NOC_ORANGE
if (theNew >= Quantity_NOC_RED2) { ++anOld; } // Quantity_NOC_RED1 merged to Quantity_NOC_RED
if (theNew >= Quantity_NOC_TOMATO2) { ++anOld; } // Quantity_NOC_TOMATO1 merged to Quantity_NOC_TOMATO
if (theNew >= Quantity_NOC_YELLOW2) { ++anOld; } // Quantity_NOC_YELLOW1 merged to Quantity_NOC_YELLOW
+// clang-format on
return anOld;
}
delete pIDMap;
}
if(aMap(aDeltasIterator.Value()->Label()).Add(aDeltasIterator.Value()->ID())) //The attribute is not
+// clang-format off
aCompoundDelta->AddAttributeDelta(aDeltasIterator.Value()); //already in the delta
+// clang-format on
}
}
}
else {
#ifdef OCCT_DEBUG
+// clang-format off
std::cout <<" TNaming_Localization : S n est pas dans le solide"<<std::endl;//S is not in the solid
+// clang-format on
#endif
}
}
TDF_LabelMap Forbiden;
TNaming_NamingTool::BuildDescendants (Stop, Forbiden);//fill Forbidden
+// clang-format off
TNaming_NamingTool::CurrentShape (Valid, Forbiden,it.Value(),MS); // fill MS with last modifications of the first argument
TopoDS_Shape CS = MakeShape(MS);
if(isOr)
KeepInList(CS,ShapeType,aListS);
TNaming_ShapesSet S(CS,ShapeType);//fill internal map of shapeset by shapes of the specified type
+// clang-format on
#ifdef OCCT_DEBUG_UNN
TCollection_AsciiString entry;
TDF_Tool::Entry(it.Value()->Label(), entry);
TDF_Tool::Entry(it.Value()->Label(), entry);
#endif
MS.Clear();
+// clang-format off
TNaming_NamingTool::CurrentShape (Valid, Forbiden,it.Value(),MS);// fill MS with last modifications of the it.Value()
+// clang-format on
CS = MakeShape(MS);
if(isOr)
KeepInList(CS,ShapeType,aListS);
TDF_LabelMap Forbiden;
if(!ValidArgs(Args)) return Standard_False;
+// clang-format off
TNaming_NamingTool::BuildDescendants (Stop, Forbiden); //all descendants of Stop (New shapes) are forbidden
+// clang-format on
if (!Stop.IsNull()) Forbiden.Remove(Stop->Label());
//----------------------------------------
// First argument: collection has to be filtered.
#endif
TopTools_IndexedMapOfShape SCand;
+// clang-format off
TNaming_NamingTool::CurrentShape (Valid, Forbiden,Cand,SCand);//fills SCand with last modifications of Cand. CandNS should be at the same level (before) as NS of FilterByNBS
+// clang-format on
#ifdef OCCT_DEBUG_FNB
TCollection_AsciiString aNam2("SCand");
//------------------------------------------------------------
TopAbs_ShapeEnum TC = TopAbs_EDGE;
if (ShapeType == TopAbs_EDGE) TC = TopAbs_VERTEX;
+// clang-format off
if (ShapeType == TopAbs_VERTEX) TC = TopAbs_VERTEX; // szy 31.03.10 - to process case when Candidate is of type Vertex
+// clang-format on
#ifdef OCCT_DEBUG_FNB
i=1;
if(S.ShapeType() == TopAbs_VERTEX) //# szy 31.03.10
Boundaries.Add (S); //#
else //#
+// clang-format off
for (TopExp_Explorer exp(S,TC); exp.More(); exp.Next()) { //put boundaries of each candidate (from SCand) to the Boundaries map
+// clang-format on
Boundaries.Add (exp.Current());
#ifdef OCCT_DEBUG_FNB
TCollection_AsciiString aName = aNam + i++ + ext;
#endif
TopTools_IndexedMapOfShape SVois;
+// clang-format off
TNaming_NamingTool::CurrentShape (Valid, Forbiden,NSVois,SVois); // fills SVois with last modifications of NSVois
+// clang-format on
#ifdef OCCT_DEBUG_FNB
TCollection_AsciiString aNam2("SVois");
TDF_LabelMap Forbiden;
TNaming_NamingTool::BuildDescendants (Stop, Forbiden);//fill Forbidden
+// clang-format off
TNaming_NamingTool::CurrentShape (Valid, Forbiden, anIter.Value(),MS); // fill MS with last modifications of the first additional argument
TopoDS_Shape CS = MakeShape(MS);
TNaming_ShapesSet aSet(CS,TopAbs_EDGE);//fill internal map of shapeset by shapes of the specified type
+// clang-format on
#ifdef OCCT_DEBUG_WIN
TCollection_AsciiString entry;
TDF_Tool::Entry(it.Value()->Label(), entry);
TDF_Tool::Entry(it.Value()->Label(), entry);
#endif
MS.Clear();
+// clang-format off
TNaming_NamingTool::CurrentShape (Valid, Forbiden,anIter.Value(),MS);// fill MS with last modifications of the it.Value()
+// clang-format on
CS = MakeShape(MS);
TNaming_ShapesSet OS(CS,TopAbs_EDGE);
aSet.Add(OS); //concatenate both shapesets
TDF_LabelMap Forbiden;
TNaming_NamingTool::BuildDescendants (Stop, Forbiden);//fill Forbidden
+// clang-format off
TNaming_NamingTool::CurrentShape (Valid, Forbiden, anIter.Value(),MS); // fill MS with last modifications of the first additional argument
TopoDS_Shape CS = MakeShape(MS);
TNaming_ShapesSet aSet(CS,TopAbs_FACE);//fill internal map of shapeset by shapes of the specified type
+// clang-format on
#ifdef OCCT_DEBUG_SHELL
TCollection_AsciiString entry;
TDF_Tool::Entry(anIter.Value()->Label(), entry);
TDF_Tool::Entry(anIter.Value()->Label(), entry);
#endif
MS.Clear();
+// clang-format off
TNaming_NamingTool::CurrentShape (Valid, Forbiden,anIter.Value(),MS);// fill MS with last modifications of the it.Value()
+// clang-format on
CS = MakeShape(MS);
TNaming_ShapesSet OS(CS,TopAbs_FACE);
aSet.Add(OS); //concatenate both shapesets
TCollection_AsciiString aNam("GetShapeEvolutions");
WriteNSOnLabel(aTarget,aNam);
#endif
+// clang-format off
if (aTarget->Label() == theSource->Label()) return Standard_True; // check if target is in the source
+// clang-format on
} else return Standard_False;
TNaming_Iterator anIter(aTarget);
if (anIter.OldShape().IsNull() || anIter.NewShape().IsNull()) continue;
if (!anIter.NewShape().IsSame(theTarget)) continue;
if (GetShapeEvolutions(anIter.OldShape(),theSource,aList)) { // recursion: now target is old shape
+// clang-format off
aList.Append(theTarget); // if oldshape has the source as parent (or belongs to it) , fill the list
+// clang-format on
return Standard_True;
}
}
aMap.Add(aNIter1.OldShape());
}
}
+// clang-format off
TNaming_Iterator aNIter2(aResult); // if some another shapes has oldshape from map, return namedshape with this oldshape
+// clang-format on
for(;aNIter2.More();aNIter2.Next()) {
if (aNIter2.NewShape().IsSame(anIter.Value())) continue;
for (exp.Init(S,TopAbs_FACE) ; exp.More(); exp.Next()) {
aMS.Add(exp.Current());
}
+// clang-format off
for (exp.Init(Res,TopAbs_FACE) ; exp.More(); exp.Next()) { //content of MS and Res should be the same
+// clang-format on
if (aMS.Contains(exp.Current())) {
aMS.Remove(exp.Current());
}
// Is context the current state
//----------------------------------------------------
Handle(TNaming_NamedShape) NS = TNaming_Tool::NamedShape(Context,Acces);
+// clang-format off
Handle(TNaming_NamedShape) Next = NextModif(NS); // if NS has subsequent evolution = MODIFY, return it
+// clang-format on
if (Next.IsNull()) {
MDF.WithValid(Standard_False);
return;
TopoDS_Iterator it(itw.Value());
for(int i=1;it.More();it.Next(),i++) {
if(it.Value().IsEqual(S)) {
+// clang-format off
theName.Index(i);//We use this field to save a Seam Shape Index; Before this field was used for GENERATED only
+// clang-format on
found = Standard_True;
#ifdef MDTV_OR
std::cout << "ORDER = " << i <<std::endl;
// LastModif(it, S, MS, Valid, Forbiden);
TopTools_IndexedMapOfShape MS2;
LastModif(it, S, MS2, Valid, Forbiden);
+// clang-format off
if (YaOrientationToApply) ApplyOrientation (MS2, OrientationToApply);//the solution to be refined
+// clang-format on
for (Standard_Integer anItMS2 = 1; anItMS2 <= MS2.Extent(); ++anItMS2)
MS.Add (MS2 (anItMS2));
}
TDF_ChildIDIterator cit(CNS->Label(), TNaming_NamedShape::GetID(), Standard_False);
if(!cit.More()) {
// Naming data structure is empty - no sub-shapes under resulting shape
+// clang-format off
const Handle(TNaming_NamedShape) aNS = FindPrevNDS(CNS); //look to old shape data structure if exist
+// clang-format on
if(!aNS.IsNull()) {
#ifdef OCCT_DEBUG_BNP
PrintEntry (aNS->Label(),0);
{
TDF_Label aSourceChildLabel = GetChildLabel();
Handle(TObj_ObjectIterator) aChildren = // GetChildren();
+// clang-format off
new TObj_OcafObjectIterator (aSourceChildLabel, NULL, Standard_True); // to support children on sublabels of child label
+// clang-format on
for(;aChildren->More(); aChildren->Next())
{
Handle(TObj_Object) aChild = aChildren->Value();
protected:
Handle(Standard_Type) myType; //!< type of objects to iterate on
+// clang-format off
Standard_Boolean myAllSubChildren; //!< to iterate all sub-children, do not stop on the first level
+// clang-format on
public:
//! CASCADE RTTI
Standard_Real r1 = c1.Radius();
Standard_Real r2 = c2.Radius();
// Standard_Boolean rr = (r1 == r2);
+// clang-format off
Standard_Boolean rr = (Abs(r1-r2) < Precision::Confusion()); //xpu281098 (cto019D2) tolerance a revoir
if (!rr) return SetSameDomain(Standard_False);
const BRepAdaptor_Surface& BAS1 = Surface(1);
Standard_Real u1,v1; p1.Coord(u1,v1); gp_Pnt P1 = BAS1.Value(u1,v1);
Standard_Real u2,v2; p2.Coord(u2,v2); gp_Pnt P2 = BAS1.Value(u2,v2);// recall myCurve2=C2d(myEdge2,myFace1);
+// clang-format on
Standard_Real dpp = P1.Distance(P2);
Standard_Real tol1 = BRep_Tool::Tolerance(TopoDS::Edge(Edge(1)));
Standard_Real tol2 = BRep_Tool::Tolerance(TopoDS::Edge(Edge(2)));
Standard_Boolean sdmeds = FUN_ds_sdm((*myDS),Erest,OOE);
if (sdmeds) continue;
+// clang-format off
Standard_Integer obRest = TopOpeBRepTool_TOOL::OnBoundary(parRest,Erest); //vertex can be missed
Standard_Integer obOO = TopOpeBRepTool_TOOL::OnBoundary(OOpar,OOE); //vertex can be missed
+// clang-format on
if ((obRest == EXTERNAL)||(obOO == EXTERNAL)){
#ifdef OCCT_DEBUG
Standard_Boolean tgeds = FUN_tool_EtgOOE(parRest,Erest, OOpar,OOE, tola);
+// clang-format off
TopOpeBRepDS_Kind PVKind = TopOpeBRepDS_POINT; Standard_Integer PVIndex = 0; // POINT or VERTEX index
+// clang-format on
for (Standard_Integer ShapeIndex = 1; ShapeIndex<=2; ShapeIndex++) {
Standard_Integer OOShapeIndex = (ShapeIndex == 1) ? 2 : 1;
Standard_Boolean CPIfound = !Ifound.IsNull();
Standard_Boolean couture = TopOpeBRepTool_ShapeTool::Closed(TopoDS::Edge(E),TopoDS::Face(F));
+// clang-format off
Standard_Boolean samepar = Standard_False; // = True if current VPoint falls on an existing geometry with an equal parameter.
+// clang-format on
if (!CPIfound) samepar = Standard_False;
else samepar = CPIfound ? TopoParameter(L,Ifound,parline,couture) : Standard_False;
// with shapes with same rank
TopTools_DataMapOfShapeInteger shaperk; // rkshape = {shape,rank=1,2}
+// clang-format off
TopTools_DataMapOfShapeListOfShape mapvec, mapved; // mapvec = {(v,lec),(ec,lv)}, mapved = {(v,led),(ed,lv)}
+// clang-format on
TopTools_DataMapOfShapeShape mapvvsd; // mapvvsd = {(v,v)}
TopOpeBRep_VPointInterIterator itvp(L);
if (!found) return NOI;
// modified by NIZHNY-MKK Tue Nov 21 17:45:50 2000.END
}
+// clang-format off
if (rkv != rkdg) {TopoDS_Vertex tmp = v; v = ov; ov = tmp; rkv = rkdg;} // ensure v is vertex of dge
+// clang-format on
}
Standard_Integer mkt = 0; Standard_Real par1 = 0.,par2 = 0.;
TopAbs_Orientation oFOR = BDS.Shape(iFOR).Orientation();
TopAbs_Orientation oFS = BDS.Shape(iFS).Orientation();
+// clang-format off
Standard_Boolean isclosedFF=FUN_tool_IsClosingE(EG,FOR,FOR); //xpu240898 : cto900J5 faulty yapc2(FOR17,FS18,EG15)
+// clang-format on
Standard_Boolean isclosedFS=FUN_tool_IsClosingE(EG,FS,FS); //xpu240898
Standard_Boolean isclosed=(isclosedFF || isclosedFS);
Standard_Boolean isrest=BDS.IsSectionEdge(EG);
#endif
Standard_Boolean opeCut = myPB->Opec12() || myPB->Opec21();
Standard_Boolean opeCom = myPB->Opecom();
+// clang-format off
Standard_Boolean ComOfCut = opeCut && (TB1 == TB2) && (TB1 == TopAbs_IN); //xpu200598 only if FFSDSO
+// clang-format on
TopAbs_State TBFOR = FUN_build_TB(myPB,rankFOR);
{std::cout<<"++ debON2d "<<iF<<" "<<std::endl;}
#endif
+// clang-format off
Standard_EXPORT TopAbs_State FUN_build_TB(const TopOpeBRepBuild_PBuilder& PB,const Standard_Integer rank); // xpu290698
+// clang-format on
Standard_EXPORT Standard_Boolean FUN_keepEON(const TopOpeBRepBuild_Builder& B,
const TopoDS_Shape& sEG,const TopoDS_Shape& sFOR,const TopoDS_Shape& sFS,
const Standard_Boolean EGBoundFOR,
}
// Standard_Real f,l; FUN_tool_bounds(EG,f,l); Standard_Real parON = (f+l)*.4352;
+// clang-format off
Standard_Real f,l; FUN_tool_bounds(TopoDS::Edge(EspON),f,l); Standard_Real parON = (f+l)*.4352; // xpu120698
+// clang-format on
Standard_Boolean ESO; ok = FUN_tool_curvesSO(TopoDS::Edge(EspON),parON,EG,ESO);
if (!ok) return; // xpu120698
if (!ESO) neworiE = TopAbs::Complement(neworiE);
// 0.
//---
const TopOpeBRepDS_ListOfInterference& lIE = BDS.ShapeInterferences(E);
+// clang-format off
Standard_Boolean scanall = (isspin || isspou || isspon); // xpu161198: BUC60382 //xpu011098: CTS21180(e8on); cto900I7(e12on)
+// clang-format on
// loiSHAINT = interferences avec les 2 proprietes
// - fournies par un PointIterator
TopoDS_Shape newE = EOR;
if (newO) newE.Orientation(oEinF);// xpu060598
+// clang-format off
else if (Oinref == FORREVOPPO) newE.Orientation(TopAbs_INTERNAL);// xpu120898 (PRO14785 : e36 shared by f34 & f39,
// faces sdm with f16)
+// clang-format on
else newE.Orientation(neworiE);
#ifdef OCCT_DEBUG
if(tSPS){
// if (!ok) {FUN_Raise(); return;}
// new topologies :
+// clang-format off
TopTools_IndexedDataMapOfShapeListOfShape fcnewfcSMA;// faces connexed to fSMA built up with the split of outerwSMA
TopTools_IndexedDataMapOfShapeListOfShape fcnewfcGRE;// faces connexed to fGRE built up with the split of outerwGRE
+// clang-format on
Standard_Boolean ok = ::FUN_rebuildfc((*this),myDataStructure,staSMA,*pfSMA,EnewE,fcnewfcSMA);
if (!ok) {FUN_Raise(); return;}
Standard_Integer nfcSMA = fcnewfcSMA.Extent();
myBuildTool.AddShellFace(newShell,F);
}
}
+// clang-format off
myBuildTool.Closed(newShell,Standard_True); // NYI : check exact du caractere closed du shell
+// clang-format on
myBuildTool.AddSolidShell(newSolid,newShell);
}
L.Append(newSolid);
}
#endif
// Standard_Real tolpc; MGhc2 PC = FC2D_CurveOnSurface(eon,F,esdF,f,l,tolpc);
+// clang-format off
Standard_Real tolpc; MGhc2 PC = FC2D_CurveOnSurface(eon,F,esdF,f,l,tolpc,Standard_True);//xpu051198 :PRO15049
+// clang-format on
hasPC = (!PC.IsNull());
if (!hasPC) throw Standard_ProgramError("TopOpeBRepBuild_Builder::SSE null PC on F");
Standard_Real tol = Max(tolE,tolpc);
TopOpeBRepDS_DataStructure& BDS = myDataStructure->ChangeDS();
const TopoDS_Edge& EOR = TopoDS::Edge(EA);
TopoDS_Edge EF = EOR; EF.Orientation(TopAbs_FORWARD);
+// clang-format off
Standard_Integer rankEF = myDataStructure->DS().AncestorRank(EF); // GShapeRank <- GMapShapes, appele par Merge
+// clang-format on
// FUN_removeonGB(myDataStructure,EOR); //xpu041198
Standard_Real f2,l2,tolpc;Handle(Geom2d_Curve) C2D; //jyl980406+
Standard_Boolean haspc = FC2D_HasCurveOnSurface(E,F); //jyl980406+
if (!haspc) { //jyl980406+
+// clang-format off
Standard_Boolean trim3d = Standard_True; C2D = FC2D_CurveOnSurface(E,F,f2,l2,tolpc,trim3d); //jyl980406+
+// clang-format on
Standard_Real tolE = BRep_Tool::Tolerance(E); //jyl980406+
Standard_Real tol = Max(tolE,tolpc); //jyl980406+
BRep_Builder BB; BB.UpdateEdge(E,C2D,F,tol); //jyl980406+
Standard_Real f2,l2,tolpc;Handle(Geom2d_Curve) C2D; //jyl980402+
Standard_Boolean haspc = FC2D_HasCurveOnSurface(E,F); //jyl980402+
if (!haspc) { //jyl980402+
+// clang-format off
Standard_Boolean trim3d = Standard_True; C2D = FC2D_CurveOnSurface(E,F,f2,l2,tolpc,trim3d); //jyl980406+
// C2D = FC2D_CurveOnSurface(E,F,f2,l2,tolpc,trim3d); //jyl980406-
+// clang-format on
Standard_Real tolE = BRep_Tool::Tolerance(E); //jyl980402+
Standard_Real tol = Max(tolE,tolpc); //jyl980402+
BRep_Builder BB; BB.UpdateEdge(E,C2D,F,tol); //jyl980402+
// NYI : + argument a la methode GSplitFaceSFS ?? a voir
// ici : GLOBAL_lfrtoprocess = t
+// clang-format off
if (GLOBAL_lfr1==NULL) GLOBAL_lfr1=(TopTools_ListOfShape*)new TopTools_ListOfShape(); //flo150998
+// clang-format on
GLOBAL_lfr1->Clear();
GSplitFaceSFS(FOR,LSO2,GM,SFS);
GLOBAL_lfrtoprocess = Standard_False;
#endif
// NYI : Builder += methode pour le process fufa
+// clang-format off
TopOpeBRepBuild_FuseFace fufa; TopTools_ListOfShape ldum; Standard_Integer addinternal = 1; // disparition
+// clang-format on
fufa.Init(ldum,*GLOBAL_lfr1,addinternal);
fufa.PerformFace();
Standard_Boolean isdone = fufa.IsDone();
if (oE == TopAbs_INTERNAL) neINTERNAL++;
else if (oE == TopAbs_EXTERNAL) neEXTERNAL++;
+// clang-format off
Standard_Boolean hasPC = FC2D_HasCurveOnSurface(newEdge,newFace); // jyl980402+
if (!hasPC) // jyl980402+
{ // jyl980402+
BRep_Builder BB_PC; BB_PC.UpdateEdge(newEdge,C2D,newFace,tol); // jyl980402+
} // jyl980402+
} // FABU.MoreEdge()
+// clang-format on
//--ofv:
if((neINTERNAL == 0 && neEXTERNAL == 0) || (ne == neINTERNAL || ne == neEXTERNAL))
//------------------------------------------------------
{
+// clang-format off
TopOpeBRepDS_ListIteratorOfListOfInterference it1; // set hasONFACE = True if LI contains interfs with (ON,FACE) transition(s).
+// clang-format on
Standard_Boolean hasONFACE = Standard_False;
for (it1.Initialize(LI); it1.More(); it1.Next() ) {
Handle(TopOpeBRepDS_Interference)& I1 = it1.ChangeValue();
TopAbs_ShapeEnum SB = TopAbs_SHAPE, SA = TopAbs_SHAPE;Standard_Integer IB = 0, IA = 0;TopOpeBRepDS_Kind GT = TopOpeBRepDS_UNKNOWN, ST = TopOpeBRepDS_UNKNOWN; Standard_Integer G = 0, S = 0;
FDS_Idata(I,SB,IB,SA,IA,GT,G,ST,S);
Standard_Boolean FhasGE = FDS_SIisGIofIofSBAofTofI(BDS,IE,I);
+// clang-format off
if (FhasGE) {removed = Standard_True; l3dF.Remove(it); continue;} // E has split ON F (cto904A3;e19,f14)
+// clang-format on
const TopoDS_Shape& F = BDS.Shape(S);
Standard_Boolean hsdm = HDS->HasSameDomain(F);
if (!hsdm) {it.Next(); continue;}
Standard_Boolean hsdm = (sdmFs.Extent() > 0);
if (hsdm) {
+// clang-format off
Standard_Boolean hasFOR=Standard_False, hasREV=Standard_False; // xpu120898 (PRO14785 : e36 shared by f34 & f39,
// faces sdm with f16)
+// clang-format on
TopOpeBRepDS_Config C = BDS.SameDomainOri(FF);
for (TopTools_ListIteratorOfListOfShape it(sdmFs); it.More(); it.Next()){
}
// li -> l1dE + l2dFE + lFE(<=>l3dFE) + li(<=>lFF)
TopOpeBRepDS_ListOfInterference li; FDS_assign(loi,li);
+// clang-format off
TopOpeBRepDS_ListOfInterference l1dE; Standard_Integer n1d = FUN_selectTRASHAinterference(li,TopAbs_EDGE,l1dE); // li->l1dE+li(<=>lF?)
TopOpeBRepDS_ListOfInterference lFE;
FUN_selectSKinterference(li,TopOpeBRepDS_EDGE,lFE); // li(<=>lF?)->lFE+li(<=>lFF)
TopOpeBRepDS_ListOfInterference l2dFE; Standard_Integer n2d = FUN_selectpure2dI(li,lFE,l2dFE); // lFE->l2dFE+lFE(<=>l3dFE)
+// clang-format on
Standard_Boolean redu2d = (n1d > 0)&&(n2d > 0);
// -------------------------------
if (redu2d) { // {I1d=(Tr(Esd),vG,Esd), I2d=(Tr(F),vG,E)}
Standard_EXPORT Standard_Boolean FDS_aresamdom(const TopOpeBRepDS_DataStructure& BDS,const TopoDS_Shape& ES,const TopoDS_Shape& F1,const TopoDS_Shape& F2);
Standard_EXPORT Standard_Boolean FDS_aresamdom(const TopOpeBRepDS_DataStructure& BDS,const Standard_Integer SI,const Standard_Integer isb1,const Standard_Integer isb2);
+// clang-format off
Standard_EXPORT Standard_Boolean FDS_EdgeIsConnexToSameDomainFaces(const TopoDS_Shape& E,const Handle(TopOpeBRepDS_HDataStructure)& HDS); // not used
+// clang-format on
Standard_EXPORT Standard_Boolean FDS_SIisGIofIofSBAofTofI(const TopOpeBRepDS_DataStructure& BDS,const Standard_Integer SI,const Handle(TopOpeBRepDS_Interference)& I);
Standard_EXPORT Standard_Real FDS_Parameter(const Handle(TopOpeBRepDS_Interference)& I);
Standard_EXPORT Standard_Boolean FDS_Parameter(const Handle(TopOpeBRepDS_Interference)& I, Standard_Real& par);
if (!ok2) return Standard_False;
const TopoDS_Edge& SE = TopoDS::Edge(BDS.Shape(ISE));
+// clang-format off
const TopoDS_Face& F = TopoDS::Face(BDS.Shape(IB2)); Standard_Real tolF = BRep_Tool::Tolerance(F)*1.e2;//nyitol
const TopoDS_Edge& E = TopoDS::Edge(BDS.Shape(S2)); Standard_Real tolE = BRep_Tool::Tolerance(E)*1.e2;//nyitol
+// clang-format on
Standard_Boolean EclosingF = FUN_tool_IsClosingE(E,F,F);
if (EclosingF) {
TopAbs_State stb = T2d.Before(), sta = T2d.After();
Standard_Real f,l,tol; const Handle(Geom2d_Curve)& PC = C2DF.PC(f,l,tol);
Standard_Real xfirst = onU ? myGAS.FirstUParameter() : myGAS.FirstVParameter();
+// clang-format off
Standard_Real xlast = onU ? myGAS.LastUParameter() : myGAS.LastVParameter(); // xlast=xfirst+xperiod
+// clang-format on
Standard_Real xperiod = onU ? myUper : myVper;
Standard_Boolean isou,isov; gp_Pnt2d o2d; gp_Dir2d d2d;
Standard_Real f,l; FUN_tool_bounds(e,f,l); Standard_Real eps = 0.45678; Standard_Real pare = (1-eps)*f+eps*l;
// RONd (x,y,z) = (xxref,ntref,x^y)
+// clang-format off
Standard_Real tola = Precision::Angular()*1.e3; //gp_Dir xapp,yapp; Standard_Boolean refapp = Standard_False;
+// clang-format on
gp_Dir x,y; Standard_Boolean ok = ::FUN_vectors(fref,e,pare,y,x,tola,Standard_False);
if (!ok) {FUN_Raise(); return Standard_False;}
T.Normalize();
P.SetCoord(P.X()+TolInit*T.X(),P.Y()+TolInit*T.Y());
+// clang-format off
FClassifier.Reset(gp_Lin2d(P,T),ParamInit,RealEpsilon()); //-- Longueur et Tolerance #######
+// clang-format on
TopExp_Explorer otherfaceexplorer;
for (otherfaceexplorer.Init(face,TopAbs_EDGE);
ok = FUN_MkTonE(faxis,dirINcle,xxi,myngf, par1,par2, outin);
if (!ok) return Standard_False;
+// clang-format off
if (!onfi && !onli) {mkT = MKI12; return Standard_True;}// => the same for all edges of lei @190499
+// clang-format on
if (closedi) {mkT = MKI12; return Standard_True;}// onfi || onli @190499
// xxri :
/*
// xxri :
Standard_Real ddot = tgin1di.Dot(faxis);
+// clang-format off
Standard_Boolean tgaxis = Abs(1-(Abs(ddot))) < FUN_tola(); //=true : edge is tangent to sphere's axis
+// clang-format on
if (tgaxis) {
ok = TopOpeBRepTool_TOOL::XX(myuvi,myFi, pari,ei, xxri);
if (!ok) return Standard_False;
setFlag (TopoDS_TShape_Flags_Modified, theIsModified);
if (theIsModified)
{
+// clang-format off
setFlag (TopoDS_TShape_Flags_Checked, false); // when a TShape is modified it is also unchecked
+// clang-format on
}
}
TopoDS_Shape curShape;
TopoDS_Edge curEdge;
TopExp_Explorer exp;
+// clang-format off
Standard_Boolean result = Standard_False; //szv#4:S4163:12Mar99 `done` hid one from this, initialisation needed
+// clang-format on
for (exp.Init(aFace,TopAbs_EDGE); exp.More(); exp.Next()){
curShape = exp.Current();
const StepData_Factors& theLocalFactors) const
{
TopoDS_Iterator It;
+// clang-format off
Standard_Boolean result = Standard_False; //szv#4:S4163:12Mar99 `done` hid one from this, initialisation needed
+// clang-format on
//szv#4:S4163:12Mar99 optimized
switch (aShape.ShapeType()) {
Handle(Standard_Type) TransferBRep_BinderOfShape::ResultType () const
+// clang-format off
{ return TransferBRep_ShapeInfo::Type (theres); } // correspond a "STANDARD_TYPE(TopoDS_Shape)"
Standard_CString TransferBRep_BinderOfShape::ResultTypeName () const
{ return TransferBRep_ShapeInfo::TypeName (theres); } // correspond a "STANDARD_TYPE(TopoDS_Shape)"
+// clang-format on
void TransferBRep_BinderOfShape::SetResult (const TopoDS_Shape& res)
struct V3d_ImageDumpOptions
{
+// clang-format off
Standard_Integer Width; //!< Width of image dump to allocate an image, 0 by default (meaning that image should be already allocated).
Standard_Integer Height; //!< Height of image dump to allocate an image, 0 by default (meaning that image should be already allocated).
Graphic3d_BufferType BufferType; //!< Which buffer to dump (color / depth), Graphic3d_BT_RGB by default.
Graphic3d_ZLayerId TargetZLayerId; //!< Target z layer id which defines the last layer to be drawn before image dump.
Standard_Boolean IsSingleLayer; //<! Flags if dumping is to be done to a single or to multiple layers.
Standard_CString LightName; //<! Name of the target light whose shadowmap is to be dumped.
+// clang-format on
public:
void V3d_View::ZFitAll (const Standard_Real theScaleFactor) const
{
Bnd_Box aMinMaxBox = myView->MinMaxValues (Standard_False); // applicative min max boundaries
+// clang-format off
Bnd_Box aGraphicBox = myView->MinMaxValues (Standard_True); // real graphical boundaries (not accounting infinite flag).
+// clang-format on
myView->Camera()->ZFitAll (theScaleFactor, aMinMaxBox, aGraphicBox);
}
private:
+// clang-format off
Handle(AIS_InteractiveContext) mySelIter; //!< iterator for current (selected) objects (IterSource_Selected)
ViewerTest_DoubleMapIteratorOfDoubleMapOfInteractiveAndName myMapIter; //!< iterator for map of all objects (IterSource_All)
+// clang-format on
NCollection_Sequence<TCollection_AsciiString> mySeq;
NCollection_Sequence<TCollection_AsciiString>::Iterator mySeqIter;
}
if (toSetTrsfAngle)
{
+// clang-format off
aTexturedIO->Attributes()->ShadingAspect()->Aspect()->TextureMap()->GetParams()->SetRotation (aTrsfRotAngle); // takes degrees
+// clang-format on
}
if (toSetTrsfTrans)
{
Handle(AIS_InteractiveContext) myCtx;
Handle(V3d_View) myView;
+// clang-format off
NCollection_DataMap<unsigned int, Aspect_VKey> myNavKeyMap; //!< map of Hot-Key (key+modifiers) to Action
+// clang-format on
TCollection_AsciiString myPickPntArgVec[3];
Standard_Boolean myToPickPnt;
// show statistics
Standard_Integer aPointsSize = aNumberPoints * 3 * sizeof(float); // 3x GLfloat
Standard_Integer aNormalsSize = aNumberPoints * 3 * sizeof(float); // 3x GLfloat
+// clang-format off
Standard_Integer aColorsSize = aNumberPoints * 3 * sizeof(float); // 3x GLfloat without alpha
+// clang-format on
Standard_Integer aTrianglesSize = aNumberTriangles * 3 * sizeof(int); // 3x GLint
Standard_Integer aPolyConnectSize = aNumberPoints * 4 + aNumberTriangles * 6 * 4;
Standard_Integer aTotalSize = aPointsSize + aNormalsSize + aColorsSize + aTrianglesSize;
struct Vrml_InternalSection
{
// Read
+// clang-format off
double ReadFileUnit = 1.; //<! file length units to convert from while reading the file, defined as scale factor for meters
RWMesh_CoordinateSystem ReadFileCoordinateSys = RWMesh_CoordinateSystem_Yup; //<! coordinate system defined by Vrml file
RWMesh_CoordinateSystem ReadSystemCoordinateSys = RWMesh_CoordinateSystem_Zup; //<! result coordinate system
// Write
WriteMode_WriterVersion WriterVersion = WriteMode_WriterVersion_2; //!< Setting up writer version (1/2)
WriteMode_RepresentationType WriteRepresentationType = WriteMode_RepresentationType_Wireframe; //!< Setting up representation (shaded/wireframe/both)
+// clang-format on
} InternalParameters;
};
Handle(XCAFDoc_ShapeTool) myShapeTool; //!< Document shape tool.
TColStd_PackedMapOfInteger myRoots; //!< IDs of the root nodes.
+// clang-format off
TDF_LabelIndexedMap myNodes; //!< Maps assembly/part entries to graph node IDs.
+// clang-format on
AdjacencyMap myAdjacencyMap; //!< "Part-of" relations.
NCollection_DataMap<Standard_Integer, NodeType> myNodeTypes; //!< Node types.
NCollection_DataMap<Standard_Integer,
Handle(TCollection_HAsciiString) myRawName; //!< material name / tag (transient data)
XCAFDoc_VisMaterialPBR myPbrMat; //!< metal-roughness material definition
XCAFDoc_VisMaterialCommon myCommonMat; //!< common material definition
+// clang-format off
Graphic3d_AlphaMode myAlphaMode; //!< alpha mode; Graphic3d_AlphaMode_BlendAuto by default
Standard_ShortReal myAlphaCutOff; //!< alpha cutoff value; 0.5 by default
Graphic3d_TypeOfBackfacingModel myFaceCulling; //!< specifies whether the material is double/single sided
+// clang-format on
};
Quantity_Color SpecularColor; //!< specular color
Quantity_Color EmissiveColor; //!< emission color
Standard_ShortReal Shininess; //!< shininess value
+// clang-format off
Standard_ShortReal Transparency; //!< transparency value within [0, 1] range with 0 meaning opaque
+// clang-format on
Standard_Boolean IsDefined; //!< defined flag; TRUE by default
//! Empty constructor.
struct XCAFDoc_VisMaterialPBR
{
Handle(Image_Texture) BaseColorTexture; //!< RGB texture for the base color
+// clang-format off
Handle(Image_Texture) MetallicRoughnessTexture; //!< RG texture packing the metallic and roughness properties together
Handle(Image_Texture) EmissiveTexture; //!< RGB emissive map controls the color and intensity of the light being emitted by the material
Handle(Image_Texture) OcclusionTexture; //!< R occlusion map indicating areas of indirect lighting
Standard_ShortReal Metallic; //!< metalness (or scale factor to the texture) within range [0.0, 1.0]; 1.0 by default
Standard_ShortReal Roughness; //!< roughness (or scale factor to the texture) within range [0.0, 1.0]; 1.0 by default
Standard_ShortReal RefractionIndex; //!< IOR (index of refraction) within range [1.0, 3.0]; 1.5 by default
+// clang-format on
Standard_Boolean IsDefined; //!< defined flag; TRUE by default
//! Empty constructor.
Standard_Integer i = 1;
for (i = 1; i <= seq.Length(); i++) {
TDF_Label aL = seq.Value (i);
+// clang-format off
DisplayText (aL, aPrs, anAspect, aLocation); //suppose that subshapes do not contain locations
+// clang-format on
}
}
{
// Displaying Name attributes
thePrs->SetDisplayPriority (Graphic3d_DisplayPriority_Topmost);
+// clang-format off
DisplayText (myLabel, thePrs, Attributes()->DimensionAspect()->TextAspect(), TopLoc_Location());//no location
+// clang-format on
}
}
protected:
TDF_Label myLabel; //!< label pointing onto the shape
+// clang-format off
Standard_Boolean myToSyncStyles; //!< flag indicating that shape and sub-shapes should be updates within Compute()
+// clang-format on
public:
NCollection_Vector<XCAFPrs_DocumentNode>
myNodeStack; //!< node stack
Standard_Integer myTop; //!< top position in the node stack
+// clang-format off
Standard_Boolean myHasMore; //!< global flag indicating that iterator points to the label
+// clang-format on
XCAFPrs_Style myDefStyle; //!< default style
XCAFPrs_DocumentNode myCurrent; //!< current label info
XCAFPrs_DocumentExplorerFlags myFlags; //!< iteration flags
Standard_Boolean myBackPlaneClipping;
Standard_Real myBackPlaneDistance;
Standard_Boolean myViewVolumeSidesClipping;
+// clang-format off
Handle(TColgp_HArray1OfPnt) myGDTPoints; // Point for each GDT to describe position of GDT frame in View.
+// clang-format on
};
#endif // _XCAFView_Object_HeaderFile
{
Handle(Transfer_ActorOfTransientProcess) act = theAC;
if (act.IsNull() && !theTR.IsNull()) act = theTR->Actor();
+// clang-format off
if (!act.IsNull()) return act->Recognize(ent);//,theTR->TransientProcess());//act->Recognize(ent);
+// clang-format on
return Standard_False;
}
// Document version
Handle(TDocStd_Document) aDoc = Handle(TDocStd_Document)::DownCast (theDocument);
+// clang-format off
TDocStd_FormatVersion aFormatVersion = TDocStd_Document::CurrentStorageFormatVersion(); // the last version of the format
+// clang-format on
if (TDocStd_Document::CurrentStorageFormatVersion() < aDoc->StorageFormatVersion())
{
TCollection_ExtendedString anErrorString("Unacceptable storage format version, the last version is used");
XmlObjMgt_RRelocationTable& theRelocTable) const Standard_OVERRIDE
{
Standard_Boolean aResult = myBaseDirver->Paste (theSource, theTarget, theRelocTable);
+// clang-format off
theTarget->AfterRetrieval(); // to allow synchronization of the derived attribute with the base content
+// clang-format on
return aResult;
}
Standard_Integer nbNodes = PT->NbNodes();
Standard_Integer nbTriangles = PT->NbTriangles();
Standard_Integer size = PT->NbNodes();
+// clang-format off
size *= 3 * 25; // 3 coordinates for a node * 25 characters are used to represent a coordinate (double) in XML
if (PT->HasUVNodes())
size += 2 * 25 * nbNodes; // 2 coordinates for a 2D node * 25 characters are used to represent a coordinate (double) in XML
+// clang-format on
size += 3 * 10 * nbTriangles; // space for triangles
size *= 2; // just in case :-)
if (!size)
stream << std::ends;
+// clang-format off
Standard_Character* dump = (Standard_Character*)stream.str(); // copying! Don't forget to delete it.
+// clang-format on
XmlObjMgt::SetStringValue(theTarget, dump, Standard_True);
delete[] dump;
}
// ========
// Read the FirstIndex; if the attribute is absent initialize to 1
+// clang-format off
aFirstIndPrev = 1; // It is absent :-) because I didn't wrote it on the stage of writing the file.
+// clang-format on
// Read the LastIndex; the attribute should present
if (!anElement.getAttribute(::LastPreviousIndex()).GetInteger(aLastIndPrev))
// ====
// Read the FirstIndex; if the attribute is absent initialize to 1
+// clang-format off
aFirstIndNext = aLastIndPrev + 1; // It is absent :-) because I didn't wrote it on the stage of writing the file.
+// clang-format on
// Read the LastIndex; the attribute should present
if (!anElement.getAttribute(::LastNextIndex()).GetInteger(aLastIndNext))
case TNaming_MODIFY : return ::EvolModifyString();
case TNaming_DELETE : return ::EvolDeleteString();
case TNaming_SELECTED : return ::EvolSelectedString();
+// clang-format off
case TNaming_REPLACE : return ::EvolModifyString(); // case TNaming_REPLACE : return ::EvolReplaceString(); for compatibility
+// clang-format on
default:
throw Standard_DomainError("TNaming_Evolution; enum term unknown");
}
{
anOSS << std::hex << aData->Value(i);
}
+// clang-format off
Standard_Character* dump = (Standard_Character*)anOSS.str(); // copying! Don't forget to delete it.
+// clang-format on
XmlObjMgt::SetStringValue(theTarget, dump, Standard_True);
delete[] dump;
}
Standard_Integer myYTop; //!< top position in pixels
Standard_Integer myXRight; //!< right position in pixels
Standard_Integer myYBottom; //!< bottom position in pixels
+// clang-format off
Standard_Boolean myIsOwnWin; //!< flag to indicate own window handle (to be deallocated on destruction)
+// clang-format on
};
Standard_Integer i; // first rotation axis
Standard_Integer j; // next axis of rotation
Standard_Integer k; // third axis
+// clang-format off
Standard_Boolean isOdd; // true if order of two first rotation axes is odd permutation, e.g. XZ
+// clang-format on
Standard_Boolean isTwoAxes; // true if third rotation is about the same axis as first
Standard_Boolean isExtrinsic; // true if rotations are made around fixed axes
aPrevVal = d;
myFunc->Value(myX, d);
r1 = (d + myZ * myC * myLastStep - myF) * myZ; // Evtushenko estimation.
+// clang-format off
r2 = ((d + aPrevVal - myC * myLastStep) * 0.5 - myF) * myZ; // Shubert / Piyavsky estimation.
+// clang-format on
r = Min(r1, r2);
if(r > myE3)
{