#include <BVH_Constants.hxx>
#include <BVH_Types.hxx>
-#include <Standard_ShortReal.hxx>
+#include <Standard_Macro.hxx>
#include <Standard_Dump.hxx>
+#include <Standard_ShortReal.hxx>
#include <limits>
void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const
{
(void)theDepth;
- OCCT_DUMP_CLASS_BEGIN (theOStream, BVH_Box);
+ //OCCT_DUMP_CLASS_BEGIN (theOStream, BVH_Box);
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsInited);
int n = Min (N, 3);
}
}
+ //! Inits the content of me into the stream
+ Standard_Boolean InitJson (const Standard_SStream& theSStream, Standard_Integer& theStreamPos)
+ {
+ Standard_Integer aPos = theStreamPos;
+
+ OCCT_INIT_FIELD_VALUE_BOOLEAN (theSStream, aPos, myIsInited);
+
+ int n = Min (N, 3);
+ if (n == 1)
+ {
+ OCCT_INIT_FIELD_VALUE_REAL (theSStream, aPos, myMinPoint[0]);
+ OCCT_INIT_FIELD_VALUE_REAL (theSStream, aPos, myMinPoint[0]);
+ }
+ if (n == 2)
+ {
+ OCCT_INIT_VECTOR_CLASS (theSStream, "MinPoint", aPos, n, &myMinPoint[0], &myMinPoint[1]);
+ OCCT_INIT_VECTOR_CLASS (theSStream, "MaxPoint", aPos, n, &myMaxPoint[0], &myMaxPoint[1]);
+ }
+ if (n == 3)
+ {
+ OCCT_INIT_VECTOR_CLASS (theSStream, "MinPoint", aPos, n, &myMinPoint[0], &myMinPoint[1], &myMinPoint[2]);
+ OCCT_INIT_VECTOR_CLASS (theSStream, "MaxPoint", aPos, n, &myMaxPoint[0], &myMaxPoint[1], &myMaxPoint[2]);
+ }
+
+ theStreamPos = aPos;
+ return Standard_True;
+ }
+
public:
//! Checks if the Box is out of the other box.
{
Standard_Integer aPos = theStreamPos;
- OCCT_INIT_VECTOR_CLASS (theSStream, CornerMin, aPos, 3, &Xmin, &Ymin, &Zmin)
- OCCT_INIT_VECTOR_CLASS (theSStream, CornerMax, aPos, 3, &Xmax, &Ymax, &Zmax)
+ OCCT_INIT_VECTOR_CLASS (theSStream, "CornerMin", aPos, 3, &Xmin, &Ymin, &Zmin)
+ OCCT_INIT_VECTOR_CLASS (theSStream, "CornerMax", aPos, 3, &Xmax, &Ymax, &Zmax)
- OCCT_INIT_FIELD_VALUE_NUMERICAL (theSStream, aPos, Gap);
- Standard_Real myFlags;
- OCCT_INIT_FIELD_VALUE_NUMERICAL (theSStream, aPos, myFlags);
- Flags = (Standard_Integer)myFlags;
+ OCCT_INIT_FIELD_VALUE_REAL (theSStream, aPos, Gap);
+ OCCT_INIT_FIELD_VALUE_INTEGER (theSStream, aPos, Flags);
theStreamPos = aPos;
return Standard_True;
//function : NbSubElements
//purpose :
//=======================================================================
-Standard_Integer MeshVS_CommonSensitiveEntity::NbSubElements()
+Standard_Integer MeshVS_CommonSensitiveEntity::NbSubElements() const
{
return myItemIndexes.Size();
}
Standard_EXPORT virtual ~MeshVS_CommonSensitiveEntity();
//! Number of elements.
- Standard_EXPORT virtual Standard_Integer NbSubElements() Standard_OVERRIDE;
+ Standard_EXPORT virtual Standard_Integer NbSubElements() const Standard_OVERRIDE;
//! Returns the amount of sub-entities of the complex entity
Standard_EXPORT virtual Standard_Integer Size() const Standard_OVERRIDE;
// Function : NbSubElements
// Purpose :
//================================================================
-Standard_Integer MeshVS_DummySensitiveEntity::NbSubElements()
+Standard_Integer MeshVS_DummySensitiveEntity::NbSubElements() const
{
return -1;
}
Standard_EXPORT virtual Standard_Boolean Matches (SelectBasics_SelectingVolumeManager& theMgr,
SelectBasics_PickResult& thePickResult) Standard_OVERRIDE;
- Standard_EXPORT virtual Standard_Integer NbSubElements() Standard_OVERRIDE;
+ Standard_EXPORT virtual Standard_Integer NbSubElements() const Standard_OVERRIDE;
Standard_EXPORT virtual Select3D_BndBox3d BoundingBox() Standard_OVERRIDE;
// function : NbSubElements
// purpose : Returns the amount of mesh nodes
//=======================================================================
-Standard_Integer MeshVS_SensitiveMesh::NbSubElements()
+Standard_Integer MeshVS_SensitiveMesh::NbSubElements() const
{
Handle(MeshVS_MeshOwner) anOwner = Handle(MeshVS_MeshOwner)::DownCast (OwnerId());
if (anOwner.IsNull())
}
//! Returns the amount of mesh nodes
- Standard_EXPORT virtual Standard_Integer NbSubElements() Standard_OVERRIDE;
+ Standard_EXPORT virtual Standard_Integer NbSubElements() const Standard_OVERRIDE;
//! Returns bounding box of mesh
Standard_EXPORT virtual Select3D_BndBox3d BoundingBox() Standard_OVERRIDE;
// function : NbSubElements
// purpose : Returns the amount of nodes of polyhedron
//=======================================================================
-Standard_Integer MeshVS_SensitivePolyhedron::NbSubElements()
+Standard_Integer MeshVS_SensitivePolyhedron::NbSubElements() const
{
return myNodes->Length();
}
SelectBasics_PickResult& thePickResult) Standard_OVERRIDE;
//! Returns the amount of nodes of polyhedron
- Standard_EXPORT virtual Standard_Integer NbSubElements() Standard_OVERRIDE;
+ Standard_EXPORT virtual Standard_Integer NbSubElements() const Standard_OVERRIDE;
Standard_EXPORT virtual Select3D_BndBox3d BoundingBox() Standard_OVERRIDE;
const gp_Pnt& thePnt4);
//! Returns the amount of sub-entities in sensitive
- virtual Standard_Integer NbSubElements() Standard_OVERRIDE
+ virtual Standard_Integer NbSubElements() const Standard_OVERRIDE
{
return 1;
};
Standard_Integer aPos = theStreamPos;
Standard_Real PerfMeterMode;
- OCCT_INIT_FIELD_VALUE_NUMERICAL (theSStream, aPos, PerfMeterMode);
+ OCCT_INIT_FIELD_VALUE_INTEGER (theSStream, aPos, PerfMeterMode);
myPerfMeterMode = (Message_PerfMeterMode)((Standard_Integer)PerfMeterMode);
- Standard_Real Limit;
- OCCT_INIT_FIELD_VALUE_NUMERICAL (theSStream, aPos, Limit);
- myLimit = (Standard_Integer)Limit;
+ OCCT_INIT_FIELD_VALUE_INTEGER (theSStream, aPos, myLimit);
theStreamPos = aPos;
return Standard_True;
{
Standard_Integer aPos = theStreamPos;
Standard_Real aRed, aGreen, aBlue;
- OCCT_INIT_VECTOR_CLASS (theSStream, RGB, aPos, 3, &aRed, &aGreen, &aBlue)
+ OCCT_INIT_VECTOR_CLASS (theSStream, "RGB", aPos, 3, &aRed, &aGreen, &aBlue)
SetValues ((Standard_ShortReal)aRed, (Standard_ShortReal)aGreen, (Standard_ShortReal)aBlue, Quantity_TOC_RGB);
return Standard_True;
Standard_Integer aPos = theStreamPos;
Standard_Real aRed, aGreen, aBlue, anAlpha;
- OCCT_INIT_VECTOR_CLASS (theSStream, RGBA, aPos, 4, &aRed, &aGreen, &aBlue, &anAlpha)
+ OCCT_INIT_VECTOR_CLASS (theSStream, "RGBA", aPos, 4, &aRed, &aGreen, &aBlue, &anAlpha)
SetValues ((Standard_ShortReal)aRed, (Standard_ShortReal)aGreen, (Standard_ShortReal)aBlue, (Standard_ShortReal)anAlpha);
return Standard_True;
// function : NbSubElements
// purpose : Returns the amount of points in set
//=======================================================================
-Standard_Integer Select3D_InteriorSensitivePointSet::NbSubElements()
+Standard_Integer Select3D_InteriorSensitivePointSet::NbSubElements() const
{
return myPlanarPolygons.Length();
}
OCCT_DUMP_CLASS_BEGIN (theOStream, Select3D_InteriorSensitivePointSet);
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Select3D_SensitiveSet);
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myBndBox);
//Select3D_VectorOfHPoly myPlanarPolygons; //!< Vector of planar polygons
//Handle(TColStd_HArray1OfInteger) myPolygonsIdxs; //!< Indexes array for BVH calculation
-
- OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myCOG);
- OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myBndBox);
}
Standard_EXPORT virtual gp_Pnt CenterOfGeometry() const Standard_OVERRIDE;
//! Returns the amount of points in set
- Standard_EXPORT virtual Standard_Integer NbSubElements() Standard_OVERRIDE;
+ Standard_EXPORT virtual Standard_Integer NbSubElements() const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const Standard_OVERRIDE;
// function : NbSubElements
// purpose : Returns the amount of sub-entities in sensitive
//=======================================================================
-Standard_Integer Select3D_SensitiveBox::NbSubElements()
+Standard_Integer Select3D_SensitiveBox::NbSubElements() const
{
return 1;
}
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Select3D_SensitiveEntity);
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myBox);
- OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myCenter3d);
}
const Standard_Real theZMax);
//! Returns the amount of sub-entities in sensitive
- Standard_EXPORT virtual Standard_Integer NbSubElements() Standard_OVERRIDE;
+ Standard_EXPORT virtual Standard_Integer NbSubElements() const Standard_OVERRIDE;
Standard_EXPORT virtual Handle(Select3D_SensitiveEntity) GetConnected() Standard_OVERRIDE;
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myOwnerId.get());
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, mySFactor);
+
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, NbSubElements());
+
+ gp_Pnt aCenterOfGeometry = CenterOfGeometry();
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &aCenterOfGeometry);
+
+ Standard_Boolean aHasInitLocation = HasInitLocation();
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, aHasInitLocation);
+
+ gp_GTrsf anInvInitLocation = InvInitLocation();
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &anInvInitLocation);
}
//! Returns the number of sub-entities or elements in sensitive entity.
//! Is used to determine if entity is complex and needs to pre-build BVH at the creation of sensitive entity step
//! or is light-weighted so the tree can be build on demand with unnoticeable delay.
- virtual Standard_Integer NbSubElements() = 0;
+ virtual Standard_Integer NbSubElements() const = 0;
//! Returns bounding box of a sensitive with transformation applied
virtual Select3D_BndBox3d BoundingBox() = 0;
// purpose : Returns the amount of sub-entities (points or planar convex
// polygons)
//=======================================================================
-Standard_Integer Select3D_SensitiveFace::NbSubElements()
+Standard_Integer Select3D_SensitiveFace::NbSubElements() const
{
return myFacePoints->NbSubElements();
}
OCCT_DUMP_CLASS_BEGIN (theOStream, Select3D_SensitiveFace);
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Select3D_SensitiveEntity);
+
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, mySensType);
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myFacePoints.get());
}
Standard_EXPORT virtual void BVH() Standard_OVERRIDE;
//! Returns the amount of sub-entities (points or planar convex polygons)
- Standard_EXPORT virtual Standard_Integer NbSubElements() Standard_OVERRIDE;
+ Standard_EXPORT virtual Standard_Integer NbSubElements() const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const Standard_OVERRIDE;
// function : NbSubElements
// purpose : Returns the amount of sub-entities
//=======================================================================
-Standard_Integer Select3D_SensitiveGroup::NbSubElements()
+Standard_Integer Select3D_SensitiveGroup::NbSubElements() const
{
return myEntities.Size();
}
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myMustMatchAll);
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myToCheckOverlapAll);
- OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myCenter);
+
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myBndBox);
//NCollection_Vector<Standard_Integer> myBVHPrimIndexes; //!< Vector of sub-entities indexes for BVH tree build
SelectBasics_PickResult& thePickResult) Standard_OVERRIDE;
//! Returns the amount of sub-entities
- Standard_EXPORT virtual Standard_Integer NbSubElements() Standard_OVERRIDE;
+ Standard_EXPORT virtual Standard_Integer NbSubElements() const Standard_OVERRIDE;
Standard_EXPORT virtual Handle(Select3D_SensitiveEntity) GetConnected() Standard_OVERRIDE;
// function : NbSubElements
// purpose : Returns the amount of sub-entities in sensitive
//=======================================================================
-Standard_Integer Select3D_SensitivePoint::NbSubElements()
+Standard_Integer Select3D_SensitivePoint::NbSubElements() const
{
return 1;
}
{
OCCT_DUMP_CLASS_BEGIN (theOStream, Select3D_SensitivePoint);
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Select3D_SensitiveEntity);
-
- OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myPoint);
}
Standard_EXPORT Select3D_SensitivePoint (const Handle(SelectMgr_EntityOwner)& theOwnerId, const gp_Pnt& thePoint);
//! Returns the amount of sub-entities in sensitive
- Standard_EXPORT virtual Standard_Integer NbSubElements() Standard_OVERRIDE;
+ Standard_EXPORT virtual Standard_Integer NbSubElements() const Standard_OVERRIDE;
Standard_EXPORT virtual Handle(Select3D_SensitiveEntity) GetConnected() Standard_OVERRIDE;
// Function: NbSubElements
// Purpose : Returns the amount of segments in poly
//==================================================
-Standard_Integer Select3D_SensitivePoly::NbSubElements()
+Standard_Integer Select3D_SensitivePoly::NbSubElements() const
{
return myPolyg.Size();
}
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Select3D_SensitiveSet);
//Select3D_PointData myPolyg; //!< Points of the poly
- OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myCOG);
//Handle(TColStd_HArray1OfInteger) mySegmentIndexes; //!< Segment indexes for BVH tree build
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myBndBox);
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsComputed);
const Standard_Integer theNbPnts = 6);
//! Returns the amount of segments in poly
- Standard_EXPORT virtual Standard_Integer NbSubElements() Standard_OVERRIDE;
+ Standard_EXPORT virtual Standard_Integer NbSubElements() const Standard_OVERRIDE;
//! Returns the 3D points of the array used at construction time.
void Points3D (Handle(TColgp_HArray1OfPnt)& theHArrayOfPnt)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myPatchDistance);
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIs3d);
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myInitLocation);
- OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myCDG3D);
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myBndBox);
//Handle(TColStd_HPackedMapOfInteger) myDetectedElemMap; //!< index map of last detected elements
//Handle(TColStd_HPackedMapOfInteger) myDetectedNodeMap; //!< index map of last detected nodes
Standard_EXPORT virtual Standard_Integer Size() const Standard_OVERRIDE;
//! Returns the amount of nodes in triangulation
- virtual Standard_Integer NbSubElements() Standard_OVERRIDE
+ virtual Standard_Integer NbSubElements() const Standard_OVERRIDE
{
return !myGroups.IsNull() ? myGroups->Size() : myBvhIndices.NbElements;
}
// function : NbSubElements
// purpose : Returns the amount of points
//=======================================================================
-Standard_Integer Select3D_SensitiveSegment::NbSubElements()
+Standard_Integer Select3D_SensitiveSegment::NbSubElements() const
{
return 2;
}
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myStart);
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myEnd);
+
+ Select3D_BndBox3d aBoundingBox = ((Select3D_SensitiveSegment*)this)->BoundingBox();
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &aBoundingBox);
}
const gp_Pnt& EndPoint() const { return myEnd; }
//! Returns the amount of points
- Standard_EXPORT virtual Standard_Integer NbSubElements() Standard_OVERRIDE;
+ Standard_EXPORT virtual Standard_Integer NbSubElements() const Standard_OVERRIDE;
Standard_EXPORT virtual Handle(Select3D_SensitiveEntity) GetConnected() Standard_OVERRIDE;
OCCT_DUMP_CLASS_BEGIN (theOStream, Select3D_SensitiveSet);
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Select3D_SensitiveEntity);
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myContent);
+
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDetectedIdx);
+
+ Select3D_BndBox3d aBoundingBox = ((Select3D_SensitiveSet*)this)->BoundingBox();
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &aBoundingBox);
}
//! Returns the tree built for set of sensitives
const opencascade::handle<BVH_Tree<Standard_Real, 3> >& GetBVH() { return BVH(); }
+ //! Dumps the content of me into the stream
+ void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const
+ { (void)theOStream; (void)theDepth; }
+
protected:
Select3D_SensitiveSet* mySensitiveSet; //!< Set of sensitive entities
};
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, mySensType);
- OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myCentroid);
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myPoints[0]);
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myPoints[1]);
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myPoints[2]);
+
+ Select3D_BndBox3d aBoundingBox = ((Select3D_SensitiveTriangle*)this)->BoundingBox();
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &aBoundingBox);
}
Standard_EXPORT virtual Select3D_BndBox3d BoundingBox() Standard_OVERRIDE;
//! Returns the amount of points
- virtual Standard_Integer NbSubElements() Standard_OVERRIDE { return 3; }
+ virtual Standard_Integer NbSubElements() const Standard_OVERRIDE { return 3; }
virtual gp_Pnt CenterOfGeometry() const Standard_OVERRIDE { return myCentroid; }
// function : NbSubElements
// purpose : Returns the amount of nodes in triangulation
//=======================================================================
-Standard_Integer Select3D_SensitiveTriangulation::NbSubElements()
+Standard_Integer Select3D_SensitiveTriangulation::NbSubElements() const
{
return myTriangul->Nodes().Length();
}
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myTriangul.get());
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myInitLocation);
- OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myCDG3D);
//Handle(TColStd_HArray1OfInteger) myFreeEdges;
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, mySensType);
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myPrimitivesNb);
const Standard_Boolean theIsInterior);
//! Returns the amount of nodes in triangulation
- Standard_EXPORT virtual Standard_Integer NbSubElements() Standard_OVERRIDE;
+ Standard_EXPORT virtual Standard_Integer NbSubElements() const Standard_OVERRIDE;
Standard_EXPORT Handle(Select3D_SensitiveEntity) GetConnected() Standard_OVERRIDE;
// function : NbSubElements
// purpose : Returns the amount of sub-entities
//=======================================================================
-Standard_Integer Select3D_SensitiveWire::NbSubElements()
+Standard_Integer Select3D_SensitiveWire::NbSubElements() const
{
return myEntities.Length();
}
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, anEntity.get());
}
//NCollection_Vector<Standard_Integer> myEntityIndexes; //!< Indexes of entities for BVH build
- OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myCenter);
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myBndBox);
}
Standard_EXPORT void Add (const Handle(Select3D_SensitiveEntity)& theSensitive);
//! Returns the amount of sub-entities
- Standard_EXPORT virtual Standard_Integer NbSubElements() Standard_OVERRIDE;
+ Standard_EXPORT virtual Standard_Integer NbSubElements() const Standard_OVERRIDE;
Standard_EXPORT virtual Handle(Select3D_SensitiveEntity) GetConnected() Standard_OVERRIDE;
if (!aValueText.IsRealValue())
return Standard_False;
- *(va_arg(vl, Standard_Real*)) = aValueText.RealValue();
+ Standard_Real aValue = aValueText.RealValue();
+ *(va_arg(vl, Standard_Real*)) = aValue;
aStreamPos = aNextPos + JsonKeyLength (Standard_JsonKey_SeparatorValueToValue);
//theOStream << va_arg(vl, Standard_Real);
}
//=======================================================================
-//function : InitRealValue
+//function : InitValue
//purpose :
//=======================================================================
-Standard_Boolean Standard_Dump::InitRealValue (const Standard_SStream& theStream,
- Standard_Integer& theStreamPos,
- Standard_Real& theValue)
+Standard_Boolean Standard_Dump::InitValue (const Standard_SStream& theStream,
+ Standard_Integer& theStreamPos,
+ TCollection_AsciiString& theValue)
{
Standard_Integer aStreamPos = theStreamPos;
aNextKey = Standard_JsonKey_CloseChild;
}
- TCollection_AsciiString aValueText = aNextPos ? aSubText.SubString (aStreamPos, aNextPos - 1) : aSubText;
- if (!aValueText.IsRealValue())
- return Standard_False;
-
- theValue = aValueText.RealValue();
+ theValue = aNextPos ? aSubText.SubString (aStreamPos, aNextPos - 1) : aSubText;
theStreamPos = aNextPos ? (theStreamPos + (aNextPos - aStreamPos) + JsonKeyLength (aNextKey)) : aText.Length();
-
return Standard_True;
}
theOStream << "\"" << aName << "\": " << theField; \
}
+//! @def OCCT_INIT_FIELD_VALUE_REAL
+//! Append vector values into output value: "Name": [value_1, value_2, ...]
+//! This macro is intended to have only one row for dumped object in Json.
+//! It's possible to use it without necessity of OCCT_DUMP_CLASS_BEGIN call, but pay attention that it should be only one row in the object dump.
+#define OCCT_INIT_FIELD_VALUE_REAL(theOStream, theStreamPos, theField) \
+{ \
+ Standard_Integer aStreamPos = theStreamPos; \
+ if (!Standard_Dump::ProcessFieldName (theOStream, #theField, aStreamPos)) \
+ return Standard_False; \
+ TCollection_AsciiString aValueText; \
+ if (!Standard_Dump::InitValue (theOStream, aStreamPos, aValueText) || !aValueText.IsRealValue()) \
+ return Standard_False; \
+ theField = aValueText.RealValue(); \
+ theStreamPos = aStreamPos; \
+}
+
+//! @def OCCT_INIT_FIELD_VALUE_NUMERICAL
+//! Append vector values into output value: "Name": [value_1, value_2, ...]
+//! This macro is intended to have only one row for dumped object in Json.
+//! It's possible to use it without necessity of OCCT_DUMP_CLASS_BEGIN call, but pay attention that it should be only one row in the object dump.
+#define OCCT_INIT_FIELD_VALUE_INTEGER(theOStream, theStreamPos, theField) \
+{ \
+ Standard_Integer aStreamPos = theStreamPos; \
+ if (!Standard_Dump::ProcessFieldName (theOStream, #theField, aStreamPos)) \
+ return Standard_False; \
+ TCollection_AsciiString aValueText; \
+ if (!Standard_Dump::InitValue (theOStream, aStreamPos, aValueText) || !aValueText.IsIntegerValue()) \
+ return Standard_False; \
+ theField = aValueText.IntegerValue(); \
+ theStreamPos = aStreamPos; \
+}
+
//! @def OCCT_INIT_FIELD_VALUE_NUMERICAL
//! Append vector values into output value: "Name": [value_1, value_2, ...]
//! This macro is intended to have only one row for dumped object in Json.
//! It's possible to use it without necessity of OCCT_DUMP_CLASS_BEGIN call, but pay attention that it should be only one row in the object dump.
-#define OCCT_INIT_FIELD_VALUE_NUMERICAL(theOStream, theStreamPos, theField) \
+#define OCCT_INIT_FIELD_VALUE_BOOLEAN(theOStream, theStreamPos, theField) \
{ \
Standard_Integer aStreamPos = theStreamPos; \
if (!Standard_Dump::ProcessFieldName (theOStream, #theField, aStreamPos)) \
return Standard_False; \
- if (!Standard_Dump::InitRealValue (theOStream, aStreamPos, theField)) \
+ TCollection_AsciiString aValueText; \
+ if (!Standard_Dump::InitValue (theOStream, aStreamPos, aValueText) || !aValueText.IsIntegerValue()) \
return Standard_False; \
+ theField = (Standard_Boolean)aValueText.IntegerValue(); \
theStreamPos = aStreamPos; \
}
#define OCCT_DUMP_VECTOR_CLASS(theOStream, theName, theCount, ...) \
{ \
Standard_Dump::AddValuesSeparator (theOStream); \
- theOStream << "\"" << OCCT_CLASS_NAME(theName) << "\": ["; \
+ theOStream << "\"" << theName << "\": ["; \
Standard_Dump::DumpRealValues (theOStream, theCount, __VA_ARGS__);\
theOStream << "]"; \
}
#define OCCT_INIT_VECTOR_CLASS(theOStream, theName, theStreamPos, theCount, ...) \
{ \
Standard_Integer aStreamPos = theStreamPos; \
- if (!Standard_Dump::ProcessStreamName (theOStream, OCCT_CLASS_NAME(theName), aStreamPos)) \
+ if (!Standard_Dump::ProcessStreamName (theOStream, theName, aStreamPos)) \
return Standard_False; \
if (!Standard_Dump::InitRealValues (theOStream, aStreamPos, theCount, __VA_ARGS__)) \
return Standard_False; \
//! @param theSStream stream with values
//! @param theStreamPos current position in the stream
//! @param theValue stream value
- Standard_EXPORT static Standard_Boolean InitRealValue (const Standard_SStream& theStream,
- Standard_Integer& theStreamPos,
- Standard_Real& theValue);
+ Standard_EXPORT static Standard_Boolean InitValue (const Standard_SStream& theStream,
+ Standard_Integer& theStreamPos,
+ TCollection_AsciiString& theValue);
//! Convert field name into dump text value, removes "&" and "my" prefixes
//! An example, for field myValue, theName is Value, for &myCLass, the name is Class
void gp_Ax1::DumpJson (Standard_OStream& theOStream, const Standard_Integer) const
{
- OCCT_DUMP_VECTOR_CLASS (theOStream, Location, 3, loc.X(), loc.Y(), loc.Z())
- OCCT_DUMP_VECTOR_CLASS (theOStream, Direction, 3, vdir.X(), vdir.Y(), vdir.Z())
+ OCCT_DUMP_VECTOR_CLASS (theOStream, "Location", 3, loc.X(), loc.Y(), loc.Z())
+ OCCT_DUMP_VECTOR_CLASS (theOStream, "Direction", 3, vdir.X(), vdir.Y(), vdir.Z())
}
Standard_Boolean gp_Ax1::InitJson (const Standard_SStream& theSStream, Standard_Integer& theStreamPos)
Standard_Integer aPos = theStreamPos;
gp_XYZ& anXYZLoc = loc.ChangeCoord();
- OCCT_INIT_VECTOR_CLASS (theSStream, Location, aPos, 3, &anXYZLoc.ChangeCoord (1), &anXYZLoc.ChangeCoord (2), &anXYZLoc.ChangeCoord (3))
+ OCCT_INIT_VECTOR_CLASS (theSStream, "Location", aPos, 3, &anXYZLoc.ChangeCoord (1), &anXYZLoc.ChangeCoord (2), &anXYZLoc.ChangeCoord (3))
gp_XYZ aDir;
- OCCT_INIT_VECTOR_CLASS (theSStream, Direction, aPos, 3, &aDir.ChangeCoord (1), &aDir.ChangeCoord (2), &aDir.ChangeCoord (3))
+ OCCT_INIT_VECTOR_CLASS (theSStream, "Direction", aPos, 3, &aDir.ChangeCoord (1), &aDir.ChangeCoord (2), &aDir.ChangeCoord (3))
SetDirection (aDir);
theStreamPos = aPos;
void gp_Ax2::DumpJson (Standard_OStream& theOStream, const Standard_Integer) const
{
- OCCT_DUMP_VECTOR_CLASS (theOStream, Location, 3, axis.Location().X(), axis.Location().Y(), axis.Location().Z())
- OCCT_DUMP_VECTOR_CLASS (theOStream, Direction, 3, axis.Direction().X(), axis.Direction().Y(), axis.Direction().Z())
+ OCCT_DUMP_VECTOR_CLASS (theOStream, "Location", 3, axis.Location().X(), axis.Location().Y(), axis.Location().Z())
+ OCCT_DUMP_VECTOR_CLASS (theOStream, "Direction", 3, axis.Direction().X(), axis.Direction().Y(), axis.Direction().Z())
- OCCT_DUMP_VECTOR_CLASS (theOStream, XDirection, 3, vxdir.X(), vxdir.Y(), vxdir.Z())
- OCCT_DUMP_VECTOR_CLASS (theOStream, YDirection, 3, vydir.X(), vydir.Y(), vydir.Z())
+ OCCT_DUMP_VECTOR_CLASS (theOStream, "XDirection", 3, vxdir.X(), vxdir.Y(), vxdir.Z())
+ OCCT_DUMP_VECTOR_CLASS (theOStream, "YDirection", 3, vydir.X(), vydir.Y(), vydir.Z())
}
Standard_Boolean gp_Ax2::InitJson (const Standard_SStream& theSStream, Standard_Integer& theStreamPos)
Standard_Integer aPos = theStreamPos;
gp_XYZ anXYZLoc;
- OCCT_INIT_VECTOR_CLASS (theSStream, Location, aPos, 3, &anXYZLoc.ChangeCoord (1), &anXYZLoc.ChangeCoord (2), &anXYZLoc.ChangeCoord (3))
+ OCCT_INIT_VECTOR_CLASS (theSStream, "Location", aPos, 3, &anXYZLoc.ChangeCoord (1), &anXYZLoc.ChangeCoord (2), &anXYZLoc.ChangeCoord (3))
SetLocation (anXYZLoc);
gp_XYZ aDir;
- OCCT_INIT_VECTOR_CLASS (theSStream, Direction, aPos, 3, &aDir.ChangeCoord (1), &aDir.ChangeCoord (2), &aDir.ChangeCoord (3))
+ OCCT_INIT_VECTOR_CLASS (theSStream, "Direction", aPos, 3, &aDir.ChangeCoord (1), &aDir.ChangeCoord (2), &aDir.ChangeCoord (3))
gp_XYZ aXDir;
- OCCT_INIT_VECTOR_CLASS (theSStream, XDirection, aPos, 3, &aXDir.ChangeCoord (1), &aXDir.ChangeCoord (2), &aXDir.ChangeCoord (3))
+ OCCT_INIT_VECTOR_CLASS (theSStream, "XDirection", aPos, 3, &aXDir.ChangeCoord (1), &aXDir.ChangeCoord (2), &aXDir.ChangeCoord (3))
gp_XYZ anYDir;
- OCCT_INIT_VECTOR_CLASS (theSStream, YDirection, aPos, 3, &anYDir.ChangeCoord (1), &anYDir.ChangeCoord (2), &anYDir.ChangeCoord (3))
+ OCCT_INIT_VECTOR_CLASS (theSStream, "YDirection", aPos, 3, &anYDir.ChangeCoord (1), &anYDir.ChangeCoord (2), &anYDir.ChangeCoord (3))
SetXDirection (aXDir);
SetYDirection (anYDir);
void gp_Ax3::DumpJson (Standard_OStream& theOStream, const Standard_Integer) const
{
- OCCT_DUMP_VECTOR_CLASS (theOStream, Location, 3, Location().X(), Location().Y(), Location().Z())
- OCCT_DUMP_VECTOR_CLASS (theOStream, Direction, 3, Direction().X(), Direction().Y(), Direction().Z())
+ OCCT_DUMP_VECTOR_CLASS (theOStream, "Location", 3, Location().X(), Location().Y(), Location().Z())
+ OCCT_DUMP_VECTOR_CLASS (theOStream, "Direction", 3, Direction().X(), Direction().Y(), Direction().Z())
- OCCT_DUMP_VECTOR_CLASS (theOStream, XDirection, 3, XDirection().X(), XDirection().Y(), XDirection().Z())
- OCCT_DUMP_VECTOR_CLASS (theOStream, YDirection, 3, YDirection().X(), YDirection().Y(), YDirection().Z())
+ OCCT_DUMP_VECTOR_CLASS (theOStream, "XDirection", 3, XDirection().X(), XDirection().Y(), XDirection().Z())
+ OCCT_DUMP_VECTOR_CLASS (theOStream, "YDirection", 3, YDirection().X(), YDirection().Y(), YDirection().Z())
}
Standard_Boolean gp_Ax3::InitJson (const Standard_SStream& theSStream, Standard_Integer& theStreamPos)
Standard_Integer aPos = theStreamPos;
gp_XYZ anXYZLoc;
- OCCT_INIT_VECTOR_CLASS (theSStream, Location, aPos, 3, &anXYZLoc.ChangeCoord (1), &anXYZLoc.ChangeCoord (2), &anXYZLoc.ChangeCoord (3))
+ OCCT_INIT_VECTOR_CLASS (theSStream, "Location", aPos, 3, &anXYZLoc.ChangeCoord (1), &anXYZLoc.ChangeCoord (2), &anXYZLoc.ChangeCoord (3))
SetLocation (anXYZLoc);
gp_XYZ aDir;
- OCCT_INIT_VECTOR_CLASS (theSStream, Direction, aPos, 3, &aDir.ChangeCoord (1), &aDir.ChangeCoord (2), &aDir.ChangeCoord (3))
+ OCCT_INIT_VECTOR_CLASS (theSStream, "Direction", aPos, 3, &aDir.ChangeCoord (1), &aDir.ChangeCoord (2), &aDir.ChangeCoord (3))
gp_XYZ aXDir;
- OCCT_INIT_VECTOR_CLASS (theSStream, XDirection, aPos, 3, &aXDir.ChangeCoord (1), &aXDir.ChangeCoord (2), &aXDir.ChangeCoord (3))
+ OCCT_INIT_VECTOR_CLASS (theSStream, "XDirection", aPos, 3, &aXDir.ChangeCoord (1), &aXDir.ChangeCoord (2), &aXDir.ChangeCoord (3))
gp_XYZ anYDir;
- OCCT_INIT_VECTOR_CLASS (theSStream, YDirection, aPos, 3, &anYDir.ChangeCoord (1), &anYDir.ChangeCoord (2), &anYDir.ChangeCoord (3))
+ OCCT_INIT_VECTOR_CLASS (theSStream, "YDirection", aPos, 3, &anYDir.ChangeCoord (1), &anYDir.ChangeCoord (2), &anYDir.ChangeCoord (3))
SetXDirection (aXDir);
SetYDirection (anYDir);
void gp_Dir::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
{
- OCCT_DUMP_VECTOR_CLASS (theOStream, gp_Dir, 3, coord.X(), coord.Y(), coord.Z())
+ OCCT_DUMP_VECTOR_CLASS (theOStream, "gp_Dir", 3, coord.X(), coord.Y(), coord.Z())
}
Standard_Boolean gp_Dir::InitJson (const Standard_SStream& theSStream, Standard_Integer& theStreamPos)
{
Standard_Integer aPos = theStreamPos;
- OCCT_INIT_VECTOR_CLASS (theSStream, gp_Dir, aPos, 3, &coord.ChangeCoord (1), &coord.ChangeCoord (2), &coord.ChangeCoord (3))
+ OCCT_INIT_VECTOR_CLASS (theSStream, "gp_Dir", aPos, 3, &coord.ChangeCoord (1), &coord.ChangeCoord (2), &coord.ChangeCoord (3))
theStreamPos = aPos;
return Standard_True;
//=======================================================================
void gp_Mat::DumpJson (Standard_OStream& theOStream, const Standard_Integer) const
{
- OCCT_DUMP_VECTOR_CLASS (theOStream, gp_Mat, 9, Mat00, Mat01, Mat02, Mat10, Mat11, Mat12, Mat20, Mat21, Mat22);
+ OCCT_DUMP_VECTOR_CLASS (theOStream, "gp_Mat", 9, Mat00, Mat01, Mat02, Mat10, Mat11, Mat12, Mat20, Mat21, Mat22);
}
void gp_Pnt::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
{
- OCCT_DUMP_VECTOR_CLASS (theOStream, gp_Pnt, 3, coord.X(), coord.Y(), coord.Z())
+ OCCT_DUMP_VECTOR_CLASS (theOStream, "gp_Pnt", 3, coord.X(), coord.Y(), coord.Z())
}
Standard_Boolean gp_Pnt::InitJson (const Standard_SStream& theSStream, Standard_Integer& theStreamPos)
{
Standard_Integer aPos = theStreamPos;
- OCCT_INIT_VECTOR_CLASS (theSStream, gp_Pnt, aPos, 3, &coord.ChangeCoord (1), &coord.ChangeCoord (2), &coord.ChangeCoord (3))
+ OCCT_INIT_VECTOR_CLASS (theSStream, "gp_Pnt", aPos, 3, &coord.ChangeCoord (1), &coord.ChangeCoord (2), &coord.ChangeCoord (3))
theStreamPos = aPos;
return Standard_True;
//=======================================================================
void gp_Trsf::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
{
- OCCT_DUMP_VECTOR_CLASS (theOStream, Location, 3, loc.X(), loc.Y(), loc.Z())
- OCCT_DUMP_VECTOR_CLASS (theOStream, Matrix, 9, matrix.Value(1, 1), matrix.Value(1, 2), matrix.Value(1, 3),
- matrix.Value(2, 1), matrix.Value(2, 2), matrix.Value(2, 3),
- matrix.Value(3, 1), matrix.Value(3, 2), matrix.Value(3, 3))
-
+ OCCT_DUMP_VECTOR_CLASS (theOStream, "Location", 3, loc.X(), loc.Y(), loc.Z())
+ OCCT_DUMP_VECTOR_CLASS (theOStream, "Matrix", 9, matrix.Value(1, 1), matrix.Value(1, 2), matrix.Value(1, 3),
+ matrix.Value(2, 1), matrix.Value(2, 2), matrix.Value(2, 3),
+ matrix.Value(3, 1), matrix.Value(3, 2), matrix.Value(3, 3))
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, shape);
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, scale);
}
Standard_Integer aPos = theStreamPos;
gp_XYZ anXYZLoc;
- OCCT_INIT_VECTOR_CLASS (theSStream, Location, aPos, 3, &anXYZLoc.ChangeCoord (1), &anXYZLoc.ChangeCoord (2), &anXYZLoc.ChangeCoord (3))
+ OCCT_INIT_VECTOR_CLASS (theSStream, "Location", aPos, 3, &anXYZLoc.ChangeCoord (1), &anXYZLoc.ChangeCoord (2), &anXYZLoc.ChangeCoord (3))
SetTranslation (anXYZLoc);
- //OCCT_INIT_VECTOR_CLASS (theSStream, Matrix, aPos, 9, matrix.ChangeValue (1, 1), matrix.ChangeValue (1, 2), matrix.ChangeValue (1, 3),
- // matrix.ChangeValue (2, 1), matrix.ChangeValue (2, 2), matrix.ChangeValue (2, 3),
- // matrix.ChangeValue (3, 1), matrix.ChangeValue (3, 2), matrix.ChangeValue (3, 3))
-
Standard_Real mymatrix[3][3];
- //Standard_Real M00, M01, M02, M10, M11, M12, M20, M21, M22;
- //OCCT_INIT_VECTOR_CLASS (theSStream, Matrix, aPos, 9, &mymatrix[0][0], &mymatrix[0][1], &mymatrix[0][2],
- // &mymatrix[1][0], &mymatrix[1][1], &mymatrix[1][2],
- // &mymatrix[2][0], &mymatrix[2][1], &mymatrix[2][2])
-
- OCCT_INIT_VECTOR_CLASS (theSStream, Matrix, aPos, 9, &mymatrix[0][0], &mymatrix[0][1], &mymatrix[0][2],
- &mymatrix[1][0], &mymatrix[1][1], &mymatrix[1][2],
- &mymatrix[2][0], &mymatrix[2][1], &mymatrix[2][2])
+ OCCT_INIT_VECTOR_CLASS (theSStream, "Matrix", aPos, 9, &mymatrix[0][0], &mymatrix[0][1], &mymatrix[0][2],
+ &mymatrix[1][0], &mymatrix[1][1], &mymatrix[1][2],
+ &mymatrix[2][0], &mymatrix[2][1], &mymatrix[2][2])
for (int i = 0; i < 3; i++)
{
for (int j = 0; j < 3; j++)
}
Standard_Real myshape;
- OCCT_INIT_FIELD_VALUE_NUMERICAL (theSStream, aPos, myshape);
+ OCCT_INIT_FIELD_VALUE_INTEGER (theSStream, aPos, myshape);
shape = (gp_TrsfForm)((Standard_Integer)myshape);
- OCCT_INIT_FIELD_VALUE_NUMERICAL (theSStream, aPos, scale);
+ OCCT_INIT_FIELD_VALUE_REAL (theSStream, aPos, scale);
theStreamPos = aPos;
return Standard_True;
//=======================================================================
void gp_XYZ::DumpJson (Standard_OStream& theOStream, const Standard_Integer) const
{
- OCCT_DUMP_VECTOR_CLASS (theOStream, gp_XYZ, 3, x, y, z)
+ OCCT_DUMP_VECTOR_CLASS (theOStream, "gp_XYZ", 3, x, y, z)
}
//=======================================================================
Standard_Boolean gp_XYZ::InitJson (const Standard_SStream& theSStream, Standard_Integer& theStreamPos)
{
Standard_Integer aPos = theStreamPos;
- OCCT_INIT_VECTOR_CLASS (theSStream, gp_XYZ, aPos, 3, &x, &y, &z)
+ OCCT_INIT_VECTOR_CLASS (theSStream, "gp_XYZ", aPos, 3, &x, &y, &z)
theStreamPos = aPos;
return Standard_True;
thePresentations.Append (new Convert_TransientShape (aShape));
return;
}
+
+ BVH_Box<Standard_Real, 3> aBVHBox; // Graphic3d_BndBox3d
+ if (aBVHBox.InitJson (theSStream, aStartPos))
+ {
+ Bnd_Box aCornerBox (gp_Pnt (aBVHBox.CornerMin().x(), aBVHBox.CornerMin().y(), aBVHBox.CornerMin().z()),
+ gp_Pnt (aBVHBox.CornerMax().x(), aBVHBox.CornerMax().y(), aBVHBox.CornerMax().z()));
+ TopoDS_Shape aShape;
+ if (Convert_Tools::CreateShape (aCornerBox, aShape))
+ thePresentations.Append (new Convert_TransientShape (aShape));
+ return;
+ }
}
//=======================================================================
Standard_Boolean aThinOnY = fabs (thePntMin.Y() - thePntMax.Y()) < Precision::Confusion();
Standard_Boolean aThinOnZ = fabs (thePntMin.Z() - thePntMax.Z()) < Precision::Confusion();
- if (((int)aThinOnX + (int)aThinOnY + (int)aThinOnZ) > 1) // thin box in several directions is a point
+ BRep_Builder aBuilder;
+ TopoDS_Compound aCompound;
+ aBuilder.MakeCompound (aCompound);
+
+ if (((int)aThinOnX + (int)aThinOnY + (int)aThinOnZ) == 3) // thin box in all directions is a point
{
- BRep_Builder aBuilder;
- TopoDS_Compound aCompound;
- aBuilder.MakeCompound (aCompound);
aBuilder.Add (aCompound, BRepBuilderAPI_MakeVertex (thePntMin));
theShape = aCompound;
return Standard_True;
}
+ if (((int)aThinOnX + (int)aThinOnY + (int)aThinOnZ) == 2) // thin box in two directions is a point
+ {
+ aBuilder.Add (aCompound, BRepBuilderAPI_MakeEdge (thePntMin, thePntMax));
+ theShape = aCompound;
+ return Standard_True;
+ }
+
+ // thin box in only one direction is a compuund of edges
if (aThinOnX || aThinOnY || aThinOnZ)
{
- gp_Pnt aPnt1, aPnt2, aPnt3, aPnt4 ;
+ gp_Pnt aPnt1, aPnt2, aPnt3, aPnt4;
if (aThinOnX)
{
aPnt1 = gp_Pnt(thePntMin.X(), thePntMin.Y(), thePntMin.Z());
aPnt3 = gp_Pnt(thePntMax.X(), thePntMax.Y(), thePntMin.Z());
aPnt4 = gp_Pnt(thePntMin.X(), thePntMax.Y(), thePntMin.Z());
}
- BRep_Builder aBuilder;
- TopoDS_Compound aCompound;
- aBuilder.MakeCompound (aCompound);
aBuilder.Add (aCompound, BRepBuilderAPI_MakeEdge (aPnt1, aPnt2));
aBuilder.Add (aCompound, BRepBuilderAPI_MakeEdge (aPnt2, aPnt3));
aBuilder.Add (aCompound, BRepBuilderAPI_MakeEdge (aPnt3, aPnt4));