- Converted generic template files to direct implementations for three packages (Extrema, MAT, TopBas/HLRAlgo)
- Removed preprocessor macro-based includes and replaced with concrete type definitions
- Updated CMake FILES lists to remove deprecated `.gxx` and `.lxx` files
#include <Standard_Type.hxx>
-#define Handle_TheKey Handle(IGESData_HArray1OfIGESEntity)
-#define TheKey IGESData_HArray1OfIGESEntity
-#define TheKey_hxx <IGESData_HArray1OfIGESEntity.hxx>
-#define Interface_JaggedArray IGESBasic_HArray1OfHArray1OfIGESEntity
-#define Interface_JaggedArray_hxx <IGESBasic_HArray1OfHArray1OfIGESEntity.hxx>
-#define Handle_Interface_JaggedArray Handle(IGESBasic_HArray1OfHArray1OfIGESEntity)
-#include <Interface_JaggedArray.gxx>
+IGESBasic_HArray1OfHArray1OfIGESEntity::IGESBasic_HArray1OfHArray1OfIGESEntity(
+ const Standard_Integer low,
+ const Standard_Integer up)
+ : thelist(low, up)
+{
+ Handle(Standard_Transient) nulo;
+ thelist.Init(nulo);
+}
+
+Standard_Integer IGESBasic_HArray1OfHArray1OfIGESEntity::Lower() const
+{
+ return thelist.Lower();
+}
+
+Standard_Integer IGESBasic_HArray1OfHArray1OfIGESEntity::Upper() const
+{
+ return thelist.Upper();
+}
+
+Standard_Integer IGESBasic_HArray1OfHArray1OfIGESEntity::Length() const
+{
+ return thelist.Length();
+}
+
+void IGESBasic_HArray1OfHArray1OfIGESEntity::SetValue(
+ const Standard_Integer num,
+ const Handle(IGESData_HArray1OfIGESEntity)& val)
+{
+ thelist.SetValue(num, val);
+}
+
+Handle(IGESData_HArray1OfIGESEntity) IGESBasic_HArray1OfHArray1OfIGESEntity::Value(
+ const Standard_Integer num) const
+{
+ return Handle(IGESData_HArray1OfIGESEntity)::DownCast(thelist.Value(num));
+}
#include <Standard_Type.hxx>
-#define Handle_TheKey Handle(TColStd_HArray1OfInteger)
-#define TheKey TColStd_HArray1OfInteger
-#define TheKey_hxx <TColStd_HArray1OfInteger.hxx>
-#define Interface_JaggedArray IGESBasic_HArray1OfHArray1OfInteger
-#define Interface_JaggedArray_hxx <IGESBasic_HArray1OfHArray1OfInteger.hxx>
-#define Handle_Interface_JaggedArray Handle(IGESBasic_HArray1OfHArray1OfInteger)
-#include <Interface_JaggedArray.gxx>
+IGESBasic_HArray1OfHArray1OfInteger::IGESBasic_HArray1OfHArray1OfInteger(const Standard_Integer low,
+ const Standard_Integer up)
+ : thelist(low, up)
+{
+ Handle(Standard_Transient) nulo;
+ thelist.Init(nulo);
+}
+
+Standard_Integer IGESBasic_HArray1OfHArray1OfInteger::Lower() const
+{
+ return thelist.Lower();
+}
+
+Standard_Integer IGESBasic_HArray1OfHArray1OfInteger::Upper() const
+{
+ return thelist.Upper();
+}
+
+Standard_Integer IGESBasic_HArray1OfHArray1OfInteger::Length() const
+{
+ return thelist.Length();
+}
+
+void IGESBasic_HArray1OfHArray1OfInteger::SetValue(const Standard_Integer num,
+ const Handle(TColStd_HArray1OfInteger)& val)
+{
+ thelist.SetValue(num, val);
+}
+
+Handle(TColStd_HArray1OfInteger) IGESBasic_HArray1OfHArray1OfInteger::Value(
+ const Standard_Integer num) const
+{
+ return Handle(TColStd_HArray1OfInteger)::DownCast(thelist.Value(num));
+}
#include <Standard_Type.hxx>
-#define Handle_TheKey Handle(TColStd_HArray1OfReal)
-#define TheKey TColStd_HArray1OfReal
-#define TheKey_hxx <TColStd_HArray1OfReal.hxx>
-#define Interface_JaggedArray IGESBasic_HArray1OfHArray1OfReal
-#define Interface_JaggedArray_hxx <IGESBasic_HArray1OfHArray1OfReal.hxx>
-#define Handle_Interface_JaggedArray Handle(IGESBasic_HArray1OfHArray1OfReal)
-#include <Interface_JaggedArray.gxx>
+IGESBasic_HArray1OfHArray1OfReal::IGESBasic_HArray1OfHArray1OfReal(const Standard_Integer low,
+ const Standard_Integer up)
+ : thelist(low, up)
+{
+ Handle(Standard_Transient) nulo;
+ thelist.Init(nulo);
+}
+
+Standard_Integer IGESBasic_HArray1OfHArray1OfReal::Lower() const
+{
+ return thelist.Lower();
+}
+
+Standard_Integer IGESBasic_HArray1OfHArray1OfReal::Upper() const
+{
+ return thelist.Upper();
+}
+
+Standard_Integer IGESBasic_HArray1OfHArray1OfReal::Length() const
+{
+ return thelist.Length();
+}
+
+void IGESBasic_HArray1OfHArray1OfReal::SetValue(const Standard_Integer num,
+ const Handle(TColStd_HArray1OfReal)& val)
+{
+ thelist.SetValue(num, val);
+}
+
+Handle(TColStd_HArray1OfReal) IGESBasic_HArray1OfHArray1OfReal::Value(
+ const Standard_Integer num) const
+{
+ return Handle(TColStd_HArray1OfReal)::DownCast(thelist.Value(num));
+}
#include <Standard_Type.hxx>
-#define Handle_TheKey Handle(TColgp_HArray1OfXYZ)
-#define TheKey TColgp_HArray1OfXYZ
-#define TheKey_hxx <TColgp_HArray1OfXYZ.hxx>
-#define Interface_JaggedArray IGESBasic_HArray1OfHArray1OfXYZ
-#define Interface_JaggedArray_hxx <IGESBasic_HArray1OfHArray1OfXYZ.hxx>
-#define Handle_Interface_JaggedArray Handle(IGESBasic_HArray1OfHArray1OfXYZ)
-#include <Interface_JaggedArray.gxx>
+IGESBasic_HArray1OfHArray1OfXYZ::IGESBasic_HArray1OfHArray1OfXYZ(const Standard_Integer low,
+ const Standard_Integer up)
+ : thelist(low, up)
+{
+ Handle(Standard_Transient) nulo;
+ thelist.Init(nulo);
+}
+
+Standard_Integer IGESBasic_HArray1OfHArray1OfXYZ::Lower() const
+{
+ return thelist.Lower();
+}
+
+Standard_Integer IGESBasic_HArray1OfHArray1OfXYZ::Upper() const
+{
+ return thelist.Upper();
+}
+
+Standard_Integer IGESBasic_HArray1OfHArray1OfXYZ::Length() const
+{
+ return thelist.Length();
+}
+
+void IGESBasic_HArray1OfHArray1OfXYZ::SetValue(const Standard_Integer num,
+ const Handle(TColgp_HArray1OfXYZ)& val)
+{
+ thelist.SetValue(num, val);
+}
+
+Handle(TColgp_HArray1OfXYZ) IGESBasic_HArray1OfHArray1OfXYZ::Value(const Standard_Integer num) const
+{
+ return Handle(TColgp_HArray1OfXYZ)::DownCast(thelist.Value(num));
+}
#include <Standard_Type.hxx>
-#define Handle_TheKey Handle(TColgp_HArray1OfXY)
-#define TheKey TColgp_HArray1OfXY
-#define TheKey_hxx <TColgp_HArray1OfXY.hxx>
-#define Interface_JaggedArray IGESBasic_HArray1OfHArray1OfXY
-#define Interface_JaggedArray_hxx <IGESBasic_HArray1OfHArray1OfXY.hxx>
-#define Handle_Interface_JaggedArray Handle(IGESBasic_HArray1OfHArray1OfXY)
-#include <Interface_JaggedArray.gxx>
+IGESBasic_HArray1OfHArray1OfXY::IGESBasic_HArray1OfHArray1OfXY(const Standard_Integer low,
+ const Standard_Integer up)
+ : thelist(low, up)
+{
+ Handle(Standard_Transient) nulo;
+ thelist.Init(nulo);
+}
+
+Standard_Integer IGESBasic_HArray1OfHArray1OfXY::Lower() const
+{
+ return thelist.Lower();
+}
+
+Standard_Integer IGESBasic_HArray1OfHArray1OfXY::Upper() const
+{
+ return thelist.Upper();
+}
+
+Standard_Integer IGESBasic_HArray1OfHArray1OfXY::Length() const
+{
+ return thelist.Length();
+}
+
+void IGESBasic_HArray1OfHArray1OfXY::SetValue(const Standard_Integer num,
+ const Handle(TColgp_HArray1OfXY)& val)
+{
+ thelist.SetValue(num, val);
+}
+
+Handle(TColgp_HArray1OfXY) IGESBasic_HArray1OfHArray1OfXY::Value(const Standard_Integer num) const
+{
+ return Handle(TColgp_HArray1OfXY)::DownCast(thelist.Value(num));
+}
#include <IGESData_SpecificLib.hxx>
#include <IGESData_NodeOfSpecificLib.hxx>
-#define TheObject Handle(IGESData_IGESEntity)
-#define TheObject_hxx <IGESData_IGESEntity.hxx>
-#define Handle_TheModule Handle(IGESData_SpecificModule)
-#define TheModule IGESData_SpecificModule
-#define TheModule_hxx <IGESData_SpecificModule.hxx>
-#define Handle_TheProtocol Handle(IGESData_Protocol)
-#define TheProtocol IGESData_Protocol
-#define TheProtocol_hxx <IGESData_Protocol.hxx>
-#define LibCtl_GlobalNode IGESData_GlobalNodeOfSpecificLib
-#define LibCtl_GlobalNode_hxx <IGESData_GlobalNodeOfSpecificLib.hxx>
-#define LibCtl_Node IGESData_NodeOfSpecificLib
-#define LibCtl_Node_hxx <IGESData_NodeOfSpecificLib.hxx>
-#define Handle_LibCtl_GlobalNode Handle(IGESData_GlobalNodeOfSpecificLib)
-#define Handle_LibCtl_Node Handle(IGESData_NodeOfSpecificLib)
-#define LibCtl_Library IGESData_SpecificLib
-#define LibCtl_Library_hxx <IGESData_SpecificLib.hxx>
-#include <LibCtl_GlobalNode.gxx>
+IGESData_GlobalNodeOfSpecificLib::IGESData_GlobalNodeOfSpecificLib() {}
+
+void IGESData_GlobalNodeOfSpecificLib::Add(const Handle(IGESData_SpecificModule)& amodule,
+ const Handle(IGESData_Protocol)& aprotocol)
+{
+ if (themod == amodule)
+ return;
+ if (theprot == aprotocol)
+ themod = amodule;
+ else if (thenext.IsNull())
+ {
+ if (themod.IsNull())
+ {
+ themod = amodule;
+ theprot = aprotocol;
+ }
+ else
+ {
+ thenext = new IGESData_GlobalNodeOfSpecificLib;
+ thenext->Add(amodule, aprotocol);
+ }
+ }
+ else
+ thenext->Add(amodule, aprotocol);
+}
+
+const Handle(IGESData_SpecificModule)& IGESData_GlobalNodeOfSpecificLib::Module() const
+{
+ return themod;
+}
+
+const Handle(IGESData_Protocol)& IGESData_GlobalNodeOfSpecificLib::Protocol() const
+{
+ return theprot;
+}
+
+const Handle(IGESData_GlobalNodeOfSpecificLib)& IGESData_GlobalNodeOfSpecificLib::Next() const
+{
+ return thenext;
+}
#include <IGESData_WriterLib.hxx>
#include <IGESData_NodeOfWriterLib.hxx>
-#define TheObject Handle(IGESData_IGESEntity)
-#define TheObject_hxx <IGESData_IGESEntity.hxx>
-#define Handle_TheModule Handle(IGESData_ReadWriteModule)
-#define TheModule IGESData_ReadWriteModule
-#define TheModule_hxx <IGESData_ReadWriteModule.hxx>
-#define Handle_TheProtocol Handle(IGESData_Protocol)
-#define TheProtocol IGESData_Protocol
-#define TheProtocol_hxx <IGESData_Protocol.hxx>
-#define LibCtl_GlobalNode IGESData_GlobalNodeOfWriterLib
-#define LibCtl_GlobalNode_hxx <IGESData_GlobalNodeOfWriterLib.hxx>
-#define LibCtl_Node IGESData_NodeOfWriterLib
-#define LibCtl_Node_hxx <IGESData_NodeOfWriterLib.hxx>
-#define Handle_LibCtl_GlobalNode Handle(IGESData_GlobalNodeOfWriterLib)
-#define Handle_LibCtl_Node Handle(IGESData_NodeOfWriterLib)
-#define LibCtl_Library IGESData_WriterLib
-#define LibCtl_Library_hxx <IGESData_WriterLib.hxx>
-#include <LibCtl_GlobalNode.gxx>
+IGESData_GlobalNodeOfWriterLib::IGESData_GlobalNodeOfWriterLib() {}
+
+void IGESData_GlobalNodeOfWriterLib::Add(const Handle(IGESData_ReadWriteModule)& amodule,
+ const Handle(IGESData_Protocol)& aprotocol)
+{
+ if (themod == amodule)
+ return;
+ if (theprot == aprotocol)
+ themod = amodule;
+ else if (thenext.IsNull())
+ {
+ if (themod.IsNull())
+ {
+ themod = amodule;
+ theprot = aprotocol;
+ }
+ else
+ {
+ thenext = new IGESData_GlobalNodeOfWriterLib;
+ thenext->Add(amodule, aprotocol);
+ }
+ }
+ else
+ thenext->Add(amodule, aprotocol);
+}
+
+const Handle(IGESData_ReadWriteModule)& IGESData_GlobalNodeOfWriterLib::Module() const
+{
+ return themod;
+}
+
+const Handle(IGESData_Protocol)& IGESData_GlobalNodeOfWriterLib::Protocol() const
+{
+ return theprot;
+}
+
+const Handle(IGESData_GlobalNodeOfWriterLib)& IGESData_GlobalNodeOfWriterLib::Next() const
+{
+ return thenext;
+}
#include <IGESData_Protocol.hxx>
#include <IGESData_SpecificLib.hxx>
-#define TheObject Handle(IGESData_IGESEntity)
-#define TheObject_hxx <IGESData_IGESEntity.hxx>
-#define Handle_TheModule Handle(IGESData_SpecificModule)
-#define TheModule IGESData_SpecificModule
-#define TheModule_hxx <IGESData_SpecificModule.hxx>
-#define Handle_TheProtocol Handle(IGESData_Protocol)
-#define TheProtocol IGESData_Protocol
-#define TheProtocol_hxx <IGESData_Protocol.hxx>
-#define LibCtl_GlobalNode IGESData_GlobalNodeOfSpecificLib
-#define LibCtl_GlobalNode_hxx <IGESData_GlobalNodeOfSpecificLib.hxx>
-#define LibCtl_Node IGESData_NodeOfSpecificLib
-#define LibCtl_Node_hxx <IGESData_NodeOfSpecificLib.hxx>
-#define Handle_LibCtl_GlobalNode Handle(IGESData_GlobalNodeOfSpecificLib)
-#define Handle_LibCtl_Node Handle(IGESData_NodeOfSpecificLib)
-#define LibCtl_Library IGESData_SpecificLib
-#define LibCtl_Library_hxx <IGESData_SpecificLib.hxx>
-#include <LibCtl_Node.gxx>
+IGESData_NodeOfSpecificLib::IGESData_NodeOfSpecificLib() {}
+
+void IGESData_NodeOfSpecificLib::AddNode(const Handle(IGESData_GlobalNodeOfSpecificLib)& anode)
+{
+ if (thenode == anode)
+ return;
+ if (thenext.IsNull())
+ {
+ if (thenode.IsNull())
+ thenode = anode;
+ else
+ {
+ thenext = new IGESData_NodeOfSpecificLib;
+ thenext->AddNode(anode);
+ }
+ }
+ else
+ thenext->AddNode(anode);
+}
+
+const Handle(IGESData_SpecificModule)& IGESData_NodeOfSpecificLib::Module() const
+{
+ return thenode->Module();
+}
+
+const Handle(IGESData_Protocol)& IGESData_NodeOfSpecificLib::Protocol() const
+{
+ return thenode->Protocol();
+}
+
+const Handle(IGESData_NodeOfSpecificLib)& IGESData_NodeOfSpecificLib::Next() const
+{
+ return thenext;
+}
#include <IGESData_Protocol.hxx>
#include <IGESData_WriterLib.hxx>
-#define TheObject Handle(IGESData_IGESEntity)
-#define TheObject_hxx <IGESData_IGESEntity.hxx>
-#define Handle_TheModule Handle(IGESData_ReadWriteModule)
-#define TheModule IGESData_ReadWriteModule
-#define TheModule_hxx <IGESData_ReadWriteModule.hxx>
-#define Handle_TheProtocol Handle(IGESData_Protocol)
-#define TheProtocol IGESData_Protocol
-#define TheProtocol_hxx <IGESData_Protocol.hxx>
-#define LibCtl_GlobalNode IGESData_GlobalNodeOfWriterLib
-#define LibCtl_GlobalNode_hxx <IGESData_GlobalNodeOfWriterLib.hxx>
-#define LibCtl_Node IGESData_NodeOfWriterLib
-#define LibCtl_Node_hxx <IGESData_NodeOfWriterLib.hxx>
-#define Handle_LibCtl_GlobalNode Handle(IGESData_GlobalNodeOfWriterLib)
-#define Handle_LibCtl_Node Handle(IGESData_NodeOfWriterLib)
-#define LibCtl_Library IGESData_WriterLib
-#define LibCtl_Library_hxx <IGESData_WriterLib.hxx>
-#include <LibCtl_Node.gxx>
+IGESData_NodeOfWriterLib::IGESData_NodeOfWriterLib() {}
+
+void IGESData_NodeOfWriterLib::AddNode(const Handle(IGESData_GlobalNodeOfWriterLib)& anode)
+{
+ if (thenode == anode)
+ return;
+ if (thenext.IsNull())
+ {
+ if (thenode.IsNull())
+ thenode = anode;
+ else
+ {
+ thenext = new IGESData_NodeOfWriterLib;
+ thenext->AddNode(anode);
+ }
+ }
+ else
+ thenext->AddNode(anode);
+}
+
+const Handle(IGESData_ReadWriteModule)& IGESData_NodeOfWriterLib::Module() const
+{
+ return thenode->Module();
+}
+
+const Handle(IGESData_Protocol)& IGESData_NodeOfWriterLib::Protocol() const
+{
+ return thenode->Protocol();
+}
+
+const Handle(IGESData_NodeOfWriterLib)& IGESData_NodeOfWriterLib::Next() const
+{
+ return thenext;
+}
#include <Standard_Type.hxx>
-#define Handle_TheKey Handle(IGESGraph_HArray1OfTextDisplayTemplate)
-#define TheKey IGESGraph_HArray1OfTextDisplayTemplate
-#define TheKey_hxx <IGESGraph_HArray1OfTextDisplayTemplate.hxx>
-#define Interface_JaggedArray IGESDefs_HArray1OfHArray1OfTextDisplayTemplate
-#define Interface_JaggedArray_hxx <IGESDefs_HArray1OfHArray1OfTextDisplayTemplate.hxx>
-#define Handle_Interface_JaggedArray Handle(IGESDefs_HArray1OfHArray1OfTextDisplayTemplate)
-#include <Interface_JaggedArray.gxx>
+IGESDefs_HArray1OfHArray1OfTextDisplayTemplate::IGESDefs_HArray1OfHArray1OfTextDisplayTemplate(
+ const Standard_Integer low,
+ const Standard_Integer up)
+ : thelist(low, up)
+{
+ Handle(Standard_Transient) nulo;
+ thelist.Init(nulo);
+}
+
+Standard_Integer IGESDefs_HArray1OfHArray1OfTextDisplayTemplate::Lower() const
+{
+ return thelist.Lower();
+}
+
+Standard_Integer IGESDefs_HArray1OfHArray1OfTextDisplayTemplate::Upper() const
+{
+ return thelist.Upper();
+}
+
+Standard_Integer IGESDefs_HArray1OfHArray1OfTextDisplayTemplate::Length() const
+{
+ return thelist.Length();
+}
+
+void IGESDefs_HArray1OfHArray1OfTextDisplayTemplate::SetValue(
+ const Standard_Integer num,
+ const Handle(IGESGraph_HArray1OfTextDisplayTemplate)& val)
+{
+ thelist.SetValue(num, val);
+}
+
+Handle(IGESGraph_HArray1OfTextDisplayTemplate) IGESDefs_HArray1OfHArray1OfTextDisplayTemplate::
+ Value(const Standard_Integer num) const
+{
+ return Handle(IGESGraph_HArray1OfTextDisplayTemplate)::DownCast(thelist.Value(num));
+}
#include <IGESData_IGESWriter.hxx>
#include <IFSelect_ContextWrite.hxx>
-#define Writer IGESData_IGESWriter
-#define Writer_hxx <IGESData_IGESWriter.hxx>
-#define IFSelect_FileModifier IGESSelect_FileModifier
-#define IFSelect_FileModifier_hxx <IGESSelect_FileModifier.hxx>
-#define Handle_IFSelect_FileModifier Handle(IGESSelect_FileModifier)
-#include <IFSelect_FileModifier.gxx>
+IGESSelect_FileModifier::IGESSelect_FileModifier()
+ : IFSelect_GeneralModifier(Standard_False)
+{
+}
#include <Interface_InterfaceModel.hxx>
#include <Interface_Protocol.hxx>
#include <Interface_CopyTool.hxx>
+#include <Interface_Check.hxx>
-#define Handle_Model Handle(IGESData_IGESModel)
-#define Model IGESData_IGESModel
-#define Model_hxx <IGESData_IGESModel.hxx>
-#define Handle_Proto Handle(IGESData_Protocol)
-#define Proto IGESData_Protocol
-#define Proto_hxx <IGESData_Protocol.hxx>
-#define IFSelect_ModelModifier IGESSelect_ModelModifier
-#define IFSelect_ModelModifier_hxx <IGESSelect_ModelModifier.hxx>
-#define Handle_IFSelect_ModelModifier Handle(IGESSelect_ModelModifier)
-#include <IFSelect_ModelModifier.gxx>
+IGESSelect_ModelModifier::IGESSelect_ModelModifier(const Standard_Boolean grf)
+ : IFSelect_Modifier(grf)
+{
+}
+
+void IGESSelect_ModelModifier::Perform(IFSelect_ContextModif& ctx,
+ const Handle(Interface_InterfaceModel)& target,
+ const Handle(Interface_Protocol)& protocol,
+ Interface_CopyTool& TC) const
+{
+ ctx.TraceModifier(this);
+ Handle(IGESData_IGESModel) targ = Handle(IGESData_IGESModel)::DownCast(target);
+ Handle(IGESData_Protocol) prot = Handle(IGESData_Protocol)::DownCast(protocol);
+ if (targ.IsNull())
+ {
+ ctx.CCheck()->AddFail("Model to Modify : unproper type");
+ return;
+ }
+ PerformProtocol(ctx, targ, prot, TC);
+}
+
+void IGESSelect_ModelModifier::PerformProtocol(IFSelect_ContextModif& ctx,
+ const Handle(IGESData_IGESModel)& target,
+ const Handle(IGESData_Protocol)& protocol,
+ Interface_CopyTool& TC) const
+{
+ ctx.SetProtocol(protocol);
+ Performing(ctx, target, TC);
+}
#include <StepData_WriterLib.hxx>
#include <StepData_NodeOfWriterLib.hxx>
-#define TheObject Handle(Standard_Transient)
-#define TheObject_hxx <Standard_Transient.hxx>
-#define Handle_TheModule Handle(StepData_ReadWriteModule)
-#define TheModule StepData_ReadWriteModule
-#define TheModule_hxx <StepData_ReadWriteModule.hxx>
-#define Handle_TheProtocol Handle(StepData_Protocol)
-#define TheProtocol StepData_Protocol
-#define TheProtocol_hxx <StepData_Protocol.hxx>
-#define LibCtl_GlobalNode StepData_GlobalNodeOfWriterLib
-#define LibCtl_GlobalNode_hxx <StepData_GlobalNodeOfWriterLib.hxx>
-#define LibCtl_Node StepData_NodeOfWriterLib
-#define LibCtl_Node_hxx <StepData_NodeOfWriterLib.hxx>
-#define Handle_LibCtl_GlobalNode Handle(StepData_GlobalNodeOfWriterLib)
-#define Handle_LibCtl_Node Handle(StepData_NodeOfWriterLib)
-#define LibCtl_Library StepData_WriterLib
-#define LibCtl_Library_hxx <StepData_WriterLib.hxx>
-#include <LibCtl_GlobalNode.gxx>
+StepData_GlobalNodeOfWriterLib::StepData_GlobalNodeOfWriterLib() {}
+
+void StepData_GlobalNodeOfWriterLib::Add(const Handle(StepData_ReadWriteModule)& amodule,
+ const Handle(StepData_Protocol)& aprotocol)
+{
+ if (themod == amodule)
+ return;
+ if (theprot == aprotocol)
+ themod = amodule;
+ else if (thenext.IsNull())
+ {
+ if (themod.IsNull())
+ {
+ themod = amodule;
+ theprot = aprotocol;
+ }
+ else
+ {
+ thenext = new StepData_GlobalNodeOfWriterLib;
+ thenext->Add(amodule, aprotocol);
+ }
+ }
+ else
+ thenext->Add(amodule, aprotocol);
+}
+
+const Handle(StepData_ReadWriteModule)& StepData_GlobalNodeOfWriterLib::Module() const
+{
+ return themod;
+}
+
+const Handle(StepData_Protocol)& StepData_GlobalNodeOfWriterLib::Protocol() const
+{
+ return theprot;
+}
+
+const Handle(StepData_GlobalNodeOfWriterLib)& StepData_GlobalNodeOfWriterLib::Next() const
+{
+ return thenext;
+}
#include <StepData_Protocol.hxx>
#include <StepData_WriterLib.hxx>
-#define TheObject Handle(Standard_Transient)
-#define TheObject_hxx <Standard_Transient.hxx>
-#define Handle_TheModule Handle(StepData_ReadWriteModule)
-#define TheModule StepData_ReadWriteModule
-#define TheModule_hxx <StepData_ReadWriteModule.hxx>
-#define Handle_TheProtocol Handle(StepData_Protocol)
-#define TheProtocol StepData_Protocol
-#define TheProtocol_hxx <StepData_Protocol.hxx>
-#define LibCtl_GlobalNode StepData_GlobalNodeOfWriterLib
-#define LibCtl_GlobalNode_hxx <StepData_GlobalNodeOfWriterLib.hxx>
-#define LibCtl_Node StepData_NodeOfWriterLib
-#define LibCtl_Node_hxx <StepData_NodeOfWriterLib.hxx>
-#define Handle_LibCtl_GlobalNode Handle(StepData_GlobalNodeOfWriterLib)
-#define Handle_LibCtl_Node Handle(StepData_NodeOfWriterLib)
-#define LibCtl_Library StepData_WriterLib
-#define LibCtl_Library_hxx <StepData_WriterLib.hxx>
-#include <LibCtl_Node.gxx>
+StepData_NodeOfWriterLib::StepData_NodeOfWriterLib() {}
+
+void StepData_NodeOfWriterLib::AddNode(const Handle(StepData_GlobalNodeOfWriterLib)& anode)
+{
+ if (thenode == anode)
+ return;
+ if (thenext.IsNull())
+ {
+ if (thenode.IsNull())
+ thenode = anode;
+ else
+ {
+ thenext = new StepData_NodeOfWriterLib;
+ thenext->AddNode(anode);
+ }
+ }
+ else
+ thenext->AddNode(anode);
+}
+
+const Handle(StepData_ReadWriteModule)& StepData_NodeOfWriterLib::Module() const
+{
+ return thenode->Module();
+}
+
+const Handle(StepData_Protocol)& StepData_NodeOfWriterLib::Protocol() const
+{
+ return thenode->Protocol();
+}
+
+const Handle(StepData_NodeOfWriterLib)& StepData_NodeOfWriterLib::Next() const
+{
+ return thenext;
+}
#include <StepData_StepWriter.hxx>
#include <IFSelect_ContextWrite.hxx>
-#define Writer StepData_StepWriter
-#define Writer_hxx <StepData_StepWriter.hxx>
-#define IFSelect_FileModifier StepSelect_FileModifier
-#define IFSelect_FileModifier_hxx <StepSelect_FileModifier.hxx>
-#define Handle_IFSelect_FileModifier Handle(StepSelect_FileModifier)
-#include <IFSelect_FileModifier.gxx>
+StepSelect_FileModifier::StepSelect_FileModifier()
+ : IFSelect_GeneralModifier(Standard_False)
+{
+}
#include <Interface_InterfaceModel.hxx>
#include <Interface_Protocol.hxx>
#include <Interface_CopyTool.hxx>
+#include <Interface_Check.hxx>
-#define Handle_Model Handle(StepData_StepModel)
-#define Model StepData_StepModel
-#define Model_hxx <StepData_StepModel.hxx>
-#define Handle_Proto Handle(StepData_Protocol)
-#define Proto StepData_Protocol
-#define Proto_hxx <StepData_Protocol.hxx>
-#define IFSelect_ModelModifier StepSelect_ModelModifier
-#define IFSelect_ModelModifier_hxx <StepSelect_ModelModifier.hxx>
-#define Handle_IFSelect_ModelModifier Handle(StepSelect_ModelModifier)
-#include <IFSelect_ModelModifier.gxx>
+StepSelect_ModelModifier::StepSelect_ModelModifier(const Standard_Boolean grf)
+ : IFSelect_Modifier(grf)
+{
+}
+
+void StepSelect_ModelModifier::Perform(IFSelect_ContextModif& ctx,
+ const Handle(Interface_InterfaceModel)& target,
+ const Handle(Interface_Protocol)& protocol,
+ Interface_CopyTool& TC) const
+{
+ ctx.TraceModifier(this);
+ Handle(StepData_StepModel) targ = Handle(StepData_StepModel)::DownCast(target);
+ Handle(StepData_Protocol) prot = Handle(StepData_Protocol)::DownCast(protocol);
+ if (targ.IsNull())
+ {
+ ctx.CCheck()->AddFail("Model to Modify : unproper type");
+ return;
+ }
+ PerformProtocol(ctx, targ, prot, TC);
+}
+
+void StepSelect_ModelModifier::PerformProtocol(IFSelect_ContextModif& ctx,
+ const Handle(StepData_StepModel)& target,
+ const Handle(StepData_Protocol)& protocol,
+ Interface_CopyTool& TC) const
+{
+ ctx.SetProtocol(protocol);
+ Performing(ctx, target, TC);
+}
IFSelect_Editor.cxx
IFSelect_Editor.hxx
IFSelect_EditValue.hxx
- IFSelect_FileModifier.gxx
IFSelect_Functions.cxx
IFSelect_Functions.hxx
IFSelect_GeneralModifier.cxx
IFSelect_ListEditor.hxx
IFSelect_ModelCopier.cxx
IFSelect_ModelCopier.hxx
- IFSelect_ModelModifier.gxx
IFSelect_ModifEditForm.cxx
IFSelect_ModifEditForm.hxx
IFSelect_Modifier.cxx
+++ /dev/null
-// Copyright (c) 1999-2014 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 <IFSelect_FileModifier.ixx>
-
-IFSelect_FileModifier::IFSelect_FileModifier()
- : IFSelect_GeneralModifier(Standard_False)
-{
-}
+++ /dev/null
-// Copyright (c) 1999-2014 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 <IFSelect_ModelModifier.ixx>
-#include <Interface_Check.hxx>
-
-IFSelect_ModelModifier::IFSelect_ModelModifier(const Standard_Boolean grf)
- : IFSelect_Modifier(grf)
-{
-}
-
-void IFSelect_ModelModifier::Perform(IFSelect_ContextModif& ctx,
- const Handle(Interface_InterfaceModel)& target,
- const Handle(Interface_Protocol)& protocol,
- Interface_CopyTool& TC) const
-{
- ctx.TraceModifier(this);
- Handle(Model) targ = Handle(Model)::DownCast(target);
- Handle(Proto) prot = Handle(Proto)::DownCast(protocol);
- if (targ.IsNull())
- {
- ctx.CCheck()->AddFail("Model to Modify : unproper type");
- return;
- }
- PerformProtocol(ctx, targ, prot, TC);
-}
-
-void IFSelect_ModelModifier::PerformProtocol(IFSelect_ContextModif& ctx,
- const Handle(Model)& target,
- const Handle(Proto)& protocol,
- Interface_CopyTool& TC) const
-{
- ctx.SetProtocol(protocol);
- Performing(ctx, target, TC);
-}
Interface_IntList.hxx
Interface_IntVal.cxx
Interface_IntVal.hxx
- Interface_JaggedArray.gxx
Interface_LineBuffer.cxx
Interface_LineBuffer.hxx
Interface_Macros.hxx
#include <Interface_GeneralLib.hxx>
#include <Interface_NodeOfGeneralLib.hxx>
-#define TheObject Handle(Standard_Transient)
-#define TheObject_hxx <Standard_Transient.hxx>
-#define Handle_TheModule Handle(Interface_GeneralModule)
-#define TheModule Interface_GeneralModule
-#define TheModule_hxx <Interface_GeneralModule.hxx>
-#define Handle_TheProtocol Handle(Interface_Protocol)
-#define TheProtocol Interface_Protocol
-#define TheProtocol_hxx <Interface_Protocol.hxx>
-#define LibCtl_GlobalNode Interface_GlobalNodeOfGeneralLib
-#define LibCtl_GlobalNode_hxx <Interface_GlobalNodeOfGeneralLib.hxx>
-#define LibCtl_Node Interface_NodeOfGeneralLib
-#define LibCtl_Node_hxx <Interface_NodeOfGeneralLib.hxx>
-#define Handle_LibCtl_GlobalNode Handle(Interface_GlobalNodeOfGeneralLib)
-#define Handle_LibCtl_Node Handle(Interface_NodeOfGeneralLib)
-#define LibCtl_Library Interface_GeneralLib
-#define LibCtl_Library_hxx <Interface_GeneralLib.hxx>
-#include <LibCtl_GlobalNode.gxx>
+Interface_GlobalNodeOfGeneralLib::Interface_GlobalNodeOfGeneralLib() {}
+
+void Interface_GlobalNodeOfGeneralLib::Add(const Handle(Interface_GeneralModule)& amodule,
+ const Handle(Interface_Protocol)& aprotocol)
+{
+ if (themod == amodule)
+ return;
+ if (theprot == aprotocol)
+ themod = amodule;
+ else if (thenext.IsNull())
+ {
+ if (themod.IsNull())
+ {
+ themod = amodule;
+ theprot = aprotocol;
+ }
+ else
+ {
+ thenext = new Interface_GlobalNodeOfGeneralLib;
+ thenext->Add(amodule, aprotocol);
+ }
+ }
+ else
+ thenext->Add(amodule, aprotocol);
+}
+
+const Handle(Interface_GeneralModule)& Interface_GlobalNodeOfGeneralLib::Module() const
+{
+ return themod;
+}
+
+const Handle(Interface_Protocol)& Interface_GlobalNodeOfGeneralLib::Protocol() const
+{
+ return theprot;
+}
+
+const Handle(Interface_GlobalNodeOfGeneralLib)& Interface_GlobalNodeOfGeneralLib::Next() const
+{
+ return thenext;
+}
#include <Interface_ReaderLib.hxx>
#include <Interface_NodeOfReaderLib.hxx>
-#define TheObject Handle(Standard_Transient)
-#define TheObject_hxx <Standard_Transient.hxx>
-#define Handle_TheModule Handle(Interface_ReaderModule)
-#define TheModule Interface_ReaderModule
-#define TheModule_hxx <Interface_ReaderModule.hxx>
-#define Handle_TheProtocol Handle(Interface_Protocol)
-#define TheProtocol Interface_Protocol
-#define TheProtocol_hxx <Interface_Protocol.hxx>
-#define LibCtl_GlobalNode Interface_GlobalNodeOfReaderLib
-#define LibCtl_GlobalNode_hxx <Interface_GlobalNodeOfReaderLib.hxx>
-#define LibCtl_Node Interface_NodeOfReaderLib
-#define LibCtl_Node_hxx <Interface_NodeOfReaderLib.hxx>
-#define Handle_LibCtl_GlobalNode Handle(Interface_GlobalNodeOfReaderLib)
-#define Handle_LibCtl_Node Handle(Interface_NodeOfReaderLib)
-#define LibCtl_Library Interface_ReaderLib
-#define LibCtl_Library_hxx <Interface_ReaderLib.hxx>
-#include <LibCtl_GlobalNode.gxx>
+Interface_GlobalNodeOfReaderLib::Interface_GlobalNodeOfReaderLib() {}
+
+void Interface_GlobalNodeOfReaderLib::Add(const Handle(Interface_ReaderModule)& amodule,
+ const Handle(Interface_Protocol)& aprotocol)
+{
+ if (themod == amodule)
+ return;
+ if (theprot == aprotocol)
+ themod = amodule;
+ else if (thenext.IsNull())
+ {
+ if (themod.IsNull())
+ {
+ themod = amodule;
+ theprot = aprotocol;
+ }
+ else
+ {
+ thenext = new Interface_GlobalNodeOfReaderLib;
+ thenext->Add(amodule, aprotocol);
+ }
+ }
+ else
+ thenext->Add(amodule, aprotocol);
+}
+
+const Handle(Interface_ReaderModule)& Interface_GlobalNodeOfReaderLib::Module() const
+{
+ return themod;
+}
+
+const Handle(Interface_Protocol)& Interface_GlobalNodeOfReaderLib::Protocol() const
+{
+ return theprot;
+}
+
+const Handle(Interface_GlobalNodeOfReaderLib)& Interface_GlobalNodeOfReaderLib::Next() const
+{
+ return thenext;
+}
+++ /dev/null
-// Copyright (c) 1999-2014 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_JaggedArray.ixx>
-
-Interface_JaggedArray::Interface_JaggedArray(const Standard_Integer low, const Standard_Integer up)
- : thelist(low, up)
-{
- Handle(Standard_Transient) nulo;
- thelist.Init(nulo);
-}
-
-Standard_Integer Interface_JaggedArray::Lower() const
-{
- return thelist.Lower();
-}
-
-Standard_Integer Interface_JaggedArray::Upper() const
-{
- return thelist.Upper();
-}
-
-Standard_Integer Interface_JaggedArray::Length() const
-{
- return thelist.Length();
-}
-
-void Interface_JaggedArray::SetValue(const Standard_Integer num, const Handle(TheKey)& val)
-{
- thelist.SetValue(num, val);
-}
-
-Handle(TheKey) Interface_JaggedArray::Value(const Standard_Integer num) const
-{
- return Handle(TheKey)::DownCast(thelist.Value(num));
-}
-
-// Handle(TheKey)& Interface_JaggedArray::ChangeValue
-// (const Standard_Integer num)
-// { return thelist.ChangeValue(num); }
#include <Interface_Protocol.hxx>
#include <Interface_GeneralLib.hxx>
-#define TheObject Handle(Standard_Transient)
-#define TheObject_hxx <Standard_Transient.hxx>
-#define Handle_TheModule Handle(Interface_GeneralModule)
-#define TheModule Interface_GeneralModule
-#define TheModule_hxx <Interface_GeneralModule.hxx>
-#define Handle_TheProtocol Handle(Interface_Protocol)
-#define TheProtocol Interface_Protocol
-#define TheProtocol_hxx <Interface_Protocol.hxx>
-#define LibCtl_GlobalNode Interface_GlobalNodeOfGeneralLib
-#define LibCtl_GlobalNode_hxx <Interface_GlobalNodeOfGeneralLib.hxx>
-#define LibCtl_Node Interface_NodeOfGeneralLib
-#define LibCtl_Node_hxx <Interface_NodeOfGeneralLib.hxx>
-#define Handle_LibCtl_GlobalNode Handle(Interface_GlobalNodeOfGeneralLib)
-#define Handle_LibCtl_Node Handle(Interface_NodeOfGeneralLib)
-#define LibCtl_Library Interface_GeneralLib
-#define LibCtl_Library_hxx <Interface_GeneralLib.hxx>
-#include <LibCtl_Node.gxx>
+Interface_NodeOfGeneralLib::Interface_NodeOfGeneralLib() {}
+
+void Interface_NodeOfGeneralLib::AddNode(const Handle(Interface_GlobalNodeOfGeneralLib)& anode)
+{
+ if (thenode == anode)
+ return;
+ if (thenext.IsNull())
+ {
+ if (thenode.IsNull())
+ thenode = anode;
+ else
+ {
+ thenext = new Interface_NodeOfGeneralLib;
+ thenext->AddNode(anode);
+ }
+ }
+ else
+ thenext->AddNode(anode);
+}
+
+const Handle(Interface_GeneralModule)& Interface_NodeOfGeneralLib::Module() const
+{
+ return thenode->Module();
+}
+
+const Handle(Interface_Protocol)& Interface_NodeOfGeneralLib::Protocol() const
+{
+ return thenode->Protocol();
+}
+
+const Handle(Interface_NodeOfGeneralLib)& Interface_NodeOfGeneralLib::Next() const
+{
+ return thenext;
+}
#include <Interface_Protocol.hxx>
#include <Interface_ReaderLib.hxx>
-#define TheObject Handle(Standard_Transient)
-#define TheObject_hxx <Standard_Transient.hxx>
-#define Handle_TheModule Handle(Interface_ReaderModule)
-#define TheModule Interface_ReaderModule
-#define TheModule_hxx <Interface_ReaderModule.hxx>
-#define Handle_TheProtocol Handle(Interface_Protocol)
-#define TheProtocol Interface_Protocol
-#define TheProtocol_hxx <Interface_Protocol.hxx>
-#define LibCtl_GlobalNode Interface_GlobalNodeOfReaderLib
-#define LibCtl_GlobalNode_hxx <Interface_GlobalNodeOfReaderLib.hxx>
-#define LibCtl_Node Interface_NodeOfReaderLib
-#define LibCtl_Node_hxx <Interface_NodeOfReaderLib.hxx>
-#define Handle_LibCtl_GlobalNode Handle(Interface_GlobalNodeOfReaderLib)
-#define Handle_LibCtl_Node Handle(Interface_NodeOfReaderLib)
-#define LibCtl_Library Interface_ReaderLib
-#define LibCtl_Library_hxx <Interface_ReaderLib.hxx>
-#include <LibCtl_Node.gxx>
+Interface_NodeOfReaderLib::Interface_NodeOfReaderLib() {}
+
+void Interface_NodeOfReaderLib::AddNode(const Handle(Interface_GlobalNodeOfReaderLib)& anode)
+{
+ if (thenode == anode)
+ return;
+ if (thenext.IsNull())
+ {
+ if (thenode.IsNull())
+ thenode = anode;
+ else
+ {
+ thenext = new Interface_NodeOfReaderLib;
+ thenext->AddNode(anode);
+ }
+ }
+ else
+ thenext->AddNode(anode);
+}
+
+const Handle(Interface_ReaderModule)& Interface_NodeOfReaderLib::Module() const
+{
+ return thenode->Module();
+}
+
+const Handle(Interface_Protocol)& Interface_NodeOfReaderLib::Protocol() const
+{
+ return thenode->Protocol();
+}
+
+const Handle(Interface_NodeOfReaderLib)& Interface_NodeOfReaderLib::Next() const
+{
+ return thenext;
+}
set(OCCT_LibCtl_FILES_LOCATION "${CMAKE_CURRENT_LIST_DIR}")
set(OCCT_LibCtl_FILES
- LibCtl_GlobalNode.gxx
LibCtl_Library.gxx
- LibCtl_Node.gxx
)
+++ /dev/null
-// Copyright (c) 1998-1999 Matra Datavision
-// Copyright (c) 1999-2014 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 <LibCtl_GlobalNode.ixx>
-
-// Generic class nested in Library: used to build the
-// global lists of Modules attached to an instantiated class of Library
-// (see Library for more details)
-
-LibCtl_GlobalNode::LibCtl_GlobalNode() {}
-
-// WARNING, Add acts as substitution: for a given Protocol, it is the
-// last call wins
-void LibCtl_GlobalNode::Add(const Handle(TheModule)& amodule, const Handle(TheProtocol)& aprotocol)
-{
- if (themod == amodule)
- return;
- if (theprot == aprotocol)
- themod = amodule;
- else if (thenext.IsNull())
- {
- if (themod.IsNull())
- {
- themod = amodule;
- theprot = aprotocol;
- }
- else
- {
- thenext = new LibCtl_GlobalNode;
- thenext->Add(amodule, aprotocol);
- }
- }
- else
- thenext->Add(amodule, aprotocol);
-}
-
-const Handle(TheModule)& LibCtl_GlobalNode::Module() const
-{
- return themod;
-}
-
-const Handle(TheProtocol)& LibCtl_GlobalNode::Protocol() const
-{
- return theprot;
-}
-
-const Handle(LibCtl_GlobalNode)& LibCtl_GlobalNode::Next() const
-{
- return thenext;
-}
+++ /dev/null
-// Copyright (c) 1998-1999 Matra Datavision
-// Copyright (c) 1999-2014 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 <LibCtl_Node.ixx>
-
-// Generic class nested in Library: used to build the
-// lists of Modules of a library (see Library for more details)
-// (In fact: List of Global Nodes -> Module + Protocol)
-
-LibCtl_Node::LibCtl_Node() {}
-
-void LibCtl_Node::AddNode(const Handle(LibCtl_GlobalNode)& anode)
-{
- if (thenode == anode)
- return;
- if (thenext.IsNull())
- {
- if (thenode.IsNull())
- thenode = anode;
- else
- {
- thenext = new LibCtl_Node;
- thenext->AddNode(anode);
- }
- }
- else
- thenext->AddNode(anode);
-}
-
-const Handle(TheModule)& LibCtl_Node::Module() const
-{
- return thenode->Module();
-}
-
-const Handle(TheProtocol)& LibCtl_Node::Protocol() const
-{
- return thenode->Protocol();
-}
-
-const Handle(LibCtl_Node)& LibCtl_Node::Next() const
-{
- return thenext;
-}
#include <Adaptor2d_Curve2d.hxx>
#include <Geom2dInt_Geom2dCurveTool.hxx>
-#define ImpTool IntCurve_IConicTool
-#define ImpTool_hxx <IntCurve_IConicTool.hxx>
-#define ParCurve Adaptor2d_Curve2d
-#define ParCurve_hxx <Adaptor2d_Curve2d.hxx>
-#define ParTool Geom2dInt_Geom2dCurveTool
-#define ParTool_hxx <Geom2dInt_Geom2dCurveTool.hxx>
-#define IntImpParGen_ImpParTool Geom2dInt_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfGInter
-#define IntImpParGen_ImpParTool_hxx \
- <Geom2dInt_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfGInter.hxx>
-#include <IntImpParGen_ImpParTool.gxx>
+#include <gp_Vec2d.hxx>
+
+Geom2dInt_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfGInter::
+ Geom2dInt_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfGInter(const IntCurve_IConicTool& ITool,
+ const Adaptor2d_Curve2d& PC)
+ : TheImpTool(ITool)
+{
+ TheParCurve = (Standard_Address)(&PC);
+}
+
+Standard_Boolean Geom2dInt_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfGInter::Value(
+ const Standard_Real Param,
+ Standard_Real& ApproxDistance)
+{
+ ApproxDistance = TheImpTool.Distance(
+ Geom2dInt_Geom2dCurveTool::Value((*((Adaptor2d_Curve2d*)(TheParCurve))), Param));
+ return (Standard_True);
+}
+
+Standard_Boolean Geom2dInt_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfGInter::Derivative(
+ const Standard_Real Param,
+ Standard_Real& D_ApproxDistance_DV)
+{
+ gp_Pnt2d Pt;
+ gp_Vec2d TanParCurve;
+ gp_Vec2d Grad = TheImpTool.GradDistance(
+ Geom2dInt_Geom2dCurveTool::Value((*((Adaptor2d_Curve2d*)(TheParCurve))), Param));
+ Geom2dInt_Geom2dCurveTool::D1((*((Adaptor2d_Curve2d*)(TheParCurve))), Param, Pt, TanParCurve);
+ D_ApproxDistance_DV = Grad.Dot(TanParCurve);
+ return (Standard_True);
+}
+
+Standard_Boolean Geom2dInt_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfGInter::Values(
+ const Standard_Real Param,
+ Standard_Real& ApproxDistance,
+ Standard_Real& Deriv)
+{
+ this->Value(Param, ApproxDistance);
+ this->Derivative(Param, Deriv);
+ return (Standard_True);
+}
#include <Geom2dInt_TheLocateExtPCOfTheProjPCurOfGInter.hxx>
#include <Geom2dInt_PCLocFOfTheLocateExtPCOfTheProjPCurOfGInter.hxx>
#include <gp_Pnt2d.hxx>
+#include <Extrema_POnCurv2d.hxx>
-#define TheCurve Adaptor2d_Curve2d
-#define TheCurve_hxx <Adaptor2d_Curve2d.hxx>
-#define TheCurveTool Geom2dInt_Geom2dCurveTool
-#define TheCurveTool_hxx <Geom2dInt_Geom2dCurveTool.hxx>
-#define IntCurve_TheCurveLocator Geom2dInt_TheCurveLocatorOfTheProjPCurOfGInter
-#define IntCurve_TheCurveLocator_hxx <Geom2dInt_TheCurveLocatorOfTheProjPCurOfGInter.hxx>
-#define IntCurve_TheLocateExtPC Geom2dInt_TheLocateExtPCOfTheProjPCurOfGInter
-#define IntCurve_TheLocateExtPC_hxx <Geom2dInt_TheLocateExtPCOfTheProjPCurOfGInter.hxx>
-#define IntCurve_PCLocFOfTheLocateExtPC Geom2dInt_PCLocFOfTheLocateExtPCOfTheProjPCurOfGInter
-#define IntCurve_PCLocFOfTheLocateExtPC_hxx \
- <Geom2dInt_PCLocFOfTheLocateExtPCOfTheProjPCurOfGInter.hxx>
-#define IntCurve_PCLocFOfTheLocateExtPC Geom2dInt_PCLocFOfTheLocateExtPCOfTheProjPCurOfGInter
-#define IntCurve_PCLocFOfTheLocateExtPC_hxx \
- <Geom2dInt_PCLocFOfTheLocateExtPCOfTheProjPCurOfGInter.hxx>
-#define IntCurve_ProjPCurGen Geom2dInt_TheProjPCurOfGInter
-#define IntCurve_ProjPCurGen_hxx <Geom2dInt_TheProjPCurOfGInter.hxx>
-#include <IntCurve_ProjPCurGen.gxx>
+Standard_Real Geom2dInt_TheProjPCurOfGInter::FindParameter(const Adaptor2d_Curve2d& C,
+ const gp_Pnt2d& P,
+ const Standard_Real LowParameter,
+ const Standard_Real HighParameter,
+ const Standard_Real)
+{
+ Standard_Real theparam, defaultparam;
+ Standard_Integer NbPts = Geom2dInt_Geom2dCurveTool::NbSamples(C);
+ Standard_Real theEpsX = Geom2dInt_Geom2dCurveTool::EpsX(C);
+ Extrema_POnCurv2d POnC;
+
+ Geom2dInt_TheCurveLocatorOfTheProjPCurOfGInter::Locate(P,
+ C,
+ NbPts,
+ LowParameter,
+ HighParameter,
+ POnC);
+ defaultparam = POnC.Parameter();
+ Geom2dInt_TheLocateExtPCOfTheProjPCurOfGInter Loc(P, C, defaultparam, theEpsX);
+
+ if (Loc.IsDone() == Standard_False)
+ {
+ //-- cout<<"\n Erreur dans LocateExtPC "<<endl;
+ theparam = defaultparam;
+ }
+ else
+ {
+ if (Loc.IsMin() == Standard_False)
+ {
+ //-- cout<<"\n Erreur dans LocateExtPC (Maximum trouve) "<<endl;
+ theparam = defaultparam;
+ }
+ else
+ {
+ theparam = Loc.Point().Parameter();
+ }
+ }
+ return theparam;
+}
+
+Standard_Real Geom2dInt_TheProjPCurOfGInter::FindParameter(const Adaptor2d_Curve2d& C,
+ const gp_Pnt2d& P,
+ const Standard_Real Tol)
+{
+
+ Standard_Real theParam;
+ theParam = FindParameter(C,
+ P,
+ Geom2dInt_Geom2dCurveTool::FirstParameter(C),
+ Geom2dInt_Geom2dCurveTool::LastParameter(C),
+ Tol);
+ return theParam;
+}
#include <GeomInt_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx>
#include <math_MultipleVarFunctionWithGradient.hxx>
-#define MultiLine GeomInt_TheMultiLineOfWLApprox
-#define MultiLine_hxx <GeomInt_TheMultiLineOfWLApprox.hxx>
-#define ToolLine GeomInt_TheMultiLineToolOfWLApprox
-#define ToolLine_hxx <GeomInt_TheMultiLineToolOfWLApprox.hxx>
-#define AppParCurves_BSpParLeastSquare \
- GeomInt_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfWLApprox
-#define AppParCurves_BSpParLeastSquare_hxx \
- <GeomInt_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx>
-#define AppParCurves_BSpParFunction GeomInt_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfWLApprox
-#define AppParCurves_BSpParFunction_hxx \
- <GeomInt_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx>
-#define AppParCurves_BSpGradient_BFGS \
- GeomInt_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfWLApprox
-#define AppParCurves_BSpGradient_BFGS_hxx \
- <GeomInt_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx>
-#define AppParCurves_BSpGradient GeomInt_MyBSplGradientOfTheComputeLineOfWLApprox
-#define AppParCurves_BSpGradient_hxx <GeomInt_MyBSplGradientOfTheComputeLineOfWLApprox.hxx>
-#include <AppParCurves_BSpGradient_BFGS.gxx>
+GeomInt_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfWLApprox::
+ GeomInt_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfWLApprox(
+ math_MultipleVarFunctionWithGradient& F,
+ const math_Vector& StartingPoint,
+ const Standard_Real Tolerance3d,
+ const Standard_Real Tolerance2d,
+ const Standard_Real Eps,
+ const Standard_Integer NbIterations)
+ : math_BFGS(F.NbVariables(), Eps, NbIterations, Eps),
+ myTol3d(Tolerance3d),
+ myTol2d(Tolerance2d)
+{
+ Perform(F, StartingPoint);
+}
+
+Standard_Boolean GeomInt_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfWLApprox::
+ IsSolutionReached(math_MultipleVarFunctionWithGradient& F) const
+{
+ Standard_Boolean Result, Result2;
+ GeomInt_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfWLApprox* F1 =
+ (GeomInt_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfWLApprox*)&F;
+
+ Result = (2.0 * fabs(TheMinimum - PreviousMinimum)
+ <= 1.e-10 * (fabs(TheMinimum) + fabs(PreviousMinimum)) + 1.e-12);
+ Standard_Real MErr3d = F1->MaxError3d();
+ Standard_Real MErr2d = F1->MaxError2d();
+ Result2 = ((MErr3d <= myTol3d) && (MErr2d <= myTol2d));
+
+ return (Result || Result2);
+}
#include <GeomInt_ParFunctionOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx>
#include <math_MultipleVarFunctionWithGradient.hxx>
-#define MultiLine GeomInt_TheMultiLineOfWLApprox
-#define MultiLine_hxx <GeomInt_TheMultiLineOfWLApprox.hxx>
-#define ToolLine GeomInt_TheMultiLineToolOfWLApprox
-#define ToolLine_hxx <GeomInt_TheMultiLineToolOfWLApprox.hxx>
-#define AppParCurves_ParLeastSquare \
- GeomInt_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfWLApprox
-#define AppParCurves_ParLeastSquare_hxx \
- <GeomInt_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx>
-#define AppParCurves_ResConstraint GeomInt_ResConstraintOfMyGradientOfTheComputeLineBezierOfWLApprox
-#define AppParCurves_ResConstraint_hxx \
- <GeomInt_ResConstraintOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx>
-#define AppParCurves_ParFunction GeomInt_ParFunctionOfMyGradientOfTheComputeLineBezierOfWLApprox
-#define AppParCurves_ParFunction_hxx \
- <GeomInt_ParFunctionOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx>
-#define AppParCurves_Gradient_BFGS GeomInt_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfWLApprox
-#define AppParCurves_Gradient_BFGS_hxx \
- <GeomInt_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx>
-#define AppParCurves_Gradient GeomInt_MyGradientOfTheComputeLineBezierOfWLApprox
-#define AppParCurves_Gradient_hxx <GeomInt_MyGradientOfTheComputeLineBezierOfWLApprox.hxx>
-#include <AppParCurves_Gradient_BFGS.gxx>
+GeomInt_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfWLApprox::
+ GeomInt_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfWLApprox(
+ math_MultipleVarFunctionWithGradient& F,
+ const math_Vector& StartingPoint,
+ const Standard_Real Tolerance3d,
+ const Standard_Real Tolerance2d,
+ const Standard_Real Eps,
+ const Standard_Integer NbIterations)
+ : math_BFGS(F.NbVariables(), Eps, NbIterations, Eps),
+ myTol3d(Tolerance3d),
+ myTol2d(Tolerance2d)
+{
+ Perform(F, StartingPoint);
+}
+
+Standard_Boolean GeomInt_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfWLApprox::
+ IsSolutionReached(math_MultipleVarFunctionWithGradient& F) const
+{
+ GeomInt_ParFunctionOfMyGradientOfTheComputeLineBezierOfWLApprox* F1 =
+ (GeomInt_ParFunctionOfMyGradientOfTheComputeLineBezierOfWLApprox*)&F;
+ Standard_Boolean Result, Result2;
+
+ Result = (2.0 * fabs(TheMinimum - PreviousMinimum)
+ <= 1.e-10 * (fabs(TheMinimum) + fabs(PreviousMinimum)) + 1.e-12);
+ Standard_Real MErr3d = F1->MaxError3d();
+ Standard_Real MErr2d = F1->MaxError2d();
+
+ Result2 = ((MErr3d <= myTol3d) && (MErr2d <= myTol2d));
+ return (Result || Result2);
+}
#include <GeomInt_ParFunctionOfMyGradientbisOfTheComputeLineOfWLApprox.hxx>
#include <math_MultipleVarFunctionWithGradient.hxx>
-#define MultiLine GeomInt_TheMultiLineOfWLApprox
-#define MultiLine_hxx <GeomInt_TheMultiLineOfWLApprox.hxx>
-#define ToolLine GeomInt_TheMultiLineToolOfWLApprox
-#define ToolLine_hxx <GeomInt_TheMultiLineToolOfWLApprox.hxx>
-#define AppParCurves_ParLeastSquare GeomInt_ParLeastSquareOfMyGradientbisOfTheComputeLineOfWLApprox
-#define AppParCurves_ParLeastSquare_hxx \
- <GeomInt_ParLeastSquareOfMyGradientbisOfTheComputeLineOfWLApprox.hxx>
-#define AppParCurves_ResConstraint GeomInt_ResConstraintOfMyGradientbisOfTheComputeLineOfWLApprox
-#define AppParCurves_ResConstraint_hxx \
- <GeomInt_ResConstraintOfMyGradientbisOfTheComputeLineOfWLApprox.hxx>
-#define AppParCurves_ParFunction GeomInt_ParFunctionOfMyGradientbisOfTheComputeLineOfWLApprox
-#define AppParCurves_ParFunction_hxx \
- <GeomInt_ParFunctionOfMyGradientbisOfTheComputeLineOfWLApprox.hxx>
-#define AppParCurves_Gradient_BFGS GeomInt_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfWLApprox
-#define AppParCurves_Gradient_BFGS_hxx \
- <GeomInt_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfWLApprox.hxx>
-#define AppParCurves_Gradient GeomInt_MyGradientbisOfTheComputeLineOfWLApprox
-#define AppParCurves_Gradient_hxx <GeomInt_MyGradientbisOfTheComputeLineOfWLApprox.hxx>
-#include <AppParCurves_Gradient_BFGS.gxx>
+GeomInt_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfWLApprox::
+ GeomInt_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfWLApprox(
+ math_MultipleVarFunctionWithGradient& F,
+ const math_Vector& StartingPoint,
+ const Standard_Real Tolerance3d,
+ const Standard_Real Tolerance2d,
+ const Standard_Real Eps,
+ const Standard_Integer NbIterations)
+ : math_BFGS(F.NbVariables(), Eps, NbIterations, Eps),
+ myTol3d(Tolerance3d),
+ myTol2d(Tolerance2d)
+{
+ Perform(F, StartingPoint);
+}
+
+Standard_Boolean GeomInt_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfWLApprox::IsSolutionReached(
+ math_MultipleVarFunctionWithGradient& F) const
+{
+ GeomInt_ParFunctionOfMyGradientbisOfTheComputeLineOfWLApprox* F1 =
+ (GeomInt_ParFunctionOfMyGradientbisOfTheComputeLineOfWLApprox*)&F;
+ Standard_Boolean Result, Result2;
+
+ Result = (2.0 * fabs(TheMinimum - PreviousMinimum)
+ <= 1.e-10 * (fabs(TheMinimum) + fabs(PreviousMinimum)) + 1.e-12);
+ Standard_Real MErr3d = F1->MaxError3d();
+ Standard_Real MErr2d = F1->MaxError2d();
+
+ Result2 = ((MErr3d <= myTol3d) && (MErr2d <= myTol2d));
+ return (Result || Result2);
+}
IntCurve_Polygon2dGen.lxx
IntCurve_ProjectOnPConicTool.cxx
IntCurve_ProjectOnPConicTool.hxx
- IntCurve_ProjPCurGen.gxx
IntCurve_UserIntConicCurveGen.gxx
)
#include <IntCurve_PConic.hxx>
#include <IntCurve_PConicTool.hxx>
-#define ImpTool IntCurve_IConicTool
-#define ImpTool_hxx <IntCurve_IConicTool.hxx>
-#define ParCurve IntCurve_PConic
-#define ParCurve_hxx <IntCurve_PConic.hxx>
-#define ParTool IntCurve_PConicTool
-#define ParTool_hxx <IntCurve_PConicTool.hxx>
-#define IntImpParGen_ImpParTool IntCurve_MyImpParToolOfIntImpConicParConic
-#define IntImpParGen_ImpParTool_hxx <IntCurve_MyImpParToolOfIntImpConicParConic.hxx>
-#include <IntImpParGen_ImpParTool.gxx>
+#include <gp_Vec2d.hxx>
+
+IntCurve_MyImpParToolOfIntImpConicParConic::IntCurve_MyImpParToolOfIntImpConicParConic(
+ const IntCurve_IConicTool& ITool,
+ const IntCurve_PConic& PC)
+ : TheImpTool(ITool)
+{
+ TheParCurve = (Standard_Address)(&PC);
+}
+
+Standard_Boolean IntCurve_MyImpParToolOfIntImpConicParConic::Value(const Standard_Real Param,
+ Standard_Real& ApproxDistance)
+{
+ ApproxDistance =
+ TheImpTool.Distance(IntCurve_PConicTool::Value((*((IntCurve_PConic*)(TheParCurve))), Param));
+ return (Standard_True);
+}
+
+Standard_Boolean IntCurve_MyImpParToolOfIntImpConicParConic::Derivative(
+ const Standard_Real Param,
+ Standard_Real& D_ApproxDistance_DV)
+{
+ gp_Pnt2d Pt;
+ gp_Vec2d TanParCurve;
+ gp_Vec2d Grad = TheImpTool.GradDistance(
+ IntCurve_PConicTool::Value((*((IntCurve_PConic*)(TheParCurve))), Param));
+ IntCurve_PConicTool::D1((*((IntCurve_PConic*)(TheParCurve))), Param, Pt, TanParCurve);
+ D_ApproxDistance_DV = Grad.Dot(TanParCurve);
+ return (Standard_True);
+}
+
+Standard_Boolean IntCurve_MyImpParToolOfIntImpConicParConic::Values(const Standard_Real Param,
+ Standard_Real& ApproxDistance,
+ Standard_Real& Deriv)
+{
+ this->Value(Param, ApproxDistance);
+ this->Derivative(Param, Deriv);
+ return (Standard_True);
+}
+++ /dev/null
-// Created on: 1992-10-13
-// Created by: Laurent BUCHARD
-// Copyright (c) 1992-1999 Matra Datavision
-// Copyright (c) 1999-2014 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 <Extrema_POnCurv2d.hxx>
-
-Standard_Real IntCurve_ProjPCurGen::FindParameter(const TheCurve& C,
- const gp_Pnt2d& P,
- const Standard_Real LowParameter,
- const Standard_Real HighParameter,
- const Standard_Real)
-{
- Standard_Real theparam, defaultparam;
- Standard_Integer NbPts = TheCurveTool::NbSamples(C);
- Standard_Real theEpsX = TheCurveTool::EpsX(C);
- Extrema_POnCurv2d POnC;
-
- IntCurve_TheCurveLocator::Locate(P, C, NbPts, LowParameter, HighParameter, POnC);
- defaultparam = POnC.Parameter();
- IntCurve_TheLocateExtPC Loc(P, C, defaultparam, theEpsX);
-
- if (Loc.IsDone() == Standard_False)
- {
- //-- cout<<"\n Erreur dans LocateExtPC "<<endl;
- theparam = defaultparam;
- }
- else
- {
- if (Loc.IsMin() == Standard_False)
- {
- //-- cout<<"\n Erreur dans LocateExtPC (Maximum trouve) "<<endl;
- theparam = defaultparam;
- }
- else
- {
- theparam = Loc.Point().Parameter();
- }
- }
- return theparam;
-}
-
-Standard_Real IntCurve_ProjPCurGen::FindParameter(const TheCurve& C,
- const gp_Pnt2d& P,
- const Standard_Real Tol)
-{
-
- Standard_Real theParam;
- theParam =
- FindParameter(C, P, TheCurveTool::FirstParameter(C), TheCurveTool::LastParameter(C), Tol);
- return theParam;
-}
IntCurveSurface_IntersectionSegment.cxx
IntCurveSurface_IntersectionSegment.hxx
IntCurveSurface_Polygon.gxx
- IntCurveSurface_PolygonTool.gxx
IntCurveSurface_PolygonTool.lxx
IntCurveSurface_Polyhedron.gxx
IntCurveSurface_Polyhedron.lxx
- IntCurveSurface_PolyhedronTool.gxx
IntCurveSurface_PolyhedronTool.lxx
IntCurveSurface_QuadricCurveExactInter.gxx
- IntCurveSurface_QuadricCurveFunc.gxx
IntCurveSurface_SequenceOfPnt.hxx
IntCurveSurface_SequenceOfSeg.hxx
IntCurveSurface_TheCSFunctionOfHInter.hxx
+++ /dev/null
-// Created on: 1993-01-14
-// Created by: Laurent BUCHARD
-// Copyright (c) 1993-1999 Matra Datavision
-// Copyright (c) 1999-2014 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.
-
-void IntCurveSurface_PolygonTool::Dump(const ThePolygon& L)
-{
-
- static Standard_Integer num = 0;
- num++;
- Standard_Integer nbs = IntCurveSurface_PolygonTool::NbSegments(L);
- std::cout << "\npol2d " << num << " " << nbs << std::endl;
- std::cout << "Deflection " << IntCurveSurface_PolygonTool::DeflectionOverEstimation(L)
- << std::endl;
-
- for (Standard_Integer i = 1; i <= nbs; i++)
- {
- gp_Pnt P(IntCurveSurface_PolygonTool::BeginOfSeg(L, i));
- std::cout << "pnt " << num << " " << i << " " << P.X() << " " << P.Y() << " " << P.Z()
- << std::endl;
- }
- gp_Pnt PF(IntCurveSurface_PolygonTool::EndOfSeg(L, nbs));
- std::cout << "pnt " << num << " " << nbs << " " << PF.X() << " " << PF.Y() << " " << PF.Z()
- << std::endl;
-}
+++ /dev/null
-// Copyright (c) 1995-1999 Matra Datavision
-// Copyright (c) 1999-2014 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.
-
-void IntCurveSurface_PolyhedronTool::Dump(const ThePolyhedron& polyh)
-{
- polyh.Dump();
-}
+++ /dev/null
-// Created on: 1993-08-19
-// Created by: Laurent BUCHARD
-// Copyright (c) 1993-1999 Matra Datavision
-// Copyright (c) 1999-2014 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 <gp_Vec.hxx>
-
-//=================================================================================================
-
-IntCurveSurface_QuadricCurveFunc::IntCurveSurface_QuadricCurveFunc(const TheQuadric& Q,
- const TheCurve& C)
- : myQuadric(Q),
- myCurve(C)
-{
-}
-
-//=================================================================================================
-
-Standard_Boolean IntCurveSurface_QuadricCurveFunc::Value(const Standard_Real Param,
- Standard_Real& F)
-{
- F = myQuadric.Distance(TheCurveTool::Value(myCurve, Param));
- return (Standard_True);
-}
-
-Standard_Boolean IntCurveSurface_QuadricCurveFunc::Derivative(const Standard_Real Param,
- Standard_Real& D)
-{
- gp_Pnt P;
- gp_Vec T;
- TheCurveTool::D1(myCurve, Param, P, T);
- D = T.Dot(myQuadric.Gradient(P));
- return (Standard_True);
-}
-
-Standard_Boolean IntCurveSurface_QuadricCurveFunc::Values(const Standard_Real Param,
- Standard_Real& F,
- Standard_Real& D)
-{
- gp_Pnt P;
- gp_Vec T, Grad;
- TheCurveTool::D1(myCurve, Param, P, T);
- myQuadric.ValAndGrad(P, F, Grad);
- D = T.Dot(Grad);
- return (Standard_True);
-}
#include <IntCurveSurface_ThePolygonOfHInter.hxx>
#include <Bnd_Box.hxx>
-#define ThePoint gp_Pnt
-#define ThePoint_hxx <gp_Pnt.hxx>
-#define ThePolygon IntCurveSurface_ThePolygonOfHInter
-#define ThePolygon_hxx <IntCurveSurface_ThePolygonOfHInter.hxx>
-#define TheBoundingBox Bnd_Box
-#define TheBoundingBox_hxx <Bnd_Box.hxx>
-#define IntCurveSurface_PolygonTool IntCurveSurface_ThePolygonToolOfHInter
-#define IntCurveSurface_PolygonTool_hxx <IntCurveSurface_ThePolygonToolOfHInter.hxx>
-#include <IntCurveSurface_PolygonTool.gxx>
+#include <iostream>
+
+void IntCurveSurface_ThePolygonToolOfHInter::Dump(const IntCurveSurface_ThePolygonOfHInter& L)
+{
+ static Standard_Integer num = 0;
+ num++;
+ Standard_Integer nbs = IntCurveSurface_ThePolygonToolOfHInter::NbSegments(L);
+ std::cout << "\npol2d " << num << " " << nbs << std::endl;
+ std::cout << "Deflection " << IntCurveSurface_ThePolygonToolOfHInter::DeflectionOverEstimation(L)
+ << std::endl;
+
+ for (Standard_Integer i = 1; i <= nbs; i++)
+ {
+ gp_Pnt P(IntCurveSurface_ThePolygonToolOfHInter::BeginOfSeg(L, i));
+ std::cout << "pnt " << num << " " << i << " " << P.X() << " " << P.Y() << " " << P.Z()
+ << std::endl;
+ }
+ gp_Pnt PF(IntCurveSurface_ThePolygonToolOfHInter::EndOfSeg(L, nbs));
+ std::cout << "pnt " << num << " " << nbs << " " << PF.X() << " " << PF.Y() << " " << PF.Z()
+ << std::endl;
+}
#include <Bnd_Box.hxx>
#include <gp_Pnt.hxx>
-#define ThePolyhedron IntCurveSurface_ThePolyhedronOfHInter
-#define ThePolyhedron_hxx <IntCurveSurface_ThePolyhedronOfHInter.hxx>
-#define IntCurveSurface_PolyhedronTool IntCurveSurface_ThePolyhedronToolOfHInter
-#define IntCurveSurface_PolyhedronTool_hxx <IntCurveSurface_ThePolyhedronToolOfHInter.hxx>
-#include <IntCurveSurface_PolyhedronTool.gxx>
+void IntCurveSurface_ThePolyhedronToolOfHInter::Dump(
+ const IntCurveSurface_ThePolyhedronOfHInter& polyh)
+{
+ polyh.Dump();
+}
#include <Adaptor3d_Curve.hxx>
#include <IntSurf_Quadric.hxx>
#include <IntCurveSurface_TheHCurveTool.hxx>
+#include <gp_Vec.hxx>
-#define TheQuadric IntSurf_Quadric
-#define TheQuadric_hxx <IntSurf_Quadric.hxx>
-#define TheCurve Handle(Adaptor3d_Curve)
-#define TheCurve_hxx <Adaptor3d_Curve.hxx>
-#define TheCurveTool IntCurveSurface_TheHCurveTool
-#define TheCurveTool_hxx <IntCurveSurface_TheHCurveTool.hxx>
-#define IntCurveSurface_QuadricCurveFunc IntCurveSurface_TheQuadCurvFuncOfTheQuadCurvExactHInter
-#define IntCurveSurface_QuadricCurveFunc_hxx \
- <IntCurveSurface_TheQuadCurvFuncOfTheQuadCurvExactHInter.hxx>
-#include <IntCurveSurface_QuadricCurveFunc.gxx>
+IntCurveSurface_TheQuadCurvFuncOfTheQuadCurvExactHInter::
+ IntCurveSurface_TheQuadCurvFuncOfTheQuadCurvExactHInter(const IntSurf_Quadric& Q,
+ const Handle(Adaptor3d_Curve)& C)
+ : myQuadric(Q),
+ myCurve(C)
+{
+}
+
+Standard_Boolean IntCurveSurface_TheQuadCurvFuncOfTheQuadCurvExactHInter::Value(
+ const Standard_Real Param,
+ Standard_Real& F)
+{
+ F = myQuadric.Distance(IntCurveSurface_TheHCurveTool::Value(myCurve, Param));
+ return (Standard_True);
+}
+
+Standard_Boolean IntCurveSurface_TheQuadCurvFuncOfTheQuadCurvExactHInter::Derivative(
+ const Standard_Real Param,
+ Standard_Real& D)
+{
+ gp_Pnt P;
+ gp_Vec T;
+ IntCurveSurface_TheHCurveTool::D1(myCurve, Param, P, T);
+ D = T.Dot(myQuadric.Gradient(P));
+ return (Standard_True);
+}
+
+Standard_Boolean IntCurveSurface_TheQuadCurvFuncOfTheQuadCurvExactHInter::Values(
+ const Standard_Real Param,
+ Standard_Real& F,
+ Standard_Real& D)
+{
+ gp_Pnt P;
+ gp_Vec T, Grad;
+ IntCurveSurface_TheHCurveTool::D1(myCurve, Param, P, T);
+ myQuadric.ValAndGrad(P, F, Grad);
+ D = T.Dot(Grad);
+ return (Standard_True);
+}
set(OCCT_IntImpParGen_FILES
IntImpParGen.cxx
IntImpParGen.hxx
- IntImpParGen_ImpParTool.gxx
IntImpParGen_ImpTool.hxx
IntImpParGen_Intersector.gxx
IntImpParGen_Tool.cxx
+++ /dev/null
-// Copyright (c) 1995-1999 Matra Datavision
-// Copyright (c) 1999-2014 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 <gp_Vec2d.hxx>
-
-IntImpParGen_ImpParTool::IntImpParGen_ImpParTool(const ImpTool& ITool, const ParCurve& PC)
- : TheImpTool(ITool)
-{
- TheParCurve = (Standard_Address)(&PC);
-}
-
-Standard_Boolean IntImpParGen_ImpParTool::Value(const Standard_Real Param,
- Standard_Real& ApproxDistance)
-{
-
- ApproxDistance = TheImpTool.Distance(ParTool::Value((*((ParCurve*)(TheParCurve))), Param));
- return (Standard_True);
-}
-
-Standard_Boolean IntImpParGen_ImpParTool::Derivative(const Standard_Real Param,
- Standard_Real& D_ApproxDistance_DV)
-{
-
- gp_Pnt2d Pt;
- gp_Vec2d TanParCurve;
- gp_Vec2d Grad = TheImpTool.GradDistance(ParTool::Value((*((ParCurve*)(TheParCurve))), Param));
- ParTool::D1((*((ParCurve*)(TheParCurve))), Param, Pt, TanParCurve);
- D_ApproxDistance_DV = Grad.Dot(TanParCurve);
- return (Standard_True);
-}
-
-Standard_Boolean IntImpParGen_ImpParTool::Values(const Standard_Real Param,
- Standard_Real& ApproxDistance,
- Standard_Real& Deriv)
-{
-
- this->Value(Param, ApproxDistance);
- this->Derivative(Param, Deriv);
- return (Standard_True);
-}
#include <gp_Vec.hxx>
#include <Standard_Transient.hxx>
#include <IntSurf_Allocator.hxx>
-class IntSurf_LineOn2S;
+#include <IntSurf_LineOn2S.hxx>
class Standard_OutOfRange;
class Standard_DomainError;
class IntSurf_PathPoint;
Standard_Boolean istgtend;
};
-#define TheStartPoint IntSurf_PathPoint
-#define TheStartPoint_hxx <IntSurf_PathPoint.hxx>
-#define IntWalk_IWLine IntPatch_TheIWLineOfTheIWalking
-#define IntWalk_IWLine_hxx <IntPatch_TheIWLineOfTheIWalking.hxx>
-#define Handle_IntWalk_IWLine Handle(IntPatch_TheIWLineOfTheIWalking)
+//=================================================================================================
+// Inline implementations
+//=================================================================================================
-#include <IntWalk_IWLine.lxx>
+inline void IntPatch_TheIWLineOfTheIWalking::Cut(const Standard_Integer Index)
+{
+ Handle(IntSurf_LineOn2S) lost = line->Split(Index);
+}
+
+inline void IntPatch_TheIWLineOfTheIWalking::AddPoint(const IntSurf_PntOn2S& P)
+{
+ line->Add(P);
+}
+
+inline void IntPatch_TheIWLineOfTheIWalking::AddStatusFirst(const Standard_Boolean Closed,
+ const Standard_Boolean HasFirst)
+{
+ closed = Closed;
+ hasFirst = HasFirst;
+}
+
+inline void IntPatch_TheIWLineOfTheIWalking::AddStatusLast(const Standard_Boolean HasLast)
+{
+ hasLast = HasLast;
+}
+
+inline void IntPatch_TheIWLineOfTheIWalking::AddStatusFirst(const Standard_Boolean Closed,
+ const Standard_Boolean HasFirst,
+ const Standard_Integer Index,
+ const IntSurf_PathPoint& P)
+{
+ closed = Closed;
+ hasFirst = HasFirst;
+ firstIndex = Index;
+ theFirstPoint = P;
+}
+
+inline void IntPatch_TheIWLineOfTheIWalking::AddStatusLast(const Standard_Boolean HasLast,
+ const Standard_Integer Index,
+ const IntSurf_PathPoint& P)
+{
+ hasLast = HasLast;
+ lastIndex = Index;
+ theLastPoint = P;
+}
+
+inline void IntPatch_TheIWLineOfTheIWalking::AddStatusFirstLast(const Standard_Boolean Closed,
+ const Standard_Boolean HasFirst,
+ const Standard_Boolean HasLast)
+{
+ closed = Closed;
+ hasFirst = HasFirst;
+ hasLast = HasLast;
+}
+
+inline void IntPatch_TheIWLineOfTheIWalking::AddIndexPassing(const Standard_Integer Index)
+{
+ couple.Append(IntSurf_Couple(line->NbPoints() + 1, Index));
+}
+
+inline Standard_Integer IntPatch_TheIWLineOfTheIWalking::NbPoints() const
+{
+ return line->NbPoints();
+}
+
+inline const IntSurf_PntOn2S& IntPatch_TheIWLineOfTheIWalking::Value(
+ const Standard_Integer Index) const
+{
+ return line->Value(Index);
+}
+
+inline const Handle(IntSurf_LineOn2S)& IntPatch_TheIWLineOfTheIWalking::Line() const
+{
+ return line;
+}
+
+inline Standard_Boolean IntPatch_TheIWLineOfTheIWalking::IsClosed() const
+{
+ return closed;
+}
+
+inline Standard_Boolean IntPatch_TheIWLineOfTheIWalking::HasFirstPoint() const
+{
+ return hasFirst;
+}
+
+inline Standard_Integer IntPatch_TheIWLineOfTheIWalking::FirstPointIndex() const
+{
+ if (!hasFirst)
+ throw Standard_DomainError();
+ return firstIndex;
+}
+
+inline const IntSurf_PathPoint& IntPatch_TheIWLineOfTheIWalking::FirstPoint() const
+{
+ if (!hasFirst)
+ throw Standard_DomainError();
+ return theFirstPoint;
+}
+
+inline Standard_Boolean IntPatch_TheIWLineOfTheIWalking::HasLastPoint() const
+{
+ return hasLast;
+}
+
+inline const IntSurf_PathPoint& IntPatch_TheIWLineOfTheIWalking::LastPoint() const
+{
+ if (!hasLast)
+ throw Standard_DomainError();
+ return theLastPoint;
+}
+
+inline Standard_Integer IntPatch_TheIWLineOfTheIWalking::LastPointIndex() const
+{
+ if (!hasLast)
+ throw Standard_DomainError();
+ return lastIndex;
+}
+
+inline Standard_Integer IntPatch_TheIWLineOfTheIWalking::NbPassingPoint() const
+{
+ return couple.Length();
+}
+
+inline void IntPatch_TheIWLineOfTheIWalking::PassingPoint(const Standard_Integer Index,
+ Standard_Integer& IndexLine,
+ Standard_Integer& IndexPnts) const
+{
+ IndexLine = couple(Index).First();
+ IndexPnts = couple(Index).Second();
+}
+
+inline void IntPatch_TheIWLineOfTheIWalking::SetTangentVector(const gp_Vec& V,
+ const Standard_Integer Index)
+{
+ indextg = Index;
+ vcttg = V;
+}
+
+inline void IntPatch_TheIWLineOfTheIWalking::SetTangencyAtBegining(const Standard_Boolean IsTangent)
+{
+ istgtend = IsTangent;
+}
+
+inline void IntPatch_TheIWLineOfTheIWalking::SetTangencyAtEnd(const Standard_Boolean IsTangent)
+{
+ istgtend = IsTangent;
+}
+
+inline const gp_Vec& IntPatch_TheIWLineOfTheIWalking::TangentVector(Standard_Integer& Index) const
+{
+ Index = indextg;
+ return vcttg;
+}
-#undef TheStartPoint
-#undef TheStartPoint_hxx
-#undef IntWalk_IWLine
-#undef IntWalk_IWLine_hxx
-#undef Handle_IntWalk_IWLine
+inline Standard_Boolean IntPatch_TheIWLineOfTheIWalking::IsTangentAtBegining() const
+{
+ return istgtbeg;
+}
+
+inline Standard_Boolean IntPatch_TheIWLineOfTheIWalking::IsTangentAtEnd() const
+{
+ return istgtend;
+}
#endif // _IntPatch_TheIWLineOfTheIWalking_HeaderFile
#include <IntSurf_PntOn2S.hxx>
#include <gp_Vec.hxx>
-#define TheStartPoint IntSurf_PathPoint
-#define TheStartPoint_hxx <IntSurf_PathPoint.hxx>
-#define IntWalk_IWLine IntPatch_TheIWLineOfTheIWalking
-#define IntWalk_IWLine_hxx <IntPatch_TheIWLineOfTheIWalking.hxx>
-#define Handle_IntWalk_IWLine Handle(IntPatch_TheIWLineOfTheIWalking)
-#include <IntWalk_IWLine.gxx>
+IntPatch_TheIWLineOfTheIWalking::IntPatch_TheIWLineOfTheIWalking(
+ const IntSurf_Allocator& theAllocator)
+ : line(new IntSurf_LineOn2S(theAllocator)),
+ closed(Standard_False),
+ hasFirst(Standard_False),
+ hasLast(Standard_False),
+ firstIndex(-1),
+ lastIndex(-1),
+ indextg(-1),
+ istgtbeg(Standard_False),
+ istgtend(Standard_False)
+{
+}
+
+void IntPatch_TheIWLineOfTheIWalking::Reverse()
+{
+ line->Reverse();
+ Standard_Integer N = line->NbPoints();
+ Standard_Integer NbCouple = couple.Length();
+ for (Standard_Integer i = 1; i <= NbCouple; i++)
+ {
+ couple(i) = IntSurf_Couple(N - couple(i).First() + 1, couple(i).Second());
+ }
+}
Standard_Real param;
};
-#define TheVertex Handle(Adaptor3d_HVertex)
-#define TheVertex_hxx <Adaptor3d_HVertex.hxx>
-#define TheArc Handle(Adaptor2d_Curve2d)
-#define TheArc_hxx <Adaptor2d_Curve2d.hxx>
-#define IntStart_PathPoint IntPatch_ThePathPointOfTheSOnBounds
-#define IntStart_PathPoint_hxx <IntPatch_ThePathPointOfTheSOnBounds.hxx>
-
-#include <IntStart_PathPoint.lxx>
-
-#undef TheVertex
-#undef TheVertex_hxx
-#undef TheArc
-#undef TheArc_hxx
-#undef IntStart_PathPoint
-#undef IntStart_PathPoint_hxx
+//=================================================================================================
+// Inline implementations
+//=================================================================================================
+
+inline void IntPatch_ThePathPointOfTheSOnBounds::SetValue(const gp_Pnt& P,
+ const Standard_Real Tol,
+ const Handle(Adaptor3d_HVertex)& V,
+ const Handle(Adaptor2d_Curve2d)& A,
+ const Standard_Real Parameter)
+{
+ isnew = Standard_False;
+ point = P;
+ tol = Tol;
+ vtx = V;
+ arc = A;
+ param = Parameter;
+}
+
+inline void IntPatch_ThePathPointOfTheSOnBounds::SetValue(const gp_Pnt& P,
+ const Standard_Real Tol,
+ const Handle(Adaptor2d_Curve2d)& A,
+ const Standard_Real Parameter)
+{
+ isnew = Standard_True;
+ point = P;
+ tol = Tol;
+ arc = A;
+ param = Parameter;
+}
+
+inline const gp_Pnt& IntPatch_ThePathPointOfTheSOnBounds::Value() const
+{
+ return point;
+}
+
+inline Standard_Real IntPatch_ThePathPointOfTheSOnBounds::Tolerance() const
+{
+ return tol;
+}
+
+inline Standard_Boolean IntPatch_ThePathPointOfTheSOnBounds::IsNew() const
+{
+ return isnew;
+}
+
+inline const Handle(Adaptor3d_HVertex)& IntPatch_ThePathPointOfTheSOnBounds::Vertex() const
+{
+ if (isnew)
+ {
+ throw Standard_DomainError();
+ }
+ return vtx;
+}
+
+inline const Handle(Adaptor2d_Curve2d)& IntPatch_ThePathPointOfTheSOnBounds::Arc() const
+{
+ return arc;
+}
+
+inline Standard_Real IntPatch_ThePathPointOfTheSOnBounds::Parameter() const
+{
+ return param;
+}
#endif // _IntPatch_ThePathPointOfTheSOnBounds_HeaderFile
#include <Standard_DomainError.hxx>
#include <gp_Pnt.hxx>
-#define TheVertex Handle(Adaptor3d_HVertex)
-#define TheVertex_hxx <Adaptor3d_HVertex.hxx>
-#define TheArc Handle(Adaptor2d_Curve2d)
-#define TheArc_hxx <Adaptor2d_Curve2d.hxx>
-#define IntStart_PathPoint IntPatch_ThePathPointOfTheSOnBounds
-#define IntStart_PathPoint_hxx <IntPatch_ThePathPointOfTheSOnBounds.hxx>
-#include <IntStart_PathPoint.gxx>
+IntPatch_ThePathPointOfTheSOnBounds::IntPatch_ThePathPointOfTheSOnBounds()
+ : tol(0.0),
+ isnew(Standard_True),
+ param(0.0)
+{
+}
+
+IntPatch_ThePathPointOfTheSOnBounds::IntPatch_ThePathPointOfTheSOnBounds(
+ const gp_Pnt& P,
+ const Standard_Real Tol,
+ const Handle(Adaptor3d_HVertex)& V,
+ const Handle(Adaptor2d_Curve2d)& A,
+ const Standard_Real Parameter)
+ : point(P),
+ tol(Tol),
+ isnew(Standard_False),
+ vtx(V),
+ arc(A),
+ param(Parameter)
+{
+}
+
+IntPatch_ThePathPointOfTheSOnBounds::IntPatch_ThePathPointOfTheSOnBounds(
+ const gp_Pnt& P,
+ const Standard_Real Tol,
+ const Handle(Adaptor2d_Curve2d)& A,
+ const Standard_Real Parameter)
+ : point(P),
+ tol(Tol),
+ isnew(Standard_True),
+ arc(A),
+ param(Parameter)
+{
+}
IntPatch_ThePathPointOfTheSOnBounds thelp;
};
-#define TheVertex Handle(Adaptor3d_HVertex)
-#define TheVertex_hxx <Adaptor3d_HVertex.hxx>
-#define TheArc Handle(Adaptor2d_Curve2d)
-#define TheArc_hxx <Adaptor2d_Curve2d.hxx>
-#define ThePathPoint IntPatch_ThePathPointOfTheSOnBounds
-#define ThePathPoint_hxx <IntPatch_ThePathPointOfTheSOnBounds.hxx>
-#define IntStart_Segment IntPatch_TheSegmentOfTheSOnBounds
-#define IntStart_Segment_hxx <IntPatch_TheSegmentOfTheSOnBounds.hxx>
-
-#include <IntStart_Segment.lxx>
-
-#undef TheVertex
-#undef TheVertex_hxx
-#undef TheArc
-#undef TheArc_hxx
-#undef ThePathPoint
-#undef ThePathPoint_hxx
-#undef IntStart_Segment
-#undef IntStart_Segment_hxx
+//=================================================================================================
+// Inline implementations
+//=================================================================================================
+
+inline void IntPatch_TheSegmentOfTheSOnBounds::SetValue(const Handle(Adaptor2d_Curve2d)& A)
+{
+ hasfp = Standard_False;
+ haslp = Standard_False;
+ arc = A;
+}
+
+inline const Handle(Adaptor2d_Curve2d)& IntPatch_TheSegmentOfTheSOnBounds::Curve() const
+{
+ return arc;
+}
+
+inline Standard_Boolean IntPatch_TheSegmentOfTheSOnBounds::HasFirstPoint() const
+{
+ return hasfp;
+}
+
+inline const IntPatch_ThePathPointOfTheSOnBounds& IntPatch_TheSegmentOfTheSOnBounds::FirstPoint()
+ const
+{
+ if (!hasfp)
+ {
+ throw Standard_DomainError();
+ }
+ return thefp;
+}
+
+inline Standard_Boolean IntPatch_TheSegmentOfTheSOnBounds::HasLastPoint() const
+{
+ return haslp;
+}
+
+inline const IntPatch_ThePathPointOfTheSOnBounds& IntPatch_TheSegmentOfTheSOnBounds::LastPoint()
+ const
+{
+ if (!haslp)
+ {
+ throw Standard_DomainError();
+ }
+ return thelp;
+}
#endif // _IntPatch_TheSegmentOfTheSOnBounds_HeaderFile
#include <Adaptor3d_HVertex.hxx>
#include <IntPatch_ThePathPointOfTheSOnBounds.hxx>
-#define TheVertex Handle(Adaptor3d_HVertex)
-#define TheVertex_hxx <Adaptor3d_HVertex.hxx>
-#define TheArc Handle(Adaptor2d_Curve2d)
-#define TheArc_hxx <Adaptor2d_Curve2d.hxx>
-#define ThePathPoint IntPatch_ThePathPointOfTheSOnBounds
-#define ThePathPoint_hxx <IntPatch_ThePathPointOfTheSOnBounds.hxx>
-#define IntStart_Segment IntPatch_TheSegmentOfTheSOnBounds
-#define IntStart_Segment_hxx <IntPatch_TheSegmentOfTheSOnBounds.hxx>
-#include <IntStart_Segment.gxx>
+IntPatch_TheSegmentOfTheSOnBounds::IntPatch_TheSegmentOfTheSOnBounds()
+ : hasfp(Standard_False),
+ haslp(Standard_False)
+{
+}
+
+void IntPatch_TheSegmentOfTheSOnBounds::SetLimitPoint(const IntPatch_ThePathPointOfTheSOnBounds& V,
+ const Standard_Boolean First)
+{
+ if (First)
+ {
+ hasfp = Standard_True;
+ thefp = V;
+ }
+ else
+ {
+ haslp = Standard_True;
+ thelp = V;
+ }
+}
set(OCCT_IntStart_FILES_LOCATION "${CMAKE_CURRENT_LIST_DIR}")
set(OCCT_IntStart_FILES
- IntStart_PathPoint.gxx
- IntStart_PathPoint.lxx
IntStart_SearchInside.gxx
IntStart_SearchInside.lxx
IntStart_SearchOnBoundaries.gxx
IntStart_SearchOnBoundaries.lxx
- IntStart_Segment.gxx
- IntStart_Segment.lxx
IntStart_SITopolTool.cxx
IntStart_SITopolTool.hxx
)
+++ /dev/null
-// Copyright (c) 1995-1999 Matra Datavision
-// Copyright (c) 1999-2014 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.
-
-IntStart_PathPoint::IntStart_PathPoint()
- : tol(0.0),
- isnew(Standard_True),
- param(0.0)
-{
-}
-
-IntStart_PathPoint::IntStart_PathPoint(const gp_Pnt& P,
- const Standard_Real Tol,
- const TheVertex& V,
- const TheArc& A,
- const Standard_Real Parameter)
- :
-
- point(P),
- tol(Tol),
- isnew(Standard_False),
- vtx(V),
- arc(A),
- param(Parameter)
-{
-}
-
-IntStart_PathPoint::IntStart_PathPoint(const gp_Pnt& P,
- const Standard_Real Tol,
- const TheArc& A,
- const Standard_Real Parameter)
- :
-
- point(P),
- tol(Tol),
- isnew(Standard_True),
- arc(A),
- param(Parameter)
-{
-}
+++ /dev/null
-// Copyright (c) 1995-1999 Matra Datavision
-// Copyright (c) 1999-2014 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_DomainError.hxx>
-
-inline void IntStart_PathPoint::SetValue(const gp_Pnt& P,
- const Standard_Real Tol,
- const TheVertex& V,
- const TheArc& A,
- const Standard_Real Parameter)
-{
-
- isnew = Standard_False;
- point = P;
- tol = Tol;
- vtx = V;
- arc = A;
- param = Parameter;
-}
-
-inline void IntStart_PathPoint::SetValue(const gp_Pnt& P,
- const Standard_Real Tol,
- const TheArc& A,
- const Standard_Real Parameter)
-{
-
- isnew = Standard_True;
- point = P;
- tol = Tol;
- arc = A;
- param = Parameter;
-}
-
-inline const gp_Pnt& IntStart_PathPoint::Value() const
-{
-
- return point;
-}
-
-inline Standard_Real IntStart_PathPoint::Tolerance() const
-{
-
- return tol;
-}
-
-inline Standard_Boolean IntStart_PathPoint::IsNew() const
-{
-
- return isnew;
-}
-
-inline const TheVertex& IntStart_PathPoint::Vertex() const
-{
-
- if (isnew)
- {
- throw Standard_DomainError();
- }
- return vtx;
-}
-
-inline const TheArc& IntStart_PathPoint::Arc() const
-{
-
- return arc;
-}
-
-inline Standard_Real IntStart_PathPoint::Parameter() const
-{
-
- return param;
-}
+++ /dev/null
-// Copyright (c) 1995-1999 Matra Datavision
-// Copyright (c) 1999-2014 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.
-
-IntStart_Segment::IntStart_Segment()
- : hasfp(Standard_False),
- haslp(Standard_False)
-{
-}
-
-void IntStart_Segment::SetLimitPoint(const ThePathPoint& V, const Standard_Boolean First)
-{
-
- if (First)
- {
- hasfp = Standard_True;
- thefp = V;
- }
- else
- {
- haslp = Standard_True;
- thelp = V;
- }
-}
+++ /dev/null
-// Copyright (c) 1995-1999 Matra Datavision
-// Copyright (c) 1999-2014 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_DomainError.hxx>
-
-inline void IntStart_Segment::SetValue(const TheArc& A)
-{
-
- hasfp = Standard_False;
- haslp = Standard_False;
- arc = A;
-}
-
-inline const TheArc& IntStart_Segment::Curve() const
-{
-
- return arc;
-}
-
-inline Standard_Boolean IntStart_Segment::HasFirstPoint() const
-{
-
- return hasfp;
-}
-
-inline const ThePathPoint& IntStart_Segment::FirstPoint() const
-{
-
- if (!hasfp)
- {
- throw Standard_DomainError();
- }
- return thefp;
-}
-
-inline Standard_Boolean IntStart_Segment::HasLastPoint() const
-{
-
- return haslp;
-}
-
-inline const ThePathPoint& IntStart_Segment::LastPoint() const
-{
-
- if (!haslp)
- {
- throw Standard_DomainError();
- }
- return thelp;
-}
set(OCCT_IntWalk_FILES
IntWalk_IWalking.gxx
IntWalk_IWalking.lxx
- IntWalk_IWLine.gxx
- IntWalk_IWLine.lxx
IntWalk_PWalking.cxx
IntWalk_PWalking.hxx
IntWalk_PWalking.lxx
+++ /dev/null
-// Copyright (c) 1995-1999 Matra Datavision
-// Copyright (c) 1999-2014 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 <IntSurf_Couple.hxx>
-
-IntWalk_IWLine::IntWalk_IWLine(const IntSurf_Allocator& theAllocator)
- : line(new IntSurf_LineOn2S(theAllocator)),
- closed(Standard_False),
- hasFirst(Standard_False),
- hasLast(Standard_False),
- firstIndex(-1),
- lastIndex(-1),
- indextg(-1),
- istgtbeg(Standard_False),
- istgtend(Standard_False)
-{
-}
-
-void IntWalk_IWLine::Reverse()
-{
- line->Reverse();
- Standard_Integer N = line->NbPoints();
- Standard_Integer NbCouple = couple.Length();
- for (Standard_Integer i = 1; i <= NbCouple; i++)
- {
- couple(i) = IntSurf_Couple(N - couple(i).First() + 1, couple(i).Second());
- }
-}
+++ /dev/null
-// Copyright (c) 1995-1999 Matra Datavision
-// Copyright (c) 1999-2014 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_DomainError.hxx>
-#include <IntSurf_LineOn2S.hxx>
-#include <IntSurf_Couple.hxx>
-#include <IntSurf_SequenceOfCouple.hxx>
-
-inline void IntWalk_IWLine::Cut(const Standard_Integer Index)
-{
- //-- std::cout<<" split : "<<Index<<std::endl;
- Handle(IntSurf_LineOn2S) lost = line->Split(Index);
-}
-
-inline void IntWalk_IWLine::AddPoint(const IntSurf_PntOn2S& P)
-{
- line->Add(P);
-}
-
-inline void IntWalk_IWLine::AddStatusFirst(const Standard_Boolean Closed,
- const Standard_Boolean HasFirst)
-{
- closed = Closed;
- hasFirst = HasFirst;
-}
-
-inline void IntWalk_IWLine::AddStatusLast(const Standard_Boolean HasLast)
-{
- hasLast = HasLast;
-}
-
-inline void IntWalk_IWLine::AddStatusFirst(const Standard_Boolean Closed,
- const Standard_Boolean HasFirst,
- const Standard_Integer Index,
- const TheStartPoint& P)
-{
- closed = Closed;
- hasFirst = HasFirst;
- firstIndex = Index;
- theFirstPoint = P;
-}
-
-inline void IntWalk_IWLine::AddStatusLast(const Standard_Boolean HasLast,
- const Standard_Integer Index,
- const TheStartPoint& P)
-{
- hasLast = HasLast;
- lastIndex = Index;
- theLastPoint = P;
-}
-
-inline void IntWalk_IWLine::AddStatusFirstLast(const Standard_Boolean Closed,
- const Standard_Boolean HasFirst,
- const Standard_Boolean HasLast)
-{
- closed = Closed;
- hasFirst = HasFirst;
- hasLast = HasLast;
-}
-
-inline void IntWalk_IWLine::AddIndexPassing(const Standard_Integer Index)
-
-{
- couple.Append(IntSurf_Couple(line->NbPoints() + 1, Index));
-}
-
-inline Standard_Integer IntWalk_IWLine::NbPoints() const
-{
- return line->NbPoints();
-}
-
-inline const IntSurf_PntOn2S& IntWalk_IWLine::Value(const Standard_Integer Index) const
-{
- return line->Value(Index);
-}
-
-inline const Handle(IntSurf_LineOn2S)& IntWalk_IWLine::Line() const
-{
- return line;
-}
-
-inline Standard_Boolean IntWalk_IWLine::IsClosed() const
-{
- return closed;
-}
-
-inline Standard_Boolean IntWalk_IWLine::HasFirstPoint() const
-{
- return hasFirst;
-}
-
-inline Standard_Integer IntWalk_IWLine::FirstPointIndex() const
-{
- if (!hasFirst)
- throw Standard_DomainError();
- return firstIndex;
-}
-
-inline const TheStartPoint& IntWalk_IWLine::FirstPoint() const
-{
- if (!hasFirst)
- throw Standard_DomainError();
- return theFirstPoint;
-}
-
-inline Standard_Boolean IntWalk_IWLine::HasLastPoint() const
-{
- return hasLast;
-}
-
-inline const TheStartPoint& IntWalk_IWLine::LastPoint() const
-{
- if (!hasLast)
- throw Standard_DomainError();
- return theLastPoint;
-}
-
-inline Standard_Integer IntWalk_IWLine::LastPointIndex() const
-{
- if (!hasLast)
- throw Standard_DomainError();
- return lastIndex;
-}
-
-inline Standard_Integer IntWalk_IWLine::NbPassingPoint() const
-{
- return couple.Length();
-}
-
-inline void IntWalk_IWLine::PassingPoint(const Standard_Integer Index,
- Standard_Integer& IndexLine,
- Standard_Integer& IndexPnts) const
-{
- IndexLine = couple(Index).First();
- IndexPnts = couple(Index).Second();
-}
-
-inline void IntWalk_IWLine::SetTangentVector(const gp_Vec& V, const Standard_Integer Index)
-{
- indextg = Index;
- vcttg = V;
-
- //-- std::cout<<"\n IntWalk_IWLine::SetTangentVector : "<<V.X()<<" "<<V.Y()<<" "<<V.Z()<<"
- // Ind:"<<Index<<" NbPts:"<<NbPoints()<<std::endl;
-}
-
-inline void IntWalk_IWLine::SetTangencyAtBegining(const Standard_Boolean IsTangent)
-{
-
- istgtend = IsTangent;
-}
-
-inline void IntWalk_IWLine::SetTangencyAtEnd(const Standard_Boolean IsTangent)
-{
-
- istgtend = IsTangent;
-}
-
-inline const gp_Vec& IntWalk_IWLine::TangentVector(Standard_Integer& Index) const
-{
- //-- if(istgtend == Standard_False && istgtbeg == Standard_False) {
- //-- std::cout<<" IntWalk_IWLine.lxx : Pb "<<std::endl;
- //-- }
- Index = indextg;
- return vcttg;
-}
-
-inline Standard_Boolean IntWalk_IWLine::IsTangentAtBegining() const
-{
-
- return istgtbeg;
-}
-
-inline Standard_Boolean IntWalk_IWLine::IsTangentAtEnd() const
-{
-
- return istgtend;
-}
#include <gp_Vec.hxx>
#include <Standard_Transient.hxx>
#include <IntSurf_Allocator.hxx>
-class IntSurf_LineOn2S;
+#include <IntSurf_LineOn2S.hxx>
class Standard_OutOfRange;
class Standard_DomainError;
class IntSurf_PathPoint;
Standard_Boolean istgtend;
};
-#define TheStartPoint IntSurf_PathPoint
-#define TheStartPoint_hxx <IntSurf_PathPoint.hxx>
-#define IntWalk_IWLine Contap_TheIWLineOfTheIWalking
-#define IntWalk_IWLine_hxx <Contap_TheIWLineOfTheIWalking.hxx>
-#define Handle_IntWalk_IWLine Handle(Contap_TheIWLineOfTheIWalking)
+//=================================================================================================
+// Inline implementations
+//=================================================================================================
-#include <IntWalk_IWLine.lxx>
+inline void Contap_TheIWLineOfTheIWalking::Cut(const Standard_Integer Index)
+{
+ Handle(IntSurf_LineOn2S) lost = line->Split(Index);
+}
+
+inline void Contap_TheIWLineOfTheIWalking::AddPoint(const IntSurf_PntOn2S& P)
+{
+ line->Add(P);
+}
+
+inline void Contap_TheIWLineOfTheIWalking::AddStatusFirst(const Standard_Boolean Closed,
+ const Standard_Boolean HasFirst)
+{
+ closed = Closed;
+ hasFirst = HasFirst;
+}
+
+inline void Contap_TheIWLineOfTheIWalking::AddStatusLast(const Standard_Boolean HasLast)
+{
+ hasLast = HasLast;
+}
+
+inline void Contap_TheIWLineOfTheIWalking::AddStatusFirst(const Standard_Boolean Closed,
+ const Standard_Boolean HasFirst,
+ const Standard_Integer Index,
+ const IntSurf_PathPoint& P)
+{
+ closed = Closed;
+ hasFirst = HasFirst;
+ firstIndex = Index;
+ theFirstPoint = P;
+}
+
+inline void Contap_TheIWLineOfTheIWalking::AddStatusLast(const Standard_Boolean HasLast,
+ const Standard_Integer Index,
+ const IntSurf_PathPoint& P)
+{
+ hasLast = HasLast;
+ lastIndex = Index;
+ theLastPoint = P;
+}
+
+inline void Contap_TheIWLineOfTheIWalking::AddStatusFirstLast(const Standard_Boolean Closed,
+ const Standard_Boolean HasFirst,
+ const Standard_Boolean HasLast)
+{
+ closed = Closed;
+ hasFirst = HasFirst;
+ hasLast = HasLast;
+}
+
+inline void Contap_TheIWLineOfTheIWalking::AddIndexPassing(const Standard_Integer Index)
+{
+ couple.Append(IntSurf_Couple(line->NbPoints() + 1, Index));
+}
+
+inline Standard_Integer Contap_TheIWLineOfTheIWalking::NbPoints() const
+{
+ return line->NbPoints();
+}
+
+inline const IntSurf_PntOn2S& Contap_TheIWLineOfTheIWalking::Value(
+ const Standard_Integer Index) const
+{
+ return line->Value(Index);
+}
+
+inline const Handle(IntSurf_LineOn2S)& Contap_TheIWLineOfTheIWalking::Line() const
+{
+ return line;
+}
+
+inline Standard_Boolean Contap_TheIWLineOfTheIWalking::IsClosed() const
+{
+ return closed;
+}
+
+inline Standard_Boolean Contap_TheIWLineOfTheIWalking::HasFirstPoint() const
+{
+ return hasFirst;
+}
+
+inline Standard_Integer Contap_TheIWLineOfTheIWalking::FirstPointIndex() const
+{
+ if (!hasFirst)
+ throw Standard_DomainError();
+ return firstIndex;
+}
+
+inline const IntSurf_PathPoint& Contap_TheIWLineOfTheIWalking::FirstPoint() const
+{
+ if (!hasFirst)
+ throw Standard_DomainError();
+ return theFirstPoint;
+}
+
+inline Standard_Boolean Contap_TheIWLineOfTheIWalking::HasLastPoint() const
+{
+ return hasLast;
+}
+
+inline const IntSurf_PathPoint& Contap_TheIWLineOfTheIWalking::LastPoint() const
+{
+ if (!hasLast)
+ throw Standard_DomainError();
+ return theLastPoint;
+}
+
+inline Standard_Integer Contap_TheIWLineOfTheIWalking::LastPointIndex() const
+{
+ if (!hasLast)
+ throw Standard_DomainError();
+ return lastIndex;
+}
+
+inline Standard_Integer Contap_TheIWLineOfTheIWalking::NbPassingPoint() const
+{
+ return couple.Length();
+}
+
+inline void Contap_TheIWLineOfTheIWalking::PassingPoint(const Standard_Integer Index,
+ Standard_Integer& IndexLine,
+ Standard_Integer& IndexPnts) const
+{
+ IndexLine = couple(Index).First();
+ IndexPnts = couple(Index).Second();
+}
+
+inline void Contap_TheIWLineOfTheIWalking::SetTangentVector(const gp_Vec& V,
+ const Standard_Integer Index)
+{
+ indextg = Index;
+ vcttg = V;
+}
+
+inline void Contap_TheIWLineOfTheIWalking::SetTangencyAtBegining(const Standard_Boolean IsTangent)
+{
+ istgtend = IsTangent;
+}
+
+inline void Contap_TheIWLineOfTheIWalking::SetTangencyAtEnd(const Standard_Boolean IsTangent)
+{
+ istgtend = IsTangent;
+}
+
+inline const gp_Vec& Contap_TheIWLineOfTheIWalking::TangentVector(Standard_Integer& Index) const
+{
+ Index = indextg;
+ return vcttg;
+}
-#undef TheStartPoint
-#undef TheStartPoint_hxx
-#undef IntWalk_IWLine
-#undef IntWalk_IWLine_hxx
-#undef Handle_IntWalk_IWLine
+inline Standard_Boolean Contap_TheIWLineOfTheIWalking::IsTangentAtBegining() const
+{
+ return istgtbeg;
+}
+
+inline Standard_Boolean Contap_TheIWLineOfTheIWalking::IsTangentAtEnd() const
+{
+ return istgtend;
+}
#endif // _Contap_TheIWLineOfTheIWalking_HeaderFile
#include <IntSurf_PntOn2S.hxx>
#include <gp_Vec.hxx>
-#define TheStartPoint IntSurf_PathPoint
-#define TheStartPoint_hxx <IntSurf_PathPoint.hxx>
-#define IntWalk_IWLine Contap_TheIWLineOfTheIWalking
-#define IntWalk_IWLine_hxx <Contap_TheIWLineOfTheIWalking.hxx>
-#define Handle_IntWalk_IWLine Handle(Contap_TheIWLineOfTheIWalking)
-#include <IntWalk_IWLine.gxx>
+Contap_TheIWLineOfTheIWalking::Contap_TheIWLineOfTheIWalking(const IntSurf_Allocator& theAllocator)
+ : line(new IntSurf_LineOn2S(theAllocator)),
+ closed(Standard_False),
+ hasFirst(Standard_False),
+ hasLast(Standard_False),
+ firstIndex(-1),
+ lastIndex(-1),
+ indextg(-1),
+ istgtbeg(Standard_False),
+ istgtend(Standard_False)
+{
+}
+
+void Contap_TheIWLineOfTheIWalking::Reverse()
+{
+ line->Reverse();
+ Standard_Integer N = line->NbPoints();
+ Standard_Integer NbCouple = couple.Length();
+ for (Standard_Integer i = 1; i <= NbCouple; i++)
+ {
+ couple(i) = IntSurf_Couple(N - couple(i).First() + 1, couple(i).Second());
+ }
+}
Standard_Real param;
};
-#define TheVertex Handle(Adaptor3d_HVertex)
-#define TheVertex_hxx <Adaptor3d_HVertex.hxx>
-#define TheArc Handle(Adaptor2d_Curve2d)
-#define TheArc_hxx <Adaptor2d_Curve2d.hxx>
-#define IntStart_PathPoint Contap_ThePathPointOfTheSearch
-#define IntStart_PathPoint_hxx <Contap_ThePathPointOfTheSearch.hxx>
-
-#include <IntStart_PathPoint.lxx>
-
-#undef TheVertex
-#undef TheVertex_hxx
-#undef TheArc
-#undef TheArc_hxx
-#undef IntStart_PathPoint
-#undef IntStart_PathPoint_hxx
+//=================================================================================================
+// Inline implementations
+//=================================================================================================
+
+inline void Contap_ThePathPointOfTheSearch::SetValue(const gp_Pnt& P,
+ const Standard_Real Tol,
+ const Handle(Adaptor3d_HVertex)& V,
+ const Handle(Adaptor2d_Curve2d)& A,
+ const Standard_Real Parameter)
+{
+ isnew = Standard_False;
+ point = P;
+ tol = Tol;
+ vtx = V;
+ arc = A;
+ param = Parameter;
+}
+
+inline void Contap_ThePathPointOfTheSearch::SetValue(const gp_Pnt& P,
+ const Standard_Real Tol,
+ const Handle(Adaptor2d_Curve2d)& A,
+ const Standard_Real Parameter)
+{
+ isnew = Standard_True;
+ point = P;
+ tol = Tol;
+ arc = A;
+ param = Parameter;
+}
+
+inline const gp_Pnt& Contap_ThePathPointOfTheSearch::Value() const
+{
+ return point;
+}
+
+inline Standard_Real Contap_ThePathPointOfTheSearch::Tolerance() const
+{
+ return tol;
+}
+
+inline Standard_Boolean Contap_ThePathPointOfTheSearch::IsNew() const
+{
+ return isnew;
+}
+
+inline const Handle(Adaptor3d_HVertex)& Contap_ThePathPointOfTheSearch::Vertex() const
+{
+ if (isnew)
+ {
+ throw Standard_DomainError();
+ }
+ return vtx;
+}
+
+inline const Handle(Adaptor2d_Curve2d)& Contap_ThePathPointOfTheSearch::Arc() const
+{
+ return arc;
+}
+
+inline Standard_Real Contap_ThePathPointOfTheSearch::Parameter() const
+{
+ return param;
+}
#endif // _Contap_ThePathPointOfTheSearch_HeaderFile
#include <Standard_DomainError.hxx>
#include <gp_Pnt.hxx>
-#define TheVertex Handle(Adaptor3d_HVertex)
-#define TheVertex_hxx <Adaptor3d_HVertex.hxx>
-#define TheArc Handle(Adaptor2d_Curve2d)
-#define TheArc_hxx <Adaptor2d_Curve2d.hxx>
-#define IntStart_PathPoint Contap_ThePathPointOfTheSearch
-#define IntStart_PathPoint_hxx <Contap_ThePathPointOfTheSearch.hxx>
-#include <IntStart_PathPoint.gxx>
+Contap_ThePathPointOfTheSearch::Contap_ThePathPointOfTheSearch()
+ : tol(0.0),
+ isnew(Standard_True),
+ param(0.0)
+{
+}
+
+Contap_ThePathPointOfTheSearch::Contap_ThePathPointOfTheSearch(const gp_Pnt& P,
+ const Standard_Real Tol,
+ const Handle(Adaptor3d_HVertex)& V,
+ const Handle(Adaptor2d_Curve2d)& A,
+ const Standard_Real Parameter)
+ : point(P),
+ tol(Tol),
+ isnew(Standard_False),
+ vtx(V),
+ arc(A),
+ param(Parameter)
+{
+}
+
+Contap_ThePathPointOfTheSearch::Contap_ThePathPointOfTheSearch(const gp_Pnt& P,
+ const Standard_Real Tol,
+ const Handle(Adaptor2d_Curve2d)& A,
+ const Standard_Real Parameter)
+ : point(P),
+ tol(Tol),
+ isnew(Standard_True),
+ arc(A),
+ param(Parameter)
+{
+}
Contap_ThePathPointOfTheSearch thelp;
};
-#define TheVertex Handle(Adaptor3d_HVertex)
-#define TheVertex_hxx <Adaptor3d_HVertex.hxx>
-#define TheArc Handle(Adaptor2d_Curve2d)
-#define TheArc_hxx <Adaptor2d_Curve2d.hxx>
-#define ThePathPoint Contap_ThePathPointOfTheSearch
-#define ThePathPoint_hxx <Contap_ThePathPointOfTheSearch.hxx>
-#define IntStart_Segment Contap_TheSegmentOfTheSearch
-#define IntStart_Segment_hxx <Contap_TheSegmentOfTheSearch.hxx>
-
-#include <IntStart_Segment.lxx>
-
-#undef TheVertex
-#undef TheVertex_hxx
-#undef TheArc
-#undef TheArc_hxx
-#undef ThePathPoint
-#undef ThePathPoint_hxx
-#undef IntStart_Segment
-#undef IntStart_Segment_hxx
+//=================================================================================================
+// Inline implementations
+//=================================================================================================
+
+inline void Contap_TheSegmentOfTheSearch::SetValue(const Handle(Adaptor2d_Curve2d)& A)
+{
+ hasfp = Standard_False;
+ haslp = Standard_False;
+ arc = A;
+}
+
+inline const Handle(Adaptor2d_Curve2d)& Contap_TheSegmentOfTheSearch::Curve() const
+{
+ return arc;
+}
+
+inline Standard_Boolean Contap_TheSegmentOfTheSearch::HasFirstPoint() const
+{
+ return hasfp;
+}
+
+inline const Contap_ThePathPointOfTheSearch& Contap_TheSegmentOfTheSearch::FirstPoint() const
+{
+ if (!hasfp)
+ {
+ throw Standard_DomainError();
+ }
+ return thefp;
+}
+
+inline Standard_Boolean Contap_TheSegmentOfTheSearch::HasLastPoint() const
+{
+ return haslp;
+}
+
+inline const Contap_ThePathPointOfTheSearch& Contap_TheSegmentOfTheSearch::LastPoint() const
+{
+ if (!haslp)
+ {
+ throw Standard_DomainError();
+ }
+ return thelp;
+}
#endif // _Contap_TheSegmentOfTheSearch_HeaderFile
#include <Adaptor3d_HVertex.hxx>
#include <Contap_ThePathPointOfTheSearch.hxx>
-#define TheVertex Handle(Adaptor3d_HVertex)
-#define TheVertex_hxx <Adaptor3d_HVertex.hxx>
-#define TheArc Handle(Adaptor2d_Curve2d)
-#define TheArc_hxx <Adaptor2d_Curve2d.hxx>
-#define ThePathPoint Contap_ThePathPointOfTheSearch
-#define ThePathPoint_hxx <Contap_ThePathPointOfTheSearch.hxx>
-#define IntStart_Segment Contap_TheSegmentOfTheSearch
-#define IntStart_Segment_hxx <Contap_TheSegmentOfTheSearch.hxx>
-#include <IntStart_Segment.gxx>
+Contap_TheSegmentOfTheSearch::Contap_TheSegmentOfTheSearch()
+ : hasfp(Standard_False),
+ haslp(Standard_False)
+{
+}
+
+void Contap_TheSegmentOfTheSearch::SetLimitPoint(const Contap_ThePathPointOfTheSearch& V,
+ const Standard_Boolean First)
+{
+ if (First)
+ {
+ hasfp = Standard_True;
+ thefp = V;
+ }
+ else
+ {
+ haslp = Standard_True;
+ thelp = V;
+ }
+}
TopAbs_Orientation myBTransition;
};
-#define TheSubShape HLRAlgo_Intersection
-#define TheSubShape_hxx <HLRAlgo_Intersection.hxx>
-#define TheShape HLRAlgo_Coincidence
-#define TheShape_hxx <HLRAlgo_Coincidence.hxx>
-#define TopBas_Interference HLRAlgo_Interference
-#define TopBas_Interference_hxx <HLRAlgo_Interference.hxx>
-
-#include <TopBas_Interference.lxx>
-
-#undef TheSubShape
-#undef TheSubShape_hxx
-#undef TheShape
-#undef TheShape_hxx
-#undef TopBas_Interference
-#undef TopBas_Interference_hxx
+//=================================================================================================
+// Inline implementations
+//=================================================================================================
+
+inline void HLRAlgo_Interference::Intersection(const HLRAlgo_Intersection& I)
+{
+ myIntersection = I;
+}
+
+//=================================================================================================
+
+inline void HLRAlgo_Interference::Boundary(const HLRAlgo_Coincidence& B)
+{
+ myBoundary = B;
+}
+
+//=================================================================================================
+
+inline void HLRAlgo_Interference::Orientation(const TopAbs_Orientation Or)
+{
+ myOrientation = Or;
+}
+
+//=================================================================================================
+
+inline void HLRAlgo_Interference::Transition(const TopAbs_Orientation Or)
+{
+ myTransition = Or;
+}
+
+//=================================================================================================
+
+inline void HLRAlgo_Interference::BoundaryTransition(const TopAbs_Orientation Or)
+{
+ myBTransition = Or;
+}
+
+//=================================================================================================
+
+inline const HLRAlgo_Intersection& HLRAlgo_Interference::Intersection() const
+{
+ return myIntersection;
+}
+
+//=================================================================================================
+
+inline HLRAlgo_Intersection& HLRAlgo_Interference::ChangeIntersection()
+{
+ return myIntersection;
+}
+
+//=================================================================================================
+
+inline const HLRAlgo_Coincidence& HLRAlgo_Interference::Boundary() const
+{
+ return myBoundary;
+}
+
+//=================================================================================================
+
+inline HLRAlgo_Coincidence& HLRAlgo_Interference::ChangeBoundary()
+{
+ return myBoundary;
+}
+
+//=================================================================================================
+
+inline TopAbs_Orientation HLRAlgo_Interference::Orientation() const
+{
+ return myOrientation;
+}
+
+//=================================================================================================
+
+inline TopAbs_Orientation HLRAlgo_Interference::Transition() const
+{
+ return myTransition;
+}
+
+//=================================================================================================
+
+inline TopAbs_Orientation HLRAlgo_Interference::BoundaryTransition() const
+{
+ return myBTransition;
+}
#endif // _HLRAlgo_Interference_HeaderFile
#include <HLRAlgo_Intersection.hxx>
#include <HLRAlgo_Coincidence.hxx>
-#define TheSubShape HLRAlgo_Intersection
-#define TheSubShape_hxx <HLRAlgo_Intersection.hxx>
-#define TheShape HLRAlgo_Coincidence
-#define TheShape_hxx <HLRAlgo_Coincidence.hxx>
-#define TopBas_Interference HLRAlgo_Interference
-#define TopBas_Interference_hxx <HLRAlgo_Interference.hxx>
-#include <TopBas_Interference.gxx>
+//=================================================================================================
+
+HLRAlgo_Interference::HLRAlgo_Interference() {}
+
+//=================================================================================================
+
+HLRAlgo_Interference::HLRAlgo_Interference(const HLRAlgo_Intersection& Inters,
+ const HLRAlgo_Coincidence& Bound,
+ const TopAbs_Orientation Orient,
+ const TopAbs_Orientation Trans,
+ const TopAbs_Orientation BTrans)
+ : myIntersection(Inters),
+ myBoundary(Bound),
+ myOrientation(Orient),
+ myTransition(Trans),
+ myBTransition(BTrans)
+{
+}
#include <IntCurve_IConicTool.hxx>
#include <HLRBRep_CurveTool.hxx>
-#define ImpTool IntCurve_IConicTool
-#define ImpTool_hxx <IntCurve_IConicTool.hxx>
-#define ParCurve Standard_Address
-#define ParCurve_hxx <Standard_Address.hxx>
-#define ParTool HLRBRep_CurveTool
-#define ParTool_hxx <HLRBRep_CurveTool.hxx>
-#define IntImpParGen_ImpParTool HLRBRep_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfCInter
-#define IntImpParGen_ImpParTool_hxx \
- <HLRBRep_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfCInter.hxx>
-#include <IntImpParGen_ImpParTool.gxx>
+#include <gp_Vec2d.hxx>
+
+HLRBRep_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfCInter::
+ HLRBRep_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfCInter(const IntCurve_IConicTool& ITool,
+ const Standard_Address& PC)
+ : TheImpTool(ITool)
+{
+ TheParCurve = (Standard_Address)(&PC);
+}
+
+Standard_Boolean HLRBRep_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfCInter::Value(
+ const Standard_Real Param,
+ Standard_Real& ApproxDistance)
+{
+ ApproxDistance =
+ TheImpTool.Distance(HLRBRep_CurveTool::Value((*((Standard_Address*)(TheParCurve))), Param));
+ return (Standard_True);
+}
+
+Standard_Boolean HLRBRep_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfCInter::Derivative(
+ const Standard_Real Param,
+ Standard_Real& D_ApproxDistance_DV)
+{
+ gp_Pnt2d Pt;
+ gp_Vec2d TanParCurve;
+ gp_Vec2d Grad =
+ TheImpTool.GradDistance(HLRBRep_CurveTool::Value((*((Standard_Address*)(TheParCurve))), Param));
+ HLRBRep_CurveTool::D1((*((Standard_Address*)(TheParCurve))), Param, Pt, TanParCurve);
+ D_ApproxDistance_DV = Grad.Dot(TanParCurve);
+ return (Standard_True);
+}
+
+Standard_Boolean HLRBRep_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfCInter::Values(
+ const Standard_Real Param,
+ Standard_Real& ApproxDistance,
+ Standard_Real& Deriv)
+{
+ this->Value(Param, ApproxDistance);
+ this->Derivative(Param, Deriv);
+ return (Standard_True);
+}
#include <HLRBRep_ThePolygonOfInterCSurf.hxx>
#include <Bnd_Box.hxx>
-#define ThePoint gp_Pnt
-#define ThePoint_hxx <gp_Pnt.hxx>
-#define ThePolygon HLRBRep_ThePolygonOfInterCSurf
-#define ThePolygon_hxx <HLRBRep_ThePolygonOfInterCSurf.hxx>
-#define TheBoundingBox Bnd_Box
-#define TheBoundingBox_hxx <Bnd_Box.hxx>
-#define IntCurveSurface_PolygonTool HLRBRep_ThePolygonToolOfInterCSurf
-#define IntCurveSurface_PolygonTool_hxx <HLRBRep_ThePolygonToolOfInterCSurf.hxx>
-#include <IntCurveSurface_PolygonTool.gxx>
+#include <iostream>
+
+void HLRBRep_ThePolygonToolOfInterCSurf::Dump(const HLRBRep_ThePolygonOfInterCSurf& L)
+{
+ static Standard_Integer num = 0;
+ num++;
+ Standard_Integer nbs = HLRBRep_ThePolygonToolOfInterCSurf::NbSegments(L);
+ std::cout << "\npol2d " << num << " " << nbs << std::endl;
+ std::cout << "Deflection " << HLRBRep_ThePolygonToolOfInterCSurf::DeflectionOverEstimation(L)
+ << std::endl;
+
+ for (Standard_Integer i = 1; i <= nbs; i++)
+ {
+ gp_Pnt P(HLRBRep_ThePolygonToolOfInterCSurf::BeginOfSeg(L, i));
+ std::cout << "pnt " << num << " " << i << " " << P.X() << " " << P.Y() << " " << P.Z()
+ << std::endl;
+ }
+ gp_Pnt PF(HLRBRep_ThePolygonToolOfInterCSurf::EndOfSeg(L, nbs));
+ std::cout << "pnt " << num << " " << nbs << " " << PF.X() << " " << PF.Y() << " " << PF.Z()
+ << std::endl;
+}
#include <Bnd_Box.hxx>
#include <gp_Pnt.hxx>
-#define ThePolyhedron HLRBRep_ThePolyhedronOfInterCSurf
-#define ThePolyhedron_hxx <HLRBRep_ThePolyhedronOfInterCSurf.hxx>
-#define IntCurveSurface_PolyhedronTool HLRBRep_ThePolyhedronToolOfInterCSurf
-#define IntCurveSurface_PolyhedronTool_hxx <HLRBRep_ThePolyhedronToolOfInterCSurf.hxx>
-#include <IntCurveSurface_PolyhedronTool.gxx>
+void HLRBRep_ThePolyhedronToolOfInterCSurf::Dump(const HLRBRep_ThePolyhedronOfInterCSurf& polyh)
+{
+ polyh.Dump();
+}
#include <HLRBRep_TheLocateExtPCOfTheProjPCurOfCInter.hxx>
#include <HLRBRep_PCLocFOfTheLocateExtPCOfTheProjPCurOfCInter.hxx>
#include <gp_Pnt2d.hxx>
+#include <Extrema_POnCurv2d.hxx>
-#define TheCurve Standard_Address
-#define TheCurve_hxx <Standard_Address.hxx>
-#define TheCurveTool HLRBRep_CurveTool
-#define TheCurveTool_hxx <HLRBRep_CurveTool.hxx>
-#define IntCurve_TheCurveLocator HLRBRep_TheCurveLocatorOfTheProjPCurOfCInter
-#define IntCurve_TheCurveLocator_hxx <HLRBRep_TheCurveLocatorOfTheProjPCurOfCInter.hxx>
-#define IntCurve_TheLocateExtPC HLRBRep_TheLocateExtPCOfTheProjPCurOfCInter
-#define IntCurve_TheLocateExtPC_hxx <HLRBRep_TheLocateExtPCOfTheProjPCurOfCInter.hxx>
-#define IntCurve_PCLocFOfTheLocateExtPC HLRBRep_PCLocFOfTheLocateExtPCOfTheProjPCurOfCInter
-#define IntCurve_PCLocFOfTheLocateExtPC_hxx \
- <HLRBRep_PCLocFOfTheLocateExtPCOfTheProjPCurOfCInter.hxx>
-#define IntCurve_PCLocFOfTheLocateExtPC HLRBRep_PCLocFOfTheLocateExtPCOfTheProjPCurOfCInter
-#define IntCurve_PCLocFOfTheLocateExtPC_hxx \
- <HLRBRep_PCLocFOfTheLocateExtPCOfTheProjPCurOfCInter.hxx>
-#define IntCurve_ProjPCurGen HLRBRep_TheProjPCurOfCInter
-#define IntCurve_ProjPCurGen_hxx <HLRBRep_TheProjPCurOfCInter.hxx>
-#include <IntCurve_ProjPCurGen.gxx>
+Standard_Real HLRBRep_TheProjPCurOfCInter::FindParameter(const Standard_Address& C,
+ const gp_Pnt2d& P,
+ const Standard_Real LowParameter,
+ const Standard_Real HighParameter,
+ const Standard_Real)
+{
+ Standard_Real theparam, defaultparam;
+ Standard_Integer NbPts = HLRBRep_CurveTool::NbSamples(C);
+ Standard_Real theEpsX = HLRBRep_CurveTool::EpsX(C);
+ Extrema_POnCurv2d POnC;
+
+ HLRBRep_TheCurveLocatorOfTheProjPCurOfCInter::Locate(P,
+ C,
+ NbPts,
+ LowParameter,
+ HighParameter,
+ POnC);
+ defaultparam = POnC.Parameter();
+ HLRBRep_TheLocateExtPCOfTheProjPCurOfCInter Loc(P, C, defaultparam, theEpsX);
+
+ if (Loc.IsDone() == Standard_False)
+ {
+ //-- cout<<"\n Erreur dans LocateExtPC "<<endl;
+ theparam = defaultparam;
+ }
+ else
+ {
+ if (Loc.IsMin() == Standard_False)
+ {
+ //-- cout<<"\n Erreur dans LocateExtPC (Maximum trouve) "<<endl;
+ theparam = defaultparam;
+ }
+ else
+ {
+ theparam = Loc.Point().Parameter();
+ }
+ }
+ return theparam;
+}
+
+Standard_Real HLRBRep_TheProjPCurOfCInter::FindParameter(const Standard_Address& C,
+ const gp_Pnt2d& P,
+ const Standard_Real Tol)
+{
+
+ Standard_Real theParam;
+ theParam = FindParameter(C,
+ P,
+ HLRBRep_CurveTool::FirstParameter(C),
+ HLRBRep_CurveTool::LastParameter(C),
+ Tol);
+ return theParam;
+}
#include <IntSurf_Quadric.hxx>
#include <gp_Lin.hxx>
#include <HLRBRep_LineTool.hxx>
+#include <gp_Vec.hxx>
-#define TheQuadric IntSurf_Quadric
-#define TheQuadric_hxx <IntSurf_Quadric.hxx>
-#define TheCurve gp_Lin
-#define TheCurve_hxx <gp_Lin.hxx>
-#define TheCurveTool HLRBRep_LineTool
-#define TheCurveTool_hxx <HLRBRep_LineTool.hxx>
-#define IntCurveSurface_QuadricCurveFunc HLRBRep_TheQuadCurvFuncOfTheQuadCurvExactInterCSurf
-#define IntCurveSurface_QuadricCurveFunc_hxx \
- <HLRBRep_TheQuadCurvFuncOfTheQuadCurvExactInterCSurf.hxx>
-#include <IntCurveSurface_QuadricCurveFunc.gxx>
+HLRBRep_TheQuadCurvFuncOfTheQuadCurvExactInterCSurf::
+ HLRBRep_TheQuadCurvFuncOfTheQuadCurvExactInterCSurf(const IntSurf_Quadric& Q, const gp_Lin& C)
+ : myQuadric(Q),
+ myCurve(C)
+{
+}
+
+Standard_Boolean HLRBRep_TheQuadCurvFuncOfTheQuadCurvExactInterCSurf::Value(
+ const Standard_Real Param,
+ Standard_Real& F)
+{
+ F = myQuadric.Distance(HLRBRep_LineTool::Value(myCurve, Param));
+ return (Standard_True);
+}
+
+Standard_Boolean HLRBRep_TheQuadCurvFuncOfTheQuadCurvExactInterCSurf::Derivative(
+ const Standard_Real Param,
+ Standard_Real& D)
+{
+ gp_Pnt P;
+ gp_Vec T;
+ HLRBRep_LineTool::D1(myCurve, Param, P, T);
+ D = T.Dot(myQuadric.Gradient(P));
+ return (Standard_True);
+}
+
+Standard_Boolean HLRBRep_TheQuadCurvFuncOfTheQuadCurvExactInterCSurf::Values(
+ const Standard_Real Param,
+ Standard_Real& F,
+ Standard_Real& D)
+{
+ gp_Pnt P;
+ gp_Vec T, Grad;
+ HLRBRep_LineTool::D1(myCurve, Param, P, T);
+ myQuadric.ValAndGrad(P, F, Grad);
+ D = T.Dot(Grad);
+ return (Standard_True);
+}
set(OCCT_TopBas_FILES_LOCATION "${CMAKE_CURRENT_LIST_DIR}")
set(OCCT_TopBas_FILES
- TopBas_Interference.gxx
- TopBas_Interference.lxx
TopBas_ListIteratorOfListOfTestInterference.hxx
TopBas_ListOfTestInterference.hxx
TopBas_TestInterference.hxx
+++ /dev/null
-// Created on: 1992-08-13
-// Created by: Remi LEQUETTE
-// Copyright (c) 1992-1999 Matra Datavision
-// Copyright (c) 1999-2014 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.
-
-//=================================================================================================
-
-TopBas_Interference::TopBas_Interference() {}
-
-//=================================================================================================
-
-TopBas_Interference::TopBas_Interference(const TheSubShape& Inters,
- const TheShape& Bound,
- const TopAbs_Orientation Orient,
- const TopAbs_Orientation Trans,
- const TopAbs_Orientation BTrans)
- : myIntersection(Inters),
- myBoundary(Bound),
- myOrientation(Orient),
- myTransition(Trans),
- myBTransition(BTrans)
-{
-}
+++ /dev/null
-// Copyright (c) 1995-1999 Matra Datavision
-// Copyright (c) 1999-2014 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.
-
-//=================================================================================================
-
-inline void TopBas_Interference::Intersection(const TheSubShape& I)
-{
- myIntersection = I;
-}
-
-//=================================================================================================
-
-inline void TopBas_Interference::Boundary(const TheShape& B)
-{
- myBoundary = B;
-}
-
-//=================================================================================================
-
-inline void TopBas_Interference::Orientation(const TopAbs_Orientation Or)
-{
- myOrientation = Or;
-}
-
-//=================================================================================================
-
-inline void TopBas_Interference::Transition(const TopAbs_Orientation Or)
-{
- myTransition = Or;
-}
-
-//=================================================================================================
-
-inline void TopBas_Interference::BoundaryTransition(const TopAbs_Orientation Or)
-{
- myBTransition = Or;
-}
-
-//=================================================================================================
-
-inline const TheSubShape& TopBas_Interference::Intersection() const
-{
- return myIntersection;
-}
-
-//=================================================================================================
-
-inline TheSubShape& TopBas_Interference::ChangeIntersection()
-{
- return myIntersection;
-}
-
-//=================================================================================================
-
-inline const TheShape& TopBas_Interference::Boundary() const
-{
- return myBoundary;
-}
-
-//=================================================================================================
-
-inline TheShape& TopBas_Interference::ChangeBoundary()
-{
- return myBoundary;
-}
-
-//=================================================================================================
-
-inline TopAbs_Orientation TopBas_Interference::Orientation() const
-{
- return myOrientation;
-}
-
-//=================================================================================================
-
-inline TopAbs_Orientation TopBas_Interference::Transition() const
-{
- return myTransition;
-}
-
-//=================================================================================================
-
-inline TopAbs_Orientation TopBas_Interference::BoundaryTransition() const
-{
- return myBTransition;
-}
TopAbs_Orientation myBTransition;
};
-#define TheSubShape Standard_Real
-#define TheSubShape_hxx <Standard_Real.hxx>
-#define TheShape Standard_Integer
-#define TheShape_hxx <Standard_Integer.hxx>
-#define TopBas_Interference TopBas_TestInterference
-#define TopBas_Interference_hxx <TopBas_TestInterference.hxx>
-
-#include <TopBas_Interference.lxx>
-
-#undef TheSubShape
-#undef TheSubShape_hxx
-#undef TheShape
-#undef TheShape_hxx
-#undef TopBas_Interference
-#undef TopBas_Interference_hxx
+//=================================================================================================
+// Inline implementations
+//=================================================================================================
+
+inline void TopBas_TestInterference::Intersection(const Standard_Real& I)
+{
+ myIntersection = I;
+}
+
+//=================================================================================================
+
+inline void TopBas_TestInterference::Boundary(const Standard_Integer& B)
+{
+ myBoundary = B;
+}
+
+//=================================================================================================
+
+inline void TopBas_TestInterference::Orientation(const TopAbs_Orientation Or)
+{
+ myOrientation = Or;
+}
+
+//=================================================================================================
+
+inline void TopBas_TestInterference::Transition(const TopAbs_Orientation Or)
+{
+ myTransition = Or;
+}
+
+//=================================================================================================
+
+inline void TopBas_TestInterference::BoundaryTransition(const TopAbs_Orientation Or)
+{
+ myBTransition = Or;
+}
+
+//=================================================================================================
+
+inline const Standard_Real& TopBas_TestInterference::Intersection() const
+{
+ return myIntersection;
+}
+
+//=================================================================================================
+
+inline Standard_Real& TopBas_TestInterference::ChangeIntersection()
+{
+ return myIntersection;
+}
+
+//=================================================================================================
+
+inline const Standard_Integer& TopBas_TestInterference::Boundary() const
+{
+ return myBoundary;
+}
+
+//=================================================================================================
+
+inline Standard_Integer& TopBas_TestInterference::ChangeBoundary()
+{
+ return myBoundary;
+}
+
+//=================================================================================================
+
+inline TopAbs_Orientation TopBas_TestInterference::Orientation() const
+{
+ return myOrientation;
+}
+
+//=================================================================================================
+
+inline TopAbs_Orientation TopBas_TestInterference::Transition() const
+{
+ return myTransition;
+}
+
+//=================================================================================================
+
+inline TopAbs_Orientation TopBas_TestInterference::BoundaryTransition() const
+{
+ return myBTransition;
+}
#endif // _TopBas_TestInterference_HeaderFile
#include <TopBas_TestInterference.hxx>
-#define TheSubShape Standard_Real
-#define TheSubShape_hxx <Standard_Real.hxx>
-#define TheShape Standard_Integer
-#define TheShape_hxx <Standard_Integer.hxx>
-#define TopBas_Interference TopBas_TestInterference
-#define TopBas_Interference_hxx <TopBas_TestInterference.hxx>
-#include <TopBas_Interference.gxx>
+//=================================================================================================
+
+TopBas_TestInterference::TopBas_TestInterference() {}
+
+//=================================================================================================
+
+TopBas_TestInterference::TopBas_TestInterference(const Standard_Real& Inters,
+ const Standard_Integer& Bound,
+ const TopAbs_Orientation Orient,
+ const TopAbs_Orientation Trans,
+ const TopAbs_Orientation BTrans)
+ : myIntersection(Inters),
+ myBoundary(Bound),
+ myOrientation(Orient),
+ myTransition(Trans),
+ myBTransition(BTrans)
+{
+}
#include <BRepApprox_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfApprox.hxx>
#include <math_MultipleVarFunctionWithGradient.hxx>
-#define MultiLine BRepApprox_TheMultiLineOfApprox
-#define MultiLine_hxx <BRepApprox_TheMultiLineOfApprox.hxx>
-#define ToolLine BRepApprox_TheMultiLineToolOfApprox
-#define ToolLine_hxx <BRepApprox_TheMultiLineToolOfApprox.hxx>
-#define AppParCurves_BSpParLeastSquare \
- BRepApprox_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfApprox
-#define AppParCurves_BSpParLeastSquare_hxx \
- <BRepApprox_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfApprox.hxx>
-#define AppParCurves_BSpParFunction \
- BRepApprox_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfApprox
-#define AppParCurves_BSpParFunction_hxx \
- <BRepApprox_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfApprox.hxx>
-#define AppParCurves_BSpGradient_BFGS \
- BRepApprox_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfApprox
-#define AppParCurves_BSpGradient_BFGS_hxx \
- <BRepApprox_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfApprox.hxx>
-#define AppParCurves_BSpGradient BRepApprox_MyBSplGradientOfTheComputeLineOfApprox
-#define AppParCurves_BSpGradient_hxx <BRepApprox_MyBSplGradientOfTheComputeLineOfApprox.hxx>
-#include <AppParCurves_BSpGradient_BFGS.gxx>
+BRepApprox_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfApprox::
+ BRepApprox_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfApprox(
+ math_MultipleVarFunctionWithGradient& F,
+ const math_Vector& StartingPoint,
+ const Standard_Real Tolerance3d,
+ const Standard_Real Tolerance2d,
+ const Standard_Real Eps,
+ const Standard_Integer NbIterations)
+ : math_BFGS(F.NbVariables(), Eps, NbIterations, Eps),
+ myTol3d(Tolerance3d),
+ myTol2d(Tolerance2d)
+{
+ Perform(F, StartingPoint);
+}
+
+Standard_Boolean BRepApprox_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfApprox::
+ IsSolutionReached(math_MultipleVarFunctionWithGradient& F) const
+{
+ Standard_Boolean Result, Result2;
+ BRepApprox_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfApprox* F1 =
+ (BRepApprox_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfApprox*)&F;
+
+ Result = (2.0 * fabs(TheMinimum - PreviousMinimum)
+ <= 1.e-10 * (fabs(TheMinimum) + fabs(PreviousMinimum)) + 1.e-12);
+ Standard_Real MErr3d = F1->MaxError3d();
+ Standard_Real MErr2d = F1->MaxError2d();
+ Result2 = ((MErr3d <= myTol3d) && (MErr2d <= myTol2d));
+
+ return (Result || Result2);
+}
#include <BRepApprox_ParFunctionOfMyGradientOfTheComputeLineBezierOfApprox.hxx>
#include <math_MultipleVarFunctionWithGradient.hxx>
-#define MultiLine BRepApprox_TheMultiLineOfApprox
-#define MultiLine_hxx <BRepApprox_TheMultiLineOfApprox.hxx>
-#define ToolLine BRepApprox_TheMultiLineToolOfApprox
-#define ToolLine_hxx <BRepApprox_TheMultiLineToolOfApprox.hxx>
-#define AppParCurves_ParLeastSquare \
- BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox
-#define AppParCurves_ParLeastSquare_hxx \
- <BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox.hxx>
-#define AppParCurves_ResConstraint \
- BRepApprox_ResConstraintOfMyGradientOfTheComputeLineBezierOfApprox
-#define AppParCurves_ResConstraint_hxx \
- <BRepApprox_ResConstraintOfMyGradientOfTheComputeLineBezierOfApprox.hxx>
-#define AppParCurves_ParFunction BRepApprox_ParFunctionOfMyGradientOfTheComputeLineBezierOfApprox
-#define AppParCurves_ParFunction_hxx \
- <BRepApprox_ParFunctionOfMyGradientOfTheComputeLineBezierOfApprox.hxx>
-#define AppParCurves_Gradient_BFGS \
- BRepApprox_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfApprox
-#define AppParCurves_Gradient_BFGS_hxx \
- <BRepApprox_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfApprox.hxx>
-#define AppParCurves_Gradient BRepApprox_MyGradientOfTheComputeLineBezierOfApprox
-#define AppParCurves_Gradient_hxx <BRepApprox_MyGradientOfTheComputeLineBezierOfApprox.hxx>
-#include <AppParCurves_Gradient_BFGS.gxx>
+BRepApprox_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfApprox::
+ BRepApprox_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfApprox(
+ math_MultipleVarFunctionWithGradient& F,
+ const math_Vector& StartingPoint,
+ const Standard_Real Tolerance3d,
+ const Standard_Real Tolerance2d,
+ const Standard_Real Eps,
+ const Standard_Integer NbIterations)
+ : math_BFGS(F.NbVariables(), Eps, NbIterations, Eps),
+ myTol3d(Tolerance3d),
+ myTol2d(Tolerance2d)
+{
+ Perform(F, StartingPoint);
+}
+
+Standard_Boolean BRepApprox_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfApprox::
+ IsSolutionReached(math_MultipleVarFunctionWithGradient& F) const
+{
+ BRepApprox_ParFunctionOfMyGradientOfTheComputeLineBezierOfApprox* F1 =
+ (BRepApprox_ParFunctionOfMyGradientOfTheComputeLineBezierOfApprox*)&F;
+ Standard_Boolean Result, Result2;
+
+ Result = (2.0 * fabs(TheMinimum - PreviousMinimum)
+ <= 1.e-10 * (fabs(TheMinimum) + fabs(PreviousMinimum)) + 1.e-12);
+ Standard_Real MErr3d = F1->MaxError3d();
+ Standard_Real MErr2d = F1->MaxError2d();
+
+ Result2 = ((MErr3d <= myTol3d) && (MErr2d <= myTol2d));
+ return (Result || Result2);
+}
#include <BRepApprox_ParFunctionOfMyGradientbisOfTheComputeLineOfApprox.hxx>
#include <math_MultipleVarFunctionWithGradient.hxx>
-#define MultiLine BRepApprox_TheMultiLineOfApprox
-#define MultiLine_hxx <BRepApprox_TheMultiLineOfApprox.hxx>
-#define ToolLine BRepApprox_TheMultiLineToolOfApprox
-#define ToolLine_hxx <BRepApprox_TheMultiLineToolOfApprox.hxx>
-#define AppParCurves_ParLeastSquare BRepApprox_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox
-#define AppParCurves_ParLeastSquare_hxx \
- <BRepApprox_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox.hxx>
-#define AppParCurves_ResConstraint BRepApprox_ResConstraintOfMyGradientbisOfTheComputeLineOfApprox
-#define AppParCurves_ResConstraint_hxx \
- <BRepApprox_ResConstraintOfMyGradientbisOfTheComputeLineOfApprox.hxx>
-#define AppParCurves_ParFunction BRepApprox_ParFunctionOfMyGradientbisOfTheComputeLineOfApprox
-#define AppParCurves_ParFunction_hxx \
- <BRepApprox_ParFunctionOfMyGradientbisOfTheComputeLineOfApprox.hxx>
-#define AppParCurves_Gradient_BFGS BRepApprox_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfApprox
-#define AppParCurves_Gradient_BFGS_hxx \
- <BRepApprox_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfApprox.hxx>
-#define AppParCurves_Gradient BRepApprox_MyGradientbisOfTheComputeLineOfApprox
-#define AppParCurves_Gradient_hxx <BRepApprox_MyGradientbisOfTheComputeLineOfApprox.hxx>
-#include <AppParCurves_Gradient_BFGS.gxx>
+BRepApprox_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfApprox::
+ BRepApprox_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfApprox(
+ math_MultipleVarFunctionWithGradient& F,
+ const math_Vector& StartingPoint,
+ const Standard_Real Tolerance3d,
+ const Standard_Real Tolerance2d,
+ const Standard_Real Eps,
+ const Standard_Integer NbIterations)
+ : math_BFGS(F.NbVariables(), Eps, NbIterations, Eps),
+ myTol3d(Tolerance3d),
+ myTol2d(Tolerance2d)
+{
+ Perform(F, StartingPoint);
+}
+
+Standard_Boolean BRepApprox_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfApprox::IsSolutionReached(
+ math_MultipleVarFunctionWithGradient& F) const
+{
+ BRepApprox_ParFunctionOfMyGradientbisOfTheComputeLineOfApprox* F1 =
+ (BRepApprox_ParFunctionOfMyGradientbisOfTheComputeLineOfApprox*)&F;
+ Standard_Boolean Result, Result2;
+
+ Result = (2.0 * fabs(TheMinimum - PreviousMinimum)
+ <= 1.e-10 * (fabs(TheMinimum) + fabs(PreviousMinimum)) + 1.e-12);
+ Standard_Real MErr3d = F1->MaxError3d();
+ Standard_Real MErr2d = F1->MaxError2d();
+
+ Result2 = ((MErr3d <= myTol3d) && (MErr2d <= myTol2d));
+ return (Result || Result2);
+}
MAT_Side.hxx
MAT_TList.gxx
MAT_TList.lxx
- MAT_TListNode.gxx
- MAT_TListNode.lxx
MAT_TListNodeOfListOfBisector.hxx
MAT_TListNodeOfListOfBisector_0.cxx
MAT_TListNodeOfListOfEdge.hxx
+++ /dev/null
-// Created on: 1992-06-24
-// Created by: Gilles DEBARBOUILLE
-// Copyright (c) 1992-1999 Matra Datavision
-// Copyright (c) 1999-2014 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.
-
-//=================================================================================================
-
-void MAT_TListNode::Dummy() const {}
+++ /dev/null
-// Created on: 1992-06-24
-// Created by: Gilles DEBARBOUILLE
-// Copyright (c) 1992-1999 Matra Datavision
-// Copyright (c) 1999-2014 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.
-
-//=================================================================================================
-
-inline MAT_TListNode::MAT_TListNode() {}
-
-//=================================================================================================
-
-inline MAT_TListNode::MAT_TListNode(const Item& anitem)
-{
- theitem = anitem;
-}
-
-//=================================================================================================
-
-inline Item MAT_TListNode::GetItem() const
-{
- return theitem;
-}
-
-//=================================================================================================
-
-inline Handle(MAT_TListNode) MAT_TListNode::Next() const
-{
- return thenext;
-}
-
-//=================================================================================================
-
-inline Handle(MAT_TListNode) MAT_TListNode::Previous() const
-{
- return theprevious;
-}
-
-//=================================================================================================
-
-inline void MAT_TListNode::SetItem(const Item& anitem)
-{
- theitem = anitem;
-}
-
-//=================================================================================================
-
-inline void MAT_TListNode::Next(const Handle(MAT_TListNode)& atlistnode)
-{
- thenext = atlistnode;
-}
-
-//=================================================================================================
-
-inline void MAT_TListNode::Previous(const Handle(MAT_TListNode)& atlistnode)
-{
- theprevious = atlistnode;
-}
Handle(MAT_Bisector) theitem;
};
-#define Item Handle(MAT_Bisector)
-#define Item_hxx <MAT_Bisector.hxx>
-#define MAT_TListNode MAT_TListNodeOfListOfBisector
-#define MAT_TListNode_hxx <MAT_TListNodeOfListOfBisector.hxx>
-#define Handle_MAT_TListNode Handle(MAT_TListNodeOfListOfBisector)
-#define MAT_TList MAT_ListOfBisector
-#define MAT_TList_hxx <MAT_ListOfBisector.hxx>
-#define Handle_MAT_TList Handle(MAT_ListOfBisector)
-
-#include <MAT_TListNode.lxx>
-
-#undef Item
-#undef Item_hxx
-#undef MAT_TListNode
-#undef MAT_TListNode_hxx
-#undef Handle_MAT_TListNode
-#undef MAT_TList
-#undef MAT_TList_hxx
-#undef Handle_MAT_TList
+//=================================================================================================
+// Inline implementations
+//=================================================================================================
+
+inline MAT_TListNodeOfListOfBisector::MAT_TListNodeOfListOfBisector() {}
+
+//=================================================================================================
+
+inline MAT_TListNodeOfListOfBisector::MAT_TListNodeOfListOfBisector(
+ const Handle(MAT_Bisector)& anitem)
+{
+ theitem = anitem;
+}
+
+//=================================================================================================
+
+inline Handle(MAT_Bisector) MAT_TListNodeOfListOfBisector::GetItem() const
+{
+ return theitem;
+}
+
+//=================================================================================================
+
+inline Handle(MAT_TListNodeOfListOfBisector) MAT_TListNodeOfListOfBisector::Next() const
+{
+ return thenext;
+}
+
+//=================================================================================================
+
+inline Handle(MAT_TListNodeOfListOfBisector) MAT_TListNodeOfListOfBisector::Previous() const
+{
+ return theprevious;
+}
+
+//=================================================================================================
+
+inline void MAT_TListNodeOfListOfBisector::SetItem(const Handle(MAT_Bisector)& anitem)
+{
+ theitem = anitem;
+}
+
+//=================================================================================================
+
+inline void MAT_TListNodeOfListOfBisector::Next(
+ const Handle(MAT_TListNodeOfListOfBisector)& atlistnode)
+{
+ thenext = atlistnode;
+}
+
+//=================================================================================================
+
+inline void MAT_TListNodeOfListOfBisector::Previous(
+ const Handle(MAT_TListNodeOfListOfBisector)& atlistnode)
+{
+ theprevious = atlistnode;
+}
#endif // _MAT_TListNodeOfListOfBisector_HeaderFile
#include <MAT_Bisector.hxx>
#include <MAT_ListOfBisector.hxx>
-#define Item Handle(MAT_Bisector)
-#define Item_hxx <MAT_Bisector.hxx>
-#define MAT_TListNode MAT_TListNodeOfListOfBisector
-#define MAT_TListNode_hxx <MAT_TListNodeOfListOfBisector.hxx>
-#define Handle_MAT_TListNode Handle(MAT_TListNodeOfListOfBisector)
-#define MAT_TList MAT_ListOfBisector
-#define MAT_TList_hxx <MAT_ListOfBisector.hxx>
-#define Handle_MAT_TList Handle(MAT_ListOfBisector)
-#include <MAT_TListNode.gxx>
+//=================================================================================================
+
+void MAT_TListNodeOfListOfBisector::Dummy() const {}
Handle(MAT_Edge) theitem;
};
-#define Item Handle(MAT_Edge)
-#define Item_hxx <MAT_Edge.hxx>
-#define MAT_TListNode MAT_TListNodeOfListOfEdge
-#define MAT_TListNode_hxx <MAT_TListNodeOfListOfEdge.hxx>
-#define Handle_MAT_TListNode Handle(MAT_TListNodeOfListOfEdge)
-#define MAT_TList MAT_ListOfEdge
-#define MAT_TList_hxx <MAT_ListOfEdge.hxx>
-#define Handle_MAT_TList Handle(MAT_ListOfEdge)
-
-#include <MAT_TListNode.lxx>
-
-#undef Item
-#undef Item_hxx
-#undef MAT_TListNode
-#undef MAT_TListNode_hxx
-#undef Handle_MAT_TListNode
-#undef MAT_TList
-#undef MAT_TList_hxx
-#undef Handle_MAT_TList
+//=================================================================================================
+// Inline implementations
+//=================================================================================================
+
+inline MAT_TListNodeOfListOfEdge::MAT_TListNodeOfListOfEdge() {}
+
+//=================================================================================================
+
+inline MAT_TListNodeOfListOfEdge::MAT_TListNodeOfListOfEdge(const Handle(MAT_Edge)& anitem)
+{
+ theitem = anitem;
+}
+
+//=================================================================================================
+
+inline Handle(MAT_Edge) MAT_TListNodeOfListOfEdge::GetItem() const
+{
+ return theitem;
+}
+
+//=================================================================================================
+
+inline Handle(MAT_TListNodeOfListOfEdge) MAT_TListNodeOfListOfEdge::Next() const
+{
+ return thenext;
+}
+
+//=================================================================================================
+
+inline Handle(MAT_TListNodeOfListOfEdge) MAT_TListNodeOfListOfEdge::Previous() const
+{
+ return theprevious;
+}
+
+//=================================================================================================
+
+inline void MAT_TListNodeOfListOfEdge::SetItem(const Handle(MAT_Edge)& anitem)
+{
+ theitem = anitem;
+}
+
+//=================================================================================================
+
+inline void MAT_TListNodeOfListOfEdge::Next(const Handle(MAT_TListNodeOfListOfEdge)& atlistnode)
+{
+ thenext = atlistnode;
+}
+
+//=================================================================================================
+
+inline void MAT_TListNodeOfListOfEdge::Previous(const Handle(MAT_TListNodeOfListOfEdge)& atlistnode)
+{
+ theprevious = atlistnode;
+}
#endif // _MAT_TListNodeOfListOfEdge_HeaderFile
#include <MAT_Edge.hxx>
#include <MAT_ListOfEdge.hxx>
-#define Item Handle(MAT_Edge)
-#define Item_hxx <MAT_Edge.hxx>
-#define MAT_TListNode MAT_TListNodeOfListOfEdge
-#define MAT_TListNode_hxx <MAT_TListNodeOfListOfEdge.hxx>
-#define Handle_MAT_TListNode Handle(MAT_TListNodeOfListOfEdge)
-#define MAT_TList MAT_ListOfEdge
-#define MAT_TList_hxx <MAT_ListOfEdge.hxx>
-#define Handle_MAT_TList Handle(MAT_ListOfEdge)
-#include <MAT_TListNode.gxx>
+//=================================================================================================
+
+void MAT_TListNodeOfListOfEdge::Dummy() const {}
#include <AppDef_BSpParFunctionOfMyBSplGradientOfBSplineCompute.hxx>
#include <math_MultipleVarFunctionWithGradient.hxx>
-#define MultiLine AppDef_MultiLine
-#define MultiLine_hxx <AppDef_MultiLine.hxx>
-#define ToolLine AppDef_MyLineTool
-#define ToolLine_hxx <AppDef_MyLineTool.hxx>
-#define AppParCurves_BSpParLeastSquare AppDef_BSpParLeastSquareOfMyBSplGradientOfBSplineCompute
-#define AppParCurves_BSpParLeastSquare_hxx \
- <AppDef_BSpParLeastSquareOfMyBSplGradientOfBSplineCompute.hxx>
-#define AppParCurves_BSpParFunction AppDef_BSpParFunctionOfMyBSplGradientOfBSplineCompute
-#define AppParCurves_BSpParFunction_hxx <AppDef_BSpParFunctionOfMyBSplGradientOfBSplineCompute.hxx>
-#define AppParCurves_BSpGradient_BFGS AppDef_BSpGradient_BFGSOfMyBSplGradientOfBSplineCompute
-#define AppParCurves_BSpGradient_BFGS_hxx \
- <AppDef_BSpGradient_BFGSOfMyBSplGradientOfBSplineCompute.hxx>
-#define AppParCurves_BSpGradient AppDef_MyBSplGradientOfBSplineCompute
-#define AppParCurves_BSpGradient_hxx <AppDef_MyBSplGradientOfBSplineCompute.hxx>
-#include "../AppParCurves/AppParCurves_BSpGradient_BFGS.gxx"
+AppDef_BSpGradient_BFGSOfMyBSplGradientOfBSplineCompute::
+ AppDef_BSpGradient_BFGSOfMyBSplGradientOfBSplineCompute(math_MultipleVarFunctionWithGradient& F,
+ const math_Vector& StartingPoint,
+ const Standard_Real Tolerance3d,
+ const Standard_Real Tolerance2d,
+ const Standard_Real Eps,
+ const Standard_Integer NbIterations)
+ : math_BFGS(F.NbVariables(), Eps, NbIterations, Eps),
+ myTol3d(Tolerance3d),
+ myTol2d(Tolerance2d)
+{
+ Perform(F, StartingPoint);
+}
+
+Standard_Boolean AppDef_BSpGradient_BFGSOfMyBSplGradientOfBSplineCompute::IsSolutionReached(
+ math_MultipleVarFunctionWithGradient& F) const
+{
+ Standard_Boolean Result, Result2;
+ AppDef_BSpParFunctionOfMyBSplGradientOfBSplineCompute* F1 =
+ (AppDef_BSpParFunctionOfMyBSplGradientOfBSplineCompute*)&F;
+
+ Result = (2.0 * fabs(TheMinimum - PreviousMinimum)
+ <= 1.e-10 * (fabs(TheMinimum) + fabs(PreviousMinimum)) + 1.e-12);
+ Standard_Real MErr3d = F1->MaxError3d();
+ Standard_Real MErr2d = F1->MaxError2d();
+ Result2 = ((MErr3d <= myTol3d) && (MErr2d <= myTol2d));
+
+ return (Result || Result2);
+}
#include <AppDef_ParFunctionOfMyGradientOfCompute.hxx>
#include <math_MultipleVarFunctionWithGradient.hxx>
-#define MultiLine AppDef_MultiLine
-#define MultiLine_hxx <AppDef_MultiLine.hxx>
-#define ToolLine AppDef_MyLineTool
-#define ToolLine_hxx <AppDef_MyLineTool.hxx>
-#define AppParCurves_ParLeastSquare AppDef_ParLeastSquareOfMyGradientOfCompute
-#define AppParCurves_ParLeastSquare_hxx <AppDef_ParLeastSquareOfMyGradientOfCompute.hxx>
-#define AppParCurves_ResConstraint AppDef_ResConstraintOfMyGradientOfCompute
-#define AppParCurves_ResConstraint_hxx <AppDef_ResConstraintOfMyGradientOfCompute.hxx>
-#define AppParCurves_ParFunction AppDef_ParFunctionOfMyGradientOfCompute
-#define AppParCurves_ParFunction_hxx <AppDef_ParFunctionOfMyGradientOfCompute.hxx>
-#define AppParCurves_Gradient_BFGS AppDef_Gradient_BFGSOfMyGradientOfCompute
-#define AppParCurves_Gradient_BFGS_hxx <AppDef_Gradient_BFGSOfMyGradientOfCompute.hxx>
-#define AppParCurves_Gradient AppDef_MyGradientOfCompute
-#define AppParCurves_Gradient_hxx <AppDef_MyGradientOfCompute.hxx>
-#include <AppParCurves_Gradient_BFGS.gxx>
+AppDef_Gradient_BFGSOfMyGradientOfCompute::AppDef_Gradient_BFGSOfMyGradientOfCompute(
+ math_MultipleVarFunctionWithGradient& F,
+ const math_Vector& StartingPoint,
+ const Standard_Real Tolerance3d,
+ const Standard_Real Tolerance2d,
+ const Standard_Real Eps,
+ const Standard_Integer NbIterations)
+ : math_BFGS(F.NbVariables(), Eps, NbIterations, Eps),
+ myTol3d(Tolerance3d),
+ myTol2d(Tolerance2d)
+{
+ Perform(F, StartingPoint);
+}
+
+Standard_Boolean AppDef_Gradient_BFGSOfMyGradientOfCompute::IsSolutionReached(
+ math_MultipleVarFunctionWithGradient& F) const
+{
+ AppDef_ParFunctionOfMyGradientOfCompute* F1 = (AppDef_ParFunctionOfMyGradientOfCompute*)&F;
+ Standard_Boolean Result, Result2;
+
+ Result = (2.0 * fabs(TheMinimum - PreviousMinimum)
+ <= 1.e-10 * (fabs(TheMinimum) + fabs(PreviousMinimum)) + 1.e-12);
+ Standard_Real MErr3d = F1->MaxError3d();
+ Standard_Real MErr2d = F1->MaxError2d();
+
+ Result2 = ((MErr3d <= myTol3d) && (MErr2d <= myTol2d));
+ return (Result || Result2);
+}
#include <AppDef_ParFunctionOfMyGradientbisOfBSplineCompute.hxx>
#include <math_MultipleVarFunctionWithGradient.hxx>
-#define MultiLine AppDef_MultiLine
-#define MultiLine_hxx <AppDef_MultiLine.hxx>
-#define ToolLine AppDef_MyLineTool
-#define ToolLine_hxx <AppDef_MyLineTool.hxx>
-#define AppParCurves_ParLeastSquare AppDef_ParLeastSquareOfMyGradientbisOfBSplineCompute
-#define AppParCurves_ParLeastSquare_hxx <AppDef_ParLeastSquareOfMyGradientbisOfBSplineCompute.hxx>
-#define AppParCurves_ResConstraint AppDef_ResConstraintOfMyGradientbisOfBSplineCompute
-#define AppParCurves_ResConstraint_hxx <AppDef_ResConstraintOfMyGradientbisOfBSplineCompute.hxx>
-#define AppParCurves_ParFunction AppDef_ParFunctionOfMyGradientbisOfBSplineCompute
-#define AppParCurves_ParFunction_hxx <AppDef_ParFunctionOfMyGradientbisOfBSplineCompute.hxx>
-#define AppParCurves_Gradient_BFGS AppDef_Gradient_BFGSOfMyGradientbisOfBSplineCompute
-#define AppParCurves_Gradient_BFGS_hxx <AppDef_Gradient_BFGSOfMyGradientbisOfBSplineCompute.hxx>
-#define AppParCurves_Gradient AppDef_MyGradientbisOfBSplineCompute
-#define AppParCurves_Gradient_hxx <AppDef_MyGradientbisOfBSplineCompute.hxx>
-#include <AppParCurves_Gradient_BFGS.gxx>
+AppDef_Gradient_BFGSOfMyGradientbisOfBSplineCompute::
+ AppDef_Gradient_BFGSOfMyGradientbisOfBSplineCompute(math_MultipleVarFunctionWithGradient& F,
+ const math_Vector& StartingPoint,
+ const Standard_Real Tolerance3d,
+ const Standard_Real Tolerance2d,
+ const Standard_Real Eps,
+ const Standard_Integer NbIterations)
+ : math_BFGS(F.NbVariables(), Eps, NbIterations, Eps),
+ myTol3d(Tolerance3d),
+ myTol2d(Tolerance2d)
+{
+ Perform(F, StartingPoint);
+}
+
+Standard_Boolean AppDef_Gradient_BFGSOfMyGradientbisOfBSplineCompute::IsSolutionReached(
+ math_MultipleVarFunctionWithGradient& F) const
+{
+ AppDef_ParFunctionOfMyGradientbisOfBSplineCompute* F1 =
+ (AppDef_ParFunctionOfMyGradientbisOfBSplineCompute*)&F;
+ Standard_Boolean Result, Result2;
+
+ Result = (2.0 * fabs(TheMinimum - PreviousMinimum)
+ <= 1.e-10 * (fabs(TheMinimum) + fabs(PreviousMinimum)) + 1.e-12);
+ Standard_Real MErr3d = F1->MaxError3d();
+ Standard_Real MErr2d = F1->MaxError2d();
+
+ Result2 = ((MErr3d <= myTol3d) && (MErr2d <= myTol2d));
+ return (Result || Result2);
+}
#include <AppDef_ParFunctionOfTheGradient.hxx>
#include <math_MultipleVarFunctionWithGradient.hxx>
-#define MultiLine AppDef_MultiLine
-#define MultiLine_hxx <AppDef_MultiLine.hxx>
-#define ToolLine AppDef_MyLineTool
-#define ToolLine_hxx <AppDef_MyLineTool.hxx>
-#define AppParCurves_ParLeastSquare AppDef_ParLeastSquareOfTheGradient
-#define AppParCurves_ParLeastSquare_hxx <AppDef_ParLeastSquareOfTheGradient.hxx>
-#define AppParCurves_ResConstraint AppDef_ResConstraintOfTheGradient
-#define AppParCurves_ResConstraint_hxx <AppDef_ResConstraintOfTheGradient.hxx>
-#define AppParCurves_ParFunction AppDef_ParFunctionOfTheGradient
-#define AppParCurves_ParFunction_hxx <AppDef_ParFunctionOfTheGradient.hxx>
-#define AppParCurves_Gradient_BFGS AppDef_Gradient_BFGSOfTheGradient
-#define AppParCurves_Gradient_BFGS_hxx <AppDef_Gradient_BFGSOfTheGradient.hxx>
-#define AppParCurves_Gradient AppDef_TheGradient
-#define AppParCurves_Gradient_hxx <AppDef_TheGradient.hxx>
-#include <AppParCurves_Gradient_BFGS.gxx>
+AppDef_Gradient_BFGSOfTheGradient::AppDef_Gradient_BFGSOfTheGradient(
+ math_MultipleVarFunctionWithGradient& F,
+ const math_Vector& StartingPoint,
+ const Standard_Real Tolerance3d,
+ const Standard_Real Tolerance2d,
+ const Standard_Real Eps,
+ const Standard_Integer NbIterations)
+ : math_BFGS(F.NbVariables(), Eps, NbIterations, Eps),
+ myTol3d(Tolerance3d),
+ myTol2d(Tolerance2d)
+{
+ Perform(F, StartingPoint);
+}
+
+Standard_Boolean AppDef_Gradient_BFGSOfTheGradient::IsSolutionReached(
+ math_MultipleVarFunctionWithGradient& F) const
+{
+ AppDef_ParFunctionOfTheGradient* F1 = (AppDef_ParFunctionOfTheGradient*)&F;
+ Standard_Boolean Result, Result2;
+
+ Result = (2.0 * fabs(TheMinimum - PreviousMinimum)
+ <= 1.e-10 * (fabs(TheMinimum) + fabs(PreviousMinimum)) + 1.e-12);
+ Standard_Real MErr3d = F1->MaxError3d();
+ Standard_Real MErr2d = F1->MaxError2d();
+
+ Result2 = ((MErr3d <= myTol3d) && (MErr2d <= myTol2d));
+ return (Result || Result2);
+}
+++ /dev/null
-// Created on: 1999-12-16
-// Created by: Atelier CAS2000
-// Copyright (c) 1999-1999 Matra Datavision
-// Copyright (c) 1999-2014 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.
-
-// Redefinition de math_BFGS:
-// ==========================
-
-AppParCurves_BSpGradient_BFGS::AppParCurves_BSpGradient_BFGS(
- math_MultipleVarFunctionWithGradient& F,
- const math_Vector& StartingPoint,
- const Standard_Real Tolerance3d,
- const Standard_Real Tolerance2d,
- const Standard_Real Eps,
- const Standard_Integer NbIterations)
- : math_BFGS(F.NbVariables(), Eps, NbIterations, Eps),
- myTol3d(Tolerance3d),
- myTol2d(Tolerance2d)
-{
-
- Perform(F, StartingPoint);
-}
-
-Standard_Boolean AppParCurves_BSpGradient_BFGS::IsSolutionReached(
- math_MultipleVarFunctionWithGradient& F) const
-{
- Standard_Boolean Result, Result2;
- AppParCurves_BSpParFunction* F1 = (AppParCurves_BSpParFunction*)&F;
-
- Result = (2.0 * fabs(TheMinimum - PreviousMinimum)
- <= 1.e-10 * (fabs(TheMinimum) + fabs(PreviousMinimum)) + 1.e-12);
- Standard_Real MErr3d = F1->MaxError3d();
- Standard_Real MErr2d = F1->MaxError2d();
- Result2 = ((MErr3d <= myTol3d) && (MErr2d <= myTol2d));
-
- return (Result || Result2);
-}
+++ /dev/null
-// Created on: 1999-12-16
-// Created by: Atelier CAS2000
-// Copyright (c) 1999 Matra Datavision
-// Copyright (c) 1999-2014 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.
-
-// Redefinition de math_BFGS:
-// ==========================
-
-AppParCurves_Gradient_BFGS::AppParCurves_Gradient_BFGS(math_MultipleVarFunctionWithGradient& F,
- const math_Vector& StartingPoint,
- const Standard_Real Tolerance3d,
- const Standard_Real Tolerance2d,
- const Standard_Real Eps,
- const Standard_Integer NbIterations)
- : math_BFGS(F.NbVariables(), Eps, NbIterations, Eps),
- myTol3d(Tolerance3d),
- myTol2d(Tolerance2d)
-{
- Perform(F, StartingPoint);
-}
-
-Standard_Boolean AppParCurves_Gradient_BFGS::IsSolutionReached(
- math_MultipleVarFunctionWithGradient& F) const
-{
- AppParCurves_ParFunction* F1 = (AppParCurves_ParFunction*)&F;
- Standard_Boolean Result, Result2;
-
- Result = (2.0 * fabs(TheMinimum - PreviousMinimum)
- <= 1.e-10 * (fabs(TheMinimum) + fabs(PreviousMinimum)) + 1.e-12);
- Standard_Real MErr3d = F1->MaxError3d();
- Standard_Real MErr2d = F1->MaxError2d();
-
- Result2 = ((MErr3d <= myTol3d) && (MErr2d <= myTol2d));
- return (Result || Result2);
-}
AppParCurves_Array1OfMultiPoint.hxx
AppParCurves_BSpFunction.gxx
AppParCurves_BSpGradient.gxx
- AppParCurves_BSpGradient_BFGS.gxx
AppParCurves_Constraint.hxx
AppParCurves_ConstraintCouple.cxx
AppParCurves_ConstraintCouple.hxx
AppParCurves_Function.gxx
AppParCurves_Gradient.gxx
- AppParCurves_Gradient_BFGS.gxx
AppParCurves_HArray1OfConstraintCouple.hxx
AppParCurves_HArray1OfMultiBSpCurve.hxx
AppParCurves_HArray1OfMultiCurve.hxx
gp_Pnt myP;
};
-#define Pnt gp_Pnt
-#define Pnt_hxx <gp_Pnt.hxx>
-#define Extrema_Point Extrema_POnCurv
-#define Extrema_Point_hxx <Extrema_POnCurv.hxx>
+//=================================================================================================
+// Inline implementations
+//=================================================================================================
-#include <Extrema_Point.lxx>
+inline Standard_Real Extrema_POnCurv::Parameter() const
+{
+ return myU;
+}
-#undef Pnt
-#undef Pnt_hxx
-#undef Extrema_Point
-#undef Extrema_Point_hxx
+inline const gp_Pnt& Extrema_POnCurv::Value() const
+{
+ return myP;
+}
#endif // _Extrema_POnCurv_HeaderFile
gp_Pnt2d myP;
};
-#define Pnt gp_Pnt2d
-#define Pnt_hxx <gp_Pnt2d.hxx>
-#define Extrema_Point Extrema_POnCurv2d
-#define Extrema_Point_hxx <Extrema_POnCurv2d.hxx>
+//=================================================================================================
+// Inline implementations
+//=================================================================================================
-#include <Extrema_Point.lxx>
+inline Standard_Real Extrema_POnCurv2d::Parameter() const
+{
+ return myU;
+}
-#undef Pnt
-#undef Pnt_hxx
-#undef Extrema_Point
-#undef Extrema_Point_hxx
+inline const gp_Pnt2d& Extrema_POnCurv2d::Value() const
+{
+ return myP;
+}
#endif // _Extrema_POnCurv2d_HeaderFile
#include <gp_Pnt2d.hxx>
-#define Pnt gp_Pnt2d
-#define Pnt_hxx <gp_Pnt2d.hxx>
-#define Extrema_Point Extrema_POnCurv2d
-#define Extrema_Point_hxx <Extrema_POnCurv2d.hxx>
-#include <Extrema_Point.gxx>
+Extrema_POnCurv2d::Extrema_POnCurv2d()
+ : myU(0.0)
+{
+}
+
+Extrema_POnCurv2d::Extrema_POnCurv2d(const Standard_Real U, const gp_Pnt2d& P)
+{
+ myU = U;
+ myP = P;
+}
+
+void Extrema_POnCurv2d::SetValues(const Standard_Real U, const gp_Pnt2d& P)
+{
+ myU = U;
+ myP = P;
+}
#include <gp_Pnt.hxx>
-#define Pnt gp_Pnt
-#define Pnt_hxx <gp_Pnt.hxx>
-#define Extrema_Point Extrema_POnCurv
-#define Extrema_Point_hxx <Extrema_POnCurv.hxx>
-#include <Extrema_Point.gxx>
+Extrema_POnCurv::Extrema_POnCurv()
+ : myU(0.0)
+{
+}
+
+Extrema_POnCurv::Extrema_POnCurv(const Standard_Real U, const gp_Pnt& P)
+{
+ myU = U;
+ myP = P;
+}
+
+void Extrema_POnCurv::SetValues(const Standard_Real U, const gp_Pnt& P)
+{
+ myU = U;
+ myP = P;
+}
+++ /dev/null
-// Copyright (c) 1995-1999 Matra Datavision
-// Copyright (c) 1999-2014 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.
-
-Extrema_Point::Extrema_Point()
- : myU(0.0)
-{
-}
-
-Extrema_Point::Extrema_Point(const Standard_Real U, const Pnt& P)
-{
- myU = U;
- myP = P;
-}
-
-void Extrema_Point::SetValues(const Standard_Real U, const Pnt& P)
-{
- myU = U;
- myP = P;
-}
+++ /dev/null
-// Copyright (c) 1995-1999 Matra Datavision
-// Copyright (c) 1999-2014 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.
-
-inline Standard_Real Extrema_Point::Parameter() const
-{
- return myU;
-}
-
-inline const Pnt& Extrema_Point::Value() const
-{
- return myP;
-}
Extrema_PCLocFOfLocEPCOfLocateExtPC2d.hxx
Extrema_PCLocFOfLocEPCOfLocateExtPC2d_0.cxx
Extrema_PCLocFOfLocEPCOfLocateExtPC_0.cxx
- Extrema_Point.gxx
- Extrema_Point.lxx
Extrema_POnCurv.hxx
Extrema_POnCurv2d.hxx
Extrema_POnCurv2d_0.cxx