mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
f50111ec50 |
@@ -133,7 +133,7 @@ namespace
|
|||||||
{
|
{
|
||||||
if (aDEdge->GetCurve()->ParametersNb() == 2)
|
if (aDEdge->GetCurve()->ParametersNb() == 2)
|
||||||
{
|
{
|
||||||
if (splitEdge (aDEdge, aDFace, Abs (getConeStep (aDFace))))
|
if (splitEdge (aDEdge, Abs (getConeStep (aDFace))))
|
||||||
{
|
{
|
||||||
TopLoc_Location aLoc;
|
TopLoc_Location aLoc;
|
||||||
const Handle (Poly_Triangulation)& aTriangulation =
|
const Handle (Poly_Triangulation)& aTriangulation =
|
||||||
@@ -178,89 +178,48 @@ namespace
|
|||||||
}
|
}
|
||||||
|
|
||||||
//! Splits 3D and all pcurves accordingly using the specified step.
|
//! Splits 3D and all pcurves accordingly using the specified step.
|
||||||
Standard_Boolean splitEdge(const IMeshData::IEdgePtr& theDEdge,
|
Standard_Boolean splitEdge(const IMeshData::IEdgePtr& theDEdge,
|
||||||
const IMeshData::IFaceHandle& theDFace,
|
const Standard_Real theDU) const
|
||||||
const Standard_Real theDU) const
|
|
||||||
{
|
{
|
||||||
TopoDS_Edge aE = theDEdge->GetEdge();
|
if (!splitCurve<gp_XYZ> (theDEdge->GetCurve (), theDU))
|
||||||
const TopoDS_Face& aF = theDFace->GetFace();
|
|
||||||
|
|
||||||
Standard_Real aFParam, aLParam;
|
|
||||||
|
|
||||||
Handle(Geom_Curve) aHC = BRep_Tool::Curve (aE, aFParam, aLParam);
|
|
||||||
|
|
||||||
const IMeshData::IPCurveHandle& aIPC1 = theDEdge->GetPCurve(0);
|
|
||||||
const IMeshData::IPCurveHandle& aIPC2 = theDEdge->GetPCurve(1);
|
|
||||||
|
|
||||||
// Calculate the step by parameter of the curve.
|
|
||||||
const gp_Pnt2d& aFPntOfIPC1 = aIPC1->GetPoint (0);
|
|
||||||
const gp_Pnt2d& aLPntOfIPC1 = aIPC1->GetPoint (aIPC1->ParametersNb() - 1);
|
|
||||||
const Standard_Real aMod = Abs (aFPntOfIPC1.Y() - aLPntOfIPC1.Y());
|
|
||||||
|
|
||||||
if (aMod < gp::Resolution())
|
|
||||||
{
|
{
|
||||||
return Standard_False;
|
return Standard_False;
|
||||||
}
|
}
|
||||||
|
|
||||||
const Standard_Real aDT = Abs (aLParam - aFParam) / aMod * theDU;
|
for (Standard_Integer aPCurveIdx = 0; aPCurveIdx < theDEdge->PCurvesNb(); ++aPCurveIdx)
|
||||||
|
|
||||||
if (!splitCurve<gp_Pnt> (aHC, theDEdge->GetCurve(), aDT))
|
|
||||||
{
|
{
|
||||||
return Standard_False;
|
splitCurve<gp_XY> (theDEdge->GetPCurve (aPCurveIdx), theDU);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Define two pcurves of the seam-edge.
|
|
||||||
Handle(Geom2d_Curve) aPC1, aPC2;
|
|
||||||
Standard_Real af, al;
|
|
||||||
|
|
||||||
aE.Orientation (TopAbs_FORWARD);
|
|
||||||
aPC1 = BRep_Tool::CurveOnSurface (aE, aF, af, al);
|
|
||||||
|
|
||||||
aE.Orientation (TopAbs_REVERSED);
|
|
||||||
aPC2 = BRep_Tool::CurveOnSurface (aE, aF, af, al);
|
|
||||||
|
|
||||||
if (aPC1.IsNull() || aPC2.IsNull())
|
|
||||||
{
|
|
||||||
return Standard_False;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Select the correct pcurve of the seam-edge.
|
|
||||||
const gp_Pnt2d& aFPntOfPC1 = aPC1->Value (aPC1->FirstParameter());
|
|
||||||
|
|
||||||
if (Abs (aLPntOfIPC1.X() - aFPntOfPC1.X()) > Precision::Confusion())
|
|
||||||
{
|
|
||||||
std::swap (aPC1, aPC2);
|
|
||||||
}
|
|
||||||
|
|
||||||
splitCurve<gp_Pnt2d> (aPC1, aIPC1, aDT);
|
|
||||||
splitCurve<gp_Pnt2d> (aPC2, aIPC2, aDT);
|
|
||||||
|
|
||||||
return Standard_True;
|
return Standard_True;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! Splits the given curve using the specified step.
|
//! Splits the given curve using the specified step.
|
||||||
template<class PointType, class GeomCurve, class Curve>
|
template<class PointType, class Curve>
|
||||||
Standard_Boolean splitCurve(GeomCurve& theGeomCurve,
|
Standard_Boolean splitCurve(Curve& theCurve, const Standard_Real theDU) const
|
||||||
Curve& theCurve,
|
|
||||||
const Standard_Real theDT) const
|
|
||||||
{
|
{
|
||||||
Standard_Boolean isUpdated = Standard_False;
|
Standard_Boolean isUpdated = Standard_False;
|
||||||
|
PointType aDir = theCurve->GetPoint(theCurve->ParametersNb() - 1).Coord() - theCurve->GetPoint(0).Coord();
|
||||||
|
const Standard_Real aModulus = aDir.Modulus();
|
||||||
|
if (aModulus < gp::Resolution())
|
||||||
|
{
|
||||||
|
return isUpdated;
|
||||||
|
}
|
||||||
|
aDir /= aModulus;
|
||||||
|
|
||||||
const Standard_Real aFirstParam = theCurve->GetParameter (0);
|
const Standard_Real aLastParam = theCurve->GetParameter(theCurve->ParametersNb() - 1);
|
||||||
const Standard_Real aLastParam = theCurve->GetParameter (theCurve->ParametersNb() - 1);
|
const Standard_Boolean isReversed = theCurve->GetParameter(0) > aLastParam;
|
||||||
const Standard_Boolean isReversed = aFirstParam > aLastParam;
|
|
||||||
|
|
||||||
for (Standard_Integer aPointIdx = 1; ; ++aPointIdx)
|
for (Standard_Integer aPointIdx = 1; ; ++aPointIdx)
|
||||||
{
|
{
|
||||||
const Standard_Real aCurrParam = aFirstParam + aPointIdx * theDT * (isReversed ? -1.0 : 1.0);
|
const Standard_Real aCurrParam = theCurve->GetParameter(0) + aPointIdx * theDU * (isReversed ? -1.0 : 1.0);
|
||||||
if (( isReversed && (aCurrParam - aLastParam < Precision::PConfusion())) ||
|
if (( isReversed && (aCurrParam < aLastParam)) ||
|
||||||
(!isReversed && !(aCurrParam - aLastParam < - Precision::PConfusion())))
|
(!isReversed && !(aCurrParam < aLastParam)))
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
theCurve->InsertPoint (theCurve->ParametersNb() - 1,
|
theCurve->InsertPoint(theCurve->ParametersNb() - 1,
|
||||||
theGeomCurve->Value (aCurrParam),
|
theCurve->GetPoint(0).Translated (aDir * aPointIdx * theDU),
|
||||||
aCurrParam);
|
aCurrParam);
|
||||||
|
|
||||||
isUpdated = Standard_True;
|
isUpdated = Standard_True;
|
||||||
|
@@ -26,7 +26,6 @@
|
|||||||
#include <Precision.hxx>
|
#include <Precision.hxx>
|
||||||
#include <Standard_Type.hxx>
|
#include <Standard_Type.hxx>
|
||||||
#include <TDataStd_Integer.hxx>
|
#include <TDataStd_Integer.hxx>
|
||||||
#include <TDataStd_Name.hxx>
|
|
||||||
#include <TDF_Label.hxx>
|
#include <TDF_Label.hxx>
|
||||||
#include <TFunction_Function.hxx>
|
#include <TFunction_Function.hxx>
|
||||||
#include <TFunction_Logbook.hxx>
|
#include <TFunction_Logbook.hxx>
|
||||||
|
@@ -504,6 +504,7 @@ void IntTools_FaceFace::Perform (const TopoDS_Face& aF1,
|
|||||||
|
|
||||||
{
|
{
|
||||||
const Standard_Real UVMaxStep = IntPatch_Intersection::DefineUVMaxStep(myHS1, dom1, myHS2, dom2);
|
const Standard_Real UVMaxStep = IntPatch_Intersection::DefineUVMaxStep(myHS1, dom1, myHS2, dom2);
|
||||||
|
// TODO: bug32811 Deflection change to 0.01 can work
|
||||||
const Standard_Real Deflection = 0.1;
|
const Standard_Real Deflection = 0.1;
|
||||||
myIntersector.SetTolerances(TolArc, TolTang, UVMaxStep, Deflection);
|
myIntersector.SetTolerances(TolArc, TolTang, UVMaxStep, Deflection);
|
||||||
}
|
}
|
||||||
|
@@ -448,5 +448,5 @@ void IntTools_TopolTool::SamplePnts(const Standard_Real theDefl,
|
|||||||
myV0 = myVPars->Value(1);
|
myV0 = myVPars->Value(1);
|
||||||
|
|
||||||
myDU = (myUPars->Value(myNbSmplU) - myU0)/(myNbSmplU-1);
|
myDU = (myUPars->Value(myNbSmplU) - myU0)/(myNbSmplU-1);
|
||||||
myDV = (myVPars->Value(myNbSmplV) - myU0)/(myNbSmplV-1);
|
myDV = (myVPars->Value(myNbSmplV) - myV0)/(myNbSmplV-1);
|
||||||
}
|
}
|
||||||
|
@@ -529,8 +529,6 @@
|
|||||||
#include <RWStepVisual_RWPresentationStyleByContext.hxx>
|
#include <RWStepVisual_RWPresentationStyleByContext.hxx>
|
||||||
#include <RWStepVisual_RWPresentationView.hxx>
|
#include <RWStepVisual_RWPresentationView.hxx>
|
||||||
#include <RWStepVisual_RWPresentedItemRepresentation.hxx>
|
#include <RWStepVisual_RWPresentedItemRepresentation.hxx>
|
||||||
#include <RWStepVisual_RWRepositionedTessellatedGeometricSet.hxx>
|
|
||||||
#include <RWStepVisual_RWRepositionedTessellatedItem.hxx>
|
|
||||||
#include <RWStepVisual_RWStyledItem.hxx>
|
#include <RWStepVisual_RWStyledItem.hxx>
|
||||||
#include <RWStepVisual_RWSurfaceSideStyle.hxx>
|
#include <RWStepVisual_RWSurfaceSideStyle.hxx>
|
||||||
#include <RWStepVisual_RWSurfaceStyleBoundary.hxx>
|
#include <RWStepVisual_RWSurfaceStyleBoundary.hxx>
|
||||||
@@ -1090,8 +1088,6 @@
|
|||||||
#include <StepVisual_PresentationStyleByContext.hxx>
|
#include <StepVisual_PresentationStyleByContext.hxx>
|
||||||
#include <StepVisual_PresentationView.hxx>
|
#include <StepVisual_PresentationView.hxx>
|
||||||
#include <StepVisual_PresentedItemRepresentation.hxx>
|
#include <StepVisual_PresentedItemRepresentation.hxx>
|
||||||
#include <StepVisual_RepositionedTessellatedGeometricSet.hxx>
|
|
||||||
#include <StepVisual_RepositionedTessellatedItem.hxx>
|
|
||||||
#include <StepVisual_StyledItem.hxx>
|
#include <StepVisual_StyledItem.hxx>
|
||||||
#include <StepVisual_SurfaceSideStyle.hxx>
|
#include <StepVisual_SurfaceSideStyle.hxx>
|
||||||
#include <StepVisual_SurfaceStyleBoundary.hxx>
|
#include <StepVisual_SurfaceStyleBoundary.hxx>
|
||||||
@@ -5894,13 +5890,7 @@ void RWStepAP214_GeneralModule::FillSharedCase(const Standard_Integer CN,
|
|||||||
tool.Share(anent, iter);
|
tool.Share(anent, iter);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 802:
|
|
||||||
{
|
|
||||||
DeclareAndCast(StepVisual_RepositionedTessellatedGeometricSet, anEnt, ent);
|
|
||||||
RWStepVisual_RWRepositionedTessellatedGeometricSet aTool;
|
|
||||||
aTool.Share(anEnt, iter);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default : break;
|
default : break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -8156,12 +8146,6 @@ Standard_Boolean RWStepAP214_GeneralModule::NewVoid
|
|||||||
case 801:
|
case 801:
|
||||||
ent = new StepKinematics_MechanismStateRepresentation;
|
ent = new StepKinematics_MechanismStateRepresentation;
|
||||||
break;
|
break;
|
||||||
case 802:
|
|
||||||
ent = new StepVisual_RepositionedTessellatedGeometricSet;
|
|
||||||
break;
|
|
||||||
case 803:
|
|
||||||
ent = new StepVisual_RepositionedTessellatedItem;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return Standard_False;
|
return Standard_False;
|
||||||
@@ -8842,8 +8826,6 @@ Standard_Integer RWStepAP214_GeneralModule::CategoryNumber
|
|||||||
case 798: return cataux;
|
case 798: return cataux;
|
||||||
case 800: return catsh;
|
case 800: return catsh;
|
||||||
case 801: return cataux;
|
case 801: return cataux;
|
||||||
case 802: return cataux;
|
|
||||||
case 803: return cataux;
|
|
||||||
default : break;
|
default : break;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
@@ -258,8 +258,6 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_ReadWriteModule,StepData_ReadWriteModule)
|
|||||||
#include <StepVisual_PresentationStyleAssignment.hxx>
|
#include <StepVisual_PresentationStyleAssignment.hxx>
|
||||||
#include <StepVisual_PresentationStyleByContext.hxx>
|
#include <StepVisual_PresentationStyleByContext.hxx>
|
||||||
#include <StepVisual_PresentationView.hxx>
|
#include <StepVisual_PresentationView.hxx>
|
||||||
#include <StepVisual_RepositionedTessellatedGeometricSet.hxx>
|
|
||||||
#include <StepVisual_RepositionedTessellatedItem.hxx>
|
|
||||||
#include <StepBasic_Product.hxx>
|
#include <StepBasic_Product.hxx>
|
||||||
#include <StepBasic_ProductCategory.hxx>
|
#include <StepBasic_ProductCategory.hxx>
|
||||||
#include <StepBasic_ProductContext.hxx>
|
#include <StepBasic_ProductContext.hxx>
|
||||||
@@ -656,8 +654,6 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_ReadWriteModule,StepData_ReadWriteModule)
|
|||||||
#include <RWStepVisual_RWPresentationStyleAssignment.hxx>
|
#include <RWStepVisual_RWPresentationStyleAssignment.hxx>
|
||||||
#include <RWStepVisual_RWPresentationStyleByContext.hxx>
|
#include <RWStepVisual_RWPresentationStyleByContext.hxx>
|
||||||
#include <RWStepVisual_RWPresentationView.hxx>
|
#include <RWStepVisual_RWPresentationView.hxx>
|
||||||
#include <RWStepVisual_RWRepositionedTessellatedGeometricSet.hxx>
|
|
||||||
#include <RWStepVisual_RWRepositionedTessellatedItem.hxx>
|
|
||||||
#include <RWStepBasic_RWProduct.hxx>
|
#include <RWStepBasic_RWProduct.hxx>
|
||||||
#include <RWStepBasic_RWProductCategory.hxx>
|
#include <RWStepBasic_RWProductCategory.hxx>
|
||||||
#include <RWStepBasic_RWProductContext.hxx>
|
#include <RWStepBasic_RWProductContext.hxx>
|
||||||
@@ -2209,8 +2205,6 @@ static TCollection_AsciiString Reco_AnnotationPlane("ANNOTATION_PLANE");
|
|||||||
static TCollection_AsciiString Reco_TessellatedAnnotationOccurrence("TESSELLATED_ANNOTATION_OCCURRENCE");
|
static TCollection_AsciiString Reco_TessellatedAnnotationOccurrence("TESSELLATED_ANNOTATION_OCCURRENCE");
|
||||||
static TCollection_AsciiString Reco_TessellatedGeometricSet("TESSELLATED_GEOMETRIC_SET");
|
static TCollection_AsciiString Reco_TessellatedGeometricSet("TESSELLATED_GEOMETRIC_SET");
|
||||||
static TCollection_AsciiString Reco_TessellatedCurveSet("TESSELLATED_CURVE_SET");
|
static TCollection_AsciiString Reco_TessellatedCurveSet("TESSELLATED_CURVE_SET");
|
||||||
static TCollection_AsciiString Reco_TessellatedItem("TESSELLATED_ITEM");
|
|
||||||
static TCollection_AsciiString Reco_RepositionedTessellatedItem("REPOSITIONED_TESSELLATED_ITEM");
|
|
||||||
static TCollection_AsciiString Reco_CoordinatesList("COORDINATES_LIST");
|
static TCollection_AsciiString Reco_CoordinatesList("COORDINATES_LIST");
|
||||||
static TCollection_AsciiString Reco_ConstructiveGeometryRepresentation("CONSTRUCTIVE_GEOMETRY_REPRESENTATION");
|
static TCollection_AsciiString Reco_ConstructiveGeometryRepresentation("CONSTRUCTIVE_GEOMETRY_REPRESENTATION");
|
||||||
static TCollection_AsciiString Reco_ConstructiveGeometryRepresentationRelationship("CONSTRUCTIVE_GEOMETRY_REPRESENTATION_RELATIONSHIP");
|
static TCollection_AsciiString Reco_ConstructiveGeometryRepresentationRelationship("CONSTRUCTIVE_GEOMETRY_REPRESENTATION_RELATIONSHIP");
|
||||||
@@ -3041,7 +3035,6 @@ RWStepAP214_ReadWriteModule::RWStepAP214_ReadWriteModule ()
|
|||||||
typenums.Bind(Reco_LinearFlexibleLinkRepresentation, 798);
|
typenums.Bind(Reco_LinearFlexibleLinkRepresentation, 798);
|
||||||
typenums.Bind(Reco_KinematicPair, 799);
|
typenums.Bind(Reco_KinematicPair, 799);
|
||||||
typenums.Bind(Reco_MechanismStateRepresentation, 801);
|
typenums.Bind(Reco_MechanismStateRepresentation, 801);
|
||||||
typenums.Bind(Reco_RepositionedTessellatedItem, 803);
|
|
||||||
|
|
||||||
|
|
||||||
// SHORT NAMES
|
// SHORT NAMES
|
||||||
@@ -3834,22 +3827,13 @@ Standard_Integer RWStepAP214_ReadWriteModule::CaseStep
|
|||||||
types(5).IsEqual(StepType(624))))) {
|
types(5).IsEqual(StepType(624))))) {
|
||||||
return 705;
|
return 705;
|
||||||
}
|
}
|
||||||
else if ((types(1).IsEqual(StepType(4))) &&
|
if ((types(1).IsEqual(StepType(4))) &&
|
||||||
(types(2).IsEqual(StepType(7))) &&
|
(types(2).IsEqual(StepType(7))) &&
|
||||||
(types(3).IsEqual(StepType(144))) &&
|
(types(3).IsEqual(StepType(144))) &&
|
||||||
(types(4).IsEqual(StepType(247))) &&
|
(types(4).IsEqual(StepType(247))) &&
|
||||||
(types(5).IsEqual(StepType(270))))
|
(types(5).IsEqual(StepType(270)))) {
|
||||||
{
|
|
||||||
return 719;
|
return 719;
|
||||||
}
|
}
|
||||||
else if ((types(1).IsEqual(StepType(144))) &&
|
|
||||||
(types(2).IsEqual(StepType(803))) &&
|
|
||||||
(types(3).IsEqual(StepType(247))) &&
|
|
||||||
(types(4).IsEqual(StepType(709))) &&
|
|
||||||
(types(5).IsEqual(StepType(708))))
|
|
||||||
{
|
|
||||||
return 802;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (NbComp == 4) {
|
else if (NbComp == 4) {
|
||||||
if ((types(1).IsEqual(StepType(161))) &&
|
if ((types(1).IsEqual(StepType(161))) &&
|
||||||
@@ -4919,7 +4903,6 @@ const TCollection_AsciiString& RWStepAP214_ReadWriteModule::StepType
|
|||||||
case 704: return Reco_AnnotationPlane;
|
case 704: return Reco_AnnotationPlane;
|
||||||
|
|
||||||
case 707 : return Reco_TessellatedAnnotationOccurrence;
|
case 707 : return Reco_TessellatedAnnotationOccurrence;
|
||||||
case 708 : return Reco_TessellatedItem;
|
|
||||||
case 709 : return Reco_TessellatedGeometricSet;
|
case 709 : return Reco_TessellatedGeometricSet;
|
||||||
|
|
||||||
case 710 : return Reco_TessellatedCurveSet;
|
case 710 : return Reco_TessellatedCurveSet;
|
||||||
@@ -5013,7 +4996,7 @@ const TCollection_AsciiString& RWStepAP214_ReadWriteModule::StepType
|
|||||||
case 798: return Reco_LinearFlexibleLinkRepresentation;
|
case 798: return Reco_LinearFlexibleLinkRepresentation;
|
||||||
case 799: return Reco_KinematicPair;
|
case 799: return Reco_KinematicPair;
|
||||||
case 801: return Reco_MechanismStateRepresentation;
|
case 801: return Reco_MechanismStateRepresentation;
|
||||||
case 803: return Reco_RepositionedTessellatedItem;
|
|
||||||
default : return PasReco;
|
default : return PasReco;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5344,13 +5327,6 @@ Standard_Boolean RWStepAP214_ReadWriteModule::ComplexType(const Standard_Integer
|
|||||||
types.Append(StepType(759));
|
types.Append(StepType(759));
|
||||||
types.Append(StepType(247));
|
types.Append(StepType(247));
|
||||||
break;
|
break;
|
||||||
case 802:
|
|
||||||
types.Append(StepType(144));
|
|
||||||
types.Append(StepType(803));
|
|
||||||
types.Append(StepType(247));
|
|
||||||
types.Append(StepType(709));
|
|
||||||
types.Append(StepType(708));
|
|
||||||
break;
|
|
||||||
default: return Standard_False;
|
default: return Standard_False;
|
||||||
}
|
}
|
||||||
return Standard_True;
|
return Standard_True;
|
||||||
@@ -10497,20 +10473,6 @@ void RWStepAP214_ReadWriteModule::ReadStep(const Standard_Integer CN,
|
|||||||
tool.ReadStep(data, num, ach, anent);
|
tool.ReadStep(data, num, ach, anent);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 802:
|
|
||||||
{
|
|
||||||
DeclareAndCast(StepVisual_RepositionedTessellatedGeometricSet, anEnt, ent);
|
|
||||||
RWStepVisual_RWRepositionedTessellatedGeometricSet aTool;
|
|
||||||
aTool.ReadStep(data, num, ach, anEnt);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 803:
|
|
||||||
{
|
|
||||||
DeclareAndCast(StepVisual_RepositionedTessellatedItem, anEnt, ent);
|
|
||||||
RWStepVisual_RWRepositionedTessellatedItem aTool;
|
|
||||||
aTool.ReadStep(data, num, ach, anEnt);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
ach->AddFail("Type Mismatch when reading - Entity");
|
ach->AddFail("Type Mismatch when reading - Entity");
|
||||||
@@ -15934,20 +15896,7 @@ void RWStepAP214_ReadWriteModule::WriteStep(const Standard_Integer CN,
|
|||||||
tool.WriteStep(SW, anent);
|
tool.WriteStep(SW, anent);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 802:
|
|
||||||
{
|
|
||||||
DeclareAndCast(StepVisual_RepositionedTessellatedGeometricSet, anEnt, ent);
|
|
||||||
RWStepVisual_RWRepositionedTessellatedGeometricSet aTool;
|
|
||||||
aTool.WriteStep(SW, anEnt);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 803:
|
|
||||||
{
|
|
||||||
DeclareAndCast(StepVisual_RepositionedTessellatedItem, anEnt, ent);
|
|
||||||
RWStepVisual_RWRepositionedTessellatedItem aTool;
|
|
||||||
aTool.WriteStep(SW, anEnt);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default:
|
default:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@@ -106,10 +106,6 @@ RWStepVisual_RWPresentationView.cxx
|
|||||||
RWStepVisual_RWPresentationView.hxx
|
RWStepVisual_RWPresentationView.hxx
|
||||||
RWStepVisual_RWPresentedItemRepresentation.cxx
|
RWStepVisual_RWPresentedItemRepresentation.cxx
|
||||||
RWStepVisual_RWPresentedItemRepresentation.hxx
|
RWStepVisual_RWPresentedItemRepresentation.hxx
|
||||||
RWStepVisual_RWRepositionedTessellatedGeometricSet.cxx
|
|
||||||
RWStepVisual_RWRepositionedTessellatedGeometricSet.hxx
|
|
||||||
RWStepVisual_RWRepositionedTessellatedItem.cxx
|
|
||||||
RWStepVisual_RWRepositionedTessellatedItem.hxx
|
|
||||||
RWStepVisual_RWStyledItem.cxx
|
RWStepVisual_RWStyledItem.cxx
|
||||||
RWStepVisual_RWStyledItem.hxx
|
RWStepVisual_RWStyledItem.hxx
|
||||||
RWStepVisual_RWSurfaceSideStyle.cxx
|
RWStepVisual_RWSurfaceSideStyle.cxx
|
||||||
|
@@ -1,99 +0,0 @@
|
|||||||
// Copyright (c) 2022 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 <RWStepVisual_RWRepositionedTessellatedGeometricSet.hxx>
|
|
||||||
|
|
||||||
#include <Interface_Check.hxx>
|
|
||||||
#include <Interface_EntityIterator.hxx>
|
|
||||||
#include <StepData_StepReaderData.hxx>
|
|
||||||
#include <StepData_StepWriter.hxx>
|
|
||||||
#include <StepRepr_RepresentationItem.hxx>
|
|
||||||
#include <StepVisual_HArray1OfPresentationStyleAssignment.hxx>
|
|
||||||
#include <StepVisual_PresentationStyleAssignment.hxx>
|
|
||||||
#include <StepVisual_RepositionedTessellatedGeometricSet.hxx>
|
|
||||||
#include <StepGeom_Axis2Placement3d.hxx>
|
|
||||||
|
|
||||||
//=======================================================================
|
|
||||||
//function : ReadStep
|
|
||||||
//purpose :
|
|
||||||
//=======================================================================
|
|
||||||
void RWStepVisual_RWRepositionedTessellatedGeometricSet::ReadStep
|
|
||||||
(const Handle(StepData_StepReaderData)& theData,
|
|
||||||
const Standard_Integer theNum,
|
|
||||||
Handle(Interface_Check)& theAch,
|
|
||||||
const Handle(StepVisual_RepositionedTessellatedGeometricSet)& theEnt) const
|
|
||||||
{
|
|
||||||
Standard_Integer aNum = 0;
|
|
||||||
theData->NamedForComplex("REPOSITIONED_TESSELLATED_ITEM", theNum, aNum, theAch);
|
|
||||||
if (!theData->CheckNbParams(aNum, 1, theAch, "location"))
|
|
||||||
return;
|
|
||||||
Handle(StepGeom_Axis2Placement3d) aLocation;
|
|
||||||
theData->ReadEntity(aNum,1,"location",theAch,STANDARD_TYPE(StepGeom_Axis2Placement3d), aLocation);
|
|
||||||
|
|
||||||
theData->NamedForComplex("REPRESENTATION_ITEM", theNum, aNum, theAch);
|
|
||||||
if (!theData->CheckNbParams(aNum, 1, theAch, "name"))
|
|
||||||
return;
|
|
||||||
Handle(TCollection_HAsciiString) aName;
|
|
||||||
theData->ReadString (aNum, 1, "name", theAch, aName);
|
|
||||||
|
|
||||||
theData->NamedForComplex("TESSELLATED_GEOMETRIC_SET", theNum, aNum, theAch);
|
|
||||||
NCollection_Handle<StepVisual_Array1OfTessellatedItem> anItems;
|
|
||||||
Standard_Integer aNSub2;
|
|
||||||
if (theData->ReadSubList (aNum,1,"items",theAch,aNSub2)) {
|
|
||||||
Standard_Integer aNb2 = theData->NbParams(aNSub2);
|
|
||||||
anItems = new StepVisual_Array1OfTessellatedItem(1, aNb2);
|
|
||||||
for (Standard_Integer i2 = 1; i2 <= aNb2; i2 ++) {
|
|
||||||
Handle(StepVisual_TessellatedItem) anItem;
|
|
||||||
if (theData->ReadEntity (aNSub2,i2,"item",theAch,STANDARD_TYPE(StepVisual_TessellatedItem), anItem))
|
|
||||||
anItems->SetValue(i2,anItem);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
theEnt->Init(aName, anItems, aLocation);
|
|
||||||
}
|
|
||||||
|
|
||||||
//=======================================================================
|
|
||||||
//function : WriteStep
|
|
||||||
//purpose :
|
|
||||||
//=======================================================================
|
|
||||||
void RWStepVisual_RWRepositionedTessellatedGeometricSet::WriteStep
|
|
||||||
(StepData_StepWriter& theSW,
|
|
||||||
const Handle(StepVisual_RepositionedTessellatedGeometricSet)& theEnt) const
|
|
||||||
{
|
|
||||||
theSW.StartEntity("GEOMETRIC_REPRESENTATION_ITEM");
|
|
||||||
theSW.StartEntity("REPOSITIONED_TESSELLATED_ITEM");
|
|
||||||
theSW.Send(theEnt->Location());
|
|
||||||
theSW.StartEntity("REPRESENTATION_ITEM");
|
|
||||||
theSW.Send(theEnt->Name());
|
|
||||||
theSW.StartEntity("TESSELLATED_GEOMETRIC_SET");
|
|
||||||
theSW.OpenSub();
|
|
||||||
for(StepVisual_Array1OfTessellatedItem::Iterator anIter(*theEnt->Items());
|
|
||||||
anIter.More(); anIter.Next())
|
|
||||||
{
|
|
||||||
theSW.Send(anIter.Value());
|
|
||||||
}
|
|
||||||
theSW.CloseSub();
|
|
||||||
theSW.StartEntity("TESSELLATED_ITEM");
|
|
||||||
}
|
|
||||||
|
|
||||||
//=======================================================================
|
|
||||||
//function : Share
|
|
||||||
//purpose :
|
|
||||||
//=======================================================================
|
|
||||||
void RWStepVisual_RWRepositionedTessellatedGeometricSet::Share(const Handle(StepVisual_RepositionedTessellatedGeometricSet)& theEnt,
|
|
||||||
Interface_EntityIterator& theIter) const
|
|
||||||
{
|
|
||||||
// Own field : children
|
|
||||||
for (Standard_Integer i = 1; i <= theEnt->Items()->Length(); i++)
|
|
||||||
theIter.AddItem(theEnt->Items()->Value(i));
|
|
||||||
theIter.AddItem(theEnt->Location());
|
|
||||||
}
|
|
@@ -1,50 +0,0 @@
|
|||||||
// Copyright (c) 2022 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.
|
|
||||||
|
|
||||||
#ifndef _RWStepVisual_RWRepositionedTessellatedGeometricSet_HeaderFile
|
|
||||||
#define _RWStepVisual_RWRepositionedTessellatedGeometricSet_HeaderFile
|
|
||||||
|
|
||||||
#include <Standard_DefineAlloc.hxx>
|
|
||||||
#include <Standard_Handle.hxx>
|
|
||||||
|
|
||||||
class StepData_StepReaderData;
|
|
||||||
class Interface_Check;
|
|
||||||
class StepVisual_RepositionedTessellatedGeometricSet;
|
|
||||||
class StepData_StepWriter;
|
|
||||||
class Interface_EntityIterator;
|
|
||||||
|
|
||||||
//! Read & Write tool for complex RepositionedTessellatedGeometricSet
|
|
||||||
class RWStepVisual_RWRepositionedTessellatedGeometricSet
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
DEFINE_STANDARD_ALLOC
|
|
||||||
|
|
||||||
//! Empty constructor
|
|
||||||
RWStepVisual_RWRepositionedTessellatedGeometricSet() {};
|
|
||||||
|
|
||||||
//! Reads RepositionedTessellatedGeometricSet
|
|
||||||
Standard_EXPORT void ReadStep (const Handle(StepData_StepReaderData)& theData,
|
|
||||||
const Standard_Integer theNum,
|
|
||||||
Handle(Interface_Check)& theAch,
|
|
||||||
const Handle(StepVisual_RepositionedTessellatedGeometricSet)& theEnt) const;
|
|
||||||
|
|
||||||
//! Writes RepositionedTessellatedGeometricSet
|
|
||||||
Standard_EXPORT void WriteStep (StepData_StepWriter& theSW,
|
|
||||||
const Handle(StepVisual_RepositionedTessellatedGeometricSet)& theEnt) const;
|
|
||||||
|
|
||||||
//! Fills data for graph (shared items)
|
|
||||||
Standard_EXPORT void Share (const Handle(StepVisual_RepositionedTessellatedGeometricSet)& theEnt,
|
|
||||||
Interface_EntityIterator& theIter) const;
|
|
||||||
};
|
|
||||||
#endif // _RWStepVisual_RWRepositionedTessellatedGeometricSet_HeaderFile
|
|
@@ -1,58 +0,0 @@
|
|||||||
// Copyright (c) 2022 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 <RWStepVisual_RWRepositionedTessellatedItem.hxx>
|
|
||||||
|
|
||||||
#include <Interface_Check.hxx>
|
|
||||||
#include <StepData_StepReaderData.hxx>
|
|
||||||
#include <StepData_StepWriter.hxx>
|
|
||||||
#include <StepVisual_RepositionedTessellatedItem.hxx>
|
|
||||||
#include <StepGeom_Axis2Placement3d.hxx>
|
|
||||||
|
|
||||||
//=======================================================================
|
|
||||||
//function : ReadStep
|
|
||||||
//purpose :
|
|
||||||
//=======================================================================
|
|
||||||
void RWStepVisual_RWRepositionedTessellatedItem::ReadStep
|
|
||||||
(const Handle(StepData_StepReaderData)& theData,
|
|
||||||
const Standard_Integer theNum,
|
|
||||||
Handle(Interface_Check)& theAch,
|
|
||||||
const Handle(StepVisual_RepositionedTessellatedItem)& theEnt) const
|
|
||||||
{
|
|
||||||
// --- Number of Parameter Control ---
|
|
||||||
if (!theData->CheckNbParams(theNum,2,theAch,"tessellated_item"))
|
|
||||||
return;
|
|
||||||
|
|
||||||
// --- inherited field : name ---
|
|
||||||
Handle(TCollection_HAsciiString) aName;
|
|
||||||
theData->ReadString (theNum,1,"name",theAch,aName);
|
|
||||||
// --- inherited field : location ---
|
|
||||||
Handle(StepGeom_Axis2Placement3d) aLocation;
|
|
||||||
theData->ReadEntity(theNum,2,"location", theAch, STANDARD_TYPE(StepGeom_Axis2Placement3d),aLocation);
|
|
||||||
|
|
||||||
//--- Initialisation of the read entity ---
|
|
||||||
theEnt->Init(aName, aLocation);
|
|
||||||
}
|
|
||||||
|
|
||||||
//=======================================================================
|
|
||||||
//function : WriteStep
|
|
||||||
//purpose :
|
|
||||||
//=======================================================================
|
|
||||||
void RWStepVisual_RWRepositionedTessellatedItem::WriteStep
|
|
||||||
(StepData_StepWriter& theSW,
|
|
||||||
const Handle(StepVisual_RepositionedTessellatedItem)& theEnt) const
|
|
||||||
{
|
|
||||||
// --- inherited field name ---
|
|
||||||
theSW.Send(theEnt->Name());
|
|
||||||
theSW.Send(theEnt->Location());
|
|
||||||
}
|
|
@@ -1,46 +0,0 @@
|
|||||||
// Copyright (c) 2022 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.
|
|
||||||
|
|
||||||
#ifndef _RWStepVisual_RWRepositionedTessellatedItem_HeaderFile
|
|
||||||
#define _RWStepVisual_RWRepositionedTessellatedItem_HeaderFile
|
|
||||||
|
|
||||||
#include <Standard.hxx>
|
|
||||||
#include <Standard_DefineAlloc.hxx>
|
|
||||||
#include <Standard_Handle.hxx>
|
|
||||||
|
|
||||||
class StepData_StepReaderData;
|
|
||||||
class Interface_Check;
|
|
||||||
class StepVisual_RepositionedTessellatedItem;
|
|
||||||
class StepData_StepWriter;
|
|
||||||
|
|
||||||
//! Read & Write tool for RepositionedTessellatedItem
|
|
||||||
class RWStepVisual_RWRepositionedTessellatedItem
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
DEFINE_STANDARD_ALLOC
|
|
||||||
|
|
||||||
//! Empty constructor
|
|
||||||
RWStepVisual_RWRepositionedTessellatedItem() {};
|
|
||||||
|
|
||||||
//! Reads RepositionedTessellatedItem
|
|
||||||
Standard_EXPORT void ReadStep (const Handle(StepData_StepReaderData)& theData,
|
|
||||||
const Standard_Integer theNum,
|
|
||||||
Handle(Interface_Check)& theAch,
|
|
||||||
const Handle(StepVisual_RepositionedTessellatedItem)& theEnt) const;
|
|
||||||
|
|
||||||
//! Writes RepositionedTessellatedItem
|
|
||||||
Standard_EXPORT void WriteStep (StepData_StepWriter& theSW,
|
|
||||||
const Handle(StepVisual_RepositionedTessellatedItem)& theEnt) const;
|
|
||||||
};
|
|
||||||
#endif // _RWStepVisual_RWRepositionedTessellatedItem_HeaderFile
|
|
@@ -204,7 +204,6 @@
|
|||||||
#include <StepVisual_PlanarBox.hxx>
|
#include <StepVisual_PlanarBox.hxx>
|
||||||
#include <StepVisual_PresentationLayerAssignment.hxx>
|
#include <StepVisual_PresentationLayerAssignment.hxx>
|
||||||
#include <StepVisual_PresentationStyleByContext.hxx>
|
#include <StepVisual_PresentationStyleByContext.hxx>
|
||||||
#include <StepVisual_RepositionedTessellatedGeometricSet.hxx>
|
|
||||||
#include <StepVisual_StyleContextSelect.hxx>
|
#include <StepVisual_StyleContextSelect.hxx>
|
||||||
#include <StepVisual_StyledItem.hxx>
|
#include <StepVisual_StyledItem.hxx>
|
||||||
#include <StepVisual_ViewVolume.hxx>
|
#include <StepVisual_ViewVolume.hxx>
|
||||||
@@ -1869,25 +1868,6 @@ Standard_Boolean readPMIPresentation(const Handle(Standard_Transient)& thePresen
|
|||||||
Handle(StepVisual_TessellatedGeometricSet) aTessSet = Handle(StepVisual_TessellatedGeometricSet)::DownCast(aTessItem);
|
Handle(StepVisual_TessellatedGeometricSet) aTessSet = Handle(StepVisual_TessellatedGeometricSet)::DownCast(aTessItem);
|
||||||
if (aTessSet.IsNull())
|
if (aTessSet.IsNull())
|
||||||
continue;
|
continue;
|
||||||
gp_Trsf aTransf;
|
|
||||||
if (aTessSet->IsKind(STANDARD_TYPE(StepVisual_RepositionedTessellatedGeometricSet)))
|
|
||||||
{
|
|
||||||
Handle(StepVisual_RepositionedTessellatedGeometricSet) aRTGS =
|
|
||||||
Handle(StepVisual_RepositionedTessellatedGeometricSet)::DownCast(aTessSet);
|
|
||||||
Handle(Geom_Axis2Placement) aLocation = StepToGeom::MakeAxis2Placement(aRTGS->Location());
|
|
||||||
if (!aLocation.IsNull())
|
|
||||||
{
|
|
||||||
const gp_Ax3 anAx3Orig = gp::XOY();
|
|
||||||
const gp_Ax3 anAx3Targ(aLocation->Ax2());
|
|
||||||
if (anAx3Targ.Location().SquareDistance(anAx3Orig.Location()) >= Precision::SquareConfusion() ||
|
|
||||||
!anAx3Targ.Direction().IsEqual(anAx3Orig.Direction(), Precision::Angular()) ||
|
|
||||||
!anAx3Targ.XDirection().IsEqual(anAx3Orig.XDirection(), Precision::Angular()) ||
|
|
||||||
!anAx3Targ.YDirection().IsEqual(anAx3Orig.YDirection(), Precision::Angular()))
|
|
||||||
{
|
|
||||||
aTransf.SetTransformation(anAx3Targ, anAx3Orig);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
NCollection_Handle<StepVisual_Array1OfTessellatedItem> aListItems = aTessSet->Items();
|
NCollection_Handle<StepVisual_Array1OfTessellatedItem> aListItems = aTessSet->Items();
|
||||||
Standard_Integer nb = aListItems.IsNull() ? 0 : aListItems->Length();
|
Standard_Integer nb = aListItems.IsNull() ? 0 : aListItems->Length();
|
||||||
Handle(StepVisual_TessellatedCurveSet) aTessCurve;
|
Handle(StepVisual_TessellatedCurveSet) aTessCurve;
|
||||||
@@ -1933,7 +1913,7 @@ Standard_Boolean readPMIPresentation(const Handle(Standard_Transient)& thePresen
|
|||||||
}
|
}
|
||||||
aB.Add(aComp, aCurW);
|
aB.Add(aComp, aCurW);
|
||||||
}
|
}
|
||||||
anAnnotationShape = aComp.Moved(aTransf);
|
anAnnotationShape = aComp;
|
||||||
}
|
}
|
||||||
if (!anAnnotationShape.IsNull())
|
if (!anAnnotationShape.IsNull())
|
||||||
{
|
{
|
||||||
|
@@ -155,22 +155,13 @@ public:
|
|||||||
DEFINE_STANDARD_ALLOC
|
DEFINE_STANDARD_ALLOC
|
||||||
|
|
||||||
//! Registers this callback object in the current error handler (if found).
|
//! Registers this callback object in the current error handler (if found).
|
||||||
#if defined(OCC_CONVERT_SIGNALS)
|
void RegisterCallback();
|
||||||
Standard_EXPORT
|
|
||||||
#endif
|
|
||||||
void RegisterCallback();
|
|
||||||
|
|
||||||
//! Unregisters this callback object from the error handler.
|
//! Unregisters this callback object from the error handler.
|
||||||
#if defined(OCC_CONVERT_SIGNALS)
|
void UnregisterCallback();
|
||||||
Standard_EXPORT
|
|
||||||
#endif
|
|
||||||
void UnregisterCallback();
|
|
||||||
|
|
||||||
//! Destructor
|
//! Destructor
|
||||||
#if defined(OCC_CONVERT_SIGNALS)
|
virtual ~Callback();
|
||||||
Standard_EXPORT
|
|
||||||
#endif
|
|
||||||
virtual ~Callback();
|
|
||||||
|
|
||||||
//! The callback function to perform necessary callback action.
|
//! The callback function to perform necessary callback action.
|
||||||
//! Called by the exception handler when it is being destroyed but
|
//! Called by the exception handler when it is being destroyed but
|
||||||
@@ -180,10 +171,7 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
|
|
||||||
//! Empty constructor
|
//! Empty constructor
|
||||||
#if defined(OCC_CONVERT_SIGNALS)
|
Callback();
|
||||||
Standard_EXPORT
|
|
||||||
#endif
|
|
||||||
Callback();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Standard_Address myHandler;
|
Standard_Address myHandler;
|
||||||
|
@@ -738,8 +738,6 @@ static Standard_CString schemaAP242DIS = "AP242_MANAGED_MODEL_BASED_3D_ENGINEERI
|
|||||||
#include <StepVisual_TessellatedItem.hxx>
|
#include <StepVisual_TessellatedItem.hxx>
|
||||||
#include <StepVisual_TessellatedGeometricSet.hxx>
|
#include <StepVisual_TessellatedGeometricSet.hxx>
|
||||||
#include <StepVisual_TessellatedCurveSet.hxx>
|
#include <StepVisual_TessellatedCurveSet.hxx>
|
||||||
#include <StepVisual_RepositionedTessellatedGeometricSet.hxx>
|
|
||||||
#include <StepVisual_RepositionedTessellatedItem.hxx>
|
|
||||||
#include <StepVisual_CoordinatesList.hxx>
|
#include <StepVisual_CoordinatesList.hxx>
|
||||||
#include <StepRepr_CharacterizedRepresentation.hxx>
|
#include <StepRepr_CharacterizedRepresentation.hxx>
|
||||||
#include <StepRepr_ConstructiveGeometryRepresentation.hxx>
|
#include <StepRepr_ConstructiveGeometryRepresentation.hxx>
|
||||||
@@ -1628,8 +1626,6 @@ StepAP214_Protocol::StepAP214_Protocol ()
|
|||||||
types.Bind(STANDARD_TYPE(StepKinematics_LinearFlexibleLinkRepresentation), 798);
|
types.Bind(STANDARD_TYPE(StepKinematics_LinearFlexibleLinkRepresentation), 798);
|
||||||
types.Bind(STANDARD_TYPE(StepKinematics_ActuatedKinPairAndOrderKinPair), 800);
|
types.Bind(STANDARD_TYPE(StepKinematics_ActuatedKinPairAndOrderKinPair), 800);
|
||||||
types.Bind(STANDARD_TYPE(StepKinematics_MechanismStateRepresentation), 801);
|
types.Bind(STANDARD_TYPE(StepKinematics_MechanismStateRepresentation), 801);
|
||||||
types.Bind(STANDARD_TYPE(StepVisual_RepositionedTessellatedGeometricSet), 802);
|
|
||||||
types.Bind(STANDARD_TYPE(StepVisual_RepositionedTessellatedItem), 803);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -197,10 +197,6 @@ StepVisual_PresentedItemRepresentation.cxx
|
|||||||
StepVisual_PresentedItemRepresentation.hxx
|
StepVisual_PresentedItemRepresentation.hxx
|
||||||
StepVisual_RenderingPropertiesSelect.cxx
|
StepVisual_RenderingPropertiesSelect.cxx
|
||||||
StepVisual_RenderingPropertiesSelect.hxx
|
StepVisual_RenderingPropertiesSelect.hxx
|
||||||
StepVisual_RepositionedTessellatedGeometricSet.hxx
|
|
||||||
StepVisual_RepositionedTessellatedGeometricSet.cxx
|
|
||||||
StepVisual_RepositionedTessellatedItem.hxx
|
|
||||||
StepVisual_RepositionedTessellatedItem.cxx
|
|
||||||
StepVisual_ShadingSurfaceMethod.hxx
|
StepVisual_ShadingSurfaceMethod.hxx
|
||||||
StepVisual_StyleContextSelect.cxx
|
StepVisual_StyleContextSelect.cxx
|
||||||
StepVisual_StyleContextSelect.hxx
|
StepVisual_StyleContextSelect.hxx
|
||||||
|
@@ -1,30 +0,0 @@
|
|||||||
// Copyright (c) 2022 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 <StepVisual_RepositionedTessellatedGeometricSet.hxx>
|
|
||||||
|
|
||||||
#include <StepGeom_Axis2Placement3d.hxx>
|
|
||||||
|
|
||||||
IMPLEMENT_STANDARD_RTTIEXT(StepVisual_RepositionedTessellatedGeometricSet, StepVisual_TessellatedGeometricSet)
|
|
||||||
|
|
||||||
//=======================================================================
|
|
||||||
//function : Init
|
|
||||||
//purpose :
|
|
||||||
//=======================================================================
|
|
||||||
void StepVisual_RepositionedTessellatedGeometricSet::Init(const Handle(TCollection_HAsciiString)& theName,
|
|
||||||
const NCollection_Handle<StepVisual_Array1OfTessellatedItem>& theItems,
|
|
||||||
const Handle(StepGeom_Axis2Placement3d)& theLocation)
|
|
||||||
{
|
|
||||||
StepVisual_TessellatedGeometricSet::Init(theName, theItems);
|
|
||||||
myLocation = theLocation;
|
|
||||||
}
|
|
@@ -1,50 +0,0 @@
|
|||||||
// Copyright (c) 2022 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.
|
|
||||||
|
|
||||||
#ifndef _StepVisual_RepositionedTessellatedGeometricSet_HeaderFile
|
|
||||||
#define _StepVisual_RepositionedTessellatedGeometricSet_HeaderFile
|
|
||||||
|
|
||||||
#include <StepVisual_TessellatedGeometricSet.hxx>
|
|
||||||
|
|
||||||
class StepGeom_Axis2Placement3d;
|
|
||||||
|
|
||||||
DEFINE_STANDARD_HANDLE(StepVisual_RepositionedTessellatedGeometricSet, StepVisual_TessellatedGeometricSet)
|
|
||||||
|
|
||||||
//! Representation of complex STEP entity RepositionedTessellatedGeometricSet
|
|
||||||
class StepVisual_RepositionedTessellatedGeometricSet : public StepVisual_TessellatedGeometricSet
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
DEFINE_STANDARD_ALLOC
|
|
||||||
|
|
||||||
DEFINE_STANDARD_RTTIEXT(StepVisual_RepositionedTessellatedGeometricSet, StepVisual_TessellatedGeometricSet)
|
|
||||||
|
|
||||||
//! Default constructor
|
|
||||||
StepVisual_RepositionedTessellatedGeometricSet() {};
|
|
||||||
|
|
||||||
//! Initialize all fields (own and inherited)
|
|
||||||
Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theName,
|
|
||||||
const NCollection_Handle<StepVisual_Array1OfTessellatedItem>& theItems,
|
|
||||||
const Handle(StepGeom_Axis2Placement3d)& theLocation);
|
|
||||||
|
|
||||||
//! Returns location
|
|
||||||
Handle(StepGeom_Axis2Placement3d) Location() const { return myLocation; }
|
|
||||||
|
|
||||||
//! Sets location
|
|
||||||
void SetLocation(const Handle(StepGeom_Axis2Placement3d)& theLocation) { myLocation = theLocation; }
|
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
Handle(StepGeom_Axis2Placement3d) myLocation;
|
|
||||||
};
|
|
||||||
#endif // StepVisual_RepositionedTessellatedGeometricSet_HeaderFile
|
|
@@ -1,29 +0,0 @@
|
|||||||
// Copyright (c) 2022 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 <StepVisual_RepositionedTessellatedItem.hxx>
|
|
||||||
|
|
||||||
#include <StepGeom_Axis2Placement3d.hxx>
|
|
||||||
|
|
||||||
IMPLEMENT_STANDARD_RTTIEXT(StepVisual_RepositionedTessellatedItem, StepVisual_TessellatedItem)
|
|
||||||
|
|
||||||
//=======================================================================
|
|
||||||
//function : Init
|
|
||||||
//purpose :
|
|
||||||
//=======================================================================
|
|
||||||
void StepVisual_RepositionedTessellatedItem::Init(const Handle(TCollection_HAsciiString)& theName,
|
|
||||||
const Handle(StepGeom_Axis2Placement3d)& theLocation)
|
|
||||||
{
|
|
||||||
StepVisual_TessellatedItem::Init(theName);
|
|
||||||
myLocation = theLocation;
|
|
||||||
}
|
|
@@ -1,49 +0,0 @@
|
|||||||
// Copyright (c) 2022 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.
|
|
||||||
|
|
||||||
#ifndef _StepVisual_RepositionedTessellatedItem_HeaderFile
|
|
||||||
#define _StepVisual_RepositionedTessellatedItem_HeaderFile
|
|
||||||
|
|
||||||
#include <StepVisual_TessellatedItem.hxx>
|
|
||||||
|
|
||||||
class StepGeom_Axis2Placement3d;
|
|
||||||
|
|
||||||
DEFINE_STANDARD_HANDLE(StepVisual_RepositionedTessellatedItem, StepVisual_TessellatedItem)
|
|
||||||
|
|
||||||
//! Representation of STEP entity RepositionedTessellatedItem
|
|
||||||
class StepVisual_RepositionedTessellatedItem : public StepVisual_TessellatedItem
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
DEFINE_STANDARD_RTTIEXT(StepVisual_RepositionedTessellatedItem, StepVisual_TessellatedItem)
|
|
||||||
|
|
||||||
DEFINE_STANDARD_ALLOC
|
|
||||||
|
|
||||||
//! Default constructor
|
|
||||||
StepVisual_RepositionedTessellatedItem() {};
|
|
||||||
|
|
||||||
//! Initialize all fields (own and inherited)
|
|
||||||
Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theName,
|
|
||||||
const Handle(StepGeom_Axis2Placement3d)& theLocation);
|
|
||||||
|
|
||||||
//! Returns location
|
|
||||||
Handle(StepGeom_Axis2Placement3d) Location() const { return myLocation; }
|
|
||||||
|
|
||||||
//! Sets location
|
|
||||||
void SetLocation(const Handle(StepGeom_Axis2Placement3d)& theLocation) { myLocation = theLocation; }
|
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
Handle(StepGeom_Axis2Placement3d) myLocation;
|
|
||||||
};
|
|
||||||
#endif // StepVisual_RepositionedTessellatedItem_HeaderFile
|
|
@@ -13,4 +13,3 @@ TKGeomAlgo
|
|||||||
TKV3d
|
TKV3d
|
||||||
TKLCAF
|
TKLCAF
|
||||||
TKXCAF
|
TKXCAF
|
||||||
TKRWMesh
|
|
||||||
|
@@ -240,6 +240,8 @@ Standard_Real Units::ToSI(const Standard_Real aData,
|
|||||||
Handle(Units_Dimensions) &dim)
|
Handle(Units_Dimensions) &dim)
|
||||||
{
|
{
|
||||||
if(lastunit != aUnit ) {
|
if(lastunit != aUnit ) {
|
||||||
|
|
||||||
|
lastunit = TCollection_AsciiString(aUnit);
|
||||||
Units_UnitSentence unitsentence(aUnit);
|
Units_UnitSentence unitsentence(aUnit);
|
||||||
if(!unitsentence.IsDone()) {
|
if(!unitsentence.IsDone()) {
|
||||||
#ifdef OCCT_DEBUG
|
#ifdef OCCT_DEBUG
|
||||||
@@ -255,7 +257,6 @@ Standard_Real Units::ToSI(const Standard_Real aData,
|
|||||||
Handle(Units_ShiftedToken)::DownCast(token) ;
|
Handle(Units_ShiftedToken)::DownCast(token) ;
|
||||||
lastmove = stoken->Move();
|
lastmove = stoken->Move();
|
||||||
}
|
}
|
||||||
lastunit = TCollection_AsciiString(aUnit);
|
|
||||||
lastdimension = token->Dimensions();
|
lastdimension = token->Dimensions();
|
||||||
}
|
}
|
||||||
dim = lastdimension;
|
dim = lastdimension;
|
||||||
@@ -285,6 +286,7 @@ Standard_Real Units::FromSI(const Standard_Real aData,
|
|||||||
Handle(Units_Dimensions) &dim)
|
Handle(Units_Dimensions) &dim)
|
||||||
{
|
{
|
||||||
if(lastunit != aUnit) {
|
if(lastunit != aUnit) {
|
||||||
|
lastunit = TCollection_AsciiString(aUnit);
|
||||||
Units_UnitSentence unitsentence(aUnit);
|
Units_UnitSentence unitsentence(aUnit);
|
||||||
if(!unitsentence.IsDone()) {
|
if(!unitsentence.IsDone()) {
|
||||||
#ifdef OCCT_DEBUG
|
#ifdef OCCT_DEBUG
|
||||||
@@ -300,7 +302,6 @@ Standard_Real Units::FromSI(const Standard_Real aData,
|
|||||||
Handle(Units_ShiftedToken)::DownCast(token) ;
|
Handle(Units_ShiftedToken)::DownCast(token) ;
|
||||||
lastmove = stoken->Move();
|
lastmove = stoken->Move();
|
||||||
}
|
}
|
||||||
lastunit = TCollection_AsciiString(aUnit);
|
|
||||||
lastdimension = token->Dimensions();
|
lastdimension = token->Dimensions();
|
||||||
}
|
}
|
||||||
dim = lastdimension;
|
dim = lastdimension;
|
||||||
|
@@ -14,21 +14,15 @@
|
|||||||
// commercial license or contractual agreement.
|
// commercial license or contractual agreement.
|
||||||
|
|
||||||
#include <VrmlData_ShapeConvert.hxx>
|
#include <VrmlData_ShapeConvert.hxx>
|
||||||
|
#include <VrmlData_Scene.hxx>
|
||||||
#include <VrmlData_Appearance.hxx>
|
|
||||||
#include <VrmlData_Coordinate.hxx>
|
|
||||||
#include <VrmlData_Group.hxx>
|
#include <VrmlData_Group.hxx>
|
||||||
|
#include <VrmlData_Coordinate.hxx>
|
||||||
#include <VrmlData_IndexedFaceSet.hxx>
|
#include <VrmlData_IndexedFaceSet.hxx>
|
||||||
#include <VrmlData_IndexedLineSet.hxx>
|
#include <VrmlData_IndexedLineSet.hxx>
|
||||||
#include <VrmlData_Scene.hxx>
|
|
||||||
#include <VrmlData_ShapeNode.hxx>
|
#include <VrmlData_ShapeNode.hxx>
|
||||||
|
|
||||||
#include <BRep_Builder.hxx>
|
#include <BRep_Builder.hxx>
|
||||||
#include <BRep_Tool.hxx>
|
#include <BRep_Tool.hxx>
|
||||||
#include <BRepAdaptor_Curve.hxx>
|
|
||||||
#include <Geom_Surface.hxx>
|
#include <Geom_Surface.hxx>
|
||||||
#include <GeomLib.hxx>
|
|
||||||
#include <GCPnts_TangentialDeflection.hxx>
|
|
||||||
#include <NCollection_DataMap.hxx>
|
#include <NCollection_DataMap.hxx>
|
||||||
#include <Poly_Triangulation.hxx>
|
#include <Poly_Triangulation.hxx>
|
||||||
#include <Poly_Connect.hxx>
|
#include <Poly_Connect.hxx>
|
||||||
@@ -39,6 +33,7 @@
|
|||||||
#include <TColgp_Array1OfPnt2d.hxx>
|
#include <TColgp_Array1OfPnt2d.hxx>
|
||||||
#include <TDataStd_Name.hxx>
|
#include <TDataStd_Name.hxx>
|
||||||
#include <TDF_Label.hxx>
|
#include <TDF_Label.hxx>
|
||||||
|
//#include <TDF_LabelSequence.hxx>
|
||||||
#include <TDocStd_Document.hxx>
|
#include <TDocStd_Document.hxx>
|
||||||
#include <TopExp_Explorer.hxx>
|
#include <TopExp_Explorer.hxx>
|
||||||
#include <TopoDS.hxx>
|
#include <TopoDS.hxx>
|
||||||
@@ -46,11 +41,14 @@
|
|||||||
#include <TopoDS_Face.hxx>
|
#include <TopoDS_Face.hxx>
|
||||||
#include <TopoDS_Shape.hxx>
|
#include <TopoDS_Shape.hxx>
|
||||||
#include <TopoDS_Wire.hxx>
|
#include <TopoDS_Wire.hxx>
|
||||||
|
#include <GCPnts_TangentialDeflection.hxx>
|
||||||
|
#include <BRepAdaptor_Curve.hxx>
|
||||||
#include <TColStd_Array1OfReal.hxx>
|
#include <TColStd_Array1OfReal.hxx>
|
||||||
#include <TColStd_HArray1OfReal.hxx>
|
#include <TColStd_HArray1OfReal.hxx>
|
||||||
#include <TShort_Array1OfShortReal.hxx>
|
#include <TShort_Array1OfShortReal.hxx>
|
||||||
|
#include <GeomLib.hxx>
|
||||||
#include <TShort_HArray1OfShortReal.hxx>
|
#include <TShort_HArray1OfShortReal.hxx>
|
||||||
#include <RWMesh_FaceIterator.hxx>
|
#include <VrmlData_Appearance.hxx>
|
||||||
#include <XCAFDoc_ColorTool.hxx>
|
#include <XCAFDoc_ColorTool.hxx>
|
||||||
#include <XCAFDoc_DocumentTool.hxx>
|
#include <XCAFDoc_DocumentTool.hxx>
|
||||||
#include <XCAFDoc_ShapeTool.hxx>
|
#include <XCAFDoc_ShapeTool.hxx>
|
||||||
@@ -577,6 +575,7 @@ Handle(VrmlData_Appearance) VrmlData_ShapeConvert::defaultMaterialEdge () const
|
|||||||
return anAppearance;
|
return anAppearance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : addShape
|
//function : addShape
|
||||||
//purpose : Adds the shape from the document
|
//purpose : Adds the shape from the document
|
||||||
@@ -585,18 +584,33 @@ void VrmlData_ShapeConvert::addShape (const Handle(VrmlData_Group)& theParent,
|
|||||||
const TDF_Label& theLabel,
|
const TDF_Label& theLabel,
|
||||||
const Handle(TDocStd_Document)& theDoc)
|
const Handle(TDocStd_Document)& theDoc)
|
||||||
{
|
{
|
||||||
const TopoDS_Shape aShape = XCAFDoc_ShapeTool::GetShape(theLabel);
|
Handle(XCAFDoc_ShapeTool) aShapeTool = XCAFDoc_DocumentTool::ShapeTool(theDoc->Main());
|
||||||
Handle(XCAFDoc_ColorTool) aColorTool = XCAFDoc_DocumentTool::ColorTool(theDoc->Main());
|
Handle(XCAFDoc_ColorTool) aColorTool = XCAFDoc_DocumentTool::ColorTool(theDoc->Main());
|
||||||
Handle(VrmlData_Group) aGroup;
|
Handle(XCAFDoc_VisMaterialTool) aMatTool = XCAFDoc_DocumentTool::VisMaterialTool(theDoc->Main());
|
||||||
Standard_Integer aNbFaces = 0;
|
|
||||||
for (RWMesh_FaceIterator aFaceIter (theLabel, TopLoc_Location(), true); aFaceIter.More(); aFaceIter.Next())
|
NCollection_DataMap<TopoDS_Shape, TDF_Label> aChildShapeToLabels;
|
||||||
|
TDF_LabelSequence aChildLabels;
|
||||||
|
aShapeTool->GetSubShapes(theLabel, aChildLabels);
|
||||||
|
for (TDF_LabelSequence::Iterator aChildIter(aChildLabels); aChildIter.More(); aChildIter.Next())
|
||||||
{
|
{
|
||||||
++aNbFaces;
|
const TDF_Label& aChildLabel = aChildIter.Value();
|
||||||
|
TopoDS_Shape aChildShape;
|
||||||
|
if (aShapeTool->GetShape(aChildLabel, aChildShape))
|
||||||
|
{
|
||||||
|
aChildShapeToLabels.Bind(aChildShape, aChildLabel);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const TopoDS_Shape aShape = aShapeTool->GetShape(theLabel);
|
||||||
|
Handle(VrmlData_Group) aGroup = 0L;
|
||||||
|
TopExp_Explorer anExp(aShape, TopAbs_FACE);
|
||||||
|
Standard_Integer nbFaces = 0;
|
||||||
|
for (; anExp.More(); anExp.Next()) {
|
||||||
|
nbFaces++;
|
||||||
|
}
|
||||||
Handle(TDataStd_Name) aNameAttribute;
|
Handle(TDataStd_Name) aNameAttribute;
|
||||||
theLabel.FindAttribute(TDataStd_Name::GetID(), aNameAttribute);
|
theLabel.FindAttribute(TDataStd_Name::GetID(), aNameAttribute);
|
||||||
if (aNbFaces > 1)
|
if (nbFaces > 1)
|
||||||
{
|
{
|
||||||
if (!aNameAttribute.IsNull())
|
if (!aNameAttribute.IsNull())
|
||||||
{
|
{
|
||||||
@@ -616,88 +630,112 @@ void VrmlData_ShapeConvert::addShape (const Handle(VrmlData_Group)& theParent,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (RWMesh_FaceIterator aFaceIter (theLabel, TopLoc_Location(), true); aFaceIter.More(); aFaceIter.Next())
|
anExp.Init(aShape, TopAbs_FACE);
|
||||||
{
|
for (; anExp.More(); anExp.Next()) {
|
||||||
TopLoc_Location aLoc;
|
TopLoc_Location aLoc;
|
||||||
const TopoDS_Face& aFace = aFaceIter.Face();
|
Handle(VrmlData_Geometry) aTShapeNode =
|
||||||
Handle(VrmlData_Geometry) aTShapeNode = makeTShapeNode (aFace, TopAbs_FACE, aLoc);
|
makeTShapeNode(anExp.Current(), TopAbs_FACE, aLoc);
|
||||||
if (aTShapeNode.IsNull())
|
if (!aTShapeNode.IsNull())
|
||||||
{
|
{
|
||||||
continue;
|
Handle(VrmlData_ShapeNode) aShapeNode = 0L;
|
||||||
}
|
if (aGroup.IsNull() && !aNameAttribute.IsNull())
|
||||||
|
{
|
||||||
|
TCollection_AsciiString aName = aNameAttribute->Get();
|
||||||
|
aName.ChangeAll(' ', '_');
|
||||||
|
aName.ChangeAll('#', '_');
|
||||||
|
aShapeNode = new VrmlData_ShapeNode(myScene, aName.ToCString());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
aShapeNode = new VrmlData_ShapeNode(myScene, 0L);
|
||||||
|
}
|
||||||
|
|
||||||
Handle(VrmlData_ShapeNode) aShapeNode = 0L;
|
// set color
|
||||||
if (aGroup.IsNull() && !aNameAttribute.IsNull())
|
XCAFPrs_Style aStyle;
|
||||||
{
|
Quantity_ColorRGBA aColor;
|
||||||
TCollection_AsciiString aName = aNameAttribute->Get();
|
TDF_Label aLabel, anAttribLab;
|
||||||
aName.ChangeAll(' ', '_');
|
if (aChildShapeToLabels.Find (anExp.Current(), aLabel))
|
||||||
aName.ChangeAll('#', '_');
|
{
|
||||||
aShapeNode = new VrmlData_ShapeNode(myScene, aName.ToCString());
|
Handle(XCAFDoc_VisMaterial) aVisMat = aMatTool->GetShapeMaterial (aLabel);
|
||||||
}
|
if (!aVisMat.IsNull()
|
||||||
else
|
&& !aVisMat->IsEmpty())
|
||||||
{
|
{
|
||||||
aShapeNode = new VrmlData_ShapeNode(myScene, 0L);
|
anAttribLab = aVisMat->Label();
|
||||||
}
|
aStyle.SetMaterial (aVisMat);
|
||||||
|
}
|
||||||
|
else if (aColorTool->GetColor (aLabel, XCAFDoc_ColorSurf, anAttribLab)
|
||||||
|
|| aColorTool->GetColor (aLabel, XCAFDoc_ColorGen, anAttribLab))
|
||||||
|
{
|
||||||
|
aColorTool->GetColor (anAttribLab, aColor);
|
||||||
|
aStyle.SetColorSurf (aColor);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!aStyle.IsSetColorSurf()
|
||||||
|
&& aStyle.Material().IsNull())
|
||||||
|
{
|
||||||
|
Handle(XCAFDoc_VisMaterial) aVisMat = aMatTool->GetShapeMaterial (theLabel);
|
||||||
|
if (!aVisMat.IsNull()
|
||||||
|
&& !aVisMat->IsEmpty())
|
||||||
|
{
|
||||||
|
anAttribLab = aVisMat->Label();
|
||||||
|
aStyle.SetMaterial (aVisMat);
|
||||||
|
}
|
||||||
|
if (aColorTool->GetColor (theLabel, XCAFDoc_ColorSurf, anAttribLab)
|
||||||
|
|| aColorTool->GetColor (theLabel, XCAFDoc_ColorGen, anAttribLab))
|
||||||
|
{
|
||||||
|
aColorTool->GetColor (anAttribLab, aColor);
|
||||||
|
aStyle.SetColorSurf (aColor);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!aStyle.IsSetColorSurf()
|
||||||
|
&& aStyle.Material().IsNull())
|
||||||
|
{
|
||||||
|
aShapeNode->SetAppearance(defaultMaterialFace());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
aShapeNode->SetAppearance (makeMaterialFromStyle (aStyle, anAttribLab));
|
||||||
|
}
|
||||||
|
|
||||||
// set color
|
myScene.AddNode(aShapeNode, theParent.IsNull() && aGroup.IsNull());
|
||||||
const XCAFPrs_Style& aStyle = aFaceIter.FaceStyle();
|
aShapeNode->SetGeometry(aTShapeNode);
|
||||||
TDF_Label anAttribLab;
|
if (aLoc.IsIdentity())
|
||||||
if (!aStyle.Material().IsNull()
|
|
||||||
&& !aStyle.Material()->IsEmpty())
|
|
||||||
{
|
|
||||||
anAttribLab = aStyle.Material()->Label();
|
|
||||||
}
|
|
||||||
else if (aStyle.IsSetColorSurf())
|
|
||||||
{
|
|
||||||
aColorTool->FindColor (aStyle.GetColorSurfRGBA(), anAttribLab);
|
|
||||||
}
|
|
||||||
if (!aStyle.IsSetColorSurf()
|
|
||||||
&& aStyle.Material().IsNull())
|
|
||||||
{
|
|
||||||
aShapeNode->SetAppearance (defaultMaterialFace());
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
aShapeNode->SetAppearance (makeMaterialFromStyle (aStyle, anAttribLab));
|
|
||||||
}
|
|
||||||
|
|
||||||
myScene.AddNode(aShapeNode, theParent.IsNull() && aGroup.IsNull());
|
|
||||||
aShapeNode->SetGeometry(aTShapeNode);
|
|
||||||
if (aLoc.IsIdentity())
|
|
||||||
{
|
|
||||||
// Store the shape node directly into the main Group.
|
|
||||||
if (!aGroup.IsNull())
|
|
||||||
{
|
{
|
||||||
aGroup->AddNode(aShapeNode);
|
// Store the shape node directly into the main Group.
|
||||||
|
if (!aGroup.IsNull())
|
||||||
|
{
|
||||||
|
aGroup->AddNode(aShapeNode);
|
||||||
|
}
|
||||||
|
else if (!theParent.IsNull())
|
||||||
|
{
|
||||||
|
theParent->AddNode(aShapeNode);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (!theParent.IsNull())
|
else
|
||||||
{
|
{
|
||||||
theParent->AddNode(aShapeNode);
|
// Create a Transform grouping node
|
||||||
|
Handle(VrmlData_Group) aTrans = new VrmlData_Group(myScene, 0L,
|
||||||
|
Standard_True);
|
||||||
|
gp_Trsf aTrsf(aLoc);
|
||||||
|
if (fabs(myScale - 1.) > Precision::Confusion())
|
||||||
|
{
|
||||||
|
const gp_XYZ aTransl = aTrsf.TranslationPart() * myScale;
|
||||||
|
aTrsf.SetTranslationPart(aTransl);
|
||||||
|
}
|
||||||
|
aTrans->SetTransform(aTrsf);
|
||||||
|
myScene.AddNode(aTrans, theParent.IsNull() && aGroup.IsNull());
|
||||||
|
if (!aGroup.IsNull())
|
||||||
|
{
|
||||||
|
aGroup->AddNode(aTrans);
|
||||||
|
}
|
||||||
|
else if (!theParent.IsNull())
|
||||||
|
{
|
||||||
|
theParent->AddNode(aTrans);
|
||||||
|
}
|
||||||
|
// Store the shape node under the transform.
|
||||||
|
aTrans->AddNode(aShapeNode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
// Create a Transform grouping node
|
|
||||||
Handle(VrmlData_Group) aTrans = new VrmlData_Group (myScene, 0L, Standard_True);
|
|
||||||
gp_Trsf aTrsf(aLoc);
|
|
||||||
if (fabs(myScale - 1.) > Precision::Confusion())
|
|
||||||
{
|
|
||||||
const gp_XYZ aTransl = aTrsf.TranslationPart() * myScale;
|
|
||||||
aTrsf.SetTranslationPart(aTransl);
|
|
||||||
}
|
|
||||||
aTrans->SetTransform(aTrsf);
|
|
||||||
myScene.AddNode(aTrans, theParent.IsNull() && aGroup.IsNull());
|
|
||||||
if (!aGroup.IsNull())
|
|
||||||
{
|
|
||||||
aGroup->AddNode(aTrans);
|
|
||||||
}
|
|
||||||
else if (!theParent.IsNull())
|
|
||||||
{
|
|
||||||
theParent->AddNode(aTrans);
|
|
||||||
}
|
|
||||||
// Store the shape node under the transform.
|
|
||||||
aTrans->AddNode(aShapeNode);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,9 +0,0 @@
|
|||||||
puts "================"
|
|
||||||
puts "0032767: Mesh - incorrect splitting of edges of seams leading to hang \[since OCCT 7.4.0\] "
|
|
||||||
puts "================"
|
|
||||||
puts ""
|
|
||||||
|
|
||||||
restore [locate_data_file bug32767.brep] s
|
|
||||||
tclean s
|
|
||||||
incmesh s 0.01
|
|
||||||
checktrinfo s -tri 3220 -nod 1770 -defl 0.018398669654253779 -tol_abs_defl 1e-6
|
|
@@ -1,17 +0,0 @@
|
|||||||
puts "======="
|
|
||||||
puts "0032731: Data Exchange, Step Import - Incorrect PMI text location"
|
|
||||||
puts "======="
|
|
||||||
|
|
||||||
pload OCAF
|
|
||||||
|
|
||||||
Close D -silent
|
|
||||||
|
|
||||||
# Read file
|
|
||||||
ReadStep D [locate_data_file bug32731_A5E46910589A.stp]
|
|
||||||
|
|
||||||
#Checking
|
|
||||||
XGetShape repr0 D 0:1:4:106:16
|
|
||||||
checkgravitycenter repr0 -l -109.847 153.679 0 1e-7
|
|
||||||
|
|
||||||
XGetShape repr1 D 0:1:4:56:16
|
|
||||||
checkgravitycenter repr1 -l -68.7 123.272 -18.5624 1e-7
|
|
16
tests/pipe/bugs/bug32811
Normal file
16
tests/pipe/bugs/bug32811
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
puts "TODO ? Surface Surface Intersect Lost One Intersect Curve"
|
||||||
|
puts "0032811: Bad result of sweep operation due to Surface Surface Intersect Bug"
|
||||||
|
puts "========"
|
||||||
|
puts ""
|
||||||
|
|
||||||
|
restore [locate_data_file CR32811_path.brep] p
|
||||||
|
restore [locate_data_file CR32811_profile.brep] pr
|
||||||
|
|
||||||
|
mksweep p
|
||||||
|
setsweep -CF
|
||||||
|
addsweep pr
|
||||||
|
|
||||||
|
buildsweep result -C -S
|
||||||
|
|
||||||
|
checkshape result
|
||||||
|
checknbshapes result -vertex 184 -edge 368 -wire 184 -face 184 -shell 1
|
Reference in New Issue
Block a user