1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

Compare commits

..

19 Commits

Author SHA1 Message Date
dpasukhi
bd2a789f15 Update version to 7.8.1 2024-03-31 23:05:22 +01:00
dpasukhi
a4e91f855b 0033656: Foundation Classes - Standard_Type crash during unloading static lib
Revert changes to use type_info as a key to use string.
Impact - performance decrease to search (once per class registration)
Will be updated with reorganizing type storage in future
2024-03-31 23:05:22 +01:00
oan
9efc032b9a 0033560: PARASOLID Import - XT importer raises exception SIGFPE Arithmetic Exception
Prevent division by zero in exceptional cases when vector of parameters contains only a single value.
2024-03-31 22:46:06 +01:00
ichesnok
44cbb3d8e7 0033410: Data Exchange, Step Import - TRIANGULATED_FACE from STEP where there are no pnval entries
Problem fixed by using array of nodes in case when aPnindices is empty.
2024-03-31 22:42:35 +01:00
astromko
392377a331 0033367: Modeling Algorithms - Normal projection or BOP problem [Regression]
Fixed passing of an incorrect curve into GeomAdaptor::MakeCurve() function.
2024-03-31 22:42:24 +01:00
astromko
6635f53848 0031601: Modeling Algorithms - BRepOffset_Tool Segmentation Fault
Added protection against null pointer dereferencing.
Modified BRepOffset_MakeOffset::MakeThickSolid method.
Fixed the problem with negative volume values.
Fixed several unit tests and added a new one.
2024-03-31 22:42:16 +01:00
ichesnok
f7f32bf33e 0033638: Data Exchange, Step Import - Style for tessellated object missed
TransferBRep_ShapeBinder used for tessellated face.
2024-03-31 22:41:14 +01:00
ichesnok
c1620d29fa 0033631: Data Exchange, Step import - Crash by reading STEP file
Creating Poly_Triangulation from ComplexTriangulatedSurfaceSet was fixed.
2024-03-31 22:41:08 +01:00
ichesnok
92e70f93d0 0033603: Data Exchange, Step Import - Crash reading corrupted STEP file
Crash fixed by checking IsNull().
2024-03-31 22:41:02 +01:00
ichesnok
54754bccab 0033602: Data Exchange, Step - Carriage return removing
Carriage removing integrated
2024-03-31 22:40:54 +01:00
ichesnok
33a5691ef1 0033596: Documentation - Incorrect default value read.step.tessellated
Default value of read.step.tessellated corrected.
2024-03-31 22:40:25 +01:00
abv
689b59692e 0025415: Data Exchange - Invalid result of loading a STEP file
Handling of special case found on some STEP files produced by FPX Expert 2013 (PCB design system):
edge curve is line displaced from its true position but with correct direction;
we shift the line in this case so that it passes through vertices correcty.

Protection against possible exception in writing XDE.
2024-03-31 22:40:18 +01:00
astromko
c7fd6ca63b 0033383: Modeling Algorithms - Wire/Face creation problem
ProjCurve3d and BRepAlgo_FaceRestrictor::Perform functions should not continue to work and should terminate if the BRep_Tool::Curve function returns null pointer.
2024-03-31 22:40:08 +01:00
ichesnok
9704e22131 0033261: Data Exchange, Step Import - Empty shape after reading process
Added a transfer for ShapeRepresentationRelationship in Transfer of MappedItem method,
in order to support link of components according to ISO 10303-203-2003.
2024-03-31 22:40:00 +01:00
ichesnok
f3f713569a 0033569: Data Exchange, STEP - Crash when reading multi-body file
Datum reading changed in ReadDatums() method:
using DatumSystemAP242 (DatumSystem or DatumReference) array
instead of DatumSystem array (DatumReference)
2024-03-31 22:39:52 +01:00
ichesnok
db976e0a59 0025188: Data Exchange, Step Export - Losing shapes after import
Check on null for description added to WriteStep methods
(for product, product_definition and product_definition_formation)
2024-03-31 22:39:42 +01:00
ichesnok
ee8f2ea3c2 0032980: Data Exchange - STEP import produce a crash
Check on null for loop added
2024-03-31 22:39:34 +01:00
oan
58393b24b6 0033567: Modeling Data - GeomLib_IsPlanarSurface raises exception SIGFPE Arithmetic Exception in Release mode
Add protection against zero-division
2024-03-31 22:39:22 +01:00
dpasukhi
b896c6f4af Update version to 7.8.1 dev 2024-03-31 22:39:07 +01:00
157 changed files with 440 additions and 4017 deletions

View File

@@ -1653,13 +1653,6 @@ For each Saved View OCCT STEP Reader will retrieve the following attributes:
- clipping planes (single plane of combination of planes); - clipping planes (single plane of combination of planes);
- front and back plane clipping. - front and back plane clipping.
### User defined attributes
Attributes are implemented in accordance with <a href="https://www.mbx-if.org/documents/rec_prac_user_def_attributes_v18.pdf">Recommended practices for User Defined Attributes</a> section 4, 5, 6.1-6.3 and 7.
Attributes can be read for shapes at levels:
- Part/Product Level;
- Component Instances in an Assembly;
- Geometry Level.
@subsection occt_step_7_3 Writing to STEP @subsection occt_step_7_3 Writing to STEP
The translation from XDE to STEP can be initialized as follows: The translation from XDE to STEP can be initialized as follows:
@@ -1737,8 +1730,5 @@ Interface_Static::SetIVal("write.step.schema", 5));
### Saved views ### Saved views
Saved Views are not exported by OCCT. Saved Views are not exported by OCCT.
### User defined attributes
Attributes can be imported from STEP.

View File

@@ -33,7 +33,6 @@
#include <Storage_Schema.hxx> #include <Storage_Schema.hxx>
#include <TCollection_AsciiString.hxx> #include <TCollection_AsciiString.hxx>
#include <TCollection_ExtendedString.hxx> #include <TCollection_ExtendedString.hxx>
#include <TDataStd_TreeNode.hxx>
#include <TDF_Attribute.hxx> #include <TDF_Attribute.hxx>
#include <TDF_Data.hxx> #include <TDF_Data.hxx>
#include <TDF_Label.hxx> #include <TDF_Label.hxx>
@@ -325,16 +324,7 @@ void BinLDrivers_DocumentRetrievalDriver::Read (Standard_IStream&
// read sub-tree of the root label // read sub-tree of the root label
if (!theFilter.IsNull()) if (!theFilter.IsNull())
theFilter->StartIteration(); theFilter->StartIteration();
const auto aStreamStartPosition = theIStream.tellg(); Standard_Integer nbRead = ReadSubTree (theIStream, aData->Root(), theFilter, aQuickPart, aPS.Next());
Standard_Integer nbRead = ReadSubTree (theIStream, aData->Root(), theFilter, aQuickPart, Standard_False, aPS.Next());
if (!myUnresolvedLinks.IsEmpty())
{
// In case we have skipped some linked TreeNodes before getting to
// their children.
theFilter->StartIteration();
theIStream.seekg(aStreamStartPosition, std::ios_base::beg);
nbRead += ReadSubTree(theIStream, aData->Root(), theFilter, aQuickPart, Standard_True, aPS.Next());
}
if (!aPS.More()) if (!aPS.More())
{ {
myReaderStatus = PCDM_RS_UserBreak; myReaderStatus = PCDM_RS_UserBreak;
@@ -383,7 +373,6 @@ Standard_Integer BinLDrivers_DocumentRetrievalDriver::ReadSubTree
const TDF_Label& theLabel, const TDF_Label& theLabel,
const Handle(PCDM_ReaderFilter)& theFilter, const Handle(PCDM_ReaderFilter)& theFilter,
const Standard_Boolean& theQuickPart, const Standard_Boolean& theQuickPart,
const Standard_Boolean theReadMissing,
const Message_ProgressRange& theRange) const Message_ProgressRange& theRange)
{ {
Standard_Integer nbRead = 0; Standard_Integer nbRead = 0;
@@ -404,7 +393,7 @@ Standard_Integer BinLDrivers_DocumentRetrievalDriver::ReadSubTree
aLabelSize = InverseUint64(aLabelSize); aLabelSize = InverseUint64(aLabelSize);
#endif #endif
// no one sub-label is needed, so, skip everything // no one sub-label is needed, so, skip everything
if (aSkipAttrs && !theFilter->IsSubPassed() && myUnresolvedLinks.IsEmpty()) if (aSkipAttrs && !theFilter->IsSubPassed())
{ {
aLabelSize -= sizeof (uint64_t); aLabelSize -= sizeof (uint64_t);
theIS.seekg (aLabelSize, std::ios_base::cur); theIS.seekg (aLabelSize, std::ios_base::cur);
@@ -414,11 +403,6 @@ Standard_Integer BinLDrivers_DocumentRetrievalDriver::ReadSubTree
} }
} }
if (theReadMissing)
{
aSkipAttrs = Standard_True;
}
const auto anAttStartPosition = theIS.tellg();
// Read attributes: // Read attributes:
for (theIS >> myPAtt; for (theIS >> myPAtt;
theIS && myPAtt.TypeId() > 0 && // not an end marker ? theIS && myPAtt.TypeId() > 0 && // not an end marker ?
@@ -431,12 +415,6 @@ Standard_Integer BinLDrivers_DocumentRetrievalDriver::ReadSubTree
myReaderStatus = PCDM_RS_UserBreak; myReaderStatus = PCDM_RS_UserBreak;
return -1; return -1;
} }
if (myUnresolvedLinks.Remove(myPAtt.Id()) && aSkipAttrs)
{
aSkipAttrs = Standard_False;
theIS.seekg(anAttStartPosition, std::ios_base::beg);
continue;
}
if (aSkipAttrs) if (aSkipAttrs)
{ {
if (myPAtt.IsDirect()) // skip direct written stream if (myPAtt.IsDirect()) // skip direct written stream
@@ -509,17 +487,7 @@ Standard_Integer BinLDrivers_DocumentRetrievalDriver::ReadSubTree
aDriver->TypeName(), Message_Warning); aDriver->TypeName(), Message_Warning);
} }
else if (!isBound) else if (!isBound)
{
myRelocTable.Bind(anID, tAtt); myRelocTable.Bind(anID, tAtt);
Handle(TDataStd_TreeNode) aNode = Handle(TDataStd_TreeNode)::DownCast(tAtt);
if (!theFilter.IsNull() && !aNode.IsNull() && !aNode->Father().IsNull() && aNode->Father()->IsNew())
{
Standard_Integer anUnresolvedLink;
myPAtt.SetPosition(BP_HEADSIZE);
myPAtt >> anUnresolvedLink;
myUnresolvedLinks.Add(anUnresolvedLink);
}
}
} }
else if (!myMapUnsupported.Contains(myPAtt.TypeId())) else if (!myMapUnsupported.Contains(myPAtt.TypeId()))
myMsgDriver->Send(aMethStr + "warning: type ID not registered in header: " myMsgDriver->Send(aMethStr + "warning: type ID not registered in header: "
@@ -554,7 +522,7 @@ Standard_Integer BinLDrivers_DocumentRetrievalDriver::ReadSubTree
// read sub-tree // read sub-tree
if (!theFilter.IsNull()) if (!theFilter.IsNull())
theFilter->Down (aTag); theFilter->Down (aTag);
Standard_Integer nbSubRead = ReadSubTree (theIS, aLab, theFilter, theQuickPart, theReadMissing, aPS.Next()); Standard_Integer nbSubRead = ReadSubTree (theIS, aLab, theFilter, theQuickPart, aPS.Next());
// check for error // check for error
if (nbSubRead == -1) if (nbSubRead == -1)
return -1; return -1;

View File

@@ -80,7 +80,6 @@ protected:
const TDF_Label& theData, const TDF_Label& theData,
const Handle(PCDM_ReaderFilter)& theFilter, const Handle(PCDM_ReaderFilter)& theFilter,
const Standard_Boolean& theQuickPart, const Standard_Boolean& theQuickPart,
const Standard_Boolean theReadMissing,
const Message_ProgressRange& theRanges = Message_ProgressRange()); const Message_ProgressRange& theRanges = Message_ProgressRange());
@@ -126,7 +125,6 @@ private:
BinObjMgt_Persistent myPAtt; BinObjMgt_Persistent myPAtt;
TColStd_MapOfInteger myMapUnsupported; TColStd_MapOfInteger myMapUnsupported;
BinLDrivers_VectorOfDocumentSection mySections; BinLDrivers_VectorOfDocumentSection mySections;
NCollection_Map<Standard_Integer> myUnresolvedLinks;
}; };

View File

@@ -719,7 +719,7 @@ void Draw::Load (Draw_Interpretor& theDI,
} }
void (*fp) (Draw_Interpretor&) = NULL; void (*fp) (Draw_Interpretor&) = NULL;
fp = (void (*)(Draw_Interpretor&) )(void*)aFunc; fp = (void (*)(Draw_Interpretor&) )aFunc;
(*fp) (theDI); (*fp) (theDI);
} }

View File

@@ -69,9 +69,13 @@ Storage_Error FSD_CmpFile::Open(const TCollection_AsciiString& aName, const Stor
SetName(aName); SetName(aName);
if (OpenMode() == Storage_VSNone) { if (OpenMode() == Storage_VSNone) {
std::ios_base::openmode anOpenMode; std::ios_base::openmode anOpenMode = std::ios_base::openmode(0);
switch (aMode) switch (aMode)
{ {
case Storage_VSNone:
{
break;
}
case Storage_VSRead: case Storage_VSRead:
{ {
// std::ios::nocreate is not portable // std::ios::nocreate is not portable
@@ -100,13 +104,11 @@ Storage_Error FSD_CmpFile::Open(const TCollection_AsciiString& aName, const Stor
#endif #endif
break; break;
} }
case Storage_VSNone: }
default: if (anOpenMode != 0)
{ {
return Storage_VSOpenError; OSD_OpenStream(myStream, aName, anOpenMode);
} }
}
OSD_OpenStream(myStream, aName, anOpenMode);
if (myStream.fail()) { if (myStream.fail()) {
result = Storage_VSOpenError; result = Storage_VSOpenError;
} }

View File

@@ -51,7 +51,9 @@ FSD_File::FSD_File()
Storage_Error FSD_File::IsGoodFileType(const TCollection_AsciiString& aName) Storage_Error FSD_File::IsGoodFileType(const TCollection_AsciiString& aName)
{ {
FSD_File f; FSD_File f;
Storage_Error s = f.Open(aName,Storage_VSRead); Storage_Error s;
s = f.Open(aName,Storage_VSRead);
if (s == Storage_VSOk) { if (s == Storage_VSOk) {
TCollection_AsciiString l; TCollection_AsciiString l;
@@ -82,9 +84,13 @@ Storage_Error FSD_File::Open(const TCollection_AsciiString& aName,const Storage_
if (OpenMode() == Storage_VSNone) if (OpenMode() == Storage_VSNone)
{ {
std::ios_base::openmode anOpenMode; std::ios_base::openmode anOpenMode = std::ios_base::openmode(0);
switch (aMode) switch (aMode)
{ {
case Storage_VSNone:
{
break;
}
case Storage_VSRead: case Storage_VSRead:
{ {
// std::ios::nocreate is not portable // std::ios::nocreate is not portable
@@ -101,13 +107,11 @@ Storage_Error FSD_File::Open(const TCollection_AsciiString& aName,const Storage_
anOpenMode = std::ios::in | std::ios::out; anOpenMode = std::ios::in | std::ios::out;
break; break;
} }
case Storage_VSNone:
default:
{
return Storage_VSOpenError;
}
} }
OSD_OpenStream (myStream, aName.ToCString(), anOpenMode); if (anOpenMode != 0)
{
OSD_OpenStream (myStream, aName.ToCString(), anOpenMode);
}
if (myStream.fail()) { if (myStream.fail()) {
result = Storage_VSOpenError; result = Storage_VSOpenError;
} }
@@ -233,7 +237,7 @@ void FSD_File::WriteExtendedLine(const TCollection_ExtendedString& buffer)
void FSD_File::ReadExtendedLine(TCollection_ExtendedString& buffer) void FSD_File::ReadExtendedLine(TCollection_ExtendedString& buffer)
{ {
char c = '\0'; char c = '\0';
Standard_ExtCharacter i = 0,count = 0; Standard_ExtCharacter i = 0,j,count = 0;
Standard_Boolean fin = Standard_False; Standard_Boolean fin = Standard_False;
Standard_CString tg = ENDOFNORMALEXTENDEDSECTION; Standard_CString tg = ENDOFNORMALEXTENDEDSECTION;
@@ -245,6 +249,7 @@ void FSD_File::ReadExtendedLine(TCollection_ExtendedString& buffer)
if (c == tg[count]) count++; if (c == tg[count]) count++;
else count = 0; else count = 0;
if (count < SIZEOFNORMALEXTENDEDSECTION) { if (count < SIZEOFNORMALEXTENDEDSECTION) {
j = 0;
i = (Standard_ExtCharacter)c; i = (Standard_ExtCharacter)c;
if (c == '\0') fin = Standard_True; if (c == '\0') fin = Standard_True;
i = (i << 8); i = (i << 8);
@@ -253,7 +258,7 @@ void FSD_File::ReadExtendedLine(TCollection_ExtendedString& buffer)
if (c == tg[count]) count++; if (c == tg[count]) count++;
else count = 0; else count = 0;
if (count < SIZEOFNORMALEXTENDEDSECTION) { if (count < SIZEOFNORMALEXTENDEDSECTION) {
Standard_ExtCharacter j = (Standard_ExtCharacter)c; j = (Standard_ExtCharacter)c;
if (c != '\n') { if (c != '\n') {
fin = Standard_False; fin = Standard_False;
i |= (0x00FF & j); i |= (0x00FF & j);

View File

@@ -20,10 +20,10 @@
#include <Standard.hxx> #include <Standard.hxx>
#include <Standard_DefineAlloc.hxx> #include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx> #include <Standard_Handle.hxx>
#include <StepData_Factors.hxx>
#include <GeomToStep_Root.hxx> #include <GeomToStep_Root.hxx>
class StepData_Factors;
class StepGeom_Axis1Placement; class StepGeom_Axis1Placement;
class gp_Ax1; class gp_Ax1;
class gp_Ax2d; class gp_Ax2d;
@@ -43,16 +43,16 @@ public:
Standard_EXPORT GeomToStep_MakeAxis1Placement(const gp_Ax1& A, Standard_EXPORT GeomToStep_MakeAxis1Placement(const gp_Ax1& A,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
Standard_EXPORT GeomToStep_MakeAxis1Placement(const gp_Ax2d& A, Standard_EXPORT GeomToStep_MakeAxis1Placement(const gp_Ax2d& A,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
Standard_EXPORT GeomToStep_MakeAxis1Placement(const Handle(Geom_Axis1Placement)& A, Standard_EXPORT GeomToStep_MakeAxis1Placement(const Handle(Geom_Axis1Placement)& A,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
Standard_EXPORT GeomToStep_MakeAxis1Placement(const Handle(Geom2d_AxisPlacement)& A, Standard_EXPORT GeomToStep_MakeAxis1Placement(const Handle(Geom2d_AxisPlacement)& A,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
Standard_EXPORT const Handle(StepGeom_Axis1Placement)& Value() const; Standard_EXPORT const Handle(StepGeom_Axis1Placement)& Value() const;

View File

@@ -23,6 +23,7 @@
#include <GeomToStep_Root.hxx> #include <GeomToStep_Root.hxx>
class StepData_Factors;
class StepGeom_Axis2Placement2d; class StepGeom_Axis2Placement2d;
class gp_Ax2; class gp_Ax2;
class gp_Ax22d; class gp_Ax22d;
@@ -40,10 +41,10 @@ public:
Standard_EXPORT GeomToStep_MakeAxis2Placement2d(const gp_Ax2& A, Standard_EXPORT GeomToStep_MakeAxis2Placement2d(const gp_Ax2& A,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
Standard_EXPORT GeomToStep_MakeAxis2Placement2d(const gp_Ax22d& A, Standard_EXPORT GeomToStep_MakeAxis2Placement2d(const gp_Ax22d& A,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
Standard_EXPORT const Handle(StepGeom_Axis2Placement2d)& Value() const; Standard_EXPORT const Handle(StepGeom_Axis2Placement2d)& Value() const;

View File

@@ -23,6 +23,7 @@
#include <GeomToStep_Root.hxx> #include <GeomToStep_Root.hxx>
#include <StepData_StepModel.hxx> #include <StepData_StepModel.hxx>
class StepData_Factors;
class StepGeom_Axis2Placement3d; class StepGeom_Axis2Placement3d;
class gp_Ax2; class gp_Ax2;
class gp_Ax3; class gp_Ax3;
@@ -41,19 +42,19 @@ public:
DEFINE_STANDARD_ALLOC DEFINE_STANDARD_ALLOC
Standard_EXPORT GeomToStep_MakeAxis2Placement3d(const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT GeomToStep_MakeAxis2Placement3d(const StepData_Factors& theLocalFactors);
Standard_EXPORT GeomToStep_MakeAxis2Placement3d(const gp_Ax2& A, Standard_EXPORT GeomToStep_MakeAxis2Placement3d(const gp_Ax2& A,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
Standard_EXPORT GeomToStep_MakeAxis2Placement3d(const gp_Ax3& A, Standard_EXPORT GeomToStep_MakeAxis2Placement3d(const gp_Ax3& A,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
Standard_EXPORT GeomToStep_MakeAxis2Placement3d(const gp_Trsf& T, Standard_EXPORT GeomToStep_MakeAxis2Placement3d(const gp_Trsf& T,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
Standard_EXPORT GeomToStep_MakeAxis2Placement3d(const Handle(Geom_Axis2Placement)& A, Standard_EXPORT GeomToStep_MakeAxis2Placement3d(const Handle(Geom_Axis2Placement)& A,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
Standard_EXPORT const Handle(StepGeom_Axis2Placement3d)& Value() const; Standard_EXPORT const Handle(StepGeom_Axis2Placement3d)& Value() const;

View File

@@ -24,6 +24,7 @@
#include <GeomToStep_Root.hxx> #include <GeomToStep_Root.hxx>
class Geom_BSplineCurve; class Geom_BSplineCurve;
class Geom2d_BSplineCurve; class Geom2d_BSplineCurve;
class StepData_Factors;
class StepGeom_BSplineCurveWithKnots; class StepGeom_BSplineCurveWithKnots;
@@ -40,10 +41,10 @@ public:
Standard_EXPORT GeomToStep_MakeBSplineCurveWithKnots(const Handle(Geom_BSplineCurve)& Bsplin, Standard_EXPORT GeomToStep_MakeBSplineCurveWithKnots(const Handle(Geom_BSplineCurve)& Bsplin,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
Standard_EXPORT GeomToStep_MakeBSplineCurveWithKnots(const Handle(Geom2d_BSplineCurve)& Bsplin, Standard_EXPORT GeomToStep_MakeBSplineCurveWithKnots(const Handle(Geom2d_BSplineCurve)& Bsplin,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
Standard_EXPORT const Handle(StepGeom_BSplineCurveWithKnots)& Value() const; Standard_EXPORT const Handle(StepGeom_BSplineCurveWithKnots)& Value() const;

View File

@@ -23,6 +23,7 @@
#include <GeomToStep_Root.hxx> #include <GeomToStep_Root.hxx>
class StepData_Factors;
class StepGeom_BSplineCurveWithKnotsAndRationalBSplineCurve; class StepGeom_BSplineCurveWithKnotsAndRationalBSplineCurve;
class Geom_BSplineCurve; class Geom_BSplineCurve;
class Geom2d_BSplineCurve; class Geom2d_BSplineCurve;
@@ -41,10 +42,10 @@ public:
Standard_EXPORT GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve(const Handle(Geom_BSplineCurve)& Bsplin, Standard_EXPORT GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve(const Handle(Geom_BSplineCurve)& Bsplin,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
Standard_EXPORT GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve(const Handle(Geom2d_BSplineCurve)& Bsplin, Standard_EXPORT GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve(const Handle(Geom2d_BSplineCurve)& Bsplin,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
Standard_EXPORT const Handle(StepGeom_BSplineCurveWithKnotsAndRationalBSplineCurve)& Value() const; Standard_EXPORT const Handle(StepGeom_BSplineCurveWithKnotsAndRationalBSplineCurve)& Value() const;

View File

@@ -22,6 +22,7 @@
#include <Standard_Handle.hxx> #include <Standard_Handle.hxx>
#include <GeomToStep_Root.hxx> #include <GeomToStep_Root.hxx>
class StepData_Factors;
class StepGeom_BSplineSurfaceWithKnots; class StepGeom_BSplineSurfaceWithKnots;
class Geom_BSplineSurface; class Geom_BSplineSurface;
@@ -39,7 +40,7 @@ public:
Standard_EXPORT GeomToStep_MakeBSplineSurfaceWithKnots(const Handle(Geom_BSplineSurface)& Bsplin, Standard_EXPORT GeomToStep_MakeBSplineSurfaceWithKnots(const Handle(Geom_BSplineSurface)& Bsplin,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
Standard_EXPORT const Handle(StepGeom_BSplineSurfaceWithKnots)& Value() const; Standard_EXPORT const Handle(StepGeom_BSplineSurfaceWithKnots)& Value() const;

View File

@@ -23,6 +23,7 @@
#include <GeomToStep_Root.hxx> #include <GeomToStep_Root.hxx>
class StepData_Factors;
class StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface; class StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface;
class Geom_BSplineSurface; class Geom_BSplineSurface;
@@ -40,7 +41,7 @@ public:
Standard_EXPORT GeomToStep_MakeBSplineSurfaceWithKnotsAndRationalBSplineSurface(const Handle(Geom_BSplineSurface)& Bsplin, Standard_EXPORT GeomToStep_MakeBSplineSurfaceWithKnotsAndRationalBSplineSurface(const Handle(Geom_BSplineSurface)& Bsplin,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
Standard_EXPORT const Handle(StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface)& Value() const; Standard_EXPORT const Handle(StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface)& Value() const;

View File

@@ -23,6 +23,7 @@
#include <GeomToStep_Root.hxx> #include <GeomToStep_Root.hxx>
class StepData_Factors;
class StepGeom_BoundedCurve; class StepGeom_BoundedCurve;
class Geom_BoundedCurve; class Geom_BoundedCurve;
class Geom2d_BoundedCurve; class Geom2d_BoundedCurve;
@@ -41,10 +42,10 @@ public:
Standard_EXPORT GeomToStep_MakeBoundedCurve(const Handle(Geom_BoundedCurve)& C, Standard_EXPORT GeomToStep_MakeBoundedCurve(const Handle(Geom_BoundedCurve)& C,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
Standard_EXPORT GeomToStep_MakeBoundedCurve(const Handle(Geom2d_BoundedCurve)& C, Standard_EXPORT GeomToStep_MakeBoundedCurve(const Handle(Geom2d_BoundedCurve)& C,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
Standard_EXPORT const Handle(StepGeom_BoundedCurve)& Value() const; Standard_EXPORT const Handle(StepGeom_BoundedCurve)& Value() const;

View File

@@ -23,6 +23,7 @@
#include <GeomToStep_Root.hxx> #include <GeomToStep_Root.hxx>
class StepData_Factors;
class StepGeom_BoundedSurface; class StepGeom_BoundedSurface;
class Geom_BoundedSurface; class Geom_BoundedSurface;
@@ -40,7 +41,7 @@ public:
Standard_EXPORT GeomToStep_MakeBoundedSurface(const Handle(Geom_BoundedSurface)& C, Standard_EXPORT GeomToStep_MakeBoundedSurface(const Handle(Geom_BoundedSurface)& C,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
Standard_EXPORT const Handle(StepGeom_BoundedSurface)& Value() const; Standard_EXPORT const Handle(StepGeom_BoundedSurface)& Value() const;

View File

@@ -23,6 +23,7 @@
#include <GeomToStep_Root.hxx> #include <GeomToStep_Root.hxx>
class StepData_Factors;
class StepGeom_Circle; class StepGeom_Circle;
class gp_Circ; class gp_Circ;
class Geom_Circle; class Geom_Circle;
@@ -41,13 +42,13 @@ public:
Standard_EXPORT GeomToStep_MakeCircle(const gp_Circ& C, Standard_EXPORT GeomToStep_MakeCircle(const gp_Circ& C,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
Standard_EXPORT GeomToStep_MakeCircle(const Handle(Geom_Circle)& C, Standard_EXPORT GeomToStep_MakeCircle(const Handle(Geom_Circle)& C,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
Standard_EXPORT GeomToStep_MakeCircle(const Handle(Geom2d_Circle)& C, Standard_EXPORT GeomToStep_MakeCircle(const Handle(Geom2d_Circle)& C,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
Standard_EXPORT const Handle(StepGeom_Circle)& Value() const; Standard_EXPORT const Handle(StepGeom_Circle)& Value() const;

View File

@@ -25,6 +25,7 @@
class StepGeom_Conic; class StepGeom_Conic;
class Geom_Conic; class Geom_Conic;
class Geom2d_Conic; class Geom2d_Conic;
class StepData_Factors;
//! This class implements the mapping between classes //! This class implements the mapping between classes
@@ -39,10 +40,10 @@ public:
Standard_EXPORT GeomToStep_MakeConic(const Handle(Geom_Conic)& C, Standard_EXPORT GeomToStep_MakeConic(const Handle(Geom_Conic)& C,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
Standard_EXPORT GeomToStep_MakeConic(const Handle(Geom2d_Conic)& C, Standard_EXPORT GeomToStep_MakeConic(const Handle(Geom2d_Conic)& C,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
Standard_EXPORT const Handle(StepGeom_Conic)& Value() const; Standard_EXPORT const Handle(StepGeom_Conic)& Value() const;

View File

@@ -24,6 +24,7 @@
#include <GeomToStep_Root.hxx> #include <GeomToStep_Root.hxx>
class StepGeom_ConicalSurface; class StepGeom_ConicalSurface;
class Geom_ConicalSurface; class Geom_ConicalSurface;
class StepData_Factors;
//! This class implements the mapping between class //! This class implements the mapping between class
@@ -38,7 +39,7 @@ public:
Standard_EXPORT GeomToStep_MakeConicalSurface(const Handle(Geom_ConicalSurface)& CSurf, Standard_EXPORT GeomToStep_MakeConicalSurface(const Handle(Geom_ConicalSurface)& CSurf,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
Standard_EXPORT const Handle(StepGeom_ConicalSurface)& Value() const; Standard_EXPORT const Handle(StepGeom_ConicalSurface)& Value() const;

View File

@@ -22,6 +22,7 @@
#include <Standard_Handle.hxx> #include <Standard_Handle.hxx>
#include <GeomToStep_Root.hxx> #include <GeomToStep_Root.hxx>
class StepData_Factors;
class StepGeom_Curve; class StepGeom_Curve;
class Geom_Curve; class Geom_Curve;
class Geom2d_Curve; class Geom2d_Curve;
@@ -39,10 +40,10 @@ public:
Standard_EXPORT GeomToStep_MakeCurve(const Handle(Geom_Curve)& C, Standard_EXPORT GeomToStep_MakeCurve(const Handle(Geom_Curve)& C,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
Standard_EXPORT GeomToStep_MakeCurve(const Handle(Geom2d_Curve)& C, Standard_EXPORT GeomToStep_MakeCurve(const Handle(Geom2d_Curve)& C,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
Standard_EXPORT const Handle(StepGeom_Curve)& Value() const; Standard_EXPORT const Handle(StepGeom_Curve)& Value() const;

View File

@@ -24,6 +24,7 @@
#include <GeomToStep_Root.hxx> #include <GeomToStep_Root.hxx>
class StepGeom_CylindricalSurface; class StepGeom_CylindricalSurface;
class Geom_CylindricalSurface; class Geom_CylindricalSurface;
class StepData_Factors;
//! This class implements the mapping between class //! This class implements the mapping between class
@@ -38,7 +39,7 @@ public:
Standard_EXPORT GeomToStep_MakeCylindricalSurface(const Handle(Geom_CylindricalSurface)& CSurf, Standard_EXPORT GeomToStep_MakeCylindricalSurface(const Handle(Geom_CylindricalSurface)& CSurf,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
Standard_EXPORT const Handle(StepGeom_CylindricalSurface)& Value() const; Standard_EXPORT const Handle(StepGeom_CylindricalSurface)& Value() const;

View File

@@ -23,6 +23,7 @@
#include <GeomToStep_Root.hxx> #include <GeomToStep_Root.hxx>
class StepData_Factors;
class StepGeom_ElementarySurface; class StepGeom_ElementarySurface;
class Geom_ElementarySurface; class Geom_ElementarySurface;
@@ -40,7 +41,7 @@ public:
Standard_EXPORT GeomToStep_MakeElementarySurface(const Handle(Geom_ElementarySurface)& S, Standard_EXPORT GeomToStep_MakeElementarySurface(const Handle(Geom_ElementarySurface)& S,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
Standard_EXPORT const Handle(StepGeom_ElementarySurface)& Value() const; Standard_EXPORT const Handle(StepGeom_ElementarySurface)& Value() const;

View File

@@ -23,6 +23,7 @@
#include <GeomToStep_Root.hxx> #include <GeomToStep_Root.hxx>
class StepData_Factors;
class StepGeom_Ellipse; class StepGeom_Ellipse;
class gp_Elips; class gp_Elips;
class Geom_Ellipse; class Geom_Ellipse;
@@ -41,13 +42,13 @@ public:
Standard_EXPORT GeomToStep_MakeEllipse(const gp_Elips& C, Standard_EXPORT GeomToStep_MakeEllipse(const gp_Elips& C,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
Standard_EXPORT GeomToStep_MakeEllipse(const Handle(Geom_Ellipse)& C, Standard_EXPORT GeomToStep_MakeEllipse(const Handle(Geom_Ellipse)& C,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
Standard_EXPORT GeomToStep_MakeEllipse(const Handle(Geom2d_Ellipse)& C, Standard_EXPORT GeomToStep_MakeEllipse(const Handle(Geom2d_Ellipse)& C,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
Standard_EXPORT const Handle(StepGeom_Ellipse)& Value() const; Standard_EXPORT const Handle(StepGeom_Ellipse)& Value() const;

View File

@@ -38,10 +38,10 @@ public:
Standard_EXPORT GeomToStep_MakeHyperbola(const Handle(Geom2d_Hyperbola)& C, Standard_EXPORT GeomToStep_MakeHyperbola(const Handle(Geom2d_Hyperbola)& C,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
Standard_EXPORT GeomToStep_MakeHyperbola(const Handle(Geom_Hyperbola)& C, Standard_EXPORT GeomToStep_MakeHyperbola(const Handle(Geom_Hyperbola)& C,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
Standard_EXPORT const Handle(StepGeom_Hyperbola)& Value() const; Standard_EXPORT const Handle(StepGeom_Hyperbola)& Value() const;

View File

@@ -22,6 +22,7 @@
#include <Standard_Handle.hxx> #include <Standard_Handle.hxx>
#include <GeomToStep_Root.hxx> #include <GeomToStep_Root.hxx>
class StepData_Factors;
class StepGeom_Line; class StepGeom_Line;
class gp_Lin; class gp_Lin;
class gp_Lin2d; class gp_Lin2d;
@@ -41,16 +42,16 @@ public:
Standard_EXPORT GeomToStep_MakeLine(const gp_Lin& L, Standard_EXPORT GeomToStep_MakeLine(const gp_Lin& L,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
Standard_EXPORT GeomToStep_MakeLine(const gp_Lin2d& L, Standard_EXPORT GeomToStep_MakeLine(const gp_Lin2d& L,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
Standard_EXPORT GeomToStep_MakeLine(const Handle(Geom_Line)& C, Standard_EXPORT GeomToStep_MakeLine(const Handle(Geom_Line)& C,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
Standard_EXPORT GeomToStep_MakeLine(const Handle(Geom2d_Line)& C, Standard_EXPORT GeomToStep_MakeLine(const Handle(Geom2d_Line)& C,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
Standard_EXPORT const Handle(StepGeom_Line)& Value() const; Standard_EXPORT const Handle(StepGeom_Line)& Value() const;

View File

@@ -25,6 +25,7 @@
class StepGeom_Parabola; class StepGeom_Parabola;
class Geom2d_Parabola; class Geom2d_Parabola;
class Geom_Parabola; class Geom_Parabola;
class StepData_Factors;
//! This class implements the mapping between the class //! This class implements the mapping between the class
@@ -38,10 +39,10 @@ public:
Standard_EXPORT GeomToStep_MakeParabola(const Handle(Geom2d_Parabola)& C, Standard_EXPORT GeomToStep_MakeParabola(const Handle(Geom2d_Parabola)& C,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
Standard_EXPORT GeomToStep_MakeParabola(const Handle(Geom_Parabola)& C, Standard_EXPORT GeomToStep_MakeParabola(const Handle(Geom_Parabola)& C,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
Standard_EXPORT const Handle(StepGeom_Parabola)& Value() const; Standard_EXPORT const Handle(StepGeom_Parabola)& Value() const;

View File

@@ -22,6 +22,7 @@
#include <Standard_Handle.hxx> #include <Standard_Handle.hxx>
#include <GeomToStep_Root.hxx> #include <GeomToStep_Root.hxx>
class StepData_Factors;
class StepGeom_Plane; class StepGeom_Plane;
class gp_Pln; class gp_Pln;
class Geom_Plane; class Geom_Plane;
@@ -39,10 +40,10 @@ public:
Standard_EXPORT GeomToStep_MakePlane(const gp_Pln& P, Standard_EXPORT GeomToStep_MakePlane(const gp_Pln& P,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
Standard_EXPORT GeomToStep_MakePlane(const Handle(Geom_Plane)& P, Standard_EXPORT GeomToStep_MakePlane(const Handle(Geom_Plane)& P,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
Standard_EXPORT const Handle(StepGeom_Plane)& Value() const; Standard_EXPORT const Handle(StepGeom_Plane)& Value() const;

View File

@@ -25,6 +25,7 @@
#include <TColgp_Array1OfPnt.hxx> #include <TColgp_Array1OfPnt.hxx>
#include <TColgp_Array1OfPnt2d.hxx> #include <TColgp_Array1OfPnt2d.hxx>
class StepData_Factors;
class StepGeom_Polyline; class StepGeom_Polyline;
@@ -38,10 +39,10 @@ public:
Standard_EXPORT GeomToStep_MakePolyline(const TColgp_Array1OfPnt& P, Standard_EXPORT GeomToStep_MakePolyline(const TColgp_Array1OfPnt& P,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
Standard_EXPORT GeomToStep_MakePolyline(const TColgp_Array1OfPnt2d& P, Standard_EXPORT GeomToStep_MakePolyline(const TColgp_Array1OfPnt2d& P,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
Standard_EXPORT const Handle(StepGeom_Polyline)& Value() const; Standard_EXPORT const Handle(StepGeom_Polyline)& Value() const;

View File

@@ -23,6 +23,7 @@
#include <GeomToStep_Root.hxx> #include <GeomToStep_Root.hxx>
class StepData_Factors;
class StepGeom_RectangularTrimmedSurface; class StepGeom_RectangularTrimmedSurface;
class Geom_RectangularTrimmedSurface; class Geom_RectangularTrimmedSurface;
@@ -40,7 +41,7 @@ public:
Standard_EXPORT GeomToStep_MakeRectangularTrimmedSurface(const Handle(Geom_RectangularTrimmedSurface)& RTSurf, Standard_EXPORT GeomToStep_MakeRectangularTrimmedSurface(const Handle(Geom_RectangularTrimmedSurface)& RTSurf,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
Standard_EXPORT const Handle(StepGeom_RectangularTrimmedSurface)& Value() const; Standard_EXPORT const Handle(StepGeom_RectangularTrimmedSurface)& Value() const;

View File

@@ -23,6 +23,7 @@
#include <GeomToStep_Root.hxx> #include <GeomToStep_Root.hxx>
class StepData_Factors;
class StepGeom_SphericalSurface; class StepGeom_SphericalSurface;
class Geom_SphericalSurface; class Geom_SphericalSurface;
@@ -39,7 +40,7 @@ public:
Standard_EXPORT GeomToStep_MakeSphericalSurface(const Handle(Geom_SphericalSurface)& CSurf, Standard_EXPORT GeomToStep_MakeSphericalSurface(const Handle(Geom_SphericalSurface)& CSurf,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
Standard_EXPORT const Handle(StepGeom_SphericalSurface)& Value() const; Standard_EXPORT const Handle(StepGeom_SphericalSurface)& Value() const;

View File

@@ -23,6 +23,7 @@
#include <GeomToStep_Root.hxx> #include <GeomToStep_Root.hxx>
class StepData_Factors;
class StepGeom_Surface; class StepGeom_Surface;
class Geom_Surface; class Geom_Surface;
@@ -39,7 +40,7 @@ public:
Standard_EXPORT GeomToStep_MakeSurface(const Handle(Geom_Surface)& C, Standard_EXPORT GeomToStep_MakeSurface(const Handle(Geom_Surface)& C,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
Standard_EXPORT const Handle(StepGeom_Surface)& Value() const; Standard_EXPORT const Handle(StepGeom_Surface)& Value() const;

View File

@@ -23,6 +23,7 @@
#include <GeomToStep_Root.hxx> #include <GeomToStep_Root.hxx>
class StepData_Factors;
class StepGeom_SurfaceOfLinearExtrusion; class StepGeom_SurfaceOfLinearExtrusion;
class Geom_SurfaceOfLinearExtrusion; class Geom_SurfaceOfLinearExtrusion;
@@ -39,7 +40,7 @@ public:
Standard_EXPORT GeomToStep_MakeSurfaceOfLinearExtrusion(const Handle(Geom_SurfaceOfLinearExtrusion)& CSurf, Standard_EXPORT GeomToStep_MakeSurfaceOfLinearExtrusion(const Handle(Geom_SurfaceOfLinearExtrusion)& CSurf,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
Standard_EXPORT const Handle(StepGeom_SurfaceOfLinearExtrusion)& Value() const; Standard_EXPORT const Handle(StepGeom_SurfaceOfLinearExtrusion)& Value() const;

View File

@@ -23,6 +23,7 @@
#include <GeomToStep_Root.hxx> #include <GeomToStep_Root.hxx>
class StepData_Factors;
class StepGeom_SurfaceOfRevolution; class StepGeom_SurfaceOfRevolution;
class Geom_SurfaceOfRevolution; class Geom_SurfaceOfRevolution;
@@ -39,7 +40,7 @@ public:
Standard_EXPORT GeomToStep_MakeSurfaceOfRevolution(const Handle(Geom_SurfaceOfRevolution)& RevSurf, Standard_EXPORT GeomToStep_MakeSurfaceOfRevolution(const Handle(Geom_SurfaceOfRevolution)& RevSurf,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
Standard_EXPORT const Handle(StepGeom_SurfaceOfRevolution)& Value() const; Standard_EXPORT const Handle(StepGeom_SurfaceOfRevolution)& Value() const;

View File

@@ -23,6 +23,7 @@
#include <GeomToStep_Root.hxx> #include <GeomToStep_Root.hxx>
class StepData_Factors;
class StepGeom_SweptSurface; class StepGeom_SweptSurface;
class Geom_SweptSurface; class Geom_SweptSurface;
@@ -40,7 +41,7 @@ public:
Standard_EXPORT GeomToStep_MakeSweptSurface(const Handle(Geom_SweptSurface)& S, Standard_EXPORT GeomToStep_MakeSweptSurface(const Handle(Geom_SweptSurface)& S,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
Standard_EXPORT const Handle(StepGeom_SweptSurface)& Value() const; Standard_EXPORT const Handle(StepGeom_SweptSurface)& Value() const;

View File

@@ -23,6 +23,7 @@
#include <GeomToStep_Root.hxx> #include <GeomToStep_Root.hxx>
class StepData_Factors;
class StepGeom_ToroidalSurface; class StepGeom_ToroidalSurface;
class Geom_ToroidalSurface; class Geom_ToroidalSurface;
@@ -39,7 +40,7 @@ public:
Standard_EXPORT GeomToStep_MakeToroidalSurface(const Handle(Geom_ToroidalSurface)& TorSurf, Standard_EXPORT GeomToStep_MakeToroidalSurface(const Handle(Geom_ToroidalSurface)& TorSurf,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
Standard_EXPORT const Handle(StepGeom_ToroidalSurface)& Value() const; Standard_EXPORT const Handle(StepGeom_ToroidalSurface)& Value() const;

View File

@@ -23,6 +23,7 @@
#include <GeomToStep_Root.hxx> #include <GeomToStep_Root.hxx>
class StepData_Factors;
class StepGeom_Vector; class StepGeom_Vector;
class gp_Vec; class gp_Vec;
class gp_Vec2d; class gp_Vec2d;
@@ -42,16 +43,16 @@ public:
Standard_EXPORT GeomToStep_MakeVector(const gp_Vec& V, Standard_EXPORT GeomToStep_MakeVector(const gp_Vec& V,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
Standard_EXPORT GeomToStep_MakeVector(const gp_Vec2d& V, Standard_EXPORT GeomToStep_MakeVector(const gp_Vec2d& V,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
Standard_EXPORT GeomToStep_MakeVector(const Handle(Geom_Vector)& V, Standard_EXPORT GeomToStep_MakeVector(const Handle(Geom_Vector)& V,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
Standard_EXPORT GeomToStep_MakeVector(const Handle(Geom2d_Vector)& V, Standard_EXPORT GeomToStep_MakeVector(const Handle(Geom2d_Vector)& V,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
Standard_EXPORT const Handle(StepGeom_Vector)& Value() const; Standard_EXPORT const Handle(StepGeom_Vector)& Value() const;

View File

@@ -20,7 +20,6 @@
#include <Standard.hxx> #include <Standard.hxx>
#include <Standard_DefineAlloc.hxx> #include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx> #include <Standard_Handle.hxx>
#include <StepData_Factors.hxx>
#include <Standard_Boolean.hxx> #include <Standard_Boolean.hxx>

View File

@@ -25,15 +25,8 @@ enum Graphic3d_TransModeFlags
Graphic3d_TMF_TriedronPers = 0x0020, //!< object behaves like trihedron - it is fixed at the corner of view and does not resizing (but rotating) Graphic3d_TMF_TriedronPers = 0x0020, //!< object behaves like trihedron - it is fixed at the corner of view and does not resizing (but rotating)
Graphic3d_TMF_2d = 0x0040, //!< object is defined in 2D screen coordinates (pixels) and does not resize, pan and rotate Graphic3d_TMF_2d = 0x0040, //!< object is defined in 2D screen coordinates (pixels) and does not resize, pan and rotate
Graphic3d_TMF_CameraPers = 0x0080, //!< object is in front of the camera Graphic3d_TMF_CameraPers = 0x0080, //!< object is in front of the camera
Graphic3d_TMF_OrthoPers = 0x0100, //!< object is forced to be rendered with orthographic projection.
Graphic3d_TMF_ZoomRotatePers = Graphic3d_TMF_ZoomPers Graphic3d_TMF_ZoomRotatePers = Graphic3d_TMF_ZoomPers
| Graphic3d_TMF_RotatePers //!< object doesn't resize and rotate | Graphic3d_TMF_RotatePers //!< object doesn't resize and rotate
}; };
//! Bitwise OR operator for transform persistence mode flags. Be aware that some flags combinations are not valid.
inline Graphic3d_TransModeFlags operator| (Graphic3d_TransModeFlags a, Graphic3d_TransModeFlags b)
{
return static_cast<Graphic3d_TransModeFlags> (static_cast<uint32_t> (a) | static_cast<uint32_t> (b));
}
#endif #endif

View File

@@ -58,12 +58,6 @@ public:
return (theMode & (Graphic3d_TMF_TriedronPers | Graphic3d_TMF_2d)) != 0; return (theMode & (Graphic3d_TMF_TriedronPers | Graphic3d_TMF_2d)) != 0;
} }
//! Return true if specified mode is orthographic projection transformation persistence.
static Standard_Boolean IsOrthoPers (Graphic3d_TransModeFlags theMode)
{
return (theMode & Graphic3d_TMF_OrthoPers) != 0;
}
public: public:
//! Set transformation persistence. //! Set transformation persistence.
@@ -116,9 +110,6 @@ public:
//! Return true for Graphic3d_TMF_TriedronPers and Graphic3d_TMF_2d modes. //! Return true for Graphic3d_TMF_TriedronPers and Graphic3d_TMF_2d modes.
Standard_Boolean IsTrihedronOr2d() const { return IsTrihedronOr2d (myMode); } Standard_Boolean IsTrihedronOr2d() const { return IsTrihedronOr2d (myMode); }
//! Return true for Graphic3d_TMF_OrthoPers mode.
Standard_Boolean IsOrthoPers () const { return IsOrthoPers (myMode); }
//! Transformation persistence mode flags. //! Transformation persistence mode flags.
Graphic3d_TransModeFlags Mode() const { return myMode; } Graphic3d_TransModeFlags Mode() const { return myMode; }
@@ -306,32 +297,28 @@ public:
//! @param theWorldView [in] the world view transformation matrix. //! @param theWorldView [in] the world view transformation matrix.
//! @param theViewportWidth [in] the width of viewport (for 2d persistence). //! @param theViewportWidth [in] the width of viewport (for 2d persistence).
//! @param theViewportHeight [in] the height of viewport (for 2d persistence). //! @param theViewportHeight [in] the height of viewport (for 2d persistence).
//! @param theToApplyProjPers [in] if should apply projection persistence to matrix (for orthographic persistence).
//! @return transformation matrix to be applied to model world transformation of an object. //! @return transformation matrix to be applied to model world transformation of an object.
template<class T> template<class T>
NCollection_Mat4<T> Compute (const Handle(Graphic3d_Camera)& theCamera, NCollection_Mat4<T> Compute (const Handle(Graphic3d_Camera)& theCamera,
const NCollection_Mat4<T>& theProjection, const NCollection_Mat4<T>& theProjection,
const NCollection_Mat4<T>& theWorldView, const NCollection_Mat4<T>& theWorldView,
const Standard_Integer theViewportWidth, const Standard_Integer theViewportWidth,
const Standard_Integer theViewportHeight, const Standard_Integer theViewportHeight) const;
const Standard_Boolean theToApplyProjPers = false) const;
//! Apply transformation persistence on specified matrices. //! Apply transformation persistence on specified matrices.
//! @param theCamera [in] camera definition //! @param theCamera camera definition
//! @param theProjection [in] projection matrix to modify //! @param theProjection projection matrix to modify
//! @param theWorldView [in/out] world-view matrix to modify //! @param theWorldView world-view matrix to modify
//! @param theViewportWidth [in] viewport width //! @param theViewportWidth viewport width
//! @param theViewportHeight [in] viewport height //! @param theViewportHeight viewport height
//! @param theAnchor [in] if not NULL, overrides anchor point //! @param theAnchor if not NULL, overrides anchor point
//! @param theToApplyProjPers [in] if should apply projection persistence to matrix (for orthographic persistence).
template<class T> template<class T>
void Apply (const Handle(Graphic3d_Camera)& theCamera, void Apply (const Handle(Graphic3d_Camera)& theCamera,
const NCollection_Mat4<T>& theProjection, const NCollection_Mat4<T>& theProjection,
NCollection_Mat4<T>& theWorldView, NCollection_Mat4<T>& theWorldView,
const Standard_Integer theViewportWidth, const Standard_Integer theViewportWidth,
const Standard_Integer theViewportHeight, const Standard_Integer theViewportHeight,
const gp_Pnt* theAnchor = NULL, const gp_Pnt* theAnchor = NULL) const;
const Standard_Boolean theToApplyProjPers = true) const;
//! Dumps the content of me into the stream //! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const; Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
@@ -381,50 +368,41 @@ void Graphic3d_TransformPers::Apply (const Handle(Graphic3d_Camera)& theCamera,
NCollection_Mat4<T>& theWorldView, NCollection_Mat4<T>& theWorldView,
const Standard_Integer theViewportWidth, const Standard_Integer theViewportWidth,
const Standard_Integer theViewportHeight, const Standard_Integer theViewportHeight,
const gp_Pnt* theAnchor, const gp_Pnt* theAnchor) const
const Standard_Boolean theToApplyProjPers) const
{ {
(void )theViewportWidth; (void )theViewportWidth;
(void )theProjection;
if (myMode == Graphic3d_TMF_None if (myMode == Graphic3d_TMF_None
|| theViewportHeight == 0) || theViewportHeight == 0)
{ {
return; return;
} }
Handle(Graphic3d_Camera) aCamera = theCamera;
if (IsOrthoPers() && !aCamera->IsOrthographic())
{
aCamera = new Graphic3d_Camera(*theCamera); // If OrthoPers, copy camera and set to orthographic projection
aCamera->SetProjectionType (Graphic3d_Camera::Projection_Orthographic);
}
NCollection_Mat4<Standard_Real> aWorldView = aCamera->OrientationMatrix();
// use total size when tiling is active // use total size when tiling is active
const Standard_Integer aVPSizeY = aCamera->Tile().IsValid() ? aCamera->Tile().TotalSize.y() : theViewportHeight; const Standard_Integer aVPSizeY = theCamera->Tile().IsValid() ? theCamera->Tile().TotalSize.y() : theViewportHeight;
// a small enough jitter compensation offset // a small enough jitter compensation offset
// to avoid image dragging within single pixel in corner cases // to avoid image dragging within single pixel in corner cases
const Standard_Real aJitterComp = 0.001; const Standard_Real aJitterComp = 0.001;
if ((myMode & Graphic3d_TMF_TriedronPers) != 0) if (myMode == Graphic3d_TMF_TriedronPers)
{ {
// reset Z focus for trihedron persistence // reset Z focus for trihedron persistence
const Standard_Real aFocus = aCamera->IsOrthographic() const Standard_Real aFocus = theCamera->IsOrthographic()
? aCamera->Distance() ? theCamera->Distance()
: (aCamera->ZFocusType() == Graphic3d_Camera::FocusType_Relative : (theCamera->ZFocusType() == Graphic3d_Camera::FocusType_Relative
? Standard_Real(aCamera->ZFocus() * aCamera->Distance()) ? Standard_Real(theCamera->ZFocus() * theCamera->Distance())
: Standard_Real(aCamera->ZFocus())); : Standard_Real(theCamera->ZFocus()));
// scale factor to pixels // scale factor to pixels
const gp_XYZ aViewDim = aCamera->ViewDimensions (aFocus); const gp_XYZ aViewDim = theCamera->ViewDimensions (aFocus);
const Standard_Real aScale = Abs(aViewDim.Y()) / Standard_Real(aVPSizeY); const Standard_Real aScale = Abs(aViewDim.Y()) / Standard_Real(aVPSizeY);
const gp_Dir aForward = aCamera->Direction(); const gp_Dir aForward = theCamera->Direction();
gp_XYZ aCenter = aCamera->Center().XYZ() + aForward.XYZ() * (aFocus - aCamera->Distance()); gp_XYZ aCenter = theCamera->Center().XYZ() + aForward.XYZ() * (aFocus - theCamera->Distance());
if ((myParams.Params2d.Corner & (Aspect_TOTP_LEFT | Aspect_TOTP_RIGHT)) != 0) if ((myParams.Params2d.Corner & (Aspect_TOTP_LEFT | Aspect_TOTP_RIGHT)) != 0)
{ {
const Standard_Real anOffsetX = (Standard_Real(myParams.Params2d.OffsetX) + aJitterComp) * aScale; const Standard_Real anOffsetX = (Standard_Real(myParams.Params2d.OffsetX) + aJitterComp) * aScale;
const gp_Dir aSide = aForward.Crossed (aCamera->Up()); const gp_Dir aSide = aForward.Crossed (theCamera->Up());
const gp_XYZ aDeltaX = aSide.XYZ() * (Abs(aViewDim.X()) * aCamera->NDC2dOffsetX() - anOffsetX); const gp_XYZ aDeltaX = aSide.XYZ() * (Abs(aViewDim.X()) * theCamera->NDC2dOffsetX() - anOffsetX);
if ((myParams.Params2d.Corner & Aspect_TOTP_RIGHT) != 0) if ((myParams.Params2d.Corner & Aspect_TOTP_RIGHT) != 0)
{ {
aCenter += aDeltaX; aCenter += aDeltaX;
@@ -437,7 +415,7 @@ void Graphic3d_TransformPers::Apply (const Handle(Graphic3d_Camera)& theCamera,
if ((myParams.Params2d.Corner & (Aspect_TOTP_TOP | Aspect_TOTP_BOTTOM)) != 0) if ((myParams.Params2d.Corner & (Aspect_TOTP_TOP | Aspect_TOTP_BOTTOM)) != 0)
{ {
const Standard_Real anOffsetY = (Standard_Real(myParams.Params2d.OffsetY) + aJitterComp) * aScale; const Standard_Real anOffsetY = (Standard_Real(myParams.Params2d.OffsetY) + aJitterComp) * aScale;
const gp_XYZ aDeltaY = aCamera->Up().XYZ() * (Abs(aViewDim.Y()) * aCamera->NDC2dOffsetY() - anOffsetY); const gp_XYZ aDeltaY = theCamera->Up().XYZ() * (Abs(aViewDim.Y()) * theCamera->NDC2dOffsetY() - anOffsetY);
if ((myParams.Params2d.Corner & Aspect_TOTP_TOP) != 0) if ((myParams.Params2d.Corner & Aspect_TOTP_TOP) != 0)
{ {
aCenter += aDeltaY; aCenter += aDeltaY;
@@ -448,24 +426,27 @@ void Graphic3d_TransformPers::Apply (const Handle(Graphic3d_Camera)& theCamera,
} }
} }
NCollection_Mat4<Standard_Real> aWorldView = theCamera->OrientationMatrix();
Graphic3d_TransformUtils::Translate (aWorldView, aCenter.X(), aCenter.Y(), aCenter.Z()); Graphic3d_TransformUtils::Translate (aWorldView, aCenter.X(), aCenter.Y(), aCenter.Z());
Graphic3d_TransformUtils::Scale (aWorldView, aScale, aScale, aScale); Graphic3d_TransformUtils::Scale (aWorldView, aScale, aScale, aScale);
theWorldView.ConvertFrom (aWorldView);
return;
} }
else if ((myMode & Graphic3d_TMF_2d) != 0) else if (myMode == Graphic3d_TMF_2d)
{ {
const Standard_Real aFocus = aCamera->IsOrthographic() const Standard_Real aFocus = theCamera->IsOrthographic()
? aCamera->Distance() ? theCamera->Distance()
: (aCamera->ZFocusType() == Graphic3d_Camera::FocusType_Relative : (theCamera->ZFocusType() == Graphic3d_Camera::FocusType_Relative
? Standard_Real(aCamera->ZFocus() * aCamera->Distance()) ? Standard_Real(theCamera->ZFocus() * theCamera->Distance())
: Standard_Real(aCamera->ZFocus())); : Standard_Real(theCamera->ZFocus()));
// scale factor to pixels // scale factor to pixels
const gp_XYZ aViewDim = aCamera->ViewDimensions (aFocus); const gp_XYZ aViewDim = theCamera->ViewDimensions (aFocus);
const Standard_Real aScale = Abs(aViewDim.Y()) / Standard_Real(aVPSizeY); const Standard_Real aScale = Abs(aViewDim.Y()) / Standard_Real(aVPSizeY);
gp_XYZ aCenter (0.0, 0.0, -aFocus); gp_XYZ aCenter (0.0, 0.0, -aFocus);
if ((myParams.Params2d.Corner & (Aspect_TOTP_LEFT | Aspect_TOTP_RIGHT)) != 0) if ((myParams.Params2d.Corner & (Aspect_TOTP_LEFT | Aspect_TOTP_RIGHT)) != 0)
{ {
aCenter.SetX (-aViewDim.X() * aCamera->NDC2dOffsetX() + (Standard_Real(myParams.Params2d.OffsetX) + aJitterComp) * aScale); aCenter.SetX (-aViewDim.X() * theCamera->NDC2dOffsetX() + (Standard_Real(myParams.Params2d.OffsetX) + aJitterComp) * aScale);
if ((myParams.Params2d.Corner & Aspect_TOTP_RIGHT) != 0) if ((myParams.Params2d.Corner & Aspect_TOTP_RIGHT) != 0)
{ {
aCenter.SetX (-aCenter.X()); aCenter.SetX (-aCenter.X());
@@ -473,24 +454,26 @@ void Graphic3d_TransformPers::Apply (const Handle(Graphic3d_Camera)& theCamera,
} }
if ((myParams.Params2d.Corner & (Aspect_TOTP_TOP | Aspect_TOTP_BOTTOM)) != 0) if ((myParams.Params2d.Corner & (Aspect_TOTP_TOP | Aspect_TOTP_BOTTOM)) != 0)
{ {
aCenter.SetY (-aViewDim.Y() * aCamera->NDC2dOffsetY() + (Standard_Real(myParams.Params2d.OffsetY) + aJitterComp) * aScale); aCenter.SetY (-aViewDim.Y() * theCamera->NDC2dOffsetY() + (Standard_Real(myParams.Params2d.OffsetY) + aJitterComp) * aScale);
if ((myParams.Params2d.Corner & Aspect_TOTP_TOP) != 0) if ((myParams.Params2d.Corner & Aspect_TOTP_TOP) != 0)
{ {
aCenter.SetY (-aCenter.Y()); aCenter.SetY (-aCenter.Y());
} }
} }
aWorldView.InitIdentity(); theWorldView.InitIdentity();
Graphic3d_TransformUtils::Translate (aWorldView, aCenter.X(), aCenter.Y(), aCenter.Z()); Graphic3d_TransformUtils::Translate (theWorldView, T(aCenter.X()), T(aCenter.Y()), T(aCenter.Z()));
Graphic3d_TransformUtils::Scale (aWorldView, aScale, aScale, aScale); Graphic3d_TransformUtils::Scale (theWorldView, T(aScale), T(aScale), T(aScale));
return;
} }
else if ((myMode & Graphic3d_TMF_CameraPers) != 0) else if ((myMode & Graphic3d_TMF_CameraPers) != 0)
{ {
aWorldView.InitIdentity(); theWorldView.InitIdentity();
} }
else else
{ {
// Compute reference point for transformation in untransformed projection space. // Compute reference point for transformation in untransformed projection space.
NCollection_Mat4<Standard_Real> aWorldView = theCamera->OrientationMatrix();
if (theAnchor != NULL) if (theAnchor != NULL)
{ {
Graphic3d_TransformUtils::Translate (aWorldView, theAnchor->X(), theAnchor->Y(), theAnchor->Z()); Graphic3d_TransformUtils::Translate (aWorldView, theAnchor->X(), theAnchor->Y(), theAnchor->Z());
@@ -520,19 +503,12 @@ void Graphic3d_TransformPers::Apply (const Handle(Graphic3d_Camera)& theCamera,
if ((myMode & Graphic3d_TMF_ZoomPers) != 0) if ((myMode & Graphic3d_TMF_ZoomPers) != 0)
{ {
// lock zooming // lock zooming
Standard_Real aScale = persistentScale (aCamera, theViewportWidth, theViewportHeight); Standard_Real aScale = persistentScale (theCamera, theViewportWidth, theViewportHeight);
Graphic3d_TransformUtils::Scale (aWorldView, aScale, aScale, aScale); Graphic3d_TransformUtils::Scale (aWorldView, aScale, aScale, aScale);
} }
theWorldView.ConvertFrom (aWorldView);
return;
} }
if (!theCamera->IsOrthographic() && IsOrthoPers() && theToApplyProjPers)
{
Graphic3d_Mat4d aProjInv;
aProjInv.ConvertFrom (theProjection.Inverted());
aWorldView = (aProjInv * aCamera->ProjectionMatrix()) * aWorldView;
}
theWorldView.ConvertFrom (aWorldView);
} }
// ======================================================================= // =======================================================================
@@ -579,7 +555,7 @@ void Graphic3d_TransformPers::Apply (const Handle(Graphic3d_Camera)& theCamera,
const Standard_Integer theViewportHeight, const Standard_Integer theViewportHeight,
BVH_Box<T, 3>& theBoundingBox) const BVH_Box<T, 3>& theBoundingBox) const
{ {
NCollection_Mat4<T> aTPers = Compute (theCamera, theProjection, theWorldView, theViewportWidth, theViewportHeight, false); NCollection_Mat4<T> aTPers = Compute (theCamera, theProjection, theWorldView, theViewportWidth, theViewportHeight);
if (aTPers.IsIdentity() if (aTPers.IsIdentity()
|| !theBoundingBox.IsValid()) || !theBoundingBox.IsValid())
{ {
@@ -618,8 +594,7 @@ NCollection_Mat4<T> Graphic3d_TransformPers::Compute (const Handle(Graphic3d_Cam
const NCollection_Mat4<T>& theProjection, const NCollection_Mat4<T>& theProjection,
const NCollection_Mat4<T>& theWorldView, const NCollection_Mat4<T>& theWorldView,
const Standard_Integer theViewportWidth, const Standard_Integer theViewportWidth,
const Standard_Integer theViewportHeight, const Standard_Integer theViewportHeight) const
const Standard_Boolean theToApplyProjPers) const
{ {
if (myMode == Graphic3d_TMF_None) if (myMode == Graphic3d_TMF_None)
{ {
@@ -635,7 +610,7 @@ NCollection_Mat4<T> Graphic3d_TransformPers::Compute (const Handle(Graphic3d_Cam
// compute only world-view matrix difference to avoid floating point instability // compute only world-view matrix difference to avoid floating point instability
// caused by projection matrix modifications outside of this algorithm (e.g. by Z-fit) // caused by projection matrix modifications outside of this algorithm (e.g. by Z-fit)
Apply (theCamera, theProjection, aWorldView, theViewportWidth, theViewportHeight, NULL, theToApplyProjPers); Apply (theCamera, theProjection, aWorldView, theViewportWidth, theViewportHeight);
return anUnviewMat * aWorldView; return anUnviewMat * aWorldView;
} }

View File

@@ -1251,7 +1251,6 @@ bool Image_AlienPixMap::Save (Standard_Byte* theBuffer,
} }
return true; return true;
#else #else
(void)theLength;
if (theBuffer != NULL) if (theBuffer != NULL)
{ {
Message::SendFail ("Error: no image library available"); Message::SendFail ("Error: no image library available");
@@ -1451,8 +1450,6 @@ bool Image_AlienPixMap::Save (std::ostream& theStream, const TCollection_AsciiSt
} }
return true; return true;
#else #else
(void)theStream;
(void)theExtension;
Message::SendFail ("Error: no image library available"); Message::SendFail ("Error: no image library available");
return false; return false;
#endif #endif

View File

@@ -138,6 +138,7 @@ void Message_Msg::Set (const TCollection_ExtendedString& theMsg)
aFormatType = Msg_StringType; aFormatType = Msg_StringType;
break; break;
default: default:
aFormatType = Msg_IndefiniteType;
continue; continue;
} }
mySeqOfFormats.Append (Standard_Integer(aFormatType)); // type mySeqOfFormats.Append (Standard_Integer(aFormatType)); // type

View File

@@ -223,7 +223,7 @@ void Message_PrinterOStream::SetConsoleTextColor (Standard_OStream* theOStream,
return; return;
} }
const char* aCode; const char* aCode = "\e[0m";
switch (theTextColor) switch (theTextColor)
{ {
case Message_ConsoleColor_Default: case Message_ConsoleColor_Default:

View File

@@ -459,7 +459,7 @@ void OSD_File::Build (const OSD_OpenMode theMode,
throw Standard_ProgramError ("OSD_File::Build(): no name was given"); throw Standard_ProgramError ("OSD_File::Build(): no name was given");
} }
const char* anFDOpenMode; const char* anFDOpenMode = "r";
Standard_Integer anOpenMode = O_CREAT | O_TRUNC; Standard_Integer anOpenMode = O_CREAT | O_TRUNC;
switch (theMode) switch (theMode)
{ {
@@ -622,7 +622,7 @@ void OSD_File::Open (const OSD_OpenMode theMode,
throw Standard_ProgramError ("OSD_File::Open(): no name was given"); throw Standard_ProgramError ("OSD_File::Open(): no name was given");
} }
const char* anFDOpenMode; const char* anFDOpenMode = "r";
Standard_Integer anOpenMode = 0; Standard_Integer anOpenMode = 0;
switch (theMode) switch (theMode)
{ {

View File

@@ -1521,6 +1521,7 @@ TCollection_AsciiString OSD_Path::RelativePath(
TCollection_AsciiString EmptyString = "" ; TCollection_AsciiString EmptyString = "" ;
TCollection_AsciiString FilePath ; TCollection_AsciiString FilePath ;
Standard_Integer len ; Standard_Integer len ;
Standard_Integer i, n ;
Standard_Boolean Wnt = 0 ; Standard_Boolean Wnt = 0 ;
FilePath = aAbsFilePath ; FilePath = aAbsFilePath ;
@@ -1553,14 +1554,14 @@ TCollection_AsciiString OSD_Path::RelativePath(
TCollection_AsciiString DirToken, FileToken ; TCollection_AsciiString DirToken, FileToken ;
Standard_Boolean Sibling = 0 ; Standard_Boolean Sibling = 0 ;
for (Standard_Integer n = 1 ;; n++) { for (i = n = 1 ;; n++) {
DirToken = aDirPath.Token("/\\",n) ; DirToken = aDirPath.Token("/\\",n) ;
if (DirToken.IsEmpty()) if (DirToken.IsEmpty())
return FilePath ; return FilePath ;
if (!Sibling) { if (!Sibling) {
len = FilePath.Length() ; len = FilePath.Length() ;
Standard_Integer i = FilePath.Search("/") ; i = FilePath.Search("/") ;
if (i > 0) { if (i > 0) {
if (i == len) if (i == len)
return EmptyString ; return EmptyString ;

View File

@@ -813,7 +813,7 @@ Standard_Boolean OpenGl_Context::SetSwapInterval (const Standard_Integer theInte
&& myFuncs->glXSwapIntervalEXT != NULL) && myFuncs->glXSwapIntervalEXT != NULL)
{ {
typedef int (*glXSwapIntervalEXT_t_x)(Display* theDisplay, GLXDrawable theDrawable, int theInterval); typedef int (*glXSwapIntervalEXT_t_x)(Display* theDisplay, GLXDrawable theDrawable, int theInterval);
glXSwapIntervalEXT_t_x aFuncPtr = (glXSwapIntervalEXT_t_x )(void*)myFuncs->glXSwapIntervalEXT; glXSwapIntervalEXT_t_x aFuncPtr = (glXSwapIntervalEXT_t_x )myFuncs->glXSwapIntervalEXT;
aFuncPtr ((Display* )myDisplay, (GLXDrawable )myWindow, theInterval); aFuncPtr ((Display* )myDisplay, (GLXDrawable )myWindow, theInterval);
return Standard_True; return Standard_True;
} }

View File

@@ -94,8 +94,9 @@ Handle(Standard_Transient) Plugin::Load (const Standard_GUID& aGUID,
} }
else else
f = theMapOfFunctions(pid); f = theMapOfFunctions(pid);
Standard_Transient* (*fp) (const Standard_GUID&) = NULL; Standard_Transient* (*fp) (const Standard_GUID&) = NULL;
fp = (Standard_Transient* (*)(const Standard_GUID&))(void*)f; fp = (Standard_Transient* (*)(const Standard_GUID&)) f;
Handle(Standard_Transient) theServiceFactory = (*fp) (aGUID); Handle(Standard_Transient) theServiceFactory = (*fp) (aGUID);
return theServiceFactory; return theServiceFactory;

View File

@@ -98,8 +98,6 @@
#include <RWStepBasic_RWExternalIdentificationAssignment.hxx> #include <RWStepBasic_RWExternalIdentificationAssignment.hxx>
#include <RWStepBasic_RWExternallyDefinedItem.hxx> #include <RWStepBasic_RWExternallyDefinedItem.hxx>
#include <RWStepBasic_RWGeneralProperty.hxx> #include <RWStepBasic_RWGeneralProperty.hxx>
#include <RWStepBasic_RWGeneralPropertyAssociation.hxx>
#include <RWStepBasic_RWGeneralPropertyRelationship.hxx>
#include <RWStepBasic_RWGroupRelationship.hxx> #include <RWStepBasic_RWGroupRelationship.hxx>
#include <RWStepBasic_RWIdentificationAssignment.hxx> #include <RWStepBasic_RWIdentificationAssignment.hxx>
#include <RWStepBasic_RWIdentificationRole.hxx> #include <RWStepBasic_RWIdentificationRole.hxx>
@@ -327,7 +325,6 @@
#include <RWStepRepr_RWMaterialDesignation.hxx> #include <RWStepRepr_RWMaterialDesignation.hxx>
#include <RWStepRepr_RWMaterialProperty.hxx> #include <RWStepRepr_RWMaterialProperty.hxx>
#include <RWStepRepr_RWMaterialPropertyRepresentation.hxx> #include <RWStepRepr_RWMaterialPropertyRepresentation.hxx>
#include <RWStepRepr_RWMechanicalDesignAndDraughtingRelationship.hxx>
#include <RWStepRepr_RWMeasureRepresentationItem.hxx> #include <RWStepRepr_RWMeasureRepresentationItem.hxx>
#include <RWStepRepr_RWProductConcept.hxx> #include <RWStepRepr_RWProductConcept.hxx>
#include <RWStepRepr_RWProductDefinitionShape.hxx> #include <RWStepRepr_RWProductDefinitionShape.hxx>
@@ -573,8 +570,6 @@
#include <StepBasic_ExternalIdentificationAssignment.hxx> #include <StepBasic_ExternalIdentificationAssignment.hxx>
#include <StepBasic_ExternalSource.hxx> #include <StepBasic_ExternalSource.hxx>
#include <StepBasic_GeneralProperty.hxx> #include <StepBasic_GeneralProperty.hxx>
#include <StepBasic_GeneralPropertyAssociation.hxx>
#include <StepBasic_GeneralPropertyRelationship.hxx>
#include <StepBasic_Group.hxx> #include <StepBasic_Group.hxx>
#include <StepBasic_GroupRelationship.hxx> #include <StepBasic_GroupRelationship.hxx>
#include <StepBasic_IdentificationAssignment.hxx> #include <StepBasic_IdentificationAssignment.hxx>
@@ -790,7 +785,6 @@
#include <StepRepr_ConfigurationEffectivity.hxx> #include <StepRepr_ConfigurationEffectivity.hxx>
#include <StepRepr_ConstructiveGeometryRepresentation.hxx> #include <StepRepr_ConstructiveGeometryRepresentation.hxx>
#include <StepRepr_ConstructiveGeometryRepresentationRelationship.hxx> #include <StepRepr_ConstructiveGeometryRepresentationRelationship.hxx>
#include <StepRepr_MechanicalDesignAndDraughtingRelationship.hxx>
#include <StepRepr_DataEnvironment.hxx> #include <StepRepr_DataEnvironment.hxx>
#include <StepRepr_DescriptiveRepresentationItem.hxx> #include <StepRepr_DescriptiveRepresentationItem.hxx>
#include <StepRepr_Extension.hxx> #include <StepRepr_Extension.hxx>
@@ -1194,9 +1188,7 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_GeneralModule,StepData_GeneralModule)
#include <StepDimTol_GeoTolAndGeoTolWthDatRefAndUneqDisGeoTol.hxx> #include <StepDimTol_GeoTolAndGeoTolWthDatRefAndUneqDisGeoTol.hxx>
#include <StepRepr_CompGroupShAspAndCompShAspAndDatumFeatAndShAsp.hxx> #include <StepRepr_CompGroupShAspAndCompShAspAndDatumFeatAndShAsp.hxx>
#include <StepRepr_CompShAspAndDatumFeatAndShAsp.hxx> #include <StepRepr_CompShAspAndDatumFeatAndShAsp.hxx>
#include <StepRepr_BooleanRepresentationItem.hxx>
#include <StepRepr_IntegerRepresentationItem.hxx> #include <StepRepr_IntegerRepresentationItem.hxx>
#include <StepRepr_RealRepresentationItem.hxx>
#include <StepRepr_ValueRepresentationItem.hxx> #include <StepRepr_ValueRepresentationItem.hxx>
#include <StepAP242_DraughtingModelItemAssociation.hxx> #include <StepAP242_DraughtingModelItemAssociation.hxx>
#include <StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol.hxx> #include <StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol.hxx>
@@ -5884,27 +5876,6 @@ void RWStepAP214_GeneralModule::FillSharedCase(const Standard_Integer CN,
aTool.Share(anEnt, iter); aTool.Share(anEnt, iter);
} }
break; break;
case 820:
{
DeclareAndCast(StepBasic_GeneralPropertyAssociation, anEnt, ent);
RWStepBasic_RWGeneralPropertyAssociation aTool;
aTool.Share(anEnt, iter);
}
break;
case 821:
{
DeclareAndCast(StepBasic_GeneralPropertyRelationship, anEnt, ent);
RWStepBasic_RWGeneralPropertyRelationship aTool;
aTool.Share(anEnt, iter);
}
break;
case 824:
{
DeclareAndCast(StepRepr_MechanicalDesignAndDraughtingRelationship, anEnt, ent);
RWStepRepr_RWMechanicalDesignAndDraughtingRelationship aTool;
aTool.Share(anEnt, iter);
}
break;
default : break; default : break;
} }
} }
@@ -8214,21 +8185,6 @@ Standard_Boolean RWStepAP214_GeneralModule::NewVoid
case 819: case 819:
ent = new StepVisual_TriangulatedSurfaceSet; ent = new StepVisual_TriangulatedSurfaceSet;
break; break;
case 820:
ent = new StepBasic_GeneralPropertyAssociation;
break;
case 821:
ent = new StepBasic_GeneralPropertyRelationship;
break;
case 822:
ent = new StepRepr_BooleanRepresentationItem;
break;
case 823:
ent = new StepRepr_RealRepresentationItem;
break;
case 824:
ent = new StepRepr_MechanicalDesignAndDraughtingRelationship;
break;
default: default:
return Standard_False; return Standard_False;

View File

@@ -188,8 +188,6 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_ReadWriteModule,StepData_ReadWriteModule)
#include <StepShape_GeometricallyBoundedWireframeShapeRepresentation.hxx> #include <StepShape_GeometricallyBoundedWireframeShapeRepresentation.hxx>
#include <StepRepr_GlobalUncertaintyAssignedContext.hxx> #include <StepRepr_GlobalUncertaintyAssignedContext.hxx>
#include <StepRepr_GlobalUnitAssignedContext.hxx> #include <StepRepr_GlobalUnitAssignedContext.hxx>
#include <StepBasic_GeneralPropertyAssociation.hxx>
#include <StepBasic_GeneralPropertyRelationship.hxx>
#include <StepBasic_Group.hxx> #include <StepBasic_Group.hxx>
#include <StepBasic_GroupRelationship.hxx> #include <StepBasic_GroupRelationship.hxx>
#include <StepShape_HalfSpaceSolid.hxx> #include <StepShape_HalfSpaceSolid.hxx>
@@ -624,8 +622,6 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_ReadWriteModule,StepData_ReadWriteModule)
#include <RWStepShape_RWGeometricallyBoundedWireframeShapeRepresentation.hxx> #include <RWStepShape_RWGeometricallyBoundedWireframeShapeRepresentation.hxx>
#include <RWStepRepr_RWGlobalUncertaintyAssignedContext.hxx> #include <RWStepRepr_RWGlobalUncertaintyAssignedContext.hxx>
#include <RWStepRepr_RWGlobalUnitAssignedContext.hxx> #include <RWStepRepr_RWGlobalUnitAssignedContext.hxx>
#include <RWStepBasic_RWGeneralPropertyAssociation.hxx>
#include <RWStepBasic_RWGeneralPropertyRelationship.hxx>
#include <RWStepBasic_RWGroup.hxx> #include <RWStepBasic_RWGroup.hxx>
#include <RWStepBasic_RWGroupRelationship.hxx> #include <RWStepBasic_RWGroupRelationship.hxx>
#include <RWStepShape_RWHalfSpaceSolid.hxx> #include <RWStepShape_RWHalfSpaceSolid.hxx>
@@ -641,7 +637,6 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_ReadWriteModule,StepData_ReadWriteModule)
#include <RWStepShape_RWManifoldSurfaceShapeRepresentation.hxx> #include <RWStepShape_RWManifoldSurfaceShapeRepresentation.hxx>
#include <RWStepRepr_RWMappedItem.hxx> #include <RWStepRepr_RWMappedItem.hxx>
#include <RWStepBasic_RWMeasureWithUnit.hxx> #include <RWStepBasic_RWMeasureWithUnit.hxx>
#include <RWStepRepr_RWMechanicalDesignAndDraughtingRelationship.hxx>
#include <RWStepVisual_RWMechanicalDesignGeometricPresentationArea.hxx> #include <RWStepVisual_RWMechanicalDesignGeometricPresentationArea.hxx>
#include <RWStepVisual_RWMechanicalDesignGeometricPresentationRepresentation.hxx> #include <RWStepVisual_RWMechanicalDesignGeometricPresentationRepresentation.hxx>
// Removed from Rev2 to Rev4 : <RWStepVisual_RWMechanicalDesignPresentationArea.hxx> // Removed from Rev2 to Rev4 : <RWStepVisual_RWMechanicalDesignPresentationArea.hxx>
@@ -1360,9 +1355,7 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_ReadWriteModule,StepData_ReadWriteModule)
#include <RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndUneqDisGeoTol.hxx> #include <RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndUneqDisGeoTol.hxx>
#include <RWStepRepr_RWCompGroupShAspAndCompShAspAndDatumFeatAndShAsp.hxx> #include <RWStepRepr_RWCompGroupShAspAndCompShAspAndDatumFeatAndShAsp.hxx>
#include <RWStepRepr_RWCompShAspAndDatumFeatAndShAsp.hxx> #include <RWStepRepr_RWCompShAspAndDatumFeatAndShAsp.hxx>
#include <RWStepRepr_RWBooleanRepresentationItem.hxx>
#include <RWStepRepr_RWIntegerRepresentationItem.hxx> #include <RWStepRepr_RWIntegerRepresentationItem.hxx>
#include <RWStepRepr_RWRealRepresentationItem.hxx>
#include <RWStepRepr_RWValueRepresentationItem.hxx> #include <RWStepRepr_RWValueRepresentationItem.hxx>
#include <RWStepRepr_RWValueRepresentationItem.hxx> #include <RWStepRepr_RWValueRepresentationItem.hxx>
#include <RWStepAP242_RWDraughtingModelItemAssociation.hxx> #include <RWStepAP242_RWDraughtingModelItemAssociation.hxx>
@@ -1413,9 +1406,7 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_ReadWriteModule,StepData_ReadWriteModule)
#include <StepDimTol_GeoTolAndGeoTolWthDatRefAndUneqDisGeoTol.hxx> #include <StepDimTol_GeoTolAndGeoTolWthDatRefAndUneqDisGeoTol.hxx>
#include <StepRepr_CompGroupShAspAndCompShAspAndDatumFeatAndShAsp.hxx> #include <StepRepr_CompGroupShAspAndCompShAspAndDatumFeatAndShAsp.hxx>
#include <StepRepr_CompShAspAndDatumFeatAndShAsp.hxx> #include <StepRepr_CompShAspAndDatumFeatAndShAsp.hxx>
#include <StepRepr_BooleanRepresentationItem.hxx>
#include <StepRepr_IntegerRepresentationItem.hxx> #include <StepRepr_IntegerRepresentationItem.hxx>
#include <StepRepr_RealRepresentationItem.hxx>
#include <StepRepr_ValueRepresentationItem.hxx> #include <StepRepr_ValueRepresentationItem.hxx>
#include <StepAP242_DraughtingModelItemAssociation.hxx> #include <StepAP242_DraughtingModelItemAssociation.hxx>
#include <StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol.hxx> #include <StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol.hxx>
@@ -1432,7 +1423,6 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_ReadWriteModule,StepData_ReadWriteModule)
#include <StepRepr_CharacterizedRepresentation.hxx> #include <StepRepr_CharacterizedRepresentation.hxx>
#include <StepRepr_ConstructiveGeometryRepresentation.hxx> #include <StepRepr_ConstructiveGeometryRepresentation.hxx>
#include <StepRepr_ConstructiveGeometryRepresentationRelationship.hxx> #include <StepRepr_ConstructiveGeometryRepresentationRelationship.hxx>
#include <StepRepr_MechanicalDesignAndDraughtingRelationship.hxx>
#include <RWStepVisual_RWTessellatedAnnotationOccurrence.hxx> #include <RWStepVisual_RWTessellatedAnnotationOccurrence.hxx>
#include <RWStepVisual_RWTessellatedItem.hxx> #include <RWStepVisual_RWTessellatedItem.hxx>
@@ -2362,11 +2352,6 @@ static TCollection_AsciiString Reco_ComplexTriangulatedSurfaceSet("COMPLEX_TRIAN
static TCollection_AsciiString Reco_CubicBezierTessellatedEdge("CUBIC_BEZIER_TESSELLATED_EDGE"); static TCollection_AsciiString Reco_CubicBezierTessellatedEdge("CUBIC_BEZIER_TESSELLATED_EDGE");
static TCollection_AsciiString Reco_CubicBezierTriangulatedFace("CUBIC_BEZIER_TRIANGULATED_FACE"); static TCollection_AsciiString Reco_CubicBezierTriangulatedFace("CUBIC_BEZIER_TRIANGULATED_FACE");
static TCollection_AsciiString Reco_TriangulatedSurfaceSet("TRIANGULATED_SURFACE_SET"); static TCollection_AsciiString Reco_TriangulatedSurfaceSet("TRIANGULATED_SURFACE_SET");
static TCollection_AsciiString Reco_GeneralPropertyAssociation("GENERAL_PROPERTY_ASSOCIATION");
static TCollection_AsciiString Reco_GeneralPropertyRelationship("GENERAL_PROPERTY_RELATIONSHIP");
static TCollection_AsciiString Reco_BooleanRepresentationItem("BOOLEAN_REPRESENTATION_ITEM");
static TCollection_AsciiString Reco_RealRepresentationItem("REAL_REPRESENTATION_ITEM");
static TCollection_AsciiString Reco_MechanicalDesignAndDraughtingRelationship("MECHANICAL_DESIGN_AND_DRAUGHTING_RELATIONSHIP");
// -- Definition of the libraries -- // -- Definition of the libraries --
@@ -3124,11 +3109,6 @@ RWStepAP214_ReadWriteModule::RWStepAP214_ReadWriteModule ()
typenums.Bind(Reco_CubicBezierTessellatedEdge, 817); typenums.Bind(Reco_CubicBezierTessellatedEdge, 817);
typenums.Bind(Reco_CubicBezierTriangulatedFace, 818); typenums.Bind(Reco_CubicBezierTriangulatedFace, 818);
typenums.Bind(Reco_TriangulatedSurfaceSet, 819); typenums.Bind(Reco_TriangulatedSurfaceSet, 819);
typenums.Bind(Reco_GeneralPropertyAssociation, 820);
typenums.Bind(Reco_GeneralPropertyRelationship, 821);
typenums.Bind(Reco_BooleanRepresentationItem, 822);
typenums.Bind(Reco_RealRepresentationItem, 823);
typenums.Bind(Reco_MechanicalDesignAndDraughtingRelationship, 824);
// SHORT NAMES // SHORT NAMES
@@ -5117,11 +5097,6 @@ const TCollection_AsciiString& RWStepAP214_ReadWriteModule::StepType
case 817: return Reco_CubicBezierTessellatedEdge; case 817: return Reco_CubicBezierTessellatedEdge;
case 818: return Reco_CubicBezierTriangulatedFace; case 818: return Reco_CubicBezierTriangulatedFace;
case 819: return Reco_TriangulatedSurfaceSet; case 819: return Reco_TriangulatedSurfaceSet;
case 820: return Reco_GeneralPropertyAssociation;
case 821: return Reco_GeneralPropertyRelationship;
case 822: return Reco_BooleanRepresentationItem;
case 823: return Reco_RealRepresentationItem;
case 824: return Reco_MechanicalDesignAndDraughtingRelationship;
default : return PasReco; default : return PasReco;
} }
} }
@@ -10731,41 +10706,6 @@ void RWStepAP214_ReadWriteModule::ReadStep(const Standard_Integer CN,
aTool.ReadStep(data, num, ach, anEnt); aTool.ReadStep(data, num, ach, anEnt);
} }
break; break;
case 820:
{
DeclareAndCast(StepBasic_GeneralPropertyAssociation, anEnt, ent);
RWStepBasic_RWGeneralPropertyAssociation aTool;
aTool.ReadStep(data, num, ach, anEnt);
}
break;
case 821:
{
DeclareAndCast(StepBasic_GeneralPropertyRelationship, anEnt, ent);
RWStepBasic_RWGeneralPropertyRelationship aTool;
aTool.ReadStep(data, num, ach, anEnt);
}
break;
case 822:
{
DeclareAndCast(StepRepr_BooleanRepresentationItem, anent, ent);
RWStepRepr_RWBooleanRepresentationItem aTool;
aTool.ReadStep(data, num, ach, anent);
}
break;
case 823:
{
DeclareAndCast(StepRepr_RealRepresentationItem, anent, ent);
RWStepRepr_RWRealRepresentationItem aTool;
aTool.ReadStep(data, num, ach, anent);
}
break;
case 824:
{
DeclareAndCast(StepRepr_MechanicalDesignAndDraughtingRelationship, anent, ent);
RWStepRepr_RWMechanicalDesignAndDraughtingRelationship aTool;
aTool.ReadStep(data, num, ach, anent);
}
break;
default: default:
ach->AddFail("Type Mismatch when reading - Entity"); ach->AddFail("Type Mismatch when reading - Entity");
} }
@@ -16317,41 +16257,6 @@ void RWStepAP214_ReadWriteModule::WriteStep(const Standard_Integer CN,
aTool.WriteStep(SW, anEnt); aTool.WriteStep(SW, anEnt);
} }
break; break;
case 820:
{
DeclareAndCast(StepBasic_GeneralPropertyAssociation, anEnt, ent);
RWStepBasic_RWGeneralPropertyAssociation aTool;
aTool.WriteStep(SW, anEnt);
}
break;
case 821:
{
DeclareAndCast(StepBasic_GeneralPropertyRelationship, anEnt, ent);
RWStepBasic_RWGeneralPropertyRelationship aTool;
aTool.WriteStep(SW, anEnt);
}
break;
case 822:
{
DeclareAndCast(StepRepr_BooleanRepresentationItem, anent, ent);
RWStepRepr_RWBooleanRepresentationItem aTool;
aTool.WriteStep(SW, anent);
}
break;
case 823:
{
DeclareAndCast(StepRepr_RealRepresentationItem, anent, ent);
RWStepRepr_RWRealRepresentationItem aTool;
aTool.WriteStep(SW, anent);
}
break;
case 824:
{
DeclareAndCast(StepRepr_MechanicalDesignAndDraughtingRelationship, anent, ent);
RWStepRepr_RWMechanicalDesignAndDraughtingRelationship aTool;
aTool.WriteStep(SW, anent);
}
break;
default: default:
return; return;
} }

View File

@@ -108,10 +108,6 @@ RWStepBasic_RWExternalSource.cxx
RWStepBasic_RWExternalSource.hxx RWStepBasic_RWExternalSource.hxx
RWStepBasic_RWGeneralProperty.cxx RWStepBasic_RWGeneralProperty.cxx
RWStepBasic_RWGeneralProperty.hxx RWStepBasic_RWGeneralProperty.hxx
RWStepBasic_RWGeneralPropertyAssociation.cxx
RWStepBasic_RWGeneralPropertyAssociation.hxx
RWStepBasic_RWGeneralPropertyRelationship.cxx
RWStepBasic_RWGeneralPropertyRelationship.hxx
RWStepBasic_RWGroup.cxx RWStepBasic_RWGroup.cxx
RWStepBasic_RWGroup.hxx RWStepBasic_RWGroup.hxx
RWStepBasic_RWGroupAssignment.cxx RWStepBasic_RWGroupAssignment.cxx

View File

@@ -1,87 +0,0 @@
// Copyright (c) 2024 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Interface_EntityIterator.hxx>
#include <RWStepBasic_RWGeneralPropertyAssociation.hxx>
#include <StepBasic_GeneralProperty.hxx>
#include <StepBasic_GeneralPropertyAssociation.hxx>
#include <StepData_StepReaderData.hxx>
#include <StepData_StepWriter.hxx>
#include <StepRepr_PropertyDefinition.hxx>
//=======================================================================
//function : RWStepBasic_RWGeneralPropertyAssociation
//purpose :
//=======================================================================
RWStepBasic_RWGeneralPropertyAssociation::RWStepBasic_RWGeneralPropertyAssociation()
{
}
//=======================================================================
//function : ReadStep
//purpose :
//=======================================================================
void RWStepBasic_RWGeneralPropertyAssociation::ReadStep(const Handle(StepData_StepReaderData)& theData,
const Standard_Integer theNum,
Handle(Interface_Check)& theAch,
const Handle(StepBasic_GeneralPropertyAssociation)& theEnt) const
{
// Check number of parameters
if (!theData->CheckNbParams(theNum, 4, theAch, "general_property_association")) return;
Handle(TCollection_HAsciiString) aName;
theData->ReadString(theNum, 1, "name", theAch, aName);
Handle(TCollection_HAsciiString) aDescription;
theData->ReadString(theNum, 2, "description", theAch, aDescription);
Handle(StepBasic_GeneralProperty) aGeneralProperty;
theData->ReadEntity(theNum, 3, "base_definition", theAch, STANDARD_TYPE(StepBasic_GeneralProperty), aGeneralProperty);
Handle(StepRepr_PropertyDefinition) aPropertyDefinition;
theData->ReadEntity(theNum, 4, "derived_definition", theAch, STANDARD_TYPE(StepRepr_PropertyDefinition), aPropertyDefinition);
// Initialize entity
theEnt->Init(aName,
aDescription,
aGeneralProperty,
aPropertyDefinition);
}
//=======================================================================
//function : WriteStep
//purpose :
//=======================================================================
void RWStepBasic_RWGeneralPropertyAssociation::WriteStep (StepData_StepWriter& theSW,
const Handle(StepBasic_GeneralPropertyAssociation) &theEnt) const
{
theSW.Send(theEnt->Name());
theSW.Send(theEnt->Description());
theSW.Send(theEnt->GeneralProperty());
theSW.Send(theEnt->PropertyDefinition());
}
//=======================================================================
//function : Share
//purpose :
//=======================================================================
void RWStepBasic_RWGeneralPropertyAssociation::Share(const Handle(StepBasic_GeneralPropertyAssociation)& theEnt,
Interface_EntityIterator& theIter) const
{
theIter.AddItem(theEnt->GeneralProperty());
theIter.AddItem(theEnt->PropertyDefinition());
}

View File

@@ -1,60 +0,0 @@
// Copyright (c) 2024 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _RWStepBasic_RWGeneralPropertyAssociation_HeaderFile
#define _RWStepBasic_RWGeneralPropertyAssociation_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Integer.hxx>
class StepData_StepReaderData;
class Interface_Check;
class StepBasic_GeneralProperty;
class StepData_StepWriter;
class Interface_EntityIterator;
class StepBasic_GeneralPropertyAssociation;
//! Read & Write tool for GeneralPropertyAssociation
class RWStepBasic_RWGeneralPropertyAssociation
{
public:
DEFINE_STANDARD_ALLOC
//! Empty constructor
Standard_EXPORT RWStepBasic_RWGeneralPropertyAssociation();
//! Reads GeneralPropertyAssociation
Standard_EXPORT void ReadStep (const Handle(StepData_StepReaderData)& theData,
const Standard_Integer theNum,
Handle(Interface_Check)& theAch,
const Handle(StepBasic_GeneralPropertyAssociation)& theEnt) const;
//! Writes GeneralPropertyAssociation
Standard_EXPORT void WriteStep (StepData_StepWriter& theSW,
const Handle(StepBasic_GeneralPropertyAssociation)& theEnt) const;
//! Fills data for graph (shared items)
Standard_EXPORT void Share (const Handle(StepBasic_GeneralPropertyAssociation)& theEnt,
Interface_EntityIterator& theIter) const;
protected:
private:
};
#endif // _RWStepBasic_RWGeneralPropertyAssociation_HeaderFile

View File

@@ -1,103 +0,0 @@
// Copyright (c) 2024 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Interface_EntityIterator.hxx>
#include <RWStepBasic_RWGeneralPropertyRelationship.hxx>
#include <StepBasic_GeneralProperty.hxx>
#include <StepBasic_GeneralPropertyRelationship.hxx>
#include <StepData_StepReaderData.hxx>
#include <StepData_StepWriter.hxx>
#include <StepRepr_PropertyDefinition.hxx>
//=======================================================================
//function : RWStepBasic_RWGeneralPropertyRelationship
//purpose :
//=======================================================================
RWStepBasic_RWGeneralPropertyRelationship::RWStepBasic_RWGeneralPropertyRelationship()
{
}
//=======================================================================
//function : ReadStep
//purpose :
//=======================================================================
void RWStepBasic_RWGeneralPropertyRelationship::ReadStep(const Handle(StepData_StepReaderData)& theData,
const Standard_Integer theNum,
Handle(Interface_Check)& theAch,
const Handle(StepBasic_GeneralPropertyRelationship)& theEnt) const
{
// Check number of parameters
if (!theData->CheckNbParams(theNum, 4, theAch, "general_property_association")) return;
Handle(TCollection_HAsciiString) aName;
theData->ReadString(theNum, 1, "name", theAch, aName);
Handle(TCollection_HAsciiString) aDescription;
Standard_Boolean hasDescription = Standard_True;
if (theData->IsParamDefined(theNum, 2))
{
theData->ReadString(theNum, 2, "description", theAch, aDescription);
}
else
{
hasDescription = Standard_False;
}
Handle(StepBasic_GeneralProperty) aRelatingGeneralProperty;
theData->ReadEntity(theNum, 3, "relating_property", theAch, STANDARD_TYPE(StepBasic_GeneralProperty), aRelatingGeneralProperty);
Handle(StepBasic_GeneralProperty) aRelatedGeneralProperty;
theData->ReadEntity(theNum, 4, "related_property", theAch, STANDARD_TYPE(StepBasic_GeneralProperty), aRelatedGeneralProperty);
// Initialize entity
theEnt->Init(aName,
hasDescription,
aDescription,
aRelatingGeneralProperty,
aRelatedGeneralProperty);
}
//=======================================================================
//function : WriteStep
//purpose :
//=======================================================================
void RWStepBasic_RWGeneralPropertyRelationship::WriteStep(StepData_StepWriter& theSW,
const Handle(StepBasic_GeneralPropertyRelationship)& theEnt) const
{
theSW.Send(theEnt->Name());
if (theEnt->HasDescription())
{
theSW.Send(theEnt->Description());
}
else
{
theSW.SendUndef();
}
theSW.Send(theEnt->RelatingGeneralProperty());
theSW.Send(theEnt->RelatedGeneralProperty());
}
//=======================================================================
//function : Share
//purpose :
//=======================================================================
void RWStepBasic_RWGeneralPropertyRelationship::Share(const Handle(StepBasic_GeneralPropertyRelationship)& theEnt,
Interface_EntityIterator& theIter) const
{
theIter.AddItem(theEnt->RelatingGeneralProperty());
theIter.AddItem(theEnt->RelatedGeneralProperty());
}

View File

@@ -1,60 +0,0 @@
// Copyright (c) 2024 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _RWStepBasic_RWGeneralPropertyRelationship_HeaderFile
#define _RWStepBasic_RWGeneralPropertyRelationship_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Integer.hxx>
class StepData_StepReaderData;
class Interface_Check;
class StepBasic_GeneralProperty;
class StepData_StepWriter;
class Interface_EntityIterator;
class StepBasic_GeneralPropertyRelationship;
//! Read & Write tool for GeneralPropertyRelationship
class RWStepBasic_RWGeneralPropertyRelationship
{
public:
DEFINE_STANDARD_ALLOC
//! Empty constructor
Standard_EXPORT RWStepBasic_RWGeneralPropertyRelationship();
//! Reads GeneralPropertyAssociation
Standard_EXPORT void ReadStep (const Handle(StepData_StepReaderData)& theData,
const Standard_Integer theNum,
Handle(Interface_Check)& theAch,
const Handle(StepBasic_GeneralPropertyRelationship)& theEnt) const;
//! Writes GeneralPropertyAssociation
Standard_EXPORT void WriteStep (StepData_StepWriter& theSW,
const Handle(StepBasic_GeneralPropertyRelationship)& theEnt) const;
//! Fills data for graph (shared items)
Standard_EXPORT void Share (const Handle(StepBasic_GeneralPropertyRelationship)& theEnt,
Interface_EntityIterator& theIter) const;
protected:
private:
};
#endif // _RWStepBasic_RWGeneralPropertyRelationship_HeaderFile

View File

@@ -8,8 +8,6 @@ RWStepRepr_RWAssemblyComponentUsageSubstitute.cxx
RWStepRepr_RWAssemblyComponentUsageSubstitute.hxx RWStepRepr_RWAssemblyComponentUsageSubstitute.hxx
RWStepRepr_RWBetweenShapeAspect.cxx RWStepRepr_RWBetweenShapeAspect.cxx
RWStepRepr_RWBetweenShapeAspect.hxx RWStepRepr_RWBetweenShapeAspect.hxx
RWStepRepr_RWBooleanRepresentationItem.cxx
RWStepRepr_RWBooleanRepresentationItem.hxx
RWStepRepr_RWCentreOfSymmetry.cxx RWStepRepr_RWCentreOfSymmetry.cxx
RWStepRepr_RWCentreOfSymmetry.hxx RWStepRepr_RWCentreOfSymmetry.hxx
RWStepRepr_RWCharacterizedRepresentation.cxx RWStepRepr_RWCharacterizedRepresentation.cxx
@@ -72,8 +70,6 @@ RWStepRepr_RWMaterialPropertyRepresentation.cxx
RWStepRepr_RWMaterialPropertyRepresentation.hxx RWStepRepr_RWMaterialPropertyRepresentation.hxx
RWStepRepr_RWMeasureRepresentationItem.cxx RWStepRepr_RWMeasureRepresentationItem.cxx
RWStepRepr_RWMeasureRepresentationItem.hxx RWStepRepr_RWMeasureRepresentationItem.hxx
RWStepRepr_RWMechanicalDesignAndDraughtingRelationship.cxx
RWStepRepr_RWMechanicalDesignAndDraughtingRelationship.hxx
RWStepRepr_RWParallelOffset.cxx RWStepRepr_RWParallelOffset.cxx
RWStepRepr_RWParallelOffset.hxx RWStepRepr_RWParallelOffset.hxx
RWStepRepr_RWParametricRepresentationContext.cxx RWStepRepr_RWParametricRepresentationContext.cxx
@@ -92,8 +88,6 @@ RWStepRepr_RWPropertyDefinitionRepresentation.cxx
RWStepRepr_RWPropertyDefinitionRepresentation.hxx RWStepRepr_RWPropertyDefinitionRepresentation.hxx
RWStepRepr_RWQuantifiedAssemblyComponentUsage.cxx RWStepRepr_RWQuantifiedAssemblyComponentUsage.cxx
RWStepRepr_RWQuantifiedAssemblyComponentUsage.hxx RWStepRepr_RWQuantifiedAssemblyComponentUsage.hxx
RWStepRepr_RWRealRepresentationItem.cxx
RWStepRepr_RWRealRepresentationItem.hxx
RWStepRepr_RWRepresentation.cxx RWStepRepr_RWRepresentation.cxx
RWStepRepr_RWRepresentation.hxx RWStepRepr_RWRepresentation.hxx
RWStepRepr_RWRepresentationContext.cxx RWStepRepr_RWRepresentationContext.cxx

View File

@@ -1,50 +0,0 @@
// Copyright (c) 2024 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <RWStepRepr_RWBooleanRepresentationItem.hxx>
#include <StepData_StepReaderData.hxx>
#include <StepData_StepWriter.hxx>
#include <StepRepr_BooleanRepresentationItem.hxx>
#include <TCollection_HAsciiString.hxx>
RWStepRepr_RWBooleanRepresentationItem::RWStepRepr_RWBooleanRepresentationItem()
{
}
void RWStepRepr_RWBooleanRepresentationItem::ReadStep(const Handle(StepData_StepReaderData)& theData,
const Standard_Integer theNum,
Handle(Interface_Check)& theAch,
const Handle(StepRepr_BooleanRepresentationItem)& theEnt) const
{
// Check number of parameters
if (!theData->CheckNbParams(theNum, 2, theAch, "boolean_representation_item") ) return;
// --- inherited field : name ---
Handle(TCollection_HAsciiString) aName;
theData->ReadString (theNum, 1, "name", theAch, aName);
// --- own field : value ---
Standard_Boolean aValue;
theData->ReadBoolean (theNum, 2, "value", theAch, aValue);
//--- Initialisation of the read entity ---
theEnt->Init(aName, aValue);
}
void RWStepRepr_RWBooleanRepresentationItem::WriteStep(StepData_StepWriter& theSW,
const Handle(StepRepr_BooleanRepresentationItem)& theEnt) const
{
theSW.Send(theEnt->Name());
theSW.Send(theEnt->Value());
}

View File

@@ -1,45 +0,0 @@
// Copyright (c) 2024 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _RWStepRepr_RWBooleanRepresentationItem_HeaderFile
#define _RWStepRepr_RWBooleanRepresentationItem_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Boolean.hxx>
class StepData_StepReaderData;
class Interface_Check;
class StepRepr_BooleanRepresentationItem;
class StepData_StepWriter;
//! Read & Write Module for BooleanRepresentationItem
class RWStepRepr_RWBooleanRepresentationItem
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT RWStepRepr_RWBooleanRepresentationItem();
Standard_EXPORT void ReadStep (const Handle(StepData_StepReaderData)& theData,
const Standard_Integer theNum,
Handle(Interface_Check)& theAch,
const Handle(StepRepr_BooleanRepresentationItem)& theEnt) const;
Standard_EXPORT void WriteStep (StepData_StepWriter& theSW,
const Handle(StepRepr_BooleanRepresentationItem)& theEnt) const;
};
#endif // _RWStepRepr_RWBooleanRepresentationItem_HeaderFile

View File

@@ -1,78 +0,0 @@
// Copyright (c) 2024 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Standard_Type.hxx>
#include <Interface_EntityIterator.hxx>
#include <RWStepRepr_RWMechanicalDesignAndDraughtingRelationship.hxx>
#include <StepData_StepReaderData.hxx>
#include <StepData_StepWriter.hxx>
#include <StepRepr_Representation.hxx>
#include <StepRepr_MechanicalDesignAndDraughtingRelationship.hxx>
RWStepRepr_RWMechanicalDesignAndDraughtingRelationship::
RWStepRepr_RWMechanicalDesignAndDraughtingRelationship() {}
void RWStepRepr_RWMechanicalDesignAndDraughtingRelationship::ReadStep
(const Handle(StepData_StepReaderData)& theData,
const Standard_Integer theNum,
Handle(Interface_Check)& theAch,
const Handle(StepRepr_MechanicalDesignAndDraughtingRelationship)& theEnt) const
{
// Number of Parameter Control
if (!theData->CheckNbParams(theNum, 4, theAch, "mechanical_design_and_draughting_relationship")) return;
// Inherited field : name
Handle(TCollection_HAsciiString) aName;
theData->ReadString (theNum, 1, "name", theAch, aName);
// Inherited field : description
Handle(TCollection_HAsciiString) aDescription;
if (theData->IsParamDefined (theNum, 2)) {
theData->ReadString (theNum, 2, "description", theAch, aDescription);
}
// Inherited field : rep_1
Handle(StepRepr_Representation) aRep1;
theData->ReadEntity(theNum, 3, "rep_1", theAch, STANDARD_TYPE(StepRepr_Representation), aRep1);
// Inherited field : rep_2
Handle(StepRepr_Representation) aRep2;
theData->ReadEntity(theNum, 4, "rep_2", theAch, STANDARD_TYPE(StepRepr_Representation), aRep2);
// Initialisation of the read entity
theEnt->Init(aName, aDescription, aRep1, aRep2);
}
void RWStepRepr_RWMechanicalDesignAndDraughtingRelationship::WriteStep
(StepData_StepWriter& theSW,
const Handle(StepRepr_MechanicalDesignAndDraughtingRelationship)& theEnt) const
{
// Inherited field : name
theSW.Send(theEnt->Name());
// Inherited field : description
theSW.Send(theEnt->Description());
// Inherited field : rep_1
theSW.Send(theEnt->Rep1());
// Inherited field : rep_2
theSW.Send(theEnt->Rep2());
}
void RWStepRepr_RWMechanicalDesignAndDraughtingRelationship::Share
(const Handle(StepRepr_MechanicalDesignAndDraughtingRelationship)& theEnt,
Interface_EntityIterator& theIter) const
{
theIter.GetOneItem(theEnt->Rep1());
theIter.GetOneItem(theEnt->Rep2());
}

View File

@@ -1,50 +0,0 @@
// Copyright (c) 2024 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _RWStepRepr_RWMechanicalDesignAndDraughtingRelationship_HeaderFile
#define _RWStepRepr_RWMechanicalDesignAndDraughtingRelationship_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Integer.hxx>
class StepData_StepReaderData;
class Interface_Check;
class StepRepr_MechanicalDesignAndDraughtingRelationship;
class StepData_StepWriter;
class Interface_EntityIterator;
//! Read & Write Module for MechanicalDesignAndDraughtingRelationship
class RWStepRepr_RWMechanicalDesignAndDraughtingRelationship
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT RWStepRepr_RWMechanicalDesignAndDraughtingRelationship();
Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData,
const Standard_Integer theNum,
Handle(Interface_Check)& theAch,
const Handle(StepRepr_MechanicalDesignAndDraughtingRelationship)& theEnt) const;
Standard_EXPORT void WriteStep(StepData_StepWriter& theSW,
const Handle(StepRepr_MechanicalDesignAndDraughtingRelationship)& theEnt) const;
Standard_EXPORT void Share(const Handle(StepRepr_MechanicalDesignAndDraughtingRelationship)& theEnt,
Interface_EntityIterator& theIter) const;
};
#endif // _RWStepRepr_RWMechanicalDesignAndDraughtingRelationship_HeaderFile

View File

@@ -1,50 +0,0 @@
// Copyright (c) 2024 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <RWStepRepr_RWRealRepresentationItem.hxx>
#include <StepData_StepReaderData.hxx>
#include <StepData_StepWriter.hxx>
#include <StepRepr_RealRepresentationItem.hxx>
#include <TCollection_HAsciiString.hxx>
RWStepRepr_RWRealRepresentationItem::RWStepRepr_RWRealRepresentationItem()
{
}
void RWStepRepr_RWRealRepresentationItem::ReadStep(const Handle(StepData_StepReaderData)& theData,
const Standard_Integer theNum,
Handle(Interface_Check)& theAch,
const Handle(StepRepr_RealRepresentationItem)& theEnt) const
{
// Check number of parameters
if (!theData->CheckNbParams (theNum, 2, theAch, "real_representation_item")) return;
// --- inherited field : name ---
Handle(TCollection_HAsciiString) aName;
theData->ReadString (theNum, 1, "name", theAch, aName);
// --- own field : value ---
Standard_Real aValue;
theData->ReadReal (theNum, 2, "value", theAch, aValue);
//--- Initialisation of the read entity ---
theEnt->Init(aName, aValue);
}
void RWStepRepr_RWRealRepresentationItem::WriteStep(StepData_StepWriter& theSW,
const Handle(StepRepr_RealRepresentationItem)& theEnt) const
{
theSW.Send(theEnt->Name());
theSW.Send(theEnt->Value());
}

View File

@@ -1,46 +0,0 @@
// Copyright (c) 2024 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _RWStepRepr_RWRealRepresentationItem_HeaderFile
#define _RWStepRepr_RWRealRepresentationItem_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Real.hxx>
class StepData_StepReaderData;
class Interface_Check;
class StepRepr_RealRepresentationItem;
class StepData_StepWriter;
//! Read & Write Module for RealRepresentationItem
class RWStepRepr_RWRealRepresentationItem
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT RWStepRepr_RWRealRepresentationItem();
Standard_EXPORT void ReadStep (const Handle(StepData_StepReaderData)& theData,
const Standard_Integer theNum,
Handle(Interface_Check)& theAch,
const Handle(StepRepr_RealRepresentationItem)& theEnt) const;
Standard_EXPORT void WriteStep (StepData_StepWriter& theSW,
const Handle(StepRepr_RealRepresentationItem)& theEnt) const;
};
#endif // _RWStepRepr_RWRealRepresentationItem_HeaderFile

View File

@@ -116,8 +116,6 @@ bool STEPCAFControl_ConfigurationNode::Load(const Handle(DE_ConfigurationContext
theResource->BooleanVal("read.layer", InternalParameters.ReadLayer, aScope); theResource->BooleanVal("read.layer", InternalParameters.ReadLayer, aScope);
InternalParameters.ReadProps = InternalParameters.ReadProps =
theResource->BooleanVal("read.props", InternalParameters.ReadProps, aScope); theResource->BooleanVal("read.props", InternalParameters.ReadProps, aScope);
InternalParameters.ReadMetadata =
theResource->BooleanVal("read.metadata", InternalParameters.ReadMetadata, aScope);
InternalParameters.WritePrecisionMode = (StepData_ConfParameters::WriteMode_PrecisionMode) InternalParameters.WritePrecisionMode = (StepData_ConfParameters::WriteMode_PrecisionMode)
theResource->IntegerVal("write.precision.mode", InternalParameters.WritePrecisionMode, aScope); theResource->IntegerVal("write.precision.mode", InternalParameters.WritePrecisionMode, aScope);
@@ -372,12 +370,6 @@ TCollection_AsciiString STEPCAFControl_ConfigurationNode::Save() const
aResult += aScope + "read.props :\t " + InternalParameters.ReadProps + "\n"; aResult += aScope + "read.props :\t " + InternalParameters.ReadProps + "\n";
aResult += "!\n"; aResult += "!\n";
aResult += "!\n";
aResult += "!Setting up the read.metadata parameter which is used to indicate read Metadata or not\n";
aResult += "!Default value: 1(\"ON\"). Available values: 0(\"OFF\"), 1(\"ON\")\n";
aResult += aScope + "read.metadata :\t " + InternalParameters.ReadMetadata + "\n";
aResult += "!\n";
aResult += "!\n"; aResult += "!\n";
aResult += "!Write Parameters:\n"; aResult += "!Write Parameters:\n";
aResult += "!\n"; aResult += "!\n";

View File

@@ -73,8 +73,6 @@ bool STEPCAFControl_Provider::Read(const TCollection_AsciiString& thePath,
aReader.SetNameMode(aNode->InternalParameters.ReadName); aReader.SetNameMode(aNode->InternalParameters.ReadName);
aReader.SetLayerMode(aNode->InternalParameters.ReadLayer); aReader.SetLayerMode(aNode->InternalParameters.ReadLayer);
aReader.SetPropsMode(aNode->InternalParameters.ReadProps); aReader.SetPropsMode(aNode->InternalParameters.ReadProps);
aReader.SetMetaMode(aNode->InternalParameters.ReadMetadata);
IFSelect_ReturnStatus aReadStat = IFSelect_RetVoid; IFSelect_ReturnStatus aReadStat = IFSelect_RetVoid;
StepData_ConfParameters aParams; StepData_ConfParameters aParams;
aReadStat = aReader.ReadFile(thePath.ToCString(), aParams); aReadStat = aReader.ReadFile(thePath.ToCString(), aParams);

View File

@@ -30,12 +30,9 @@
#include <StepBasic_ConversionBasedUnitAndLengthUnit.hxx> #include <StepBasic_ConversionBasedUnitAndLengthUnit.hxx>
#include <StepBasic_ConversionBasedUnitAndPlaneAngleUnit.hxx> #include <StepBasic_ConversionBasedUnitAndPlaneAngleUnit.hxx>
#include <StepBasic_ConversionBasedUnitAndMassUnit.hxx> #include <StepBasic_ConversionBasedUnitAndMassUnit.hxx>
#include <StepBasic_ConversionBasedUnitAndTimeUnit.hxx>
#include <StepBasic_DerivedUnit.hxx> #include <StepBasic_DerivedUnit.hxx>
#include <StepBasic_DerivedUnitElement.hxx> #include <StepBasic_DerivedUnitElement.hxx>
#include <StepBasic_DocumentFile.hxx> #include <StepBasic_DocumentFile.hxx>
#include <StepBasic_GeneralProperty.hxx>
#include <StepBasic_GeneralPropertyAssociation.hxx>
#include <StepBasic_MeasureValueMember.hxx> #include <StepBasic_MeasureValueMember.hxx>
#include <StepBasic_NamedUnit.hxx> #include <StepBasic_NamedUnit.hxx>
#include <StepBasic_Product.hxx> #include <StepBasic_Product.hxx>
@@ -43,9 +40,6 @@
#include <StepBasic_ProductDefinitionFormation.hxx> #include <StepBasic_ProductDefinitionFormation.hxx>
#include <StepBasic_ProductDefinitionWithAssociatedDocuments.hxx> #include <StepBasic_ProductDefinitionWithAssociatedDocuments.hxx>
#include <StepBasic_SiUnitAndLengthUnit.hxx> #include <StepBasic_SiUnitAndLengthUnit.hxx>
#include <StepBasic_SiUnitAndMassUnit.hxx>
#include <StepBasic_SiUnitAndThermodynamicTemperatureUnit.hxx>
#include <StepBasic_SiUnitAndTimeUnit.hxx>
#include <STEPCAFControl_Controller.hxx> #include <STEPCAFControl_Controller.hxx>
#include <STEPCAFControl_DataMapOfPDExternFile.hxx> #include <STEPCAFControl_DataMapOfPDExternFile.hxx>
#include <STEPCAFControl_DataMapOfShapePD.hxx> #include <STEPCAFControl_DataMapOfShapePD.hxx>
@@ -135,7 +129,6 @@
#include <StepShape_DimensionalLocation.hxx> #include <StepShape_DimensionalLocation.hxx>
#include <StepShape_EdgeCurve.hxx> #include <StepShape_EdgeCurve.hxx>
#include <StepShape_EdgeLoop.hxx> #include <StepShape_EdgeLoop.hxx>
#include <StepShape_GeometricCurveSet.hxx>
#include <StepShape_GeometricSet.hxx> #include <StepShape_GeometricSet.hxx>
#include <StepShape_HArray1OfFace.hxx> #include <StepShape_HArray1OfFace.hxx>
#include <StepShape_HArray1OfFaceBound.hxx> #include <StepShape_HArray1OfFaceBound.hxx>
@@ -221,7 +214,6 @@
#include <XSControl_WorkSession.hxx> #include <XSControl_WorkSession.hxx>
#include <StepAP242_DraughtingModelItemAssociation.hxx> #include <StepAP242_DraughtingModelItemAssociation.hxx>
#include <StepAP242_GeometricItemSpecificUsage.hxx> #include <StepAP242_GeometricItemSpecificUsage.hxx>
#include <StepAP242_IdAttribute.hxx>
#include <StepGeom_CartesianPoint.hxx> #include <StepGeom_CartesianPoint.hxx>
#include <STEPCAFControl_GDTProperty.hxx> #include <STEPCAFControl_GDTProperty.hxx>
#include <StepVisual_TessellatedAnnotationOccurrence.hxx> #include <StepVisual_TessellatedAnnotationOccurrence.hxx>
@@ -233,15 +225,7 @@
#include <StepVisual_OverRidingStyledItem.hxx> #include <StepVisual_OverRidingStyledItem.hxx>
#include <StepVisual_ContextDependentOverRidingStyledItem.hxx> #include <StepVisual_ContextDependentOverRidingStyledItem.hxx>
#include <StepRepr_ShapeRepresentationRelationshipWithTransformation.hxx> #include <StepRepr_ShapeRepresentationRelationshipWithTransformation.hxx>
#include <StepRepr_BooleanRepresentationItem.hxx>
#include <StepRepr_IntegerRepresentationItem.hxx>
#include <StepRepr_ItemDefinedTransformation.hxx> #include <StepRepr_ItemDefinedTransformation.hxx>
#include <StepRepr_PropertyDefinitionRelationship.hxx>
#include <StepRepr_RealRepresentationItem.hxx>
#include <StepRepr_ValueRepresentationItem.hxx>
#include <StepRepr_ShapeAspectRelationship.hxx>
#include <TColgp_HArray1OfXYZ.hxx> #include <TColgp_HArray1OfXYZ.hxx>
#include <BRepBuilderAPI_MakeEdge.hxx> #include <BRepBuilderAPI_MakeEdge.hxx>
@@ -291,7 +275,6 @@ STEPCAFControl_Reader::STEPCAFControl_Reader()
myNameMode(Standard_True), myNameMode(Standard_True),
myLayerMode(Standard_True), myLayerMode(Standard_True),
myPropsMode(Standard_True), myPropsMode(Standard_True),
myMetaMode(Standard_True),
mySHUOMode(Standard_False), mySHUOMode(Standard_False),
myGDTMode(Standard_True), myGDTMode(Standard_True),
myMatMode(Standard_True), myMatMode(Standard_True),
@@ -316,7 +299,6 @@ STEPCAFControl_Reader::STEPCAFControl_Reader(const Handle(XSControl_WorkSession)
myNameMode(Standard_True), myNameMode(Standard_True),
myLayerMode(Standard_True), myLayerMode(Standard_True),
myPropsMode(Standard_True), myPropsMode(Standard_True),
myMetaMode(Standard_True),
mySHUOMode(Standard_False), mySHUOMode(Standard_False),
myGDTMode(Standard_True), myGDTMode(Standard_True),
myMatMode(Standard_True), myMatMode(Standard_True),
@@ -788,10 +770,6 @@ Standard_Boolean STEPCAFControl_Reader::Transfer (STEPControl_Reader &reader,
if (GetViewMode()) if (GetViewMode())
ReadViews(reader.WS(), doc, aLocalFactors); ReadViews(reader.WS(), doc, aLocalFactors);
// read metadata
if (GetMetaMode())
ReadMetadata(reader.WS(), doc, aLocalFactors);
// Expand resulting CAF structure for sub-shapes (optionally with their // Expand resulting CAF structure for sub-shapes (optionally with their
// names) if requested // names) if requested
ExpandSubShapes(STool, ShapePDMap); ExpandSubShapes(STool, ShapePDMap);
@@ -1979,7 +1957,7 @@ Standard_Boolean STEPCAFControl_Reader::ReadSHUOs(const Handle(XSControl_WorkSes
//function : GetMassConversionFactor //function : GetMassConversionFactor
//purpose : //purpose :
//======================================================================= //=======================================================================
static Standard_Boolean GetMassConversionFactor(const Handle(StepBasic_NamedUnit)& NU, static Standard_Boolean GetMassConversionFactor(Handle(StepBasic_NamedUnit)& NU,
Standard_Real& afact) Standard_Real& afact)
{ {
afact = 1.; afact = 1.;
@@ -5265,26 +5243,6 @@ Standard_Boolean STEPCAFControl_Reader::GetPropsMode() const
return myPropsMode; return myPropsMode;
} }
//=======================================================================
//function : SetMetaMode
//purpose :
//=======================================================================
void STEPCAFControl_Reader::SetMetaMode(const Standard_Boolean theMetaMode)
{
myMetaMode = theMetaMode;
}
//=======================================================================
//function : GetMetaMode
//purpose :
//=======================================================================
Standard_Boolean STEPCAFControl_Reader::GetMetaMode() const
{
return myMetaMode;
}
//======================================================================= //=======================================================================
//function : SetSHUOMode //function : SetSHUOMode
//purpose : //purpose :
@@ -5365,427 +5323,3 @@ Standard_Boolean STEPCAFControl_Reader::GetViewMode() const
{ {
return myViewMode; return myViewMode;
} }
//=======================================================================
//function : ReadMetadata
//purpose :
//=======================================================================
Standard_Boolean STEPCAFControl_Reader::ReadMetadata(const Handle(XSControl_WorkSession)& theWS,
const Handle(TDocStd_Document)& theDoc,
const StepData_Factors& theLocalFactors) const
{
const Handle(Interface_InterfaceModel)& aModel = theWS->Model();
const Handle(XSControl_TransferReader)& aTR = theWS->TransferReader();
const Handle(Transfer_TransientProcess)& aTP = aTR->TransientProcess();
Handle(XCAFDoc_ShapeTool) aSTool = XCAFDoc_DocumentTool::ShapeTool(theDoc->Main());
if (aSTool.IsNull())
{
return Standard_False;
}
Standard_Integer aNb = aModel->NbEntities();
STEPConstruct_Tool aTool(theWS);
for (Standard_Integer anEntityInd = 1; anEntityInd <= aNb; ++anEntityInd)
{
Handle(Standard_Transient) anEntity = aModel->Value(anEntityInd);
Handle(StepBasic_GeneralProperty) aGeneralProp = Handle(StepBasic_GeneralProperty)::DownCast(anEntity);
if (aGeneralProp.IsNull())
continue;
Handle(StepBasic_GeneralPropertyAssociation) aPropAssociation;
NCollection_List< Handle(StepRepr_PropertyDefinition)> aPropDefinitionList;
Interface_EntityIterator aSharingListOfGP = theWS->Graph().Sharings(aGeneralProp);
for (aSharingListOfGP.Start(); aSharingListOfGP.More(); aSharingListOfGP.Next())
{
aPropAssociation = Handle(StepBasic_GeneralPropertyAssociation)::DownCast(aSharingListOfGP.Value());
if (aPropAssociation.IsNull())
continue;
aPropDefinitionList.Append(aPropAssociation->PropertyDefinition());
}
if (aPropDefinitionList.IsEmpty())
continue;
NCollection_List< Handle(StepRepr_PropertyDefinition)>::Iterator aPropDefIter(aPropDefinitionList);
for ( ; aPropDefIter.More(); aPropDefIter.Next())
{
Handle(StepRepr_PropertyDefinition) aPropDefinition = aPropDefIter.Value();
// check group of PropertyDefinition
NCollection_List<Handle(StepRepr_PropertyDefinition)> aGroupedProperties;
Interface_EntityIterator aSharingsListOfPD = theWS->Graph().Sharings(aPropDefinition);
for (aSharingsListOfPD.Start(); aSharingsListOfPD.More(); aSharingsListOfPD.Next())
{
Handle(StepRepr_PropertyDefinitionRelationship) aRel =
Handle(StepRepr_PropertyDefinitionRelationship)::DownCast(aSharingsListOfPD.Value());
if (aRel.IsNull())
{
continue;
}
Handle(StepRepr_PropertyDefinition) aGroupedProp = aRel->RelatedPropertyDefinition();
if (!aGroupedProp.IsNull())
{
aGroupedProperties.Append(aGroupedProp);
}
}
NCollection_List<Handle(Transfer_Binder)> aBinders;
Interface_EntityIterator aSharedListOfPD = theWS->Graph().Shareds(aPropDefinition);
for (aSharedListOfPD.Start(); aSharedListOfPD.More(); aSharedListOfPD.Next())
{
Handle(Transfer_Binder) aBinder;
Handle(StepBasic_ProductDefinition) aProductDefinition =
Handle(StepBasic_ProductDefinition)::DownCast(aSharedListOfPD.Value());
if (!aProductDefinition.IsNull())
{
aBinder = aTP->Find(aProductDefinition);
if (!aBinder.IsNull())
{
aBinders.Append(aBinder);
}
continue;
}
Handle(StepRepr_ProductDefinitionShape) aProductDefinitionShape =
Handle(StepRepr_ProductDefinitionShape)::DownCast(aSharedListOfPD.Value());
if (!aProductDefinitionShape.IsNull())
{
Handle(StepBasic_ProductDefinition) aProductDef =
aProductDefinitionShape->Definition().ProductDefinition();
aBinder = aTP->Find(aProductDef);
if (!aBinder.IsNull())
{
aBinders.Append(aBinder);
}
continue;
}
Handle(StepRepr_NextAssemblyUsageOccurrence) aNextAssembUsOcc =
Handle(StepRepr_NextAssemblyUsageOccurrence)::DownCast(aSharedListOfPD.Value());
if (!aNextAssembUsOcc.IsNull())
{
aBinder = aTP->Find(aNextAssembUsOcc);
if (!aBinder.IsNull())
{
aBinders.Append(aBinder);
}
continue;
}
Handle(StepRepr_ShapeAspect) aShapeAspect =
Handle(StepRepr_ShapeAspect)::DownCast(aSharedListOfPD.Value());
if (!aShapeAspect.IsNull())
{
TDF_Label aLabel;
if (!aBinder.IsNull())
{
TopoDS_Shape aShape = TransferBRep::ShapeResult(aTP, aBinder);
if (aShape.IsNull())
continue;
if (myMap.IsBound(aShape))
{
aLabel = myMap.Find(aShape);
}
}
Interface_EntityIterator aSharedListOfSA = theWS->Graph().Sharings(aShapeAspect);
for (aSharedListOfSA.Start(); aSharedListOfSA.More(); aSharedListOfSA.Next())
{
Handle(StepAP242_DraughtingModelItemAssociation) aDMIA =
Handle(StepAP242_DraughtingModelItemAssociation)::DownCast(aSharedListOfSA.Value());
if (!aDMIA.IsNull())
break;
Handle(StepAP242_ItemIdentifiedRepresentationUsage) anItemIdentUsage =
Handle(StepAP242_ItemIdentifiedRepresentationUsage)::DownCast(aSharedListOfSA.Value());
if (!anItemIdentUsage.IsNull())
{
for (Standard_Integer anIndex = 1; anIndex <= anItemIdentUsage->NbIdentifiedItem(); ++anIndex)
{
Handle(StepRepr_RepresentationItem) aReprItem = anItemIdentUsage->IdentifiedItemValue(anIndex);
if (aReprItem.IsNull())
continue;
aBinder = aTP->Find(aReprItem);
if (!aBinder.IsNull())
{
aBinders.Append(aBinder);
}
}
continue;
}
Handle(StepRepr_PropertyDefinition) aPropDef =
Handle(StepRepr_PropertyDefinition)::DownCast(aSharedListOfSA.Value());
if (!aPropDef.IsNull() && aPropDef != aPropDefinition)
{
Interface_EntityIterator aSharingListOfPD = theWS->Graph().Sharings(aPropDef);
for (aSharingListOfPD.Start(); aSharingListOfPD.More(); aSharingListOfPD.Next())
{
Handle(StepShape_ShapeDefinitionRepresentation) aShDef =
Handle(StepShape_ShapeDefinitionRepresentation)::DownCast(aSharingListOfPD.Value());
if (aShDef.IsNull())
continue;
findReprItems(theWS, aShDef, aBinders);
}
continue;
}
Handle(StepShape_ShapeDefinitionRepresentation) aShapeDefRepr =
Handle(StepShape_ShapeDefinitionRepresentation)::DownCast(aSharedListOfSA.Value());
if (!aShapeDefRepr.IsNull())
{
findReprItems(theWS, aShapeDefRepr, aBinders);
}
}
}
}
if (aBinders.IsEmpty())
continue;
TDF_LabelSequence aLabelSeq;
NCollection_List<Handle(Transfer_Binder)>::Iterator aBindIt(aBinders);
for (; aBindIt.More(); aBindIt.Next())
{
TopoDS_Shape aShape = TransferBRep::ShapeResult(aTP, aBindIt.Value());
if (aShape.IsNull())
continue;
TDF_Label aShapeLabel;
if (myMap.IsBound(aShape))
{
aShapeLabel = myMap.Find(aShape);
}
if (!aShapeLabel.IsNull())
{
aLabelSeq.Append(aShapeLabel);
}
}
//create metadata
for (TDF_LabelSequence::Iterator aLabelIt(aLabelSeq); aLabelIt.More(); aLabelIt.Next())
{
TDF_Label aLabel = aLabelIt.Value();
Handle(TDataStd_NamedData) anAttr;
if (!aLabel.FindAttribute(TDataStd_NamedData::GetID(), anAttr))
{
anAttr = new TDataStd_NamedData;
aLabel.AddAttribute(anAttr);
}
fillAttributes(theWS, aPropDefinition, theLocalFactors, anAttr);
if (!aGroupedProperties.IsEmpty())
{
NCollection_List<Handle(StepRepr_PropertyDefinition)>::Iterator aPropIt(aGroupedProperties);
for ( ; aPropIt.More(); aPropIt.Next())
{
fillAttributes(theWS, aPropIt.Value(), theLocalFactors, anAttr);
}
}
}
}
}
return Standard_True;
}
//=======================================================================
//function : findReprItems
//purpose :
//=======================================================================
Standard_Boolean STEPCAFControl_Reader::findReprItems(const Handle(XSControl_WorkSession)& theWS,
const Handle(StepShape_ShapeDefinitionRepresentation)& theShDefRepr,
NCollection_List<Handle(Transfer_Binder)>& theBinders) const
{
Handle(StepRepr_Representation) aRepr = theShDefRepr->UsedRepresentation();
if (aRepr.IsNull())
{
return Standard_False;
}
Handle(Transfer_Binder) aBinder;
const Handle(Transfer_TransientProcess)& aTP = theWS->TransferReader()->TransientProcess();
Handle(StepRepr_HArray1OfRepresentationItem) aReprItems = aRepr->Items();
if (!aReprItems->IsEmpty())
{
for (Standard_Integer anInd = aReprItems->Lower(); anInd <= aReprItems->Upper(); anInd++)
{
Handle(StepRepr_RepresentationItem) aReprItem = aReprItems->Value(anInd);
aBinder = aTP->Find(aReprItem);
if (!aBinder.IsNull())
{
theBinders.Append(aBinder);
}
}
}
return Standard_True;
}
//=======================================================================
//function : fillAttributes
//purpose :
//=======================================================================
Standard_Boolean STEPCAFControl_Reader::fillAttributes(const Handle(XSControl_WorkSession)& theWS,
const Handle(StepRepr_PropertyDefinition)& thePropDef,
const StepData_Factors& theLocalFactors,
Handle(TDataStd_NamedData)& theAttr) const
{
// skip if key is null
if (thePropDef->Name().IsNull())
{
return Standard_False;
}
Handle(StepRepr_PropertyDefinitionRepresentation) aPropDefRepr;
Interface_EntityIterator aSharingListOfPD = theWS->Graph().Sharings(thePropDef);
for (aSharingListOfPD.Start(); aSharingListOfPD.More(); aSharingListOfPD.Next())
{
aPropDefRepr = Handle(StepRepr_PropertyDefinitionRepresentation)::DownCast(aSharingListOfPD.Value());
if (aPropDefRepr.IsNull())
continue;
Handle(StepRepr_Representation) aUsedRepr = aPropDefRepr->UsedRepresentation();
if (aUsedRepr.IsNull())
continue;
Handle(StepRepr_HArray1OfRepresentationItem) aReprItems = aUsedRepr->Items();
if (!aReprItems.IsNull())
{
for (Standard_Integer anIndex = aReprItems->Lower(); anIndex <= aReprItems->Upper(); anIndex++)
{
Handle(StepRepr_RepresentationItem) anItem = aReprItems->Value(anIndex);
if (anItem.IsNull())
continue;
if (anItem->IsKind(STANDARD_TYPE(StepRepr_DescriptiveRepresentationItem)))
{
Handle(StepRepr_DescriptiveRepresentationItem) aDescrItem = Handle(StepRepr_DescriptiveRepresentationItem)::DownCast(anItem);
Handle(TCollection_HAsciiString) aDescription = aDescrItem->Description();
theAttr->SetString(thePropDef->Name()->ToCString(), aDescription->ToCString());
}
else if (anItem->IsKind(STANDARD_TYPE(StepRepr_MeasureRepresentationItem)))
{
Handle(StepRepr_MeasureRepresentationItem) aMeasureItem = Handle(StepRepr_MeasureRepresentationItem)::DownCast(anItem);
Standard_Real aValue = aMeasureItem->Measure()->ValueComponent();
TCollection_AsciiString aValType = aMeasureItem->Measure()->ValueComponentMember()->Name();
StepBasic_Unit anUnit = aMeasureItem->Measure()->UnitComponent();
if (!anUnit.IsNull())
{
Standard_Real aParam = 1.;
if (anUnit.Type() == STANDARD_TYPE(StepBasic_DerivedUnit))
{
Handle(StepBasic_DerivedUnit) aDUnit = anUnit.DerivedUnit();
for (Standard_Integer anInd = 1; anInd <= aDUnit->NbElements(); ++anInd)
{
Handle(StepBasic_DerivedUnitElement) aDUElem = aDUnit->ElementsValue(anInd);
Standard_Real anExp = aDUElem->Exponent();
Handle(StepBasic_NamedUnit) aNUnit = aDUElem->Unit();
if (!aNUnit.IsNull())
{
if (aNUnit->IsKind(STANDARD_TYPE(StepBasic_ConversionBasedUnitAndLengthUnit)) ||
aNUnit->IsKind(STANDARD_TYPE(StepBasic_SiUnitAndLengthUnit)))
{
STEPConstruct_UnitContext anUnitCtx;
anUnitCtx.ComputeFactors(aNUnit, theLocalFactors);
if (aValType == "VOLUME_MEASURE")
{
aParam = pow(theLocalFactors.LengthFactor(), anExp);
}
else
{
aParam = aParam / pow(theLocalFactors.LengthFactor(), anExp);
}
}
else if (aNUnit->IsKind(STANDARD_TYPE(StepBasic_ConversionBasedUnitAndMassUnit))) {
Standard_Real aFact = 1.;
if (GetMassConversionFactor(aNUnit, aFact))
{
aParam = aParam * aFact;
}
}
else
{
STEPConstruct_UnitContext anUnitCtx;
anUnitCtx.ComputeFactors(aNUnit, theLocalFactors);
if (anUnitCtx.AreaDone())
aParam = anUnitCtx.AreaFactor();
if (anUnitCtx.LengthDone())
{
Standard_Real aLengthFactor = anUnitCtx.LengthFactor();
aParam *= pow(aLengthFactor, anExp);
}
}
}
}
aValue = aValue * aParam;
}
else
{
Handle(StepBasic_NamedUnit) aNUnit = anUnit.NamedUnit();
if (!aNUnit.IsNull())
{
if (aNUnit->IsKind(STANDARD_TYPE(StepBasic_ConversionBasedUnitAndMassUnit)))
{
Standard_Real aFact = 1.;
if (GetMassConversionFactor(aNUnit, aFact))
{
aValue *= aFact;
}
}
else
{
STEPConstruct_UnitContext anUnitCtx;
anUnitCtx.ComputeFactors(aNUnit, theLocalFactors);
if (anUnitCtx.AreaDone())
aParam = anUnitCtx.AreaFactor();
if (anUnitCtx.VolumeDone())
aParam = anUnitCtx.VolumeFactor();
if (anUnitCtx.LengthDone())
aParam = anUnitCtx.LengthFactor();
aValue *= aParam;
}
}
}
}
theAttr->SetReal(thePropDef->Name()->ToCString(), aValue);
}
else if (anItem->IsKind(STANDARD_TYPE(StepRepr_ValueRepresentationItem)))
{
Handle(StepRepr_ValueRepresentationItem) aValueItem = Handle(StepRepr_ValueRepresentationItem)::DownCast(anItem);
Handle(StepBasic_MeasureValueMember) aMeasureValueMem = aValueItem->ValueComponentMember();
Interface_ParamType aParamType = aMeasureValueMem->ParamType();
if (aParamType == Interface_ParamInteger)
{
theAttr->SetInteger(thePropDef->Name()->ToCString(), aMeasureValueMem->Integer());
}
else if (aParamType == Interface_ParamReal)
{
theAttr->SetReal(thePropDef->Name()->ToCString(), aMeasureValueMem->Real());
}
}
else if (anItem->IsKind(STANDARD_TYPE(StepRepr_IntegerRepresentationItem)))
{
Handle(StepRepr_IntegerRepresentationItem) anIntegerItem = Handle(StepRepr_IntegerRepresentationItem)::DownCast(anItem);
theAttr->SetInteger(thePropDef->Name()->ToCString(), anIntegerItem->Value());
}
else if (anItem->IsKind(STANDARD_TYPE(StepRepr_RealRepresentationItem)))
{
Handle(StepRepr_RealRepresentationItem) aRealItem = Handle(StepRepr_RealRepresentationItem)::DownCast(anItem);
theAttr->SetReal(thePropDef->Name()->ToCString(), aRealItem->Value());
}
else if (anItem->IsKind(STANDARD_TYPE(StepRepr_BooleanRepresentationItem)))
{
Handle(StepRepr_BooleanRepresentationItem) aBoolItem = Handle(StepRepr_BooleanRepresentationItem)::DownCast(anItem);
theAttr->SetInteger(thePropDef->Name()->ToCString(), aBoolItem->Value());
}
}
}
}
return Standard_True;
}

View File

@@ -17,7 +17,6 @@
#define _STEPCAFControl_Reader_HeaderFile #define _STEPCAFControl_Reader_HeaderFile
#include <STEPControl_Reader.hxx> #include <STEPControl_Reader.hxx>
#include <StepData_Factors.hxx>
#include <IFSelect_ReturnStatus.hxx> #include <IFSelect_ReturnStatus.hxx>
#include <TDF_LabelSequence.hxx> #include <TDF_LabelSequence.hxx>
#include <TopTools_MapOfShape.hxx> #include <TopTools_MapOfShape.hxx>
@@ -29,21 +28,18 @@
#include <XCAFDimTolObjects_DatumModifWithValue.hxx> #include <XCAFDimTolObjects_DatumModifWithValue.hxx>
class XSControl_WorkSession; class XSControl_WorkSession;
class TDataStd_NamedData;
class TDocStd_Document; class TDocStd_Document;
class STEPCAFControl_ExternFile; class STEPCAFControl_ExternFile;
class TopoDS_Shape; class TopoDS_Shape;
class XCAFDoc_ShapeTool; class XCAFDoc_ShapeTool;
class StepRepr_RepresentationItem; class StepRepr_RepresentationItem;
class Transfer_TransientProcess; class Transfer_TransientProcess;
class StepBasic_NamedUnit;
class StepShape_ConnectedFaceSet; class StepShape_ConnectedFaceSet;
class StepShape_ShapeDefinitionRepresentation;
class StepRepr_NextAssemblyUsageOccurrence; class StepRepr_NextAssemblyUsageOccurrence;
class StepRepr_PropertyDefinition;
class STEPConstruct_Tool; class STEPConstruct_Tool;
class StepDimTol_Datum; class StepDimTol_Datum;
class Transfer_Binder; class StepData_Factors;
//! Provides a tool to read STEP file and put it into //! Provides a tool to read STEP file and put it into
//! DECAF document. Besides transfer of shapes (including //! DECAF document. Besides transfer of shapes (including
@@ -180,11 +176,6 @@ public:
Standard_EXPORT void SetPropsMode (const Standard_Boolean propsmode); Standard_EXPORT void SetPropsMode (const Standard_Boolean propsmode);
Standard_EXPORT Standard_Boolean GetPropsMode() const; Standard_EXPORT Standard_Boolean GetPropsMode() const;
//! MetaMode for indicate read Metadata or not.
Standard_EXPORT void SetMetaMode(const Standard_Boolean theMetaMode);
Standard_EXPORT Standard_Boolean GetMetaMode() const;
//! Set SHUO mode for indicate write SHUO or not. //! Set SHUO mode for indicate write SHUO or not.
Standard_EXPORT void SetSHUOMode (const Standard_Boolean shuomode); Standard_EXPORT void SetSHUOMode (const Standard_Boolean shuomode);
@@ -243,7 +234,7 @@ protected:
Standard_EXPORT Standard_Boolean ReadColors Standard_EXPORT Standard_Boolean ReadColors
(const Handle(XSControl_WorkSession)& WS, (const Handle(XSControl_WorkSession)& WS,
const Handle(TDocStd_Document)& doc, const Handle(TDocStd_Document)& doc,
const StepData_Factors& theLocalFactors = StepData_Factors()) const; const StepData_Factors& theLocalFactors) const;
//! Reads names of parts defined in the STEP model and //! Reads names of parts defined in the STEP model and
//! assigns them to corresponding labels in the DECAF document //! assigns them to corresponding labels in the DECAF document
@@ -255,13 +246,7 @@ protected:
Standard_EXPORT Standard_Boolean ReadValProps (const Handle(XSControl_WorkSession)& WS, Standard_EXPORT Standard_Boolean ReadValProps (const Handle(XSControl_WorkSession)& WS,
const Handle(TDocStd_Document)& doc, const Handle(TDocStd_Document)& doc,
const STEPCAFControl_DataMapOfPDExternFile& PDFileMap, const STEPCAFControl_DataMapOfPDExternFile& PDFileMap,
const StepData_Factors& theLocalFactors = StepData_Factors()) const; const StepData_Factors& theLocalFactors) const;
//! Reads metadata assigned to shapes in the STEP model and
//! assigns them to corresponding labels in the DECAF document
Standard_EXPORT Standard_Boolean ReadMetadata(const Handle(XSControl_WorkSession)& theWS,
const Handle(TDocStd_Document)& theDoc,
const StepData_Factors& theLocalFactors = StepData_Factors()) const;
//! Reads layers of parts defined in the STEP model and //! Reads layers of parts defined in the STEP model and
//! set reference between shape and layers in the DECAF document //! set reference between shape and layers in the DECAF document
@@ -275,19 +260,19 @@ protected:
//! set reference between shape instances from different assemblyes //! set reference between shape instances from different assemblyes
Standard_EXPORT Standard_Boolean ReadGDTs (const Handle(XSControl_WorkSession)& WS, Standard_EXPORT Standard_Boolean ReadGDTs (const Handle(XSControl_WorkSession)& WS,
const Handle(TDocStd_Document)& doc, const Handle(TDocStd_Document)& doc,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
//! Reads materials for instances defined in the STEP model and //! Reads materials for instances defined in the STEP model and
//! set reference between shape instances from different assemblyes //! set reference between shape instances from different assemblyes
Standard_EXPORT Standard_Boolean ReadMaterials (const Handle(XSControl_WorkSession)& WS, Standard_EXPORT Standard_Boolean ReadMaterials (const Handle(XSControl_WorkSession)& WS,
const Handle(TDocStd_Document)& doc, const Handle(TDocStd_Document)& doc,
const Handle(TColStd_HSequenceOfTransient)& SeqPDS, const Handle(TColStd_HSequenceOfTransient)& SeqPDS,
const StepData_Factors& theLocalFactors = StepData_Factors()) const; const StepData_Factors& theLocalFactors) const;
//! Reads Views for instances defined in the STEP model //! Reads Views for instances defined in the STEP model
Standard_EXPORT Standard_Boolean ReadViews(const Handle(XSControl_WorkSession)& theWS, Standard_EXPORT Standard_Boolean ReadViews(const Handle(XSControl_WorkSession)& theWS,
const Handle(TDocStd_Document)& theDoc, const Handle(TDocStd_Document)& theDoc,
const StepData_Factors& theLocalFactors = StepData_Factors()) const; const StepData_Factors& theLocalFactors) const;
//! Populates the sub-Label of the passed TDF Label with shape //! Populates the sub-Label of the passed TDF Label with shape
//! data associated with the given STEP Representation Item, //! data associated with the given STEP Representation Item,
@@ -329,37 +314,26 @@ private:
const Standard_Real theModifValue, const Standard_Real theModifValue,
const Handle(TDocStd_Document)& theDoc, const Handle(TDocStd_Document)& theDoc,
const Handle(XSControl_WorkSession)& theWS, const Handle(XSControl_WorkSession)& theWS,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
//! Internal method. Read Datums, connected to GeomTolerance theGDTL. //! Internal method. Read Datums, connected to GeomTolerance theGDTL.
Standard_Boolean readDatumsAP242(const Handle(Standard_Transient)& theEnt, Standard_Boolean readDatumsAP242(const Handle(Standard_Transient)& theEnt,
const TDF_Label theGDTL, const TDF_Label theGDTL,
const Handle(TDocStd_Document)& theDoc, const Handle(TDocStd_Document)& theDoc,
const Handle(XSControl_WorkSession)& theWS, const Handle(XSControl_WorkSession)& theWS,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
//! Internal method. Read Dimension or GeomTolerance. //! Internal method. Read Dimension or GeomTolerance.
TDF_Label createGDTObjectInXCAF(const Handle(Standard_Transient)& theEnt, TDF_Label createGDTObjectInXCAF(const Handle(Standard_Transient)& theEnt,
const Handle(TDocStd_Document)& theDoc, const Handle(TDocStd_Document)& theDoc,
const Handle(XSControl_WorkSession)& theWS, const Handle(XSControl_WorkSession)& theWS,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
//! Prepares units for transfer //! Prepares units for transfer
void prepareUnits(const Handle(StepData_StepModel)& theModel, void prepareUnits(const Handle(StepData_StepModel)& theModel,
const Handle(TDocStd_Document)& theDoc, const Handle(TDocStd_Document)& theDoc,
StepData_Factors& theLocalFactors) const; StepData_Factors& theLocalFactors) const;
//! Find RepresentationItems
Standard_Boolean findReprItems(const Handle(XSControl_WorkSession) & theWS,
const Handle(StepShape_ShapeDefinitionRepresentation) & theShDefRepr,
NCollection_List<Handle(Transfer_Binder)>& theBinders) const;
//! Fill metadata
Standard_Boolean fillAttributes(const Handle(XSControl_WorkSession)& theWS,
const Handle(StepRepr_PropertyDefinition)& thePropDef,
const StepData_Factors& theLocalFactors,
Handle(TDataStd_NamedData)& theAttr) const;
private: private:
STEPControl_Reader myReader; STEPControl_Reader myReader;
@@ -369,7 +343,6 @@ private:
Standard_Boolean myNameMode; Standard_Boolean myNameMode;
Standard_Boolean myLayerMode; Standard_Boolean myLayerMode;
Standard_Boolean myPropsMode; Standard_Boolean myPropsMode;
Standard_Boolean myMetaMode;
Standard_Boolean mySHUOMode; Standard_Boolean mySHUOMode;
Standard_Boolean myGDTMode; Standard_Boolean myGDTMode;
Standard_Boolean myMatMode; Standard_Boolean myMatMode;

View File

@@ -25,7 +25,6 @@
#include <STEPControl_Writer.hxx> #include <STEPControl_Writer.hxx>
#include <StepAP242_GeometricItemSpecificUsage.hxx> #include <StepAP242_GeometricItemSpecificUsage.hxx>
#include <StepData_ConfParameters.hxx> #include <StepData_ConfParameters.hxx>
#include <StepData_Factors.hxx>
#include <StepDimTol_Datum.hxx> #include <StepDimTol_Datum.hxx>
#include <StepDimTol_GeometricTolerance.hxx> #include <StepDimTol_GeometricTolerance.hxx>
#include <StepDimTol_HArray1OfDatumSystemOrReference.hxx> #include <StepDimTol_HArray1OfDatumSystemOrReference.hxx>
@@ -40,6 +39,7 @@ class XSControl_WorkSession;
class TDocStd_Document; class TDocStd_Document;
class STEPCAFControl_ExternFile; class STEPCAFControl_ExternFile;
class TopoDS_Shape; class TopoDS_Shape;
class StepData_Factors;
//! Provides a tool to write DECAF document to the //! Provides a tool to write DECAF document to the
//! STEP file. Besides transfer of shapes (including //! STEP file. Besides transfer of shapes (including
@@ -233,7 +233,7 @@ protected:
TopoDS_Shape transferExternFiles(const TDF_Label& theLabel, TopoDS_Shape transferExternFiles(const TDF_Label& theLabel,
const STEPControl_StepModelType theMode, const STEPControl_StepModelType theMode,
TDF_LabelSequence& theLabelSeq, TDF_LabelSequence& theLabelSeq,
const StepData_Factors& theLocalFactors = StepData_Factors(), const StepData_Factors& theLocalFactors,
const Standard_CString thePrefix = "", const Standard_CString thePrefix = "",
const Message_ProgressRange& theProgress = Message_ProgressRange()); const Message_ProgressRange& theProgress = Message_ProgressRange());
@@ -256,7 +256,7 @@ protected:
//! Write D&GTs assigned to specified labels, to STEP model, according AP242 //! Write D&GTs assigned to specified labels, to STEP model, according AP242
Standard_Boolean writeDGTsAP242(const Handle(XSControl_WorkSession)& theWS, Standard_Boolean writeDGTsAP242(const Handle(XSControl_WorkSession)& theWS,
const TDF_LabelSequence& theLabels, const TDF_LabelSequence& theLabels,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
//! Write materials assigned to specified labels, to STEP model //! Write materials assigned to specified labels, to STEP model
Standard_Boolean writeMaterials(const Handle(XSControl_WorkSession)& theWS, Standard_Boolean writeMaterials(const Handle(XSControl_WorkSession)& theWS,
@@ -297,14 +297,14 @@ protected:
const gp_Ax2& theAnnotationPlane, const gp_Ax2& theAnnotationPlane,
const gp_Pnt& theTextPosition, const gp_Pnt& theTextPosition,
const Handle(Standard_Transient)& theDimension, const Handle(Standard_Transient)& theDimension,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
Handle(StepDimTol_Datum) writeDatumAP242(const Handle(XSControl_WorkSession)& theWS, Handle(StepDimTol_Datum) writeDatumAP242(const Handle(XSControl_WorkSession)& theWS,
const TDF_LabelSequence& theShapeL, const TDF_LabelSequence& theShapeL,
const TDF_Label& theDatumL, const TDF_Label& theDatumL,
const Standard_Boolean isFirstDTarget, const Standard_Boolean isFirstDTarget,
const Handle(StepDimTol_Datum)& theWrittenDatum, const Handle(StepDimTol_Datum)& theWrittenDatum,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
void writeToleranceZone(const Handle(XSControl_WorkSession)& theWS, void writeToleranceZone(const Handle(XSControl_WorkSession)& theWS,
const Handle(XCAFDimTolObjects_GeomToleranceObject)& theObject, const Handle(XCAFDimTolObjects_GeomToleranceObject)& theObject,
@@ -316,7 +316,7 @@ protected:
const TDF_Label& theGeomTolL, const TDF_Label& theGeomTolL,
const Handle(StepDimTol_HArray1OfDatumSystemOrReference)& theDatumSystem, const Handle(StepDimTol_HArray1OfDatumSystemOrReference)& theDatumSystem,
const Handle(StepRepr_RepresentationContext)& theRC, const Handle(StepRepr_RepresentationContext)& theRC,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
private: private:

View File

@@ -23,8 +23,8 @@
#include <Standard_Integer.hxx> #include <Standard_Integer.hxx>
#include <Standard_CString.hxx> #include <Standard_CString.hxx>
#include <StepData_Factors.hxx>
#include <StepBasic_SiPrefix.hxx> #include <StepBasic_SiPrefix.hxx>
class StepData_Factors;
class StepData_StepModel; class StepData_StepModel;
class StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx; class StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx;
class StepRepr_GlobalUnitAssignedContext; class StepRepr_GlobalUnitAssignedContext;
@@ -49,7 +49,7 @@ public:
//! uncertainty equal to Tol3d) //! uncertainty equal to Tol3d)
Standard_EXPORT void Init (const Standard_Real Tol3d, Standard_EXPORT void Init (const Standard_Real Tol3d,
const Handle(StepData_StepModel)& theModel, const Handle(StepData_StepModel)& theModel,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
//! Returns True if Init was called successfully //! Returns True if Init was called successfully
Standard_EXPORT Standard_Boolean IsDone() const; Standard_EXPORT Standard_Boolean IsDone() const;
@@ -60,10 +60,10 @@ public:
//! Computes the length, plane angle and solid angle conversion //! Computes the length, plane angle and solid angle conversion
//! factor . Returns a status, 0 if OK //! factor . Returns a status, 0 if OK
Standard_EXPORT Standard_Integer ComputeFactors (const Handle(StepRepr_GlobalUnitAssignedContext)& aContext, Standard_EXPORT Standard_Integer ComputeFactors (const Handle(StepRepr_GlobalUnitAssignedContext)& aContext,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
Standard_EXPORT Standard_Integer ComputeFactors (const Handle(StepBasic_NamedUnit)& aUnit, Standard_EXPORT Standard_Integer ComputeFactors (const Handle(StepBasic_NamedUnit)& aUnit,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
//! Computes the uncertainty value (for length) //! Computes the uncertainty value (for length)
Standard_EXPORT Standard_Integer ComputeTolerance (const Handle(StepRepr_GlobalUncertaintyAssignedContext)& aContext); Standard_EXPORT Standard_Integer ComputeTolerance (const Handle(StepRepr_GlobalUncertaintyAssignedContext)& aContext);

View File

@@ -26,6 +26,7 @@
#include <Standard_CString.hxx> #include <Standard_CString.hxx>
#include <TColStd_SequenceOfTransient.hxx> #include <TColStd_SequenceOfTransient.hxx>
class StepBasic_ProductDefinition; class StepBasic_ProductDefinition;
class StepData_Factors;
class XSControl_WorkSession; class XSControl_WorkSession;
class TopoDS_Shape; class TopoDS_Shape;
class StepRepr_RepresentationItem; class StepRepr_RepresentationItem;
@@ -114,13 +115,13 @@ public:
Standard_EXPORT Standard_Boolean GetPropReal (const Handle(StepRepr_RepresentationItem)& item, Standard_EXPORT Standard_Boolean GetPropReal (const Handle(StepRepr_RepresentationItem)& item,
Standard_Real& Val, Standard_Real& Val,
Standard_Boolean& isArea, Standard_Boolean& isArea,
const StepData_Factors& theLocalFactors = StepData_Factors()) const; const StepData_Factors& theLocalFactors) const;
//! Returns value of Centriod property (or False if it is not) //! Returns value of Centriod property (or False if it is not)
Standard_EXPORT Standard_Boolean GetPropPnt (const Handle(StepRepr_RepresentationItem)& item, Standard_EXPORT Standard_Boolean GetPropPnt (const Handle(StepRepr_RepresentationItem)& item,
const Handle(StepRepr_RepresentationContext)& Context, const Handle(StepRepr_RepresentationContext)& Context,
gp_Pnt& Pnt, gp_Pnt& Pnt,
const StepData_Factors& theLocalFactors = StepData_Factors()) const; const StepData_Factors& theLocalFactors) const;
//! Sets current assembly shape SDR (for FindCDSR calls) //! Sets current assembly shape SDR (for FindCDSR calls)
Standard_EXPORT void SetAssemblyShape (const TopoDS_Shape& shape); Standard_EXPORT void SetAssemblyShape (const TopoDS_Shape& shape);

View File

@@ -122,7 +122,6 @@
#include <XSAlgo_AlgoContainer.hxx> #include <XSAlgo_AlgoContainer.hxx>
#include <StepRepr_ConstructiveGeometryRepresentationRelationship.hxx> #include <StepRepr_ConstructiveGeometryRepresentationRelationship.hxx>
#include <StepRepr_ConstructiveGeometryRepresentation.hxx> #include <StepRepr_ConstructiveGeometryRepresentation.hxx>
#include <StepRepr_MechanicalDesignAndDraughtingRelationship.hxx>
#include <Geom_Plane.hxx> #include <Geom_Plane.hxx>
IMPLEMENT_STANDARD_RTTIEXT(STEPControl_ActorRead,Transfer_ActorOfTransientProcess) IMPLEMENT_STANDARD_RTTIEXT(STEPControl_ActorRead,Transfer_ActorOfTransientProcess)
@@ -1225,72 +1224,6 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity(
} }
//=======================================================================
//function : TransferEntity
//purpose :
//=======================================================================
Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity(
const Handle(StepRepr_MechanicalDesignAndDraughtingRelationship)& theMDADR,
const Handle(Transfer_TransientProcess)& theTP,
const StepData_Factors& theLocalFactors,
const Message_ProgressRange& theProgress)
{
Handle(TransferBRep_ShapeBinder) aShBinder;
if (theMDADR.IsNull())
return aShBinder;
Standard_Boolean aResetUnits = Standard_False;
Handle(StepRepr_Representation) anOldSRContext = mySRContext;
StepData_Factors aLocalFactors = theLocalFactors;
TopoDS_Compound aComp;
BRep_Builder aBuilder;
aBuilder.MakeCompound(aComp);
Message_ProgressScope aPS(theProgress, NULL, 2);
for (Standard_Integer anIndex = 1; anIndex <= 2; anIndex++)
{
Message_ProgressRange aRange = aPS.Next();
Handle(StepRepr_Representation) aRepr = (anIndex == 1) ? theMDADR->Rep1() : theMDADR->Rep2();
if (aRepr.IsNull())
continue;
if (mySRContext.IsNull() || aRepr->ContextOfItems() != mySRContext->ContextOfItems())
{
PrepareUnits(aRepr, theTP, aLocalFactors);
aResetUnits = Standard_True;
}
Handle(Transfer_Binder) aBinder;
if (aRepr->IsKind(STANDARD_TYPE(StepShape_ShapeRepresentation)))
{
Handle(StepShape_ShapeRepresentation) aShapeRepr = Handle(StepShape_ShapeRepresentation)::DownCast(aRepr);
Standard_Boolean isBound = Standard_False;
if (!theTP->IsBound(aShapeRepr))
{
aBinder = TransferEntity(aShapeRepr, theTP, theLocalFactors, isBound, false, aRange);
}
else
{
aBinder = theTP->Find(aShapeRepr);
}
}
TopoDS_Shape aResult = TransferBRep::ShapeResult(aBinder);
if (!aResult.IsNull())
{
aBuilder.Add(aComp, aResult);
}
}
aShBinder = new TransferBRep_ShapeBinder(aComp);
mySRContext = anOldSRContext;
if (anOldSRContext.IsNull() || aResetUnits)
{
PrepareUnits(anOldSRContext, theTP, aLocalFactors);
}
theTP->Bind(theMDADR, aShBinder);
return aShBinder;
}
//======================================================================= //=======================================================================
//function : IsNeedRepresentation //function : IsNeedRepresentation
//purpose : //purpose :
@@ -1536,7 +1469,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity
} }
else if (start->IsKind(STANDARD_TYPE(StepVisual_TessellatedSurfaceSet))) else if (start->IsKind(STANDARD_TYPE(StepVisual_TessellatedSurfaceSet)))
{ {
myShapeBuilder.Init(GetCasted(StepVisual_TessellatedSurfaceSet, start), TP, aHasGeom, aLocalFactors); myShapeBuilder.Init(GetCasted(StepVisual_TessellatedSurfaceSet, start), TP, aLocalFactors, aHasGeom);
found = Standard_True; found = Standard_True;
} }
} }
@@ -2189,12 +2122,6 @@ TopoDS_Shape STEPControl_ActorRead::TransferRelatedSRR(const Handle(Transfer_Tra
Standard_Integer aNbRep = (theRep == aSRR->Rep1() ? 2 : 1); Standard_Integer aNbRep = (theRep == aSRR->Rep1() ? 2 : 1);
aBinder = TransferEntity(aSRR, theTP, theLocalFactors, aNbRep, theUseTrsf, thePS.Next()); aBinder = TransferEntity(aSRR, theTP, theLocalFactors, aNbRep, theUseTrsf, thePS.Next());
} }
else if (anItem->DynamicType() == STANDARD_TYPE(StepRepr_MechanicalDesignAndDraughtingRelationship))
{
Handle(StepRepr_MechanicalDesignAndDraughtingRelationship) aMDADR =
Handle(StepRepr_MechanicalDesignAndDraughtingRelationship)::DownCast(anItem);
aBinder = TransferEntity(aMDADR, theTP, theLocalFactors, thePS.Next());
}
else if (theReadConstructiveGeomRR && else if (theReadConstructiveGeomRR &&
anItem->DynamicType() == STANDARD_TYPE(StepRepr_ConstructiveGeometryRepresentationRelationship)) anItem->DynamicType() == STANDARD_TYPE(StepRepr_ConstructiveGeometryRepresentationRelationship))
{ {

View File

@@ -20,7 +20,6 @@
#include <Standard.hxx> #include <Standard.hxx>
#include <Standard_Type.hxx> #include <Standard_Type.hxx>
#include <StepData_Factors.hxx>
#include <StepToTopoDS_NMTool.hxx> #include <StepToTopoDS_NMTool.hxx>
#include <Transfer_ActorOfTransientProcess.hxx> #include <Transfer_ActorOfTransientProcess.hxx>
#include <Standard_Integer.hxx> #include <Standard_Integer.hxx>
@@ -48,7 +47,7 @@ class StepShape_FaceSurface;
class TopoDS_Shell; class TopoDS_Shell;
class TopoDS_Compound; class TopoDS_Compound;
class StepRepr_ConstructiveGeometryRepresentationRelationship; class StepRepr_ConstructiveGeometryRepresentationRelationship;
class StepRepr_MechanicalDesignAndDraughtingRelationship; class StepData_Factors;
class StepData_StepModel; class StepData_StepModel;
@@ -78,7 +77,7 @@ public:
Standard_EXPORT Handle(Transfer_Binder) TransferShape ( Standard_EXPORT Handle(Transfer_Binder) TransferShape (
const Handle(Standard_Transient)& start, const Handle(Standard_Transient)& start,
const Handle(Transfer_TransientProcess)& TP, const Handle(Transfer_TransientProcess)& TP,
const StepData_Factors& theLocalFactors = StepData_Factors(), const StepData_Factors& theLocalFactors,
const Standard_Boolean isManifold = Standard_True, const Standard_Boolean isManifold = Standard_True,
const Standard_Boolean theUseTrsf = Standard_False, const Standard_Boolean theUseTrsf = Standard_False,
const Message_ProgressRange& theProgress = Message_ProgressRange()); const Message_ProgressRange& theProgress = Message_ProgressRange());
@@ -106,14 +105,14 @@ public:
const Handle(StepRepr_Representation)& TargContext, const Handle(StepRepr_Representation)& TargContext,
const Handle(Transfer_TransientProcess)& TP, const Handle(Transfer_TransientProcess)& TP,
gp_Trsf& Trsf, gp_Trsf& Trsf,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
//! Computes transformation defined by given //! Computes transformation defined by given
//! REPRESENTATION_RELATIONSHIP_WITH_TRANSFORMATION //! REPRESENTATION_RELATIONSHIP_WITH_TRANSFORMATION
Standard_EXPORT Standard_Boolean ComputeSRRWT (const Handle(StepRepr_RepresentationRelationship)& SRR, Standard_EXPORT Standard_Boolean ComputeSRRWT (const Handle(StepRepr_RepresentationRelationship)& SRR,
const Handle(Transfer_TransientProcess)& TP, const Handle(Transfer_TransientProcess)& TP,
gp_Trsf& Trsf, gp_Trsf& Trsf,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
@@ -128,7 +127,7 @@ protected:
Standard_EXPORT Handle(TransferBRep_ShapeBinder) TransferEntity ( Standard_EXPORT Handle(TransferBRep_ShapeBinder) TransferEntity (
const Handle(StepBasic_ProductDefinition)& PD, const Handle(StepBasic_ProductDefinition)& PD,
const Handle(Transfer_TransientProcess)& TP, const Handle(Transfer_TransientProcess)& TP,
const StepData_Factors& theLocalFactors = StepData_Factors(), const StepData_Factors& theLocalFactors,
const Standard_Boolean theUseTrsf = Standard_False, const Standard_Boolean theUseTrsf = Standard_False,
const Message_ProgressRange& theProgress = Message_ProgressRange()); const Message_ProgressRange& theProgress = Message_ProgressRange());
@@ -136,7 +135,7 @@ protected:
Standard_EXPORT Handle(TransferBRep_ShapeBinder) TransferEntity Standard_EXPORT Handle(TransferBRep_ShapeBinder) TransferEntity
(const Handle(StepRepr_NextAssemblyUsageOccurrence)& NAUO, (const Handle(StepRepr_NextAssemblyUsageOccurrence)& NAUO,
const Handle(Transfer_TransientProcess)& TP, const Handle(Transfer_TransientProcess)& TP,
const StepData_Factors& theLocalFactors = StepData_Factors(), const StepData_Factors& theLocalFactors,
const Message_ProgressRange& theProgress = Message_ProgressRange()); const Message_ProgressRange& theProgress = Message_ProgressRange());
//! Transfers shape representation entity //! Transfers shape representation entity
@@ -153,7 +152,7 @@ protected:
Standard_EXPORT Handle(TransferBRep_ShapeBinder) TransferEntity Standard_EXPORT Handle(TransferBRep_ShapeBinder) TransferEntity
(const Handle(StepShape_ContextDependentShapeRepresentation)& CDSR, (const Handle(StepShape_ContextDependentShapeRepresentation)& CDSR,
const Handle(Transfer_TransientProcess)& TP, const Handle(Transfer_TransientProcess)& TP,
const StepData_Factors& theLocalFactors = StepData_Factors(), const StepData_Factors& theLocalFactors,
const Message_ProgressRange& theProgress = Message_ProgressRange()); const Message_ProgressRange& theProgress = Message_ProgressRange());
//! Transfers shape representation relationship entity //! Transfers shape representation relationship entity
@@ -190,13 +189,7 @@ protected:
Handle(TransferBRep_ShapeBinder) TransferEntity( const Handle(StepRepr_ConstructiveGeometryRepresentationRelationship)& theCGRR, Handle(TransferBRep_ShapeBinder) TransferEntity( const Handle(StepRepr_ConstructiveGeometryRepresentationRelationship)& theCGRR,
const Handle(Transfer_TransientProcess)& theTP, const Handle(Transfer_TransientProcess)& theTP,
const StepData_Factors& theLocalFactors = StepData_Factors()); const StepData_Factors& theLocalFactors);
//! Transfers MechanicalDesignAndDraughtingRelationship entity
Handle(TransferBRep_ShapeBinder) TransferEntity(const Handle(StepRepr_MechanicalDesignAndDraughtingRelationship)& theMDADR,
const Handle(Transfer_TransientProcess)& theTP,
const StepData_Factors& theLocalFactors,
const Message_ProgressRange& theProgress);
//! Translates file by old way when CDSR are roots . Acts only if "read.step.product_mode" is equal Off. //! Translates file by old way when CDSR are roots . Acts only if "read.step.product_mode" is equal Off.
Standard_EXPORT Handle(TransferBRep_ShapeBinder) OldWay Standard_EXPORT Handle(TransferBRep_ShapeBinder) OldWay

View File

@@ -28,6 +28,7 @@
class Transfer_Finder; class Transfer_Finder;
class Transfer_Binder; class Transfer_Binder;
class Transfer_FinderProcess; class Transfer_FinderProcess;
class StepData_Factors;
class StepShape_ShapeDefinitionRepresentation; class StepShape_ShapeDefinitionRepresentation;
class StepGeom_Axis2Placement3d; class StepGeom_Axis2Placement3d;
class TopoDS_Shape; class TopoDS_Shape;
@@ -59,7 +60,7 @@ public:
const Handle(StepShape_ShapeDefinitionRepresentation)& SDR, const Handle(StepShape_ShapeDefinitionRepresentation)& SDR,
Handle(StepGeom_Axis2Placement3d)& AX1, Handle(StepGeom_Axis2Placement3d)& AX1,
const Handle(Transfer_FinderProcess)& FP, const Handle(Transfer_FinderProcess)& FP,
const StepData_Factors& theLocalFactors = StepData_Factors(), const StepData_Factors& theLocalFactors,
const Handle(TopTools_HSequenceOfShape)& shapeGroup = NULL, const Handle(TopTools_HSequenceOfShape)& shapeGroup = NULL,
const Standard_Boolean isManifold = Standard_True, const Standard_Boolean isManifold = Standard_True,
const Message_ProgressRange& theProgress = Message_ProgressRange()); const Message_ProgressRange& theProgress = Message_ProgressRange());
@@ -68,7 +69,7 @@ public:
(const Handle(Transfer_Finder)& start, (const Handle(Transfer_Finder)& start,
const Handle(StepShape_ShapeDefinitionRepresentation)& SDR, const Handle(StepShape_ShapeDefinitionRepresentation)& SDR,
const Handle(Transfer_FinderProcess)& FP, const Handle(Transfer_FinderProcess)& FP,
const StepData_Factors& theLocalFactors = StepData_Factors(), const StepData_Factors& theLocalFactors,
const Handle(TopTools_HSequenceOfShape)& shapeGroup = NULL, const Handle(TopTools_HSequenceOfShape)& shapeGroup = NULL,
const Standard_Boolean isManifold = Standard_True, const Standard_Boolean isManifold = Standard_True,
const Message_ProgressRange& theProgress = Message_ProgressRange()); const Message_ProgressRange& theProgress = Message_ProgressRange());
@@ -77,7 +78,7 @@ public:
(const Handle(Transfer_Finder)& start, (const Handle(Transfer_Finder)& start,
const Handle(StepShape_ShapeDefinitionRepresentation)& SDR, const Handle(StepShape_ShapeDefinitionRepresentation)& SDR,
const Handle(Transfer_FinderProcess)& FP, const Handle(Transfer_FinderProcess)& FP,
const StepData_Factors& theLocalFactors = StepData_Factors(), const StepData_Factors& theLocalFactors,
const Message_ProgressRange& theProgress = Message_ProgressRange()); const Message_ProgressRange& theProgress = Message_ProgressRange());
Standard_EXPORT void SetMode (const STEPControl_StepModelType M); Standard_EXPORT void SetMode (const STEPControl_StepModelType M);

View File

@@ -93,24 +93,6 @@ Handle(SelectMgr_BaseIntersector) SelectMgr_AxisIntersector::ScaleAndTransform (
return aRes; return aRes;
} }
//=======================================================================
// function : CopyWithBuilder
// purpose : Returns a copy of the frustum using the given frustum builder configuration.
// Returned frustum should be re-constructed before being used.
//=======================================================================
Handle(SelectMgr_BaseIntersector) SelectMgr_AxisIntersector::CopyWithBuilder (const Handle(SelectMgr_FrustumBuilder)& theBuilder) const
{
(void )theBuilder;
Standard_ASSERT_RAISE(mySelectionType == SelectMgr_SelectionType_Point,
"Error! SelectMgr_AxisIntersector::CopyWithBuilder() should be called after selection axis initialization");
Handle(SelectMgr_AxisIntersector) aRes = new SelectMgr_AxisIntersector();
aRes->myAxis = myAxis;
aRes->mySelectionType = mySelectionType;
return aRes;
}
// ======================================================================= // =======================================================================
// function : hasIntersection // function : hasIntersection
// purpose : // purpose :

View File

@@ -52,11 +52,6 @@ public:
const gp_GTrsf& theTrsf, const gp_GTrsf& theTrsf,
const Handle(SelectMgr_FrustumBuilder)& theBuilder) const Standard_OVERRIDE; const Handle(SelectMgr_FrustumBuilder)& theBuilder) const Standard_OVERRIDE;
//! Returns a copy of the intersector transformed using the builder configuration given.
//! Builder is an argument that represents corresponding settings for re-constructing transformed frustum from scratch.
//! In this class, builder is not used and theBuilder parameter is ignored.
Standard_EXPORT virtual Handle(SelectMgr_BaseIntersector) CopyWithBuilder (const Handle(SelectMgr_FrustumBuilder)& theBuilder) const Standard_OVERRIDE;
public: public:
//! Intersection test between defined axis and given axis-aligned box //! Intersection test between defined axis and given axis-aligned box

View File

@@ -71,11 +71,6 @@ public:
const gp_GTrsf& theTrsf, const gp_GTrsf& theTrsf,
const Handle(SelectMgr_FrustumBuilder)& theBuilder) const = 0; const Handle(SelectMgr_FrustumBuilder)& theBuilder) const = 0;
//! @param theBuilder [in] argument that represents corresponding settings for re-constructing transformed frustum from scratch;
//! should NOT be NULL.
//! @return a copy of the frustum with the input builder assigned
virtual Handle(SelectMgr_BaseIntersector) CopyWithBuilder (const Handle(SelectMgr_FrustumBuilder)& theBuilder) const = 0;
public: public:
//! Return camera definition. //! Return camera definition.

View File

@@ -449,28 +449,6 @@ Handle(SelectMgr_BaseIntersector) SelectMgr_RectangularFrustum::ScaleAndTransfor
return aRes; return aRes;
} }
// =======================================================================
// function : CopyWithBuilder
// purpose : Returns a copy of the frustum using the given frustum builder configuration.
// Returned frustum should be re-constructed before being used.
// =======================================================================
Handle(SelectMgr_BaseIntersector) SelectMgr_RectangularFrustum::CopyWithBuilder (const Handle(SelectMgr_FrustumBuilder)& theBuilder) const
{
Standard_ASSERT_RAISE (mySelectionType == SelectMgr_SelectionType_Point || mySelectionType == SelectMgr_SelectionType_Box,
"Error! SelectMgr_RectangularFrustum::CopyWithBuilder() should be called after selection frustum initialization");
Standard_ASSERT_RAISE (!theBuilder.IsNull(),
"Error! SelectMgr_RectangularFrustum::CopyWithBuilder() should be called with valid builder");
Handle(SelectMgr_RectangularFrustum) aRes = new SelectMgr_RectangularFrustum();
aRes->mySelectionType = mySelectionType;
aRes->mySelRectangle = mySelRectangle;
aRes->myPixelTolerance = myPixelTolerance;
aRes->SetBuilder (theBuilder);
return aRes;
}
// ======================================================================= // =======================================================================
// function : IsScalable // function : IsScalable
// purpose : // purpose :

View File

@@ -99,13 +99,6 @@ public:
const gp_GTrsf& theTrsf, const gp_GTrsf& theTrsf,
const Handle(SelectMgr_FrustumBuilder)& theBuilder) const Standard_OVERRIDE; const Handle(SelectMgr_FrustumBuilder)& theBuilder) const Standard_OVERRIDE;
//! Returns a copy of the frustum using the given frustum builder configuration.
//! Returned frustum should be re-constructed before being used.
//! @param theBuilder [in] argument that represents corresponding settings for re-constructing transformed frustum from scratch;
//! should NOT be NULL.
//! @return a copy of the frustum with the input builder assigned
Standard_EXPORT virtual Handle(SelectMgr_BaseIntersector) CopyWithBuilder (const Handle(SelectMgr_FrustumBuilder)& theBuilder) const Standard_OVERRIDE;
// SAT Tests for different objects // SAT Tests for different objects
//! SAT intersection test between defined volume and given axis-aligned box //! SAT intersection test between defined volume and given axis-aligned box

View File

@@ -241,23 +241,17 @@ namespace
//============================================================================= //=============================================================================
SelectMgr_SelectableObjectSet::SelectMgr_SelectableObjectSet() SelectMgr_SelectableObjectSet::SelectMgr_SelectableObjectSet()
{ {
myBVH[BVHSubset_ortho2dPersistent] = new BVH_Tree<Standard_Real, 3>(); myBVH[BVHSubset_2dPersistent] = new BVH_Tree<Standard_Real, 3>();
myBVH[BVHSubset_ortho3dPersistent] = new BVH_Tree<Standard_Real, 3>(); myBVH[BVHSubset_3dPersistent] = new BVH_Tree<Standard_Real, 3>();
myBVH[BVHSubset_2dPersistent] = new BVH_Tree<Standard_Real, 3>(); myBVH[BVHSubset_3d] = new BVH_Tree<Standard_Real, 3>();
myBVH[BVHSubset_3dPersistent] = new BVH_Tree<Standard_Real, 3>();
myBVH[BVHSubset_3d] = new BVH_Tree<Standard_Real, 3>();
myBuilder[BVHSubset_ortho2dPersistent] = new BVH_LinearBuilder<Standard_Real, 3> (BVH_Constants_LeafNodeSizeSingle, BVH_Constants_MaxTreeDepth); myBuilder[BVHSubset_2dPersistent] = new BVH_LinearBuilder<Standard_Real, 3> (BVH_Constants_LeafNodeSizeSingle, BVH_Constants_MaxTreeDepth);
myBuilder[BVHSubset_ortho3dPersistent] = new BVH_LinearBuilder<Standard_Real, 3> (BVH_Constants_LeafNodeSizeSingle, BVH_Constants_MaxTreeDepth); myBuilder[BVHSubset_3dPersistent] = new BVH_LinearBuilder<Standard_Real, 3> (BVH_Constants_LeafNodeSizeSingle, BVH_Constants_MaxTreeDepth);
myBuilder[BVHSubset_2dPersistent] = new BVH_LinearBuilder<Standard_Real, 3> (BVH_Constants_LeafNodeSizeSingle, BVH_Constants_MaxTreeDepth); myBuilder[BVHSubset_3d] = new BVH_BinnedBuilder<Standard_Real, 3, 4> (BVH_Constants_LeafNodeSizeSingle, BVH_Constants_MaxTreeDepth, Standard_True);
myBuilder[BVHSubset_3dPersistent] = new BVH_LinearBuilder<Standard_Real, 3> (BVH_Constants_LeafNodeSizeSingle, BVH_Constants_MaxTreeDepth);
myBuilder[BVHSubset_3d] = new BVH_BinnedBuilder<Standard_Real, 3, 4> (BVH_Constants_LeafNodeSizeSingle, BVH_Constants_MaxTreeDepth, Standard_True);
myIsDirty[BVHSubset_ortho2dPersistent] = Standard_False; myIsDirty[BVHSubset_2dPersistent] = Standard_False;
myIsDirty[BVHSubset_ortho3dPersistent] = Standard_False; myIsDirty[BVHSubset_3dPersistent] = Standard_False;
myIsDirty[BVHSubset_2dPersistent] = Standard_False; myIsDirty[BVHSubset_3d] = Standard_False;
myIsDirty[BVHSubset_3dPersistent] = Standard_False;
myIsDirty[BVHSubset_3d] = Standard_False;
} }
//============================================================================= //=============================================================================
@@ -268,9 +262,10 @@ Standard_Boolean SelectMgr_SelectableObjectSet::Append (const Handle(SelectMgr_S
{ {
// get an appropriate BVH subset to insert the object into it // get an appropriate BVH subset to insert the object into it
const Standard_Integer aSubsetIdx = appropriateSubset (theObject); const Standard_Integer aSubsetIdx = appropriateSubset (theObject);
// check that the object is excluded from other subsets // check that the object is excluded from other subsets
if (currentSubset (theObject) != -1) if (myObjects[(aSubsetIdx + 1) % BVHSubsetNb].Contains (theObject)
|| myObjects[(aSubsetIdx + 2) % BVHSubsetNb].Contains (theObject))
{ {
return Standard_False; return Standard_False;
} }
@@ -406,51 +401,9 @@ void SelectMgr_SelectableObjectSet::UpdateBVH (const Handle(Graphic3d_Camera)& t
myBuilder[BVHSubset_2dPersistent]->Build (&anAdaptor, myBVH[BVHSubset_2dPersistent].get(), anAdaptor.Box()); myBuilder[BVHSubset_2dPersistent]->Build (&anAdaptor, myBVH[BVHSubset_2dPersistent].get(), anAdaptor.Box());
} }
// -------------------------------------------------------------------
// check and update 3D orthographic persistence BVH tree if necessary
// -------------------------------------------------------------------
if (!IsEmpty (BVHSubset_ortho3dPersistent)
&& (myIsDirty[BVHSubset_ortho3dPersistent]
|| myLastViewState.IsChanged (aViewState)
|| isWinSizeChanged))
{
Handle(Graphic3d_Camera) aNewOrthoCam = new Graphic3d_Camera (*theCam); // If OrthoPers, copy camera and set to orthographic projection
aNewOrthoCam->SetProjectionType (Graphic3d_Camera::Projection_Orthographic);
// construct adaptor over private fields to provide direct access for the BVH builder
BVHBuilderAdaptorPersistent anAdaptor (myObjects[BVHSubset_ortho3dPersistent],
aNewOrthoCam, aNewOrthoCam->ProjectionMatrix(),
aNewOrthoCam->OrientationMatrix(), theWinSize);
// update corresponding BVH tree data structure
myBuilder[BVHSubset_ortho3dPersistent]->Build (&anAdaptor, myBVH[BVHSubset_ortho3dPersistent].get(), anAdaptor.Box());
}
// -------------------------------------------------------------------
// check and update 2D orthographic persistence BVH tree if necessary
// -------------------------------------------------------------------
if (!IsEmpty (BVHSubset_ortho2dPersistent)
&& (myIsDirty[BVHSubset_ortho2dPersistent]
|| myLastViewState.IsProjectionChanged (aViewState)
|| isWinSizeChanged))
{
Handle(Graphic3d_Camera) aNewOrthoCam = new Graphic3d_Camera (*theCam); // If OrthoPers, copy camera and set to orthographic projection
aNewOrthoCam->SetProjectionType (Graphic3d_Camera::Projection_Orthographic);
// construct adaptor over private fields to provide direct access for the BVH builder
BVHBuilderAdaptorPersistent anAdaptor (myObjects[BVHSubset_ortho2dPersistent],
aNewOrthoCam, aNewOrthoCam->ProjectionMatrix(),
SelectMgr_SelectableObjectSet_THE_IDENTITY_MAT, theWinSize);
// update corresponding BVH tree data structure
myBuilder[BVHSubset_ortho2dPersistent]->Build (&anAdaptor, myBVH[BVHSubset_ortho2dPersistent].get(), anAdaptor.Box());
}
// release dirty state for every subset // release dirty state for every subset
myIsDirty[BVHSubset_3dPersistent] = Standard_False; myIsDirty[BVHSubset_3dPersistent] = Standard_False;
myIsDirty[BVHSubset_2dPersistent] = Standard_False; myIsDirty[BVHSubset_2dPersistent] = Standard_False;
myIsDirty[BVHSubset_ortho3dPersistent] = Standard_False;
myIsDirty[BVHSubset_ortho2dPersistent] = Standard_False;
// keep last view state // keep last view state
myLastViewState = aViewState; myLastViewState = aViewState;
@@ -466,11 +419,9 @@ void SelectMgr_SelectableObjectSet::UpdateBVH (const Handle(Graphic3d_Camera)& t
//============================================================================= //=============================================================================
void SelectMgr_SelectableObjectSet::MarkDirty() void SelectMgr_SelectableObjectSet::MarkDirty()
{ {
myIsDirty[BVHSubset_3d] = Standard_True; myIsDirty[BVHSubset_3d] = Standard_True;
myIsDirty[BVHSubset_3dPersistent] = Standard_True; myIsDirty[BVHSubset_3dPersistent] = Standard_True;
myIsDirty[BVHSubset_2dPersistent] = Standard_True; myIsDirty[BVHSubset_2dPersistent] = Standard_True;
myIsDirty[BVHSubset_ortho3dPersistent] = Standard_True;
myIsDirty[BVHSubset_ortho2dPersistent] = Standard_True;
} }
//======================================================================= //=======================================================================
//function : DumpJson //function : DumpJson

View File

@@ -42,22 +42,11 @@ public:
//! needs to be updated only when camera's projection changes. Bounding volumes for this object subclass //! needs to be updated only when camera's projection changes. Bounding volumes for this object subclass
//! is represented directly in eye space coordinates. //! is represented directly in eye space coordinates.
//! This subset uses linear BVH builder with 32 levels of depth and 1 element per leaf. //! This subset uses linear BVH builder with 32 levels of depth and 1 element per leaf.
//! - BVHSubset_ortho3dPersistent refers to the subset of 3D persistent selectable objects (rotate, pan, zoom persistence)
//! that contains `Graphic3d_TMF_OrthoPers` persistence mode.
//! Associated BVH tree needs to be updated when either the camera's projection and position change.
//! This subset uses linear BVH builder with 32 levels of depth and 1 element per leaf.
//! - BVHSubset_ortho2dPersistent refers to the subset of 2D persistent selectable objects
//! that contains `Graphic3d_TMF_OrthoPers` persistence mode. Associated BVH tree
//! needs to be updated only when camera's projection changes. Bounding volumes for this object subclass
//! is represented directly in eye space coordinates.
//! This subset uses linear BVH builder with 32 levels of depth and 1 element per leaf.
enum BVHSubset enum BVHSubset
{ {
BVHSubset_3d, BVHSubset_3d,
BVHSubset_3dPersistent, BVHSubset_3dPersistent,
BVHSubset_2dPersistent, BVHSubset_2dPersistent,
BVHSubset_ortho3dPersistent,
BVHSubset_ortho2dPersistent,
BVHSubsetNb BVHSubsetNb
}; };
@@ -151,9 +140,7 @@ public:
{ {
return myObjects[BVHSubset_3d].Contains (theObject) return myObjects[BVHSubset_3d].Contains (theObject)
|| myObjects[BVHSubset_3dPersistent].Contains (theObject) || myObjects[BVHSubset_3dPersistent].Contains (theObject)
|| myObjects[BVHSubset_2dPersistent].Contains (theObject) || myObjects[BVHSubset_2dPersistent].Contains (theObject);
|| myObjects[BVHSubset_ortho3dPersistent].Contains (theObject)
|| myObjects[BVHSubset_ortho2dPersistent].Contains (theObject);
} }
//! Returns true if the object set does not contain any selectable objects. //! Returns true if the object set does not contain any selectable objects.
@@ -161,9 +148,7 @@ public:
{ {
return myObjects[BVHSubset_3d].IsEmpty() return myObjects[BVHSubset_3d].IsEmpty()
&& myObjects[BVHSubset_3dPersistent].IsEmpty() && myObjects[BVHSubset_3dPersistent].IsEmpty()
&& myObjects[BVHSubset_2dPersistent].IsEmpty() && myObjects[BVHSubset_2dPersistent].IsEmpty();
&& myObjects[BVHSubset_ortho3dPersistent].IsEmpty()
&& myObjects[BVHSubset_ortho2dPersistent].IsEmpty();
} }
//! Returns true if the specified object subset is empty. //! Returns true if the specified object subset is empty.
@@ -207,18 +192,10 @@ private:
} }
return SelectMgr_SelectableObjectSet::BVHSubset_3d; return SelectMgr_SelectableObjectSet::BVHSubset_3d;
} }
else if ((theObject->TransformPersistence()->Mode() & Graphic3d_TMF_2d) != 0) else if (theObject->TransformPersistence()->Mode() == Graphic3d_TMF_2d)
{ {
if (theObject->TransformPersistence()->IsOrthoPers())
{
return SelectMgr_SelectableObjectSet::BVHSubset_ortho2dPersistent;
}
return SelectMgr_SelectableObjectSet::BVHSubset_2dPersistent; return SelectMgr_SelectableObjectSet::BVHSubset_2dPersistent;
} }
else if (theObject->TransformPersistence()->IsOrthoPers())
{
return SelectMgr_SelectableObjectSet::BVHSubset_ortho3dPersistent;
}
else else
{ {
return SelectMgr_SelectableObjectSet::BVHSubset_3dPersistent; return SelectMgr_SelectableObjectSet::BVHSubset_3dPersistent;

View File

@@ -67,28 +67,6 @@ SelectMgr_SelectingVolumeManager SelectMgr_SelectingVolumeManager::ScaleAndTrans
return aMgr; return aMgr;
} }
//=======================================================================
// function : CopyWithBuilder
// purpose : Returns a copy of the selecting volume manager and its active frustum re-constructed using the passed builder.
// Builder is an argument that represents corresponding settings for re-constructing transformed
// frustum from scratch.
//=======================================================================
SelectMgr_SelectingVolumeManager SelectMgr_SelectingVolumeManager::CopyWithBuilder (const Handle(SelectMgr_FrustumBuilder)& theBuilder) const
{
SelectMgr_SelectingVolumeManager aMgr;
aMgr.myToAllowOverlap = myToAllowOverlap;
aMgr.myViewClipPlanes = myViewClipPlanes;
aMgr.myObjectClipPlanes = myObjectClipPlanes;
aMgr.myViewClipRange = myViewClipRange;
if (!myActiveSelectingVolume.IsNull())
{
aMgr.myActiveSelectingVolume = myActiveSelectingVolume->CopyWithBuilder (theBuilder);
aMgr.BuildSelectingVolume();
}
return aMgr;
}
//======================================================================= //=======================================================================
// function : GetActiveSelectionType // function : GetActiveSelectionType
// purpose : // purpose :

View File

@@ -81,11 +81,6 @@ public:
const gp_GTrsf& theTrsf, const gp_GTrsf& theTrsf,
const Handle(SelectMgr_FrustumBuilder)& theBuilder) const; const Handle(SelectMgr_FrustumBuilder)& theBuilder) const;
//! Returns a copy of the selecting volume manager and its active frustum re-constructed using the passed builder.
//! Builder is an argument that represents corresponding settings for re-constructing transformed
//! frustum from scratch.
Standard_EXPORT virtual SelectMgr_SelectingVolumeManager CopyWithBuilder (const Handle(SelectMgr_FrustumBuilder)& theBuilder) const;
public: public:
//! Returns current camera definition. //! Returns current camera definition.

View File

@@ -28,7 +28,7 @@ IMPLEMENT_STANDARD_RTTIEXT(SelectMgr_SensitiveEntitySet, BVH_PrimitiveSet3d)
SelectMgr_SensitiveEntitySet::SelectMgr_SensitiveEntitySet (const Handle(Select3D_BVHBuilder3d)& theBuilder) SelectMgr_SensitiveEntitySet::SelectMgr_SensitiveEntitySet (const Handle(Select3D_BVHBuilder3d)& theBuilder)
: BVH_PrimitiveSet3d (theBuilder) : BVH_PrimitiveSet3d (theBuilder)
{ {
myNbEntityWithPersistence = 0; //
} }
//======================================================================= //=======================================================================
@@ -42,6 +42,7 @@ void SelectMgr_SensitiveEntitySet::Append (const Handle(SelectMgr_SensitiveEntit
theEntity->ResetSelectionActiveStatus(); theEntity->ResetSelectionActiveStatus();
return; return;
} }
const Standard_Integer anExtent = mySensitives.Extent(); const Standard_Integer anExtent = mySensitives.Extent();
if (mySensitives.Add (theEntity) > anExtent) if (mySensitives.Add (theEntity) > anExtent)
{ {
@@ -49,7 +50,7 @@ void SelectMgr_SensitiveEntitySet::Append (const Handle(SelectMgr_SensitiveEntit
} }
if (!theEntity->BaseSensitive()->TransformPersistence().IsNull()) if (!theEntity->BaseSensitive()->TransformPersistence().IsNull())
{ {
++myNbEntityWithPersistence; myHasEntityWithPersistence = Standard_True;
} }
MarkDirty(); MarkDirty();
} }
@@ -77,7 +78,7 @@ void SelectMgr_SensitiveEntitySet::Append (const Handle(SelectMgr_Selection)& th
} }
if (!aSensEnt->BaseSensitive()->TransformPersistence().IsNull()) if (!aSensEnt->BaseSensitive()->TransformPersistence().IsNull())
{ {
++myNbEntityWithPersistence; myHasEntityWithPersistence = Standard_True;
} }
} }
MarkDirty(); MarkDirty();
@@ -92,8 +93,7 @@ void SelectMgr_SensitiveEntitySet::Remove (const Handle(SelectMgr_Selection)& th
{ {
for (NCollection_Vector<Handle(SelectMgr_SensitiveEntity)>::Iterator aSelEntIter (theSelection->Entities()); aSelEntIter.More(); aSelEntIter.Next()) for (NCollection_Vector<Handle(SelectMgr_SensitiveEntity)>::Iterator aSelEntIter (theSelection->Entities()); aSelEntIter.More(); aSelEntIter.Next())
{ {
const Handle(SelectMgr_SensitiveEntity)& aSensEnt = aSelEntIter.Value(); const Standard_Integer anEntIdx = mySensitives.FindIndex (aSelEntIter.Value());
const Standard_Integer anEntIdx = mySensitives.FindIndex (aSensEnt);
if (anEntIdx == 0) if (anEntIdx == 0)
{ {
continue; continue;
@@ -103,13 +103,9 @@ void SelectMgr_SensitiveEntitySet::Remove (const Handle(SelectMgr_Selection)& th
{ {
Swap (anEntIdx - 1, mySensitives.Size() - 1); Swap (anEntIdx - 1, mySensitives.Size() - 1);
} }
if (!aSensEnt->BaseSensitive()->TransformPersistence().IsNull())
{
--myNbEntityWithPersistence;
}
mySensitives.RemoveLast(); mySensitives.RemoveLast();
removeOwner (aSensEnt->BaseSensitive()->OwnerId()); removeOwner (aSelEntIter.Value()->BaseSensitive()->OwnerId());
} }
MarkDirty(); MarkDirty();

View File

@@ -77,7 +77,7 @@ public:
const SelectMgr_MapOfOwners& Owners() const { return myOwnersMap; } const SelectMgr_MapOfOwners& Owners() const { return myOwnersMap; }
//! Returns map of entities. //! Returns map of entities.
Standard_Boolean HasEntityWithPersistence() const { return myNbEntityWithPersistence > 0; } Standard_Boolean HasEntityWithPersistence() const { return myHasEntityWithPersistence; }
protected: protected:
@@ -89,9 +89,9 @@ protected:
private: private:
SelectMgr_IndexedMapOfHSensitive mySensitives; //!< Map of entities and its corresponding index in BVH SelectMgr_IndexedMapOfHSensitive mySensitives; //!< Map of entities and its corresponding index in BVH
SelectMgr_MapOfOwners myOwnersMap; //!< Map of entity owners and its corresponding number of sensitives SelectMgr_MapOfOwners myOwnersMap; //!< Map of entity owners and its corresponding number of sensitives
Standard_Integer myNbEntityWithPersistence; //!< number of sensitive entities that have own transform persistence Standard_Boolean myHasEntityWithPersistence; //!< flag if some of sensitive entity has own transform persistence
}; };
#endif // _SelectMgr_SensitiveEntitySet_HeaderFile #endif // _SelectMgr_SensitiveEntitySet_HeaderFile

View File

@@ -189,20 +189,6 @@ Handle(SelectMgr_BaseIntersector) SelectMgr_TriangularFrustum::ScaleAndTransform
return aRes; return aRes;
} }
//=======================================================================
// function : CopyWithBuilder
// purpose : Returns a copy of the frustum using the given frustum builder configuration.
// Returned frustum should be re-constructed before being used.
//=======================================================================
Handle(SelectMgr_BaseIntersector) SelectMgr_TriangularFrustum::CopyWithBuilder (const Handle(SelectMgr_FrustumBuilder)& theBuilder) const
{
Handle(SelectMgr_TriangularFrustum) aRes = new SelectMgr_TriangularFrustum();
aRes->mySelTriangle = mySelTriangle;
aRes->SetBuilder (theBuilder);
return aRes;
}
//======================================================================= //=======================================================================
// function : OverlapsBox // function : OverlapsBox
// purpose : SAT intersection test between defined volume and // purpose : SAT intersection test between defined volume and

View File

@@ -55,13 +55,6 @@ public:
const gp_GTrsf& theTrsf, const gp_GTrsf& theTrsf,
const Handle(SelectMgr_FrustumBuilder)& theBuilder) const Standard_OVERRIDE; const Handle(SelectMgr_FrustumBuilder)& theBuilder) const Standard_OVERRIDE;
//! Returns a copy of the frustum using the given frustum builder configuration.
//! Returned frustum should be re-constructed before being used.
//! @param theBuilder [in] argument that represents corresponding settings for re-constructing transformed frustum from scratch;
//! should NOT be NULL.
//! @return a copy of the frustum with the input builder assigned
Standard_EXPORT virtual Handle(SelectMgr_BaseIntersector) CopyWithBuilder (const Handle(SelectMgr_FrustumBuilder)& theBuilder) const Standard_OVERRIDE;
public: //! @name SAT Tests for different objects public: //! @name SAT Tests for different objects
//! SAT intersection test between defined volume and given axis-aligned box //! SAT intersection test between defined volume and given axis-aligned box

View File

@@ -186,32 +186,6 @@ Handle(SelectMgr_BaseIntersector) SelectMgr_TriangularFrustumSet::ScaleAndTransf
return aRes; return aRes;
} }
//=======================================================================
// function : CopyWithBuilder
// purpose : Returns a copy of the frustum using the given frustum builder configuration.
// Returned frustum should be re-constructed before being used.
//=======================================================================
Handle(SelectMgr_BaseIntersector) SelectMgr_TriangularFrustumSet::CopyWithBuilder (const Handle(SelectMgr_FrustumBuilder)& theBuilder) const
{
Standard_ASSERT_RAISE (mySelectionType == SelectMgr_SelectionType_Polyline,
"Error! SelectMgr_TriangularFrustumSet::CopyWithBuilder() should be called after selection frustum initialization");
Standard_ASSERT_RAISE (!theBuilder.IsNull(),
"Error! SelectMgr_TriangularFrustumSet::CopyWithBuilder() should be called with valid builder");
Handle(SelectMgr_TriangularFrustumSet) aRes = new SelectMgr_TriangularFrustumSet();
aRes->SetCamera (myCamera);
for (SelectMgr_TriangFrustums::Iterator anIter (myFrustums); anIter.More(); anIter.Next())
{
aRes->myFrustums.Append (Handle(SelectMgr_TriangularFrustum)::DownCast (anIter.Value()->CopyWithBuilder (theBuilder)));
}
aRes->mySelectionType = mySelectionType;
aRes->mySelPolyline = mySelPolyline;
aRes->myToAllowOverlap = myToAllowOverlap;
aRes->SetBuilder (theBuilder);
return aRes;
}
// ======================================================================= // =======================================================================
// function : OverlapsBox // function : OverlapsBox
// purpose : // purpose :

View File

@@ -62,13 +62,6 @@ public:
const gp_GTrsf& theTrsf, const gp_GTrsf& theTrsf,
const Handle(SelectMgr_FrustumBuilder)& theBuilder) const Standard_OVERRIDE; const Handle(SelectMgr_FrustumBuilder)& theBuilder) const Standard_OVERRIDE;
//! Returns a copy of the frustum using the given frustum builder configuration.
//! Returned frustum should be re-constructed before being used.
//! @param theBuilder [in] argument that represents corresponding settings for re-constructing transformed frustum from scratch;
//! should NOT be NULL.
//! @return a copy of the frustum with the input builder assigned
Standard_EXPORT virtual Handle(SelectMgr_BaseIntersector) CopyWithBuilder (const Handle(SelectMgr_FrustumBuilder)& theBuilder) const Standard_OVERRIDE;
public: public:
Standard_EXPORT virtual Standard_Boolean OverlapsBox (const SelectMgr_Vec3& theMinPnt, Standard_EXPORT virtual Standard_Boolean OverlapsBox (const SelectMgr_Vec3& theMinPnt,

View File

@@ -138,12 +138,12 @@ void SelectMgr_ViewerSelector::updatePoint3d (SelectMgr_SortCriterion& theCriter
case SelectMgr_TypeOfDepthTolerance_UniformPixels: case SelectMgr_TypeOfDepthTolerance_UniformPixels:
case SelectMgr_TypeOfDepthTolerance_SensitivityFactor: case SelectMgr_TypeOfDepthTolerance_SensitivityFactor:
{ {
if (theMgr.Camera().IsNull()) if (mySelectingVolumeMgr.Camera().IsNull())
{ {
// fallback for an arbitrary projection matrix // fallback for an arbitrary projection matrix
theCriterion.Tolerance = aSensFactor / 33.0; theCriterion.Tolerance = aSensFactor / 33.0;
} }
else if (theMgr.Camera()->IsOrthographic()) else if (mySelectingVolumeMgr.Camera()->IsOrthographic())
{ {
theCriterion.Tolerance = myCameraScale * aSensFactor; theCriterion.Tolerance = myCameraScale * aSensFactor;
} }
@@ -634,9 +634,6 @@ void SelectMgr_ViewerSelector::TraverseSensitives (const Standard_Integer theVie
Graphic3d_Vec2i aWinSize; Graphic3d_Vec2i aWinSize;
mySelectingVolumeMgr.WindowSize (aWinSize.x(), aWinSize.y()); mySelectingVolumeMgr.WindowSize (aWinSize.x(), aWinSize.y());
const double aPixelSize = aWinSize.x() > 0 && aWinSize.y() > 0
? Max (1.0 / aWinSize.x(), 1.0 / aWinSize.y())
: 1.0;
const Handle(Graphic3d_Camera)& aCamera = mySelectingVolumeMgr.Camera(); const Handle(Graphic3d_Camera)& aCamera = mySelectingVolumeMgr.Camera();
Graphic3d_Mat4d aProjectionMat, aWorldViewMat; Graphic3d_Mat4d aProjectionMat, aWorldViewMat;
@@ -649,6 +646,11 @@ void SelectMgr_ViewerSelector::TraverseSensitives (const Standard_Integer theVie
myCameraEye = aCamera->Eye().XYZ(); myCameraEye = aCamera->Eye().XYZ();
myCameraDir = aCamera->Direction().XYZ(); myCameraDir = aCamera->Direction().XYZ();
myCameraScale = aCamera->IsOrthographic()
? aCamera->Scale()
: 2.0 * Tan (aCamera->FOVy() * M_PI / 360.0);
const double aPixelSize = Max (1.0 / aWinSize.x(), 1.0 / aWinSize.y());
myCameraScale *= aPixelSize;
} }
mySelectableObjects.UpdateBVH (aCamera, aWinSize); mySelectableObjects.UpdateBVH (aCamera, aWinSize);
@@ -670,8 +672,7 @@ void SelectMgr_ViewerSelector::TraverseSensitives (const Standard_Integer theVie
// for 2D space selection transform selecting volumes to perform overlap testing // for 2D space selection transform selecting volumes to perform overlap testing
// directly in camera's eye space omitting the camera position, which is not // directly in camera's eye space omitting the camera position, which is not
// needed there at all // needed there at all
if (aBVHSubset == SelectMgr_SelectableObjectSet::BVHSubset_2dPersistent if (aBVHSubset == SelectMgr_SelectableObjectSet::BVHSubset_2dPersistent)
|| aBVHSubset == SelectMgr_SelectableObjectSet::BVHSubset_ortho2dPersistent)
{ {
gp_GTrsf aTFrustum; gp_GTrsf aTFrustum;
aTFrustum.SetValue (1, 1, aWorldViewMat.GetValue (0, 0)); aTFrustum.SetValue (1, 1, aWorldViewMat.GetValue (0, 0));
@@ -687,46 +688,22 @@ void SelectMgr_ViewerSelector::TraverseSensitives (const Standard_Integer theVie
aWorldViewMat.GetValue (1, 3), aWorldViewMat.GetValue (1, 3),
aWorldViewMat.GetValue (2, 3))); aWorldViewMat.GetValue (2, 3)));
// define corresponding frustum builder parameters for 2d persistence. // define corresponding frustum builder parameters
Handle(SelectMgr_FrustumBuilder) aBuilder = new SelectMgr_FrustumBuilder(); Handle(SelectMgr_FrustumBuilder) aBuilder = new SelectMgr_FrustumBuilder();
Handle(Graphic3d_Camera) aNewCamera = new Graphic3d_Camera(); Handle(Graphic3d_Camera) aNewCamera = new Graphic3d_Camera();
aNewCamera->CopyMappingData (aCamera); aNewCamera->CopyMappingData (aCamera);
aNewCamera->SetIdentityOrientation(); aNewCamera->SetIdentityOrientation();
if (aBVHSubset == SelectMgr_SelectableObjectSet::BVHSubset_ortho2dPersistent)
{
aNewCamera->SetProjectionType (Graphic3d_Camera::Projection_Orthographic);
}
aWorldViewMat = aNewCamera->OrientationMatrix(); // should be identity matrix aWorldViewMat = aNewCamera->OrientationMatrix(); // should be identity matrix
aProjectionMat = aNewCamera->ProjectionMatrix(); // should be the same to aProjectionMat aProjectionMat = aNewCamera->ProjectionMatrix(); // should be the same to aProjectionMat
aBuilder->SetCamera (aNewCamera); aBuilder->SetCamera (aNewCamera);
aBuilder->SetWindowSize (aWinSize.x(), aWinSize.y()); aBuilder->SetWindowSize (aWinSize.x(), aWinSize.y());
aMgr = mySelectingVolumeMgr.ScaleAndTransform (1, aTFrustum, aBuilder); aMgr = mySelectingVolumeMgr.ScaleAndTransform (1, aTFrustum, aBuilder);
} }
else if (aBVHSubset == SelectMgr_SelectableObjectSet::BVHSubset_ortho3dPersistent)
{
// define corresponding frustum builder parameters for 3d orthographic persistence.
Handle(SelectMgr_FrustumBuilder) aBuilder = new SelectMgr_FrustumBuilder();
Handle(Graphic3d_Camera) aNewCamera = new Graphic3d_Camera (*aCamera);
aNewCamera->SetProjectionType (Graphic3d_Camera::Projection_Orthographic);
aWorldViewMat = aNewCamera->OrientationMatrix(); // should be the same to aWorldViewMat
aProjectionMat = aNewCamera->ProjectionMatrix(); // should be orthographic projection
aBuilder->SetCamera (aNewCamera);
aBuilder->SetWindowSize (aWinSize.x(), aWinSize.y());
aMgr = mySelectingVolumeMgr.CopyWithBuilder (aBuilder);
}
else else
{ {
aMgr = mySelectingVolumeMgr; aMgr = mySelectingVolumeMgr;
} }
if (!aMgr.Camera().IsNull())
{
myCameraScale = aMgr.Camera()->IsOrthographic()
? aMgr.Camera()->Scale()
: 2.0 * Tan (aMgr.Camera()->FOVy() * M_PI / 360.0);
myCameraScale *= aPixelSize;
}
const opencascade::handle<BVH_Tree<Standard_Real, 3> >& aBVHTree = mySelectableObjects.BVH (aBVHSubset); const opencascade::handle<BVH_Tree<Standard_Real, 3> >& aBVHTree = mySelectableObjects.BVH (aBVHSubset);
Standard_Integer aNode = 0; Standard_Integer aNode = 0;

View File

@@ -328,7 +328,7 @@ protected:
//! @param theObject [in] the selectable object for traversal. //! @param theObject [in] the selectable object for traversal.
//! @param theMgr [in] the (un)transformed copy of the selecting volume manager representing active selection frustum. //! @param theMgr [in] the (un)transformed copy of the selecting volume manager representing active selection frustum.
//! @param theCamera, theProjectionMat, theWorldViewMat [in] the source camera and matrices for theMgr given. //! @param theCamera, theProjectionMat, theWorldViewMat [in] the source camera and matrices for theMgr given.
//! @param theWinSize [in] viewport (window) dimensions for evaluating //! @param theViewportWidth, theViewportHeight [in] viewport (window) dimensions for evaluating
//! object's transformation persistence. //! object's transformation persistence.
Standard_EXPORT void traverseObject (const Handle(SelectMgr_SelectableObject)& theObject, Standard_EXPORT void traverseObject (const Handle(SelectMgr_SelectableObject)& theObject,
const SelectMgr_SelectingVolumeManager& theMgr, const SelectMgr_SelectingVolumeManager& theMgr,

View File

@@ -44,11 +44,10 @@ Standard_Failure::StringRef* Standard_Failure::StringRef::allocate_message (cons
} }
const Standard_Size aLen = strlen (theString); const Standard_Size aLen = strlen (theString);
StringRef* aStrPtr = (StringRef* )Standard::AllocateOptimal (aLen + sizeof(Standard_Integer) + 1); StringRef* aStrPtr = (StringRef* )malloc (aLen + sizeof(Standard_Integer) + 1);
if (aStrPtr != NULL) if (aStrPtr != NULL)
{ {
strncpy ((char* )&aStrPtr->Message[0], theString, aLen); strcpy ((char* )&aStrPtr->Message[0], theString);
((char* )&aStrPtr->Message[0])[aLen] = '\0';
aStrPtr->Counter = 1; aStrPtr->Counter = 1;
} }
return aStrPtr; return aStrPtr;
@@ -79,7 +78,7 @@ void Standard_Failure::StringRef::deallocate_message (Standard_Failure::StringRe
{ {
if (--theString->Counter == 0) if (--theString->Counter == 0)
{ {
Standard::Free((void* )theString); free ((void* )theString);
} }
} }
} }

View File

@@ -14,8 +14,10 @@
#include <Standard_Type.hxx> #include <Standard_Type.hxx>
#include <Standard_Mutex.hxx>
#include <Standard_Assert.hxx> #include <Standard_Assert.hxx>
#include <Standard_CStringHasher.hxx>
#include <Standard_Mutex.hxx>
#include <unordered_map> #include <unordered_map>
@@ -23,12 +25,23 @@ IMPLEMENT_STANDARD_RTTIEXT(Standard_Type,Standard_Transient)
//============================================================================ //============================================================================
namespace
{
static Standard_CString copy_string (const char* theString)
{
size_t aLength = strlen (theString);
char* aResult = static_cast<char*> (Standard::Allocate (aLength + 1));
strncpy (aResult, theString, aLength + 1); //including null-character
return aResult;
}
}
Standard_Type::Standard_Type (const std::type_info& theInfo, Standard_Type::Standard_Type (const std::type_info& theInfo,
const char* theName, const char* theName,
Standard_Size theSize, Standard_Size theSize,
const Handle(Standard_Type)& theParent) : const Handle(Standard_Type)& theParent) :
myInfo(theInfo), myInfo(theInfo),
myName(theName), myName(copy_string (theName)),
mySize(theSize), mySize(theSize),
myParent(theParent) myParent(theParent)
{ {
@@ -62,7 +75,7 @@ void Standard_Type::Print (Standard_OStream& AStream) const
namespace { namespace {
// Map of string to type // Map of string to type
typedef std::unordered_map<std::type_index, Standard_Type*> registry_type; typedef std::unordered_map<Standard_CString, Standard_Type*, Standard_CStringHasher, Standard_CStringHasher> registry_type;
// Registry is made static in the function to ensure that it gets // Registry is made static in the function to ensure that it gets
// initialized by the time of first access // initialized by the time of first access
@@ -87,7 +100,7 @@ Standard_Type* Standard_Type::Register (const std::type_info& theInfo, const cha
// return existing descriptor if already in the registry // return existing descriptor if already in the registry
registry_type& aRegistry = GetRegistry(); registry_type& aRegistry = GetRegistry();
Standard_Type* aType = 0; Standard_Type* aType = 0;
auto anIter = aRegistry.find(theInfo); auto anIter = aRegistry.find(theName);
if (anIter != aRegistry.end()) if (anIter != aRegistry.end())
return anIter->second; return anIter->second;
@@ -95,7 +108,7 @@ Standard_Type* Standard_Type::Register (const std::type_info& theInfo, const cha
aType = new Standard_Type (theInfo, theName, theSize, theParent); aType = new Standard_Type (theInfo, theName, theSize, theParent);
// then add it to registry and return (the reference to the handle stored in the registry) // then add it to registry and return (the reference to the handle stored in the registry)
aRegistry.emplace(theInfo, aType); aRegistry.emplace(theName, aType);
return aType; return aType;
} }
@@ -103,5 +116,6 @@ Standard_Type::~Standard_Type ()
{ {
// remove descriptor from the registry // remove descriptor from the registry
registry_type& aRegistry = GetRegistry(); registry_type& aRegistry = GetRegistry();
Standard_ASSERT(aRegistry.erase(myInfo) > 0, "Standard_Type::~Standard_Type() cannot find itself in registry",); Standard_ASSERT(aRegistry.erase(myName) > 0, "Standard_Type::~Standard_Type() cannot find itself in registry",);
Standard::Free (myName);
} }

View File

@@ -42,7 +42,7 @@
//! - "dev" for development version between releases //! - "dev" for development version between releases
//! - "beta..." or "rc..." for beta releases or release candidates //! - "beta..." or "rc..." for beta releases or release candidates
//! - "project..." for version containing project-specific fixes //! - "project..." for version containing project-specific fixes
#define OCC_VERSION_DEVELOPMENT "dev" //#define OCC_VERSION_DEVELOPMENT "dev"
// Derived (manually): version as real and string (major.minor) // Derived (manually): version as real and string (major.minor)
#define OCC_VERSION 7.8 #define OCC_VERSION 7.8

View File

@@ -158,8 +158,6 @@ static Standard_CString schemaAP242DIS = "AP242_MANAGED_MODEL_BASED_3D_ENGINEERI
#include <StepShape_GeometricallyBoundedWireframeShapeRepresentation.hxx> #include <StepShape_GeometricallyBoundedWireframeShapeRepresentation.hxx>
#include <StepRepr_GlobalUncertaintyAssignedContext.hxx> #include <StepRepr_GlobalUncertaintyAssignedContext.hxx>
#include <StepRepr_GlobalUnitAssignedContext.hxx> #include <StepRepr_GlobalUnitAssignedContext.hxx>
#include <StepBasic_GeneralPropertyAssociation.hxx>
#include <StepBasic_GeneralPropertyRelationship.hxx>
#include <StepBasic_GroupRelationship.hxx> #include <StepBasic_GroupRelationship.hxx>
#include <StepShape_HalfSpaceSolid.hxx> #include <StepShape_HalfSpaceSolid.hxx>
#include <StepGeom_Hyperbola.hxx> #include <StepGeom_Hyperbola.hxx>
@@ -641,9 +639,7 @@ static Standard_CString schemaAP242DIS = "AP242_MANAGED_MODEL_BASED_3D_ENGINEERI
#include <StepDimTol_GeoTolAndGeoTolWthDatRefAndUneqDisGeoTol.hxx> #include <StepDimTol_GeoTolAndGeoTolWthDatRefAndUneqDisGeoTol.hxx>
#include <StepRepr_CompGroupShAspAndCompShAspAndDatumFeatAndShAsp.hxx> #include <StepRepr_CompGroupShAspAndCompShAspAndDatumFeatAndShAsp.hxx>
#include <StepRepr_CompShAspAndDatumFeatAndShAsp.hxx> #include <StepRepr_CompShAspAndDatumFeatAndShAsp.hxx>
#include <StepRepr_BooleanRepresentationItem.hxx>
#include <StepRepr_IntegerRepresentationItem.hxx> #include <StepRepr_IntegerRepresentationItem.hxx>
#include <StepRepr_RealRepresentationItem.hxx>
#include <StepRepr_ValueRepresentationItem.hxx> #include <StepRepr_ValueRepresentationItem.hxx>
#include <StepAP242_DraughtingModelItemAssociation.hxx> #include <StepAP242_DraughtingModelItemAssociation.hxx>
#include <StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol.hxx> #include <StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol.hxx>
@@ -661,7 +657,6 @@ static Standard_CString schemaAP242DIS = "AP242_MANAGED_MODEL_BASED_3D_ENGINEERI
#include <StepRepr_CharacterizedRepresentation.hxx> #include <StepRepr_CharacterizedRepresentation.hxx>
#include <StepRepr_ConstructiveGeometryRepresentation.hxx> #include <StepRepr_ConstructiveGeometryRepresentation.hxx>
#include <StepRepr_ConstructiveGeometryRepresentationRelationship.hxx> #include <StepRepr_ConstructiveGeometryRepresentationRelationship.hxx>
#include <StepRepr_MechanicalDesignAndDraughtingRelationship.hxx>
#include <StepVisual_CharacterizedObjAndRepresentationAndDraughtingModel.hxx> #include <StepVisual_CharacterizedObjAndRepresentationAndDraughtingModel.hxx>
#include <StepVisual_AnnotationFillArea.hxx> #include <StepVisual_AnnotationFillArea.hxx>
#include <StepVisual_AnnotationFillAreaOccurrence.hxx> #include <StepVisual_AnnotationFillAreaOccurrence.hxx>
@@ -1565,11 +1560,6 @@ StepAP214_Protocol::StepAP214_Protocol ()
types.Bind(STANDARD_TYPE(StepVisual_CubicBezierTessellatedEdge), 817); types.Bind(STANDARD_TYPE(StepVisual_CubicBezierTessellatedEdge), 817);
types.Bind(STANDARD_TYPE(StepVisual_CubicBezierTriangulatedFace), 818); types.Bind(STANDARD_TYPE(StepVisual_CubicBezierTriangulatedFace), 818);
types.Bind(STANDARD_TYPE(StepVisual_TriangulatedSurfaceSet), 819); types.Bind(STANDARD_TYPE(StepVisual_TriangulatedSurfaceSet), 819);
types.Bind(STANDARD_TYPE(StepBasic_GeneralPropertyAssociation), 820);
types.Bind(STANDARD_TYPE(StepBasic_GeneralPropertyRelationship), 821);
types.Bind(STANDARD_TYPE(StepRepr_BooleanRepresentationItem), 822);
types.Bind(STANDARD_TYPE(StepRepr_RealRepresentationItem), 823);
types.Bind(STANDARD_TYPE(StepRepr_MechanicalDesignAndDraughtingRelationship), 824);
} }

View File

@@ -135,10 +135,6 @@ StepBasic_ExternalSource.cxx
StepBasic_ExternalSource.hxx StepBasic_ExternalSource.hxx
StepBasic_GeneralProperty.cxx StepBasic_GeneralProperty.cxx
StepBasic_GeneralProperty.hxx StepBasic_GeneralProperty.hxx
StepBasic_GeneralPropertyAssociation.cxx
StepBasic_GeneralPropertyAssociation.hxx
StepBasic_GeneralPropertyRelationship.cxx
StepBasic_GeneralPropertyRelationship.hxx
StepBasic_Group.cxx StepBasic_Group.cxx
StepBasic_Group.hxx StepBasic_Group.hxx
StepBasic_GroupAssignment.cxx StepBasic_GroupAssignment.cxx

View File

@@ -1,117 +0,0 @@
// Copyright (c) 2024 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <StepBasic_GeneralPropertyAssociation.hxx>
#include <TCollection_HAsciiString.hxx>
IMPLEMENT_STANDARD_RTTIEXT(StepBasic_GeneralPropertyAssociation, Standard_Transient)
//=======================================================================
//function : StepBasic_GeneralPropertyAssociation
//purpose :
//=======================================================================
StepBasic_GeneralPropertyAssociation::StepBasic_GeneralPropertyAssociation ()
{
}
//=======================================================================
//function : Init
//purpose :
//=======================================================================
void StepBasic_GeneralPropertyAssociation::Init (const Handle(TCollection_HAsciiString)& aName,
const Handle(TCollection_HAsciiString)& aDescription,
const Handle(StepBasic_GeneralProperty)& aGeneralProperty,
const Handle(StepRepr_PropertyDefinition)& aPropertyDefinition)
{
theName = aName;
theDescription = aDescription;
theGeneralProperty = aGeneralProperty;
thePropertyDefinition = aPropertyDefinition;
}
//=======================================================================
//function : Name
//purpose :
//=======================================================================
Handle(TCollection_HAsciiString) StepBasic_GeneralPropertyAssociation::Name() const
{
return theName;
}
//=======================================================================
//function : SetName
//purpose :
//=======================================================================
void StepBasic_GeneralPropertyAssociation::SetName(const Handle(TCollection_HAsciiString)& aName)
{
theName = aName;
}
//=======================================================================
//function : Description
//purpose :
//=======================================================================
Handle(TCollection_HAsciiString) StepBasic_GeneralPropertyAssociation::Description() const
{
return theDescription;
}
//=======================================================================
//function : SetDescription
//purpose :
//=======================================================================
void StepBasic_GeneralPropertyAssociation::SetDescription (const Handle(TCollection_HAsciiString)& aDescription)
{
theDescription = aDescription;
}
//=======================================================================
//function : GeneralProperty
//purpose :
//=======================================================================
Handle(StepBasic_GeneralProperty) StepBasic_GeneralPropertyAssociation::GeneralProperty() const
{
return theGeneralProperty;
}
//=======================================================================
//function : SetGeneralProperty
//purpose :
//=======================================================================
void StepBasic_GeneralPropertyAssociation::SetGeneralProperty(const Handle(StepBasic_GeneralProperty)& aGeneralProperty)
{
theGeneralProperty = aGeneralProperty;
}
//=======================================================================
//function : PropertyDefinition
//purpose :
//=======================================================================
Handle(StepRepr_PropertyDefinition) StepBasic_GeneralPropertyAssociation::PropertyDefinition() const
{
return thePropertyDefinition;
}
//=======================================================================
//function : SetPropertyDefinition
//purpose :
//=======================================================================
void StepBasic_GeneralPropertyAssociation::SetPropertyDefinition(const Handle(StepRepr_PropertyDefinition)& aPropertyDefinition)
{
thePropertyDefinition = aPropertyDefinition;
}

View File

@@ -1,84 +0,0 @@
// Copyright (c) 2024 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _StepBasic_GeneralPropertyAssociation_HeaderFile
#define _StepBasic_GeneralPropertyAssociation_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <Standard_Transient.hxx>
class TCollection_HAsciiString;
class StepBasic_GeneralProperty;
class StepRepr_PropertyDefinition;
DEFINE_STANDARD_HANDLE(StepBasic_GeneralPropertyAssociation, Standard_Transient)
//! Representation of STEP entity GeneralPropertyAssociation
class StepBasic_GeneralPropertyAssociation : public Standard_Transient
{
public:
//! Empty constructor
Standard_EXPORT StepBasic_GeneralPropertyAssociation();
//! Initialize all fields (own and inherited)
Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& aName,
const Handle(TCollection_HAsciiString)& aDescription,
const Handle(StepBasic_GeneralProperty)& aGeneralProperty,
const Handle(StepRepr_PropertyDefinition)& aPropertyDefinition);
//! Returns field Name
Standard_EXPORT Handle(TCollection_HAsciiString) Name() const;
//! Set field Name
Standard_EXPORT void SetName(const Handle(TCollection_HAsciiString)& Name);
//! Returns field Description
Standard_EXPORT Handle(TCollection_HAsciiString) Description() const;
//! Set field Description
Standard_EXPORT void SetDescription(const Handle(TCollection_HAsciiString)& Description);
//! Returns field GeneralProperty
Standard_EXPORT Handle(StepBasic_GeneralProperty) GeneralProperty() const;
//! Set field GeneralProperty
Standard_EXPORT void SetGeneralProperty(const Handle(StepBasic_GeneralProperty)& GeneralProperty);
//! Returns field PropertyDefinition
Standard_EXPORT Handle(StepRepr_PropertyDefinition) PropertyDefinition() const;
//! Set field PropertyDefinition
Standard_EXPORT void SetPropertyDefinition(const Handle(StepRepr_PropertyDefinition)& PropertyDefinition);
DEFINE_STANDARD_RTTIEXT(StepBasic_GeneralPropertyAssociation, Standard_Transient)
protected:
private:
Handle(TCollection_HAsciiString) theName;
Handle(TCollection_HAsciiString) theDescription;
Handle(StepBasic_GeneralProperty) theGeneralProperty;
Handle(StepRepr_PropertyDefinition) thePropertyDefinition;
};
#endif // _StepBasic_GeneralPropertyAssociation_HeaderFile

View File

@@ -1,137 +0,0 @@
// Copyright (c) 2024 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <StepBasic_GeneralProperty.hxx>
#include <StepBasic_GeneralPropertyRelationship.hxx>
#include <TCollection_HAsciiString.hxx>
IMPLEMENT_STANDARD_RTTIEXT(StepBasic_GeneralPropertyRelationship, Standard_Transient)
//=======================================================================
//function : StepBasic_GeneralPropertyRelationship
//purpose :
//=======================================================================
StepBasic_GeneralPropertyRelationship::StepBasic_GeneralPropertyRelationship ()
{
}
//=======================================================================
//function : Init
//purpose :
//=======================================================================
void StepBasic_GeneralPropertyRelationship::Init(const Handle(TCollection_HAsciiString)& aName,
const Standard_Boolean hasDescription,
const Handle(TCollection_HAsciiString)& aDescription,
const Handle(StepBasic_GeneralProperty)& aRelatingGeneralProperty,
const Handle(StepBasic_GeneralProperty)& aRelatedGeneralProperty)
{
theName = aName;
defDescription = hasDescription;
if (defDescription) {
theDescription = aDescription;
}
else theDescription.Nullify();
theRelatingGeneralProperty = aRelatingGeneralProperty;
theRelatedGeneralProperty = aRelatedGeneralProperty;
}
//=======================================================================
//function : Name
//purpose :
//=======================================================================
Handle(TCollection_HAsciiString) StepBasic_GeneralPropertyRelationship::Name() const
{
return theName;
}
//=======================================================================
//function : SetName
//purpose :
//=======================================================================
void StepBasic_GeneralPropertyRelationship::SetName(const Handle(TCollection_HAsciiString)& aName)
{
theName = aName;
}
//=======================================================================
//function : HasDescription
//purpose :
//=======================================================================
Standard_Boolean StepBasic_GeneralPropertyRelationship::HasDescription() const
{
return defDescription;
}
//=======================================================================
//function : Description
//purpose :
//=======================================================================
Handle(TCollection_HAsciiString) StepBasic_GeneralPropertyRelationship::Description() const
{
return theDescription;
}
//=======================================================================
//function : SetDescription
//purpose :
//=======================================================================
void StepBasic_GeneralPropertyRelationship::SetDescription (const Handle(TCollection_HAsciiString)& aDescription)
{
defDescription = true;
if (aDescription.IsNull())
{
defDescription = false;
}
theDescription = aDescription;
}
//=======================================================================
//function : RelatingGeneralProperty
//purpose :
//=======================================================================
Handle(StepBasic_GeneralProperty) StepBasic_GeneralPropertyRelationship::RelatingGeneralProperty() const
{
return theRelatingGeneralProperty;
}
//=======================================================================
//function : SetRelatingGeneralProperty
//purpose :
//=======================================================================
void StepBasic_GeneralPropertyRelationship::SetRelatingGeneralProperty(const Handle(StepBasic_GeneralProperty)& aRelatingGeneralProperty)
{
theRelatingGeneralProperty = aRelatingGeneralProperty;
}
//=======================================================================
//function : RelatedGeneralProperty
//purpose :
//=======================================================================
Handle(StepBasic_GeneralProperty) StepBasic_GeneralPropertyRelationship::RelatedGeneralProperty() const
{
return theRelatedGeneralProperty;
}
//=======================================================================
//function : SetRelatedGeneralProperty
//purpose :
//=======================================================================
void StepBasic_GeneralPropertyRelationship::SetRelatedGeneralProperty(const Handle(StepBasic_GeneralProperty)& aRelatedGeneralProperty)
{
theRelatedGeneralProperty = aRelatedGeneralProperty;
}

View File

@@ -1,88 +0,0 @@
// Copyright (c) 2024 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _StepBasic_GeneralPropertyRelationship_HeaderFile
#define _StepBasic_GeneralPropertyRelationship_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <Standard_Transient.hxx>
class TCollection_HAsciiString;
class StepBasic_GeneralProperty;
DEFINE_STANDARD_HANDLE(StepBasic_GeneralPropertyRelationship, Standard_Transient)
//! Representation of STEP entity GeneralPropertyRelationship
class StepBasic_GeneralPropertyRelationship : public Standard_Transient
{
public:
//! Empty constructor
Standard_EXPORT StepBasic_GeneralPropertyRelationship();
//! Initialize all fields (own and inherited)
Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& aName,
const Standard_Boolean hasDescription,
const Handle(TCollection_HAsciiString)& aDescription,
const Handle(StepBasic_GeneralProperty)& aRelatingGeneralProperty,
const Handle(StepBasic_GeneralProperty)& aRelatedGeneralProperty);
//! Returns field Name
Standard_EXPORT Handle(TCollection_HAsciiString) Name() const;
//! Set field Name
Standard_EXPORT void SetName(const Handle(TCollection_HAsciiString)& Name);
//! Returns True if optional field Description is defined
Standard_EXPORT Standard_Boolean HasDescription() const;
//! Returns field Description
Standard_EXPORT Handle(TCollection_HAsciiString) Description() const;
//! Set field Description
Standard_EXPORT void SetDescription(const Handle(TCollection_HAsciiString)& Description);
//! Returns field RelatingGeneralProperty
Standard_EXPORT Handle(StepBasic_GeneralProperty) RelatingGeneralProperty() const;
//! Set field RelatingGeneralProperty
Standard_EXPORT void SetRelatingGeneralProperty(const Handle(StepBasic_GeneralProperty)& RelatingGeneralProperty);
//! Returns field RelatedGeneralProperty
Standard_EXPORT Handle(StepBasic_GeneralProperty) RelatedGeneralProperty() const;
//! Set field RelatedGeneralProperty
Standard_EXPORT void SetRelatedGeneralProperty(const Handle(StepBasic_GeneralProperty)& RelatedGeneralProperty);
DEFINE_STANDARD_RTTIEXT(StepBasic_GeneralPropertyRelationship, Standard_Transient)
protected:
private:
Standard_Boolean defDescription;
Handle(TCollection_HAsciiString) theName;
Handle(TCollection_HAsciiString) theDescription;
Handle(StepBasic_GeneralProperty) theRelatingGeneralProperty;
Handle(StepBasic_GeneralProperty) theRelatedGeneralProperty;
};
#endif // _StepBasic_GeneralPropertyRelationship_HeaderFile

View File

@@ -62,7 +62,6 @@ Standard_CString StepBasic_MeasureValueMember::Name () const
case 13 : return "MASS_MEASURE"; case 13 : return "MASS_MEASURE";
case 14 : return "THERMODYNAMIC_TEMPERATURE_MEASURE"; case 14 : return "THERMODYNAMIC_TEMPERATURE_MEASURE";
case 15 : return "COUNT_MEASURE"; case 15 : return "COUNT_MEASURE";
case 16 : return "NUMERIC_MEASURE";
default : break; default : break;
} }
return ""; return "";
@@ -93,7 +92,6 @@ Standard_Boolean StepBasic_MeasureValueMember::SetName (const Standard_CString
else if (name[0] == 'M' && !strcmp (name,"MASS_MEASURE")) thecase = 13; else if (name[0] == 'M' && !strcmp (name,"MASS_MEASURE")) thecase = 13;
else if (name[1] == 'H' && !strcmp (name,"THERMODYNAMIC_TEMPERATURE_MEASURE")) thecase = 14; else if (name[1] == 'H' && !strcmp (name,"THERMODYNAMIC_TEMPERATURE_MEASURE")) thecase = 14;
else if (name[2] == 'U' && !strcmp (name,"COUNT_MEASURE")) thecase = 15; else if (name[2] == 'U' && !strcmp (name,"COUNT_MEASURE")) thecase = 15;
else if (name[0] == 'N' && !strcmp (name,"NUMERIC_MEASURE")) thecase = 16;
else return Standard_False; else return Standard_False;
return Standard_True; return Standard_True;

View File

@@ -58,7 +58,6 @@ void StepData_ConfParameters::InitFromStatic()
ReadName = Interface_Static::IVal("read.name") == 1; ReadName = Interface_Static::IVal("read.name") == 1;
ReadLayer = Interface_Static::IVal("read.layer") == 1; ReadLayer = Interface_Static::IVal("read.layer") == 1;
ReadProps = Interface_Static::IVal("read.props") == 1; ReadProps = Interface_Static::IVal("read.props") == 1;
ReadMetadata = Interface_Static::IVal("read.metadata") == 1;
WritePrecisionMode = (StepData_ConfParameters::WriteMode_PrecisionMode)Interface_Static::IVal("write.precision.mode"); WritePrecisionMode = (StepData_ConfParameters::WriteMode_PrecisionMode)Interface_Static::IVal("write.precision.mode");
WritePrecisionVal = Interface_Static::RVal("write.precision.val"); WritePrecisionVal = Interface_Static::RVal("write.precision.val");

View File

@@ -166,7 +166,6 @@ public:
bool ReadName = true; //<! NameMode is used to indicate read Name or not bool ReadName = true; //<! NameMode is used to indicate read Name or not
bool ReadLayer = true; //<! LayerMode is used to indicate read Layers or not bool ReadLayer = true; //<! LayerMode is used to indicate read Layers or not
bool ReadProps = true; //<! PropsMode is used to indicate read Validation properties or not bool ReadProps = true; //<! PropsMode is used to indicate read Validation properties or not
bool ReadMetadata = true; //! Parameter for metadata reading
// Write // Write
WriteMode_PrecisionMode WritePrecisionMode = WriteMode_PrecisionMode_Average; //<! Specifies the mode of writing the resolution value into the STEP file WriteMode_PrecisionMode WritePrecisionMode = WriteMode_PrecisionMode_Average; //<! Specifies the mode of writing the resolution value into the STEP file

View File

@@ -1000,7 +1000,7 @@ Standard_Boolean StepData_StepReaderData::ReadAny(const Standard_Integer num,
case Interface_ParamInteger: { case Interface_ParamInteger: {
if (!val.IsNull()) { if (!val.IsNull()) {
DeclareAndCast(StepData_SelectMember, sm, val); DeclareAndCast(StepData_SelectMember, sm, val);
sm->SetReal(Interface_FileReaderData::Fastof(str)); sm->SetInteger(atoi(str));
return Standard_True; return Standard_True;
} }
Handle(StepData_SelectInt) sin = new StepData_SelectInt; Handle(StepData_SelectInt) sin = new StepData_SelectInt;
@@ -1358,27 +1358,16 @@ Standard_Boolean StepData_StepReaderData::ReadInteger(const Standard_Integer num
Standard_Integer& val) const Standard_Integer& val) const
{ {
Handle(String) errmess; // Null si pas d erreur Handle(String) errmess; // Null si pas d erreur
Standard_Boolean warn = Standard_False;
if (nump > 0 && nump <= NbParams(num)) { if (nump > 0 && nump <= NbParams(num)) {
const Interface_FileParameter& FP = Param(num, nump); const Interface_FileParameter& FP = Param(num, nump);
if (FP.ParamType() == Interface_ParamInteger) if (FP.ParamType() == Interface_ParamInteger) val = atoi(FP.CValue());
val = atoi(FP.CValue()); else errmess = new String("Parameter n0.%d (%s) not an Integer");
else if (FP.ParamType() == Interface_ParamReal)
{
val = static_cast<Standard_Integer>(std::round(Interface_FileReaderData::Fastof(FP.CValue())));
if (acceptvoid) warn = Standard_True;
errmess = new String("Parameter n0.%d (%s) was rounded");
}
if (FP.ParamType() != Interface_ParamInteger &&
FP.ParamType() != Interface_ParamReal)
errmess = new String("Parameter n0.%d (%s) not an Integer");
} }
else errmess = new String("Parameter n0.%d (%s) absent"); else errmess = new String("Parameter n0.%d (%s) absent");
if (errmess.IsNull()) return Standard_True; if (errmess.IsNull()) return Standard_True;
sprintf(txtmes, errmess->ToCString(), nump, mess); sprintf(txtmes, errmess->ToCString(), nump, mess);
if (warn) ach->AddWarning(txtmes, errmess->ToCString()); ach->AddFail(txtmes, errmess->ToCString());
else ach->AddFail(txtmes, errmess->ToCString());
return Standard_False; return Standard_False;
} }

View File

@@ -151,8 +151,7 @@ void StepFile_ReadData::CreateNewText(const char* theNewText, int theLenText)
strcpy(myResText + (int)strlen(anOldResText), theNewText); strcpy(myResText + (int)strlen(anOldResText), theNewText);
return; return;
} }
strncpy(myResText, theNewText, aLength); strcpy(myResText, theNewText);
myResText[aLength] = '\0';
} }
//======================================================================= //=======================================================================

Some files were not shown because too many files have changed in this diff Show More