mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
// updated XSDRAW_Commom to work with new WS session updates
updated to work with new WS Updated XDEDRAW_Common fixed unit problem
This commit is contained in:
@@ -526,11 +526,6 @@ bool STEPCAFControl_Provider::Write(std::ostream& theOStream,
|
|||||||
Handle(STEPCAFControl_ConfigurationNode) aNode =
|
Handle(STEPCAFControl_ConfigurationNode) aNode =
|
||||||
Handle(STEPCAFControl_ConfigurationNode)::DownCast(GetNode());
|
Handle(STEPCAFControl_ConfigurationNode)::DownCast(GetNode());
|
||||||
initStatic(aNode);
|
initStatic(aNode);
|
||||||
XCAFDoc_DocumentTool::SetLengthUnit(theDocument,
|
|
||||||
UnitsMethods::GetLengthUnitScale(
|
|
||||||
aNode->InternalParameters.WriteUnit,
|
|
||||||
UnitsMethods_LengthUnit_Millimeter),
|
|
||||||
UnitsMethods_LengthUnit_Millimeter);
|
|
||||||
personizeWS(theWS);
|
personizeWS(theWS);
|
||||||
STEPCAFControl_Writer aWriter(theWS, Standard_True);
|
STEPCAFControl_Writer aWriter(theWS, Standard_True);
|
||||||
STEPControl_StepModelType aMode =
|
STEPControl_StepModelType aMode =
|
||||||
@@ -539,6 +534,10 @@ bool STEPCAFControl_Provider::Write(std::ostream& theOStream,
|
|||||||
aWriter.SetNameMode(aNode->InternalParameters.WriteName);
|
aWriter.SetNameMode(aNode->InternalParameters.WriteName);
|
||||||
aWriter.SetLayerMode(aNode->InternalParameters.WriteLayer);
|
aWriter.SetLayerMode(aNode->InternalParameters.WriteLayer);
|
||||||
aWriter.SetPropsMode(aNode->InternalParameters.WriteProps);
|
aWriter.SetPropsMode(aNode->InternalParameters.WriteProps);
|
||||||
|
Handle(StepData_StepModel) aModel = aWriter.ChangeWriter().Model();
|
||||||
|
aModel->SetWriteLengthUnit(UnitsMethods::GetLengthUnitScale(
|
||||||
|
aNode->InternalParameters.WriteUnit,
|
||||||
|
UnitsMethods_LengthUnit_Millimeter));
|
||||||
TDF_LabelSequence aLabels;
|
TDF_LabelSequence aLabels;
|
||||||
TCollection_AsciiString aLabelsString;
|
TCollection_AsciiString aLabelsString;
|
||||||
for (TColStd_SequenceOfAsciiString::Iterator anIter(aNode->InternalParameters.WriteLabels);
|
for (TColStd_SequenceOfAsciiString::Iterator anIter(aNode->InternalParameters.WriteLabels);
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -153,8 +153,8 @@ static Standard_Integer igesbrep (Draw_Interpretor& di, Standard_Integer argc, c
|
|||||||
di << "All Geometry Transfer\n";
|
di << "All Geometry Transfer\n";
|
||||||
di<<"spline_continuity (read) : "<<Interface_Static::IVal("read.iges.bspline.continuity")<<" (0 : no modif, 1 : C1, 2 : C2)\n";
|
di<<"spline_continuity (read) : "<<Interface_Static::IVal("read.iges.bspline.continuity")<<" (0 : no modif, 1 : C1, 2 : C2)\n";
|
||||||
di<<" To modify : command param read.iges.bspline.continuity\n";
|
di<<" To modify : command param read.iges.bspline.continuity\n";
|
||||||
Handle(XSControl_WorkSession) thesession = Reader.WS();
|
const Handle(XSControl_WorkSession)& thesession = Reader.WS();
|
||||||
thesession->ClearContext();
|
thesession->TransferReader()->Context().Clear();
|
||||||
XSDRAW::SetTransferProcess (thesession->TransferReader()->TransientProcess());
|
XSDRAW::SetTransferProcess (thesession->TransferReader()->TransientProcess());
|
||||||
|
|
||||||
aPSRoot.SetName("Translation");
|
aPSRoot.SetName("Translation");
|
||||||
@@ -255,8 +255,8 @@ static Standard_Integer igesbrep (Draw_Interpretor& di, Standard_Integer argc, c
|
|||||||
di << "All Geometry Transfer\n";
|
di << "All Geometry Transfer\n";
|
||||||
di<<"spline_continuity (read) : "<<Interface_Static::IVal("read.iges.bspline.continuity")<<" (0 : no modif, 1 : C1, 2 : C2)\n";
|
di<<"spline_continuity (read) : "<<Interface_Static::IVal("read.iges.bspline.continuity")<<" (0 : no modif, 1 : C1, 2 : C2)\n";
|
||||||
di<<" To modify : command param read.iges.bspline.continuity\n";
|
di<<" To modify : command param read.iges.bspline.continuity\n";
|
||||||
Handle(XSControl_WorkSession) thesession = Reader.WS();
|
const Handle(XSControl_WorkSession)& thesession = Reader.WS();
|
||||||
thesession->ClearContext();
|
thesession->TransferReader()->Context().Clear();
|
||||||
XSDRAW::SetTransferProcess (thesession->TransferReader()->TransientProcess());
|
XSDRAW::SetTransferProcess (thesession->TransferReader()->TransientProcess());
|
||||||
|
|
||||||
aPSRoot.SetName("Translation");
|
aPSRoot.SetName("Translation");
|
||||||
|
@@ -53,7 +53,7 @@ if [catch {readfile S5 $filename -conf "global.general.length.unit : 1000 "} cat
|
|||||||
puts "OK : Reading is correct"
|
puts "OK : Reading is correct"
|
||||||
}
|
}
|
||||||
|
|
||||||
array set volumes {0 11995.4 1 0.0119954 2 11995.4 3 0.0119954 4 11995.4 5 0.0119954}
|
array set volumes {0 11995.4 1 0.0119954 2 11995.4 3 0.0119954 4 0.0119954 5 1.20093e-08}
|
||||||
array set results {0 res0 1 res1 2 S2 3 S3 4 S4 5 S5}
|
array set results {0 res0 1 res1 2 S2 3 S3 4 S4 5 S5}
|
||||||
for { set anind 0} { $anind < 6 } { incr anind } {
|
for { set anind 0} { $anind < 6 } { incr anind } {
|
||||||
checkprops $results($anind) -s $volumes($anind) -eps 1e-2
|
checkprops $results($anind) -s $volumes($anind) -eps 1e-2
|
||||||
|
@@ -96,7 +96,7 @@ if [catch {ReadFile D7 $write_path -conf "global.general.length.unit : 0.0254 "}
|
|||||||
}
|
}
|
||||||
XGetOneShape S7 D7
|
XGetOneShape S7 D7
|
||||||
|
|
||||||
array set areas {0 11995.4 1 0.0119954 2 47916.8 3 11979.2 4 0.0479168 5 0.0119792 6 47916.8 7 18.5678}
|
array set areas {0 11995.4 1 0.0119954 2 0.0119792 3 0.0119792 4 0.0119792 5 1.19955e-08 6 11979.2 7 18.5678}
|
||||||
array set results {0 S0 1 S1 2 S2 3 S3 4 S4 5 S5 6 S6 7 S7}
|
array set results {0 S0 1 S1 2 S2 3 S3 4 S4 5 S5 6 S6 7 S7}
|
||||||
for { set anind 0} { $anind < 8 } { incr anind } {
|
for { set anind 0} { $anind < 8 } { incr anind } {
|
||||||
checkprops $results($anind) -s $areas($anind) -eps 1e-2
|
checkprops $results($anind) -s $areas($anind) -eps 1e-2
|
||||||
|
Reference in New Issue
Block a user