mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-08-25 03:45:48 +08:00
Coding - Modernize handle APIs and deprecate out-parameter overloads (#1185)
Introduce return-by-value APIs for handle-returning methods across touched toolkits, with nodiscard where appropriate, and keep legacy out-parameter signatures as deprecated wrappers for source compatibility. - Add new return-by-value overloads for previously output-parameter methods in key classes across ApplicationFramework, DataExchange, ModelingAlgorithms, ModelingData, and Visualization - Mark legacy output-parameter methods as deprecated and route them through the new overloads - Update call sites to use the new APIs and simplify temporary-variable patterns - Extend method documentation in OCCT Doxygen style with param/return sections and deprecation guidance - Apply const-correctness updates for read-only handle arguments in STEP reader related interfaces - Preserve compatibility for deprecated public wrappers by keeping exported out-of-line definitions where needed - Perform minor cleanup of comments and parameter naming consistency No functional behavior change is intended; this is an API modernization and migration-facilitation update.
This commit is contained in:
@@ -142,6 +142,15 @@ int TDocStd_Application::NbDocuments() const
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
occ::handle<TDocStd_Document> TDocStd_Application::GetDocument(const int index) const
|
||||
{
|
||||
occ::handle<TDocStd_Document> aDoc;
|
||||
GetDocument(index, aDoc);
|
||||
return aDoc;
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
void TDocStd_Application::GetDocument(const int index, occ::handle<TDocStd_Document>& theDoc) const
|
||||
{
|
||||
CDF_DirectoryIterator it(myDirectory);
|
||||
@@ -218,7 +227,7 @@ int TDocStd_Application::IsInSession(const TCollection_ExtendedString& path) con
|
||||
occ::handle<TDocStd_Document> D;
|
||||
for (int i = 1; i <= nbdoc; i++)
|
||||
{
|
||||
GetDocument(i, D);
|
||||
D = GetDocument(i);
|
||||
if (D->IsSaved())
|
||||
{
|
||||
TCollection_ExtendedString unifiedDocPath(D->GetPath());
|
||||
|
||||
@@ -154,18 +154,14 @@ public:
|
||||
//! returns the number of documents handled by the current applicative session.
|
||||
Standard_EXPORT int NbDocuments() const;
|
||||
|
||||
//! Constructs the new document aDoc.
|
||||
//! aDoc is identified by the index index which is
|
||||
//! any integer between 1 and n where n is the
|
||||
//! number of documents returned by NbDocument.
|
||||
//! Example
|
||||
//! occ::handle<TDocStd_Application>
|
||||
//! anApp;
|
||||
//! if (!CafTest::Find(A)) return 1;
|
||||
//! occ::handle<TDocStd> aDoc;
|
||||
//! int nbdoc = anApp->NbDocuments();
|
||||
//! for (int i = 1; i <= nbdoc; i++) {
|
||||
//! aApp->GetDocument(i,aDoc);
|
||||
//! Returns the document at the given 1-based index.
|
||||
//! The index is any integer between 1 and NbDocuments().
|
||||
//! @param[in] index 1-based document index
|
||||
//! @return handle to the document
|
||||
[[nodiscard]] Standard_EXPORT occ::handle<TDocStd_Document> GetDocument(const int index) const;
|
||||
|
||||
//! @deprecated Use GetDocument() returning handle by value instead.
|
||||
Standard_DEPRECATED("Use GetDocument() returning handle by value instead")
|
||||
Standard_EXPORT void GetDocument(const int index, occ::handle<TDocStd_Document>& aDoc) const;
|
||||
|
||||
//! Constructs the empty new document aDoc.
|
||||
|
||||
@@ -32,7 +32,7 @@ void TFunction_Driver::Init(const TDF_Label& L)
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
void TFunction_Driver::Validate(occ::handle<TFunction_Logbook>& log) const
|
||||
void TFunction_Driver::Validate(const occ::handle<TFunction_Logbook>& log) const
|
||||
{
|
||||
NCollection_List<TDF_Label> res;
|
||||
Results(res);
|
||||
|
||||
@@ -54,7 +54,7 @@ public:
|
||||
//! method even if the function is not executed.
|
||||
//! execution of function
|
||||
//! =====================
|
||||
Standard_EXPORT virtual void Validate(occ::handle<TFunction_Logbook>& log) const;
|
||||
Standard_EXPORT virtual void Validate(const occ::handle<TFunction_Logbook>& log) const;
|
||||
|
||||
//! Analyzes the labels in the logbook log.
|
||||
//! Returns true if attributes have been modified.
|
||||
|
||||
@@ -62,67 +62,67 @@ bool TPrsStd_ConstraintDriver::Update(const TDF_Label& aLabel
|
||||
switch (thetype)
|
||||
{
|
||||
case TDataXtd_DISTANCE: {
|
||||
TPrsStd_ConstraintTools::ComputeDistance(apConstraint, anAIS);
|
||||
anAIS = TPrsStd_ConstraintTools::ComputeDistance(apConstraint);
|
||||
break;
|
||||
}
|
||||
case TDataXtd_PARALLEL: {
|
||||
TPrsStd_ConstraintTools::ComputeParallel(apConstraint, anAIS);
|
||||
anAIS = TPrsStd_ConstraintTools::ComputeParallel(apConstraint);
|
||||
break;
|
||||
}
|
||||
case TDataXtd_PERPENDICULAR: {
|
||||
TPrsStd_ConstraintTools::ComputePerpendicular(apConstraint, anAIS);
|
||||
anAIS = TPrsStd_ConstraintTools::ComputePerpendicular(apConstraint);
|
||||
break;
|
||||
}
|
||||
case TDataXtd_CONCENTRIC: {
|
||||
TPrsStd_ConstraintTools::ComputeConcentric(apConstraint, anAIS);
|
||||
anAIS = TPrsStd_ConstraintTools::ComputeConcentric(apConstraint);
|
||||
break;
|
||||
}
|
||||
case TDataXtd_SYMMETRY: {
|
||||
TPrsStd_ConstraintTools::ComputeSymmetry(apConstraint, anAIS);
|
||||
anAIS = TPrsStd_ConstraintTools::ComputeSymmetry(apConstraint);
|
||||
break;
|
||||
}
|
||||
case TDataXtd_MIDPOINT: {
|
||||
TPrsStd_ConstraintTools::ComputeMidPoint(apConstraint, anAIS);
|
||||
anAIS = TPrsStd_ConstraintTools::ComputeMidPoint(apConstraint);
|
||||
break;
|
||||
}
|
||||
case TDataXtd_TANGENT: {
|
||||
TPrsStd_ConstraintTools::ComputeTangent(apConstraint, anAIS);
|
||||
anAIS = TPrsStd_ConstraintTools::ComputeTangent(apConstraint);
|
||||
break;
|
||||
}
|
||||
case TDataXtd_ANGLE: {
|
||||
TPrsStd_ConstraintTools::ComputeAngle(apConstraint, anAIS);
|
||||
anAIS = TPrsStd_ConstraintTools::ComputeAngle(apConstraint);
|
||||
break;
|
||||
}
|
||||
case TDataXtd_RADIUS: {
|
||||
TPrsStd_ConstraintTools::ComputeRadius(apConstraint, anAIS);
|
||||
anAIS = TPrsStd_ConstraintTools::ComputeRadius(apConstraint);
|
||||
break;
|
||||
}
|
||||
case TDataXtd_MINOR_RADIUS: {
|
||||
TPrsStd_ConstraintTools::ComputeMinRadius(apConstraint, anAIS);
|
||||
anAIS = TPrsStd_ConstraintTools::ComputeMinRadius(apConstraint);
|
||||
break;
|
||||
}
|
||||
case TDataXtd_MAJOR_RADIUS: {
|
||||
TPrsStd_ConstraintTools::ComputeMaxRadius(apConstraint, anAIS);
|
||||
anAIS = TPrsStd_ConstraintTools::ComputeMaxRadius(apConstraint);
|
||||
break;
|
||||
}
|
||||
case TDataXtd_DIAMETER: {
|
||||
TPrsStd_ConstraintTools::ComputeDiameter(apConstraint, anAIS);
|
||||
anAIS = TPrsStd_ConstraintTools::ComputeDiameter(apConstraint);
|
||||
break;
|
||||
}
|
||||
case TDataXtd_FIX: {
|
||||
TPrsStd_ConstraintTools::ComputeFix(apConstraint, anAIS);
|
||||
anAIS = TPrsStd_ConstraintTools::ComputeFix(apConstraint);
|
||||
break;
|
||||
}
|
||||
case TDataXtd_OFFSET: {
|
||||
TPrsStd_ConstraintTools::ComputeOffset(apConstraint, anAIS);
|
||||
anAIS = TPrsStd_ConstraintTools::ComputeOffset(apConstraint);
|
||||
break;
|
||||
}
|
||||
case TDataXtd_COINCIDENT: {
|
||||
TPrsStd_ConstraintTools::ComputeCoincident(apConstraint, anAIS);
|
||||
anAIS = TPrsStd_ConstraintTools::ComputeCoincident(apConstraint);
|
||||
break;
|
||||
}
|
||||
case TDataXtd_ROUND: {
|
||||
TPrsStd_ConstraintTools::ComputeRound(apConstraint, anAIS);
|
||||
anAIS = TPrsStd_ConstraintTools::ComputeRound(apConstraint);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -130,19 +130,19 @@ bool TPrsStd_ConstraintDriver::Update(const TDF_Label& aLabel
|
||||
case TDataXtd_ALIGN_FACES:
|
||||
case TDataXtd_ALIGN_AXES:
|
||||
case TDataXtd_AXES_ANGLE: {
|
||||
TPrsStd_ConstraintTools::ComputePlacement(apConstraint, anAIS);
|
||||
anAIS = TPrsStd_ConstraintTools::ComputePlacement(apConstraint);
|
||||
break;
|
||||
}
|
||||
case TDataXtd_EQUAL_DISTANCE: {
|
||||
TPrsStd_ConstraintTools::ComputeEqualDistance(apConstraint, anAIS);
|
||||
anAIS = TPrsStd_ConstraintTools::ComputeEqualDistance(apConstraint);
|
||||
break;
|
||||
}
|
||||
case TDataXtd_EQUAL_RADIUS: {
|
||||
TPrsStd_ConstraintTools::ComputeEqualRadius(apConstraint, anAIS);
|
||||
anAIS = TPrsStd_ConstraintTools::ComputeEqualRadius(apConstraint);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
TPrsStd_ConstraintTools::ComputeOthers(apConstraint, anAIS);
|
||||
anAIS = TPrsStd_ConstraintTools::ComputeOthers(apConstraint);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -229,6 +229,16 @@ void TPrsStd_ConstraintTools::UpdateOnlyValue(const occ::handle<TDataXtd_Constra
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
occ::handle<AIS_InteractiveObject> TPrsStd_ConstraintTools::ComputeDistance(
|
||||
const occ::handle<TDataXtd_Constraint>& theConst)
|
||||
{
|
||||
occ::handle<AIS_InteractiveObject> aResult;
|
||||
ComputeDistance(theConst, aResult);
|
||||
return aResult;
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
void TPrsStd_ConstraintTools::ComputeDistance(const occ::handle<TDataXtd_Constraint>& theConst,
|
||||
occ::handle<AIS_InteractiveObject>& theAIS)
|
||||
{
|
||||
@@ -458,6 +468,16 @@ void TPrsStd_ConstraintTools::ComputeDistance(const occ::handle<TDataXtd_Constra
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
occ::handle<AIS_InteractiveObject> TPrsStd_ConstraintTools::ComputePerpendicular(
|
||||
const occ::handle<TDataXtd_Constraint>& aConst)
|
||||
{
|
||||
occ::handle<AIS_InteractiveObject> aResult;
|
||||
ComputePerpendicular(aConst, aResult);
|
||||
return aResult;
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
void TPrsStd_ConstraintTools::ComputePerpendicular(const occ::handle<TDataXtd_Constraint>& aConst,
|
||||
occ::handle<AIS_InteractiveObject>& anAIS)
|
||||
{
|
||||
@@ -527,6 +547,16 @@ void TPrsStd_ConstraintTools::ComputePerpendicular(const occ::handle<TDataXtd_Co
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
occ::handle<AIS_InteractiveObject> TPrsStd_ConstraintTools::ComputeParallel(
|
||||
const occ::handle<TDataXtd_Constraint>& aConst)
|
||||
{
|
||||
occ::handle<AIS_InteractiveObject> aResult;
|
||||
ComputeParallel(aConst, aResult);
|
||||
return aResult;
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
void TPrsStd_ConstraintTools::ComputeParallel(const occ::handle<TDataXtd_Constraint>& aConst,
|
||||
occ::handle<AIS_InteractiveObject>& anAIS)
|
||||
{
|
||||
@@ -597,6 +627,16 @@ void TPrsStd_ConstraintTools::ComputeParallel(const occ::handle<TDataXtd_Constra
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
occ::handle<AIS_InteractiveObject> TPrsStd_ConstraintTools::ComputeSymmetry(
|
||||
const occ::handle<TDataXtd_Constraint>& aConst)
|
||||
{
|
||||
occ::handle<AIS_InteractiveObject> aResult;
|
||||
ComputeSymmetry(aConst, aResult);
|
||||
return aResult;
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
void TPrsStd_ConstraintTools::ComputeSymmetry(const occ::handle<TDataXtd_Constraint>& aConst,
|
||||
occ::handle<AIS_InteractiveObject>& anAIS)
|
||||
{
|
||||
@@ -670,6 +710,16 @@ void TPrsStd_ConstraintTools::ComputeSymmetry(const occ::handle<TDataXtd_Constra
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
occ::handle<AIS_InteractiveObject> TPrsStd_ConstraintTools::ComputeMidPoint(
|
||||
const occ::handle<TDataXtd_Constraint>& aConst)
|
||||
{
|
||||
occ::handle<AIS_InteractiveObject> aResult;
|
||||
ComputeMidPoint(aConst, aResult);
|
||||
return aResult;
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
void TPrsStd_ConstraintTools::ComputeMidPoint(const occ::handle<TDataXtd_Constraint>& aConst,
|
||||
occ::handle<AIS_InteractiveObject>& anAIS)
|
||||
{
|
||||
@@ -745,6 +795,16 @@ void TPrsStd_ConstraintTools::ComputeMidPoint(const occ::handle<TDataXtd_Constra
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
occ::handle<AIS_InteractiveObject> TPrsStd_ConstraintTools::ComputeTangent(
|
||||
const occ::handle<TDataXtd_Constraint>& aConst)
|
||||
{
|
||||
occ::handle<AIS_InteractiveObject> aResult;
|
||||
ComputeTangent(aConst, aResult);
|
||||
return aResult;
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
void TPrsStd_ConstraintTools::ComputeTangent(const occ::handle<TDataXtd_Constraint>& aConst,
|
||||
occ::handle<AIS_InteractiveObject>& anAIS)
|
||||
{
|
||||
@@ -818,6 +878,16 @@ void TPrsStd_ConstraintTools::ComputeTangent(const occ::handle<TDataXtd_Constrai
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
occ::handle<AIS_InteractiveObject> TPrsStd_ConstraintTools::ComputeAngleForOneFace(
|
||||
const occ::handle<TDataXtd_Constraint>& aConst)
|
||||
{
|
||||
occ::handle<AIS_InteractiveObject> aResult;
|
||||
ComputeAngleForOneFace(aConst, aResult);
|
||||
return aResult;
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
void TPrsStd_ConstraintTools::ComputeAngleForOneFace(const occ::handle<TDataXtd_Constraint>& aConst,
|
||||
occ::handle<AIS_InteractiveObject>& anAIS)
|
||||
{
|
||||
@@ -889,6 +959,16 @@ static bool CheckIsShapeCompound(TopoDS_Shape& shape, TopoDS_Face& aFace)
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
occ::handle<AIS_InteractiveObject> TPrsStd_ConstraintTools::ComputeAngle(
|
||||
const occ::handle<TDataXtd_Constraint>& aConst)
|
||||
{
|
||||
occ::handle<AIS_InteractiveObject> aResult;
|
||||
ComputeAngle(aConst, aResult);
|
||||
return aResult;
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
void TPrsStd_ConstraintTools::ComputeAngle(const occ::handle<TDataXtd_Constraint>& aConst,
|
||||
occ::handle<AIS_InteractiveObject>& anAIS)
|
||||
{
|
||||
@@ -1157,6 +1237,16 @@ void TPrsStd_ConstraintTools::ComputeAngle(const occ::handle<TDataXtd_Constraint
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
occ::handle<AIS_InteractiveObject> TPrsStd_ConstraintTools::ComputeConcentric(
|
||||
const occ::handle<TDataXtd_Constraint>& aConst)
|
||||
{
|
||||
occ::handle<AIS_InteractiveObject> aResult;
|
||||
ComputeConcentric(aConst, aResult);
|
||||
return aResult;
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
void TPrsStd_ConstraintTools::ComputeConcentric(const occ::handle<TDataXtd_Constraint>& aConst,
|
||||
occ::handle<AIS_InteractiveObject>& anAIS)
|
||||
{
|
||||
@@ -1238,6 +1328,16 @@ void TPrsStd_ConstraintTools::ComputeConcentric(const occ::handle<TDataXtd_Const
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
occ::handle<AIS_InteractiveObject> TPrsStd_ConstraintTools::ComputeRadius(
|
||||
const occ::handle<TDataXtd_Constraint>& aConst)
|
||||
{
|
||||
occ::handle<AIS_InteractiveObject> aResult;
|
||||
ComputeRadius(aConst, aResult);
|
||||
return aResult;
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
void TPrsStd_ConstraintTools::ComputeRadius(const occ::handle<TDataXtd_Constraint>& aConst,
|
||||
occ::handle<AIS_InteractiveObject>& anAIS)
|
||||
{
|
||||
@@ -1323,6 +1423,16 @@ void TPrsStd_ConstraintTools::ComputeRadius(const occ::handle<TDataXtd_Constrain
|
||||
// ota -- begin --
|
||||
//=================================================================================================
|
||||
|
||||
occ::handle<AIS_InteractiveObject> TPrsStd_ConstraintTools::ComputeMinRadius(
|
||||
const occ::handle<TDataXtd_Constraint>& aConst)
|
||||
{
|
||||
occ::handle<AIS_InteractiveObject> aResult;
|
||||
ComputeMinRadius(aConst, aResult);
|
||||
return aResult;
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
void TPrsStd_ConstraintTools::ComputeMinRadius(const occ::handle<TDataXtd_Constraint>& aConst,
|
||||
occ::handle<AIS_InteractiveObject>& anAIS)
|
||||
{
|
||||
@@ -1409,6 +1519,16 @@ void TPrsStd_ConstraintTools::ComputeMinRadius(const occ::handle<TDataXtd_Constr
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
occ::handle<AIS_InteractiveObject> TPrsStd_ConstraintTools::ComputeMaxRadius(
|
||||
const occ::handle<TDataXtd_Constraint>& aConst)
|
||||
{
|
||||
occ::handle<AIS_InteractiveObject> aResult;
|
||||
ComputeMaxRadius(aConst, aResult);
|
||||
return aResult;
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
void TPrsStd_ConstraintTools::ComputeMaxRadius(const occ::handle<TDataXtd_Constraint>& aConst,
|
||||
occ::handle<AIS_InteractiveObject>& anAIS)
|
||||
{
|
||||
@@ -1495,6 +1615,16 @@ void TPrsStd_ConstraintTools::ComputeMaxRadius(const occ::handle<TDataXtd_Constr
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
occ::handle<AIS_InteractiveObject> TPrsStd_ConstraintTools::ComputeEqualDistance(
|
||||
const occ::handle<TDataXtd_Constraint>& aConst)
|
||||
{
|
||||
occ::handle<AIS_InteractiveObject> aResult;
|
||||
ComputeEqualDistance(aConst, aResult);
|
||||
return aResult;
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
void TPrsStd_ConstraintTools::ComputeEqualDistance(const occ::handle<TDataXtd_Constraint>& aConst,
|
||||
occ::handle<AIS_InteractiveObject>& anAIS)
|
||||
{
|
||||
@@ -1652,6 +1782,16 @@ static bool CheckShapesPair(const TopoDS_Shape& aShape1, const TopoDS_Shape& aSh
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
occ::handle<AIS_InteractiveObject> TPrsStd_ConstraintTools::ComputeEqualRadius(
|
||||
const occ::handle<TDataXtd_Constraint>& aConst)
|
||||
{
|
||||
occ::handle<AIS_InteractiveObject> aResult;
|
||||
ComputeEqualRadius(aConst, aResult);
|
||||
return aResult;
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
void TPrsStd_ConstraintTools::ComputeEqualRadius(const occ::handle<TDataXtd_Constraint>& aConst,
|
||||
occ::handle<AIS_InteractiveObject>& anAIS)
|
||||
{
|
||||
@@ -1753,6 +1893,16 @@ void TPrsStd_ConstraintTools::ComputeEqualRadius(const occ::handle<TDataXtd_Cons
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
occ::handle<AIS_InteractiveObject> TPrsStd_ConstraintTools::ComputeDiameter(
|
||||
const occ::handle<TDataXtd_Constraint>& aConst)
|
||||
{
|
||||
occ::handle<AIS_InteractiveObject> aResult;
|
||||
ComputeDiameter(aConst, aResult);
|
||||
return aResult;
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
void TPrsStd_ConstraintTools::ComputeDiameter(const occ::handle<TDataXtd_Constraint>& aConst,
|
||||
occ::handle<AIS_InteractiveObject>& anAIS)
|
||||
{
|
||||
@@ -1821,6 +1971,16 @@ void TPrsStd_ConstraintTools::ComputeDiameter(const occ::handle<TDataXtd_Constra
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
occ::handle<AIS_InteractiveObject> TPrsStd_ConstraintTools::ComputeFix(
|
||||
const occ::handle<TDataXtd_Constraint>& aConst)
|
||||
{
|
||||
occ::handle<AIS_InteractiveObject> aResult;
|
||||
ComputeFix(aConst, aResult);
|
||||
return aResult;
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
void TPrsStd_ConstraintTools::ComputeFix(const occ::handle<TDataXtd_Constraint>& aConst,
|
||||
occ::handle<AIS_InteractiveObject>& anAIS)
|
||||
{
|
||||
@@ -1889,6 +2049,16 @@ void TPrsStd_ConstraintTools::ComputeFix(const occ::handle<TDataXtd_Constraint>&
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
occ::handle<AIS_InteractiveObject> TPrsStd_ConstraintTools::ComputeOffset(
|
||||
const occ::handle<TDataXtd_Constraint>& aConst)
|
||||
{
|
||||
occ::handle<AIS_InteractiveObject> aResult;
|
||||
ComputeOffset(aConst, aResult);
|
||||
return aResult;
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
void TPrsStd_ConstraintTools::ComputeOffset(const occ::handle<TDataXtd_Constraint>& aConst,
|
||||
occ::handle<AIS_InteractiveObject>& anAIS)
|
||||
{
|
||||
@@ -2080,6 +2250,16 @@ void TPrsStd_ConstraintTools::ComputeOffset(const occ::handle<TDataXtd_Constrain
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
occ::handle<AIS_InteractiveObject> TPrsStd_ConstraintTools::ComputePlacement(
|
||||
const occ::handle<TDataXtd_Constraint>& aConst)
|
||||
{
|
||||
occ::handle<AIS_InteractiveObject> aResult;
|
||||
ComputePlacement(aConst, aResult);
|
||||
return aResult;
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
void TPrsStd_ConstraintTools::ComputePlacement(const occ::handle<TDataXtd_Constraint>& aConst,
|
||||
occ::handle<AIS_InteractiveObject>& anAIS)
|
||||
{
|
||||
@@ -2136,6 +2316,16 @@ void TPrsStd_ConstraintTools::ComputePlacement(const occ::handle<TDataXtd_Constr
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
occ::handle<AIS_InteractiveObject> TPrsStd_ConstraintTools::ComputeOthers(
|
||||
const occ::handle<TDataXtd_Constraint>& aConst)
|
||||
{
|
||||
occ::handle<AIS_InteractiveObject> aResult;
|
||||
ComputeOthers(aConst, aResult);
|
||||
return aResult;
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
void TPrsStd_ConstraintTools::ComputeOthers(const occ::handle<TDataXtd_Constraint>& /*aConst*/,
|
||||
occ::handle<AIS_InteractiveObject>& /*anAIS*/)
|
||||
{
|
||||
@@ -2212,6 +2402,16 @@ void TPrsStd_ConstraintTools::GetShapesAndGeom(const occ::handle<TDataXtd_Constr
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
occ::handle<AIS_InteractiveObject> TPrsStd_ConstraintTools::ComputeCoincident(
|
||||
const occ::handle<TDataXtd_Constraint>& aConst)
|
||||
{
|
||||
occ::handle<AIS_InteractiveObject> aResult;
|
||||
ComputeCoincident(aConst, aResult);
|
||||
return aResult;
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
void TPrsStd_ConstraintTools::ComputeCoincident(const occ::handle<TDataXtd_Constraint>& aConst,
|
||||
occ::handle<AIS_InteractiveObject>& anAIS)
|
||||
{
|
||||
@@ -2283,6 +2483,16 @@ void TPrsStd_ConstraintTools::ComputeCoincident(const occ::handle<TDataXtd_Const
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
occ::handle<AIS_InteractiveObject> TPrsStd_ConstraintTools::ComputeRound(
|
||||
const occ::handle<TDataXtd_Constraint>& aConst)
|
||||
{
|
||||
occ::handle<AIS_InteractiveObject> aResult;
|
||||
ComputeRound(aConst, aResult);
|
||||
return aResult;
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
void TPrsStd_ConstraintTools::ComputeRound(const occ::handle<TDataXtd_Constraint>& aConst,
|
||||
occ::handle<AIS_InteractiveObject>& anAIS)
|
||||
{
|
||||
|
||||
@@ -37,63 +37,223 @@ public:
|
||||
Standard_EXPORT static void UpdateOnlyValue(const occ::handle<TDataXtd_Constraint>& aConst,
|
||||
const occ::handle<AIS_InteractiveObject>& anAIS);
|
||||
|
||||
//! Computes a distance dimension presentation for the given constraint.
|
||||
//! @param[in] aConst the distance constraint
|
||||
//! @return interactive object representing the distance, or null handle on failure
|
||||
[[nodiscard]] Standard_EXPORT static occ::handle<AIS_InteractiveObject> ComputeDistance(
|
||||
const occ::handle<TDataXtd_Constraint>& aConst);
|
||||
|
||||
//! @deprecated Use ComputeDistance() returning handle by value instead.
|
||||
Standard_DEPRECATED("Use ComputeDistance() returning handle by value instead")
|
||||
Standard_EXPORT static void ComputeDistance(const occ::handle<TDataXtd_Constraint>& aConst,
|
||||
occ::handle<AIS_InteractiveObject>& anAIS);
|
||||
|
||||
//! Computes a parallel relation presentation for the given constraint.
|
||||
//! @param[in] aConst the parallel constraint
|
||||
//! @return interactive object representing the relation, or null handle on failure
|
||||
[[nodiscard]] Standard_EXPORT static occ::handle<AIS_InteractiveObject> ComputeParallel(
|
||||
const occ::handle<TDataXtd_Constraint>& aConst);
|
||||
|
||||
//! @deprecated Use ComputeParallel() returning handle by value instead.
|
||||
Standard_DEPRECATED("Use ComputeParallel() returning handle by value instead")
|
||||
Standard_EXPORT static void ComputeParallel(const occ::handle<TDataXtd_Constraint>& aConst,
|
||||
occ::handle<AIS_InteractiveObject>& anAIS);
|
||||
|
||||
//! Computes a tangent relation presentation for the given constraint.
|
||||
//! @param[in] aConst the tangent constraint
|
||||
//! @return interactive object representing the relation, or null handle on failure
|
||||
[[nodiscard]] Standard_EXPORT static occ::handle<AIS_InteractiveObject> ComputeTangent(
|
||||
const occ::handle<TDataXtd_Constraint>& aConst);
|
||||
|
||||
//! @deprecated Use ComputeTangent() returning handle by value instead.
|
||||
Standard_DEPRECATED("Use ComputeTangent() returning handle by value instead")
|
||||
Standard_EXPORT static void ComputeTangent(const occ::handle<TDataXtd_Constraint>& aConst,
|
||||
occ::handle<AIS_InteractiveObject>& anAIS);
|
||||
|
||||
//! Computes a perpendicular relation presentation for the given constraint.
|
||||
//! @param[in] aConst the perpendicular constraint
|
||||
//! @return interactive object representing the relation, or null handle on failure
|
||||
[[nodiscard]] Standard_EXPORT static occ::handle<AIS_InteractiveObject> ComputePerpendicular(
|
||||
const occ::handle<TDataXtd_Constraint>& aConst);
|
||||
|
||||
//! @deprecated Use ComputePerpendicular() returning handle by value instead.
|
||||
Standard_DEPRECATED("Use ComputePerpendicular() returning handle by value instead")
|
||||
Standard_EXPORT static void ComputePerpendicular(const occ::handle<TDataXtd_Constraint>& aConst,
|
||||
occ::handle<AIS_InteractiveObject>& anAIS);
|
||||
|
||||
//! Computes a concentric relation presentation for the given constraint.
|
||||
//! @param[in] aConst the concentric constraint
|
||||
//! @return interactive object representing the relation, or null handle on failure
|
||||
[[nodiscard]] Standard_EXPORT static occ::handle<AIS_InteractiveObject> ComputeConcentric(
|
||||
const occ::handle<TDataXtd_Constraint>& aConst);
|
||||
|
||||
//! @deprecated Use ComputeConcentric() returning handle by value instead.
|
||||
Standard_DEPRECATED("Use ComputeConcentric() returning handle by value instead")
|
||||
Standard_EXPORT static void ComputeConcentric(const occ::handle<TDataXtd_Constraint>& aConst,
|
||||
occ::handle<AIS_InteractiveObject>& anAIS);
|
||||
|
||||
//! Computes a symmetry relation presentation for the given constraint.
|
||||
//! @param[in] aConst the symmetry constraint
|
||||
//! @return interactive object representing the relation, or null handle on failure
|
||||
[[nodiscard]] Standard_EXPORT static occ::handle<AIS_InteractiveObject> ComputeSymmetry(
|
||||
const occ::handle<TDataXtd_Constraint>& aConst);
|
||||
|
||||
//! @deprecated Use ComputeSymmetry() returning handle by value instead.
|
||||
Standard_DEPRECATED("Use ComputeSymmetry() returning handle by value instead")
|
||||
Standard_EXPORT static void ComputeSymmetry(const occ::handle<TDataXtd_Constraint>& aConst,
|
||||
occ::handle<AIS_InteractiveObject>& anAIS);
|
||||
|
||||
//! Computes a midpoint relation presentation for the given constraint.
|
||||
//! @param[in] aConst the midpoint constraint
|
||||
//! @return interactive object representing the relation, or null handle on failure
|
||||
[[nodiscard]] Standard_EXPORT static occ::handle<AIS_InteractiveObject> ComputeMidPoint(
|
||||
const occ::handle<TDataXtd_Constraint>& aConst);
|
||||
|
||||
//! @deprecated Use ComputeMidPoint() returning handle by value instead.
|
||||
Standard_DEPRECATED("Use ComputeMidPoint() returning handle by value instead")
|
||||
Standard_EXPORT static void ComputeMidPoint(const occ::handle<TDataXtd_Constraint>& aConst,
|
||||
occ::handle<AIS_InteractiveObject>& anAIS);
|
||||
|
||||
//! Computes an angle dimension presentation for the given constraint.
|
||||
//! @param[in] aConst the angle constraint
|
||||
//! @return interactive object representing the angle, or null handle on failure
|
||||
[[nodiscard]] Standard_EXPORT static occ::handle<AIS_InteractiveObject> ComputeAngle(
|
||||
const occ::handle<TDataXtd_Constraint>& aConst);
|
||||
|
||||
//! @deprecated Use ComputeAngle() returning handle by value instead.
|
||||
Standard_DEPRECATED("Use ComputeAngle() returning handle by value instead")
|
||||
Standard_EXPORT static void ComputeAngle(const occ::handle<TDataXtd_Constraint>& aConst,
|
||||
occ::handle<AIS_InteractiveObject>& anAIS);
|
||||
|
||||
//! Computes a radius dimension presentation for the given constraint.
|
||||
//! @param[in] aConst the radius constraint
|
||||
//! @return interactive object representing the radius, or null handle on failure
|
||||
[[nodiscard]] Standard_EXPORT static occ::handle<AIS_InteractiveObject> ComputeRadius(
|
||||
const occ::handle<TDataXtd_Constraint>& aConst);
|
||||
|
||||
//! @deprecated Use ComputeRadius() returning handle by value instead.
|
||||
Standard_DEPRECATED("Use ComputeRadius() returning handle by value instead")
|
||||
Standard_EXPORT static void ComputeRadius(const occ::handle<TDataXtd_Constraint>& aConst,
|
||||
occ::handle<AIS_InteractiveObject>& anAIS);
|
||||
|
||||
//! Computes a minor radius dimension presentation for the given constraint.
|
||||
//! @param[in] aConst the minor radius constraint
|
||||
//! @return interactive object representing the minor radius, or null handle on failure
|
||||
[[nodiscard]] Standard_EXPORT static occ::handle<AIS_InteractiveObject> ComputeMinRadius(
|
||||
const occ::handle<TDataXtd_Constraint>& aConst);
|
||||
|
||||
//! @deprecated Use ComputeMinRadius() returning handle by value instead.
|
||||
Standard_DEPRECATED("Use ComputeMinRadius() returning handle by value instead")
|
||||
Standard_EXPORT static void ComputeMinRadius(const occ::handle<TDataXtd_Constraint>& aConst,
|
||||
occ::handle<AIS_InteractiveObject>& anAIS);
|
||||
|
||||
//! Computes a major radius dimension presentation for the given constraint.
|
||||
//! @param[in] aConst the major radius constraint
|
||||
//! @return interactive object representing the major radius, or null handle on failure
|
||||
[[nodiscard]] Standard_EXPORT static occ::handle<AIS_InteractiveObject> ComputeMaxRadius(
|
||||
const occ::handle<TDataXtd_Constraint>& aConst);
|
||||
|
||||
//! @deprecated Use ComputeMaxRadius() returning handle by value instead.
|
||||
Standard_DEPRECATED("Use ComputeMaxRadius() returning handle by value instead")
|
||||
Standard_EXPORT static void ComputeMaxRadius(const occ::handle<TDataXtd_Constraint>& aConst,
|
||||
occ::handle<AIS_InteractiveObject>& anAIS);
|
||||
|
||||
//! Computes an equal distance relation presentation for the given constraint.
|
||||
//! @param[in] aConst the equal distance constraint
|
||||
//! @return interactive object representing the relation, or null handle on failure
|
||||
[[nodiscard]] Standard_EXPORT static occ::handle<AIS_InteractiveObject> ComputeEqualDistance(
|
||||
const occ::handle<TDataXtd_Constraint>& aConst);
|
||||
|
||||
//! @deprecated Use ComputeEqualDistance() returning handle by value instead.
|
||||
Standard_DEPRECATED("Use ComputeEqualDistance() returning handle by value instead")
|
||||
Standard_EXPORT static void ComputeEqualDistance(const occ::handle<TDataXtd_Constraint>& aConst,
|
||||
occ::handle<AIS_InteractiveObject>& anAIS);
|
||||
|
||||
//! Computes an equal radius relation presentation for the given constraint.
|
||||
//! @param[in] aConst the equal radius constraint
|
||||
//! @return interactive object representing the relation, or null handle on failure
|
||||
[[nodiscard]] Standard_EXPORT static occ::handle<AIS_InteractiveObject> ComputeEqualRadius(
|
||||
const occ::handle<TDataXtd_Constraint>& aConst);
|
||||
|
||||
//! @deprecated Use ComputeEqualRadius() returning handle by value instead.
|
||||
Standard_DEPRECATED("Use ComputeEqualRadius() returning handle by value instead")
|
||||
Standard_EXPORT static void ComputeEqualRadius(const occ::handle<TDataXtd_Constraint>& aConst,
|
||||
occ::handle<AIS_InteractiveObject>& anAIS);
|
||||
|
||||
//! Computes a fix constraint presentation for the given constraint.
|
||||
//! @param[in] aConst the fix constraint
|
||||
//! @return interactive object representing the constraint, or null handle on failure
|
||||
[[nodiscard]] Standard_EXPORT static occ::handle<AIS_InteractiveObject> ComputeFix(
|
||||
const occ::handle<TDataXtd_Constraint>& aConst);
|
||||
|
||||
//! @deprecated Use ComputeFix() returning handle by value instead.
|
||||
Standard_DEPRECATED("Use ComputeFix() returning handle by value instead")
|
||||
Standard_EXPORT static void ComputeFix(const occ::handle<TDataXtd_Constraint>& aConst,
|
||||
occ::handle<AIS_InteractiveObject>& anAIS);
|
||||
|
||||
//! Computes a diameter dimension presentation for the given constraint.
|
||||
//! @param[in] aConst the diameter constraint
|
||||
//! @return interactive object representing the diameter, or null handle on failure
|
||||
[[nodiscard]] Standard_EXPORT static occ::handle<AIS_InteractiveObject> ComputeDiameter(
|
||||
const occ::handle<TDataXtd_Constraint>& aConst);
|
||||
|
||||
//! @deprecated Use ComputeDiameter() returning handle by value instead.
|
||||
Standard_DEPRECATED("Use ComputeDiameter() returning handle by value instead")
|
||||
Standard_EXPORT static void ComputeDiameter(const occ::handle<TDataXtd_Constraint>& aConst,
|
||||
occ::handle<AIS_InteractiveObject>& anAIS);
|
||||
|
||||
//! Computes an offset relation presentation for the given constraint.
|
||||
//! @param[in] aConst the offset constraint
|
||||
//! @return interactive object representing the offset, or null handle on failure
|
||||
[[nodiscard]] Standard_EXPORT static occ::handle<AIS_InteractiveObject> ComputeOffset(
|
||||
const occ::handle<TDataXtd_Constraint>& aConst);
|
||||
|
||||
//! @deprecated Use ComputeOffset() returning handle by value instead.
|
||||
Standard_DEPRECATED("Use ComputeOffset() returning handle by value instead")
|
||||
Standard_EXPORT static void ComputeOffset(const occ::handle<TDataXtd_Constraint>& aConst,
|
||||
occ::handle<AIS_InteractiveObject>& anAIS);
|
||||
|
||||
//! Computes a placement relation presentation for the given constraint.
|
||||
//! @param[in] aConst the placement constraint
|
||||
//! @return interactive object representing the placement, or null handle on failure
|
||||
[[nodiscard]] Standard_EXPORT static occ::handle<AIS_InteractiveObject> ComputePlacement(
|
||||
const occ::handle<TDataXtd_Constraint>& aConst);
|
||||
|
||||
//! @deprecated Use ComputePlacement() returning handle by value instead.
|
||||
Standard_DEPRECATED("Use ComputePlacement() returning handle by value instead")
|
||||
Standard_EXPORT static void ComputePlacement(const occ::handle<TDataXtd_Constraint>& aConst,
|
||||
occ::handle<AIS_InteractiveObject>& anAIS);
|
||||
|
||||
//! Computes a coincident relation presentation for the given constraint.
|
||||
//! @param[in] aConst the coincident constraint
|
||||
//! @return interactive object representing the relation, or null handle on failure
|
||||
[[nodiscard]] Standard_EXPORT static occ::handle<AIS_InteractiveObject> ComputeCoincident(
|
||||
const occ::handle<TDataXtd_Constraint>& aConst);
|
||||
|
||||
//! @deprecated Use ComputeCoincident() returning handle by value instead.
|
||||
Standard_DEPRECATED("Use ComputeCoincident() returning handle by value instead")
|
||||
Standard_EXPORT static void ComputeCoincident(const occ::handle<TDataXtd_Constraint>& aConst,
|
||||
occ::handle<AIS_InteractiveObject>& anAIS);
|
||||
|
||||
//! Computes a round (fillet) relation presentation for the given constraint.
|
||||
//! @param[in] aConst the round constraint
|
||||
//! @return interactive object representing the relation, or null handle on failure
|
||||
[[nodiscard]] Standard_EXPORT static occ::handle<AIS_InteractiveObject> ComputeRound(
|
||||
const occ::handle<TDataXtd_Constraint>& aConst);
|
||||
|
||||
//! @deprecated Use ComputeRound() returning handle by value instead.
|
||||
Standard_DEPRECATED("Use ComputeRound() returning handle by value instead")
|
||||
Standard_EXPORT static void ComputeRound(const occ::handle<TDataXtd_Constraint>& aConst,
|
||||
occ::handle<AIS_InteractiveObject>& anAIS);
|
||||
|
||||
//! Computes a presentation for constraint types not handled by specific methods.
|
||||
//! @param[in] aConst the constraint
|
||||
//! @return interactive object representing the constraint, or null handle on failure
|
||||
[[nodiscard]] Standard_EXPORT static occ::handle<AIS_InteractiveObject> ComputeOthers(
|
||||
const occ::handle<TDataXtd_Constraint>& aConst);
|
||||
|
||||
//! @deprecated Use ComputeOthers() returning handle by value instead.
|
||||
Standard_DEPRECATED("Use ComputeOthers() returning handle by value instead")
|
||||
Standard_EXPORT static void ComputeOthers(const occ::handle<TDataXtd_Constraint>& aConst,
|
||||
occ::handle<AIS_InteractiveObject>& anAIS);
|
||||
|
||||
@@ -102,6 +262,14 @@ public:
|
||||
TCollection_ExtendedString& aText,
|
||||
const bool anIsAngle);
|
||||
|
||||
//! Computes an angle dimension presentation for a single-face constraint.
|
||||
//! @param[in] aConst the angle constraint on one face
|
||||
//! @return interactive object representing the angle, or null handle on failure
|
||||
[[nodiscard]] Standard_EXPORT static occ::handle<AIS_InteractiveObject> ComputeAngleForOneFace(
|
||||
const occ::handle<TDataXtd_Constraint>& aConst);
|
||||
|
||||
//! @deprecated Use ComputeAngleForOneFace() returning handle by value instead.
|
||||
Standard_DEPRECATED("Use ComputeAngleForOneFace() returning handle by value instead")
|
||||
Standard_EXPORT static void ComputeAngleForOneFace(const occ::handle<TDataXtd_Constraint>& aConst,
|
||||
occ::handle<AIS_InteractiveObject>& anAIS);
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ STEPConstruct_Part::STEPConstruct_Part()
|
||||
void STEPConstruct_Part::MakeSDR(const occ::handle<StepShape_ShapeRepresentation>& SR,
|
||||
const occ::handle<TCollection_HAsciiString>& aName,
|
||||
const occ::handle<StepBasic_ApplicationContext>& AC,
|
||||
occ::handle<StepData_StepModel>& theStepModel)
|
||||
const occ::handle<StepData_StepModel>& theStepModel)
|
||||
{
|
||||
// get current schema
|
||||
const int schema = theStepModel->InternalParameters.WriteSchema;
|
||||
|
||||
@@ -48,7 +48,7 @@ public:
|
||||
Standard_EXPORT void MakeSDR(const occ::handle<StepShape_ShapeRepresentation>& aShape,
|
||||
const occ::handle<TCollection_HAsciiString>& aName,
|
||||
const occ::handle<StepBasic_ApplicationContext>& AC,
|
||||
occ::handle<StepData_StepModel>& theStepModel);
|
||||
const occ::handle<StepData_StepModel>& theStepModel);
|
||||
|
||||
Standard_EXPORT void ReadSDR(const occ::handle<StepShape_ShapeDefinitionRepresentation>& aShape);
|
||||
|
||||
|
||||
@@ -2127,8 +2127,8 @@ void STEPControl_ActorRead::PrepareUnits(const occ::handle<StepRepr_Representati
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
void STEPControl_ActorRead::ResetUnits(occ::handle<StepData_StepModel>& theModel,
|
||||
StepData_Factors& theLocalFactors)
|
||||
void STEPControl_ActorRead::ResetUnits(const occ::handle<StepData_StepModel>& theModel,
|
||||
StepData_Factors& theLocalFactors)
|
||||
{
|
||||
theLocalFactors.InitializeFactors(1, 1, 1);
|
||||
myPrecision = theModel->InternalParameters.ReadPrecisionVal;
|
||||
|
||||
@@ -88,8 +88,8 @@ public:
|
||||
|
||||
//! reset units and tolerances context to default
|
||||
//! (mm, radians, read.precision.val, etc.)
|
||||
Standard_EXPORT void ResetUnits(occ::handle<StepData_StepModel>& theModel,
|
||||
StepData_Factors& theLocalFactors);
|
||||
Standard_EXPORT void ResetUnits(const occ::handle<StepData_StepModel>& theModel,
|
||||
StepData_Factors& theLocalFactors);
|
||||
|
||||
//! Set model
|
||||
Standard_EXPORT void SetModel(const occ::handle<Interface_InterfaceModel>& theModel);
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ public:
|
||||
const occ::handle<StepBasic_LengthMeasureWithUnit>& theMaxTol,
|
||||
const StepDimTol_GeometricToleranceType theType);
|
||||
|
||||
inline void SetMaxTolerance(occ::handle<StepBasic_LengthMeasureWithUnit>& theMaxTol)
|
||||
inline void SetMaxTolerance(const occ::handle<StepBasic_LengthMeasureWithUnit>& theMaxTol)
|
||||
{
|
||||
myMaxTol = theMaxTol;
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ public:
|
||||
const occ::handle<StepBasic_LengthMeasureWithUnit>& theMaxTol,
|
||||
const StepDimTol_GeometricToleranceType theType);
|
||||
|
||||
inline void SetMaxTolerance(occ::handle<StepBasic_LengthMeasureWithUnit>& theMaxTol)
|
||||
inline void SetMaxTolerance(const occ::handle<StepBasic_LengthMeasureWithUnit>& theMaxTol)
|
||||
{
|
||||
myMaxTol = theMaxTol;
|
||||
}
|
||||
|
||||
@@ -167,6 +167,13 @@ void VrmlAPI_Writer::SetRepresentation(const VrmlAPI_RepresentationOfShape aRep)
|
||||
myRepresentation = aRep;
|
||||
}
|
||||
|
||||
VrmlAPI_RepresentationOfShape VrmlAPI_Writer::GetRepresentation() const
|
||||
{
|
||||
return myRepresentation;
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
void VrmlAPI_Writer::SetTransparencyToMaterial(occ::handle<Vrml_Material>& aMaterial,
|
||||
const double aTransparency)
|
||||
{
|
||||
@@ -174,6 +181,8 @@ void VrmlAPI_Writer::SetTransparencyToMaterial(occ::handle<Vrml_Material>& aMate
|
||||
aMaterial->SetTransparency(t);
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
void VrmlAPI_Writer::SetShininessToMaterial(occ::handle<Vrml_Material>& aMaterial,
|
||||
const double aShininess)
|
||||
{
|
||||
@@ -181,6 +190,8 @@ void VrmlAPI_Writer::SetShininessToMaterial(occ::handle<Vrml_Material>& aMateria
|
||||
aMaterial->SetShininess(s);
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
void VrmlAPI_Writer::SetAmbientColorToMaterial(
|
||||
occ::handle<Vrml_Material>& aMaterial,
|
||||
const occ::handle<NCollection_HArray1<Quantity_Color>>& Color)
|
||||
@@ -188,6 +199,8 @@ void VrmlAPI_Writer::SetAmbientColorToMaterial(
|
||||
aMaterial->SetAmbientColor(Color);
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
void VrmlAPI_Writer::SetDiffuseColorToMaterial(
|
||||
occ::handle<Vrml_Material>& aMaterial,
|
||||
const occ::handle<NCollection_HArray1<Quantity_Color>>& Color)
|
||||
@@ -195,6 +208,8 @@ void VrmlAPI_Writer::SetDiffuseColorToMaterial(
|
||||
aMaterial->SetDiffuseColor(Color);
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
void VrmlAPI_Writer::SetSpecularColorToMaterial(
|
||||
occ::handle<Vrml_Material>& aMaterial,
|
||||
const occ::handle<NCollection_HArray1<Quantity_Color>>& Color)
|
||||
@@ -202,6 +217,8 @@ void VrmlAPI_Writer::SetSpecularColorToMaterial(
|
||||
aMaterial->SetSpecularColor(Color);
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
void VrmlAPI_Writer::SetEmissiveColorToMaterial(
|
||||
occ::handle<Vrml_Material>& aMaterial,
|
||||
const occ::handle<NCollection_HArray1<Quantity_Color>>& Color)
|
||||
@@ -209,11 +226,6 @@ void VrmlAPI_Writer::SetEmissiveColorToMaterial(
|
||||
aMaterial->SetEmissiveColor(Color);
|
||||
}
|
||||
|
||||
VrmlAPI_RepresentationOfShape VrmlAPI_Writer::GetRepresentation() const
|
||||
{
|
||||
return myRepresentation;
|
||||
}
|
||||
|
||||
occ::handle<Vrml_Material> VrmlAPI_Writer::GetFrontMaterial() const
|
||||
{
|
||||
return myFrontMaterial;
|
||||
|
||||
@@ -25,10 +25,10 @@
|
||||
#include <NCollection_Array1.hxx>
|
||||
#include <NCollection_HArray1.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Vrml_Material.hxx>
|
||||
|
||||
class VrmlConverter_Drawer;
|
||||
class VrmlConverter_Projector;
|
||||
class Vrml_Material;
|
||||
class TopoDS_Shape;
|
||||
class TDocStd_Document;
|
||||
|
||||
@@ -66,34 +66,45 @@ public:
|
||||
//! defined through the VrmlAPI_RepresentationOfShape enumeration.
|
||||
Standard_EXPORT void SetRepresentation(const VrmlAPI_RepresentationOfShape aRep);
|
||||
|
||||
//! Set transparency to given material
|
||||
Standard_EXPORT void SetTransparencyToMaterial(occ::handle<Vrml_Material>& aMaterial,
|
||||
const double aTransparency);
|
||||
|
||||
Standard_EXPORT void SetShininessToMaterial(occ::handle<Vrml_Material>& aMaterial,
|
||||
const double aShininess);
|
||||
|
||||
Standard_EXPORT void SetAmbientColorToMaterial(
|
||||
occ::handle<Vrml_Material>& aMaterial,
|
||||
const occ::handle<NCollection_HArray1<Quantity_Color>>& Color);
|
||||
|
||||
Standard_EXPORT void SetDiffuseColorToMaterial(
|
||||
occ::handle<Vrml_Material>& aMaterial,
|
||||
const occ::handle<NCollection_HArray1<Quantity_Color>>& Color);
|
||||
|
||||
Standard_EXPORT void SetSpecularColorToMaterial(
|
||||
occ::handle<Vrml_Material>& aMaterial,
|
||||
const occ::handle<NCollection_HArray1<Quantity_Color>>& Color);
|
||||
|
||||
Standard_EXPORT void SetEmissiveColorToMaterial(
|
||||
occ::handle<Vrml_Material>& aMaterial,
|
||||
const occ::handle<NCollection_HArray1<Quantity_Color>>& Color);
|
||||
|
||||
//! Returns the representation of the shape which is
|
||||
//! written to the VRML file. Types of representation are set through the
|
||||
//! VrmlAPI_RepresentationOfShape enumeration.
|
||||
Standard_EXPORT VrmlAPI_RepresentationOfShape GetRepresentation() const;
|
||||
|
||||
//! @deprecated Call Vrml_Material::SetTransparency() directly instead.
|
||||
Standard_DEPRECATED("Call Vrml_Material::SetTransparency() directly instead")
|
||||
Standard_EXPORT void SetTransparencyToMaterial(occ::handle<Vrml_Material>& aMaterial,
|
||||
const double aTransparency);
|
||||
|
||||
//! @deprecated Call Vrml_Material::SetShininess() directly instead.
|
||||
Standard_DEPRECATED("Call Vrml_Material::SetShininess() directly instead")
|
||||
Standard_EXPORT void SetShininessToMaterial(occ::handle<Vrml_Material>& aMaterial,
|
||||
const double aShininess);
|
||||
|
||||
//! @deprecated Call Vrml_Material::SetAmbientColor() directly instead.
|
||||
Standard_DEPRECATED("Call Vrml_Material::SetAmbientColor() directly instead")
|
||||
Standard_EXPORT void SetAmbientColorToMaterial(
|
||||
occ::handle<Vrml_Material>& aMaterial,
|
||||
const occ::handle<NCollection_HArray1<Quantity_Color>>& Color);
|
||||
|
||||
//! @deprecated Call Vrml_Material::SetDiffuseColor() directly instead.
|
||||
Standard_DEPRECATED("Call Vrml_Material::SetDiffuseColor() directly instead")
|
||||
Standard_EXPORT void SetDiffuseColorToMaterial(
|
||||
occ::handle<Vrml_Material>& aMaterial,
|
||||
const occ::handle<NCollection_HArray1<Quantity_Color>>& Color);
|
||||
|
||||
//! @deprecated Call Vrml_Material::SetSpecularColor() directly instead.
|
||||
Standard_DEPRECATED("Call Vrml_Material::SetSpecularColor() directly instead")
|
||||
Standard_EXPORT void SetSpecularColorToMaterial(
|
||||
occ::handle<Vrml_Material>& aMaterial,
|
||||
const occ::handle<NCollection_HArray1<Quantity_Color>>& Color);
|
||||
|
||||
//! @deprecated Call Vrml_Material::SetEmissiveColor() directly instead.
|
||||
Standard_DEPRECATED("Call Vrml_Material::SetEmissiveColor() directly instead")
|
||||
Standard_EXPORT void SetEmissiveColorToMaterial(
|
||||
occ::handle<Vrml_Material>& aMaterial,
|
||||
const occ::handle<NCollection_HArray1<Quantity_Color>>& Color);
|
||||
|
||||
Standard_EXPORT occ::handle<Vrml_Material> GetFrontMaterial() const;
|
||||
|
||||
Standard_EXPORT occ::handle<Vrml_Material> GetPointsMaterial() const;
|
||||
|
||||
@@ -513,14 +513,14 @@ void IFSelect_ModelCopier::CopiedModel(const Interface_Graph&
|
||||
}
|
||||
}
|
||||
|
||||
void IFSelect_ModelCopier::CopiedRemaining(const Interface_Graph& G,
|
||||
const occ::handle<IFSelect_WorkLibrary>& WL,
|
||||
Interface_CopyTool& TC,
|
||||
occ::handle<Interface_InterfaceModel>& newmod)
|
||||
occ::handle<Interface_InterfaceModel> IFSelect_ModelCopier::CopiedRemaining(
|
||||
const Interface_Graph& G,
|
||||
const occ::handle<IFSelect_WorkLibrary>& WL,
|
||||
Interface_CopyTool& TC)
|
||||
{
|
||||
const occ::handle<Interface_InterfaceModel>& original = G.Model();
|
||||
// Interface_CopyTool TC(original,protocol);
|
||||
newmod = original->NewEmptyModel();
|
||||
occ::handle<Interface_InterfaceModel> newmod = original->NewEmptyModel();
|
||||
TC.Clear();
|
||||
Interface_EntityIterator tocopy;
|
||||
int nb = G.Size();
|
||||
@@ -567,6 +567,16 @@ void IFSelect_ModelCopier::CopiedRemaining(const Interface_Graph&
|
||||
std::cout << " -- Remaining data complete" << std::endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
return newmod;
|
||||
}
|
||||
|
||||
void IFSelect_ModelCopier::CopiedRemaining(const Interface_Graph& G,
|
||||
const occ::handle<IFSelect_WorkLibrary>& WL,
|
||||
Interface_CopyTool& TC,
|
||||
occ::handle<Interface_InterfaceModel>& newmod)
|
||||
{
|
||||
newmod = CopiedRemaining(G, WL, TC);
|
||||
}
|
||||
|
||||
bool IFSelect_ModelCopier::SetRemaining(Interface_Graph& CG) const
|
||||
|
||||
@@ -167,6 +167,18 @@ public:
|
||||
//! <WL> performs the copy by using <TC>
|
||||
//! <TC> is assumed to have been defined with the starting model
|
||||
//! same as defined by <G>.
|
||||
//! Produces a model copied from the remaining list.
|
||||
//! @param[in] G the interface graph
|
||||
//! @param[in] WL the work library performing the copy
|
||||
//! @param[in,out] TC the copy tool
|
||||
//! @return the new model with remaining data, or null handle if empty
|
||||
[[nodiscard]] Standard_EXPORT occ::handle<Interface_InterfaceModel> CopiedRemaining(
|
||||
const Interface_Graph& G,
|
||||
const occ::handle<IFSelect_WorkLibrary>& WL,
|
||||
Interface_CopyTool& TC);
|
||||
|
||||
//! @deprecated Use CopiedRemaining() returning handle by value instead.
|
||||
Standard_DEPRECATED("Use CopiedRemaining() returning handle by value instead")
|
||||
Standard_EXPORT void CopiedRemaining(const Interface_Graph& G,
|
||||
const occ::handle<IFSelect_WorkLibrary>& WL,
|
||||
Interface_CopyTool& TC,
|
||||
|
||||
@@ -114,7 +114,7 @@ bool IFSelect_TransformStandard::Perform(const Interface_Graph&
|
||||
{
|
||||
Interface_CopyTool TC(G.Model(), protocol);
|
||||
themap = TC.Control();
|
||||
Copy(G, TC, newmod);
|
||||
newmod = Copy(G, TC);
|
||||
return ApplyModifiers(G, protocol, TC, checks, newmod);
|
||||
}
|
||||
|
||||
@@ -122,18 +122,15 @@ void IFSelect_TransformStandard::Copy(const Interface_Graph& G,
|
||||
Interface_CopyTool& TC,
|
||||
occ::handle<Interface_InterfaceModel>& newmod) const
|
||||
{
|
||||
if (CopyOption())
|
||||
StandardCopy(G, TC, newmod);
|
||||
else
|
||||
OnTheSpot(G, TC, newmod);
|
||||
newmod = Copy(G, TC);
|
||||
}
|
||||
|
||||
void IFSelect_TransformStandard::StandardCopy(const Interface_Graph& G,
|
||||
Interface_CopyTool& TC,
|
||||
occ::handle<Interface_InterfaceModel>& newmod) const
|
||||
occ::handle<Interface_InterfaceModel> IFSelect_TransformStandard::StandardCopy(
|
||||
const Interface_Graph& G,
|
||||
Interface_CopyTool& TC) const
|
||||
{
|
||||
const occ::handle<Interface_InterfaceModel>& original = G.Model();
|
||||
newmod = original->NewEmptyModel();
|
||||
occ::handle<Interface_InterfaceModel> newmod = original->NewEmptyModel();
|
||||
TC.Clear();
|
||||
int nb = G.Size();
|
||||
occ::handle<NCollection_HArray1<int>> remain = new NCollection_HArray1<int>(0, nb + 1);
|
||||
@@ -144,16 +141,37 @@ void IFSelect_TransformStandard::StandardCopy(const Interface_Graph&
|
||||
TC.TransferEntity(original->Value(i));
|
||||
}
|
||||
TC.FillModel(newmod);
|
||||
return newmod;
|
||||
}
|
||||
|
||||
occ::handle<Interface_InterfaceModel> IFSelect_TransformStandard::Copy(const Interface_Graph& G,
|
||||
Interface_CopyTool& TC) const
|
||||
{
|
||||
return CopyOption() ? StandardCopy(G, TC) : OnTheSpot(G, TC);
|
||||
}
|
||||
|
||||
void IFSelect_TransformStandard::StandardCopy(const Interface_Graph& G,
|
||||
Interface_CopyTool& TC,
|
||||
occ::handle<Interface_InterfaceModel>& newmod) const
|
||||
{
|
||||
newmod = StandardCopy(G, TC);
|
||||
}
|
||||
|
||||
occ::handle<Interface_InterfaceModel> IFSelect_TransformStandard::OnTheSpot(
|
||||
const Interface_Graph& G,
|
||||
Interface_CopyTool& TC) const
|
||||
{
|
||||
int nb = G.Size();
|
||||
for (int i = 1; i <= nb; i++)
|
||||
TC.Bind(G.Entity(i), G.Entity(i));
|
||||
return G.Model();
|
||||
}
|
||||
|
||||
void IFSelect_TransformStandard::OnTheSpot(const Interface_Graph& G,
|
||||
Interface_CopyTool& TC,
|
||||
occ::handle<Interface_InterfaceModel>& newmod) const
|
||||
{
|
||||
int nb = G.Size();
|
||||
for (int i = 1; i <= nb; i++)
|
||||
TC.Bind(G.Entity(i), G.Entity(i));
|
||||
newmod = G.Model();
|
||||
newmod = OnTheSpot(G, TC);
|
||||
}
|
||||
|
||||
bool IFSelect_TransformStandard::ApplyModifiers(const Interface_Graph& G,
|
||||
|
||||
@@ -118,6 +118,17 @@ public:
|
||||
|
||||
//! This the first operation. It calls StandardCopy or OnTheSpot
|
||||
//! according the option
|
||||
//! Performs the copy operation. Calls StandardCopy or OnTheSpot
|
||||
//! according to the copy option.
|
||||
//! @param[in] G the interface graph
|
||||
//! @param[in,out] TC the copy tool
|
||||
//! @return the new model produced by the copy
|
||||
[[nodiscard]] Standard_EXPORT occ::handle<Interface_InterfaceModel> Copy(
|
||||
const Interface_Graph& G,
|
||||
Interface_CopyTool& TC) const;
|
||||
|
||||
//! @deprecated Use Copy() returning handle by value instead.
|
||||
Standard_DEPRECATED("Use Copy() returning handle by value instead")
|
||||
Standard_EXPORT void Copy(const Interface_Graph& G,
|
||||
Interface_CopyTool& TC,
|
||||
occ::handle<Interface_InterfaceModel>& newmod) const;
|
||||
@@ -125,12 +136,33 @@ public:
|
||||
//! This is the standard action of Copy : its takes into account
|
||||
//! only the remaining entities (noted by Graph Status positive)
|
||||
//! and their proper dependences of course. Produces a new model.
|
||||
//! Performs a standard copy of remaining entities and their dependencies.
|
||||
//! @param[in] G the interface graph
|
||||
//! @param[in,out] TC the copy tool
|
||||
//! @return the new model with copied entities
|
||||
[[nodiscard]] Standard_EXPORT occ::handle<Interface_InterfaceModel> StandardCopy(
|
||||
const Interface_Graph& G,
|
||||
Interface_CopyTool& TC) const;
|
||||
|
||||
//! @deprecated Use StandardCopy() returning handle by value instead.
|
||||
Standard_DEPRECATED("Use StandardCopy() returning handle by value instead")
|
||||
Standard_EXPORT void StandardCopy(const Interface_Graph& G,
|
||||
Interface_CopyTool& TC,
|
||||
occ::handle<Interface_InterfaceModel>& newmod) const;
|
||||
|
||||
//! This is the OnTheSpot action : each entity is bound with ...
|
||||
//! itself. The produced model is the same as the starting one.
|
||||
//! Performs the on-the-spot action: each entity is bound with itself.
|
||||
//! The produced model is the same as the starting one.
|
||||
//! @param[in] G the interface graph
|
||||
//! @param[in,out] TC the copy tool
|
||||
//! @return the starting model (same instance)
|
||||
[[nodiscard]] Standard_EXPORT occ::handle<Interface_InterfaceModel> OnTheSpot(
|
||||
const Interface_Graph& G,
|
||||
Interface_CopyTool& TC) const;
|
||||
|
||||
//! @deprecated Use OnTheSpot() returning handle by value instead.
|
||||
Standard_DEPRECATED("Use OnTheSpot() returning handle by value instead")
|
||||
Standard_EXPORT void OnTheSpot(const Interface_Graph& G,
|
||||
Interface_CopyTool& TC,
|
||||
occ::handle<Interface_InterfaceModel>& newmod) const;
|
||||
|
||||
@@ -2115,9 +2115,9 @@ bool IFSelect_WorkSession::SetRemaining(const IFSelect_RemainMode mode)
|
||||
}
|
||||
else if (mode == IFSelect_RemainCompute)
|
||||
{
|
||||
occ::handle<Interface_InterfaceModel> newmod;
|
||||
Interface_CopyTool TC(myModel, theprotocol);
|
||||
thecopier->CopiedRemaining(thegraph->Graph(), thelibrary, TC, newmod);
|
||||
occ::handle<Interface_InterfaceModel> newmod =
|
||||
thecopier->CopiedRemaining(thegraph->Graph(), thelibrary, TC);
|
||||
if (newmod.IsNull())
|
||||
{
|
||||
sout << " No Remaining Data recorded" << std::endl;
|
||||
|
||||
@@ -43,7 +43,9 @@ Interface_IntList::Interface_IntList(const Interface_IntList& other, const bool
|
||||
{
|
||||
thenbe = other.NbEntities();
|
||||
thenum = thecount = therank = 0; // szv#4:S4163:12Mar99 initialization needed
|
||||
other.Internals(thenbr, theents, therefs);
|
||||
thenbr = other.NbReferences();
|
||||
theents = other.Entities();
|
||||
therefs = other.References();
|
||||
if (copied)
|
||||
{
|
||||
int i;
|
||||
@@ -69,6 +71,21 @@ void Interface_IntList::Initialize(const int nbe)
|
||||
theents->Init(0);
|
||||
}
|
||||
|
||||
int Interface_IntList::NbReferences() const
|
||||
{
|
||||
return thenbr;
|
||||
}
|
||||
|
||||
const occ::handle<NCollection_HArray1<int>>& Interface_IntList::Entities() const
|
||||
{
|
||||
return theents;
|
||||
}
|
||||
|
||||
const occ::handle<NCollection_HArray1<int>>& Interface_IntList::References() const
|
||||
{
|
||||
return therefs;
|
||||
}
|
||||
|
||||
void Interface_IntList::Internals(int& nbrefs,
|
||||
occ::handle<NCollection_HArray1<int>>& ents,
|
||||
occ::handle<NCollection_HArray1<int>>& refs) const
|
||||
|
||||
@@ -70,7 +70,21 @@ public:
|
||||
//! Initialize IntList by number of entities.
|
||||
Standard_EXPORT void Initialize(const int nbe);
|
||||
|
||||
//! Returns count of stored references.
|
||||
//! @return number of references
|
||||
Standard_EXPORT int NbReferences() const;
|
||||
|
||||
//! Returns entity headers used to describe the lists.
|
||||
//! @return handle to the array of entity headers
|
||||
Standard_EXPORT const occ::handle<NCollection_HArray1<int>>& Entities() const;
|
||||
|
||||
//! Returns the packed references storage.
|
||||
//! @return handle to the array of packed references
|
||||
Standard_EXPORT const occ::handle<NCollection_HArray1<int>>& References() const;
|
||||
|
||||
//! Returns internal values, used for copying
|
||||
//! @deprecated Use NbReferences(), Entities(), and References() instead.
|
||||
Standard_DEPRECATED("Use NbReferences(), Entities(), and References() instead")
|
||||
Standard_EXPORT void Internals(int& nbrefs,
|
||||
occ::handle<NCollection_HArray1<int>>& ents,
|
||||
occ::handle<NCollection_HArray1<int>>& refs) const;
|
||||
|
||||
@@ -70,7 +70,7 @@ DNaming_BooleanOperationDriver::DNaming_BooleanOperationDriver() = default;
|
||||
// function : Validate
|
||||
// purpose : Validates labels of a function in <log>.
|
||||
//=======================================================================
|
||||
void DNaming_BooleanOperationDriver::Validate(occ::handle<TFunction_Logbook>&) const {}
|
||||
void DNaming_BooleanOperationDriver::Validate(const occ::handle<TFunction_Logbook>&) const {}
|
||||
|
||||
//=======================================================================
|
||||
// function : MustExecute
|
||||
|
||||
@@ -42,7 +42,7 @@ public:
|
||||
//! the valid label scope.
|
||||
//! execution of function
|
||||
//! ======================
|
||||
Standard_EXPORT void Validate(occ::handle<TFunction_Logbook>& theLog) const override;
|
||||
Standard_EXPORT void Validate(const occ::handle<TFunction_Logbook>& theLog) const override;
|
||||
|
||||
//! Analyse in <log> if the loaded function must be executed
|
||||
//! (i.e.arguments are modified) or not.
|
||||
|
||||
@@ -41,7 +41,7 @@ DNaming_BoxDriver::DNaming_BoxDriver() = default;
|
||||
// function : Validate
|
||||
// purpose : Validates labels of a function in <log>.
|
||||
//=======================================================================
|
||||
void DNaming_BoxDriver::Validate(occ::handle<TFunction_Logbook>&) const {}
|
||||
void DNaming_BoxDriver::Validate(const occ::handle<TFunction_Logbook>&) const {}
|
||||
|
||||
//=======================================================================
|
||||
// function : MustExecute
|
||||
|
||||
@@ -40,7 +40,7 @@ public:
|
||||
//! the valid label scope.
|
||||
//! execution of function
|
||||
//! ======================
|
||||
Standard_EXPORT void Validate(occ::handle<TFunction_Logbook>& theLog) const override;
|
||||
Standard_EXPORT void Validate(const occ::handle<TFunction_Logbook>& theLog) const override;
|
||||
|
||||
//! Analyse in <log> if the loaded function must be executed
|
||||
//! (i.e.arguments are modified) or not.
|
||||
|
||||
@@ -46,7 +46,7 @@ DNaming_CylinderDriver::DNaming_CylinderDriver() = default;
|
||||
// function : Validate
|
||||
// purpose : Validates labels of a function in <log>.
|
||||
//=======================================================================
|
||||
void DNaming_CylinderDriver::Validate(occ::handle<TFunction_Logbook>&) const {}
|
||||
void DNaming_CylinderDriver::Validate(const occ::handle<TFunction_Logbook>&) const {}
|
||||
|
||||
//=======================================================================
|
||||
// function : MustExecute
|
||||
|
||||
@@ -41,7 +41,7 @@ public:
|
||||
//! the valid label scope.
|
||||
//! execution of function
|
||||
//! ======================
|
||||
Standard_EXPORT void Validate(occ::handle<TFunction_Logbook>& theLog) const override;
|
||||
Standard_EXPORT void Validate(const occ::handle<TFunction_Logbook>& theLog) const override;
|
||||
|
||||
//! Analyse in <log> if the loaded function must be executed
|
||||
//! (i.e.arguments are modified) or not.
|
||||
|
||||
@@ -47,7 +47,7 @@ DNaming_FilletDriver::DNaming_FilletDriver() = default;
|
||||
// function : Validate
|
||||
// purpose : Validates labels of a function in <log>.
|
||||
//=======================================================================
|
||||
void DNaming_FilletDriver::Validate(occ::handle<TFunction_Logbook>&) const {}
|
||||
void DNaming_FilletDriver::Validate(const occ::handle<TFunction_Logbook>&) const {}
|
||||
|
||||
//=======================================================================
|
||||
// function : MustExecute
|
||||
|
||||
@@ -41,7 +41,7 @@ public:
|
||||
//! the valid label scope.
|
||||
//! execution of function
|
||||
//! ======================
|
||||
Standard_EXPORT void Validate(occ::handle<TFunction_Logbook>& theLog) const override;
|
||||
Standard_EXPORT void Validate(const occ::handle<TFunction_Logbook>& theLog) const override;
|
||||
|
||||
//! Analyse in <log> if the loaded function must be executed
|
||||
//! (i.e.arguments are modified) or not.
|
||||
|
||||
@@ -51,7 +51,7 @@ DNaming_Line3DDriver::DNaming_Line3DDriver() = default;
|
||||
// function : Validate
|
||||
// purpose : Validates labels of a function in <theLog>.
|
||||
//=======================================================================
|
||||
void DNaming_Line3DDriver::Validate(occ::handle<TFunction_Logbook>&) const {}
|
||||
void DNaming_Line3DDriver::Validate(const occ::handle<TFunction_Logbook>&) const {}
|
||||
|
||||
//=======================================================================
|
||||
// function : MustExecute
|
||||
|
||||
@@ -43,7 +43,7 @@ public:
|
||||
//! the valid label scope.
|
||||
//! execution of function
|
||||
//! ======================
|
||||
Standard_EXPORT void Validate(occ::handle<TFunction_Logbook>& theLog) const override;
|
||||
Standard_EXPORT void Validate(const occ::handle<TFunction_Logbook>& theLog) const override;
|
||||
|
||||
//! Analyse in <log> if the loaded function must be executed
|
||||
//! (i.e.arguments are modified) or not.
|
||||
|
||||
@@ -44,7 +44,7 @@ DNaming_PointDriver::DNaming_PointDriver() = default;
|
||||
// function : Validate
|
||||
// purpose : Validates labels of a function in <log>.
|
||||
//=======================================================================
|
||||
void DNaming_PointDriver::Validate(occ::handle<TFunction_Logbook>&) const {}
|
||||
void DNaming_PointDriver::Validate(const occ::handle<TFunction_Logbook>&) const {}
|
||||
|
||||
//=======================================================================
|
||||
// function : MustExecute
|
||||
|
||||
@@ -39,7 +39,7 @@ public:
|
||||
//! the valid label scope.
|
||||
//! execution of function
|
||||
//! ======================
|
||||
Standard_EXPORT void Validate(occ::handle<TFunction_Logbook>& theLog) const override;
|
||||
Standard_EXPORT void Validate(const occ::handle<TFunction_Logbook>& theLog) const override;
|
||||
|
||||
//! Analyse in <log> if the loaded function must be executed
|
||||
//! (i.e.arguments are modified) or not.
|
||||
|
||||
@@ -58,7 +58,7 @@ DNaming_PrismDriver::DNaming_PrismDriver() = default;
|
||||
// function : Validate
|
||||
// purpose : Validates labels of a function in <theLog>.
|
||||
//=======================================================================
|
||||
void DNaming_PrismDriver::Validate(occ::handle<TFunction_Logbook>&) const {}
|
||||
void DNaming_PrismDriver::Validate(const occ::handle<TFunction_Logbook>&) const {}
|
||||
|
||||
//=======================================================================
|
||||
// function : MustExecute
|
||||
|
||||
@@ -41,7 +41,7 @@ public:
|
||||
//! the valid label scope.
|
||||
//! execution of function
|
||||
//! ======================
|
||||
Standard_EXPORT void Validate(occ::handle<TFunction_Logbook>& theLog) const override;
|
||||
Standard_EXPORT void Validate(const occ::handle<TFunction_Logbook>& theLog) const override;
|
||||
|
||||
//! Analyse in <log> if the loaded function must be executed
|
||||
//! (i.e.arguments are modified) or not.
|
||||
|
||||
@@ -59,7 +59,7 @@ DNaming_RevolutionDriver::DNaming_RevolutionDriver() = default;
|
||||
// function : Validate
|
||||
// purpose : Validates labels of a function in <theLog>.
|
||||
//=======================================================================
|
||||
void DNaming_RevolutionDriver::Validate(occ::handle<TFunction_Logbook>&) const {}
|
||||
void DNaming_RevolutionDriver::Validate(const occ::handle<TFunction_Logbook>&) const {}
|
||||
|
||||
//=======================================================================
|
||||
// function : MustExecute
|
||||
|
||||
@@ -41,7 +41,7 @@ public:
|
||||
//! the valid label scope.
|
||||
//! execution of function
|
||||
//! ======================
|
||||
Standard_EXPORT void Validate(occ::handle<TFunction_Logbook>& theLog) const override;
|
||||
Standard_EXPORT void Validate(const occ::handle<TFunction_Logbook>& theLog) const override;
|
||||
|
||||
//! Analyse in <log> if the loaded function must be executed
|
||||
//! (i.e.arguments are modified) or not.
|
||||
|
||||
@@ -40,7 +40,7 @@ DNaming_SelectionDriver::DNaming_SelectionDriver() = default;
|
||||
// function : Validate
|
||||
// purpose : Validates labels of a function in <theLog>.
|
||||
//=======================================================================
|
||||
void DNaming_SelectionDriver::Validate(occ::handle<TFunction_Logbook>&) const {}
|
||||
void DNaming_SelectionDriver::Validate(const occ::handle<TFunction_Logbook>&) const {}
|
||||
|
||||
//=======================================================================
|
||||
// function : MustExecute
|
||||
|
||||
@@ -37,7 +37,7 @@ public:
|
||||
//! the valid label scope.
|
||||
//! execution of function
|
||||
//! ======================
|
||||
Standard_EXPORT void Validate(occ::handle<TFunction_Logbook>& theLog) const override;
|
||||
Standard_EXPORT void Validate(const occ::handle<TFunction_Logbook>& theLog) const override;
|
||||
|
||||
//! Analyse in <log> if the loaded function must be executed
|
||||
//! (i.e.arguments are modified) or not.
|
||||
|
||||
@@ -52,7 +52,7 @@ DNaming_SphereDriver::DNaming_SphereDriver() = default;
|
||||
// function : Validate
|
||||
// purpose : Validates labels of a function in <theLog>
|
||||
//=======================================================================
|
||||
void DNaming_SphereDriver::Validate(occ::handle<TFunction_Logbook>&) const {}
|
||||
void DNaming_SphereDriver::Validate(const occ::handle<TFunction_Logbook>&) const {}
|
||||
|
||||
//=======================================================================
|
||||
// function : MustExecute
|
||||
|
||||
@@ -40,7 +40,7 @@ public:
|
||||
//! the valid label scope.
|
||||
//! execution of function
|
||||
//! ======================
|
||||
Standard_EXPORT void Validate(occ::handle<TFunction_Logbook>& theLog) const override;
|
||||
Standard_EXPORT void Validate(const occ::handle<TFunction_Logbook>& theLog) const override;
|
||||
|
||||
//! Analyse in <log> if the loaded function must be executed
|
||||
//! (i.e.arguments are modified) or not.
|
||||
|
||||
@@ -76,7 +76,7 @@ DNaming_TransformationDriver::DNaming_TransformationDriver() = default;
|
||||
// function : Validate
|
||||
// purpose : Validates labels of a function in <log>.
|
||||
//=======================================================================
|
||||
void DNaming_TransformationDriver::Validate(occ::handle<TFunction_Logbook>&) const {}
|
||||
void DNaming_TransformationDriver::Validate(const occ::handle<TFunction_Logbook>&) const {}
|
||||
|
||||
//=======================================================================
|
||||
// function : MustExecute
|
||||
|
||||
@@ -41,7 +41,7 @@ public:
|
||||
//! the valid label scope.
|
||||
//! execution of function
|
||||
//! ======================
|
||||
Standard_EXPORT void Validate(occ::handle<TFunction_Logbook>& theLog) const override;
|
||||
Standard_EXPORT void Validate(const occ::handle<TFunction_Logbook>& theLog) const override;
|
||||
|
||||
//! Analyse in <log> if the loaded function must be executed
|
||||
//! (i.e.arguments are modified) or not.
|
||||
|
||||
@@ -642,8 +642,7 @@ static int blend1(Draw_Interpretor& di, int narg, const char** a)
|
||||
int s = aRakk.NbSection(i);
|
||||
for (j = 1; j <= s; j++)
|
||||
{
|
||||
occ::handle<Geom_TrimmedCurve> Sec;
|
||||
aRakk.Section(i, j, Sec);
|
||||
const occ::handle<Geom_TrimmedCurve> Sec = aRakk.Section(i, j);
|
||||
Sprintf(localname, "%s%d%d", "sec", i, j);
|
||||
temp = localname;
|
||||
DrawTrSurf::Set(temp, Sec);
|
||||
|
||||
@@ -975,8 +975,7 @@ static int connectedges(Draw_Interpretor& di, int n, const char** a)
|
||||
TopExp_Explorer aExpE(aSh1, TopAbs_EDGE);
|
||||
occ::handle<NCollection_HSequence<TopoDS_Shape>> aSeqEdges =
|
||||
new NCollection_HSequence<TopoDS_Shape>;
|
||||
occ::handle<NCollection_HSequence<TopoDS_Shape>> aSeqWires =
|
||||
new NCollection_HSequence<TopoDS_Shape>;
|
||||
occ::handle<NCollection_HSequence<TopoDS_Shape>> aSeqWires;
|
||||
NCollection_IndexedMap<TopoDS_Shape, TopTools_ShapeMapHasher> aMapEdges;
|
||||
for (; aExpE.More(); aExpE.Next())
|
||||
{
|
||||
@@ -984,7 +983,7 @@ static int connectedges(Draw_Interpretor& di, int n, const char** a)
|
||||
aMapEdges.Add(aExpE.Current());
|
||||
}
|
||||
|
||||
ShapeAnalysis_FreeBounds::ConnectEdgesToWires(aSeqEdges, aTol, shared, aSeqWires);
|
||||
aSeqWires = ShapeAnalysis_FreeBounds::ConnectEdgesToWires(aSeqEdges, aTol, shared);
|
||||
TopoDS_Compound aComp;
|
||||
BRep_Builder aB;
|
||||
aB.MakeCompound(aComp);
|
||||
|
||||
@@ -569,9 +569,9 @@ void BOPAlgo_PaveFiller::PerformEE(const Message_ProgressRange& theRange)
|
||||
int aNbV = aMVCPB.Extent();
|
||||
for (i = 1; i <= aNbV; ++i)
|
||||
{
|
||||
occ::handle<BOPDS_PaveBlock> aPB1, aPB2;
|
||||
const BOPDS_CoupleOfPaveBlocks& aCPB = aMVCPB.FindFromIndex(i);
|
||||
aCPB.PaveBlocks(aPB1, aPB2);
|
||||
const BOPDS_CoupleOfPaveBlocks& aCPB = aMVCPB.FindFromIndex(i);
|
||||
const occ::handle<BOPDS_PaveBlock>& aPB1 = aCPB.PaveBlock1();
|
||||
const occ::handle<BOPDS_PaveBlock>& aPB2 = aCPB.PaveBlock2();
|
||||
//
|
||||
aMEdges.Remove(aPB1->OriginalEdge());
|
||||
aMEdges.Remove(aPB2->OriginalEdge());
|
||||
@@ -661,8 +661,9 @@ void BOPAlgo_PaveFiller::PerformNewVertices(
|
||||
const BOPDS_CoupleOfPaveBlocks& aCPB = theMVCPB.FindFromIndex(i);
|
||||
int iV = aCPB.Index();
|
||||
//
|
||||
occ::handle<BOPDS_PaveBlock> aPB[2];
|
||||
aCPB.PaveBlocks(aPB[0], aPB[1]);
|
||||
const occ::handle<BOPDS_PaveBlock>& aPB1 = aCPB.PaveBlock1();
|
||||
const occ::handle<BOPDS_PaveBlock>& aPB2 = aCPB.PaveBlock2();
|
||||
const occ::handle<BOPDS_PaveBlock> aPB[] = {aPB1, aPB2};
|
||||
for (int j = 0; j < 2; ++j)
|
||||
{
|
||||
NCollection_List<int>* pLI = aMPBLI.ChangeSeek(aPB[j]);
|
||||
|
||||
@@ -17,21 +17,11 @@
|
||||
|
||||
#include <BOPDS_PaveBlock.hxx>
|
||||
|
||||
/**
|
||||
* The Class BOPDS_CoupleOfPaveBlocks is to store
|
||||
* the information about two pave blocks
|
||||
* and some satellite information
|
||||
*
|
||||
*/
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
//! Stores information about two pave blocks and satellite data.
|
||||
class BOPDS_CoupleOfPaveBlocks
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
//! Default constructor.
|
||||
BOPDS_CoupleOfPaveBlocks()
|
||||
: myIndexInterf(-1),
|
||||
myIndex(-1),
|
||||
@@ -39,14 +29,9 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
//
|
||||
/**
|
||||
* Constructor
|
||||
* @param thePB1
|
||||
* first pave block
|
||||
* @param thePB2
|
||||
* secondt pave block
|
||||
*/
|
||||
//! Constructor with two pave blocks.
|
||||
//! @param[in] thePB1 first pave block
|
||||
//! @param[in] thePB2 second pave block
|
||||
BOPDS_CoupleOfPaveBlocks(const occ::handle<BOPDS_PaveBlock>& thePB1,
|
||||
const occ::handle<BOPDS_PaveBlock>& thePB2)
|
||||
: myIndexInterf(-1),
|
||||
@@ -56,52 +41,27 @@ public:
|
||||
SetPaveBlocks(thePB1, thePB2);
|
||||
}
|
||||
|
||||
//
|
||||
/**
|
||||
* Destructor
|
||||
*/
|
||||
~BOPDS_CoupleOfPaveBlocks() = default;
|
||||
|
||||
//
|
||||
/**
|
||||
* Sets an index
|
||||
* @param theIndex
|
||||
* index
|
||||
*/
|
||||
//! Sets the index.
|
||||
//! @param[in] theIndex the index
|
||||
void SetIndex(const int theIndex) { myIndex = theIndex; }
|
||||
|
||||
//
|
||||
/**
|
||||
* Returns the index
|
||||
* @return
|
||||
* index
|
||||
*/
|
||||
//! Returns the index.
|
||||
//! @return the index
|
||||
int Index() const { return myIndex; }
|
||||
|
||||
//
|
||||
/**
|
||||
* Sets an index of an interference
|
||||
* @param theIndex
|
||||
* index of an interference
|
||||
*/
|
||||
//! Sets the index of an interference.
|
||||
//! @param[in] theIndex index of an interference
|
||||
void SetIndexInterf(const int theIndex) { myIndexInterf = theIndex; }
|
||||
|
||||
//
|
||||
/**
|
||||
* Returns the index of an interference
|
||||
* @return
|
||||
* index of an interference
|
||||
*/
|
||||
//! Returns the index of an interference.
|
||||
//! @return index of an interference
|
||||
int IndexInterf() const { return myIndexInterf; }
|
||||
|
||||
//
|
||||
/**
|
||||
* Sets pave blocks
|
||||
* @param thePB1
|
||||
* first pave block
|
||||
* @param thePB2
|
||||
* secondt pave block
|
||||
*/
|
||||
//! Sets both pave blocks.
|
||||
//! @param[in] thePB1 first pave block
|
||||
//! @param[in] thePB2 second pave block
|
||||
void SetPaveBlocks(const occ::handle<BOPDS_PaveBlock>& thePB1,
|
||||
const occ::handle<BOPDS_PaveBlock>& thePB2)
|
||||
{
|
||||
@@ -109,60 +69,36 @@ public:
|
||||
myPB[1] = thePB2;
|
||||
}
|
||||
|
||||
//
|
||||
/**
|
||||
* Returns pave blocks
|
||||
* @param thePB1
|
||||
* the first pave block
|
||||
* @param thePB2
|
||||
* the second pave block
|
||||
*/
|
||||
//! @deprecated Use PaveBlock1() and PaveBlock2() instead.
|
||||
Standard_DEPRECATED("Use PaveBlock1() and PaveBlock2() instead")
|
||||
void PaveBlocks(occ::handle<BOPDS_PaveBlock>& thePB1, occ::handle<BOPDS_PaveBlock>& thePB2) const
|
||||
{
|
||||
thePB1 = myPB[0];
|
||||
thePB2 = myPB[1];
|
||||
thePB1 = PaveBlock1();
|
||||
thePB2 = PaveBlock2();
|
||||
}
|
||||
|
||||
//
|
||||
/**
|
||||
* Sets the first pave block
|
||||
* @param thePB
|
||||
* the first pave block
|
||||
*/
|
||||
//! Sets the first pave block.
|
||||
//! @param[in] thePB the first pave block
|
||||
void SetPaveBlock1(const occ::handle<BOPDS_PaveBlock>& thePB) { myPB[0] = thePB; }
|
||||
|
||||
/**
|
||||
* Returns the first pave block
|
||||
* @return
|
||||
* the first pave block
|
||||
*/
|
||||
//! Returns the first pave block.
|
||||
//! @return handle to the first pave block
|
||||
const occ::handle<BOPDS_PaveBlock>& PaveBlock1() const { return myPB[0]; }
|
||||
|
||||
//
|
||||
/**
|
||||
* Sets the second pave block
|
||||
* @param thePB
|
||||
* the second pave block
|
||||
*/
|
||||
//! Sets the second pave block.
|
||||
//! @param[in] thePB the second pave block
|
||||
void SetPaveBlock2(const occ::handle<BOPDS_PaveBlock>& thePB) { myPB[1] = thePB; }
|
||||
|
||||
//
|
||||
/**
|
||||
* Returns the second pave block
|
||||
* @return
|
||||
* the second pave block
|
||||
*/
|
||||
//! Returns the second pave block.
|
||||
//! @return handle to the second pave block
|
||||
const occ::handle<BOPDS_PaveBlock>& PaveBlock2() const { return myPB[1]; }
|
||||
|
||||
/**
|
||||
* Sets the tolerance associated with this couple
|
||||
*/
|
||||
//! Sets the tolerance associated with this couple.
|
||||
//! @param[in] theTol the tolerance value
|
||||
void SetTolerance(const double theTol) { myTolerance = theTol; }
|
||||
|
||||
//
|
||||
/**
|
||||
* Returns the tolerance associated with this couple
|
||||
*/
|
||||
//! Returns the tolerance associated with this couple.
|
||||
//! @return the tolerance value
|
||||
double Tolerance() const { return myTolerance; }
|
||||
|
||||
protected:
|
||||
@@ -172,5 +108,4 @@ protected:
|
||||
double myTolerance;
|
||||
};
|
||||
|
||||
//
|
||||
#endif
|
||||
|
||||
@@ -132,8 +132,8 @@ void BRepProj_Projection::BuildSection(const TopoDS_Shape& theShape, const TopoD
|
||||
return;
|
||||
|
||||
// connect edges to wires using ShapeAnalysis functionality
|
||||
ShapeAnalysis_FreeBounds::ConnectEdgesToWires(anEdges, Precision::Confusion(), true, mySection);
|
||||
myIsDone = (!mySection.IsNull() && mySection->Length() > 0);
|
||||
mySection = ShapeAnalysis_FreeBounds::ConnectEdgesToWires(anEdges, Precision::Confusion(), true);
|
||||
myIsDone = (!mySection.IsNull() && mySection->Length() > 0);
|
||||
|
||||
// collect all resulting wires to compound
|
||||
if (myIsDone)
|
||||
|
||||
@@ -80,11 +80,11 @@ void TopOpeBRepDS_Curve::SetSCI(const occ::handle<TopOpeBRepDS_Interference>& SC
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
void TopOpeBRepDS_Curve::GetSCI(occ::handle<TopOpeBRepDS_Interference>& SCI1,
|
||||
occ::handle<TopOpeBRepDS_Interference>& SCI2) const
|
||||
void TopOpeBRepDS_Curve::GetSCI(occ::handle<TopOpeBRepDS_Interference>& theI1,
|
||||
occ::handle<TopOpeBRepDS_Interference>& theI2) const
|
||||
{
|
||||
SCI1 = mySCI1;
|
||||
SCI2 = mySCI2;
|
||||
theI1 = GetSCI1();
|
||||
theI2 = GetSCI2();
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
@@ -50,12 +50,18 @@ public:
|
||||
Standard_EXPORT void SetSCI(const occ::handle<TopOpeBRepDS_Interference>& I1,
|
||||
const occ::handle<TopOpeBRepDS_Interference>& I2);
|
||||
|
||||
//! Returns the first surface-curve interference.
|
||||
//! @return handle to the first interference
|
||||
Standard_EXPORT const occ::handle<TopOpeBRepDS_Interference>& GetSCI1() const;
|
||||
|
||||
//! Returns the second surface-curve interference.
|
||||
//! @return handle to the second interference
|
||||
Standard_EXPORT const occ::handle<TopOpeBRepDS_Interference>& GetSCI2() const;
|
||||
|
||||
Standard_EXPORT void GetSCI(occ::handle<TopOpeBRepDS_Interference>& I1,
|
||||
occ::handle<TopOpeBRepDS_Interference>& I2) const;
|
||||
//! @deprecated Use GetSCI1() and GetSCI2() instead.
|
||||
Standard_DEPRECATED("Use GetSCI1() and GetSCI2() instead")
|
||||
Standard_EXPORT void GetSCI(occ::handle<TopOpeBRepDS_Interference>& theI1,
|
||||
occ::handle<TopOpeBRepDS_Interference>& theI2) const;
|
||||
|
||||
Standard_EXPORT void SetShapes(const TopoDS_Shape& S1, const TopoDS_Shape& S2);
|
||||
|
||||
|
||||
@@ -135,8 +135,8 @@ void TopOpeBRepDS_DataStructure::RemoveCurve(const int I)
|
||||
|
||||
TopoDS_Shape S1, S2;
|
||||
C.GetShapes(S1, S2);
|
||||
occ::handle<TopOpeBRepDS_Interference> I1, I2;
|
||||
C.GetSCI(I1, I2);
|
||||
const occ::handle<TopOpeBRepDS_Interference>& I1 = C.GetSCI1();
|
||||
const occ::handle<TopOpeBRepDS_Interference>& I2 = C.GetSCI2();
|
||||
if (!I1.IsNull())
|
||||
RemoveShapeInterference(S1, I1);
|
||||
if (!I2.IsNull())
|
||||
|
||||
@@ -316,9 +316,8 @@ int FilletSurf_Builder::NbSection(const int IndexSurf) const
|
||||
// IndexSec of SurfaceFillet(IndexSurf) (The basis curve of the
|
||||
// trimmed curve is a Geom_Circle)
|
||||
//=======================================================================
|
||||
void FilletSurf_Builder::Section(const int IndexSurf,
|
||||
const int IndexSec,
|
||||
occ::handle<Geom_TrimmedCurve>& Circ) const
|
||||
occ::handle<Geom_TrimmedCurve> FilletSurf_Builder::Section(const int IndexSurf,
|
||||
const int IndexSec) const
|
||||
{
|
||||
if ((IndexSurf < 1) || (IndexSurf > NbSurface()))
|
||||
throw Standard_OutOfRange("FilletSurf_Builder::Section NbSurface");
|
||||
@@ -326,6 +325,12 @@ void FilletSurf_Builder::Section(const int IndexSurf,
|
||||
else if ((IndexSec < 1) || (IndexSec > NbSection(IndexSurf)))
|
||||
throw Standard_OutOfRange("FilletSurf_Builder::Section NbSection");
|
||||
|
||||
else
|
||||
myIntBuild.Section(IndexSurf, IndexSec, Circ);
|
||||
return myIntBuild.Section(IndexSurf, IndexSec);
|
||||
}
|
||||
|
||||
void FilletSurf_Builder::Section(const int IndexSurf,
|
||||
const int IndexSec,
|
||||
occ::handle<Geom_TrimmedCurve>& Circ) const
|
||||
{
|
||||
Circ = Section(IndexSurf, IndexSec);
|
||||
}
|
||||
|
||||
@@ -89,6 +89,20 @@ public:
|
||||
//! gives the number of NUBS surfaces of the Fillet.
|
||||
Standard_EXPORT int NbSurface() const;
|
||||
|
||||
//! Returns the arc of the section of index IndexSec of surface
|
||||
//! of index IndexSurf. The basis curve of the trimmed curve is a Geom_Circle.
|
||||
//! @param[in] IndexSurf 1-based surface index
|
||||
//! @param[in] IndexSec 1-based section index
|
||||
//! @return the section as a trimmed circular arc
|
||||
[[nodiscard]] Standard_EXPORT occ::handle<Geom_TrimmedCurve> Section(const int IndexSurf,
|
||||
const int IndexSec) const;
|
||||
|
||||
//! @deprecated Use Section() returning handle by value instead.
|
||||
Standard_DEPRECATED("Use Section() returning handle by value instead")
|
||||
Standard_EXPORT void Section(const int IndexSurf,
|
||||
const int IndexSec,
|
||||
occ::handle<Geom_TrimmedCurve>& Circ) const;
|
||||
|
||||
//! gives the NUBS surface of index Index.
|
||||
Standard_EXPORT const occ::handle<Geom_Surface>& SurfaceFillet(const int Index) const;
|
||||
|
||||
@@ -132,10 +146,6 @@ public:
|
||||
|
||||
Standard_EXPORT int NbSection(const int IndexSurf) const;
|
||||
|
||||
Standard_EXPORT void Section(const int IndexSurf,
|
||||
const int IndexSec,
|
||||
occ::handle<Geom_TrimmedCurve>& Circ) const;
|
||||
|
||||
private:
|
||||
FilletSurf_InternalBuilder myIntBuild;
|
||||
FilletSurf_StatusDone myisdone;
|
||||
|
||||
@@ -821,13 +821,19 @@ int FilletSurf_InternalBuilder::NbSection(const int IndexSurf) const
|
||||
// IndexSec of SurfaceFillet(IndexSurf) (The basis curve of the
|
||||
// trimmed curve is a Geom_Circle)
|
||||
//=======================================================================
|
||||
void FilletSurf_InternalBuilder::Section(const int IndexSurf,
|
||||
const int IndexSec,
|
||||
occ::handle<Geom_TrimmedCurve>& Circ) const
|
||||
occ::handle<Geom_TrimmedCurve> FilletSurf_InternalBuilder::Section(const int IndexSurf,
|
||||
const int IndexSec) const
|
||||
{
|
||||
gp_Circ c;
|
||||
double deb, fin;
|
||||
Sect(1, IndexSurf)->Value(IndexSec).Get(c, deb, fin);
|
||||
occ::handle<Geom_Circle> Gc = new Geom_Circle(c);
|
||||
Circ = new Geom_TrimmedCurve(Gc, deb, fin);
|
||||
return new Geom_TrimmedCurve(Gc, deb, fin);
|
||||
}
|
||||
|
||||
void FilletSurf_InternalBuilder::Section(const int IndexSurf,
|
||||
const int IndexSec,
|
||||
occ::handle<Geom_TrimmedCurve>& Circ) const
|
||||
{
|
||||
Circ = Section(IndexSurf, IndexSec);
|
||||
}
|
||||
|
||||
@@ -111,6 +111,16 @@ public:
|
||||
|
||||
Standard_EXPORT int NbSection(const int IndexSurf) const;
|
||||
|
||||
//! Returns the arc of the section of index IndexSec of surface
|
||||
//! of index IndexSurf. The basis curve of the trimmed curve is a Geom_Circle.
|
||||
//! @param[in] IndexSurf 1-based surface index
|
||||
//! @param[in] IndexSec 1-based section index
|
||||
//! @return the section as a trimmed circular arc
|
||||
[[nodiscard]] Standard_EXPORT occ::handle<Geom_TrimmedCurve> Section(const int IndexSurf,
|
||||
const int IndexSec) const;
|
||||
|
||||
//! @deprecated Use Section() returning handle by value instead.
|
||||
Standard_DEPRECATED("Use Section() returning handle by value instead")
|
||||
Standard_EXPORT void Section(const int IndexSurf,
|
||||
const int IndexSec,
|
||||
occ::handle<Geom_TrimmedCurve>& Circ) const;
|
||||
|
||||
+25
-11
@@ -59,16 +59,17 @@ int IntCurveSurface_TheHCurveTool::NbSamples(const occ::handle<Adaptor3d_Curve>&
|
||||
return ((int)nbs);
|
||||
}
|
||||
|
||||
void IntCurveSurface_TheHCurveTool::SamplePars(const occ::handle<Adaptor3d_Curve>& C,
|
||||
const double U0,
|
||||
const double U1,
|
||||
const double Defl,
|
||||
const int NbMin,
|
||||
occ::handle<NCollection_HArray1<double>>& Pars)
|
||||
occ::handle<NCollection_HArray1<double>> IntCurveSurface_TheHCurveTool::SamplePars(
|
||||
const occ::handle<Adaptor3d_Curve>& C,
|
||||
const double U0,
|
||||
const double U1,
|
||||
const double Defl,
|
||||
const int NbMin)
|
||||
{
|
||||
GeomAbs_CurveType typC = C->GetType();
|
||||
const double nbsOther = 10.0;
|
||||
double nbs = nbsOther;
|
||||
occ::handle<NCollection_HArray1<double>> Pars;
|
||||
GeomAbs_CurveType typC = C->GetType();
|
||||
const double nbsOther = 10.0;
|
||||
double nbs = nbsOther;
|
||||
|
||||
if (typC == GeomAbs_Line)
|
||||
nbs = 2;
|
||||
@@ -94,7 +95,7 @@ void IntCurveSurface_TheHCurveTool::SamplePars(const occ::handle<Adaptor3d_Curve
|
||||
{
|
||||
Pars->SetValue(i, u);
|
||||
}
|
||||
return;
|
||||
return Pars;
|
||||
}
|
||||
|
||||
const occ::handle<Geom_BSplineCurve>& aBC = C->BSpline();
|
||||
@@ -257,7 +258,7 @@ void IntCurveSurface_TheHCurveTool::SamplePars(const occ::handle<Adaptor3d_Curve
|
||||
{
|
||||
Pars->SetValue(i, t1);
|
||||
}
|
||||
return;
|
||||
return Pars;
|
||||
}
|
||||
|
||||
Pars = new NCollection_HArray1<double>(1, NbSamples);
|
||||
@@ -270,4 +271,17 @@ void IntCurveSurface_TheHCurveTool::SamplePars(const occ::handle<Adaptor3d_Curve
|
||||
Pars->SetValue(j, aPars(i));
|
||||
}
|
||||
}
|
||||
return Pars;
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
void IntCurveSurface_TheHCurveTool::SamplePars(const occ::handle<Adaptor3d_Curve>& C,
|
||||
const double U0,
|
||||
const double U1,
|
||||
const double Defl,
|
||||
const int NbMin,
|
||||
occ::handle<NCollection_HArray1<double>>& Pars)
|
||||
{
|
||||
Pars = SamplePars(C, U0, U1, Defl, NbMin);
|
||||
}
|
||||
|
||||
@@ -165,6 +165,23 @@ public:
|
||||
const double U0,
|
||||
const double U1);
|
||||
|
||||
//! Returns sample parameters for the curve within [U0, U1] range,
|
||||
//! computed based on deflection and minimum number of points.
|
||||
//! @param[in] C the curve adaptor
|
||||
//! @param[in] U0 start parameter
|
||||
//! @param[in] U1 end parameter
|
||||
//! @param[in] Defl deflection tolerance
|
||||
//! @param[in] NbMin minimum number of sample points
|
||||
//! @return array of sample parameter values
|
||||
[[nodiscard]] Standard_EXPORT static occ::handle<NCollection_HArray1<double>> SamplePars(
|
||||
const occ::handle<Adaptor3d_Curve>& C,
|
||||
const double U0,
|
||||
const double U1,
|
||||
const double Defl,
|
||||
const int NbMin);
|
||||
|
||||
//! @deprecated Use SamplePars() returning handle by value instead.
|
||||
Standard_DEPRECATED("Use SamplePars() returning handle by value instead")
|
||||
Standard_EXPORT static void SamplePars(const occ::handle<Adaptor3d_Curve>& C,
|
||||
const double U0,
|
||||
const double U1,
|
||||
|
||||
@@ -1180,18 +1180,25 @@ gp_XYZ Plate_Plate::EvaluateDerivative(const gp_XY& point2d, const int iu, const
|
||||
// the polynomial part of the Plate function
|
||||
//=======================================================================
|
||||
|
||||
void Plate_Plate::CoefPol(occ::handle<NCollection_HArray2<gp_XYZ>>& Coefs) const
|
||||
occ::handle<NCollection_HArray2<gp_XYZ>> Plate_Plate::CoefPol() const
|
||||
{
|
||||
Coefs = new NCollection_HArray2<gp_XYZ>(0, order - 1, 0, order - 1, gp_XYZ(0., 0., 0.));
|
||||
occ::handle<NCollection_HArray2<gp_XYZ>> aCoefs =
|
||||
new NCollection_HArray2<gp_XYZ>(0, order - 1, 0, order - 1, gp_XYZ(0., 0., 0.));
|
||||
int i = n_el;
|
||||
for (int iu = 0; iu < order; iu++)
|
||||
for (int iv = 0; iu + iv < order; iv++)
|
||||
{
|
||||
Coefs->ChangeValue(iu, iv) = Solution(i) * ddu[iu] * ddv[iv];
|
||||
aCoefs->ChangeValue(iu, iv) = Solution(i) * ddu[iu] * ddv[iv];
|
||||
// Coefs->ChangeValue(idu,idv) = Solution(i);
|
||||
// it is necessary to reset this line if one remove factors in method Polm.
|
||||
i++;
|
||||
}
|
||||
return aCoefs;
|
||||
}
|
||||
|
||||
void Plate_Plate::CoefPol(occ::handle<NCollection_HArray2<gp_XYZ>>& Coefs) const
|
||||
{
|
||||
Coefs = CoefPol();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
|
||||
@@ -98,6 +98,12 @@ public:
|
||||
|
||||
Standard_EXPORT gp_XYZ EvaluateDerivative(const gp_XY& point2d, const int iu, const int iv) const;
|
||||
|
||||
//! Returns the coefficients of the polynomial part of the Plate function.
|
||||
//! @return 2D array of polynomial coefficients as XYZ values
|
||||
[[nodiscard]] Standard_EXPORT occ::handle<NCollection_HArray2<gp_XYZ>> CoefPol() const;
|
||||
|
||||
//! @deprecated Use CoefPol() returning handle by value instead.
|
||||
Standard_DEPRECATED("Use CoefPol() returning handle by value instead")
|
||||
Standard_EXPORT void CoefPol(occ::handle<NCollection_HArray2<gp_XYZ>>& Coefs) const;
|
||||
|
||||
Standard_EXPORT void SetPolynomialPartOnly(const bool PPOnly = true);
|
||||
|
||||
@@ -153,6 +153,21 @@ public:
|
||||
|
||||
static int NbSamples(const gp_Lin& C, const double U0, const double U1);
|
||||
|
||||
//! Returns sample parameters for the line within [U0, U1] range.
|
||||
//! @param[in] C the line
|
||||
//! @param[in] U0 start parameter
|
||||
//! @param[in] U1 end parameter
|
||||
//! @param[in] Defl deflection tolerance (unused for lines)
|
||||
//! @param[in] NbMin minimum number of sample points (unused for lines)
|
||||
//! @return array of 3 sample parameter values
|
||||
[[nodiscard]] static occ::handle<NCollection_HArray1<double>> SamplePars(const gp_Lin& C,
|
||||
const double U0,
|
||||
const double U1,
|
||||
const double Defl,
|
||||
const int NbMin);
|
||||
|
||||
//! @deprecated Use SamplePars() returning handle by value instead.
|
||||
Standard_DEPRECATED("Use SamplePars() returning handle by value instead")
|
||||
static void SamplePars(const gp_Lin& C,
|
||||
const double U0,
|
||||
const double U1,
|
||||
|
||||
@@ -205,17 +205,25 @@ inline int HLRBRep_LineTool::NbSamples(const gp_Lin&, const double, const double
|
||||
return 3;
|
||||
}
|
||||
|
||||
// modified by NIZHNY-MKK Tue Nov 1 18:49:28 2005
|
||||
inline void HLRBRep_LineTool::SamplePars(const gp_Lin&,
|
||||
const double U0,
|
||||
const double U1,
|
||||
const double,
|
||||
const int,
|
||||
inline occ::handle<NCollection_HArray1<double>> HLRBRep_LineTool::SamplePars(const gp_Lin&,
|
||||
const double U0,
|
||||
const double U1,
|
||||
const double,
|
||||
const int)
|
||||
{
|
||||
occ::handle<NCollection_HArray1<double>> aPars = new NCollection_HArray1<double>(1, 3);
|
||||
aPars->SetValue(1, U0);
|
||||
aPars->SetValue(2, (U0 + U1) * 0.5);
|
||||
aPars->SetValue(3, U1);
|
||||
return aPars;
|
||||
}
|
||||
|
||||
inline void HLRBRep_LineTool::SamplePars(const gp_Lin& C,
|
||||
const double U0,
|
||||
const double U1,
|
||||
const double Defl,
|
||||
const int NbMin,
|
||||
occ::handle<NCollection_HArray1<double>>& Pars)
|
||||
{
|
||||
|
||||
Pars = new NCollection_HArray1<double>(1, 3);
|
||||
Pars->SetValue(1, U0);
|
||||
Pars->SetValue(2, (U0 + U1) * 0.5);
|
||||
Pars->SetValue(3, U1);
|
||||
Pars = SamplePars(C, U0, U1, Defl, NbMin);
|
||||
}
|
||||
|
||||
@@ -4066,7 +4066,7 @@ static bool IsInOut(BRepTopAdaptor_FClass2d& FC,
|
||||
void BRepOffset_Tool::CorrectOrientation(
|
||||
const TopoDS_Shape& SI,
|
||||
const NCollection_IndexedMap<TopoDS_Shape, TopTools_ShapeMapHasher>& NewEdges,
|
||||
occ::handle<BRepAlgo_AsDes>& AsDes,
|
||||
const occ::handle<BRepAlgo_AsDes>& AsDes,
|
||||
BRepAlgo_Image& InitOffset,
|
||||
const double Offset)
|
||||
{
|
||||
|
||||
@@ -195,7 +195,7 @@ public:
|
||||
Standard_EXPORT static void CorrectOrientation(
|
||||
const TopoDS_Shape& SI,
|
||||
const NCollection_IndexedMap<TopoDS_Shape, TopTools_ShapeMapHasher>& NewEdges,
|
||||
occ::handle<BRepAlgo_AsDes>& AsDes,
|
||||
const occ::handle<BRepAlgo_AsDes>& AsDes,
|
||||
BRepAlgo_Image& InitOffset,
|
||||
const double Offset);
|
||||
|
||||
|
||||
@@ -76,7 +76,6 @@ ShapeAnalysis_FreeBounds::ShapeAnalysis_FreeBounds(const TopoDS_Shape& shape,
|
||||
//
|
||||
int nbedge = Sew.NbFreeEdges();
|
||||
occ::handle<NCollection_HSequence<TopoDS_Shape>> edges = new NCollection_HSequence<TopoDS_Shape>;
|
||||
occ::handle<NCollection_HSequence<TopoDS_Shape>> wires;
|
||||
TopoDS_Edge anEdge;
|
||||
for (int iedge = 1; iedge <= nbedge; iedge++)
|
||||
{
|
||||
@@ -87,7 +86,7 @@ ShapeAnalysis_FreeBounds::ShapeAnalysis_FreeBounds(const TopoDS_Shape& shape,
|
||||
//
|
||||
// Chainage.
|
||||
//
|
||||
ConnectEdgesToWires(edges, toler, false, wires);
|
||||
occ::handle<NCollection_HSequence<TopoDS_Shape>> wires = ConnectEdgesToWires(edges, toler, false);
|
||||
DispatchWires(wires, myWires, myEdges);
|
||||
SplitWires();
|
||||
|
||||
@@ -120,8 +119,8 @@ ShapeAnalysis_FreeBounds::ShapeAnalysis_FreeBounds(const TopoDS_Shape& shape,
|
||||
occ::handle<NCollection_HSequence<TopoDS_Shape>> edges =
|
||||
see.SeqFromCompound(sas.FreeEdges(), false);
|
||||
|
||||
occ::handle<NCollection_HSequence<TopoDS_Shape>> wires;
|
||||
ConnectEdgesToWires(edges, Precision::Confusion(), true, wires);
|
||||
occ::handle<NCollection_HSequence<TopoDS_Shape>> wires =
|
||||
ConnectEdgesToWires(edges, Precision::Confusion(), true);
|
||||
DispatchWires(wires, myWires, myEdges);
|
||||
SplitWires();
|
||||
}
|
||||
@@ -129,11 +128,10 @@ ShapeAnalysis_FreeBounds::ShapeAnalysis_FreeBounds(const TopoDS_Shape& shape,
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
void ShapeAnalysis_FreeBounds::ConnectEdgesToWires(
|
||||
occ::handle<NCollection_HSequence<TopoDS_Shape>>& edges,
|
||||
const double toler,
|
||||
const bool shared,
|
||||
occ::handle<NCollection_HSequence<TopoDS_Shape>>& wires)
|
||||
occ::handle<NCollection_HSequence<TopoDS_Shape>> ShapeAnalysis_FreeBounds::ConnectEdgesToWires(
|
||||
const occ::handle<NCollection_HSequence<TopoDS_Shape>>& edges,
|
||||
const double toler,
|
||||
const bool shared)
|
||||
{
|
||||
occ::handle<NCollection_HSequence<TopoDS_Shape>> iwires = new NCollection_HSequence<TopoDS_Shape>;
|
||||
BRep_Builder B;
|
||||
@@ -147,29 +145,66 @@ void ShapeAnalysis_FreeBounds::ConnectEdgesToWires(
|
||||
iwires->Append(wire);
|
||||
}
|
||||
|
||||
ConnectWiresToWires(iwires, toler, shared, wires);
|
||||
occ::handle<NCollection_HSequence<TopoDS_Shape>> wires =
|
||||
ConnectWiresToWires(iwires, toler, shared);
|
||||
|
||||
for (i = 1; i <= edges->Length(); i++)
|
||||
if (iwires->Value(i).Orientation() == TopAbs_REVERSED)
|
||||
edges->ChangeValue(i).Reverse();
|
||||
|
||||
return wires;
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
void ShapeAnalysis_FreeBounds::ConnectWiresToWires(
|
||||
occ::handle<NCollection_HSequence<TopoDS_Shape>>& iwires,
|
||||
const double toler,
|
||||
const bool shared,
|
||||
occ::handle<NCollection_HSequence<TopoDS_Shape>>& owires)
|
||||
void ShapeAnalysis_FreeBounds::ConnectEdgesToWires(
|
||||
const occ::handle<NCollection_HSequence<TopoDS_Shape>>& edges,
|
||||
const double toler,
|
||||
const bool shared,
|
||||
occ::handle<NCollection_HSequence<TopoDS_Shape>>& wires)
|
||||
{
|
||||
wires = ConnectEdgesToWires(edges, toler, shared);
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
occ::handle<NCollection_HSequence<TopoDS_Shape>> ShapeAnalysis_FreeBounds::ConnectWiresToWires(
|
||||
const occ::handle<NCollection_HSequence<TopoDS_Shape>>& iwires,
|
||||
const double toler,
|
||||
const bool shared)
|
||||
{
|
||||
NCollection_DataMap<TopoDS_Shape, TopoDS_Shape, TopTools_ShapeMapHasher> map;
|
||||
ConnectWiresToWires(iwires, toler, shared, owires, map);
|
||||
return ConnectWiresToWires(iwires, toler, shared, map);
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
void ShapeAnalysis_FreeBounds::ConnectWiresToWires(
|
||||
occ::handle<NCollection_HSequence<TopoDS_Shape>>& iwires,
|
||||
const occ::handle<NCollection_HSequence<TopoDS_Shape>>& iwires,
|
||||
const double toler,
|
||||
const bool shared,
|
||||
occ::handle<NCollection_HSequence<TopoDS_Shape>>& owires)
|
||||
{
|
||||
owires = ConnectWiresToWires(iwires, toler, shared);
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
occ::handle<NCollection_HSequence<TopoDS_Shape>> ShapeAnalysis_FreeBounds::ConnectWiresToWires(
|
||||
const occ::handle<NCollection_HSequence<TopoDS_Shape>>& iwires,
|
||||
const double toler,
|
||||
const bool shared,
|
||||
NCollection_DataMap<TopoDS_Shape, TopoDS_Shape, TopTools_ShapeMapHasher>& vertices)
|
||||
{
|
||||
occ::handle<NCollection_HSequence<TopoDS_Shape>> owires;
|
||||
ConnectWiresToWires(iwires, toler, shared, owires, vertices);
|
||||
return owires;
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
void ShapeAnalysis_FreeBounds::ConnectWiresToWires(
|
||||
const occ::handle<NCollection_HSequence<TopoDS_Shape>>& iwires,
|
||||
const double toler,
|
||||
const bool shared,
|
||||
occ::handle<NCollection_HSequence<TopoDS_Shape>>& owires,
|
||||
@@ -281,7 +316,6 @@ void ShapeAnalysis_FreeBounds::ConnectWiresToWires(
|
||||
{
|
||||
// making wire
|
||||
// 1.providing connection (see ShapeFix_Wire::FixConnected())
|
||||
// int i; // svv #1
|
||||
for (/*int*/ i = 1; i <= saw->NbEdges(); i++)
|
||||
{
|
||||
if (saw->CheckConnected(i))
|
||||
@@ -291,11 +325,11 @@ void ShapeAnalysis_FreeBounds::ConnectWiresToWires(
|
||||
TopoDS_Edge E1 = sewd->Edge(n1);
|
||||
TopoDS_Edge E2 = sewd->Edge(n2);
|
||||
|
||||
TopoDS_Vertex Vprev, Vfol, V; // connection vertex
|
||||
TopoDS_Vertex Vprev, Vfol, V;
|
||||
Vprev = sae.LastVertex(E1);
|
||||
Vfol = sae.FirstVertex(E2);
|
||||
|
||||
if (saw->LastCheckStatus(ShapeExtend_DONE1)) // absolutely confused
|
||||
if (saw->LastCheckStatus(ShapeExtend_DONE1))
|
||||
V = Vprev;
|
||||
else
|
||||
{
|
||||
@@ -305,7 +339,6 @@ void ShapeAnalysis_FreeBounds::ConnectWiresToWires(
|
||||
vertices.Bind(Vprev, V);
|
||||
vertices.Bind(Vfol, V);
|
||||
|
||||
// replace vertices to a new one
|
||||
ShapeBuild_Edge sbe;
|
||||
if (saw->NbEdges() < 2)
|
||||
sewd->Set(sbe.CopyReplaceVertices(E2, V, V), n2);
|
||||
@@ -318,7 +351,6 @@ void ShapeAnalysis_FreeBounds::ConnectWiresToWires(
|
||||
}
|
||||
}
|
||||
|
||||
// 2.making wire
|
||||
TopoDS_Wire wire = sewd->Wire();
|
||||
if (isUsedManifoldMode)
|
||||
{
|
||||
@@ -327,7 +359,6 @@ void ShapeAnalysis_FreeBounds::ConnectWiresToWires(
|
||||
}
|
||||
else
|
||||
{
|
||||
// Try to check connection by number of free vertices
|
||||
NCollection_Map<TopoDS_Shape, TopTools_ShapeMapHasher> vmap;
|
||||
TopoDS_Iterator it(wire);
|
||||
|
||||
@@ -340,7 +371,6 @@ void ShapeAnalysis_FreeBounds::ConnectWiresToWires(
|
||||
const TopoDS_Shape& V = ite.Value();
|
||||
if (V.Orientation() == TopAbs_FORWARD || V.Orientation() == TopAbs_REVERSED)
|
||||
{
|
||||
// add or remove in the vertex map
|
||||
if (!vmap.Add(V))
|
||||
vmap.Remove(V);
|
||||
}
|
||||
@@ -356,14 +386,12 @@ void ShapeAnalysis_FreeBounds::ConnectWiresToWires(
|
||||
sewd->Clear();
|
||||
sewd->ManifoldMode() = isUsedManifoldMode;
|
||||
|
||||
// Recherche de la premier edge non traitee pour un autre wire.
|
||||
// Searching for first edge for next wire
|
||||
lwire = -1;
|
||||
for (/*int*/ i = 1; i <= arrwires->Length(); i++)
|
||||
{
|
||||
if (!aSel.ContWire(i))
|
||||
{
|
||||
lwire = i; // szv#4:S4163:12Mar99 optimized
|
||||
lwire = i;
|
||||
sewd->Add(TopoDS::Wire(arrwires->Value(lwire)));
|
||||
aSel.LoadList(lwire);
|
||||
|
||||
@@ -498,7 +526,7 @@ static void SplitWire(const TopoDS_Wire& wire,
|
||||
if (statuses.Value(i) != 2)
|
||||
edges->Append(sewd->Edge(i));
|
||||
|
||||
ShapeAnalysis_FreeBounds::ConnectEdgesToWires(edges, toler, shared, open);
|
||||
open = ShapeAnalysis_FreeBounds::ConnectEdgesToWires(edges, toler, shared);
|
||||
}
|
||||
|
||||
void ShapeAnalysis_FreeBounds::SplitWires(
|
||||
|
||||
@@ -114,17 +114,41 @@ public:
|
||||
//! adjacent edges share the same vertex.
|
||||
//! If <shared> is False connection is performed only when
|
||||
//! ends of adjacent edges are at distance less than <toler>.
|
||||
Standard_EXPORT static void ConnectEdgesToWires(
|
||||
occ::handle<NCollection_HSequence<TopoDS_Shape>>& edges,
|
||||
const double toler,
|
||||
const bool shared,
|
||||
occ::handle<NCollection_HSequence<TopoDS_Shape>>& wires);
|
||||
//! Connects edges from the given sequence into wires.
|
||||
//! @param[in] edges the sequence of edges to connect
|
||||
//! @param[in] toler distance tolerance for connection
|
||||
//! @param[in] shared if true, connection uses shared vertices only
|
||||
//! @return sequence of resulting wires
|
||||
[[nodiscard]] Standard_EXPORT static occ::handle<NCollection_HSequence<TopoDS_Shape>>
|
||||
ConnectEdgesToWires(const occ::handle<NCollection_HSequence<TopoDS_Shape>>& edges,
|
||||
const double toler,
|
||||
const bool shared);
|
||||
|
||||
//! @deprecated Use ConnectEdgesToWires() returning handle by value instead.
|
||||
Standard_DEPRECATED("Use ConnectEdgesToWires() returning handle by value instead")
|
||||
Standard_EXPORT static void ConnectEdgesToWires(
|
||||
const occ::handle<NCollection_HSequence<TopoDS_Shape>>& edges,
|
||||
const double toler,
|
||||
const bool shared,
|
||||
occ::handle<NCollection_HSequence<TopoDS_Shape>>& wires);
|
||||
|
||||
//! Connects wires from the given sequence into longer wires.
|
||||
//! @param[in] iwires the sequence of input wires
|
||||
//! @param[in] toler distance tolerance for connection
|
||||
//! @param[in] shared if true, connection uses shared vertices only
|
||||
//! @return sequence of resulting wires
|
||||
[[nodiscard]] Standard_EXPORT static occ::handle<NCollection_HSequence<TopoDS_Shape>>
|
||||
ConnectWiresToWires(const occ::handle<NCollection_HSequence<TopoDS_Shape>>& iwires,
|
||||
const double toler,
|
||||
const bool shared);
|
||||
|
||||
//! @deprecated Use ConnectWiresToWires() returning handle by value instead.
|
||||
Standard_DEPRECATED("Use ConnectWiresToWires() returning handle by value instead")
|
||||
Standard_EXPORT static void ConnectWiresToWires(
|
||||
occ::handle<NCollection_HSequence<TopoDS_Shape>>& iwires,
|
||||
const double toler,
|
||||
const bool shared,
|
||||
occ::handle<NCollection_HSequence<TopoDS_Shape>>& owires);
|
||||
const occ::handle<NCollection_HSequence<TopoDS_Shape>>& iwires,
|
||||
const double toler,
|
||||
const bool shared,
|
||||
occ::handle<NCollection_HSequence<TopoDS_Shape>>& owires);
|
||||
|
||||
//! Builds sequence of <owires> out of sequence of not sorted
|
||||
//! <iwires>.
|
||||
@@ -139,8 +163,24 @@ public:
|
||||
//! ends of adjacent wires are at distance less than <toler>.
|
||||
//! Map <vertices> stores the correspondence between original
|
||||
//! end vertices of the wires and new connecting vertices.
|
||||
//! Connects wires from the given sequence into longer wires.
|
||||
//! Also fills the map of original to new connecting vertices.
|
||||
//! @param[in] iwires the sequence of input wires
|
||||
//! @param[in] toler distance tolerance for connection
|
||||
//! @param[in] shared if true, connection uses shared vertices only
|
||||
//! @param[out] vertices map of original vertices to new connecting vertices
|
||||
//! @return sequence of resulting wires
|
||||
[[nodiscard]] Standard_EXPORT static occ::handle<NCollection_HSequence<TopoDS_Shape>>
|
||||
ConnectWiresToWires(
|
||||
const occ::handle<NCollection_HSequence<TopoDS_Shape>>& iwires,
|
||||
const double toler,
|
||||
const bool shared,
|
||||
NCollection_DataMap<TopoDS_Shape, TopoDS_Shape, TopTools_ShapeMapHasher>& vertices);
|
||||
|
||||
//! @deprecated Use ConnectWiresToWires() returning handle by value instead.
|
||||
Standard_DEPRECATED("Use ConnectWiresToWires() returning handle by value instead")
|
||||
Standard_EXPORT static void ConnectWiresToWires(
|
||||
occ::handle<NCollection_HSequence<TopoDS_Shape>>& iwires,
|
||||
const occ::handle<NCollection_HSequence<TopoDS_Shape>>& iwires,
|
||||
const double toler,
|
||||
const bool shared,
|
||||
occ::handle<NCollection_HSequence<TopoDS_Shape>>& owires,
|
||||
|
||||
@@ -91,10 +91,10 @@ bool ShapeFix_FreeBounds::Perform()
|
||||
if (myCloseToler > mySewToler)
|
||||
{
|
||||
ShapeExtend_Explorer see;
|
||||
occ::handle<NCollection_HSequence<TopoDS_Shape>> newwires,
|
||||
open = see.SeqFromCompound(myEdges, false);
|
||||
occ::handle<NCollection_HSequence<TopoDS_Shape>> open = see.SeqFromCompound(myEdges, false);
|
||||
NCollection_DataMap<TopoDS_Shape, TopoDS_Shape, TopTools_ShapeMapHasher> vertices;
|
||||
ShapeAnalysis_FreeBounds::ConnectWiresToWires(open, myCloseToler, myShared, newwires, vertices);
|
||||
occ::handle<NCollection_HSequence<TopoDS_Shape>> newwires =
|
||||
ShapeAnalysis_FreeBounds::ConnectWiresToWires(open, myCloseToler, myShared, vertices);
|
||||
myEdges.Nullify();
|
||||
ShapeAnalysis_FreeBounds::DispatchWires(newwires, myWires, myEdges);
|
||||
|
||||
|
||||
@@ -141,7 +141,7 @@ void BRepGProp::LinearProperties(const TopoDS_Shape& S,
|
||||
bool IsGeom = BRep_Tool::IsGeometric(aE);
|
||||
if (UseTriangulation || !IsGeom)
|
||||
{
|
||||
BRepGProp_MeshCinert::PreparePolygon(aE, theNodes);
|
||||
theNodes = BRepGProp_MeshCinert::PreparePolygon(aE);
|
||||
}
|
||||
if (!theNodes.IsNull())
|
||||
{
|
||||
|
||||
@@ -644,6 +644,16 @@ static void GetCurveKnots(const double theMin,
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
occ::handle<NCollection_HArray1<double>> BRepGProp_Face::GetUKnots(const double theUMin,
|
||||
const double theUMax) const
|
||||
{
|
||||
occ::handle<NCollection_HArray1<double>> theUKnots;
|
||||
GetUKnots(theUMin, theUMax, theUKnots);
|
||||
return theUKnots;
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
void BRepGProp_Face::GetUKnots(const double theUMin,
|
||||
const double theUMax,
|
||||
occ::handle<NCollection_HArray1<double>>& theUKnots) const
|
||||
@@ -705,6 +715,16 @@ void BRepGProp_Face::GetUKnots(const double theUMin
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
occ::handle<NCollection_HArray1<double>> BRepGProp_Face::GetTKnots(const double theTMin,
|
||||
const double theTMax) const
|
||||
{
|
||||
occ::handle<NCollection_HArray1<double>> theTKnots;
|
||||
GetTKnots(theTMin, theTMax, theTKnots);
|
||||
return theTKnots;
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
void BRepGProp_Face::GetTKnots(const double theTMin,
|
||||
const double theTMax,
|
||||
occ::handle<NCollection_HArray1<double>>& theTKnots) const
|
||||
|
||||
@@ -134,6 +134,15 @@ public:
|
||||
//! then theUMin and lower then theUMax in increasing order.
|
||||
//! If the face is not a BSpline, the array initialized with
|
||||
//! theUMin and theUMax only.
|
||||
//! @param[in] theUMin lower U bound
|
||||
//! @param[in] theUMax upper U bound
|
||||
//! @return array of U knot values
|
||||
[[nodiscard]] Standard_EXPORT occ::handle<NCollection_HArray1<double>> GetUKnots(
|
||||
const double theUMin,
|
||||
const double theUMax) const;
|
||||
|
||||
//! @deprecated Use GetUKnots() returning handle by value instead.
|
||||
Standard_DEPRECATED("Use GetUKnots() returning handle by value instead")
|
||||
Standard_EXPORT void GetUKnots(const double theUMin,
|
||||
const double theUMax,
|
||||
occ::handle<NCollection_HArray1<double>>& theUKnots) const;
|
||||
@@ -147,6 +156,15 @@ public:
|
||||
//! theTMin and lower then theTMax in increasing order.
|
||||
//! If the face is not a BSpline, the array initialized with
|
||||
//! theTMin and theTMax only.
|
||||
//! @param[in] theTMin lower T bound
|
||||
//! @param[in] theTMax upper T bound
|
||||
//! @return array of T knot values
|
||||
[[nodiscard]] Standard_EXPORT occ::handle<NCollection_HArray1<double>> GetTKnots(
|
||||
const double theTMin,
|
||||
const double theTMax) const;
|
||||
|
||||
//! @deprecated Use GetTKnots() returning handle by value instead.
|
||||
Standard_DEPRECATED("Use GetTKnots() returning handle by value instead")
|
||||
Standard_EXPORT void GetTKnots(const double theTMin,
|
||||
const double theTMax,
|
||||
occ::handle<NCollection_HArray1<double>>& theTKnots) const;
|
||||
|
||||
@@ -131,6 +131,16 @@ void BRepGProp_MeshCinert::Perform(const NCollection_Array1<gp_Pnt>& theNodes)
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
occ::handle<NCollection_HArray1<gp_Pnt>> BRepGProp_MeshCinert::PreparePolygon(
|
||||
const TopoDS_Edge& theE)
|
||||
{
|
||||
occ::handle<NCollection_HArray1<gp_Pnt>> thePolyg;
|
||||
PreparePolygon(theE, thePolyg);
|
||||
return thePolyg;
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
void BRepGProp_MeshCinert::PreparePolygon(const TopoDS_Edge& theE,
|
||||
occ::handle<NCollection_HArray1<gp_Pnt>>& thePolyg)
|
||||
{
|
||||
|
||||
@@ -43,9 +43,15 @@ public:
|
||||
//! of polylines represented by set of points.
|
||||
Standard_EXPORT void Perform(const NCollection_Array1<gp_Pnt>& theNodes);
|
||||
|
||||
//! Prepare set of 3d points on base of any available edge polygons:
|
||||
//! 3D polygon, polygon on triangulation, 2d polygon on surface
|
||||
//! If edge has no polygons, array thePolyg is left unchanged
|
||||
//! Prepares set of 3d points on base of any available edge polygons:
|
||||
//! 3D polygon, polygon on triangulation, 2d polygon on surface.
|
||||
//! @param[in] theE the edge to extract polygon from
|
||||
//! @return array of 3D points, or null handle if edge has no polygons
|
||||
[[nodiscard]] Standard_EXPORT static occ::handle<NCollection_HArray1<gp_Pnt>> PreparePolygon(
|
||||
const TopoDS_Edge& theE);
|
||||
|
||||
//! @deprecated Use PreparePolygon() returning handle by value instead.
|
||||
Standard_DEPRECATED("Use PreparePolygon() returning handle by value instead")
|
||||
Standard_EXPORT static void PreparePolygon(const TopoDS_Edge& theE,
|
||||
occ::handle<NCollection_HArray1<gp_Pnt>>& thePolyg);
|
||||
};
|
||||
|
||||
@@ -56,10 +56,9 @@ bool BRepGProp_TFunction::Value(const double X, double& F)
|
||||
{
|
||||
const double tolU = 1.e-9;
|
||||
|
||||
gp_Pnt2d aP2d;
|
||||
gp_Vec2d aV2d;
|
||||
double aUMax;
|
||||
occ::handle<NCollection_HArray1<double>> anUKnots;
|
||||
gp_Pnt2d aP2d;
|
||||
gp_Vec2d aV2d;
|
||||
double aUMax;
|
||||
|
||||
mySurface.D12d(X, aP2d, aV2d);
|
||||
aUMax = aP2d.X();
|
||||
@@ -70,13 +69,13 @@ bool BRepGProp_TFunction::Value(const double X, double& F)
|
||||
return true;
|
||||
}
|
||||
|
||||
mySurface.GetUKnots(myUMin, aUMax, anUKnots);
|
||||
occ::handle<NCollection_HArray1<double>> aUKnots = mySurface.GetUKnots(myUMin, aUMax);
|
||||
myUFunction.SetVParam(aP2d.Y());
|
||||
|
||||
// Compute the integral from myUMin to aUMax of myUFunction.
|
||||
int i;
|
||||
double aCoeff = aV2d.Y();
|
||||
// int aNbUIntervals = anUKnots->Length() - 1;
|
||||
// int aNbUIntervals = aUKnots->Length() - 1;
|
||||
// double aTol = myTolerance/aNbUIntervals;
|
||||
double aTol = myTolerance;
|
||||
|
||||
@@ -116,23 +115,23 @@ bool BRepGProp_TFunction::Value(const double X, double& F)
|
||||
// else
|
||||
// aTol = 0.1;
|
||||
|
||||
int iU = anUKnots->Upper();
|
||||
int iU = aUKnots->Upper();
|
||||
int aNbPntsStart;
|
||||
int aNbMaxIter = 1000;
|
||||
math_KronrodSingleIntegration anIntegral;
|
||||
double aLocalErr = 0.;
|
||||
|
||||
i = anUKnots->Lower();
|
||||
i = aUKnots->Lower();
|
||||
F = 0.;
|
||||
|
||||
// Epmirical criterion
|
||||
aNbPntsStart = std::min(15, mySurface.UIntegrationOrder() / (anUKnots->Length() - 1) + 1);
|
||||
aNbPntsStart = std::min(15, mySurface.UIntegrationOrder() / (aUKnots->Length() - 1) + 1);
|
||||
aNbPntsStart = std::max(5, aNbPntsStart);
|
||||
|
||||
while (i < iU)
|
||||
{
|
||||
double aU1 = anUKnots->Value(i++);
|
||||
double aU2 = anUKnots->Value(i);
|
||||
double aU1 = aUKnots->Value(i++);
|
||||
double aU2 = aUKnots->Value(i);
|
||||
|
||||
if (aU2 - aU1 < tolU)
|
||||
continue;
|
||||
|
||||
@@ -354,10 +354,9 @@ double BRepGProp_VinertGK::PrivatePerform(BRepGProp_Face& theSurface,
|
||||
aTMax = theSurface.LastParameter();
|
||||
|
||||
// Get the spans on the curve.
|
||||
occ::handle<NCollection_HArray1<double>> aTKnots;
|
||||
BRepGProp_TFunction aTFunc(theSurface, loc, IsByPoint, theCoeffs, aUMin, aCrvTol);
|
||||
|
||||
theSurface.GetTKnots(aTMin, aTMax, aTKnots);
|
||||
occ::handle<NCollection_HArray1<double>> aTKnots = theSurface.GetTKnots(aTMin, aTMax);
|
||||
|
||||
int iU = aTKnots->Upper();
|
||||
int aNbTIntervals = aTKnots->Length() - 1;
|
||||
|
||||
@@ -40,6 +40,15 @@ public:
|
||||
|
||||
Standard_EXPORT virtual void SetCurve(const occ::handle<FEmTool_Curve>& C) = 0;
|
||||
|
||||
//! Returns the curve associated with this criterion.
|
||||
//! @return handle to the FEmTool curve
|
||||
[[nodiscard]] occ::handle<FEmTool_Curve> Curve() const
|
||||
{
|
||||
occ::handle<FEmTool_Curve> aCurve;
|
||||
GetCurve(aCurve);
|
||||
return aCurve;
|
||||
}
|
||||
|
||||
Standard_EXPORT virtual void GetCurve(occ::handle<FEmTool_Curve>& C) const = 0;
|
||||
|
||||
Standard_EXPORT virtual void SetEstimation(const double E1, const double E2, const double E3) = 0;
|
||||
|
||||
@@ -1471,7 +1471,7 @@ void AppDef_Variational::Optimization(occ::handle<AppDef_SmoothCriterion>& J,
|
||||
|
||||
int el, dim;
|
||||
|
||||
A.GetAssemblyTable(AssTable);
|
||||
AssTable = A.AssemblyTable();
|
||||
int NbConstr = myNbPassPoints + myNbTangPoints + myNbCurvPoints;
|
||||
|
||||
double CBLONG = J->EstLength();
|
||||
|
||||
@@ -440,7 +440,7 @@ int FEmTool_Assembly::NbGlobVar() const
|
||||
void FEmTool_Assembly::GetAssemblyTable(
|
||||
occ::handle<NCollection_HArray2<occ::handle<NCollection_HArray1<int>>>>& AssTable) const
|
||||
{
|
||||
AssTable = myRefTable;
|
||||
AssTable = AssemblyTable();
|
||||
}
|
||||
|
||||
void FEmTool_Assembly::ResetConstraint()
|
||||
|
||||
@@ -79,6 +79,17 @@ public:
|
||||
|
||||
Standard_EXPORT int NbGlobVar() const;
|
||||
|
||||
//! Returns the assembly table mapping element-local indices to global indices.
|
||||
//! @return const reference to the assembly table
|
||||
[[nodiscard]] const occ::handle<NCollection_HArray2<occ::handle<NCollection_HArray1<int>>>>&
|
||||
AssemblyTable() const
|
||||
{
|
||||
return myRefTable;
|
||||
}
|
||||
|
||||
//! Returns the assembly table via output parameter.
|
||||
//! @deprecated Use AssemblyTable() returning const reference instead.
|
||||
Standard_DEPRECATED("Use AssemblyTable() returning const reference instead")
|
||||
Standard_EXPORT void GetAssemblyTable(
|
||||
occ::handle<NCollection_HArray2<occ::handle<NCollection_HArray1<int>>>>& AssTable) const;
|
||||
|
||||
|
||||
@@ -46,22 +46,35 @@ public:
|
||||
//! Constructs an infinite line.
|
||||
const occ::handle<Geom_Line>& Line() const { return myComponent; }
|
||||
|
||||
//! Returns the starting point of the line set by SetPoints.
|
||||
//! @return handle to the start point
|
||||
const occ::handle<Geom_Point>& StartPoint() const { return myStartPoint; }
|
||||
|
||||
//! Returns the end point of the line set by SetPoints.
|
||||
//! @return handle to the end point
|
||||
const occ::handle<Geom_Point>& EndPoint() const { return myEndPoint; }
|
||||
|
||||
//! Returns the starting point thePStart and the end point thePEnd of the line set by SetPoints.
|
||||
//! @deprecated Use StartPoint() and EndPoint() instead.
|
||||
Standard_DEPRECATED("Use StartPoint() and EndPoint() instead")
|
||||
void Points(occ::handle<Geom_Point>& thePStart, occ::handle<Geom_Point>& thePEnd) const
|
||||
{
|
||||
thePStart = myStartPoint;
|
||||
thePEnd = myEndPoint;
|
||||
thePStart = StartPoint();
|
||||
thePEnd = EndPoint();
|
||||
}
|
||||
|
||||
//! instantiates an infinite line.
|
||||
//! Sets the infinite line.
|
||||
//! @param[in] theLine the geometric line
|
||||
void SetLine(const occ::handle<Geom_Line>& theLine)
|
||||
{
|
||||
myComponent = theLine;
|
||||
myLineIsSegment = false;
|
||||
}
|
||||
|
||||
//! Sets the starting point thePStart and ending point thePEnd of the
|
||||
//! Sets the starting point and ending point of the
|
||||
//! infinite line to create a finite line segment.
|
||||
//! @param[in] thePStart the starting point
|
||||
//! @param[in] thePEnd the ending point
|
||||
void SetPoints(const occ::handle<Geom_Point>& thePStart, const occ::handle<Geom_Point>& thePEnd)
|
||||
{
|
||||
myStartPoint = thePStart;
|
||||
|
||||
@@ -164,11 +164,10 @@ Select3D_InteriorSensitivePointSet::Select3D_InteriorSensitivePointSet(
|
||||
|
||||
// =======================================================================
|
||||
// function : GetPoints
|
||||
// purpose : Initializes the given array theHArrayOfPnt by 3d
|
||||
// purpose : Initializes the given array aHArrayOfPnt by 3d
|
||||
// coordinates of vertices of the whole point set
|
||||
// =======================================================================
|
||||
void Select3D_InteriorSensitivePointSet::GetPoints(
|
||||
occ::handle<NCollection_HArray1<gp_Pnt>>& theHArrayOfPnt)
|
||||
occ::handle<NCollection_HArray1<gp_Pnt>> Select3D_InteriorSensitivePointSet::GetPoints() const
|
||||
{
|
||||
int aSize = 0;
|
||||
for (int anIdx = 0; anIdx < myPlanarPolygons.Length(); ++anIdx)
|
||||
@@ -177,23 +176,28 @@ void Select3D_InteriorSensitivePointSet::GetPoints(
|
||||
aSize += aPolygon->NbSubElements();
|
||||
}
|
||||
|
||||
theHArrayOfPnt = new NCollection_HArray1<gp_Pnt>(1, aSize);
|
||||
int anOutputPntArrayIdx = 1;
|
||||
occ::handle<NCollection_HArray1<gp_Pnt>> aHArrayOfPnt = new NCollection_HArray1<gp_Pnt>(1, aSize);
|
||||
int anOutputPntArrayIdx = 1;
|
||||
|
||||
for (int aPolygIdx = 0; aPolygIdx < myPlanarPolygons.Length(); ++aPolygIdx)
|
||||
{
|
||||
const occ::handle<Select3D_SensitivePoly>& aPolygon = myPlanarPolygons.Value(aPolygIdx);
|
||||
occ::handle<NCollection_HArray1<gp_Pnt>> aPoints;
|
||||
aPolygon->Points3D(aPoints);
|
||||
int anUpper =
|
||||
const occ::handle<Select3D_SensitivePoly>& aPolygon = myPlanarPolygons.Value(aPolygIdx);
|
||||
const occ::handle<NCollection_HArray1<gp_Pnt>> aPoints = aPolygon->Points3D();
|
||||
int anUpper =
|
||||
aPolygIdx < myPlanarPolygons.Length() - 1 ? aPoints->Upper() : aPoints->Upper() + 1;
|
||||
for (int aPntIter = 1; aPntIter < anUpper; ++aPntIter)
|
||||
{
|
||||
theHArrayOfPnt->SetValue(anOutputPntArrayIdx, aPoints->Value(aPntIter));
|
||||
aHArrayOfPnt->SetValue(anOutputPntArrayIdx, aPoints->Value(aPntIter));
|
||||
anOutputPntArrayIdx++;
|
||||
}
|
||||
aPoints.Nullify();
|
||||
}
|
||||
return aHArrayOfPnt;
|
||||
}
|
||||
|
||||
void Select3D_InteriorSensitivePointSet::GetPoints(
|
||||
occ::handle<NCollection_HArray1<gp_Pnt>>& aHArrayOfPnt)
|
||||
{
|
||||
aHArrayOfPnt = GetPoints();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@@ -249,10 +253,9 @@ bool Select3D_InteriorSensitivePointSet::overlapsElement(
|
||||
int theElemIdx,
|
||||
bool)
|
||||
{
|
||||
int aPolygIdx = myPolygonsIdxs->Value(theElemIdx);
|
||||
const occ::handle<Select3D_SensitivePoly>& aPolygon = myPlanarPolygons.Value(aPolygIdx);
|
||||
occ::handle<NCollection_HArray1<gp_Pnt>> aPoints;
|
||||
aPolygon->Points3D(aPoints);
|
||||
int aPolygIdx = myPolygonsIdxs->Value(theElemIdx);
|
||||
const occ::handle<Select3D_SensitivePoly>& aPolygon = myPlanarPolygons.Value(aPolygIdx);
|
||||
const occ::handle<NCollection_HArray1<gp_Pnt>> aPoints = aPolygon->Points3D();
|
||||
return theMgr.OverlapsPolygon(aPoints->Array1(), Select3D_TOS_INTERIOR, thePickResult);
|
||||
}
|
||||
|
||||
|
||||
@@ -32,8 +32,14 @@ public:
|
||||
const occ::handle<SelectMgr_EntityOwner>& theOwnerId,
|
||||
const NCollection_Array1<gp_Pnt>& thePoints);
|
||||
|
||||
//! Returns 3d coordinates of vertices of the whole point set.
|
||||
//! @return handle to array of 3D vertex coordinates
|
||||
[[nodiscard]] Standard_EXPORT occ::handle<NCollection_HArray1<gp_Pnt>> GetPoints() const;
|
||||
|
||||
//! Initializes the given array theHArrayOfPnt by 3d coordinates of vertices of the
|
||||
//! whole point set
|
||||
//! @deprecated Use GetPoints() returning handle by value instead.
|
||||
Standard_DEPRECATED("Use GetPoints() returning handle by value instead")
|
||||
Standard_EXPORT virtual void GetPoints(occ::handle<NCollection_HArray1<gp_Pnt>>& theHArrayOfPnt);
|
||||
|
||||
//! Returns the length of vector of planar convex polygons
|
||||
|
||||
@@ -64,16 +64,19 @@ Select3D_SensitiveFace::Select3D_SensitiveFace(
|
||||
// purpose : Initializes the given array theHArrayOfPnt by 3d
|
||||
// coordinates of vertices of the face
|
||||
//=======================================================================
|
||||
void Select3D_SensitiveFace::GetPoints(occ::handle<NCollection_HArray1<gp_Pnt>>& theHArrayOfPnt)
|
||||
occ::handle<NCollection_HArray1<gp_Pnt>> Select3D_SensitiveFace::GetPoints() const
|
||||
{
|
||||
if (myFacePoints->IsKind(STANDARD_TYPE(Select3D_SensitivePoly)))
|
||||
{
|
||||
occ::down_cast<Select3D_SensitivePoly>(myFacePoints)->Points3D(theHArrayOfPnt);
|
||||
}
|
||||
else
|
||||
{
|
||||
occ::down_cast<Select3D_InteriorSensitivePointSet>(myFacePoints)->GetPoints(theHArrayOfPnt);
|
||||
return occ::down_cast<Select3D_SensitivePoly>(myFacePoints)->Points3D();
|
||||
}
|
||||
|
||||
return occ::down_cast<Select3D_InteriorSensitivePointSet>(myFacePoints)->GetPoints();
|
||||
}
|
||||
|
||||
void Select3D_SensitiveFace::GetPoints(occ::handle<NCollection_HArray1<gp_Pnt>>& theHArrayOfPnt)
|
||||
{
|
||||
theHArrayOfPnt = GetPoints();
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
@@ -98,8 +101,7 @@ bool Select3D_SensitiveFace::Matches(SelectBasics_SelectingVolumeManager& theMgr
|
||||
occ::handle<Select3D_SensitiveEntity> Select3D_SensitiveFace::GetConnected()
|
||||
{
|
||||
// Create a copy of this
|
||||
occ::handle<NCollection_HArray1<gp_Pnt>> aPoints;
|
||||
GetPoints(aPoints);
|
||||
const occ::handle<NCollection_HArray1<gp_Pnt>> aPoints = GetPoints();
|
||||
|
||||
occ::handle<Select3D_SensitiveEntity> aNewEntity =
|
||||
new Select3D_SensitiveFace(myOwnerId, aPoints, mySensType);
|
||||
|
||||
@@ -47,8 +47,14 @@ public:
|
||||
const occ::handle<NCollection_HArray1<gp_Pnt>>& thePoints,
|
||||
const Select3D_TypeOfSensitivity theType);
|
||||
|
||||
//! Returns 3d coordinates of vertices of the face.
|
||||
//! @return handle to array of 3D vertex coordinates
|
||||
[[nodiscard]] Standard_EXPORT occ::handle<NCollection_HArray1<gp_Pnt>> GetPoints() const;
|
||||
|
||||
//! Initializes the given array theHArrayOfPnt by 3d
|
||||
//! coordinates of vertices of the face
|
||||
//! @deprecated Use GetPoints() returning handle by value instead.
|
||||
Standard_DEPRECATED("Use GetPoints() returning handle by value instead")
|
||||
Standard_EXPORT void GetPoints(occ::handle<NCollection_HArray1<gp_Pnt>>& theHArrayOfPnt);
|
||||
|
||||
//! Checks whether the face overlaps current selecting volume
|
||||
|
||||
@@ -235,8 +235,7 @@ bool Select3D_SensitivePoly::Matches(SelectBasics_SelectingVolumeManager& theMgr
|
||||
}
|
||||
else if (mySensType == Select3D_TOS_INTERIOR)
|
||||
{
|
||||
occ::handle<NCollection_HArray1<gp_Pnt>> anArrayOfPnt;
|
||||
Points3D(anArrayOfPnt);
|
||||
const occ::handle<NCollection_HArray1<gp_Pnt>> anArrayOfPnt = Points3D();
|
||||
if (!theMgr.IsOverlapAllowed())
|
||||
{
|
||||
if (theMgr.GetActiveSelectionType() == SelectMgr_SelectionType_Polyline)
|
||||
|
||||
@@ -73,14 +73,25 @@ public:
|
||||
Standard_EXPORT int NbSubElements() const override;
|
||||
|
||||
//! Returns the 3D points of the array used at construction time.
|
||||
void Points3D(occ::handle<NCollection_HArray1<gp_Pnt>>& theHArrayOfPnt)
|
||||
//! @return handle to array of 3D points
|
||||
[[nodiscard]] occ::handle<NCollection_HArray1<gp_Pnt>> Points3D() const
|
||||
{
|
||||
int aSize = myPolyg.Size();
|
||||
theHArrayOfPnt = new NCollection_HArray1<gp_Pnt>(1, aSize);
|
||||
int aSize = myPolyg.Size();
|
||||
occ::handle<NCollection_HArray1<gp_Pnt>> aHArrayOfPnt =
|
||||
new NCollection_HArray1<gp_Pnt>(1, aSize);
|
||||
for (int anIndex = 1; anIndex <= aSize; anIndex++)
|
||||
{
|
||||
theHArrayOfPnt->SetValue(anIndex, myPolyg.Pnt(anIndex - 1));
|
||||
aHArrayOfPnt->SetValue(anIndex, myPolyg.Pnt(anIndex - 1));
|
||||
}
|
||||
return aHArrayOfPnt;
|
||||
}
|
||||
|
||||
//! Returns the 3D points of the array used at construction time via output parameter.
|
||||
//! @deprecated Use Points3D() returning handle by value instead.
|
||||
Standard_DEPRECATED("Use Points3D() returning handle by value instead")
|
||||
void Points3D(occ::handle<NCollection_HArray1<gp_Pnt>>& aHArrayOfPnt)
|
||||
{
|
||||
aHArrayOfPnt = Points3D();
|
||||
}
|
||||
|
||||
//! Return array bounds.
|
||||
|
||||
@@ -220,9 +220,8 @@ void SelectMgr::ComputeSensitivePrs(const occ::handle<Graphic3d_Structure>&
|
||||
else if (occ::handle<Select3D_SensitiveFace> aFace =
|
||||
occ::down_cast<Select3D_SensitiveFace>(anEnt))
|
||||
{
|
||||
occ::handle<NCollection_HArray1<gp_Pnt>> aSensPnts;
|
||||
aFace->GetPoints(aSensPnts);
|
||||
occ::handle<NCollection_HSequence<gp_Pnt>> aPoints = new NCollection_HSequence<gp_Pnt>();
|
||||
const occ::handle<NCollection_HArray1<gp_Pnt>> aSensPnts = aFace->GetPoints();
|
||||
occ::handle<NCollection_HSequence<gp_Pnt>> aPoints = new NCollection_HSequence<gp_Pnt>();
|
||||
for (NCollection_HArray1<gp_Pnt>::Iterator aPntIter(*aSensPnts); aPntIter.More();
|
||||
aPntIter.Next())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user