Skip to content
Open
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
275eb42
Refactor Geom2d and Geom3d Packages - Remove GeomEvaluator Classes an…
dpasukhi Dec 14, 2025
553e2b9
Add Geom_ExtrusionUtils and Geom_RevolutionUtils for surface evaluations
dpasukhi Dec 14, 2025
7ec1981
Update copyright year in Geom_ExtrusionUtils and Geom_RevolutionUtils…
dpasukhi Dec 14, 2025
9859909
Refactor GeomAdaptor_Surface to consolidate surface evaluation data s…
dpasukhi Dec 14, 2025
9cc6f9f
Refactor Geom2dAdaptor to unify offset curve data structures
dpasukhi Dec 14, 2025
a41fa0e
Refactor Geom2dAdaptor_Curve to enhance curve data handling
dpasukhi Dec 14, 2025
228f2eb
// formatting
dpasukhi Dec 14, 2025
c3998c1
Add gp_Ax1 include to ShapeUpgrade_SplitSurface for surface splitting…
dpasukhi Dec 14, 2025
e4be45d
Refactor Geom Offset Utilities for Enhanced Curve and Surface Calcula…
dpasukhi Dec 14, 2025
03e2fa9
Refactor Geom Extrusion and Revolution Utilities for Consistency and …
dpasukhi Dec 14, 2025
e7a0033
Enhance Offset Utilities for Curve and Surface Evaluations
dpasukhi Dec 14, 2025
12333e6
Implement ReplaceDerivative function in Geom_OffsetSurfaceUtils to ha…
dpasukhi Dec 14, 2025
0943d13
Refactor Geom_OffsetSurface for Improved Derivative Evaluations
dpasukhi Dec 14, 2025
f502785
Refactor GeomAdaptor_Surface for Improved Readability and Consistency
dpasukhi Dec 14, 2025
385eaf5
Refactor Geom_OffsetCurve for Enhanced Derivative Evaluations
dpasukhi Dec 14, 2025
62e5fa6
Enhance Error Handling in Geom_OffsetCurve and GeomAdaptor_Curve
dpasukhi Dec 14, 2025
b25156c
Refactor Geom2d_OffsetCurve and Geom2dAdaptor_Curve for Improved Offs…
dpasukhi Dec 14, 2025
622433b
Refactor Geom2d_OffsetCurve and Geom2dAdaptor_Curve for Enhanced Deri…
dpasukhi Dec 14, 2025
b66e3a7
Refactor Geom_OffsetCurve and GeomAdaptor_Curve for Improved Derivati…
dpasukhi Dec 14, 2025
15e1fe7
Refactor Derivative Calculations in Geom2d_OffsetUtils for Improved C…
dpasukhi Dec 14, 2025
c98e340
Enhance Derivative Evaluation in Geom_OffsetCurveUtils and Geom_Revol…
dpasukhi Dec 15, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

#include <Geom2d_Curve.hxx>
#include <Geom2d_Line.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Geom_Curve.hxx>
#include <Geom_Surface.hxx>
#include <GeomAdaptor_Curve.hxx>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <Geom_Surface.hxx>
#include <Geom_SurfaceOfLinearExtrusion.hxx>
#include <Geom_SurfaceOfRevolution.hxx>
#include <gp_Ax1.hxx>
#include <Precision.hxx>
#include <ShapeExtend.hxx>
#include <ShapeExtend_CompositeSurface.hxx>
Expand Down
32 changes: 25 additions & 7 deletions src/ModelingData/TKBRep/BRepAdaptor/BRepAdaptor_Curve2d.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,32 @@ Handle(Adaptor2d_Curve2d) BRepAdaptor_Curve2d::ShallowCopy() const
{
Handle(BRepAdaptor_Curve2d) aCopy = new BRepAdaptor_Curve2d();

aCopy->myCurve = myCurve;
aCopy->myTypeCurve = myTypeCurve;
aCopy->myFirst = myFirst;
aCopy->myLast = myLast;
aCopy->myBSplineCurve = myBSplineCurve;
if (!myNestedEvaluator.IsNull())
aCopy->myCurve = myCurve;
aCopy->myTypeCurve = myTypeCurve;
aCopy->myFirst = myFirst;
aCopy->myLast = myLast;

// Copy curve-specific data based on variant type
if (const auto* anOffsetData = std::get_if<OffsetData>(&myCurveData))
{
OffsetData aNewData;
if (!anOffsetData->BasisAdaptor.IsNull())
{
aNewData.BasisAdaptor =
Handle(Geom2dAdaptor_Curve)::DownCast(anOffsetData->BasisAdaptor->ShallowCopy());
}
aNewData.Offset = anOffsetData->Offset;
aCopy->myCurveData = std::move(aNewData);
}
else if (const auto* aBSplineData = std::get_if<BSplineData>(&myCurveData))
{
BSplineData aNewData;
aNewData.Curve = aBSplineData->Curve;
aCopy->myCurveData = std::move(aNewData);
}
else if (std::holds_alternative<BezierData>(myCurveData))
{
aCopy->myNestedEvaluator = myNestedEvaluator->ShallowCopy();
aCopy->myCurveData = BezierData{};
}

return aCopy;
Expand Down
10 changes: 5 additions & 5 deletions src/ModelingData/TKG2d/Adaptor2d/Adaptor2d_OffsetCurve.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <Adaptor2d_OffsetCurve.hxx>
#include <Geom2d_BezierCurve.hxx>
#include <Geom2d_BSplineCurve.hxx>
#include <Geom2dEvaluator.hxx>
#include <Geom2d_OffsetUtils.pxx>
#include <gp_Ax22d.hxx>
#include <gp_Circ2d.hxx>
#include <gp_Dir2d.hxx>
Expand Down Expand Up @@ -282,7 +282,7 @@ gp_Pnt2d Adaptor2d_OffsetCurve::Value(const Standard_Real U) const
gp_Pnt2d aP;
gp_Vec2d aV;
myCurve->D1(U, aP, aV);
Geom2dEvaluator::CalculateD0(aP, aV, myOffset);
Geom2d_OffsetUtils::CalculateD0(aP, aV, myOffset);
return aP;
}
else
Expand All @@ -306,7 +306,7 @@ void Adaptor2d_OffsetCurve::D1(const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V)
{
gp_Vec2d aV2;
myCurve->D2(U, P, V, aV2);
Geom2dEvaluator::CalculateD1(P, V, aV2, myOffset);
Geom2d_OffsetUtils::CalculateD1(P, V, aV2, myOffset);
}
else
{
Expand All @@ -322,7 +322,7 @@ void Adaptor2d_OffsetCurve::D2(const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V1,
{
gp_Vec2d aV3;
myCurve->D3(U, P, V1, V2, aV3);
Geom2dEvaluator::CalculateD2(P, V1, V2, aV3, Standard_False, myOffset);
Geom2d_OffsetUtils::CalculateD2(P, V1, V2, aV3, Standard_False, myOffset);
}
else
{
Expand All @@ -342,7 +342,7 @@ void Adaptor2d_OffsetCurve::D3(const Standard_Real U,
{
gp_Vec2d aV4 = myCurve->DN(U, 4);
myCurve->D3(U, P, V1, V2, V3);
Geom2dEvaluator::CalculateD3(P, V1, V2, V3, aV4, Standard_False, myOffset);
Geom2d_OffsetUtils::CalculateD3(P, V1, V2, V3, aV4, Standard_False, myOffset);
}
else
{
Expand Down
1 change: 1 addition & 0 deletions src/ModelingData/TKG2d/Geom2d/FILES.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ set(OCCT_Geom2d_FILES
Geom2d_Line.hxx
Geom2d_OffsetCurve.cxx
Geom2d_OffsetCurve.hxx
Geom2d_OffsetUtils.pxx
Geom2d_Parabola.cxx
Geom2d_Parabola.hxx
Geom2d_Point.cxx
Expand Down
Loading
Loading