mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0032681: Data Exchange - Missed dimension after STEP export
Changed level of detalisation (TopAbs_EDGE -> TopAbs_VERTEX by default)
This commit is contained in:
parent
3421323164
commit
2a0420be1d
@ -73,7 +73,7 @@ Handle(Transfer_Binder) IGESControl_ActorWrite::Transfer
|
|||||||
shape = XSAlgo::AlgoContainer()->ProcessShape( shape, Tol, maxTol,
|
shape = XSAlgo::AlgoContainer()->ProcessShape( shape, Tol, maxTol,
|
||||||
"write.iges.resource.name",
|
"write.iges.resource.name",
|
||||||
"write.iges.sequence", info,
|
"write.iges.sequence", info,
|
||||||
theProgress );
|
theProgress, false, TopAbs_EDGE);
|
||||||
// modified by NIZHNY-EAP Tue Aug 29 11:17:01 2000 ___END___
|
// modified by NIZHNY-EAP Tue Aug 29 11:17:01 2000 ___END___
|
||||||
|
|
||||||
BRepToIGES_BREntity BR0; BR0.SetModel(modl); BR0.SetTransferProcess(FP);
|
BRepToIGES_BREntity BR0; BR0.SetModel(modl); BR0.SetTransferProcess(FP);
|
||||||
|
@ -92,7 +92,7 @@ Standard_Boolean IGESControl_Writer::AddShape (const TopoDS_Shape& theShape,
|
|||||||
TopoDS_Shape Shape = XSAlgo::AlgoContainer()->ProcessShape( theShape, Tol, maxTol,
|
TopoDS_Shape Shape = XSAlgo::AlgoContainer()->ProcessShape( theShape, Tol, maxTol,
|
||||||
"write.iges.resource.name",
|
"write.iges.resource.name",
|
||||||
"write.iges.sequence", info,
|
"write.iges.sequence", info,
|
||||||
aPS.Next());
|
aPS.Next(), false, TopAbs_EDGE);
|
||||||
if (!aPS.More())
|
if (!aPS.More())
|
||||||
return Standard_False;
|
return Standard_False;
|
||||||
|
|
||||||
|
@ -198,7 +198,7 @@ Handle(Transfer_Binder) IGESToBRep_Actor::Transfer
|
|||||||
"read.iges.resource.name",
|
"read.iges.resource.name",
|
||||||
"read.iges.sequence",
|
"read.iges.sequence",
|
||||||
info, mymodel->ReShape(),
|
info, mymodel->ReShape(),
|
||||||
aPS.Next());
|
aPS.Next(), false, TopAbs_EDGE);
|
||||||
XSAlgo::AlgoContainer()->MergeTransferInfo(TP, info, nbTPitems);
|
XSAlgo::AlgoContainer()->MergeTransferInfo(TP, info, nbTPitems);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -552,7 +552,7 @@ Standard_Boolean IGESToBRep_Reader::Transfer(const Standard_Integer num,
|
|||||||
shape = XSAlgo::AlgoContainer()->ProcessShape( shape, eps*CAS.GetUnitFactor(), CAS.GetMaxTol(),
|
shape = XSAlgo::AlgoContainer()->ProcessShape( shape, eps*CAS.GetUnitFactor(), CAS.GetMaxTol(),
|
||||||
"read.iges.resource.name",
|
"read.iges.resource.name",
|
||||||
"read.iges.sequence", info,
|
"read.iges.sequence", info,
|
||||||
aPS.Next() );
|
aPS.Next(), false, TopAbs_EDGE);
|
||||||
if (aPS.UserBreak())
|
if (aPS.UserBreak())
|
||||||
return Standard_False;
|
return Standard_False;
|
||||||
|
|
||||||
|
@ -92,7 +92,8 @@ TopoDS_Shape XSAlgo_AlgoContainer::ProcessShape(const TopoDS_Shape& theShape,
|
|||||||
Handle(Standard_Transient)& theInfo,
|
Handle(Standard_Transient)& theInfo,
|
||||||
const Handle(ShapeBuild_ReShape)& theReShape,
|
const Handle(ShapeBuild_ReShape)& theReShape,
|
||||||
const Message_ProgressRange& theProgress,
|
const Message_ProgressRange& theProgress,
|
||||||
const Standard_Boolean theNonManifold) const
|
const Standard_Boolean theNonManifold,
|
||||||
|
const TopAbs_ShapeEnum theDetalisationLevel) const
|
||||||
{
|
{
|
||||||
if (theShape.IsNull())
|
if (theShape.IsNull())
|
||||||
{
|
{
|
||||||
@ -114,7 +115,7 @@ TopoDS_Shape XSAlgo_AlgoContainer::ProcessShape(const TopoDS_Shape& theShape,
|
|||||||
aRscfile = thePrscfile;
|
aRscfile = thePrscfile;
|
||||||
aContext = new ShapeProcess_ShapeContext(theShape, aRscfile);
|
aContext = new ShapeProcess_ShapeContext(theShape, aRscfile);
|
||||||
}
|
}
|
||||||
aContext->SetDetalisation(TopAbs_EDGE);
|
aContext->SetDetalisation(theDetalisationLevel);
|
||||||
}
|
}
|
||||||
aContext->SetNonManifold(theNonManifold);
|
aContext->SetNonManifold(theNonManifold);
|
||||||
theInfo = aContext;
|
theInfo = aContext;
|
||||||
@ -199,12 +200,13 @@ TopoDS_Shape XSAlgo_AlgoContainer::ProcessShape(const TopoDS_Shape& theShape,
|
|||||||
const Standard_CString thePseq,
|
const Standard_CString thePseq,
|
||||||
Handle(Standard_Transient)& theInfo,
|
Handle(Standard_Transient)& theInfo,
|
||||||
const Message_ProgressRange& theProgress,
|
const Message_ProgressRange& theProgress,
|
||||||
const Standard_Boolean theNonManifold) const
|
const Standard_Boolean theNonManifold,
|
||||||
|
const TopAbs_ShapeEnum theDetalisationLevel) const
|
||||||
{
|
{
|
||||||
Handle(ShapeBuild_ReShape) aReShape = new ShapeBuild_ReShape();
|
Handle(ShapeBuild_ReShape) aReShape = new ShapeBuild_ReShape();
|
||||||
return ProcessShape(theShape, thePrec, theMaxTol, thePrscfile,
|
return ProcessShape(theShape, thePrec, theMaxTol, thePrscfile,
|
||||||
thePseq, theInfo, aReShape, theProgress,
|
thePseq, theInfo, aReShape, theProgress,
|
||||||
theNonManifold);
|
theNonManifold, theDetalisationLevel);
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
@ -19,9 +19,10 @@
|
|||||||
#include <Standard.hxx>
|
#include <Standard.hxx>
|
||||||
#include <Standard_Type.hxx>
|
#include <Standard_Type.hxx>
|
||||||
|
|
||||||
#include <Standard_Transient.hxx>
|
|
||||||
#include <Standard_Integer.hxx>
|
|
||||||
#include <Message_ProgressRange.hxx>
|
#include <Message_ProgressRange.hxx>
|
||||||
|
#include <Standard_Integer.hxx>
|
||||||
|
#include <Standard_Transient.hxx>
|
||||||
|
#include <TopAbs_ShapeEnum.hxx>
|
||||||
|
|
||||||
class ShapeBuild_ReShape;
|
class ShapeBuild_ReShape;
|
||||||
class XSAlgo_ToolContainer;
|
class XSAlgo_ToolContainer;
|
||||||
@ -71,7 +72,8 @@ public:
|
|||||||
const Standard_CString thePseq,
|
const Standard_CString thePseq,
|
||||||
Handle(Standard_Transient)& theInfo,
|
Handle(Standard_Transient)& theInfo,
|
||||||
const Message_ProgressRange& theProgress = Message_ProgressRange(),
|
const Message_ProgressRange& theProgress = Message_ProgressRange(),
|
||||||
const Standard_Boolean theNonManifold = Standard_False) const;
|
const Standard_Boolean theNonManifold = Standard_False,
|
||||||
|
const TopAbs_ShapeEnum theDetalisationLevel = TopAbs_VERTEX) const;
|
||||||
|
|
||||||
//! Does shape processing with specified tolerances
|
//! Does shape processing with specified tolerances
|
||||||
//! @param[in] theShape shape to process
|
//! @param[in] theShape shape to process
|
||||||
@ -92,7 +94,8 @@ public:
|
|||||||
Handle(Standard_Transient)& theInfo,
|
Handle(Standard_Transient)& theInfo,
|
||||||
const Handle(ShapeBuild_ReShape)& theReShape,
|
const Handle(ShapeBuild_ReShape)& theReShape,
|
||||||
const Message_ProgressRange& theProgress = Message_ProgressRange(),
|
const Message_ProgressRange& theProgress = Message_ProgressRange(),
|
||||||
const Standard_Boolean theNonManifold = Standard_False) const;
|
const Standard_Boolean theNonManifold = Standard_False,
|
||||||
|
const TopAbs_ShapeEnum theDetalisationLevel = TopAbs_VERTEX) const;
|
||||||
|
|
||||||
//! Checks quality of pcurve of the edge on the given face,
|
//! Checks quality of pcurve of the edge on the given face,
|
||||||
//! and corrects it if necessary.
|
//! and corrects it if necessary.
|
||||||
|
27
tests/bugs/step/bug32681
Normal file
27
tests/bugs/step/bug32681
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
puts "=================================="
|
||||||
|
puts "0032681: Data Exchange - Missed dimension after STEP export"
|
||||||
|
puts "Check adding of dimension"
|
||||||
|
puts "=================================="
|
||||||
|
|
||||||
|
pload DCAF
|
||||||
|
|
||||||
|
ReadStep D [locate_data_file bug32681.stp]
|
||||||
|
XGetOneShape s D
|
||||||
|
explode s V
|
||||||
|
XAddSubShape D s_1 0:1:1:1
|
||||||
|
XAddSubShape D s_84 0:1:1:1
|
||||||
|
XAddDimension D 0:1:1:1:57 0:1:1:1:58
|
||||||
|
param write.step.schema 5
|
||||||
|
param write.surfacecurve.mode 0
|
||||||
|
set tmpFile ${imagedir}/tmpFile.stp
|
||||||
|
WriteStep D $tmpFile
|
||||||
|
Close D
|
||||||
|
ReadStep D1 $tmpFile
|
||||||
|
set str [XDumpDGTs D1 all]
|
||||||
|
if {[string first "0:1:1:1:57" $str] == -1 || [string first "0:1:1:1:58" $str] == -1} {
|
||||||
|
puts "Error: don't find subshape"
|
||||||
|
}
|
||||||
|
Close D1
|
||||||
|
file delete $tmpFile
|
||||||
|
param write.step.schema 4
|
||||||
|
param write.surfacecurve.mode 1
|
Loading…
x
Reference in New Issue
Block a user