|
|
|
@@ -19,7 +19,6 @@
|
|
|
|
|
|
|
|
|
|
#include <GeomToStep_MakeAxis2Placement3d.hxx>
|
|
|
|
|
#include <Interface_Macros.hxx>
|
|
|
|
|
#include <Interface_Static.hxx>
|
|
|
|
|
#include <StepAP203_CcDesignApproval.hxx>
|
|
|
|
|
#include <StepAP203_CcDesignDateAndTimeAssignment.hxx>
|
|
|
|
|
#include <StepAP203_CcDesignPersonAndOrganizationAssignment.hxx>
|
|
|
|
@@ -316,136 +315,6 @@ void STEPConstruct_ContextTool::SetACname (const Handle(TCollection_HAsciiString
|
|
|
|
|
GetAPD()->Application()->SetApplication (name);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
//=======================================================================
|
|
|
|
|
//function : SetACapplication
|
|
|
|
|
//purpose :
|
|
|
|
|
//=======================================================================
|
|
|
|
|
|
|
|
|
|
void STEPConstruct_ContextTool::SetACapplication (const Handle(TCollection_HAsciiString)& application)
|
|
|
|
|
{
|
|
|
|
|
GetPDC()->Formation()->OfProduct()->FrameOfReferenceValue(1)
|
|
|
|
|
->FrameOfReference()->SetApplication(application);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
// --------------------------------
|
|
|
|
|
// Product Related Product Category
|
|
|
|
|
// --------------------------------
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
|
|
//=======================================================================
|
|
|
|
|
//function : GetPRPC
|
|
|
|
|
//purpose :
|
|
|
|
|
//=======================================================================
|
|
|
|
|
|
|
|
|
|
Handle(StepBasic_ProductRelatedProductCategory) STEPConstruct_ContextTool::GetPRPC()
|
|
|
|
|
{
|
|
|
|
|
return thePRPC;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//=======================================================================
|
|
|
|
|
//function : AddPRPC
|
|
|
|
|
//purpose :
|
|
|
|
|
//=======================================================================
|
|
|
|
|
|
|
|
|
|
void STEPConstruct_ContextTool::AddPRPC (const Standard_Boolean enforce)
|
|
|
|
|
{
|
|
|
|
|
Standard_Boolean noprpc = thePRPC.IsNull();
|
|
|
|
|
if (noprpc || enforce) {
|
|
|
|
|
//:i3 abv 1 Sep 98: ProSTEP TR9: generate PRODUCT_TYPE (derived) instead of PRPC
|
|
|
|
|
switch (Interface_Static::IVal("write.step.schema")) { //j4
|
|
|
|
|
default:
|
|
|
|
|
case 1:
|
|
|
|
|
thePRPC = new StepBasic_ProductType;
|
|
|
|
|
thePRPC->SetName (new TCollection_HAsciiString("part"));
|
|
|
|
|
break;
|
|
|
|
|
case 4:
|
|
|
|
|
case 2:
|
|
|
|
|
thePRPC = new StepBasic_ProductRelatedProductCategory;
|
|
|
|
|
thePRPC->SetName (new TCollection_HAsciiString("part"));
|
|
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
thePRPC = new StepBasic_ProductRelatedProductCategory;
|
|
|
|
|
thePRPC->SetName (new TCollection_HAsciiString("detail")); // !!!!! or "assembly"
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
thePRPC->UnSetDescription(); //:i3
|
|
|
|
|
}
|
|
|
|
|
// if (noprpc || enforce) aStepModel->AddWithRefs(thePRPC);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//=======================================================================
|
|
|
|
|
//function : SetPRPCName
|
|
|
|
|
//purpose :
|
|
|
|
|
//=======================================================================
|
|
|
|
|
|
|
|
|
|
void STEPConstruct_ContextTool::SetPRPCName(const Handle(TCollection_HAsciiString)& aName)
|
|
|
|
|
{
|
|
|
|
|
GetPRPC()->SetName(aName);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//=======================================================================
|
|
|
|
|
//function : GetPRPCName
|
|
|
|
|
//purpose :
|
|
|
|
|
//=======================================================================
|
|
|
|
|
|
|
|
|
|
Handle(TCollection_HAsciiString) STEPConstruct_ContextTool::GetPRPCName()
|
|
|
|
|
{
|
|
|
|
|
if (GetPRPC().IsNull()) return new TCollection_HAsciiString("");
|
|
|
|
|
return GetPRPC()->Name();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//=======================================================================
|
|
|
|
|
//function : SetPRPCDescription
|
|
|
|
|
//purpose :
|
|
|
|
|
//=======================================================================
|
|
|
|
|
|
|
|
|
|
void STEPConstruct_ContextTool::SetPRPCDescription (const Handle(TCollection_HAsciiString)& aDescription)
|
|
|
|
|
{
|
|
|
|
|
Handle(StepBasic_ProductRelatedProductCategory) aPRPC = GetPRPC();
|
|
|
|
|
aPRPC->SetDescription(aDescription);
|
|
|
|
|
// aPRPC->HasDescription(Standard_True);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//=======================================================================
|
|
|
|
|
//function : GetPRPCDescription
|
|
|
|
|
//purpose :
|
|
|
|
|
//=======================================================================
|
|
|
|
|
|
|
|
|
|
Handle(TCollection_HAsciiString) STEPConstruct_ContextTool::GetPRPCDescription()
|
|
|
|
|
{
|
|
|
|
|
Handle(StepBasic_ProductRelatedProductCategory) aPRPC = GetPRPC();
|
|
|
|
|
if (!aPRPC.IsNull() && aPRPC->HasDescription())
|
|
|
|
|
return aPRPC->Description();
|
|
|
|
|
else {
|
|
|
|
|
return new TCollection_HAsciiString("");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ================================================================
|
|
|
|
|
//
|
|
|
|
|
// Settings from an already done SDR (see SDRtool)
|
|
|
|
|
//
|
|
|
|
|
// ================================================================
|
|
|
|
|
|
|
|
|
|
void STEPConstruct_ContextTool::SetSDR (const Handle(StepShape_ShapeDefinitionRepresentation)& sdr)
|
|
|
|
|
{
|
|
|
|
|
// SDR partage des choses avec le contexte ... On raccroche les wagons
|
|
|
|
|
Handle(StepBasic_Product) theProduct =
|
|
|
|
|
sdr->Definition()->Definition().ProductDefinition()->Formation()->OfProduct();
|
|
|
|
|
Handle(StepBasic_ApplicationContext) theAppli =
|
|
|
|
|
theProduct->FrameOfReferenceValue(1)->FrameOfReference();
|
|
|
|
|
Handle(StepBasic_HArray1OfProduct) ProdList =
|
|
|
|
|
new StepBasic_HArray1OfProduct(1,1);
|
|
|
|
|
ProdList->SetValue(1,theProduct);
|
|
|
|
|
thePRPC->SetProducts (ProdList);
|
|
|
|
|
theAPD->SetApplication (theAppli);
|
|
|
|
|
}
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
//=======================================================================
|
|
|
|
|
//function : GetDefaultAxis
|
|
|
|
|
//purpose :
|
|
|
|
|