Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ UseTab: Never
# OCCT specific settings
StatementMacros:
- Standard_FALLTHROUGH
- OCC_CATCH_SIGNALS
- DEFINE_STANDARD_RTTIEXT
- Draw_Drawable3D_FACTORY
- Standard_DEPRECATED
TypenameMacros:
- Handle
14 changes: 14 additions & 0 deletions .github/actions/clang-format-check/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,20 @@ runs:
clang-format -i -style=file $_
}

- name: Remove empty lines after Standard_DEPRECATED
if: steps.changed-files.outputs.has_files == 'true'
shell: pwsh
run: |
$files = Get-Content "changed_files.txt" | Where-Object { Test-Path $_ }
$files | ForEach-Object {
$content = Get-Content $_ -Raw
$pattern = '(Standard_DEPRECATED\("[a-z0-9\.,;\s\(\)_-]+"(?:[\s\n]+"[a-z0-9\.,;\s\(\)_-]+")?\)\n)\n+'
$newContent = $content -replace $pattern, '$1'
if ($content -ne $newContent) {
Set-Content -Path $_ -Value $newContent -NoNewline
}
}

- name: Check git status
id: git-check
if: steps.changed-files.outputs.has_files == 'true'
Expand Down
13 changes: 6 additions & 7 deletions .github/actions/download-artifacts/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,14 @@ runs:
mkdir -p temp-extract
tar -xzf "$ARCHIVE_FILE" -C temp-extract

# Move the extracted content to the desired path
# Create target directory and copy content (preserving existing files)
mkdir -p "$EXTRACT_PATH"

# Copy from install/ subdirectory if it exists, otherwise copy everything
if [ -d "temp-extract/install" ]; then
# Remove target directory if it exists to avoid nesting
rm -rf "$EXTRACT_PATH"
mv "temp-extract/install" "$EXTRACT_PATH"
cp -r temp-extract/install/* "$EXTRACT_PATH/"
else
# If archive doesn't contain install/, move everything
mkdir -p "$EXTRACT_PATH"
mv temp-extract/* "$EXTRACT_PATH/"
cp -r temp-extract/* "$EXTRACT_PATH/"
fi

# Clean up temp directory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.

//=======================================================================
// function : SetWithTriangles
// purpose :
//=======================================================================
//=================================================================================================

inline void BinMNaming_NamedShapeDriver::SetWithTriangles(const Standard_Boolean isWithTriangles)
{
Expand All @@ -25,10 +22,7 @@ inline void BinMNaming_NamedShapeDriver::SetWithTriangles(const Standard_Boolean
myShapeSet->SetWithTriangles(isWithTriangles);
}

//=======================================================================
// function : SetWithNormals
// purpose :
//=======================================================================
//=================================================================================================

inline void BinMNaming_NamedShapeDriver::SetWithNormals(const Standard_Boolean isWithNormals)
{
Expand Down
5 changes: 1 addition & 4 deletions src/ApplicationFramework/TKBinL/BinMDF/BinMDF_ADriver.lxx
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@

#include <TDF_Attribute.hxx>

//=======================================================================
// function : TypeName
// purpose :
//=======================================================================
//=================================================================================================

inline const TCollection_AsciiString& BinMDF_ADriver::TypeName() const
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,20 +203,14 @@ inline Standard_Boolean BinObjMgt_Persistent::noMoreData(const Standard_Integer
return myIsError;
}

//=======================================================================
// function : PutBoolean
// purpose :
//=======================================================================
//=================================================================================================

inline BinObjMgt_Persistent& BinObjMgt_Persistent::PutBoolean(const Standard_Boolean theValue)
{
return PutInteger((Standard_Integer)theValue);
}

//=======================================================================
// function : GetBoolean
// purpose :
//=======================================================================
//=================================================================================================

inline const BinObjMgt_Persistent& BinObjMgt_Persistent::GetBoolean(
Standard_Boolean& theValue) const
Expand Down
50 changes: 10 additions & 40 deletions src/ApplicationFramework/TKCAF/TDataXtd/TDataXtd_PatternStd.lxx
Original file line number Diff line number Diff line change
Expand Up @@ -13,100 +13,70 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.

//=======================================================================
// function : Signature
// purpose :
//=======================================================================
//=================================================================================================

inline Standard_Integer TDataXtd_PatternStd::Signature() const
{
return mySignature;
}

//=======================================================================
// function : Axis1
// purpose :
//=======================================================================
//=================================================================================================

inline Handle(TNaming_NamedShape) TDataXtd_PatternStd::Axis1() const
{
return myAxis1;
}

//=======================================================================
// function : Axis2
// purpose :
//=======================================================================
//=================================================================================================

inline Handle(TNaming_NamedShape) TDataXtd_PatternStd::Axis2() const
{
return myAxis2;
}

//=======================================================================
// function : Axis1Reversed
// purpose :
//=======================================================================
//=================================================================================================

inline Standard_Boolean TDataXtd_PatternStd::Axis1Reversed() const
{
return myAxis1Reversed;
}

//=======================================================================
// function : Axis2Reversed
// purpose :
//=======================================================================
//=================================================================================================

inline Standard_Boolean TDataXtd_PatternStd::Axis2Reversed() const
{
return myAxis2Reversed;
}

//=======================================================================
// function : Value1
// purpose :
//=======================================================================
//=================================================================================================

inline Handle(TDataStd_Real) TDataXtd_PatternStd::Value1() const
{
return myValue1;
}

//=======================================================================
// function : Value2
// purpose :
//=======================================================================
//=================================================================================================

inline Handle(TDataStd_Real) TDataXtd_PatternStd::Value2() const
{
return myValue2;
}

//=======================================================================
// function : NbInstances1
// purpose :
//=======================================================================
//=================================================================================================

inline Handle(TDataStd_Integer) TDataXtd_PatternStd::NbInstances1() const
{
return myNb1;
}

//=======================================================================
// function : NbInstances2
// purpose :
//=======================================================================
//=================================================================================================

inline Handle(TDataStd_Integer) TDataXtd_PatternStd::NbInstances2() const
{
return myNb2;
}

//=======================================================================
// function : Mirror
// purpose :
//=======================================================================
//=================================================================================================

inline Handle(TNaming_NamedShape) TDataXtd_PatternStd::Mirror() const
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,10 +261,8 @@ Standard_Integer TDataXtd_Presentation::getOldColorNameFromNewEnum(Quantity_Name
return anOld;
}

//=======================================================================
// function : TDataXtd_Presentation
// purpose : Default constructor.
//=======================================================================
//=================================================================================================

TDataXtd_Presentation::TDataXtd_Presentation()
: myDriverGUID("00000000-0000-0000-0000-000000000000"),
myColor(Quantity_NOC_WHITE),
Expand Down
5 changes: 1 addition & 4 deletions src/ApplicationFramework/TKCAF/TNaming/TNaming_CopyShape.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,7 @@ static Handle(TopLoc_Datum3D) TranslateDatum3D(const Handle(TopLoc_Datum3D)&
return TD;
}

//=======================================================================
// function : Translates
// purpose : Topological Location
//=======================================================================
//=================================================================================================

TopLoc_Location TNaming_CopyShape::Translate(const TopLoc_Location& L,
TColStd_IndexedDataMapOfTransientTransient& aMap)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ Standard_Boolean IsImported(const Handle(TNaming_NamedShape)& NS)
it.Next();
if (!it.More())
return 0;
// plus d un shape.
// plus d un shape.
#ifdef OCCT_DEBUG
std::cout << "WARNING IMPORTED" << std::endl;
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,57 +16,39 @@

#include <TNaming_ShapesSet.hxx>

//=======================================================================
// function :
// purpose :
//=======================================================================
//=================================================================================================

inline TNaming_IteratorOnShapesSet::TNaming_IteratorOnShapesSet() {}

//=======================================================================
// function :
// purpose :
//=======================================================================
//=================================================================================================

inline TNaming_IteratorOnShapesSet::TNaming_IteratorOnShapesSet(const TNaming_ShapesSet& S)
{
Init(S);
}

//=======================================================================
// function : Init
// purpose :
//=======================================================================
//=================================================================================================

inline void TNaming_IteratorOnShapesSet::Init(const TNaming_ShapesSet& S)
{
myIt.Initialize(S.Map());
}

//=======================================================================
// function : More
// purpose :
//=======================================================================
//=================================================================================================

inline Standard_Boolean TNaming_IteratorOnShapesSet::More() const
{
return (myIt.More());
}

//=======================================================================
// function : Next
// purpose :
//=======================================================================
//=================================================================================================

inline void TNaming_IteratorOnShapesSet::Next()
{
myIt.Next();
}

//=======================================================================
// function : Value
// purpose :
//=======================================================================
//=================================================================================================

inline const TopoDS_Shape& TNaming_IteratorOnShapesSet::Value() const
{
Expand Down
2 changes: 1 addition & 1 deletion src/ApplicationFramework/TKCAF/TNaming/TNaming_Name.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1498,7 +1498,7 @@ static Standard_Boolean FilterByNeighbourgs(const TDF_Label& L,
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
// clang-format on

#ifdef OCCT_DEBUG_FNB
i = 1;
Expand Down
20 changes: 4 additions & 16 deletions src/ApplicationFramework/TKCAF/TNaming/TNaming_NamedShape.lxx
Original file line number Diff line number Diff line change
Expand Up @@ -14,40 +14,28 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.

//=======================================================================
// function : ID
// purpose :
//=======================================================================
//=================================================================================================

inline const Standard_GUID& TNaming_NamedShape::ID() const
{
return GetID();
}

//=======================================================================
// function :
// purpose :
//=======================================================================
//=================================================================================================

inline TNaming_Evolution TNaming_NamedShape::Evolution() const
{
return myEvolution;
}

//=======================================================================
// function :
// purpose :
//=======================================================================
//=================================================================================================

inline Standard_Integer TNaming_NamedShape::Version() const
{
return myVersion;
}

//=======================================================================
// function :
// purpose :
//=======================================================================
//=================================================================================================

inline void TNaming_NamedShape::SetVersion(const Standard_Integer v)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.

//=======================================================================
// function : More
// purpose :
//=======================================================================
//=================================================================================================

inline Standard_Boolean TNaming_NewShapeIterator::More() const
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.

//=======================================================================
// function : More
// purpose :
//=======================================================================
//=================================================================================================

inline Standard_Boolean TNaming_OldShapeIterator::More() const
{
Expand Down
Loading
Loading