diff --git a/dox/user_guides/step/step.md b/dox/user_guides/step/step.md index 8328a914fb..b09a64e7bc 100644 --- a/dox/user_guides/step/step.md +++ b/dox/user_guides/step/step.md @@ -94,6 +94,7 @@ The types of STEP representation entities that are recognized are: * geometrically_bounded_wireframe_shape_representation * geometrically_bounded_surface_shape_representation * hybrid representations (shape_representation containing models of different type) + * tessellated_shape_representation @subsubsection occt_step_2_2_3 Topological entities The types of STEP topological entities that can be translated are: @@ -112,6 +113,7 @@ The types of STEP geometrical entities that can be translated are: * directions * curves * surfaces + * triangulations For further information see 2.4 Mapping STEP entities to Open CASCADE Technology shapes. @@ -335,7 +337,7 @@ Specifies preferred type of representation of the shape of the product, in case * 4 (GBSSR) -- Prefer GEOMETRICALLY_BOUNDED_SURFACE_SHAPE_REPRESENTATION * 5 (FBSR) -- Prefer FACETTED_BREP_SHAPE_REPRESENTATION * 6 (EBWSR) -- Prefer EDGE_BASED_WIREFRAME_SHAPE_REPRESENTATION -* 7 (GBWSR) -- Prefer GEOMETRICALLY_BOUNDED_WIREFRAME _SHAPE_REPRESENTATION +* 7 (GBWSR) -- Prefer GEOMETRICALLY_BOUNDED_WIREFRAME_SHAPE_REPRESENTATION When this option is not equal to 1, for products with multiple representations the representation having a type closest to the selected one in this list will be translated. @@ -445,6 +447,34 @@ of for each of the two "AXIS2_PLACEMENT_3D" entities referenced by it. as follow } ~~~~~ +

read.step.tessellated:

+ +Boolean flag regulating translation of entities that define tessellated geometry: + +* TESSELLATED_SHAPE_REPRESENTATION +* TESSELLATED_SHELL +* TESSELLATED_SOLID +* TRIANGULATED_FACE +* COMPLEX_TRIANGULATED_FACE + +Tesselated geometry is attached to shapes as objects of Poly_Triangulation type using STEP links. + +* 0 (Off) -- do not translate +* 1 (On) -- translate +* 2 (OnNoBRep) - tessellation is read only for entities for which there is no BRep representation + +Read this parameter with: +~~~~{.cpp} +Standard_Integer ic = Interface_Static::IVal("read.step.tessellated"); +~~~~ + +Modify this parameter with: +~~~~{.cpp} +if(!Interface_Static::SetIVal("read.step.tessellated",1)) +.. error .. +~~~~ +Default value is 0 (On). + @subsubsection occt_step_2_3_4 Performing the STEP file translation Perform the translation according to what you want to translate. You can choose either root entities (all or selected by the number of root), or select any entity by its number in the STEP file. There is a limited set of types of entities that can be used as starting entities for translation. Only the following entities are recognized as transferable: @@ -462,6 +492,11 @@ Perform the translation according to what you want to translate. You can choose * subtypes of face_surface (including advanced_face) * subtypes of shape_representation_relationship * context_dependent_shape_representation + * tessellated_shape_representation + * tessellated_shell + * tessellated_solid + * triangulated_face + * complex_triangulated_face The following methods are used for translation: @@ -681,6 +716,10 @@ Not all entities defining the assembly structure in the STEP file are translated | | quasi_uniform_surface | Geom_BSplineSurface | | | | rectangular_composite_surface | TopoDS_Compound | Contains *TopoDS_Faces* | | | curve_bounded_surface | TopoDS_Face | | +| Tessellations | tessellated_shell | TopoDS_Shell | | +| | tessellated_solid | TopoDS_Solid | | +| | triangulated_face | TopoDS_Face | Contains *Poly_Triangulation* | +| | complex_triangulated_face | TopoDS_Face | Contains *Poly_Triangulation* | @subsection occt_step_2_5 Tolerance management @@ -743,6 +782,7 @@ The following default tolerances are used when creating shapes and how they are * *StepToTopoDS_TranslatePolyLoop* constructs *TopoDS_Edges* in *TopoDS_Wire* with help of class *StepToTopoDS_TranslateEdge*. Their tolerances are not modified inside this method. * *StepToTopoDS_TranslateFace* constructs *TopoDS_Face* with the initial value of tolerance. *TopoDS_Wire* on *TopoDS_Face* is constructed with the help of classes *StepToTopoDS_TranslatePolyLoop, StepToTopoDS_TranslateEdgeLoop* or *StepToTopoDS_TranslateVertexLoop*. * *StepToTopoDS_TranslateShell* calls *StepToTopoDS_TranslateFace::Init* for each face. This class does not modify the tolerance value. +* *StepToTopoDS_TranslateSolid* calls *StepToTopoDS_TranslateFace::Init* for each face. This class does not modify the tolerance value. * *StepToTopoDS_TranslateCompositeCurve* constructs *TopoDS_Edges* in *TopoDS_Wire* with help of class *BRepAPI_MakeEdge* and have a tolerance 10-7. Pcurves from a STEP file are translated if they are present and if *read.surfacecurve.mode* is not -3. The connection between segments of a composite curve (edges in the wire) is provided by calling method *ShapeFix_Wire::FixConnected()\** with a precision equal to the initial value of tolerance. * *StepToTopoDS_TranslateCurveBoundedSurface* constructs *TopoDS_Face* with tolerance *Precision::Confusion()*. *TopoDS_Wire* on *TopoDS_Face* is constructed with the help of class *StepToTopoDS_TranslateCompositeCurve*. Missing pcurves are computed using projection algorithm with the help of method *ShapeFix_Face::FixPcurves()*. For resulting face method *ShapeFix::SameParameter()* is called. It calls standard *BRepLib::SameParameter* for each edge in each wire, which can either increase or decrease the tolerances of the edges and vertices. *SameParameter* writes the tolerance corresponding to the real deviation of pcurves from 3D curve which can be less or greater than the tolerance in a STEP file. * *StepToTopoDS_Builder* a high level class. Its methods perform translation with the help of the classes listed above. If the value of *read.maxprecision.mode* is set to 1 then the tolerance of subshapes of the resulting shape is limited by 0 and *read.maxprecision.val*. Else this class does not change the tolerance value. @@ -969,6 +1009,34 @@ if(!Interface_Static::SetIVal("write.step.vertex.mode",1)) ~~~~~ Default value is 0. +

write.step.tessellated:

+ +Boolean flag regulating writing of entities that define tessellated geometry: + +* TESSELLATED_SHAPE_REPRESENTATION +* TESSELLATED_SHELL +* TESSELLATED_SOLID +* TRIANGULATED_FACE + +Tesselated geometry is taken as objects of Poly_Triangulation type from the active TopoDS_Face triangulation. + +* 0 (Off) -- do not write +* 1 (On) -- write +* 2 (OnNoBRep) - tessellation is written only for entities for which there is no BRep representation + +Read this parameter with: +~~~~{.cpp} +Standard_Integer ic = Interface_Static::IVal("write.step.tessellated"); +~~~~ + +Modify this parameter with: +~~~~{.cpp} +if(!Interface_Static::SetIVal("write.step.tessellated",1)) +.. error .. +~~~~ + +Default value is 2 (OnNoBep). + @subsubsection occt_step_3_3_3 Performing the Open CASCADE Technology shape translation An OCCT shape can be translated to STEP using one of the following models (shape_representations): * manifold_solid_brep (advanced_brep_shape_representation) @@ -1092,6 +1160,7 @@ The table below describes STEP entities, which are created when the assembly str | | Geom_ToroidalSurface | toroidal_surface or degenerate_toroidal_surface | *degenerate_toroidal_surface* is produced if the minor radius is greater then the major one | | | Geom_BezierSurface | b_spline_surface_with_knots | | | | Geom_BsplineSurface | b_spline_surface_with_knots or rational_b_spline_surface | *rational_b_spline_surface* is produced if *Geom_BSplineSurface* is a rational Bspline | +| Triangulations | Poly_Triangulation | *triangulated_face* is produced for face active triangulation | | @subsection occt_step_3_5 Tolerance management diff --git a/src/RWStepAP214/RWStepAP214_GeneralModule.cxx b/src/RWStepAP214/RWStepAP214_GeneralModule.cxx index 1a411dce26..685c2eae1c 100644 --- a/src/RWStepAP214/RWStepAP214_GeneralModule.cxx +++ b/src/RWStepAP214/RWStepAP214_GeneralModule.cxx @@ -1370,6 +1370,38 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_GeneralModule,StepData_GeneralModule) #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + static Standard_Integer catsh,catdr,catstr,catdsc,cataux; @@ -5204,8 +5236,113 @@ void RWStepAP214_GeneralModule::FillSharedCase(const Standard_Integer CN, aTool.Share(anEnt, iter); break; } - default : break; - } + case 804: + { + DeclareAndCast(StepVisual_TessellatedConnectingEdge, anEnt, ent); + RWStepVisual_RWTessellatedConnectingEdge aTool; + aTool.Share(anEnt, iter); + } + break; + case 805: + { + DeclareAndCast(StepVisual_TessellatedEdge, anEnt, ent); + RWStepVisual_RWTessellatedEdge aTool; + aTool.Share(anEnt, iter); + } + break; + case 806: + { + DeclareAndCast(StepVisual_TessellatedPointSet, anEnt, ent); + RWStepVisual_RWTessellatedPointSet aTool; + aTool.Share(anEnt, iter); + } + break; + case 807: + { + DeclareAndCast(StepVisual_TessellatedShapeRepresentation, anEnt, ent); + RWStepVisual_RWTessellatedShapeRepresentation aTool; + aTool.Share(anEnt, iter); + } + break; + case 808: + { + DeclareAndCast(StepVisual_TessellatedShapeRepresentationWithAccuracyParameters, anEnt, ent); + RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters aTool; + aTool.Share(anEnt, iter); + } + break; + case 809: + { + DeclareAndCast(StepVisual_TessellatedShell, anEnt, ent); + RWStepVisual_RWTessellatedShell aTool; + aTool.Share(anEnt, iter); + } + break; + case 810: + { + DeclareAndCast(StepVisual_TessellatedSolid, anEnt, ent); + RWStepVisual_RWTessellatedSolid aTool; + aTool.Share(anEnt, iter); + } + break; + case 811: + { + DeclareAndCast(StepVisual_TessellatedStructuredItem, anEnt, ent); + RWStepVisual_RWTessellatedStructuredItem aTool; + aTool.Share(anEnt, iter); + } + break; + case 812: + { + DeclareAndCast(StepVisual_TessellatedVertex, anEnt, ent); + RWStepVisual_RWTessellatedVertex aTool; + aTool.Share(anEnt, iter); + } + break; + case 813: + { + DeclareAndCast(StepVisual_TessellatedWire, anEnt, ent); + RWStepVisual_RWTessellatedWire aTool; + aTool.Share(anEnt, iter); + } + break; + case 814: + { + DeclareAndCast(StepVisual_TriangulatedFace, anEnt, ent); + RWStepVisual_RWTriangulatedFace aTool; + aTool.Share(anEnt, iter); + } + break; + case 815: + { + DeclareAndCast(StepVisual_ComplexTriangulatedFace, anEnt, ent); + RWStepVisual_RWComplexTriangulatedFace aTool; + aTool.Share(anEnt, iter); + } + break; + case 816: + { + DeclareAndCast(StepVisual_ComplexTriangulatedSurfaceSet, anEnt, ent); + RWStepVisual_RWComplexTriangulatedSurfaceSet aTool; + aTool.Share(anEnt, iter); + } + break; + case 817: + { + DeclareAndCast(StepVisual_CubicBezierTessellatedEdge, anEnt, ent); + RWStepVisual_RWCubicBezierTessellatedEdge aTool; + aTool.Share(anEnt, iter); + } + break; + case 818: + { + DeclareAndCast(StepVisual_CubicBezierTriangulatedFace, anEnt, ent); + RWStepVisual_RWCubicBezierTriangulatedFace aTool; + aTool.Share(anEnt, iter); + } + break; + default : break; + } } @@ -7234,6 +7371,52 @@ Standard_Boolean RWStepAP214_GeneralModule::NewVoid case 803: ent = new StepVisual_RepositionedTessellatedItem; break; + case 804: + ent = new StepVisual_TessellatedConnectingEdge; + break; + case 805: + ent = new StepVisual_TessellatedEdge; + break; + case 806: + ent = new StepVisual_TessellatedPointSet; + break; + case 807: + ent = new StepVisual_TessellatedShapeRepresentation; + break; + case 808: + ent = new StepVisual_TessellatedShapeRepresentationWithAccuracyParameters; + break; + case 809: + ent = new StepVisual_TessellatedShell; + break; + case 810: + ent = new StepVisual_TessellatedSolid; + break; + case 811: + ent = new StepVisual_TessellatedStructuredItem; + break; + case 812: + ent = new StepVisual_TessellatedVertex; + break; + case 813: + ent = new StepVisual_TessellatedWire; + break; + case 814: + ent = new StepVisual_TriangulatedFace; + break; + case 815: + ent = new StepVisual_ComplexTriangulatedFace; + break; + case 816: + ent = new StepVisual_ComplexTriangulatedSurfaceSet; + break; + case 817: + ent = new StepVisual_CubicBezierTessellatedEdge; + break; + case 818: + ent = new StepVisual_CubicBezierTriangulatedFace; + break; + default: return Standard_False; } @@ -7838,6 +8021,21 @@ Standard_Integer RWStepAP214_GeneralModule::CategoryNumber case 723: return catdr; case 802: return cataux; case 803: return cataux; + case 804: return cataux; + case 805: return cataux; + case 806: return cataux; + case 807: return cataux; + case 808: return cataux; + case 809: return cataux; + case 810: return cataux; + case 811: return cataux; + case 812: return cataux; + case 813: return cataux; + case 814: return cataux; + case 815: return cataux; + case 816: return cataux; + case 817: return cataux; + case 818: return cataux; default : break; } return 0; diff --git a/src/RWStepAP214/RWStepAP214_ReadWriteModule.cxx b/src/RWStepAP214/RWStepAP214_ReadWriteModule.cxx index eab7aab7fd..47ab1fe58a 100644 --- a/src/RWStepAP214/RWStepAP214_ReadWriteModule.cxx +++ b/src/RWStepAP214/RWStepAP214_ReadWriteModule.cxx @@ -440,6 +440,38 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_ReadWriteModule,StepData_ReadWriteModule) #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + #include #include #include @@ -2066,6 +2098,22 @@ static TCollection_AsciiString Reco_SurfaceStyleReflectanceAmbient("SURFACE_STYL static TCollection_AsciiString Reco_SurfaceStyleRendering("SURFACE_STYLE_RENDERING"); static TCollection_AsciiString Reco_SurfaceStyleRenderingWithProperties("SURFACE_STYLE_RENDERING_WITH_PROPERTIES"); +static TCollection_AsciiString Reco_TessellatedConnectingEdge("TESSELLATED_CONNECTING_EDGE"); +static TCollection_AsciiString Reco_TessellatedEdge("TESSELLATED_EDGE"); +static TCollection_AsciiString Reco_TessellatedPointSet("TESSELLATED_POINT_SET"); +static TCollection_AsciiString Reco_TessellatedShapeRepresentation("TESSELLATED_SHAPE_REPRESENTATION"); +static TCollection_AsciiString Reco_TessellatedShapeRepresentationWithAccuracyParameters("TESSELLATED_SHAPE_REPRESENTATION_WITH_ACCURACY_PARAMETERS"); +static TCollection_AsciiString Reco_TessellatedShell("TESSELLATED_SHELL"); +static TCollection_AsciiString Reco_TessellatedSolid("TESSELLATED_SOLID"); +static TCollection_AsciiString Reco_TessellatedStructuredItem("TESSELLATED_STRUCTURED_ITEM"); +static TCollection_AsciiString Reco_TessellatedVertex("TESSELLATED_VERTEX"); +static TCollection_AsciiString Reco_TessellatedWire("TESSELLATED_WIRE"); +static TCollection_AsciiString Reco_TriangulatedFace("TRIANGULATED_FACE"); +static TCollection_AsciiString Reco_ComplexTriangulatedFace("COMPLEX_TRIANGULATED_FACE"); +static TCollection_AsciiString Reco_ComplexTriangulatedSurfaceSet("COMPLEX_TRIANGULATED_SURFACE_SET"); +static TCollection_AsciiString Reco_CubicBezierTessellatedEdge("CUBIC_BEZIER_TESSELLATED_EDGE"); +static TCollection_AsciiString Reco_CubicBezierTriangulatedFace("CUBIC_BEZIER_TRIANGULATED_FACE"); + // -- Definition of the libraries -- static NCollection_DataMap typenums; @@ -2714,21 +2762,37 @@ RWStepAP214_ReadWriteModule::RWStepAP214_ReadWriteModule () typenums.Bind (Reco_TessellatedAnnotationOccurrence,707); typenums.Bind (Reco_TessellatedGeometricSet, 709); - typenums.Bind ( Reco_TessellatedCurveSet, 710); - typenums.Bind ( Reco_CoordinatesList, 711); - typenums.Bind ( Reco_ConstructiveGeometryRepresentation, 712); - typenums.Bind ( Reco_ConstructiveGeometryRepresentationRelationship, 713); - typenums.Bind ( Reco_CharacterizedRepresentation, 714); - typenums.Bind ( Reco_CameraModelD3MultiClipping, 716); - typenums.Bind ( Reco_CameraModelD3MultiClippingIntersection, 717); - typenums.Bind ( Reco_CameraModelD3MultiClippingUnion, 718); + typenums.Bind (Reco_TessellatedCurveSet, 710); + typenums.Bind (Reco_CoordinatesList, 711); + typenums.Bind (Reco_ConstructiveGeometryRepresentation, 712); + typenums.Bind (Reco_ConstructiveGeometryRepresentationRelationship, 713); + typenums.Bind (Reco_CharacterizedRepresentation, 714); + typenums.Bind (Reco_CameraModelD3MultiClipping, 716); + typenums.Bind (Reco_CameraModelD3MultiClippingIntersection, 717); + typenums.Bind (Reco_CameraModelD3MultiClippingUnion, 718); typenums.Bind (Reco_SurfaceStyleTransparent, 720); typenums.Bind (Reco_SurfaceStyleReflectanceAmbient, 721); typenums.Bind (Reco_SurfaceStyleRendering, 722); typenums.Bind (Reco_SurfaceStyleRenderingWithProperties, 723); typenums.Bind (Reco_RepositionedTessellatedItem, 803); + typenums.Bind (Reco_TessellatedConnectingEdge, 804); + typenums.Bind (Reco_TessellatedEdge, 805); + typenums.Bind (Reco_TessellatedPointSet, 806); + typenums.Bind (Reco_TessellatedShapeRepresentation, 807); + typenums.Bind (Reco_TessellatedShapeRepresentationWithAccuracyParameters, 808); + typenums.Bind (Reco_TessellatedShell, 809); + typenums.Bind (Reco_TessellatedSolid, 810); + typenums.Bind (Reco_TessellatedStructuredItem, 811); + typenums.Bind (Reco_TessellatedVertex, 812); + typenums.Bind (Reco_TessellatedWire, 813); + typenums.Bind (Reco_TriangulatedFace, 814); + typenums.Bind (Reco_ComplexTriangulatedFace, 815); + typenums.Bind (Reco_ComplexTriangulatedSurfaceSet, 816); + typenums.Bind (Reco_CubicBezierTessellatedEdge, 817); + typenums.Bind (Reco_CubicBezierTriangulatedFace, 818); + // SHORT NAMES // NB : la liste est celle de AP203 // Directement exploite pour les types simples @@ -4599,6 +4663,21 @@ const TCollection_AsciiString& RWStepAP214_ReadWriteModule::StepType case 723 : return Reco_SurfaceStyleRenderingWithProperties; case 803: return Reco_RepositionedTessellatedItem; + case 804: return Reco_TessellatedConnectingEdge; + case 805: return Reco_TessellatedEdge; + case 806: return Reco_TessellatedPointSet; + case 807: return Reco_TessellatedShapeRepresentation; + case 808: return Reco_TessellatedShapeRepresentationWithAccuracyParameters; + case 809: return Reco_TessellatedShell; + case 810: return Reco_TessellatedSolid; + case 811: return Reco_TessellatedStructuredItem; + case 812: return Reco_TessellatedVertex; + case 813: return Reco_TessellatedWire; + case 814: return Reco_TriangulatedFace; + case 815: return Reco_ComplexTriangulatedFace; + case 816: return Reco_ComplexTriangulatedSurfaceSet; + case 817: return Reco_CubicBezierTessellatedEdge; + case 818: return Reco_CubicBezierTriangulatedFace; default : return PasReco; } } @@ -9547,7 +9626,111 @@ void RWStepAP214_ReadWriteModule::ReadStep(const Standard_Integer CN, aTool.ReadStep(data, num, ach, anEnt); break; } - + case 804: + { + DeclareAndCast(StepVisual_TessellatedConnectingEdge, anEnt, ent); + RWStepVisual_RWTessellatedConnectingEdge aTool; + aTool.ReadStep(data, num, ach, anEnt); + } + break; + case 805: + { + DeclareAndCast(StepVisual_TessellatedEdge, anEnt, ent); + RWStepVisual_RWTessellatedEdge aTool; + aTool.ReadStep(data, num, ach, anEnt); + } + break; + case 806: + { + DeclareAndCast(StepVisual_TessellatedPointSet, anEnt, ent); + RWStepVisual_RWTessellatedPointSet aTool; + aTool.ReadStep(data, num, ach, anEnt); + } + break; + case 807: + { + DeclareAndCast(StepVisual_TessellatedShapeRepresentation, anEnt, ent); + RWStepVisual_RWTessellatedShapeRepresentation aTool; + aTool.ReadStep(data, num, ach, anEnt); + } + break; + case 808: + { + DeclareAndCast(StepVisual_TessellatedShapeRepresentationWithAccuracyParameters, anEnt, ent); + RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters aTool; + aTool.ReadStep(data, num, ach, anEnt); + } + break; + case 809: + { + DeclareAndCast(StepVisual_TessellatedShell, anEnt, ent); + RWStepVisual_RWTessellatedShell aTool; + aTool.ReadStep(data, num, ach, anEnt); + } + break; + case 810: + { + DeclareAndCast(StepVisual_TessellatedSolid, anEnt, ent); + RWStepVisual_RWTessellatedSolid aTool; + aTool.ReadStep(data, num, ach, anEnt); + } + break; + case 811: + { + DeclareAndCast(StepVisual_TessellatedStructuredItem, anEnt, ent); + RWStepVisual_RWTessellatedStructuredItem aTool; + aTool.ReadStep(data, num, ach, anEnt); + } + break; + case 812: + { + DeclareAndCast(StepVisual_TessellatedVertex, anEnt, ent); + RWStepVisual_RWTessellatedVertex aTool; + aTool.ReadStep(data, num, ach, anEnt); + } + break; + case 813: + { + DeclareAndCast(StepVisual_TessellatedWire, anEnt, ent); + RWStepVisual_RWTessellatedWire aTool; + aTool.ReadStep(data, num, ach, anEnt); + } + break; + case 814: + { + DeclareAndCast(StepVisual_TriangulatedFace, anEnt, ent); + RWStepVisual_RWTriangulatedFace aTool; + aTool.ReadStep(data, num, ach, anEnt); + } + break; + case 815: + { + DeclareAndCast(StepVisual_ComplexTriangulatedFace, anEnt, ent); + RWStepVisual_RWComplexTriangulatedFace aTool; + aTool.ReadStep(data, num, ach, anEnt); + } + break; + case 816: + { + DeclareAndCast(StepVisual_ComplexTriangulatedSurfaceSet, anEnt, ent); + RWStepVisual_RWComplexTriangulatedSurfaceSet aTool; + aTool.ReadStep(data, num, ach, anEnt); + } + break; + case 817: + { + DeclareAndCast(StepVisual_CubicBezierTessellatedEdge, anEnt, ent); + RWStepVisual_RWCubicBezierTessellatedEdge aTool; + aTool.ReadStep(data, num, ach, anEnt); + } + break; + case 818: + { + DeclareAndCast(StepVisual_CubicBezierTriangulatedFace, anEnt, ent); + RWStepVisual_RWCubicBezierTriangulatedFace aTool; + aTool.ReadStep(data, num, ach, anEnt); + } + break; default: ach->AddFail("Type Mismatch when reading - Entity"); } @@ -14446,7 +14629,115 @@ void RWStepAP214_ReadWriteModule::WriteStep(const Standard_Integer CN, aTool.WriteStep(SW, anEnt); break; } - default: + + // -------------------------------------------------------------------- + + case 804: + { + DeclareAndCast(StepVisual_TessellatedConnectingEdge, anEnt, ent); + RWStepVisual_RWTessellatedConnectingEdge aTool; + aTool.WriteStep(SW, anEnt); + } + break; + case 805: + { + DeclareAndCast(StepVisual_TessellatedEdge, anEnt, ent); + RWStepVisual_RWTessellatedEdge aTool; + aTool.WriteStep(SW, anEnt); + } + break; + case 806: + { + DeclareAndCast(StepVisual_TessellatedPointSet, anEnt, ent); + RWStepVisual_RWTessellatedPointSet aTool; + aTool.WriteStep(SW, anEnt); + } + break; + case 807: + { + DeclareAndCast(StepVisual_TessellatedShapeRepresentation, anEnt, ent); + RWStepVisual_RWTessellatedShapeRepresentation aTool; + aTool.WriteStep(SW, anEnt); + } + break; + case 808: + { + DeclareAndCast(StepVisual_TessellatedShapeRepresentationWithAccuracyParameters, anEnt, ent); + RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters aTool; + aTool.WriteStep(SW, anEnt); + } + break; + case 809: + { + DeclareAndCast(StepVisual_TessellatedShell, anEnt, ent); + RWStepVisual_RWTessellatedShell aTool; + aTool.WriteStep(SW, anEnt); + } + break; + case 810: + { + DeclareAndCast(StepVisual_TessellatedSolid, anEnt, ent); + RWStepVisual_RWTessellatedSolid aTool; + aTool.WriteStep(SW, anEnt); + } + break; + case 811: + { + DeclareAndCast(StepVisual_TessellatedStructuredItem, anEnt, ent); + RWStepVisual_RWTessellatedStructuredItem aTool; + aTool.WriteStep(SW, anEnt); + } + break; + case 812: + { + DeclareAndCast(StepVisual_TessellatedVertex, anEnt, ent); + RWStepVisual_RWTessellatedVertex aTool; + aTool.WriteStep(SW, anEnt); + } + break; + case 813: + { + DeclareAndCast(StepVisual_TessellatedWire, anEnt, ent); + RWStepVisual_RWTessellatedWire aTool; + aTool.WriteStep(SW, anEnt); + } + break; + case 814: + { + DeclareAndCast(StepVisual_TriangulatedFace, anEnt, ent); + RWStepVisual_RWTriangulatedFace aTool; + aTool.WriteStep(SW, anEnt); + } + break; + case 815: + { + DeclareAndCast(StepVisual_ComplexTriangulatedFace, anEnt, ent); + RWStepVisual_RWComplexTriangulatedFace aTool; + aTool.WriteStep(SW, anEnt); + } + break; + case 816: + { + DeclareAndCast(StepVisual_ComplexTriangulatedSurfaceSet, anEnt, ent); + RWStepVisual_RWComplexTriangulatedSurfaceSet aTool; + aTool.WriteStep(SW, anEnt); + } + break; + case 817: + { + DeclareAndCast(StepVisual_CubicBezierTessellatedEdge, anEnt, ent); + RWStepVisual_RWCubicBezierTessellatedEdge aTool; + aTool.WriteStep(SW, anEnt); + } + break; + case 818: + { + DeclareAndCast(StepVisual_CubicBezierTriangulatedFace, anEnt, ent); + RWStepVisual_RWCubicBezierTriangulatedFace aTool; + aTool.WriteStep(SW, anEnt); + } + break; + default: return; } } diff --git a/src/RWStepBasic/RWStepBasic_RWConversionBasedUnit.cxx b/src/RWStepBasic/RWStepBasic_RWConversionBasedUnit.cxx index 53152fd5c5..386295f071 100644 --- a/src/RWStepBasic/RWStepBasic_RWConversionBasedUnit.cxx +++ b/src/RWStepBasic/RWStepBasic_RWConversionBasedUnit.cxx @@ -17,74 +17,72 @@ #include #include #include -#include #include #include RWStepBasic_RWConversionBasedUnit::RWStepBasic_RWConversionBasedUnit () {} -void RWStepBasic_RWConversionBasedUnit::ReadStep - (const Handle(StepData_StepReaderData)& data, - const Standard_Integer num, - Handle(Interface_Check)& ach, - const Handle(StepBasic_ConversionBasedUnit)& ent) const +void RWStepBasic_RWConversionBasedUnit::ReadStep(const Handle(StepData_StepReaderData)& data, + const Standard_Integer num, + Handle(Interface_Check)& ach, + const Handle(StepBasic_ConversionBasedUnit)& ent) const { - // --- Number of Parameter Control --- + // --- Number of Parameter Control --- - if (!data->CheckNbParams(num,3,ach,"conversion_based_unit")) return; + if (!data->CheckNbParams(num,3,ach,"conversion_based_unit")) return; - // --- inherited field : dimensions --- + // --- inherited field : dimensions --- - Handle(StepBasic_DimensionalExponents) aDimensions; - //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed - data->ReadEntity(num, 1,"dimensions", ach, STANDARD_TYPE(StepBasic_DimensionalExponents), aDimensions); + Handle(StepBasic_DimensionalExponents) aDimensions; + //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed + data->ReadEntity(num, 1,"dimensions", ach, STANDARD_TYPE(StepBasic_DimensionalExponents), aDimensions); - // --- own field : name --- + // --- own field : name --- - Handle(TCollection_HAsciiString) aName; - //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed - data->ReadString (num,2,"name",ach,aName); + Handle(TCollection_HAsciiString) aName; + //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed + data->ReadString (num,2,"name",ach,aName); - // --- own field : conversionFactor --- + // --- own field : conversionFactor --- - Handle(StepBasic_MeasureWithUnit) aConversionFactor; - //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed - data->ReadEntity(num, 3,"conversion_factor", ach, STANDARD_TYPE(StepBasic_MeasureWithUnit), aConversionFactor); + //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed + Handle(Standard_Transient) aConversionFactor; + data->ReadEntity (num, 3, "conversion_factor", ach, STANDARD_TYPE(Standard_Transient), aConversionFactor); - //--- Initialisation of the read entity --- + //--- Initialisation of the read entity --- - ent->Init(aDimensions, aName, aConversionFactor); + ent->Init(aDimensions, aName, aConversionFactor); } void RWStepBasic_RWConversionBasedUnit::WriteStep - (StepData_StepWriter& SW, - const Handle(StepBasic_ConversionBasedUnit)& ent) const + (StepData_StepWriter& SW, + const Handle(StepBasic_ConversionBasedUnit)& ent) const { - // --- inherited field dimensions --- + // --- inherited field dimensions --- - SW.Send(ent->Dimensions()); + SW.Send(ent->Dimensions()); - // --- own field : name --- + // --- own field : name --- - SW.Send(ent->Name()); + SW.Send(ent->Name()); - // --- own field : conversionFactor --- + // --- own field : conversionFactor --- - SW.Send(ent->ConversionFactor()); + SW.Send(ent->ConversionFactor()); } void RWStepBasic_RWConversionBasedUnit::Share(const Handle(StepBasic_ConversionBasedUnit)& ent, Interface_EntityIterator& iter) const { - iter.GetOneItem(ent->Dimensions()); + iter.GetOneItem(ent->Dimensions()); - iter.GetOneItem(ent->ConversionFactor()); + iter.GetOneItem(ent->ConversionFactor()); } diff --git a/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndAreaUnit.cxx b/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndAreaUnit.cxx index 5067bd6d45..2902235d47 100644 --- a/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndAreaUnit.cxx +++ b/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndAreaUnit.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include @@ -29,9 +28,9 @@ RWStepBasic_RWConversionBasedUnitAndAreaUnit::RWStepBasic_RWConversionBasedUnitA } void RWStepBasic_RWConversionBasedUnitAndAreaUnit::ReadStep(const Handle(StepData_StepReaderData)& data, - const Standard_Integer num0, - Handle(Interface_Check)& ach, - const Handle(StepBasic_ConversionBasedUnitAndAreaUnit)& ent) const + const Standard_Integer num0, + Handle(Interface_Check)& ach, + const Handle(StepBasic_ConversionBasedUnitAndAreaUnit)& ent) const { Standard_Integer num = num0; //data->NamedForComplex("AREA_UNIT",num0,num,ach); @@ -44,15 +43,15 @@ void RWStepBasic_RWConversionBasedUnitAndAreaUnit::ReadStep(const Handle(StepDat data->ReadString (num,1,"name",ach,aName); // --- field : conversionFactor --- - Handle(StepBasic_MeasureWithUnit) aConversionFactor; - data->ReadEntity(num, 2,"conversion_factor", ach, STANDARD_TYPE(StepBasic_MeasureWithUnit), aConversionFactor); + Handle(Standard_Transient) aConversionFactor; + data->ReadEntity (num, 2, "conversion_factor", ach, STANDARD_TYPE(Standard_Transient), aConversionFactor); num = data->NextForComplex(num); if (!data->CheckNbParams(num,1,ach,"named_unit")) return; Handle(StepBasic_DimensionalExponents) aDimensions; data->ReadEntity(num, 1,"dimensions", ach, STANDARD_TYPE(StepBasic_DimensionalExponents), aDimensions); - ent->Init(aDimensions,aName,aConversionFactor); + ent->Init(aDimensions,aName, aConversionFactor); } void RWStepBasic_RWConversionBasedUnitAndAreaUnit::WriteStep(StepData_StepWriter& SW, diff --git a/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndLengthUnit.cxx b/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndLengthUnit.cxx index 432e41b9b1..5a55af67c4 100644 --- a/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndLengthUnit.cxx +++ b/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndLengthUnit.cxx @@ -19,96 +19,95 @@ #include #include #include -#include #include #include RWStepBasic_RWConversionBasedUnitAndLengthUnit::RWStepBasic_RWConversionBasedUnitAndLengthUnit () {} void RWStepBasic_RWConversionBasedUnitAndLengthUnit::ReadStep - (const Handle(StepData_StepReaderData)& data, - const Standard_Integer num0, - Handle(Interface_Check)& ach, - const Handle(StepBasic_ConversionBasedUnitAndLengthUnit)& ent) const + (const Handle(StepData_StepReaderData)& data, + const Standard_Integer num0, + Handle(Interface_Check)& ach, + const Handle(StepBasic_ConversionBasedUnitAndLengthUnit)& ent) const { - Standard_Integer num = num0; + Standard_Integer num = num0; - // --- Instance of plex componant ConversionBasedUnit --- + // --- Instance of plex component ConversionBasedUnit --- - if (!data->CheckNbParams(num,2,ach,"conversion_based_unit")) return; + if (!data->CheckNbParams(num,2,ach,"conversion_based_unit")) return; - // --- field : name --- + // --- field : name --- - Handle(TCollection_HAsciiString) aName; - //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed - data->ReadString (num,1,"name",ach,aName); + Handle(TCollection_HAsciiString) aName; + //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed + data->ReadString (num,1,"name",ach,aName); - // --- field : conversionFactor --- + // --- field : conversionFactor --- - Handle(StepBasic_MeasureWithUnit) aConversionFactor; - //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed - data->ReadEntity(num, 2,"conversion_factor", ach, STANDARD_TYPE(StepBasic_MeasureWithUnit), aConversionFactor); + //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed + Handle(Standard_Transient) aConversionFactor; + data->ReadEntity (num, 2, "conversion_factor", ach, STANDARD_TYPE(Standard_Transient), aConversionFactor); - num = data->NextForComplex(num); + num = data->NextForComplex(num); - // --- Instance of plex componant LengthUnit --- + // --- Instance of plex component LengthUnit --- - if (!data->CheckNbParams(num,0,ach,"length_unit")) return; + if (!data->CheckNbParams(num,0,ach,"length_unit")) return; - num = data->NextForComplex(num); + num = data->NextForComplex(num); - // --- Instance of common supertype NamedUnit --- + // --- Instance of common supertype NamedUnit --- - if (!data->CheckNbParams(num,1,ach,"named_unit")) return; - // --- field : dimensions --- + if (!data->CheckNbParams(num,1,ach,"named_unit")) return; + // --- field : dimensions --- - Handle(StepBasic_DimensionalExponents) aDimensions; - //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed - data->ReadEntity(num, 1,"dimensions", ach, STANDARD_TYPE(StepBasic_DimensionalExponents), aDimensions); + Handle(StepBasic_DimensionalExponents) aDimensions; + //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed + data->ReadEntity(num, 1,"dimensions", ach, STANDARD_TYPE(StepBasic_DimensionalExponents), aDimensions); - //--- Initialisation of the red entity --- + //--- Initialisation of the red entity --- - ent->Init(aDimensions,aName,aConversionFactor); + ent->Init(aDimensions,aName,aConversionFactor); } void RWStepBasic_RWConversionBasedUnitAndLengthUnit::WriteStep - (StepData_StepWriter& SW, - const Handle(StepBasic_ConversionBasedUnitAndLengthUnit)& ent) const + (StepData_StepWriter& SW, + const Handle(StepBasic_ConversionBasedUnitAndLengthUnit)& ent) const { - // --- Instance of plex componant ConversionBasedUnit --- + // --- Instance of plex component ConversionBasedUnit --- - SW.StartEntity("CONVERSION_BASED_UNIT"); - // --- field : name --- + SW.StartEntity("CONVERSION_BASED_UNIT"); + // --- field : name --- - SW.Send(ent->Name()); - // --- field : conversionFactor --- + SW.Send(ent->Name()); + // --- field : conversionFactor --- - SW.Send(ent->ConversionFactor()); + SW.Send(ent->ConversionFactor()); - // --- Instance of plex componant LengthUnit --- + // --- Instance of plex component LengthUnit --- - SW.StartEntity("LENGTH_UNIT"); + SW.StartEntity("LENGTH_UNIT"); - // --- Instance of common supertype NamedUnit --- + // --- Instance of common supertype NamedUnit --- - SW.StartEntity("NAMED_UNIT"); - // --- field : dimensions --- + SW.StartEntity("NAMED_UNIT"); + // --- field : dimensions --- - SW.Send(ent->Dimensions()); + SW.Send(ent->Dimensions()); } void RWStepBasic_RWConversionBasedUnitAndLengthUnit::Share(const Handle(StepBasic_ConversionBasedUnitAndLengthUnit)& ent, Interface_EntityIterator& iter) const { - iter.GetOneItem(ent->Dimensions()); + iter.GetOneItem(ent->Dimensions()); - iter.GetOneItem(ent->ConversionFactor()); + iter.GetOneItem(ent->ConversionFactor()); } diff --git a/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndMassUnit.cxx b/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndMassUnit.cxx index 7fed805df6..76838e59dc 100644 --- a/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndMassUnit.cxx +++ b/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndMassUnit.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include @@ -38,10 +37,10 @@ RWStepBasic_RWConversionBasedUnitAndMassUnit::RWStepBasic_RWConversionBasedUnitA //======================================================================= void RWStepBasic_RWConversionBasedUnitAndMassUnit::ReadStep - (const Handle(StepData_StepReaderData)& data, - const Standard_Integer num0, - Handle(Interface_Check)& ach, - const Handle(StepBasic_ConversionBasedUnitAndMassUnit)& ent) const + (const Handle(StepData_StepReaderData)& data, + const Standard_Integer num0, + Handle(Interface_Check)& ach, + const Handle(StepBasic_ConversionBasedUnitAndMassUnit)& ent) const { Standard_Integer num = num0; @@ -53,9 +52,9 @@ void RWStepBasic_RWConversionBasedUnitAndMassUnit::ReadStep //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed data->ReadString (num,1,"name",ach,aName); // --- field : conversionFactor --- - Handle(StepBasic_MeasureWithUnit) aConversionFactor; //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed - data->ReadEntity(num, 2,"conversion_factor", ach, STANDARD_TYPE(StepBasic_MeasureWithUnit), aConversionFactor); + Handle(Standard_Transient) aConversionFactor; + data->ReadEntity (num, 2, "conversion_factor", ach, STANDARD_TYPE(Standard_Transient), aConversionFactor); num = data->NextForComplex(num); @@ -72,7 +71,7 @@ void RWStepBasic_RWConversionBasedUnitAndMassUnit::ReadStep data->ReadEntity(num, 1,"dimensions", ach, STANDARD_TYPE(StepBasic_DimensionalExponents), aDimensions); //--- Initialisation of the red entity --- - ent->Init(aDimensions,aName,aConversionFactor); + ent->Init(aDimensions,aName, aConversionFactor); } diff --git a/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndPlaneAngleUnit.cxx b/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndPlaneAngleUnit.cxx index 1647342ffc..8e86ffd01c 100644 --- a/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndPlaneAngleUnit.cxx +++ b/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndPlaneAngleUnit.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include @@ -27,71 +26,72 @@ RWStepBasic_RWConversionBasedUnitAndPlaneAngleUnit::RWStepBasic_RWConversionBasedUnitAndPlaneAngleUnit () {} void RWStepBasic_RWConversionBasedUnitAndPlaneAngleUnit::ReadStep - (const Handle(StepData_StepReaderData)& data, - const Standard_Integer num0, - Handle(Interface_Check)& ach, - const Handle(StepBasic_ConversionBasedUnitAndPlaneAngleUnit)& ent) const + (const Handle(StepData_StepReaderData)& data, + const Standard_Integer num0, + Handle(Interface_Check)& ach, + const Handle(StepBasic_ConversionBasedUnitAndPlaneAngleUnit)& ent) const { // sln 09.10.2001. BUC61003. Correction of looking for items of complex entity in case of them do not saticfy to alphabetical order // CONVERSION_BASED_UNIT - Standard_Integer num = 0;//num0; - data->NamedForComplex("CONVERSION_BASED_UNIT", "CNBSUN",num0,num,ach); - if (!data->CheckNbParams(num,2,ach,"conversion_based_unit")) return; - Handle(TCollection_HAsciiString) aName; - data->ReadString (num,1,"name",ach,aName); - Handle(StepBasic_MeasureWithUnit) aConversionFactor; - data->ReadEntity(num, 2,"conversion_factor", ach, STANDARD_TYPE(StepBasic_MeasureWithUnit), aConversionFactor); - - // NAMED_UNIT - //num = 0; //gka TRJ9 c2-id-214.stp - data->NamedForComplex("NAMED_UNIT", "NMDUNT",num0,num,ach); - if (!data->CheckNbParams(num,1,ach,"named_unit")) return; - Handle(StepBasic_DimensionalExponents) aDimensions; - data->ReadEntity(num, 1,"dimensions", ach, STANDARD_TYPE(StepBasic_DimensionalExponents), aDimensions); + Standard_Integer num = 0;//num0; + data->NamedForComplex("CONVERSION_BASED_UNIT", "CNBSUN",num0,num,ach); + if (!data->CheckNbParams(num,2,ach,"conversion_based_unit")) return; + Handle(TCollection_HAsciiString) aName; + data->ReadString (num,1,"name",ach,aName); - // PLANE_ANGLE_UNIT - //num = 0; //gka - data->NamedForComplex("PLANE_ANGLE_UNIT", "PLANUN",num0,num,ach); - if (!data->CheckNbParams(num,0,ach,"plane_angle_unit")) return; - - ent->Init(aDimensions,aName,aConversionFactor); + Handle(Standard_Transient) aConversionFactor; + data->ReadEntity (num, 2, "conversion_factor", ach, STANDARD_TYPE(Standard_Transient), aConversionFactor); + + // NAMED_UNIT + //num = 0; //gka TRJ9 c2-id-214.stp + data->NamedForComplex("NAMED_UNIT", "NMDUNT",num0,num,ach); + if (!data->CheckNbParams(num,1,ach,"named_unit")) return; + Handle(StepBasic_DimensionalExponents) aDimensions; + data->ReadEntity(num, 1,"dimensions", ach, STANDARD_TYPE(StepBasic_DimensionalExponents), aDimensions); + + // PLANE_ANGLE_UNIT + //num = 0; //gka + data->NamedForComplex("PLANE_ANGLE_UNIT", "PLANUN",num0,num,ach); + if (!data->CheckNbParams(num,0,ach,"plane_angle_unit")) return; + + ent->Init(aDimensions,aName,aConversionFactor); } void RWStepBasic_RWConversionBasedUnitAndPlaneAngleUnit::WriteStep - (StepData_StepWriter& SW, - const Handle(StepBasic_ConversionBasedUnitAndPlaneAngleUnit)& ent) const + (StepData_StepWriter& SW, + const Handle(StepBasic_ConversionBasedUnitAndPlaneAngleUnit)& ent) const { - // --- Instance of plex componant ConversionBasedUnit --- + // --- Instance of plex component ConversionBasedUnit --- - SW.StartEntity("CONVERSION_BASED_UNIT"); - // --- field : name --- + SW.StartEntity("CONVERSION_BASED_UNIT"); + // --- field : name --- - SW.Send(ent->Name()); - // --- field : conversionFactor --- + SW.Send(ent->Name()); + // --- field : conversionFactor --- - SW.Send(ent->ConversionFactor()); + SW.Send(ent->ConversionFactor()); - // --- Instance of common supertype NamedUnit --- + // --- Instance of common supertype NamedUnit --- - SW.StartEntity("NAMED_UNIT"); - // --- field : dimensions --- + SW.StartEntity("NAMED_UNIT"); + // --- field : dimensions --- - SW.Send(ent->Dimensions()); + SW.Send(ent->Dimensions()); - // --- Instance of plex componant PlaneAngleUnit --- + // --- Instance of plex component PlaneAngleUnit --- - SW.StartEntity("PLANE_ANGLE_UNIT"); + SW.StartEntity("PLANE_ANGLE_UNIT"); } void RWStepBasic_RWConversionBasedUnitAndPlaneAngleUnit::Share(const Handle(StepBasic_ConversionBasedUnitAndPlaneAngleUnit)& ent, Interface_EntityIterator& iter) const { - iter.GetOneItem(ent->Dimensions()); + iter.GetOneItem(ent->Dimensions()); - iter.GetOneItem(ent->ConversionFactor()); + iter.GetOneItem(ent->ConversionFactor()); } diff --git a/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndRatioUnit.cxx b/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndRatioUnit.cxx index 563b3f66b6..90fc7ae602 100644 --- a/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndRatioUnit.cxx +++ b/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndRatioUnit.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -26,89 +25,89 @@ RWStepBasic_RWConversionBasedUnitAndRatioUnit::RWStepBasic_RWConversionBasedUnitAndRatioUnit () {} void RWStepBasic_RWConversionBasedUnitAndRatioUnit::ReadStep - (const Handle(StepData_StepReaderData)& data, - const Standard_Integer num0, - Handle(Interface_Check)& ach, - const Handle(StepBasic_ConversionBasedUnitAndRatioUnit)& ent) const + (const Handle(StepData_StepReaderData)& data, + const Standard_Integer num0, + Handle(Interface_Check)& ach, + const Handle(StepBasic_ConversionBasedUnitAndRatioUnit)& ent) const { - Standard_Integer num = num0; + Standard_Integer num = num0; - // --- Instance of plex componant ConversionBasedUnit --- + // --- Instance of plex component ConversionBasedUnit --- - if (!data->CheckNbParams(num,2,ach,"conversion_based_unit")) return; + if (!data->CheckNbParams(num,2,ach,"conversion_based_unit")) return; - // --- field : name --- + // --- field : name --- - Handle(TCollection_HAsciiString) aName; - //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed - data->ReadString (num,1,"name",ach,aName); + Handle(TCollection_HAsciiString) aName; + //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed + data->ReadString (num,1,"name",ach,aName); - // --- field : conversionFactor --- + // --- field : conversionFactor --- - Handle(StepBasic_MeasureWithUnit) aConversionFactor; - //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed - data->ReadEntity(num, 2,"conversion_factor", ach, STANDARD_TYPE(StepBasic_MeasureWithUnit), aConversionFactor); + //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed + Handle(Standard_Transient) aConversionFactor; + data->ReadEntity(num, 2, "conversion_factor", ach, STANDARD_TYPE(Standard_Transient), aConversionFactor); - num = data->NextForComplex(num); + num = data->NextForComplex(num); - // --- Instance of common supertype NamedUnit --- + // --- Instance of common supertype NamedUnit --- - if (!data->CheckNbParams(num,1,ach,"named_unit")) return; + if (!data->CheckNbParams(num,1,ach,"named_unit")) return; - // --- field : dimensions --- + // --- field : dimensions --- - Handle(StepBasic_DimensionalExponents) aDimensions; - //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed - data->ReadEntity(num, 1,"dimensions", ach, STANDARD_TYPE(StepBasic_DimensionalExponents), aDimensions); + Handle(StepBasic_DimensionalExponents) aDimensions; + //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed + data->ReadEntity(num, 1,"dimensions", ach, STANDARD_TYPE(StepBasic_DimensionalExponents), aDimensions); - num = data->NextForComplex(num); + num = data->NextForComplex(num); - // --- Instance of plex componant RatioUnit --- + // --- Instance of plex component RatioUnit --- - if (!data->CheckNbParams(num,0,ach,"ratio_unit")) return; + if (!data->CheckNbParams(num,0,ach,"ratio_unit")) return; - //--- Initialisation of the red entity --- + //--- Initialisation of the red entity --- - ent->Init(aDimensions,aName,aConversionFactor); + ent->Init(aDimensions,aName, aConversionFactor); } void RWStepBasic_RWConversionBasedUnitAndRatioUnit::WriteStep - (StepData_StepWriter& SW, - const Handle(StepBasic_ConversionBasedUnitAndRatioUnit)& ent) const + (StepData_StepWriter& SW, + const Handle(StepBasic_ConversionBasedUnitAndRatioUnit)& ent) const { - // --- Instance of plex componant ConversionBasedUnit --- + // --- Instance of plex component ConversionBasedUnit --- - SW.StartEntity("CONVERSION_BASED_UNIT"); - // --- field : name --- + SW.StartEntity("CONVERSION_BASED_UNIT"); + // --- field : name --- - SW.Send(ent->Name()); - // --- field : conversionFactor --- + SW.Send(ent->Name()); + // --- field : conversionFactor --- - SW.Send(ent->ConversionFactor()); + SW.Send(ent->ConversionFactor()); - // --- Instance of plex componant RatioUnit --- + // --- Instance of plex component RatioUnit --- - SW.StartEntity("RATIO_UNIT"); + SW.StartEntity("RATIO_UNIT"); - // --- Instance of common supertype NamedUnit --- + // --- Instance of common supertype NamedUnit --- - SW.StartEntity("NAMED_UNIT"); - // --- field : dimensions --- + SW.StartEntity("NAMED_UNIT"); + // --- field : dimensions --- - SW.Send(ent->Dimensions()); + SW.Send(ent->Dimensions()); } void RWStepBasic_RWConversionBasedUnitAndRatioUnit::Share(const Handle(StepBasic_ConversionBasedUnitAndRatioUnit)& ent, Interface_EntityIterator& iter) const { - iter.GetOneItem(ent->Dimensions()); + iter.GetOneItem(ent->Dimensions()); - iter.GetOneItem(ent->ConversionFactor()); + iter.GetOneItem(ent->ConversionFactor()); } diff --git a/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndSolidAngleUnit.cxx b/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndSolidAngleUnit.cxx index 0dbb26656e..ed7c529189 100644 --- a/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndSolidAngleUnit.cxx +++ b/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndSolidAngleUnit.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -26,89 +25,89 @@ RWStepBasic_RWConversionBasedUnitAndSolidAngleUnit::RWStepBasic_RWConversionBasedUnitAndSolidAngleUnit () {} void RWStepBasic_RWConversionBasedUnitAndSolidAngleUnit::ReadStep - (const Handle(StepData_StepReaderData)& data, - const Standard_Integer num0, - Handle(Interface_Check)& ach, - const Handle(StepBasic_ConversionBasedUnitAndSolidAngleUnit)& ent) const + (const Handle(StepData_StepReaderData)& data, + const Standard_Integer num0, + Handle(Interface_Check)& ach, + const Handle(StepBasic_ConversionBasedUnitAndSolidAngleUnit)& ent) const { - Standard_Integer num = num0; + Standard_Integer num = num0; - // --- Instance of plex componant ConversionBasedUnit --- + // --- Instance of plex component ConversionBasedUnit --- - if (!data->CheckNbParams(num,2,ach,"conversion_based_unit")) return; + if (!data->CheckNbParams(num,2,ach,"conversion_based_unit")) return; - // --- field : name --- + // --- field : name --- - Handle(TCollection_HAsciiString) aName; - //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed - data->ReadString (num,1,"name",ach,aName); + Handle(TCollection_HAsciiString) aName; + //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed + data->ReadString (num,1,"name",ach,aName); - // --- field : conversionFactor --- + // --- field : conversionFactor --- - Handle(StepBasic_MeasureWithUnit) aConversionFactor; - //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed - data->ReadEntity(num, 2,"conversion_factor", ach, STANDARD_TYPE(StepBasic_MeasureWithUnit), aConversionFactor); + //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed + Handle(Standard_Transient) aConversionFactor; + data->ReadEntity (num, 2, "conversion_factor", ach, STANDARD_TYPE(Standard_Transient), aConversionFactor); - num = data->NextForComplex(num); + num = data->NextForComplex(num); - // --- Instance of common supertype NamedUnit --- + // --- Instance of common supertype NamedUnit --- - if (!data->CheckNbParams(num,1,ach,"named_unit")) return; - // --- field : dimensions --- + if (!data->CheckNbParams(num,1,ach,"named_unit")) return; + // --- field : dimensions --- - Handle(StepBasic_DimensionalExponents) aDimensions; - //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed - data->ReadEntity(num, 1,"dimensions", ach, STANDARD_TYPE(StepBasic_DimensionalExponents), aDimensions); + Handle(StepBasic_DimensionalExponents) aDimensions; + //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed + data->ReadEntity(num, 1,"dimensions", ach, STANDARD_TYPE(StepBasic_DimensionalExponents), aDimensions); - num = data->NextForComplex(num); + num = data->NextForComplex(num); - // --- Instance of plex componant SolidAngleUnit --- + // --- Instance of plex component SolidAngleUnit --- - if (!data->CheckNbParams(num,0,ach,"solid_angle_unit")) return; + if (!data->CheckNbParams(num,0,ach,"solid_angle_unit")) return; - //--- Initialisation of the red entity --- + //--- Initialisation of the red entity --- - ent->Init(aDimensions,aName,aConversionFactor); + ent->Init(aDimensions,aName,aConversionFactor); } void RWStepBasic_RWConversionBasedUnitAndSolidAngleUnit::WriteStep - (StepData_StepWriter& SW, - const Handle(StepBasic_ConversionBasedUnitAndSolidAngleUnit)& ent) const + (StepData_StepWriter& SW, + const Handle(StepBasic_ConversionBasedUnitAndSolidAngleUnit)& ent) const { - // --- Instance of plex componant ConversionBasedUnit --- + // --- Instance of plex component ConversionBasedUnit --- - SW.StartEntity("CONVERSION_BASED_UNIT"); - // --- field : name --- + SW.StartEntity("CONVERSION_BASED_UNIT"); + // --- field : name --- - SW.Send(ent->Name()); - // --- field : conversionFactor --- + SW.Send(ent->Name()); + // --- field : conversionFactor --- - SW.Send(ent->ConversionFactor()); + SW.Send(ent->ConversionFactor()); - // --- Instance of common supertype NamedUnit --- + // --- Instance of common supertype NamedUnit --- - SW.StartEntity("NAMED_UNIT"); - // --- field : dimensions --- + SW.StartEntity("NAMED_UNIT"); + // --- field : dimensions --- - SW.Send(ent->Dimensions()); + SW.Send(ent->Dimensions()); - // --- Instance of plex componant SolidAngleUnit --- + // --- Instance of plex component SolidAngleUnit --- - SW.StartEntity("SOLID_ANGLE_UNIT"); + SW.StartEntity("SOLID_ANGLE_UNIT"); } void RWStepBasic_RWConversionBasedUnitAndSolidAngleUnit::Share(const Handle(StepBasic_ConversionBasedUnitAndSolidAngleUnit)& ent, Interface_EntityIterator& iter) const { - iter.GetOneItem(ent->Dimensions()); + iter.GetOneItem(ent->Dimensions()); - iter.GetOneItem(ent->ConversionFactor()); + iter.GetOneItem(ent->ConversionFactor()); } diff --git a/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndTimeUnit.cxx b/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndTimeUnit.cxx index c7dd2d5c2e..dea8e2a637 100644 --- a/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndTimeUnit.cxx +++ b/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndTimeUnit.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -26,89 +25,88 @@ RWStepBasic_RWConversionBasedUnitAndTimeUnit::RWStepBasic_RWConversionBasedUnitAndTimeUnit () {} void RWStepBasic_RWConversionBasedUnitAndTimeUnit::ReadStep - (const Handle(StepData_StepReaderData)& data, - const Standard_Integer num0, - Handle(Interface_Check)& ach, - const Handle(StepBasic_ConversionBasedUnitAndTimeUnit)& ent) const + (const Handle(StepData_StepReaderData)& data, + const Standard_Integer num0, + Handle(Interface_Check)& ach, + const Handle(StepBasic_ConversionBasedUnitAndTimeUnit)& ent) const { - Standard_Integer num = num0; + Standard_Integer num = num0; - // --- Instance of plex componant ConversionBasedUnit --- + // --- Instance of plex component ConversionBasedUnit --- - if (!data->CheckNbParams(num,2,ach,"conversion_based_unit")) return; + if (!data->CheckNbParams(num,2,ach,"conversion_based_unit")) return; - // --- field : name --- + // --- field : name --- - Handle(TCollection_HAsciiString) aName; - //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed - data->ReadString (num,1,"name",ach,aName); + Handle(TCollection_HAsciiString) aName; + //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed + data->ReadString (num,1,"name",ach,aName); - // --- field : conversionFactor --- + // --- field : conversionFactor --- - Handle(StepBasic_MeasureWithUnit) aConversionFactor; - //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed - data->ReadEntity(num, 2,"conversion_factor", ach, STANDARD_TYPE(StepBasic_MeasureWithUnit), aConversionFactor); + //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed + Handle(Standard_Transient) aConversionFactor; + data->ReadEntity (num, 2, "conversion_factor", ach, STANDARD_TYPE(Standard_Transient), aConversionFactor); - num = data->NextForComplex(num); + num = data->NextForComplex(num); - // --- Instance of common supertype NamedUnit --- + // --- Instance of common supertype NamedUnit --- - if (!data->CheckNbParams(num,1,ach,"named_unit")) return; - // --- field : dimensions --- + if (!data->CheckNbParams(num,1,ach,"named_unit")) return; + // --- field : dimensions --- - Handle(StepBasic_DimensionalExponents) aDimensions; - //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed - data->ReadEntity(num, 1,"dimensions", ach, STANDARD_TYPE(StepBasic_DimensionalExponents), aDimensions); + Handle(StepBasic_DimensionalExponents) aDimensions; + //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed + data->ReadEntity(num, 1,"dimensions", ach, STANDARD_TYPE(StepBasic_DimensionalExponents), aDimensions); - num = data->NextForComplex(num); + num = data->NextForComplex(num); - // --- Instance of plex componant TimeUnit --- + // --- Instance of plex component TimeUnit --- - if (!data->CheckNbParams(num,0,ach,"time_unit")) return; + if (!data->CheckNbParams(num,0,ach,"time_unit")) return; - //--- Initialisation of the red entity --- + //--- Initialisation of the red entity --- - ent->Init(aDimensions,aName,aConversionFactor); + ent->Init(aDimensions,aName, aConversionFactor); } -void RWStepBasic_RWConversionBasedUnitAndTimeUnit::WriteStep - (StepData_StepWriter& SW, - const Handle(StepBasic_ConversionBasedUnitAndTimeUnit)& ent) const +void RWStepBasic_RWConversionBasedUnitAndTimeUnit::WriteStep(StepData_StepWriter& SW, + const Handle(StepBasic_ConversionBasedUnitAndTimeUnit)& ent) const { - // --- Instance of plex componant ConversionBasedUnit --- + // --- Instance of plex component ConversionBasedUnit --- - SW.StartEntity("CONVERSION_BASED_UNIT"); - // --- field : name --- + SW.StartEntity("CONVERSION_BASED_UNIT"); + // --- field : name --- - SW.Send(ent->Name()); - // --- field : conversionFactor --- + SW.Send(ent->Name()); + // --- field : conversionFactor --- - SW.Send(ent->ConversionFactor()); + SW.Send(ent->ConversionFactor()); - // --- Instance of plex componant TimeUnit --- + // --- Instance of plex component TimeUnit --- - SW.StartEntity("TIME_UNIT"); + SW.StartEntity("TIME_UNIT"); - // --- Instance of common supertype NamedUnit --- + // --- Instance of common supertype NamedUnit --- - SW.StartEntity("NAMED_UNIT"); - // --- field : dimensions --- + SW.StartEntity("NAMED_UNIT"); + // --- field : dimensions --- - SW.Send(ent->Dimensions()); + SW.Send(ent->Dimensions()); } void RWStepBasic_RWConversionBasedUnitAndTimeUnit::Share(const Handle(StepBasic_ConversionBasedUnitAndTimeUnit)& ent, Interface_EntityIterator& iter) const { - iter.GetOneItem(ent->Dimensions()); + iter.GetOneItem(ent->Dimensions()); - iter.GetOneItem(ent->ConversionFactor()); + iter.GetOneItem(ent->ConversionFactor()); } diff --git a/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndVolumeUnit.cxx b/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndVolumeUnit.cxx index 373b5076ff..ed168edcc5 100644 --- a/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndVolumeUnit.cxx +++ b/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndVolumeUnit.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include @@ -29,9 +28,9 @@ RWStepBasic_RWConversionBasedUnitAndVolumeUnit::RWStepBasic_RWConversionBasedUni } void RWStepBasic_RWConversionBasedUnitAndVolumeUnit::ReadStep(const Handle(StepData_StepReaderData)& data, - const Standard_Integer num0, - Handle(Interface_Check)& ach, - const Handle(StepBasic_ConversionBasedUnitAndVolumeUnit)& ent) const + const Standard_Integer num0, + Handle(Interface_Check)& ach, + const Handle(StepBasic_ConversionBasedUnitAndVolumeUnit)& ent) const { Standard_Integer num = num0; // --- Instance of plex componant ConversionBasedUnit --- @@ -40,8 +39,8 @@ void RWStepBasic_RWConversionBasedUnitAndVolumeUnit::ReadStep(const Handle(StepD data->ReadString (num,1,"name",ach,aName); // --- field : conversionFactor --- - Handle(StepBasic_MeasureWithUnit) aConversionFactor; - data->ReadEntity(num, 2,"conversion_factor", ach, STANDARD_TYPE(StepBasic_MeasureWithUnit), aConversionFactor); + Handle(Standard_Transient) aConversionFactor; + data->ReadEntity (num, 2, "conversion_factor", ach, STANDARD_TYPE(Standard_Transient), aConversionFactor); num = data->NextForComplex(num); if (!data->CheckNbParams(num,1,ach,"named_unit")) return; @@ -51,11 +50,11 @@ void RWStepBasic_RWConversionBasedUnitAndVolumeUnit::ReadStep(const Handle(StepD data->NamedForComplex("VOLUME_UNIT","VLMUNT",num0,num,ach); if (!data->CheckNbParams(num,0,ach,"volume_unit")) return; - ent->Init(aDimensions,aName,aConversionFactor); + ent->Init(aDimensions,aName, aConversionFactor); } void RWStepBasic_RWConversionBasedUnitAndVolumeUnit::WriteStep(StepData_StepWriter& SW, - const Handle(StepBasic_ConversionBasedUnitAndVolumeUnit)& ent) const + const Handle(StepBasic_ConversionBasedUnitAndVolumeUnit)& ent) const { SW.StartEntity("CONVERSION_BASED_UNIT"); SW.Send(ent->Name()); @@ -66,7 +65,7 @@ void RWStepBasic_RWConversionBasedUnitAndVolumeUnit::WriteStep(StepData_StepWrit } void RWStepBasic_RWConversionBasedUnitAndVolumeUnit::Share(const Handle(StepBasic_ConversionBasedUnitAndVolumeUnit)& ent, - Interface_EntityIterator& iter) const + Interface_EntityIterator& iter) const { iter.GetOneItem(ent->Dimensions()); iter.GetOneItem(ent->ConversionFactor()); diff --git a/src/RWStepDimTol/RWStepDimTol_RWAngularityTolerance.cxx b/src/RWStepDimTol/RWStepDimTol_RWAngularityTolerance.cxx index 2870df358c..33bbfff197 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWAngularityTolerance.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWAngularityTolerance.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -55,8 +54,8 @@ void RWStepDimTol_RWAngularityTolerance::ReadStep (const Handle(StepData_StepRea Handle(TCollection_HAsciiString) aGeometricTolerance_Description; data->ReadString (num, 2, "geometric_tolerance.description", ach, aGeometricTolerance_Description); - Handle(StepBasic_MeasureWithUnit) aGeometricTolerance_Magnitude; - data->ReadEntity (num, 3, "geometric_tolerance.magnitude", ach, STANDARD_TYPE(StepBasic_MeasureWithUnit), aGeometricTolerance_Magnitude); + Handle(Standard_Transient) aMagnitude; + data->ReadEntity (num, 3, "magnitude", ach, STANDARD_TYPE(Standard_Transient), aMagnitude); StepDimTol_GeometricToleranceTarget aGeometricTolerance_TolerancedShapeAspect; data->ReadEntity (num, 4, "geometric_tolerance.toleranced_shape_aspect", ach, aGeometricTolerance_TolerancedShapeAspect); @@ -79,7 +78,7 @@ void RWStepDimTol_RWAngularityTolerance::ReadStep (const Handle(StepData_StepRea // Initialize entity ent->Init(aGeometricTolerance_Name, aGeometricTolerance_Description, - aGeometricTolerance_Magnitude, + aMagnitude, aGeometricTolerance_TolerancedShapeAspect, aGeometricToleranceWithDatumReference_DatumSystem); } diff --git a/src/RWStepDimTol/RWStepDimTol_RWCircularRunoutTolerance.cxx b/src/RWStepDimTol/RWStepDimTol_RWCircularRunoutTolerance.cxx index 03da230b71..a56166440f 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWCircularRunoutTolerance.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWCircularRunoutTolerance.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -55,8 +54,8 @@ void RWStepDimTol_RWCircularRunoutTolerance::ReadStep (const Handle(StepData_Ste Handle(TCollection_HAsciiString) aGeometricTolerance_Description; data->ReadString (num, 2, "geometric_tolerance.description", ach, aGeometricTolerance_Description); - Handle(StepBasic_MeasureWithUnit) aGeometricTolerance_Magnitude; - data->ReadEntity (num, 3, "geometric_tolerance.magnitude", ach, STANDARD_TYPE(StepBasic_MeasureWithUnit), aGeometricTolerance_Magnitude); + Handle(Standard_Transient) aMagnitude; + data->ReadEntity (num, 3, "magnitude", ach, STANDARD_TYPE(Standard_Transient), aMagnitude); StepDimTol_GeometricToleranceTarget aGeometricTolerance_TolerancedShapeAspect; data->ReadEntity (num, 4, "geometric_tolerance.toleranced_shape_aspect", ach, aGeometricTolerance_TolerancedShapeAspect); @@ -79,7 +78,7 @@ void RWStepDimTol_RWCircularRunoutTolerance::ReadStep (const Handle(StepData_Ste // Initialize entity ent->Init(aGeometricTolerance_Name, aGeometricTolerance_Description, - aGeometricTolerance_Magnitude, + aMagnitude, aGeometricTolerance_TolerancedShapeAspect, aGeometricToleranceWithDatumReference_DatumSystem); } diff --git a/src/RWStepDimTol/RWStepDimTol_RWCoaxialityTolerance.cxx b/src/RWStepDimTol/RWStepDimTol_RWCoaxialityTolerance.cxx index d8d0c09df4..83e9abc127 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWCoaxialityTolerance.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWCoaxialityTolerance.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -55,8 +54,8 @@ void RWStepDimTol_RWCoaxialityTolerance::ReadStep (const Handle(StepData_StepRea Handle(TCollection_HAsciiString) aGeometricTolerance_Description; data->ReadString (num, 2, "geometric_tolerance.description", ach, aGeometricTolerance_Description); - Handle(StepBasic_MeasureWithUnit) aGeometricTolerance_Magnitude; - data->ReadEntity (num, 3, "geometric_tolerance.magnitude", ach, STANDARD_TYPE(StepBasic_MeasureWithUnit), aGeometricTolerance_Magnitude); + Handle(Standard_Transient) aMagnitude; + data->ReadEntity (num, 3, "magnitude", ach, STANDARD_TYPE(Standard_Transient), aMagnitude); StepDimTol_GeometricToleranceTarget aGeometricTolerance_TolerancedShapeAspect; data->ReadEntity (num, 4, "geometric_tolerance.toleranced_shape_aspect", ach, aGeometricTolerance_TolerancedShapeAspect); @@ -79,7 +78,7 @@ void RWStepDimTol_RWCoaxialityTolerance::ReadStep (const Handle(StepData_StepRea // Initialize entity ent->Init(aGeometricTolerance_Name, aGeometricTolerance_Description, - aGeometricTolerance_Magnitude, + aMagnitude, aGeometricTolerance_TolerancedShapeAspect, aGeometricToleranceWithDatumReference_DatumSystem); } diff --git a/src/RWStepDimTol/RWStepDimTol_RWConcentricityTolerance.cxx b/src/RWStepDimTol/RWStepDimTol_RWConcentricityTolerance.cxx index 63405520eb..3dbe4b7aae 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWConcentricityTolerance.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWConcentricityTolerance.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -55,8 +54,8 @@ void RWStepDimTol_RWConcentricityTolerance::ReadStep (const Handle(StepData_Step Handle(TCollection_HAsciiString) aGeometricTolerance_Description; data->ReadString (num, 2, "geometric_tolerance.description", ach, aGeometricTolerance_Description); - Handle(StepBasic_MeasureWithUnit) aGeometricTolerance_Magnitude; - data->ReadEntity (num, 3, "geometric_tolerance.magnitude", ach, STANDARD_TYPE(StepBasic_MeasureWithUnit), aGeometricTolerance_Magnitude); + Handle(Standard_Transient) aMagnitude; + data->ReadEntity (num, 3, "magnitude", ach, STANDARD_TYPE(Standard_Transient), aMagnitude); StepDimTol_GeometricToleranceTarget aGeometricTolerance_TolerancedShapeAspect; data->ReadEntity (num, 4, "geometric_tolerance.toleranced_shape_aspect", ach, aGeometricTolerance_TolerancedShapeAspect); @@ -79,7 +78,7 @@ void RWStepDimTol_RWConcentricityTolerance::ReadStep (const Handle(StepData_Step // Initialize entity ent->Init(aGeometricTolerance_Name, aGeometricTolerance_Description, - aGeometricTolerance_Magnitude, + aMagnitude, aGeometricTolerance_TolerancedShapeAspect, aGeometricToleranceWithDatumReference_DatumSystem); } diff --git a/src/RWStepDimTol/RWStepDimTol_RWCylindricityTolerance.cxx b/src/RWStepDimTol/RWStepDimTol_RWCylindricityTolerance.cxx index b0b60f0c13..e4a9084544 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWCylindricityTolerance.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWCylindricityTolerance.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -53,8 +52,8 @@ void RWStepDimTol_RWCylindricityTolerance::ReadStep (const Handle(StepData_StepR Handle(TCollection_HAsciiString) aGeometricTolerance_Description; data->ReadString (num, 2, "geometric_tolerance.description", ach, aGeometricTolerance_Description); - Handle(StepBasic_MeasureWithUnit) aGeometricTolerance_Magnitude; - data->ReadEntity (num, 3, "geometric_tolerance.magnitude", ach, STANDARD_TYPE(StepBasic_MeasureWithUnit), aGeometricTolerance_Magnitude); + Handle(Standard_Transient) aMagnitude; + data->ReadEntity (num, 3, "magnitude", ach, STANDARD_TYPE(Standard_Transient), aMagnitude); StepDimTol_GeometricToleranceTarget aGeometricTolerance_TolerancedShapeAspect; data->ReadEntity (num, 4, "geometric_tolerance.toleranced_shape_aspect", ach, aGeometricTolerance_TolerancedShapeAspect); @@ -62,7 +61,7 @@ void RWStepDimTol_RWCylindricityTolerance::ReadStep (const Handle(StepData_StepR // Initialize entity ent->Init(aGeometricTolerance_Name, aGeometricTolerance_Description, - aGeometricTolerance_Magnitude, + aMagnitude, aGeometricTolerance_TolerancedShapeAspect); } diff --git a/src/RWStepDimTol/RWStepDimTol_RWFlatnessTolerance.cxx b/src/RWStepDimTol/RWStepDimTol_RWFlatnessTolerance.cxx index e63396e512..5a2f82637b 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWFlatnessTolerance.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWFlatnessTolerance.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -36,7 +35,6 @@ RWStepDimTol_RWFlatnessTolerance::RWStepDimTol_RWFlatnessTolerance () //function : ReadStep //purpose : //======================================================================= - void RWStepDimTol_RWFlatnessTolerance::ReadStep (const Handle(StepData_StepReaderData)& data, const Standard_Integer num, Handle(Interface_Check)& ach, @@ -53,8 +51,8 @@ void RWStepDimTol_RWFlatnessTolerance::ReadStep (const Handle(StepData_StepReade Handle(TCollection_HAsciiString) aGeometricTolerance_Description; data->ReadString (num, 2, "geometric_tolerance.description", ach, aGeometricTolerance_Description); - Handle(StepBasic_MeasureWithUnit) aGeometricTolerance_Magnitude; - data->ReadEntity (num, 3, "geometric_tolerance.magnitude", ach, STANDARD_TYPE(StepBasic_MeasureWithUnit), aGeometricTolerance_Magnitude); + Handle(Standard_Transient) aMagnitude; + data->ReadEntity (num, 3, "magnitude", ach, STANDARD_TYPE(Standard_Transient), aMagnitude); StepDimTol_GeometricToleranceTarget aGeometricTolerance_TolerancedShapeAspect; data->ReadEntity (num, 4, "geometric_tolerance.toleranced_shape_aspect", ach, aGeometricTolerance_TolerancedShapeAspect); @@ -62,7 +60,7 @@ void RWStepDimTol_RWFlatnessTolerance::ReadStep (const Handle(StepData_StepReade // Initialize entity ent->Init(aGeometricTolerance_Name, aGeometricTolerance_Description, - aGeometricTolerance_Magnitude, + aMagnitude, aGeometricTolerance_TolerancedShapeAspect); } diff --git a/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRef.cxx b/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRef.cxx index 02331922e2..9e10f7f8e7 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRef.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRef.cxx @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include @@ -54,8 +53,10 @@ void RWStepDimTol_RWGeoTolAndGeoTolWthDatRef::ReadStep data->ReadString (num, 1, "name", ach, aName); Handle(TCollection_HAsciiString) aDescription; data->ReadString (num, 2, "description", ach, aDescription); - Handle(StepBasic_MeasureWithUnit) aMagnitude; - data->ReadEntity (num, 3, "magnitude", ach, STANDARD_TYPE(StepBasic_MeasureWithUnit), aMagnitude); + + Handle(Standard_Transient) aMagnitude; + data->ReadEntity (num, 3, "magnitude", ach, STANDARD_TYPE(Standard_Transient), aMagnitude); + StepDimTol_GeometricToleranceTarget aTolerancedShapeAspect; data->ReadEntity (num, 4, "toleranced_shape_aspect", ach, aTolerancedShapeAspect); diff --git a/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol.cxx b/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol.cxx index 37afafea53..1974ff1791 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -56,8 +55,10 @@ void RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol::ReadStep data->ReadString (num, 1, "name", ach, aName); Handle(TCollection_HAsciiString) aDescription; data->ReadString (num, 2, "description", ach, aDescription); - Handle(StepBasic_MeasureWithUnit) aMagnitude; - data->ReadEntity (num, 3, "magnitude", ach, STANDARD_TYPE(StepBasic_MeasureWithUnit), aMagnitude); + + Handle(Standard_Transient) aMagnitude; + data->ReadEntity (num, 3, "magnitude", ach, STANDARD_TYPE(Standard_Transient), aMagnitude); + StepDimTol_GeometricToleranceTarget aTolerancedShapeAspect; data->ReadEntity (num, 4, "toleranced_shape_aspect", ach, aTolerancedShapeAspect); diff --git a/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndGeoTolWthMod.cxx b/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndGeoTolWthMod.cxx index 4bb6bf7c07..f01b4fda12 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndGeoTolWthMod.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndGeoTolWthMod.cxx @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include @@ -55,8 +54,10 @@ void RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndGeoTolWthMod::ReadStep data->ReadString (num, 1, "name", ach, aName); Handle(TCollection_HAsciiString) aDescription; data->ReadString (num, 2, "description", ach, aDescription); - Handle(StepBasic_MeasureWithUnit) aMagnitude; - data->ReadEntity (num, 3, "magnitude", ach, STANDARD_TYPE(StepBasic_MeasureWithUnit), aMagnitude); + + Handle(Standard_Transient) aMagnitude; + data->ReadEntity (num, 3, "magnitude", ach, STANDARD_TYPE(Standard_Transient), aMagnitude); + StepDimTol_GeometricToleranceTarget aTolerancedShapeAspect; data->ReadEntity (num, 4, "toleranced_shape_aspect", ach, aTolerancedShapeAspect); diff --git a/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol.cxx b/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol.cxx index 42e1d203cd..1b1d844f4d 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol.cxx @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include @@ -53,8 +52,10 @@ void RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol::ReadStep data->ReadString (num, 1, "name", ach, aName); Handle(TCollection_HAsciiString) aDescription; data->ReadString (num, 2, "description", ach, aDescription); - Handle(StepBasic_MeasureWithUnit) aMagnitude; - data->ReadEntity (num, 3, "magnitude", ach, STANDARD_TYPE(StepBasic_MeasureWithUnit), aMagnitude); + + Handle(Standard_Transient) aMagnitude; + data->ReadEntity (num, 3, "magnitude", ach, STANDARD_TYPE(Standard_Transient), aMagnitude); + StepDimTol_GeometricToleranceTarget aTolerancedShapeAspect; data->ReadEntity (num, 4, "toleranced_shape_aspect", ach, aTolerancedShapeAspect); diff --git a/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndUneqDisGeoTol.cxx b/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndUneqDisGeoTol.cxx index 32dbc1dd1c..adc89bf75c 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndUneqDisGeoTol.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndUneqDisGeoTol.cxx @@ -56,8 +56,10 @@ void RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndUneqDisGeoTol::ReadStep data->ReadString (num, 1, "name", ach, aName); Handle(TCollection_HAsciiString) aDescription; data->ReadString (num, 2, "description", ach, aDescription); - Handle(StepBasic_MeasureWithUnit) aMagnitude; - data->ReadEntity (num, 3, "magnitude", ach, STANDARD_TYPE(StepBasic_MeasureWithUnit), aMagnitude); + + Handle(Standard_Transient) aMagnitude; + data->ReadEntity (num, 3, "magnitude", ach, STANDARD_TYPE(Standard_Transient), aMagnitude); + StepDimTol_GeometricToleranceTarget aTolerancedShapeAspect; data->ReadEntity (num, 4, "toleranced_shape_aspect", ach, aTolerancedShapeAspect); diff --git a/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthMaxTol.cxx b/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthMaxTol.cxx index 656730c426..41b37ba066 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthMaxTol.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthMaxTol.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -53,8 +52,10 @@ void RWStepDimTol_RWGeoTolAndGeoTolWthMaxTol::ReadStep data->ReadString (num, 1, "name", ach, aName); Handle(TCollection_HAsciiString) aDescription; data->ReadString (num, 2, "description", ach, aDescription); - Handle(StepBasic_MeasureWithUnit) aMagnitude; - data->ReadEntity (num, 3, "magnitude", ach, STANDARD_TYPE(StepBasic_MeasureWithUnit), aMagnitude); + + Handle(Standard_Transient) aMagnitude; + data->ReadEntity (num, 3, "magnitude", ach, STANDARD_TYPE(Standard_Transient), aMagnitude); + StepDimTol_GeometricToleranceTarget aTolerancedShapeAspect; data->ReadEntity (num, 4, "toleranced_shape_aspect", ach, aTolerancedShapeAspect); diff --git a/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthMod.cxx b/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthMod.cxx index 93ee607538..caf8994617 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthMod.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthMod.cxx @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include @@ -52,8 +51,10 @@ void RWStepDimTol_RWGeoTolAndGeoTolWthMod::ReadStep data->ReadString (num, 1, "name", ach, aName); Handle(TCollection_HAsciiString) aDescription; data->ReadString (num, 2, "description", ach, aDescription); - Handle(StepBasic_MeasureWithUnit) aMagnitude; - data->ReadEntity (num, 3, "magnitude", ach, STANDARD_TYPE(StepBasic_MeasureWithUnit), aMagnitude); + + Handle(Standard_Transient) aMagnitude; + data->ReadEntity (num, 3, "magnitude", ach, STANDARD_TYPE(Standard_Transient), aMagnitude); + StepDimTol_GeometricToleranceTarget aTolerancedShapeAspect; data->ReadEntity (num, 4, "toleranced_shape_aspect", ach, aTolerancedShapeAspect); diff --git a/src/RWStepDimTol/RWStepDimTol_RWGeometricTolerance.cxx b/src/RWStepDimTol/RWStepDimTol_RWGeometricTolerance.cxx index fad6ebec33..10241521ab 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWGeometricTolerance.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWGeometricTolerance.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -53,8 +52,8 @@ void RWStepDimTol_RWGeometricTolerance::ReadStep (const Handle(StepData_StepRead Handle(TCollection_HAsciiString) aDescription; data->ReadString (num, 2, "description", ach, aDescription); - Handle(StepBasic_MeasureWithUnit) aMagnitude; - data->ReadEntity (num, 3, "magnitude", ach, STANDARD_TYPE(StepBasic_MeasureWithUnit), aMagnitude); + Handle(Standard_Transient) aMagnitude; + data->ReadEntity (num, 3, "magnitude", ach, STANDARD_TYPE(Standard_Transient), aMagnitude); StepDimTol_GeometricToleranceTarget aTolerancedShapeAspect; data->ReadEntity (num, 4, "toleranced_shape_aspect", ach, aTolerancedShapeAspect); diff --git a/src/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithDatumReference.cxx b/src/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithDatumReference.cxx index 58db603caf..a83fe1df59 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithDatumReference.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithDatumReference.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -55,8 +54,8 @@ void RWStepDimTol_RWGeometricToleranceWithDatumReference::ReadStep (const Handle Handle(TCollection_HAsciiString) aGeometricTolerance_Description; data->ReadString (num, 2, "geometric_tolerance.description", ach, aGeometricTolerance_Description); - Handle(StepBasic_MeasureWithUnit) aGeometricTolerance_Magnitude; - data->ReadEntity (num, 3, "geometric_tolerance.magnitude", ach, STANDARD_TYPE(StepBasic_MeasureWithUnit), aGeometricTolerance_Magnitude); + Handle(Standard_Transient) aMagnitude; + data->ReadEntity (num, 3, "magnitude", ach, STANDARD_TYPE(Standard_Transient), aMagnitude); StepDimTol_GeometricToleranceTarget aGeometricTolerance_TolerancedShapeAspect; data->ReadEntity (num, 4, "geometric_tolerance.toleranced_shape_aspect", ach, aGeometricTolerance_TolerancedShapeAspect); @@ -79,7 +78,7 @@ void RWStepDimTol_RWGeometricToleranceWithDatumReference::ReadStep (const Handle // Initialize entity ent->Init(aGeometricTolerance_Name, aGeometricTolerance_Description, - aGeometricTolerance_Magnitude, + aMagnitude, aGeometricTolerance_TolerancedShapeAspect, aDatumSystem); } diff --git a/src/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithDefinedAreaUnit.cxx b/src/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithDefinedAreaUnit.cxx index 6bddf6e6ff..621286d382 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithDefinedAreaUnit.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithDefinedAreaUnit.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -56,8 +55,8 @@ void RWStepDimTol_RWGeometricToleranceWithDefinedAreaUnit:: Handle(TCollection_HAsciiString) aDescription; data->ReadString (num, 2, "geometric_tolerance.description", ach, aDescription); - Handle(StepBasic_MeasureWithUnit) aMagnitude; - data->ReadEntity (num, 3, "geometric_tolerance.magnitude", ach, STANDARD_TYPE(StepBasic_MeasureWithUnit), aMagnitude); + Handle(Standard_Transient) aMagnitude; + data->ReadEntity (num, 3, "magnitude", ach, STANDARD_TYPE(Standard_Transient), aMagnitude); StepDimTol_GeometricToleranceTarget aTolerancedShapeAspect; data->ReadEntity (num, 4, "geometric_tolerance.toleranced_shape_aspect", ach, aTolerancedShapeAspect); diff --git a/src/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithDefinedUnit.cxx b/src/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithDefinedUnit.cxx index ac88511be4..f549e1a518 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithDefinedUnit.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithDefinedUnit.cxx @@ -17,7 +17,6 @@ #include #include -#include #include #include #include @@ -53,8 +52,8 @@ void RWStepDimTol_RWGeometricToleranceWithDefinedUnit::ReadStep (const Handle(St Handle(TCollection_HAsciiString) aDescription; data->ReadString (num, 2, "geometric_tolerance.description", ach, aDescription); - Handle(StepBasic_MeasureWithUnit) aMagnitude; - data->ReadEntity (num, 3, "geometric_tolerance.magnitude", ach, STANDARD_TYPE(StepBasic_MeasureWithUnit), aMagnitude); + Handle(Standard_Transient) aMagnitude; + data->ReadEntity (num, 3, "magnitude", ach, STANDARD_TYPE(Standard_Transient), aMagnitude); StepDimTol_GeometricToleranceTarget aTolerancedShapeAspect; data->ReadEntity (num, 4, "geometric_tolerance.toleranced_shape_aspect", ach, aTolerancedShapeAspect); diff --git a/src/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithMaximumTolerance.cxx b/src/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithMaximumTolerance.cxx index f597d25211..7c4a20350a 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithMaximumTolerance.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithMaximumTolerance.cxx @@ -24,7 +24,6 @@ #include #include #include -#include //======================================================================= //function : RWStepDimTol_RWGeometricTolerance @@ -57,8 +56,8 @@ void RWStepDimTol_RWGeometricToleranceWithMaximumTolerance:: Handle(TCollection_HAsciiString) aDescription; data->ReadString (num, 2, "geometric_tolerance.description", ach, aDescription); - Handle(StepBasic_MeasureWithUnit) aMagnitude; - data->ReadEntity (num, 3, "geometric_tolerance.magnitude", ach, STANDARD_TYPE(StepBasic_MeasureWithUnit), aMagnitude); + Handle(Standard_Transient) aMagnitude; + data->ReadEntity (num, 3, "magnitude", ach, STANDARD_TYPE(Standard_Transient), aMagnitude); StepDimTol_GeometricToleranceTarget aTolerancedShapeAspect; data->ReadEntity (num, 4, "geometric_tolerance.toleranced_shape_aspect", ach, aTolerancedShapeAspect); diff --git a/src/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithModifiers.cxx b/src/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithModifiers.cxx index ea23bbbcbf..ef90d4be84 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithModifiers.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithModifiers.cxx @@ -17,7 +17,6 @@ #include #include -#include #include #include #include @@ -56,8 +55,8 @@ void RWStepDimTol_RWGeometricToleranceWithModifiers:: Handle(TCollection_HAsciiString) aDescription; data->ReadString (num, 2, "geometric_tolerance.description", ach, aDescription); - Handle(StepBasic_MeasureWithUnit) aMagnitude; - data->ReadEntity (num, 3, "geometric_tolerance.magnitude", ach, STANDARD_TYPE(StepBasic_MeasureWithUnit), aMagnitude); + Handle(Standard_Transient) aMagnitude; + data->ReadEntity (num, 3, "magnitude", ach, STANDARD_TYPE(Standard_Transient), aMagnitude); StepDimTol_GeometricToleranceTarget aTolerancedShapeAspect; data->ReadEntity (num, 4, "geometric_tolerance.toleranced_shape_aspect", ach, aTolerancedShapeAspect); diff --git a/src/RWStepDimTol/RWStepDimTol_RWLineProfileTolerance.cxx b/src/RWStepDimTol/RWStepDimTol_RWLineProfileTolerance.cxx index 5566474009..c6f9af7832 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWLineProfileTolerance.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWLineProfileTolerance.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -53,8 +52,8 @@ void RWStepDimTol_RWLineProfileTolerance::ReadStep (const Handle(StepData_StepRe Handle(TCollection_HAsciiString) aGeometricTolerance_Description; data->ReadString (num, 2, "geometric_tolerance.description", ach, aGeometricTolerance_Description); - Handle(StepBasic_MeasureWithUnit) aGeometricTolerance_Magnitude; - data->ReadEntity (num, 3, "geometric_tolerance.magnitude", ach, STANDARD_TYPE(StepBasic_MeasureWithUnit), aGeometricTolerance_Magnitude); + Handle(Standard_Transient) aMagnitude; + data->ReadEntity (num, 3, "magnitude", ach, STANDARD_TYPE(Standard_Transient), aMagnitude); StepDimTol_GeometricToleranceTarget aGeometricTolerance_TolerancedShapeAspect; data->ReadEntity (num, 4, "geometric_tolerance.toleranced_shape_aspect", ach, aGeometricTolerance_TolerancedShapeAspect); @@ -62,7 +61,7 @@ void RWStepDimTol_RWLineProfileTolerance::ReadStep (const Handle(StepData_StepRe // Initialize entity ent->Init(aGeometricTolerance_Name, aGeometricTolerance_Description, - aGeometricTolerance_Magnitude, + aMagnitude, aGeometricTolerance_TolerancedShapeAspect); } diff --git a/src/RWStepDimTol/RWStepDimTol_RWModifiedGeometricTolerance.cxx b/src/RWStepDimTol/RWStepDimTol_RWModifiedGeometricTolerance.cxx index e6cce261f2..ff0e204bf2 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWModifiedGeometricTolerance.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWModifiedGeometricTolerance.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -53,8 +52,8 @@ void RWStepDimTol_RWModifiedGeometricTolerance::ReadStep (const Handle(StepData_ Handle(TCollection_HAsciiString) aGeometricTolerance_Description; data->ReadString (num, 2, "geometric_tolerance.description", ach, aGeometricTolerance_Description); - Handle(StepBasic_MeasureWithUnit) aGeometricTolerance_Magnitude; - data->ReadEntity (num, 3, "geometric_tolerance.magnitude", ach, STANDARD_TYPE(StepBasic_MeasureWithUnit), aGeometricTolerance_Magnitude); + Handle(Standard_Transient) aMagnitude; + data->ReadEntity (num, 3, "magnitude", ach, STANDARD_TYPE(Standard_Transient), aMagnitude); StepDimTol_GeometricToleranceTarget aGeometricTolerance_TolerancedShapeAspect; data->ReadEntity (num, 4, "geometric_tolerance.toleranced_shape_aspect", ach, aGeometricTolerance_TolerancedShapeAspect); @@ -74,7 +73,7 @@ void RWStepDimTol_RWModifiedGeometricTolerance::ReadStep (const Handle(StepData_ // Initialize entity ent->Init(aGeometricTolerance_Name, aGeometricTolerance_Description, - aGeometricTolerance_Magnitude, + aMagnitude, aGeometricTolerance_TolerancedShapeAspect, aModifier); } diff --git a/src/RWStepDimTol/RWStepDimTol_RWParallelismTolerance.cxx b/src/RWStepDimTol/RWStepDimTol_RWParallelismTolerance.cxx index 878b90f2bf..b02bd86ebc 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWParallelismTolerance.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWParallelismTolerance.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -55,8 +54,8 @@ void RWStepDimTol_RWParallelismTolerance::ReadStep (const Handle(StepData_StepRe Handle(TCollection_HAsciiString) aGeometricTolerance_Description; data->ReadString (num, 2, "geometric_tolerance.description", ach, aGeometricTolerance_Description); - Handle(StepBasic_MeasureWithUnit) aGeometricTolerance_Magnitude; - data->ReadEntity (num, 3, "geometric_tolerance.magnitude", ach, STANDARD_TYPE(StepBasic_MeasureWithUnit), aGeometricTolerance_Magnitude); + Handle(Standard_Transient) aMagnitude; + data->ReadEntity (num, 3, "magnitude", ach, STANDARD_TYPE(Standard_Transient), aMagnitude); StepDimTol_GeometricToleranceTarget aGeometricTolerance_TolerancedShapeAspect; data->ReadEntity (num, 4, "geometric_tolerance.toleranced_shape_aspect", ach, aGeometricTolerance_TolerancedShapeAspect); @@ -79,7 +78,7 @@ void RWStepDimTol_RWParallelismTolerance::ReadStep (const Handle(StepData_StepRe // Initialize entity ent->Init(aGeometricTolerance_Name, aGeometricTolerance_Description, - aGeometricTolerance_Magnitude, + aMagnitude, aGeometricTolerance_TolerancedShapeAspect, aGeometricToleranceWithDatumReference_DatumSystem); } diff --git a/src/RWStepDimTol/RWStepDimTol_RWPerpendicularityTolerance.cxx b/src/RWStepDimTol/RWStepDimTol_RWPerpendicularityTolerance.cxx index 3bad573e48..9d84d0c431 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWPerpendicularityTolerance.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWPerpendicularityTolerance.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -55,8 +54,8 @@ void RWStepDimTol_RWPerpendicularityTolerance::ReadStep (const Handle(StepData_S Handle(TCollection_HAsciiString) aGeometricTolerance_Description; data->ReadString (num, 2, "geometric_tolerance.description", ach, aGeometricTolerance_Description); - Handle(StepBasic_MeasureWithUnit) aGeometricTolerance_Magnitude; - data->ReadEntity (num, 3, "geometric_tolerance.magnitude", ach, STANDARD_TYPE(StepBasic_MeasureWithUnit), aGeometricTolerance_Magnitude); + Handle(Standard_Transient) aMagnitude; + data->ReadEntity (num, 3, "magnitude", ach, STANDARD_TYPE(Standard_Transient), aMagnitude); StepDimTol_GeometricToleranceTarget aGeometricTolerance_TolerancedShapeAspect; data->ReadEntity (num, 4, "geometric_tolerance.toleranced_shape_aspect", ach, aGeometricTolerance_TolerancedShapeAspect); @@ -79,7 +78,7 @@ void RWStepDimTol_RWPerpendicularityTolerance::ReadStep (const Handle(StepData_S // Initialize entity ent->Init(aGeometricTolerance_Name, aGeometricTolerance_Description, - aGeometricTolerance_Magnitude, + aMagnitude, aGeometricTolerance_TolerancedShapeAspect, aGeometricToleranceWithDatumReference_DatumSystem); } diff --git a/src/RWStepDimTol/RWStepDimTol_RWPositionTolerance.cxx b/src/RWStepDimTol/RWStepDimTol_RWPositionTolerance.cxx index 65d170e74a..03e3d19b95 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWPositionTolerance.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWPositionTolerance.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -53,8 +52,8 @@ void RWStepDimTol_RWPositionTolerance::ReadStep (const Handle(StepData_StepReade Handle(TCollection_HAsciiString) aGeometricTolerance_Description; data->ReadString (num, 2, "geometric_tolerance.description", ach, aGeometricTolerance_Description); - Handle(StepBasic_MeasureWithUnit) aGeometricTolerance_Magnitude; - data->ReadEntity (num, 3, "geometric_tolerance.magnitude", ach, STANDARD_TYPE(StepBasic_MeasureWithUnit), aGeometricTolerance_Magnitude); + Handle(Standard_Transient) aMagnitude; + data->ReadEntity (num, 3, "magnitude", ach, STANDARD_TYPE(Standard_Transient), aMagnitude); StepDimTol_GeometricToleranceTarget aGeometricTolerance_TolerancedShapeAspect; data->ReadEntity (num, 4, "geometric_tolerance.toleranced_shape_aspect", ach, aGeometricTolerance_TolerancedShapeAspect); @@ -62,7 +61,7 @@ void RWStepDimTol_RWPositionTolerance::ReadStep (const Handle(StepData_StepReade // Initialize entity ent->Init(aGeometricTolerance_Name, aGeometricTolerance_Description, - aGeometricTolerance_Magnitude, + aMagnitude, aGeometricTolerance_TolerancedShapeAspect); } diff --git a/src/RWStepDimTol/RWStepDimTol_RWRoundnessTolerance.cxx b/src/RWStepDimTol/RWStepDimTol_RWRoundnessTolerance.cxx index 0436927862..f72e393527 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWRoundnessTolerance.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWRoundnessTolerance.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -53,8 +52,8 @@ void RWStepDimTol_RWRoundnessTolerance::ReadStep (const Handle(StepData_StepRead Handle(TCollection_HAsciiString) aGeometricTolerance_Description; data->ReadString (num, 2, "geometric_tolerance.description", ach, aGeometricTolerance_Description); - Handle(StepBasic_MeasureWithUnit) aGeometricTolerance_Magnitude; - data->ReadEntity (num, 3, "geometric_tolerance.magnitude", ach, STANDARD_TYPE(StepBasic_MeasureWithUnit), aGeometricTolerance_Magnitude); + Handle(Standard_Transient) aMagnitude; + data->ReadEntity (num, 3, "magnitude", ach, STANDARD_TYPE(Standard_Transient), aMagnitude); StepDimTol_GeometricToleranceTarget aGeometricTolerance_TolerancedShapeAspect; data->ReadEntity (num, 4, "geometric_tolerance.toleranced_shape_aspect", ach, aGeometricTolerance_TolerancedShapeAspect); @@ -62,7 +61,7 @@ void RWStepDimTol_RWRoundnessTolerance::ReadStep (const Handle(StepData_StepRead // Initialize entity ent->Init(aGeometricTolerance_Name, aGeometricTolerance_Description, - aGeometricTolerance_Magnitude, + aMagnitude, aGeometricTolerance_TolerancedShapeAspect); } diff --git a/src/RWStepDimTol/RWStepDimTol_RWStraightnessTolerance.cxx b/src/RWStepDimTol/RWStepDimTol_RWStraightnessTolerance.cxx index eb1b89a3a9..79bc0f5e72 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWStraightnessTolerance.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWStraightnessTolerance.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -53,8 +52,8 @@ void RWStepDimTol_RWStraightnessTolerance::ReadStep (const Handle(StepData_StepR Handle(TCollection_HAsciiString) aGeometricTolerance_Description; data->ReadString (num, 2, "geometric_tolerance.description", ach, aGeometricTolerance_Description); - Handle(StepBasic_MeasureWithUnit) aGeometricTolerance_Magnitude; - data->ReadEntity (num, 3, "geometric_tolerance.magnitude", ach, STANDARD_TYPE(StepBasic_MeasureWithUnit), aGeometricTolerance_Magnitude); + Handle(Standard_Transient) aMagnitude; + data->ReadEntity (num, 3, "magnitude", ach, STANDARD_TYPE(Standard_Transient), aMagnitude); StepDimTol_GeometricToleranceTarget aGeometricTolerance_TolerancedShapeAspect; data->ReadEntity (num, 4, "geometric_tolerance.toleranced_shape_aspect", ach, aGeometricTolerance_TolerancedShapeAspect); @@ -62,7 +61,7 @@ void RWStepDimTol_RWStraightnessTolerance::ReadStep (const Handle(StepData_StepR // Initialize entity ent->Init(aGeometricTolerance_Name, aGeometricTolerance_Description, - aGeometricTolerance_Magnitude, + aMagnitude, aGeometricTolerance_TolerancedShapeAspect); } diff --git a/src/RWStepDimTol/RWStepDimTol_RWSurfaceProfileTolerance.cxx b/src/RWStepDimTol/RWStepDimTol_RWSurfaceProfileTolerance.cxx index b2e336b2f2..93c8dd2aae 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWSurfaceProfileTolerance.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWSurfaceProfileTolerance.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -53,8 +52,8 @@ void RWStepDimTol_RWSurfaceProfileTolerance::ReadStep (const Handle(StepData_Ste Handle(TCollection_HAsciiString) aGeometricTolerance_Description; data->ReadString (num, 2, "geometric_tolerance.description", ach, aGeometricTolerance_Description); - Handle(StepBasic_MeasureWithUnit) aGeometricTolerance_Magnitude; - data->ReadEntity (num, 3, "geometric_tolerance.magnitude", ach, STANDARD_TYPE(StepBasic_MeasureWithUnit), aGeometricTolerance_Magnitude); + Handle(Standard_Transient) aMagnitude; + data->ReadEntity (num, 3, "magnitude", ach, STANDARD_TYPE(Standard_Transient), aMagnitude); StepDimTol_GeometricToleranceTarget aGeometricTolerance_TolerancedShapeAspect; data->ReadEntity (num, 4, "geometric_tolerance.toleranced_shape_aspect", ach, aGeometricTolerance_TolerancedShapeAspect); @@ -62,7 +61,7 @@ void RWStepDimTol_RWSurfaceProfileTolerance::ReadStep (const Handle(StepData_Ste // Initialize entity ent->Init(aGeometricTolerance_Name, aGeometricTolerance_Description, - aGeometricTolerance_Magnitude, + aMagnitude, aGeometricTolerance_TolerancedShapeAspect); } diff --git a/src/RWStepDimTol/RWStepDimTol_RWSymmetryTolerance.cxx b/src/RWStepDimTol/RWStepDimTol_RWSymmetryTolerance.cxx index 1863db7d67..9778b27ca1 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWSymmetryTolerance.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWSymmetryTolerance.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -55,8 +54,8 @@ void RWStepDimTol_RWSymmetryTolerance::ReadStep (const Handle(StepData_StepReade Handle(TCollection_HAsciiString) aGeometricTolerance_Description; data->ReadString (num, 2, "geometric_tolerance.description", ach, aGeometricTolerance_Description); - Handle(StepBasic_MeasureWithUnit) aGeometricTolerance_Magnitude; - data->ReadEntity (num, 3, "geometric_tolerance.magnitude", ach, STANDARD_TYPE(StepBasic_MeasureWithUnit), aGeometricTolerance_Magnitude); + Handle(Standard_Transient) aMagnitude; + data->ReadEntity (num, 3, "magnitude", ach, STANDARD_TYPE(Standard_Transient), aMagnitude); StepDimTol_GeometricToleranceTarget aGeometricTolerance_TolerancedShapeAspect; data->ReadEntity (num, 4, "geometric_tolerance.toleranced_shape_aspect", ach, aGeometricTolerance_TolerancedShapeAspect); @@ -79,7 +78,7 @@ void RWStepDimTol_RWSymmetryTolerance::ReadStep (const Handle(StepData_StepReade // Initialize entity ent->Init(aGeometricTolerance_Name, aGeometricTolerance_Description, - aGeometricTolerance_Magnitude, + aMagnitude, aGeometricTolerance_TolerancedShapeAspect, aGeometricToleranceWithDatumReference_DatumSystem); } diff --git a/src/RWStepDimTol/RWStepDimTol_RWTotalRunoutTolerance.cxx b/src/RWStepDimTol/RWStepDimTol_RWTotalRunoutTolerance.cxx index 6d80d0eec0..e70bddb9f1 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWTotalRunoutTolerance.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWTotalRunoutTolerance.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -55,8 +54,8 @@ void RWStepDimTol_RWTotalRunoutTolerance::ReadStep (const Handle(StepData_StepRe Handle(TCollection_HAsciiString) aGeometricTolerance_Description; data->ReadString (num, 2, "geometric_tolerance.description", ach, aGeometricTolerance_Description); - Handle(StepBasic_MeasureWithUnit) aGeometricTolerance_Magnitude; - data->ReadEntity (num, 3, "geometric_tolerance.magnitude", ach, STANDARD_TYPE(StepBasic_MeasureWithUnit), aGeometricTolerance_Magnitude); + Handle(Standard_Transient) aMagnitude; + data->ReadEntity (num, 3, "magnitude", ach, STANDARD_TYPE(Standard_Transient), aMagnitude); StepDimTol_GeometricToleranceTarget aGeometricTolerance_TolerancedShapeAspect; data->ReadEntity (num, 4, "geometric_tolerance.toleranced_shape_aspect", ach, aGeometricTolerance_TolerancedShapeAspect); @@ -79,7 +78,7 @@ void RWStepDimTol_RWTotalRunoutTolerance::ReadStep (const Handle(StepData_StepRe // Initialize entity ent->Init(aGeometricTolerance_Name, aGeometricTolerance_Description, - aGeometricTolerance_Magnitude, + aMagnitude, aGeometricTolerance_TolerancedShapeAspect, aGeometricToleranceWithDatumReference_DatumSystem); } diff --git a/src/RWStepDimTol/RWStepDimTol_RWUnequallyDisposedGeometricTolerance.cxx b/src/RWStepDimTol/RWStepDimTol_RWUnequallyDisposedGeometricTolerance.cxx index cb2bafa8f4..4037f75dde 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWUnequallyDisposedGeometricTolerance.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWUnequallyDisposedGeometricTolerance.cxx @@ -54,8 +54,8 @@ void RWStepDimTol_RWUnequallyDisposedGeometricTolerance:: Handle(TCollection_HAsciiString) aDescription; data->ReadString (num, 2, "geometric_tolerance.description", ach, aDescription); - Handle(StepBasic_MeasureWithUnit) aMagnitude; - data->ReadEntity (num, 3, "geometric_tolerance.magnitude", ach, STANDARD_TYPE(StepBasic_MeasureWithUnit), aMagnitude); + Handle(Standard_Transient) aMagnitude; + data->ReadEntity (num, 3, "magnitude", ach, STANDARD_TYPE(Standard_Transient), aMagnitude); StepDimTol_GeometricToleranceTarget aTolerancedShapeAspect; data->ReadEntity (num, 4, "geometric_tolerance.toleranced_shape_aspect", ach, aTolerancedShapeAspect); diff --git a/src/RWStepRepr/RWStepRepr_RWMakeFromUsageOption.cxx b/src/RWStepRepr/RWStepRepr_RWMakeFromUsageOption.cxx index 1687c59130..0a7f6e31e3 100644 --- a/src/RWStepRepr/RWStepRepr_RWMakeFromUsageOption.cxx +++ b/src/RWStepRepr/RWStepRepr_RWMakeFromUsageOption.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -76,8 +75,8 @@ void RWStepRepr_RWMakeFromUsageOption::ReadStep (const Handle(StepData_StepReade Handle(TCollection_HAsciiString) aRankingRationale; data->ReadString (num, 7, "ranking_rationale", ach, aRankingRationale); - Handle(StepBasic_MeasureWithUnit) aQuantity; - data->ReadEntity (num, 8, "quantity", ach, STANDARD_TYPE(StepBasic_MeasureWithUnit), aQuantity); + Handle(Standard_Transient) aQuantity; + data->ReadEntity (num, 8, "quantity", ach, STANDARD_TYPE(Standard_Transient), aQuantity); // Initialize entity ent->Init(aProductDefinitionRelationship_Id, diff --git a/src/RWStepRepr/RWStepRepr_RWParallelOffset.cxx b/src/RWStepRepr/RWStepRepr_RWParallelOffset.cxx index dbcb6d5017..7a98f8c214 100644 --- a/src/RWStepRepr/RWStepRepr_RWParallelOffset.cxx +++ b/src/RWStepRepr/RWStepRepr_RWParallelOffset.cxx @@ -16,7 +16,6 @@ #include #include -#include #include #include #include @@ -62,8 +61,8 @@ void RWStepRepr_RWParallelOffset::ReadStep (const Handle(StepData_StepReaderData // Own fields of ParallelOffset - Handle(StepBasic_MeasureWithUnit) anOffset; - data->ReadEntity (num, 5, "offset", ach, STANDARD_TYPE(StepBasic_MeasureWithUnit), anOffset); + Handle(Standard_Transient) anOffset; + data->ReadEntity(num, 5, "offset", ach, STANDARD_TYPE(Standard_Transient), anOffset); // Initialize entity ent->Init(aShapeAspect_Name, diff --git a/src/RWStepRepr/RWStepRepr_RWQuantifiedAssemblyComponentUsage.cxx b/src/RWStepRepr/RWStepRepr_RWQuantifiedAssemblyComponentUsage.cxx index 549cf852bc..d130e197d3 100644 --- a/src/RWStepRepr/RWStepRepr_RWQuantifiedAssemblyComponentUsage.cxx +++ b/src/RWStepRepr/RWStepRepr_RWQuantifiedAssemblyComponentUsage.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -81,8 +80,8 @@ void RWStepRepr_RWQuantifiedAssemblyComponentUsage::ReadStep (const Handle(StepD // Own fields of QuantifiedAssemblyComponentUsage - Handle(StepBasic_MeasureWithUnit) aQuantity; - data->ReadEntity (num, 7, "quantity", ach, STANDARD_TYPE(StepBasic_MeasureWithUnit), aQuantity); + Handle(Standard_Transient) aQuantity; + data->ReadEntity (num, 7, "quantity", ach, STANDARD_TYPE(Standard_Transient), aQuantity); // Initialize entity ent->Init(aProductDefinitionRelationship_Id, diff --git a/src/RWStepShape/RWStepShape_RWMeasureQualification.cxx b/src/RWStepShape/RWStepShape_RWMeasureQualification.cxx index 1ecdac40b1..fc0031b36f 100644 --- a/src/RWStepShape/RWStepShape_RWMeasureQualification.cxx +++ b/src/RWStepShape/RWStepShape_RWMeasureQualification.cxx @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include @@ -25,57 +24,53 @@ RWStepShape_RWMeasureQualification::RWStepShape_RWMeasureQualification () {} -void RWStepShape_RWMeasureQualification::ReadStep - (const Handle(StepData_StepReaderData)& data, - const Standard_Integer num, - Handle(Interface_Check)& ach, - const Handle(StepShape_MeasureQualification)& ent) const +void RWStepShape_RWMeasureQualification::ReadStep(const Handle(StepData_StepReaderData)& data, + const Standard_Integer num, + Handle(Interface_Check)& ach, + const Handle(StepShape_MeasureQualification)& ent) const { + // --- Number of Parameter Control --- - // --- Number of Parameter Control --- + if (!data->CheckNbParams(num,4,ach,"measure_qualification")) return; - if (!data->CheckNbParams(num,4,ach,"measure_qualification")) return; + // --- own field : name --- - // --- own field : name --- + Handle(TCollection_HAsciiString) aName; + data->ReadString (num,1,"name",ach,aName); - Handle(TCollection_HAsciiString) aName; - data->ReadString (num,1,"name",ach,aName); + // --- own field : description --- - // --- own field : description --- + Handle(TCollection_HAsciiString) aDescr; + data->ReadString (num,2,"description",ach,aDescr); - Handle(TCollection_HAsciiString) aDescr; - data->ReadString (num,2,"description",ach,aDescr); + // --- own field : qualified_measure --- - // --- own field : qualified_measure --- + Handle(Standard_Transient) aQualifiedMeasure; + data->ReadEntity (num, 3, "qualified_measure", ach, STANDARD_TYPE(Standard_Transient), aQualifiedMeasure); - Handle(StepBasic_MeasureWithUnit) aQM; - data->ReadEntity (num,3,"qualified_measure",ach, - STANDARD_TYPE(StepBasic_MeasureWithUnit),aQM); + // --- own field : qualifiers --- - // --- own field : qualifiers --- + Handle(StepShape_HArray1OfValueQualifier) quals; + Standard_Integer nsub4; + if (data->ReadSubList (num,4,"qualifiers",ach,nsub4)) { + Standard_Integer nb4 = data->NbParams(nsub4); + quals = new StepShape_HArray1OfValueQualifier (1,nb4); + for (Standard_Integer i4 = 1; i4 <= nb4; i4 ++) { + StepShape_ValueQualifier VQ; + if (data->ReadEntity (nsub4,i4,"qualifier",ach,VQ)) + quals->SetValue (i4,VQ); + } + } - Handle(StepShape_HArray1OfValueQualifier) quals; - Standard_Integer nsub4; - if (data->ReadSubList (num,4,"qualifiers",ach,nsub4)) { - Standard_Integer nb4 = data->NbParams(nsub4); - quals = new StepShape_HArray1OfValueQualifier (1,nb4); - for (Standard_Integer i4 = 1; i4 <= nb4; i4 ++) { - StepShape_ValueQualifier VQ; - if (data->ReadEntity (nsub4,i4,"qualifier",ach,VQ)) - quals->SetValue (i4,VQ); - } - } + //--- Initialisation of the read entity --- - //--- Initialisation of the read entity --- - - ent->Init(aName, aDescr, aQM, quals); + ent->Init(aName, aDescr, aQualifiedMeasure, quals); } -void RWStepShape_RWMeasureQualification::WriteStep - (StepData_StepWriter& SW, - const Handle(StepShape_MeasureQualification)& ent) const +void RWStepShape_RWMeasureQualification::WriteStep(StepData_StepWriter& SW, + const Handle(StepShape_MeasureQualification)& ent) const { SW.Send(ent->Name()); SW.Send(ent->Description()); diff --git a/src/RWStepShape/RWStepShape_RWToleranceValue.cxx b/src/RWStepShape/RWStepShape_RWToleranceValue.cxx index f2821fa002..fb3c0aed73 100644 --- a/src/RWStepShape/RWStepShape_RWToleranceValue.cxx +++ b/src/RWStepShape/RWStepShape_RWToleranceValue.cxx @@ -15,12 +15,9 @@ #include #include #include -#include #include #include #include -#include -#include RWStepShape_RWToleranceValue::RWStepShape_RWToleranceValue () {} @@ -30,52 +27,26 @@ void RWStepShape_RWToleranceValue::ReadStep Handle(Interface_Check)& ach, const Handle(StepShape_ToleranceValue)& ent) const { - // --- Number of Parameter Control --- + // --- Number of Parameter Control --- - if (!data->CheckNbParams(num,2,ach,"tolerance_value")) return; + if (!data->CheckNbParams(num,2,ach,"tolerance_value")) return; - // --- own field : lower_bound --- + // --- own field : lower_bound --- - Handle(Standard_Transient) LB; - if(!data->ReadEntity (num,1,"lower_bound",ach, - STANDARD_TYPE(StepBasic_MeasureWithUnit),LB)) - { - Handle(StepRepr_MeasureRepresentationItem) aMSR; - Handle(StepRepr_ReprItemAndMeasureWithUnit) aRIMU; - - if(data->ReadEntity (num,1,"lower_bound",ach, - STANDARD_TYPE(StepRepr_MeasureRepresentationItem),aMSR) || - data->ReadEntity (num,1,"lower_bound",ach,STANDARD_TYPE(StepRepr_ReprItemAndMeasureWithUnit), aRIMU)) - { - if(!aMSR.IsNull()) - LB = aMSR; - else if(!aRIMU.IsNull()) - LB = aRIMU; - } - } + Handle(Standard_Transient) aLowerBound; + data->ReadEntity (num, 1, "lower_bound", ach, STANDARD_TYPE(Standard_Transient), aLowerBound); // --- own field : upper_bound --- - Handle(Standard_Transient) UB; - if(!data->ReadEntity (num,2,"upper_bound",ach, - STANDARD_TYPE(StepBasic_MeasureWithUnit),UB)) - { - Handle(StepRepr_MeasureRepresentationItem) aMSR1; - Handle(StepRepr_ReprItemAndMeasureWithUnit) aRIMU1; - if(data->ReadEntity (num,2,"upper_bound",ach,STANDARD_TYPE(StepRepr_MeasureRepresentationItem),aMSR1) || - data->ReadEntity (num,2,"upper_bound",ach,STANDARD_TYPE(StepRepr_ReprItemAndMeasureWithUnit), aRIMU1)) - { - if(!aMSR1.IsNull()) - UB = aMSR1; - else if(!aRIMU1.IsNull()) - UB = aRIMU1; - } - } + Handle(Standard_Transient) anUpperBound; + data->ReadEntity (num, 2, "upper_bound", ach, STANDARD_TYPE(Standard_Transient), anUpperBound); - //--- Initialisation of the read entity --- - if( !LB.IsNull() && !UB.IsNull()) + //--- Initialisation of the read entity --- + if (!aLowerBound.IsNull() && !anUpperBound.IsNull()) + { ach->ClearFails(); - ent->Init(LB,UB); + } + ent->Init(aLowerBound, anUpperBound); } diff --git a/src/RWStepVisual/FILES b/src/RWStepVisual/FILES index 5c396ba9ae..c1c2ee0ab6 100644 --- a/src/RWStepVisual/FILES +++ b/src/RWStepVisual/FILES @@ -160,5 +160,33 @@ RWStepVisual_RWCoordinatesList.hxx RWStepVisual_RWCoordinatesList.cxx RWStepVisual_RWTessellatedCurveSet.hxx RWStepVisual_RWTessellatedCurveSet.cxx - - +RWStepVisual_RWComplexTriangulatedFace.cxx +RWStepVisual_RWComplexTriangulatedFace.hxx +RWStepVisual_RWComplexTriangulatedSurfaceSet.cxx +RWStepVisual_RWComplexTriangulatedSurfaceSet.hxx +RWStepVisual_RWCubicBezierTessellatedEdge.cxx +RWStepVisual_RWCubicBezierTessellatedEdge.hxx +RWStepVisual_RWCubicBezierTriangulatedFace.cxx +RWStepVisual_RWCubicBezierTriangulatedFace.hxx +RWStepVisual_RWTessellatedConnectingEdge.cxx +RWStepVisual_RWTessellatedConnectingEdge.hxx +RWStepVisual_RWTessellatedEdge.cxx +RWStepVisual_RWTessellatedEdge.hxx +RWStepVisual_RWTessellatedPointSet.cxx +RWStepVisual_RWTessellatedPointSet.hxx +RWStepVisual_RWTessellatedShapeRepresentation.cxx +RWStepVisual_RWTessellatedShapeRepresentation.hxx +RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters.cxx +RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters.hxx +RWStepVisual_RWTessellatedShell.cxx +RWStepVisual_RWTessellatedShell.hxx +RWStepVisual_RWTessellatedSolid.cxx +RWStepVisual_RWTessellatedSolid.hxx +RWStepVisual_RWTessellatedStructuredItem.cxx +RWStepVisual_RWTessellatedStructuredItem.hxx +RWStepVisual_RWTessellatedVertex.cxx +RWStepVisual_RWTessellatedVertex.hxx +RWStepVisual_RWTessellatedWire.cxx +RWStepVisual_RWTessellatedWire.hxx +RWStepVisual_RWTriangulatedFace.cxx +RWStepVisual_RWTriangulatedFace.hxx diff --git a/src/RWStepVisual/RWStepVisual_RWComplexTriangulatedFace.cxx b/src/RWStepVisual/RWStepVisual_RWComplexTriangulatedFace.cxx new file mode 100644 index 0000000000..266d02d91a --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWComplexTriangulatedFace.cxx @@ -0,0 +1,271 @@ +// Created on : Thu Mar 24 18:30:11 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepVisual_RWComplexTriangulatedFace +//purpose : +//======================================================================= + +RWStepVisual_RWComplexTriangulatedFace::RWStepVisual_RWComplexTriangulatedFace() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= + +void RWStepVisual_RWComplexTriangulatedFace::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_ComplexTriangulatedFace)& theEnt) const +{ + // Check number of parameters + if (!theData->CheckNbParams(theNum, 8, theCheck, "complex_triangulated_face")) + { + return; + } + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString(theNum, 1, "representation_item.name", theCheck, aRepresentationItem_Name); + + // Inherited fields of TessellatedFace + + Handle(StepVisual_CoordinatesList) aTessellatedFace_Coordinates; + theData->ReadEntity(theNum, 2, "tessellated_face.coordinates", theCheck, + STANDARD_TYPE(StepVisual_CoordinatesList), aTessellatedFace_Coordinates); + + Standard_Integer aTessellatedFace_Pnmax; + theData->ReadInteger(theNum, 3, "tessellated_face.pnmax", theCheck, aTessellatedFace_Pnmax); + + Handle(TColStd_HArray2OfReal) aTessellatedFace_Normals; + Standard_Integer sub4 = 0; + if (theData->ReadSubList(theNum, 4, "tessellated_face.normals", theCheck, sub4)) + { + Standard_Integer nb0 = theData->NbParams(sub4); + Standard_Integer nbj0 = theData->NbParams(theData->ParamNumber(sub4,1)); + aTessellatedFace_Normals = new TColStd_HArray2OfReal(1, nb0, 1, nbj0); + for (Standard_Integer i0 = 1; i0 <= nb0; i0++) + { + Standard_Integer subj4 = 0; + if ( theData->ReadSubList (sub4, i0, "sub-part(tessellated_face.normals)", theCheck, subj4) ) { + Standard_Integer num4 = subj4; + for (Standard_Integer j0 = 1; j0 <= nbj0; j0++) + { + Standard_Real anIt0; + theData->ReadReal(num4, j0, "real", theCheck, anIt0); + aTessellatedFace_Normals->SetValue(i0,j0, anIt0); + } + } + } + } + + StepVisual_FaceOrSurface aTessellatedFace_GeometricLink; + Standard_Boolean hasTessellatedFace_GeometricLink = Standard_True; + if (theData->IsParamDefined(theNum, 5)) + { + theData->ReadEntity(theNum, 5, "tessellated_face.geometric_link", theCheck, aTessellatedFace_GeometricLink); + } + else + { + hasTessellatedFace_GeometricLink = Standard_False; + aTessellatedFace_GeometricLink = StepVisual_FaceOrSurface(); + } + + // Own fields of ComplexTriangulatedFace + + Handle(TColStd_HArray1OfInteger) aPnindex; + Standard_Integer sub6 = 0; + if (theData->ReadSubList(theNum, 6, "pnindex", theCheck, sub6)) + { + Standard_Integer nb0 = theData->NbParams(sub6); + aPnindex = new TColStd_HArray1OfInteger(1, nb0); + Standard_Integer num2 = sub6; + for (Standard_Integer i0 = 1; i0 <= nb0; i0++) + { + Standard_Integer anIt0; + theData->ReadInteger(num2, i0, "integer", theCheck, anIt0); + aPnindex->SetValue(i0, anIt0); + } + } + + Handle(TColStd_HArray2OfInteger) aTriangleStrips; + Standard_Integer sub7 = 0; + if (theData->ReadSubList(theNum, 7, "triangle_strips", theCheck, sub7)) + { + Standard_Integer nb0 = theData->NbParams(sub7); + Standard_Integer nbj0 = theData->NbParams(theData->ParamNumber(sub7,1)); + aTriangleStrips = new TColStd_HArray2OfInteger(1, nb0, 1, nbj0); + for (Standard_Integer i0 = 1; i0 <= nb0; i0++) + { + Standard_Integer subj7 = 0; + if ( theData->ReadSubList (sub7, i0, "sub-part(triangle_strips)", theCheck, subj7) ) { + Standard_Integer num4 = subj7; + for (Standard_Integer j0 = 1; j0 <= nbj0; j0++) + { + Standard_Integer anIt0; + theData->ReadInteger(num4, j0, "integer", theCheck, anIt0); + aTriangleStrips->SetValue(i0,j0, anIt0); + } + } + } + } + + Handle(TColStd_HArray2OfInteger) aTriangleFans; + Standard_Integer sub8 = 0; + if (theData->ReadSubList(theNum, 8, "triangle_fans", theCheck, sub8)) + { + Standard_Integer nb0 = theData->NbParams(sub8); + Standard_Integer nbj0 = theData->NbParams(theData->ParamNumber(sub8,1)); + aTriangleFans = new TColStd_HArray2OfInteger(1, nb0, 1, nbj0); + for (Standard_Integer i0 = 1; i0 <= nb0; i0++) + { + Standard_Integer subj8 = 0; + if ( theData->ReadSubList (sub8, i0, "sub-part(triangle_fans)", theCheck, subj8) ) { + Standard_Integer num4 = subj8; + for (Standard_Integer j0 = 1; j0 <= nbj0; j0++) + { + Standard_Integer anIt0; + theData->ReadInteger(num4, j0, "integer", theCheck, anIt0); + aTriangleFans->SetValue(i0,j0, anIt0); + } + } + } + } + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, aTessellatedFace_Coordinates, aTessellatedFace_Pnmax, aTessellatedFace_Normals, hasTessellatedFace_GeometricLink, aTessellatedFace_GeometricLink, aPnindex, aTriangleStrips, aTriangleFans); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= + +void RWStepVisual_RWComplexTriangulatedFace::WriteStep (StepData_StepWriter& theSW, + const Handle(StepVisual_ComplexTriangulatedFace)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send(theEnt->Name()); + + // Own fields of TessellatedFace + + theSW.Send(theEnt->Coordinates()); + + theSW.Send(theEnt->Pnmax()); + + theSW.OpenSub(); + for (Standard_Integer i3 = 1; i3 <= theEnt->Normals()->RowLength(); i3++) + { + theSW.NewLine(Standard_False); + theSW.OpenSub(); + for (Standard_Integer j3 = 1; j3 <= theEnt->Normals()->ColLength(); j3++) + { + Standard_Real Var0 = theEnt->Normals()->Value(i3,j3); + theSW.Send(Var0); + } + theSW.CloseSub(); + } + theSW.CloseSub(); + + if (theEnt->HasGeometricLink()) + { + theSW.Send(theEnt->GeometricLink().Value()); + } + else + { + theSW.SendUndef(); + } + + // Own fields of ComplexTriangulatedFace + + theSW.OpenSub(); + for (Standard_Integer i5 = 1; i5 <= theEnt->Pnindex()->Length(); i5++) + { + Standard_Integer Var0 = theEnt->Pnindex()->Value(i5); + theSW.Send(Var0); + } + theSW.CloseSub(); + + theSW.OpenSub(); + for (Standard_Integer i6 = 1; i6 <= theEnt->TriangleStrips()->RowLength(); i6++) + { + theSW.NewLine(Standard_False); + theSW.OpenSub(); + for (Standard_Integer j6 = 1; j6 <= theEnt->TriangleStrips()->ColLength(); j6++) + { + Standard_Integer Var0 = theEnt->TriangleStrips()->Value(i6,j6); + theSW.Send(Var0); + } + theSW.CloseSub(); + } + theSW.CloseSub(); + + theSW.OpenSub(); + for (Standard_Integer i7 = 1; i7 <= theEnt->TriangleFans()->RowLength(); i7++) + { + theSW.NewLine(Standard_False); + theSW.OpenSub(); + for (Standard_Integer j7 = 1; j7 <= theEnt->TriangleFans()->ColLength(); j7++) + { + Standard_Integer Var0 = theEnt->TriangleFans()->Value(i7,j7); + theSW.Send(Var0); + } + theSW.CloseSub(); + } + theSW.CloseSub(); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= + +void RWStepVisual_RWComplexTriangulatedFace::Share (const Handle(StepVisual_ComplexTriangulatedFace)&theEnt, + Interface_EntityIterator& theIter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of TessellatedFace + + theIter.AddItem(theEnt->StepVisual_TessellatedFace::Coordinates()); + + if (theEnt->StepVisual_TessellatedFace::HasGeometricLink()) + { + theIter.AddItem(theEnt->StepVisual_TessellatedFace::GeometricLink().Value()); + } + + // Own fields of ComplexTriangulatedFace +} diff --git a/src/RWStepVisual/RWStepVisual_RWComplexTriangulatedFace.hxx b/src/RWStepVisual/RWStepVisual_RWComplexTriangulatedFace.hxx new file mode 100644 index 0000000000..d87a02ccb9 --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWComplexTriangulatedFace.hxx @@ -0,0 +1,53 @@ +// Created on : Thu Mar 24 18:30:11 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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_RWComplexTriangulatedFace_HeaderFile_ +#define _RWStepVisual_RWComplexTriangulatedFace_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepVisual_ComplexTriangulatedFace; + +//! Read & Write tool for ComplexTriangulatedFace +class RWStepVisual_RWComplexTriangulatedFace +{ + +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepVisual_RWComplexTriangulatedFace(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_ComplexTriangulatedFace)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, + const Handle(StepVisual_ComplexTriangulatedFace)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepVisual_ComplexTriangulatedFace)& theEnt, + Interface_EntityIterator& theIter) const; + +}; + +#endif // _RWStepVisual_RWComplexTriangulatedFace_HeaderFile_ diff --git a/src/RWStepVisual/RWStepVisual_RWComplexTriangulatedSurfaceSet.cxx b/src/RWStepVisual/RWStepVisual_RWComplexTriangulatedSurfaceSet.cxx new file mode 100644 index 0000000000..0bd832d90a --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWComplexTriangulatedSurfaceSet.cxx @@ -0,0 +1,254 @@ +// Created on : Thu Mar 24 18:30:11 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepVisual_RWComplexTriangulatedSurfaceSet +//purpose : +//======================================================================= + +RWStepVisual_RWComplexTriangulatedSurfaceSet::RWStepVisual_RWComplexTriangulatedSurfaceSet() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= + +void RWStepVisual_RWComplexTriangulatedSurfaceSet::ReadStep( + const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_ComplexTriangulatedSurfaceSet)& theEnt) const +{ + // Check number of parameters + if (!theData->CheckNbParams(theNum, 7, theCheck, "complex_triangulated_surface_set")) + { + return; + } + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString(theNum, 1, "representation_item.name", theCheck, aRepresentationItem_Name); + + // Inherited fields of TessellatedSurfaceSet + + Handle(StepVisual_CoordinatesList) aTessellatedSurfaceSet_Coordinates; + theData->ReadEntity(theNum, 2, "tessellated_surface_set.coordinates", theCheck, + STANDARD_TYPE(StepVisual_CoordinatesList), aTessellatedSurfaceSet_Coordinates); + + Standard_Integer aTessellatedSurfaceSet_Pnmax; + theData->ReadInteger(theNum, 3, "tessellated_surface_set.pnmax", theCheck, aTessellatedSurfaceSet_Pnmax); + + Handle(TColStd_HArray2OfReal) aTessellatedSurfaceSet_Normals; + Standard_Integer sub4 = 0; + if (theData->ReadSubList(theNum, 4, "tessellated_surface_set.normals", theCheck, sub4)) + { + Standard_Integer nb0 = theData->NbParams(sub4); + Standard_Integer nbj0 = theData->NbParams(theData->ParamNumber(sub4,1)); + aTessellatedSurfaceSet_Normals = new TColStd_HArray2OfReal(1, nb0, 1, nbj0); + for (Standard_Integer i0 = 1; i0 <= nb0; i0++) + { + Standard_Integer subj4 = 0; + if ( theData->ReadSubList (sub4, i0, "sub-part(tessellated_surface_set.normals)", theCheck, subj4) ) { + Standard_Integer num4 = subj4; + for (Standard_Integer j0 = 1; j0 <= nbj0; j0++) + { + Standard_Real anIt0; + theData->ReadReal(num4, j0, "real", theCheck, anIt0); + aTessellatedSurfaceSet_Normals->SetValue(i0,j0, anIt0); + } + } + } + } + + // Own fields of ComplexTriangulatedSurfaceSet + + Handle(TColStd_HArray1OfInteger) aPnindex; + Standard_Integer sub5 = 0; + if (theData->ReadSubList(theNum, 5, "pnindex", theCheck, sub5)) + { + Standard_Integer nb0 = theData->NbParams(sub5); + aPnindex = new TColStd_HArray1OfInteger(1, nb0); + Standard_Integer num2 = sub5; + for (Standard_Integer i0 = 1; i0 <= nb0; i0++) + { + Standard_Integer anIt0; + theData->ReadInteger(num2, i0, "integer", theCheck, anIt0); + aPnindex->SetValue(i0, anIt0); + } + } + + Handle(TColStd_HArray1OfTransient) aTriangleStrips; + Standard_Integer sub6 = 0; + if (theData->ReadSubList(theNum, 6, "triangle_strips", theCheck, sub6)) + { + Standard_Integer nb0 = theData->NbParams(sub6); + aTriangleStrips = new TColStd_HArray1OfTransient(1, nb0); + for (Standard_Integer i0 = 1; i0 <= nb0; i0++) + { + Standard_Integer nbj0 = theData->NbParams(theData->ParamNumber(sub6, i0)); + Handle(TColStd_HArray1OfInteger) aSingleTriangleStrip = new TColStd_HArray1OfInteger(1, nbj0); + Standard_Integer subj6 = 0; + if ( theData->ReadSubList (sub6, i0, "sub-part(triangle_strips)", theCheck, subj6) ) { + Standard_Integer num4 = subj6; + for (Standard_Integer j0 = 1; j0 <= nbj0; j0++) + { + Standard_Integer anIt0; + theData->ReadInteger(num4, j0, "integer", theCheck, anIt0); + aSingleTriangleStrip->SetValue(j0, anIt0); + } + aTriangleStrips->SetValue(i0, aSingleTriangleStrip); + } + } + } + + Handle(TColStd_HArray1OfTransient) aTriangleFans; + Standard_Integer sub7 = 0; + if (theData->ReadSubList(theNum, 7, "triangle_fans", theCheck, sub7)) + { + Standard_Integer nb0 = theData->NbParams(sub7); + aTriangleFans = new TColStd_HArray1OfTransient(1, nb0); + for (Standard_Integer i0 = 1; i0 <= nb0; i0++) + { + Standard_Integer nbj0 = theData->NbParams(theData->ParamNumber(sub7, i0)); + Handle(TColStd_HArray1OfInteger) aSingleTriangleFan = new TColStd_HArray1OfInteger(1, nbj0); + Standard_Integer subj7 = 0; + if ( theData->ReadSubList (sub7, i0, "sub-part(triangle_fans)", theCheck, subj7) ) { + Standard_Integer num4 = subj7; + for (Standard_Integer j0 = 1; j0 <= nbj0; j0++) + { + Standard_Integer anIt0; + theData->ReadInteger(num4, j0, "integer", theCheck, anIt0); + aSingleTriangleFan->SetValue(j0, anIt0); + } + aTriangleFans->SetValue(i0, aSingleTriangleFan); + } + } + } + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, aTessellatedSurfaceSet_Coordinates, aTessellatedSurfaceSet_Pnmax, aTessellatedSurfaceSet_Normals, aPnindex, aTriangleStrips, aTriangleFans); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= + +void RWStepVisual_RWComplexTriangulatedSurfaceSet::WriteStep( + StepData_StepWriter& theSW, + const Handle(StepVisual_ComplexTriangulatedSurfaceSet)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send(theEnt->Name()); + + // Own fields of TessellatedSurfaceSet + + theSW.Send(theEnt->Coordinates()); + + theSW.Send(theEnt->Pnmax()); + + theSW.OpenSub(); + for (Standard_Integer i3 = 1; i3 <= theEnt->Normals()->RowLength(); i3++) + { + theSW.NewLine(Standard_False); + theSW.OpenSub(); + for (Standard_Integer j3 = 1; j3 <= theEnt->Normals()->ColLength(); j3++) + { + Standard_Real Var0 = theEnt->Normals()->Value(i3,j3); + theSW.Send(Var0); + } + theSW.CloseSub(); + } + theSW.CloseSub(); + + // Own fields of ComplexTriangulatedSurfaceSet + + theSW.OpenSub(); + for (Standard_Integer i4 = 1; i4 <= theEnt->Pnindex()->Length(); i4++) + { + Standard_Integer Var0 = theEnt->Pnindex()->Value(i4); + theSW.Send(Var0); + } + theSW.CloseSub(); + + theSW.OpenSub(); + for (Standard_Integer i5 = 1; i5 <= theEnt->NbTriangleStrips(); i5++) + { + theSW.NewLine(Standard_False); + theSW.OpenSub(); + Handle(TColStd_HArray1OfInteger) aTriangleStrip = Handle(TColStd_HArray1OfInteger)::DownCast(theEnt->TriangleStrips()->Value(i5)); + for (Standard_Integer j5 = 1; j5 <= aTriangleStrip->Length(); j5++) + { + Standard_Integer Var0 = aTriangleStrip->Value(j5); + theSW.Send(Var0); + } + theSW.CloseSub(); + } + theSW.CloseSub(); + + theSW.OpenSub(); + for (Standard_Integer i6 = 1; i6 <= theEnt->NbTriangleFans(); i6++) + { + theSW.NewLine(Standard_False); + theSW.OpenSub(); + Handle(TColStd_HArray1OfInteger) aTriangleFan = Handle(TColStd_HArray1OfInteger)::DownCast(theEnt->TriangleFans()->Value(i6)); + for (Standard_Integer j6 = 1; j6 <= aTriangleFan->Length(); j6++) + { + Standard_Integer Var0 = aTriangleFan->Value(j6); + theSW.Send(Var0); + } + theSW.CloseSub(); + } + theSW.CloseSub(); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= + +void RWStepVisual_RWComplexTriangulatedSurfaceSet::Share( + const Handle(StepVisual_ComplexTriangulatedSurfaceSet)&theEnt, +Interface_EntityIterator& theIter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of TessellatedSurfaceSet + + theIter.AddItem(theEnt->StepVisual_TessellatedSurfaceSet::Coordinates()); + + // Own fields of ComplexTriangulatedSurfaceSet +} diff --git a/src/RWStepVisual/RWStepVisual_RWComplexTriangulatedSurfaceSet.hxx b/src/RWStepVisual/RWStepVisual_RWComplexTriangulatedSurfaceSet.hxx new file mode 100644 index 0000000000..2564dee6b4 --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWComplexTriangulatedSurfaceSet.hxx @@ -0,0 +1,53 @@ +// Created on : Thu Mar 24 18:30:11 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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_RWComplexTriangulatedSurfaceSet_HeaderFile_ +#define _RWStepVisual_RWComplexTriangulatedSurfaceSet_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepVisual_ComplexTriangulatedSurfaceSet; + +//! Read & Write tool for ComplexTriangulatedSurfaceSet +class RWStepVisual_RWComplexTriangulatedSurfaceSet +{ + +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepVisual_RWComplexTriangulatedSurfaceSet(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_ComplexTriangulatedSurfaceSet)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, + const Handle(StepVisual_ComplexTriangulatedSurfaceSet)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepVisual_ComplexTriangulatedSurfaceSet)& theEnt, + Interface_EntityIterator& theIter) const; + +}; + +#endif // _RWStepVisual_RWComplexTriangulatedSurfaceSet_HeaderFile_ diff --git a/src/RWStepVisual/RWStepVisual_RWCubicBezierTessellatedEdge.cxx b/src/RWStepVisual/RWStepVisual_RWCubicBezierTessellatedEdge.cxx new file mode 100644 index 0000000000..b7a18ac584 --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWCubicBezierTessellatedEdge.cxx @@ -0,0 +1,151 @@ +// Created on : Thu Mar 24 18:30:11 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepVisual_RWCubicBezierTessellatedEdge +//purpose : +//======================================================================= + +RWStepVisual_RWCubicBezierTessellatedEdge::RWStepVisual_RWCubicBezierTessellatedEdge() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= + +void RWStepVisual_RWCubicBezierTessellatedEdge::ReadStep( + const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_CubicBezierTessellatedEdge)& theEnt) const +{ + // Check number of parameters + if (!theData->CheckNbParams(theNum, 4, theCheck, "cubic_bezier_tessellated_edge")) + { + return; + } + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString(theNum, 1, "representation_item.name", theCheck, aRepresentationItem_Name); + + // Inherited fields of TessellatedEdge + + Handle(StepVisual_CoordinatesList) aTessellatedEdge_Coordinates; + theData->ReadEntity(theNum, 2, "tessellated_edge.coordinates", theCheck, + STANDARD_TYPE(StepVisual_CoordinatesList), aTessellatedEdge_Coordinates); + + StepVisual_EdgeOrCurve aTessellatedEdge_GeometricLink; + Standard_Boolean hasTessellatedEdge_GeometricLink = Standard_True; + if (theData->IsParamDefined(theNum, 3)) + { + theData->ReadEntity(theNum, 3, "tessellated_edge.geometric_link", theCheck, aTessellatedEdge_GeometricLink); + } + else + { + hasTessellatedEdge_GeometricLink = Standard_False; + aTessellatedEdge_GeometricLink = StepVisual_EdgeOrCurve(); + } + + Handle(TColStd_HArray1OfInteger) aTessellatedEdge_LineStrip; + Standard_Integer sub4 = 0; + if (theData->ReadSubList(theNum, 4, "tessellated_edge.line_strip", theCheck, sub4)) + { + Standard_Integer nb0 = theData->NbParams(sub4); + aTessellatedEdge_LineStrip = new TColStd_HArray1OfInteger(1, nb0); + Standard_Integer num2 = sub4; + for (Standard_Integer i0 = 1; i0 <= nb0; i0++) + { + Standard_Integer anIt0; + theData->ReadInteger(num2, i0, "integer", theCheck, anIt0); + aTessellatedEdge_LineStrip->SetValue(i0, anIt0); + } + } + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, aTessellatedEdge_Coordinates, hasTessellatedEdge_GeometricLink, aTessellatedEdge_GeometricLink, aTessellatedEdge_LineStrip); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= + +void RWStepVisual_RWCubicBezierTessellatedEdge::WriteStep( + StepData_StepWriter& theSW, + const Handle(StepVisual_CubicBezierTessellatedEdge)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send(theEnt->Name()); + + // Own fields of TessellatedEdge + + theSW.Send(theEnt->Coordinates()); + + if (theEnt->HasGeometricLink()) + { + theSW.Send(theEnt->GeometricLink().Value()); + } + else + { + theSW.SendUndef(); + } + + theSW.OpenSub(); + for (Standard_Integer i3 = 1; i3 <= theEnt->LineStrip()->Length(); i3++) + { + Standard_Integer Var0 = theEnt->LineStrip()->Value(i3); + theSW.Send(Var0); + } + theSW.CloseSub(); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= + +void RWStepVisual_RWCubicBezierTessellatedEdge::Share( + const Handle(StepVisual_CubicBezierTessellatedEdge)&theEnt, +Interface_EntityIterator& theIter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of TessellatedEdge + + theIter.AddItem(theEnt->StepVisual_TessellatedEdge::Coordinates()); + + if (theEnt->StepVisual_TessellatedEdge::HasGeometricLink()) + { + theIter.AddItem(theEnt->StepVisual_TessellatedEdge::GeometricLink().Value()); + } +} diff --git a/src/RWStepVisual/RWStepVisual_RWCubicBezierTessellatedEdge.hxx b/src/RWStepVisual/RWStepVisual_RWCubicBezierTessellatedEdge.hxx new file mode 100644 index 0000000000..20d41bd22d --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWCubicBezierTessellatedEdge.hxx @@ -0,0 +1,53 @@ +// Created on : Thu Mar 24 18:30:11 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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_RWCubicBezierTessellatedEdge_HeaderFile_ +#define _RWStepVisual_RWCubicBezierTessellatedEdge_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepVisual_CubicBezierTessellatedEdge; + +//! Read & Write tool for CubicBezierTessellatedEdge +class RWStepVisual_RWCubicBezierTessellatedEdge +{ + +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepVisual_RWCubicBezierTessellatedEdge(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_CubicBezierTessellatedEdge)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, + const Handle(StepVisual_CubicBezierTessellatedEdge)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepVisual_CubicBezierTessellatedEdge)& theEnt, + Interface_EntityIterator& theIter) const; + +}; + +#endif // _RWStepVisual_RWCubicBezierTessellatedEdge_HeaderFile_ diff --git a/src/RWStepVisual/RWStepVisual_RWCubicBezierTriangulatedFace.cxx b/src/RWStepVisual/RWStepVisual_RWCubicBezierTriangulatedFace.cxx new file mode 100644 index 0000000000..4cd7be5f92 --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWCubicBezierTriangulatedFace.cxx @@ -0,0 +1,215 @@ +// Created on : Thu Mar 24 18:30:11 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepVisual_RWCubicBezierTriangulatedFace +//purpose : +//======================================================================= + +RWStepVisual_RWCubicBezierTriangulatedFace::RWStepVisual_RWCubicBezierTriangulatedFace() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= + +void RWStepVisual_RWCubicBezierTriangulatedFace::ReadStep( + const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_CubicBezierTriangulatedFace)& theEnt) const +{ + // Check number of parameters + if (!theData->CheckNbParams(theNum, 6, theCheck, "cubic_bezier_triangulated_face")) + { + return; + } + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString(theNum, 1, "representation_item.name", theCheck, aRepresentationItem_Name); + + // Inherited fields of TessellatedFace + + Handle(StepVisual_CoordinatesList) aTessellatedFace_Coordinates; + theData->ReadEntity(theNum, 2, "tessellated_face.coordinates", theCheck, + STANDARD_TYPE(StepVisual_CoordinatesList), aTessellatedFace_Coordinates); + + Standard_Integer aTessellatedFace_Pnmax; + theData->ReadInteger(theNum, 3, "tessellated_face.pnmax", theCheck, aTessellatedFace_Pnmax); + + Handle(TColStd_HArray2OfReal) aTessellatedFace_Normals; + Standard_Integer sub4 = 0; + if (theData->ReadSubList(theNum, 4, "tessellated_face.normals", theCheck, sub4)) + { + Standard_Integer nb0 = theData->NbParams(sub4); + Standard_Integer nbj0 = theData->NbParams(theData->ParamNumber(sub4,1)); + aTessellatedFace_Normals = new TColStd_HArray2OfReal(1, nb0, 1, nbj0); + for (Standard_Integer i0 = 1; i0 <= nb0; i0++) + { + Standard_Integer subj4 = 0; + if ( theData->ReadSubList (sub4, i0, "sub-part(tessellated_face.normals)", theCheck, subj4) ) { + Standard_Integer num4 = subj4; + for (Standard_Integer j0 = 1; j0 <= nbj0; j0++) + { + Standard_Real anIt0; + theData->ReadReal(num4, j0, "real", theCheck, anIt0); + aTessellatedFace_Normals->SetValue(i0,j0, anIt0); + } + } + } + } + + StepVisual_FaceOrSurface aTessellatedFace_GeometricLink; + Standard_Boolean hasTessellatedFace_GeometricLink = Standard_True; + if (theData->IsParamDefined(theNum, 5)) + { + theData->ReadEntity(theNum, 5, "tessellated_face.geometric_link", theCheck, aTessellatedFace_GeometricLink); + } + else + { + hasTessellatedFace_GeometricLink = Standard_False; + aTessellatedFace_GeometricLink = StepVisual_FaceOrSurface(); + } + + // Own fields of CubicBezierTriangulatedFace + + Handle(TColStd_HArray2OfInteger) aCtriangles; + Standard_Integer sub6 = 0; + if (theData->ReadSubList(theNum, 6, "ctriangles", theCheck, sub6)) + { + Standard_Integer nb0 = theData->NbParams(sub6); + Standard_Integer nbj0 = theData->NbParams(theData->ParamNumber(sub6,1)); + aCtriangles = new TColStd_HArray2OfInteger(1, nb0, 1, nbj0); + for (Standard_Integer i0 = 1; i0 <= nb0; i0++) + { + Standard_Integer subj6 = 0; + if ( theData->ReadSubList (sub6, i0, "sub-part(ctriangles)", theCheck, subj6) ) { + Standard_Integer num4 = subj6; + for (Standard_Integer j0 = 1; j0 <= nbj0; j0++) + { + Standard_Integer anIt0; + theData->ReadInteger(num4, j0, "integer", theCheck, anIt0); + aCtriangles->SetValue(i0,j0, anIt0); + } + } + } + } + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, aTessellatedFace_Coordinates, aTessellatedFace_Pnmax, aTessellatedFace_Normals, hasTessellatedFace_GeometricLink, aTessellatedFace_GeometricLink, aCtriangles); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= + +void RWStepVisual_RWCubicBezierTriangulatedFace::WriteStep( + StepData_StepWriter& theSW, + const Handle(StepVisual_CubicBezierTriangulatedFace)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send(theEnt->Name()); + + // Own fields of TessellatedFace + + theSW.Send(theEnt->Coordinates()); + + theSW.Send(theEnt->Pnmax()); + + theSW.OpenSub(); + for (Standard_Integer i3 = 1; i3 <= theEnt->Normals()->RowLength(); i3++) + { + theSW.NewLine(Standard_False); + theSW.OpenSub(); + for (Standard_Integer j3 = 1; j3 <= theEnt->Normals()->ColLength(); j3++) + { + Standard_Real Var0 = theEnt->Normals()->Value(i3,j3); + theSW.Send(Var0); + } + theSW.CloseSub(); + } + theSW.CloseSub(); + + if (theEnt->HasGeometricLink()) + { + theSW.Send(theEnt->GeometricLink().Value()); + } + else + { + theSW.SendUndef(); + } + + // Own fields of CubicBezierTriangulatedFace + + theSW.OpenSub(); + for (Standard_Integer i5 = 1; i5 <= theEnt->Ctriangles()->RowLength(); i5++) + { + theSW.NewLine(Standard_False); + theSW.OpenSub(); + for (Standard_Integer j5 = 1; j5 <= theEnt->Ctriangles()->ColLength(); j5++) + { + Standard_Integer Var0 = theEnt->Ctriangles()->Value(i5,j5); + theSW.Send(Var0); + } + theSW.CloseSub(); + } + theSW.CloseSub(); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= + +void RWStepVisual_RWCubicBezierTriangulatedFace::Share( + const Handle(StepVisual_CubicBezierTriangulatedFace)&theEnt, +Interface_EntityIterator& theIter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of TessellatedFace + + theIter.AddItem(theEnt->StepVisual_TessellatedFace::Coordinates()); + + if (theEnt->StepVisual_TessellatedFace::HasGeometricLink()) + { + theIter.AddItem(theEnt->StepVisual_TessellatedFace::GeometricLink().Value()); + } + + // Own fields of CubicBezierTriangulatedFace +} diff --git a/src/RWStepVisual/RWStepVisual_RWCubicBezierTriangulatedFace.hxx b/src/RWStepVisual/RWStepVisual_RWCubicBezierTriangulatedFace.hxx new file mode 100644 index 0000000000..8825c1c905 --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWCubicBezierTriangulatedFace.hxx @@ -0,0 +1,53 @@ +// Created on : Thu Mar 24 18:30:11 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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_RWCubicBezierTriangulatedFace_HeaderFile_ +#define _RWStepVisual_RWCubicBezierTriangulatedFace_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepVisual_CubicBezierTriangulatedFace; + +//! Read & Write tool for CubicBezierTriangulatedFace +class RWStepVisual_RWCubicBezierTriangulatedFace +{ + +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepVisual_RWCubicBezierTriangulatedFace(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_CubicBezierTriangulatedFace)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, + const Handle(StepVisual_CubicBezierTriangulatedFace)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepVisual_CubicBezierTriangulatedFace)& theEnt, + Interface_EntityIterator& theIter) const; + +}; + +#endif // _RWStepVisual_RWCubicBezierTriangulatedFace_HeaderFile_ diff --git a/src/RWStepVisual/RWStepVisual_RWTessellatedConnectingEdge.cxx b/src/RWStepVisual/RWStepVisual_RWTessellatedConnectingEdge.cxx new file mode 100644 index 0000000000..ccf65f3995 --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWTessellatedConnectingEdge.cxx @@ -0,0 +1,226 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepVisual_RWTessellatedConnectingEdge +//purpose : +//======================================================================= + +RWStepVisual_RWTessellatedConnectingEdge::RWStepVisual_RWTessellatedConnectingEdge() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedConnectingEdge::ReadStep( + const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_TessellatedConnectingEdge)& theEnt) const +{ + // Check number of parameters + if (!theData->CheckNbParams(theNum, 9, theCheck, "tessellated_connecting_edge")) + { + return; + } + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString(theNum, 1, "representation_item.name", theCheck, aRepresentationItem_Name); + + // Inherited fields of TessellatedEdge + + Handle(StepVisual_CoordinatesList) aTessellatedEdge_Coordinates; + theData->ReadEntity(theNum, 2, "tessellated_edge.coordinates", theCheck, + STANDARD_TYPE(StepVisual_CoordinatesList), aTessellatedEdge_Coordinates); + + StepVisual_EdgeOrCurve aTessellatedEdge_GeometricLink; + Standard_Boolean hasTessellatedEdge_GeometricLink = Standard_True; + if (theData->IsParamDefined(theNum, 3)) + { + theData->ReadEntity(theNum, 3, "tessellated_edge.geometric_link", theCheck, aTessellatedEdge_GeometricLink); + } + else + { + hasTessellatedEdge_GeometricLink = Standard_False; + aTessellatedEdge_GeometricLink = StepVisual_EdgeOrCurve(); + } + + Handle(TColStd_HArray1OfInteger) aTessellatedEdge_LineStrip; + Standard_Integer sub4 = 0; + if (theData->ReadSubList(theNum, 4, "tessellated_edge.line_strip", theCheck, sub4)) + { + Standard_Integer nb0 = theData->NbParams(sub4); + aTessellatedEdge_LineStrip = new TColStd_HArray1OfInteger(1, nb0); + Standard_Integer num2 = sub4; + for (Standard_Integer i0 = 1; i0 <= nb0; i0++) + { + Standard_Integer anIt0; + theData->ReadInteger(num2, i0, "integer", theCheck, anIt0); + aTessellatedEdge_LineStrip->SetValue(i0, anIt0); + } + } + + // Own fields of TessellatedConnectingEdge + + StepData_Logical aSmooth; + theData->ReadLogical(theNum, 5, "smooth", theCheck, aSmooth); + + Handle(StepVisual_TessellatedFace) aFace1; + theData->ReadEntity(theNum, 6, "face1", theCheck, + STANDARD_TYPE(StepVisual_TessellatedFace), aFace1); + + Handle(StepVisual_TessellatedFace) aFace2; + theData->ReadEntity(theNum, 7, "face2", theCheck, + STANDARD_TYPE(StepVisual_TessellatedFace), aFace2); + + Handle(TColStd_HArray1OfInteger) aLineStripFace1; + Standard_Integer sub8 = 0; + if (theData->ReadSubList(theNum, 8, "line_strip_face1", theCheck, sub8)) + { + Standard_Integer nb0 = theData->NbParams(sub8); + aLineStripFace1 = new TColStd_HArray1OfInteger(1, nb0); + Standard_Integer num2 = sub8; + for (Standard_Integer i0 = 1; i0 <= nb0; i0++) + { + Standard_Integer anIt0; + theData->ReadInteger(num2, i0, "integer", theCheck, anIt0); + aLineStripFace1->SetValue(i0, anIt0); + } + } + + Handle(TColStd_HArray1OfInteger) aLineStripFace2; + Standard_Integer sub9 = 0; + if (theData->ReadSubList(theNum, 9, "line_strip_face2", theCheck, sub9)) + { + Standard_Integer nb0 = theData->NbParams(sub9); + aLineStripFace2 = new TColStd_HArray1OfInteger(1, nb0); + Standard_Integer num2 = sub9; + for (Standard_Integer i0 = 1; i0 <= nb0; i0++) + { + Standard_Integer anIt0; + theData->ReadInteger(num2, i0, "integer", theCheck, anIt0); + aLineStripFace2->SetValue(i0, anIt0); + } + } + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, aTessellatedEdge_Coordinates, hasTessellatedEdge_GeometricLink, aTessellatedEdge_GeometricLink, aTessellatedEdge_LineStrip, aSmooth, aFace1, aFace2, aLineStripFace1, aLineStripFace2); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedConnectingEdge::WriteStep( + StepData_StepWriter& theSW, + const Handle(StepVisual_TessellatedConnectingEdge)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send(theEnt->Name()); + + // Own fields of TessellatedEdge + + theSW.Send(theEnt->Coordinates()); + + if (theEnt->HasGeometricLink()) + { + theSW.Send(theEnt->GeometricLink().Value()); + } + else + { + theSW.SendUndef(); + } + + theSW.OpenSub(); + for (Standard_Integer i3 = 1; i3 <= theEnt->LineStrip()->Length(); i3++) + { + Standard_Integer Var0 = theEnt->LineStrip()->Value(i3); + theSW.Send(Var0); + } + theSW.CloseSub(); + + // Own fields of TessellatedConnectingEdge + + theSW.SendLogical(theEnt->Smooth()); + + theSW.Send(theEnt->Face1()); + + theSW.Send(theEnt->Face2()); + + theSW.OpenSub(); + for (Standard_Integer i7 = 1; i7 <= theEnt->LineStripFace1()->Length(); i7++) + { + Standard_Integer Var0 = theEnt->LineStripFace1()->Value(i7); + theSW.Send(Var0); + } + theSW.CloseSub(); + + theSW.OpenSub(); + for (Standard_Integer i8 = 1; i8 <= theEnt->LineStripFace2()->Length(); i8++) + { + Standard_Integer Var0 = theEnt->LineStripFace2()->Value(i8); + theSW.Send(Var0); + } + theSW.CloseSub(); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedConnectingEdge::Share( + const Handle(StepVisual_TessellatedConnectingEdge)&theEnt, +Interface_EntityIterator& theIter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of TessellatedEdge + + theIter.AddItem(theEnt->StepVisual_TessellatedEdge::Coordinates()); + + if (theEnt->StepVisual_TessellatedEdge::HasGeometricLink()) + { + theIter.AddItem(theEnt->StepVisual_TessellatedEdge::GeometricLink().Value()); + } + + // Own fields of TessellatedConnectingEdge + + theIter.AddItem(theEnt->Face1()); + + theIter.AddItem(theEnt->Face2()); +} diff --git a/src/RWStepVisual/RWStepVisual_RWTessellatedConnectingEdge.hxx b/src/RWStepVisual/RWStepVisual_RWTessellatedConnectingEdge.hxx new file mode 100644 index 0000000000..a1eb97f4c3 --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWTessellatedConnectingEdge.hxx @@ -0,0 +1,53 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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_RWTessellatedConnectingEdge_HeaderFile_ +#define _RWStepVisual_RWTessellatedConnectingEdge_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepVisual_TessellatedConnectingEdge; + +//! Read & Write tool for TessellatedConnectingEdge +class RWStepVisual_RWTessellatedConnectingEdge +{ + +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepVisual_RWTessellatedConnectingEdge(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_TessellatedConnectingEdge)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, + const Handle(StepVisual_TessellatedConnectingEdge)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepVisual_TessellatedConnectingEdge)& theEnt, + Interface_EntityIterator& theIter) const; + +}; + +#endif // _RWStepVisual_RWTessellatedConnectingEdge_HeaderFile_ diff --git a/src/RWStepVisual/RWStepVisual_RWTessellatedEdge.cxx b/src/RWStepVisual/RWStepVisual_RWTessellatedEdge.cxx new file mode 100644 index 0000000000..0723e7c997 --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWTessellatedEdge.cxx @@ -0,0 +1,148 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepVisual_RWTessellatedEdge +//purpose : +//======================================================================= + +RWStepVisual_RWTessellatedEdge::RWStepVisual_RWTessellatedEdge() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedEdge::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_TessellatedEdge)& theEnt) const +{ + // Check number of parameters + if (!theData->CheckNbParams(theNum, 4, theCheck, "tessellated_edge")) + { + return; + } + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString(theNum, 1, "representation_item.name", theCheck, aRepresentationItem_Name); + + // Own fields of TessellatedEdge + + Handle(StepVisual_CoordinatesList) aCoordinates; + theData->ReadEntity(theNum, 2, "coordinates", theCheck, + STANDARD_TYPE(StepVisual_CoordinatesList), aCoordinates); + + StepVisual_EdgeOrCurve aGeometricLink; + Standard_Boolean hasGeometricLink = Standard_True; + if (theData->IsParamDefined(theNum, 3)) + { + theData->ReadEntity(theNum, 3, "geometric_link", theCheck, aGeometricLink); + } + else + { + hasGeometricLink = Standard_False; + aGeometricLink = StepVisual_EdgeOrCurve(); + } + + Handle(TColStd_HArray1OfInteger) aLineStrip; + Standard_Integer sub4 = 0; + if (theData->ReadSubList(theNum, 4, "line_strip", theCheck, sub4)) + { + Standard_Integer nb0 = theData->NbParams(sub4); + aLineStrip = new TColStd_HArray1OfInteger(1, nb0); + Standard_Integer num2 = sub4; + for (Standard_Integer i0 = 1; i0 <= nb0; i0++) + { + Standard_Integer anIt0; + theData->ReadInteger(num2, i0, "integer", theCheck, anIt0); + aLineStrip->SetValue(i0, anIt0); + } + } + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, aCoordinates, hasGeometricLink, aGeometricLink, aLineStrip); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedEdge::WriteStep (StepData_StepWriter& theSW, + const Handle(StepVisual_TessellatedEdge)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send(theEnt->Name()); + + // Own fields of TessellatedEdge + + theSW.Send(theEnt->Coordinates()); + + if (theEnt->HasGeometricLink()) + { + theSW.Send(theEnt->GeometricLink().Value()); + } + else + { + theSW.SendUndef(); + } + + theSW.OpenSub(); + for (Standard_Integer i3 = 1; i3 <= theEnt->LineStrip()->Length(); i3++) + { + Standard_Integer Var0 = theEnt->LineStrip()->Value(i3); + theSW.Send(Var0); + } + theSW.CloseSub(); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedEdge::Share (const Handle(StepVisual_TessellatedEdge)&theEnt, + Interface_EntityIterator& theIter) const +{ + + // Inherited fields of RepresentationItem + + // Own fields of TessellatedEdge + + theIter.AddItem(theEnt->Coordinates()); + + if (theEnt->HasGeometricLink()) + { + theIter.AddItem(theEnt->GeometricLink().Value()); + } +} diff --git a/src/RWStepVisual/RWStepVisual_RWTessellatedEdge.hxx b/src/RWStepVisual/RWStepVisual_RWTessellatedEdge.hxx new file mode 100644 index 0000000000..a88c46ab1d --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWTessellatedEdge.hxx @@ -0,0 +1,53 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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_RWTessellatedEdge_HeaderFile_ +#define _RWStepVisual_RWTessellatedEdge_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepVisual_TessellatedEdge; + +//! Read & Write tool for TessellatedEdge +class RWStepVisual_RWTessellatedEdge +{ + +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepVisual_RWTessellatedEdge(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_TessellatedEdge)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, + const Handle(StepVisual_TessellatedEdge)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepVisual_TessellatedEdge)& theEnt, + Interface_EntityIterator& theIter) const; + +}; + +#endif // _RWStepVisual_RWTessellatedEdge_HeaderFile_ diff --git a/src/RWStepVisual/RWStepVisual_RWTessellatedPointSet.cxx b/src/RWStepVisual/RWStepVisual_RWTessellatedPointSet.cxx new file mode 100644 index 0000000000..6070e25aac --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWTessellatedPointSet.cxx @@ -0,0 +1,121 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepVisual_RWTessellatedPointSet +//purpose : +//======================================================================= + +RWStepVisual_RWTessellatedPointSet::RWStepVisual_RWTessellatedPointSet() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedPointSet::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_TessellatedPointSet)& theEnt) const +{ + // Check number of parameters + if (!theData->CheckNbParams(theNum, 3, theCheck, "tessellated_point_set")) + { + return; + } + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString(theNum, 1, "representation_item.name", theCheck, aRepresentationItem_Name); + + // Own fields of TessellatedPointSet + + Handle(StepVisual_CoordinatesList) aCoordinates; + theData->ReadEntity(theNum, 2, "coordinates", theCheck, + STANDARD_TYPE(StepVisual_CoordinatesList), aCoordinates); + + Handle(TColStd_HArray1OfInteger) aPointList; + Standard_Integer sub3 = 0; + if (theData->ReadSubList(theNum, 3, "point_list", theCheck, sub3)) + { + Standard_Integer nb0 = theData->NbParams(sub3); + aPointList = new TColStd_HArray1OfInteger(1, nb0); + Standard_Integer num2 = sub3; + for (Standard_Integer i0 = 1; i0 <= nb0; i0++) + { + Standard_Integer anIt0; + theData->ReadInteger(num2, i0, "integer", theCheck, anIt0); + aPointList->SetValue(i0, anIt0); + } + } + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, aCoordinates, aPointList); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedPointSet::WriteStep (StepData_StepWriter& theSW, + const Handle(StepVisual_TessellatedPointSet)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send(theEnt->Name()); + + // Own fields of TessellatedPointSet + + theSW.Send(theEnt->Coordinates()); + + theSW.OpenSub(); + for (Standard_Integer i2 = 1; i2 <= theEnt->PointList()->Length(); i2++) + { + Standard_Integer Var0 = theEnt->PointList()->Value(i2); + theSW.Send(Var0); + } + theSW.CloseSub(); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedPointSet::Share (const Handle(StepVisual_TessellatedPointSet)&theEnt, + Interface_EntityIterator& theIter) const +{ + + // Inherited fields of RepresentationItem + + // Own fields of TessellatedPointSet + + theIter.AddItem(theEnt->Coordinates()); +} diff --git a/src/RWStepVisual/RWStepVisual_RWTessellatedPointSet.hxx b/src/RWStepVisual/RWStepVisual_RWTessellatedPointSet.hxx new file mode 100644 index 0000000000..90b7c55cb1 --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWTessellatedPointSet.hxx @@ -0,0 +1,53 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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_RWTessellatedPointSet_HeaderFile_ +#define _RWStepVisual_RWTessellatedPointSet_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepVisual_TessellatedPointSet; + +//! Read & Write tool for TessellatedPointSet +class RWStepVisual_RWTessellatedPointSet +{ + +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepVisual_RWTessellatedPointSet(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_TessellatedPointSet)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, + const Handle(StepVisual_TessellatedPointSet)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepVisual_TessellatedPointSet)& theEnt, + Interface_EntityIterator& theIter) const; + +}; + +#endif // _RWStepVisual_RWTessellatedPointSet_HeaderFile_ diff --git a/src/RWStepVisual/RWStepVisual_RWTessellatedShapeRepresentation.cxx b/src/RWStepVisual/RWStepVisual_RWTessellatedShapeRepresentation.cxx new file mode 100644 index 0000000000..3bae89fde1 --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWTessellatedShapeRepresentation.cxx @@ -0,0 +1,125 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepVisual_RWTessellatedShapeRepresentation +//purpose : +//======================================================================= + +RWStepVisual_RWTessellatedShapeRepresentation::RWStepVisual_RWTessellatedShapeRepresentation() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedShapeRepresentation::ReadStep( + const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_TessellatedShapeRepresentation)& theEnt) const +{ + // Check number of parameters + if (!theData->CheckNbParams(theNum, 3, theCheck, "tessellated_shape_representation")) + { + return; + } + + // Inherited fields of Representation + + Handle(TCollection_HAsciiString) aRepresentation_Name; + theData->ReadString(theNum, 1, "representation.name", theCheck, aRepresentation_Name); + + Handle(StepRepr_HArray1OfRepresentationItem) aRepresentation_Items; + Standard_Integer sub2 = 0; + if (theData->ReadSubList(theNum, 2, "representation.items", theCheck, sub2)) + { + Standard_Integer nb0 = theData->NbParams(sub2); + aRepresentation_Items = new StepRepr_HArray1OfRepresentationItem(1, nb0); + Standard_Integer num2 = sub2; + for (Standard_Integer i0 = 1; i0 <= nb0; i0++) + { + Handle(StepRepr_RepresentationItem) anIt0; + theData->ReadEntity(num2, i0, "representation_item", theCheck, + STANDARD_TYPE(StepRepr_RepresentationItem), anIt0); + aRepresentation_Items->SetValue(i0, anIt0); + } + } + + Handle(StepRepr_RepresentationContext) aRepresentation_ContextOfItems; + theData->ReadEntity(theNum, 3, "representation.context_of_items", theCheck, + STANDARD_TYPE(StepRepr_RepresentationContext), aRepresentation_ContextOfItems); + + // Initialize entity + theEnt->Init(aRepresentation_Name, aRepresentation_Items, aRepresentation_ContextOfItems); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedShapeRepresentation::WriteStep( + StepData_StepWriter& theSW, + const Handle(StepVisual_TessellatedShapeRepresentation)& theEnt) const +{ + + // Own fields of Representation + + theSW.Send(theEnt->Name()); + + theSW.OpenSub(); + for (Standard_Integer i1 = 1; i1 <= theEnt->Items()->Length(); i1++) + { + Handle(StepRepr_RepresentationItem) Var0 = theEnt->Items()->Value(i1); + theSW.Send(Var0); + } + theSW.CloseSub(); + + theSW.Send(theEnt->ContextOfItems()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedShapeRepresentation::Share( + const Handle(StepVisual_TessellatedShapeRepresentation)&theEnt, +Interface_EntityIterator& theIter) const +{ + + // Inherited fields of Representation + + for (Standard_Integer i1 = 1; i1 <= theEnt->StepRepr_Representation::Items()->Length(); i1++) + { + Handle(StepRepr_RepresentationItem) Var0 = theEnt->StepRepr_Representation::Items()->Value(i1); + theIter.AddItem(Var0); + } + + theIter.AddItem(theEnt->StepRepr_Representation::ContextOfItems()); +} diff --git a/src/RWStepVisual/RWStepVisual_RWTessellatedShapeRepresentation.hxx b/src/RWStepVisual/RWStepVisual_RWTessellatedShapeRepresentation.hxx new file mode 100644 index 0000000000..c80b2534c1 --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWTessellatedShapeRepresentation.hxx @@ -0,0 +1,53 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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_RWTessellatedShapeRepresentation_HeaderFile_ +#define _RWStepVisual_RWTessellatedShapeRepresentation_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepVisual_TessellatedShapeRepresentation; + +//! Read & Write tool for TessellatedShapeRepresentation +class RWStepVisual_RWTessellatedShapeRepresentation +{ + +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepVisual_RWTessellatedShapeRepresentation(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_TessellatedShapeRepresentation)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, + const Handle(StepVisual_TessellatedShapeRepresentation)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepVisual_TessellatedShapeRepresentation)& theEnt, + Interface_EntityIterator& theIter) const; + +}; + +#endif // _RWStepVisual_RWTessellatedShapeRepresentation_HeaderFile_ diff --git a/src/RWStepVisual/RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters.cxx b/src/RWStepVisual/RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters.cxx new file mode 100644 index 0000000000..e5f669c2e6 --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters.cxx @@ -0,0 +1,152 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters +//purpose : +//======================================================================= + +RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters::RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters::ReadStep( + const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_TessellatedShapeRepresentationWithAccuracyParameters)& theEnt) const +{ + // Check number of parameters + if (!theData->CheckNbParams(theNum, 4, theCheck, "tessellated_shape_representation_with_accuracy_parameters")) + { + return; + } + + // Inherited fields of Representation + + Handle(TCollection_HAsciiString) aRepresentation_Name; + theData->ReadString(theNum, 1, "representation.name", theCheck, aRepresentation_Name); + + Handle(StepRepr_HArray1OfRepresentationItem) aRepresentation_Items; + Standard_Integer sub2 = 0; + if (theData->ReadSubList(theNum, 2, "representation.items", theCheck, sub2)) + { + Standard_Integer nb0 = theData->NbParams(sub2); + aRepresentation_Items = new StepRepr_HArray1OfRepresentationItem(1, nb0); + Standard_Integer num2 = sub2; + for (Standard_Integer i0 = 1; i0 <= nb0; i0++) + { + Handle(StepRepr_RepresentationItem) anIt0; + theData->ReadEntity(num2, i0, "representation_item", theCheck, + STANDARD_TYPE(StepRepr_RepresentationItem), anIt0); + aRepresentation_Items->SetValue(i0, anIt0); + } + } + + Handle(StepRepr_RepresentationContext) aRepresentation_ContextOfItems; + theData->ReadEntity(theNum, 3, "representation.context_of_items", theCheck, + STANDARD_TYPE(StepRepr_RepresentationContext), aRepresentation_ContextOfItems); + + // Own fields of TessellatedShapeRepresentationWithAccuracyParameters + + Handle(TColStd_HArray1OfReal) aTessellationAccuracyParameters; + Standard_Integer sub4 = 0; + if (theData->ReadSubList(theNum, 4, "tessellation_accuracy_parameters", theCheck, sub4)) + { + Standard_Integer nb0 = theData->NbParams(sub4); + aTessellationAccuracyParameters = new TColStd_HArray1OfReal(1, nb0); + Standard_Integer num2 = sub4; + for (Standard_Integer i0 = 1; i0 <= nb0; i0++) + { + Standard_Real anIt0; + theData->ReadReal(num2, i0, "tessellation_accuracy_parameter_item", theCheck, anIt0); + aTessellationAccuracyParameters->SetValue(i0, anIt0); + } + } + + // Initialize entity + theEnt->Init(aRepresentation_Name, aRepresentation_Items, aRepresentation_ContextOfItems, aTessellationAccuracyParameters); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters::WriteStep( + StepData_StepWriter& theSW, + const Handle(StepVisual_TessellatedShapeRepresentationWithAccuracyParameters)& theEnt) const +{ + + // Own fields of Representation + + theSW.Send(theEnt->Name()); + + theSW.OpenSub(); + for (Standard_Integer i1 = 1; i1 <= theEnt->Items()->Length(); i1++) + { + Handle(StepRepr_RepresentationItem) Var0 = theEnt->Items()->Value(i1); + theSW.Send(Var0); + } + theSW.CloseSub(); + + theSW.Send(theEnt->ContextOfItems()); + + // Own fields of TessellatedShapeRepresentationWithAccuracyParameters + + theSW.OpenSub(); + for (Standard_Integer i3 = 1; i3 <= theEnt->TessellationAccuracyParameters()->Length(); i3++) + { + Standard_Real Var0 = theEnt->TessellationAccuracyParameters()->Value(i3); + theSW.Send(Var0); + } + theSW.CloseSub(); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters::Share( + const Handle(StepVisual_TessellatedShapeRepresentationWithAccuracyParameters)&theEnt, +Interface_EntityIterator& theIter) const +{ + + // Inherited fields of Representation + + for (Standard_Integer i1 = 1; i1 <= theEnt->StepRepr_Representation::Items()->Length(); i1++) + { + Handle(StepRepr_RepresentationItem) Var0 = theEnt->StepRepr_Representation::Items()->Value(i1); + theIter.AddItem(Var0); + } + + theIter.AddItem(theEnt->StepRepr_Representation::ContextOfItems()); +} diff --git a/src/RWStepVisual/RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters.hxx b/src/RWStepVisual/RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters.hxx new file mode 100644 index 0000000000..4c6fef75d1 --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters.hxx @@ -0,0 +1,53 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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_RWTessellatedShapeRepresentationWithAccuracyParameters_HeaderFile_ +#define _RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepVisual_TessellatedShapeRepresentationWithAccuracyParameters; + +//! Read & Write tool for TessellatedShapeRepresentationWithAccuracyParameters +class RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters +{ + +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_TessellatedShapeRepresentationWithAccuracyParameters)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, + const Handle(StepVisual_TessellatedShapeRepresentationWithAccuracyParameters)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepVisual_TessellatedShapeRepresentationWithAccuracyParameters)& theEnt, + Interface_EntityIterator& theIter) const; + +}; + +#endif // _RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters_HeaderFile_ diff --git a/src/RWStepVisual/RWStepVisual_RWTessellatedShell.cxx b/src/RWStepVisual/RWStepVisual_RWTessellatedShell.cxx new file mode 100644 index 0000000000..e6f096101b --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWTessellatedShell.cxx @@ -0,0 +1,147 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepVisual_RWTessellatedShell +//purpose : +//======================================================================= + +RWStepVisual_RWTessellatedShell::RWStepVisual_RWTessellatedShell() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedShell::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_TessellatedShell)& theEnt) const +{ + // Check number of parameters + if (!theData->CheckNbParams(theNum, 3, theCheck, "tessellated_shell")) + { + return; + } + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString(theNum, 1, "representation_item.name", theCheck, aRepresentationItem_Name); + + // Own fields of TessellatedShell + + Handle(StepVisual_HArray1OfTessellatedStructuredItem) aItems; + Standard_Integer sub2 = 0; + if (theData->ReadSubList(theNum, 2, "items", theCheck, sub2)) + { + Standard_Integer nb0 = theData->NbParams(sub2); + aItems = new StepVisual_HArray1OfTessellatedStructuredItem(1, nb0); + Standard_Integer num2 = sub2; + for (Standard_Integer i0 = 1; i0 <= nb0; i0++) + { + Handle(StepVisual_TessellatedStructuredItem) anIt0; + theData->ReadEntity(num2, i0, "tessellated_structured_item", theCheck, + STANDARD_TYPE(StepVisual_TessellatedStructuredItem), anIt0); + aItems->SetValue(i0, anIt0); + } + } + + Handle(StepShape_ConnectedFaceSet) aTopologicalLink; + Standard_Boolean hasTopologicalLink = Standard_True; + if (theData->IsParamDefined(theNum, 3)) + { + theData->ReadEntity(theNum, 3, "topological_link", theCheck, + STANDARD_TYPE(StepShape_ConnectedFaceSet), aTopologicalLink); + } + else + { + hasTopologicalLink = Standard_False; + aTopologicalLink.Nullify(); + } + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, aItems, hasTopologicalLink, aTopologicalLink); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedShell::WriteStep (StepData_StepWriter& theSW, + const Handle(StepVisual_TessellatedShell)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send(theEnt->Name()); + + // Own fields of TessellatedShell + + theSW.OpenSub(); + for (Standard_Integer i1 = 1; i1 <= theEnt->Items()->Length(); i1++) + { + Handle(StepVisual_TessellatedStructuredItem) Var0 = theEnt->Items()->Value(i1); + theSW.Send(Var0); + } + theSW.CloseSub(); + + if (theEnt->HasTopologicalLink()) + { + theSW.Send(theEnt->TopologicalLink()); + } + else + { + theSW.SendUndef(); + } +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedShell::Share (const Handle(StepVisual_TessellatedShell)&theEnt, + Interface_EntityIterator& theIter) const +{ + + // Inherited fields of RepresentationItem + + // Own fields of TessellatedShell + + for (Standard_Integer i1 = 1; i1 <= theEnt->Items()->Length(); i1++) + { + Handle(StepVisual_TessellatedStructuredItem) Var0 = theEnt->Items()->Value(i1); + theIter.AddItem(Var0); + } + + if (theEnt->HasTopologicalLink()) + { + theIter.AddItem(theEnt->TopologicalLink()); + } +} diff --git a/src/RWStepVisual/RWStepVisual_RWTessellatedShell.hxx b/src/RWStepVisual/RWStepVisual_RWTessellatedShell.hxx new file mode 100644 index 0000000000..ddabbfb0b5 --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWTessellatedShell.hxx @@ -0,0 +1,53 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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_RWTessellatedShell_HeaderFile_ +#define _RWStepVisual_RWTessellatedShell_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepVisual_TessellatedShell; + +//! Read & Write tool for TessellatedShell +class RWStepVisual_RWTessellatedShell +{ + +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepVisual_RWTessellatedShell(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_TessellatedShell)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, + const Handle(StepVisual_TessellatedShell)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepVisual_TessellatedShell)& theEnt, + Interface_EntityIterator& theIter) const; + +}; + +#endif // _RWStepVisual_RWTessellatedShell_HeaderFile_ diff --git a/src/RWStepVisual/RWStepVisual_RWTessellatedSolid.cxx b/src/RWStepVisual/RWStepVisual_RWTessellatedSolid.cxx new file mode 100644 index 0000000000..883a81629c --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWTessellatedSolid.cxx @@ -0,0 +1,147 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepVisual_RWTessellatedSolid +//purpose : +//======================================================================= + +RWStepVisual_RWTessellatedSolid::RWStepVisual_RWTessellatedSolid() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedSolid::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_TessellatedSolid)& theEnt) const +{ + // Check number of parameters + if (!theData->CheckNbParams(theNum, 3, theCheck, "tessellated_solid")) + { + return; + } + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString(theNum, 1, "representation_item.name", theCheck, aRepresentationItem_Name); + + // Own fields of TessellatedSolid + + Handle(StepVisual_HArray1OfTessellatedStructuredItem) aItems; + Standard_Integer sub2 = 0; + if (theData->ReadSubList(theNum, 2, "items", theCheck, sub2)) + { + Standard_Integer nb0 = theData->NbParams(sub2); + aItems = new StepVisual_HArray1OfTessellatedStructuredItem(1, nb0); + Standard_Integer num2 = sub2; + for (Standard_Integer i0 = 1; i0 <= nb0; i0++) + { + Handle(StepVisual_TessellatedStructuredItem) anIt0; + theData->ReadEntity(num2, i0, "tessellated_structured_item", theCheck, + STANDARD_TYPE(StepVisual_TessellatedStructuredItem), anIt0); + aItems->SetValue(i0, anIt0); + } + } + + Handle(StepShape_ManifoldSolidBrep) aGeometricLink; + Standard_Boolean hasGeometricLink = Standard_True; + if (theData->IsParamDefined(theNum, 3)) + { + theData->ReadEntity(theNum, 3, "geometric_link", theCheck, + STANDARD_TYPE(StepShape_ManifoldSolidBrep), aGeometricLink); + } + else + { + hasGeometricLink = Standard_False; + aGeometricLink.Nullify(); + } + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, aItems, hasGeometricLink, aGeometricLink); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedSolid::WriteStep (StepData_StepWriter& theSW, + const Handle(StepVisual_TessellatedSolid)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send(theEnt->Name()); + + // Own fields of TessellatedSolid + + theSW.OpenSub(); + for (Standard_Integer i1 = 1; i1 <= theEnt->Items()->Length(); i1++) + { + Handle(StepVisual_TessellatedStructuredItem) Var0 = theEnt->Items()->Value(i1); + theSW.Send(Var0); + } + theSW.CloseSub(); + + if (theEnt->HasGeometricLink()) + { + theSW.Send(theEnt->GeometricLink()); + } + else + { + theSW.SendUndef(); + } +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedSolid::Share (const Handle(StepVisual_TessellatedSolid)&theEnt, + Interface_EntityIterator& theIter) const +{ + + // Inherited fields of RepresentationItem + + // Own fields of TessellatedSolid + + for (Standard_Integer i1 = 1; i1 <= theEnt->Items()->Length(); i1++) + { + Handle(StepVisual_TessellatedStructuredItem) Var0 = theEnt->Items()->Value(i1); + theIter.AddItem(Var0); + } + + if (theEnt->HasGeometricLink()) + { + theIter.AddItem(theEnt->GeometricLink()); + } +} diff --git a/src/RWStepVisual/RWStepVisual_RWTessellatedSolid.hxx b/src/RWStepVisual/RWStepVisual_RWTessellatedSolid.hxx new file mode 100644 index 0000000000..269cb0fc07 --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWTessellatedSolid.hxx @@ -0,0 +1,53 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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_RWTessellatedSolid_HeaderFile_ +#define _RWStepVisual_RWTessellatedSolid_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepVisual_TessellatedSolid; + +//! Read & Write tool for TessellatedSolid +class RWStepVisual_RWTessellatedSolid +{ + +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepVisual_RWTessellatedSolid(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_TessellatedSolid)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, + const Handle(StepVisual_TessellatedSolid)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepVisual_TessellatedSolid)& theEnt, + Interface_EntityIterator& theIter) const; + +}; + +#endif // _RWStepVisual_RWTessellatedSolid_HeaderFile_ diff --git a/src/RWStepVisual/RWStepVisual_RWTessellatedStructuredItem.cxx b/src/RWStepVisual/RWStepVisual_RWTessellatedStructuredItem.cxx new file mode 100644 index 0000000000..56292215db --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWTessellatedStructuredItem.cxx @@ -0,0 +1,82 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepVisual_RWTessellatedStructuredItem +//purpose : +//======================================================================= + +RWStepVisual_RWTessellatedStructuredItem::RWStepVisual_RWTessellatedStructuredItem() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedStructuredItem::ReadStep( + const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_TessellatedStructuredItem)& theEnt) const +{ + // Check number of parameters + if (!theData->CheckNbParams(theNum, 1, theCheck, "tessellated_structured_item")) + { + return; + } + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString(theNum, 1, "representation_item.name", theCheck, aRepresentationItem_Name); + + // Initialize entity + theEnt->Init(aRepresentationItem_Name); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedStructuredItem::WriteStep( + StepData_StepWriter& theSW, + const Handle(StepVisual_TessellatedStructuredItem)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send(theEnt->Name()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedStructuredItem::Share( + const Handle(StepVisual_TessellatedStructuredItem)&, +Interface_EntityIterator&) const +{ +} diff --git a/src/RWStepVisual/RWStepVisual_RWTessellatedStructuredItem.hxx b/src/RWStepVisual/RWStepVisual_RWTessellatedStructuredItem.hxx new file mode 100644 index 0000000000..ff235c8313 --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWTessellatedStructuredItem.hxx @@ -0,0 +1,53 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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_RWTessellatedStructuredItem_HeaderFile_ +#define _RWStepVisual_RWTessellatedStructuredItem_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepVisual_TessellatedStructuredItem; + +//! Read & Write tool for TessellatedStructuredItem +class RWStepVisual_RWTessellatedStructuredItem +{ + +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepVisual_RWTessellatedStructuredItem(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_TessellatedStructuredItem)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, + const Handle(StepVisual_TessellatedStructuredItem)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepVisual_TessellatedStructuredItem)& theEnt, + Interface_EntityIterator& theIter) const; + +}; + +#endif // _RWStepVisual_RWTessellatedStructuredItem_HeaderFile_ diff --git a/src/RWStepVisual/RWStepVisual_RWTessellatedVertex.cxx b/src/RWStepVisual/RWStepVisual_RWTessellatedVertex.cxx new file mode 100644 index 0000000000..6c651afd60 --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWTessellatedVertex.cxx @@ -0,0 +1,130 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepVisual_RWTessellatedVertex +//purpose : +//======================================================================= + +RWStepVisual_RWTessellatedVertex::RWStepVisual_RWTessellatedVertex() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedVertex::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_TessellatedVertex)& theEnt) const +{ + // Check number of parameters + if (!theData->CheckNbParams(theNum, 4, theCheck, "tessellated_vertex")) + { + return; + } + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString(theNum, 1, "representation_item.name", theCheck, aRepresentationItem_Name); + + // Own fields of TessellatedVertex + + Handle(StepVisual_CoordinatesList) aCoordinates; + theData->ReadEntity(theNum, 2, "coordinates", theCheck, + STANDARD_TYPE(StepVisual_CoordinatesList), aCoordinates); + + Handle(StepShape_VertexPoint) aTopologicalLink; + Standard_Boolean hasTopologicalLink = Standard_True; + if (theData->IsParamDefined(theNum, 3)) + { + theData->ReadEntity(theNum, 3, "topological_link", theCheck, + STANDARD_TYPE(StepShape_VertexPoint), aTopologicalLink); + } + else + { + hasTopologicalLink = Standard_False; + aTopologicalLink.Nullify(); + } + + Standard_Integer aPointIndex; + theData->ReadInteger(theNum, 4, "point_index", theCheck, aPointIndex); + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, aCoordinates, hasTopologicalLink, aTopologicalLink, aPointIndex); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedVertex::WriteStep (StepData_StepWriter& theSW, + const Handle(StepVisual_TessellatedVertex)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send(theEnt->Name()); + + // Own fields of TessellatedVertex + + theSW.Send(theEnt->Coordinates()); + + if (theEnt->HasTopologicalLink()) + { + theSW.Send(theEnt->TopologicalLink()); + } + else + { + theSW.SendUndef(); + } + + theSW.Send(theEnt->PointIndex()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedVertex::Share (const Handle(StepVisual_TessellatedVertex)&theEnt, + Interface_EntityIterator& theIter) const +{ + + // Inherited fields of RepresentationItem + + // Own fields of TessellatedVertex + + theIter.AddItem(theEnt->Coordinates()); + + if (theEnt->HasTopologicalLink()) + { + theIter.AddItem(theEnt->TopologicalLink()); + } +} diff --git a/src/RWStepVisual/RWStepVisual_RWTessellatedVertex.hxx b/src/RWStepVisual/RWStepVisual_RWTessellatedVertex.hxx new file mode 100644 index 0000000000..6ea6b5eff4 --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWTessellatedVertex.hxx @@ -0,0 +1,53 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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_RWTessellatedVertex_HeaderFile_ +#define _RWStepVisual_RWTessellatedVertex_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepVisual_TessellatedVertex; + +//! Read & Write tool for TessellatedVertex +class RWStepVisual_RWTessellatedVertex +{ + +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepVisual_RWTessellatedVertex(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_TessellatedVertex)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, + const Handle(StepVisual_TessellatedVertex)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepVisual_TessellatedVertex)& theEnt, + Interface_EntityIterator& theIter) const; + +}; + +#endif // _RWStepVisual_RWTessellatedVertex_HeaderFile_ diff --git a/src/RWStepVisual/RWStepVisual_RWTessellatedWire.cxx b/src/RWStepVisual/RWStepVisual_RWTessellatedWire.cxx new file mode 100644 index 0000000000..c37884f095 --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWTessellatedWire.cxx @@ -0,0 +1,145 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepVisual_RWTessellatedWire +//purpose : +//======================================================================= + +RWStepVisual_RWTessellatedWire::RWStepVisual_RWTessellatedWire() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedWire::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_TessellatedWire)& theEnt) const +{ + // Check number of parameters + if (!theData->CheckNbParams(theNum, 3, theCheck, "tessellated_wire")) + { + return; + } + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString(theNum, 1, "representation_item.name", theCheck, aRepresentationItem_Name); + + // Own fields of TessellatedWire + + Handle(StepVisual_HArray1OfTessellatedEdgeOrVertex) aItems; + Standard_Integer sub2 = 0; + if (theData->ReadSubList(theNum, 2, "items", theCheck, sub2)) + { + Standard_Integer nb0 = theData->NbParams(sub2); + aItems = new StepVisual_HArray1OfTessellatedEdgeOrVertex(1, nb0); + Standard_Integer num2 = sub2; + for (Standard_Integer i0 = 1; i0 <= nb0; i0++) + { + StepVisual_TessellatedEdgeOrVertex anIt0; + theData->ReadEntity(num2, i0, "tessellated_edge_or_vertex", theCheck, anIt0); + aItems->SetValue(i0, anIt0); + } + } + + StepVisual_PathOrCompositeCurve aGeometricModelLink; + Standard_Boolean hasGeometricModelLink = Standard_True; + if (theData->IsParamDefined(theNum, 3)) + { + theData->ReadEntity(theNum, 3, "geometric_model_link", theCheck, aGeometricModelLink); + } + else + { + hasGeometricModelLink = Standard_False; + aGeometricModelLink = StepVisual_PathOrCompositeCurve(); + } + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, aItems, hasGeometricModelLink, aGeometricModelLink); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedWire::WriteStep (StepData_StepWriter& theSW, + const Handle(StepVisual_TessellatedWire)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send(theEnt->Name()); + + // Own fields of TessellatedWire + + theSW.OpenSub(); + for (Standard_Integer i1 = 1; i1 <= theEnt->Items()->Length(); i1++) + { + StepVisual_TessellatedEdgeOrVertex Var0 = theEnt->Items()->Value(i1); + theSW.Send(Var0.Value()); + } + theSW.CloseSub(); + + if (theEnt->HasGeometricModelLink()) + { + theSW.Send(theEnt->GeometricModelLink().Value()); + } + else + { + theSW.SendUndef(); + } +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedWire::Share (const Handle(StepVisual_TessellatedWire)&theEnt, + Interface_EntityIterator& theIter) const +{ + + // Inherited fields of RepresentationItem + + // Own fields of TessellatedWire + + for (Standard_Integer i1 = 1; i1 <= theEnt->Items()->Length(); i1++) + { + StepVisual_TessellatedEdgeOrVertex Var0 = theEnt->Items()->Value(i1); + theIter.AddItem(Var0.Value()); + } + + if (theEnt->HasGeometricModelLink()) + { + theIter.AddItem(theEnt->GeometricModelLink().Value()); + } +} diff --git a/src/RWStepVisual/RWStepVisual_RWTessellatedWire.hxx b/src/RWStepVisual/RWStepVisual_RWTessellatedWire.hxx new file mode 100644 index 0000000000..e728a3f78c --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWTessellatedWire.hxx @@ -0,0 +1,53 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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_RWTessellatedWire_HeaderFile_ +#define _RWStepVisual_RWTessellatedWire_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepVisual_TessellatedWire; + +//! Read & Write tool for TessellatedWire +class RWStepVisual_RWTessellatedWire +{ + +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepVisual_RWTessellatedWire(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_TessellatedWire)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, + const Handle(StepVisual_TessellatedWire)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepVisual_TessellatedWire)& theEnt, + Interface_EntityIterator& theIter) const; + +}; + +#endif // _RWStepVisual_RWTessellatedWire_HeaderFile_ diff --git a/src/RWStepVisual/RWStepVisual_RWTriangulatedFace.cxx b/src/RWStepVisual/RWStepVisual_RWTriangulatedFace.cxx new file mode 100644 index 0000000000..c8acb6a064 --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWTriangulatedFace.cxx @@ -0,0 +1,239 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepVisual_RWTriangulatedFace +//purpose : +//======================================================================= + +RWStepVisual_RWTriangulatedFace::RWStepVisual_RWTriangulatedFace() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= + +void RWStepVisual_RWTriangulatedFace::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_TriangulatedFace)& theEnt) const +{ + // Check number of parameters + if (!theData->CheckNbParams(theNum, 7, theCheck, "triangulated_face")) + { + return; + } + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString(theNum, 1, "representation_item.name", theCheck, aRepresentationItem_Name); + + // Inherited fields of TessellatedFace + + Handle(StepVisual_CoordinatesList) aTessellatedFace_Coordinates; + theData->ReadEntity(theNum, 2, "tessellated_face.coordinates", theCheck, + STANDARD_TYPE(StepVisual_CoordinatesList), aTessellatedFace_Coordinates); + + Standard_Integer aTessellatedFace_Pnmax; + theData->ReadInteger(theNum, 3, "tessellated_face.pnmax", theCheck, aTessellatedFace_Pnmax); + + Handle(TColStd_HArray2OfReal) aTessellatedFace_Normals; + Standard_Integer sub4 = 0; + if (theData->ReadSubList(theNum, 4, "tessellated_face.normals", theCheck, sub4)) + { + Standard_Integer nb0 = theData->NbParams(sub4); + Standard_Integer nbj0 = theData->NbParams(theData->ParamNumber(sub4,1)); + aTessellatedFace_Normals = new TColStd_HArray2OfReal(1, nb0, 1, nbj0); + for (Standard_Integer i0 = 1; i0 <= nb0; i0++) + { + Standard_Integer subj4 = 0; + if ( theData->ReadSubList (sub4, i0, "sub-part(tessellated_face.normals)", theCheck, subj4) ) { + Standard_Integer num4 = subj4; + for (Standard_Integer j0 = 1; j0 <= nbj0; j0++) + { + Standard_Real anIt0; + theData->ReadReal(num4, j0, "real", theCheck, anIt0); + aTessellatedFace_Normals->SetValue(i0,j0, anIt0); + } + } + } + } + + StepVisual_FaceOrSurface aTessellatedFace_GeometricLink; + Standard_Boolean hasTessellatedFace_GeometricLink = Standard_True; + if (theData->IsParamDefined(theNum, 5)) + { + theData->ReadEntity(theNum, 5, "tessellated_face.geometric_link", theCheck, aTessellatedFace_GeometricLink); + } + else + { + hasTessellatedFace_GeometricLink = Standard_False; + aTessellatedFace_GeometricLink = StepVisual_FaceOrSurface(); + } + + // Own fields of TriangulatedFace + + Handle(TColStd_HArray1OfInteger) aPnindex; + Standard_Integer sub6 = 0; + if (theData->ReadSubList(theNum, 6, "pnindex", theCheck, sub6)) + { + Standard_Integer nb0 = theData->NbParams(sub6); + aPnindex = new TColStd_HArray1OfInteger(1, nb0); + Standard_Integer num2 = sub6; + for (Standard_Integer i0 = 1; i0 <= nb0; i0++) + { + Standard_Integer anIt0; + theData->ReadInteger(num2, i0, "integer", theCheck, anIt0); + aPnindex->SetValue(i0, anIt0); + } + } + + Handle(TColStd_HArray2OfInteger) aTriangles; + Standard_Integer sub7 = 0; + if (theData->ReadSubList(theNum, 7, "triangles", theCheck, sub7)) + { + Standard_Integer nb0 = theData->NbParams(sub7); + Standard_Integer nbj0 = theData->NbParams(theData->ParamNumber(sub7,1)); + aTriangles = new TColStd_HArray2OfInteger(1, nb0, 1, nbj0); + for (Standard_Integer i0 = 1; i0 <= nb0; i0++) + { + Standard_Integer subj7 = 0; + if ( theData->ReadSubList (sub7, i0, "sub-part(triangles)", theCheck, subj7) ) { + Standard_Integer num4 = subj7; + for (Standard_Integer j0 = 1; j0 <= nbj0; j0++) + { + Standard_Integer anIt0; + theData->ReadInteger(num4, j0, "integer", theCheck, anIt0); + aTriangles->SetValue(i0,j0, anIt0); + } + } + } + } + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, aTessellatedFace_Coordinates, aTessellatedFace_Pnmax, aTessellatedFace_Normals, hasTessellatedFace_GeometricLink, aTessellatedFace_GeometricLink, aPnindex, aTriangles); + +#ifdef OCCT_DEBUG + std::cout << aTessellatedFace_Pnmax << " " << (aTriangles.IsNull() ? 0 : aTriangles->NbRows()) << std::endl; +#endif +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= + +void RWStepVisual_RWTriangulatedFace::WriteStep (StepData_StepWriter& theSW, + const Handle(StepVisual_TriangulatedFace)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send(theEnt->Name()); + + // Own fields of TessellatedFace + + theSW.Send(theEnt->Coordinates()); + + theSW.Send(theEnt->Pnmax()); + + theSW.OpenSub(); + for (Standard_Integer i3 = 1; i3 <= theEnt->Normals()->NbRows(); i3++) + { + theSW.NewLine(Standard_False); + theSW.OpenSub(); + for (Standard_Integer j3 = 1; j3 <= theEnt->Normals()->NbColumns(); j3++) + { + Standard_Real Var0 = theEnt->Normals()->Value(i3,j3); + theSW.Send(Var0); + } + theSW.CloseSub(); + } + theSW.CloseSub(); + + if (theEnt->HasGeometricLink()) + { + theSW.Send(theEnt->GeometricLink().Value()); + } + else + { + theSW.SendUndef(); + } + + // Own fields of TriangulatedFace + + theSW.OpenSub(); + for (Standard_Integer i5 = 1; i5 <= theEnt->Pnindex()->Length(); i5++) + { + Standard_Integer Var0 = theEnt->Pnindex()->Value(i5); + theSW.Send(Var0); + } + theSW.CloseSub(); + + theSW.OpenSub(); + for (Standard_Integer i6 = 1; i6 <= theEnt->Triangles()->NbRows(); i6++) + { + theSW.NewLine(Standard_False); + theSW.OpenSub(); + for (Standard_Integer j6 = 1; j6 <= theEnt->Triangles()->NbColumns(); j6++) + { + Standard_Integer Var0 = theEnt->Triangles()->Value(i6,j6); + theSW.Send(Var0); + } + theSW.CloseSub(); + } + theSW.CloseSub(); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= + +void RWStepVisual_RWTriangulatedFace::Share (const Handle(StepVisual_TriangulatedFace)&theEnt, + Interface_EntityIterator& theIter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of TessellatedFace + + theIter.AddItem(theEnt->StepVisual_TessellatedFace::Coordinates()); + + if (theEnt->StepVisual_TessellatedFace::HasGeometricLink()) + { + theIter.AddItem(theEnt->StepVisual_TessellatedFace::GeometricLink().Value()); + } + + // Own fields of TriangulatedFace +} diff --git a/src/RWStepVisual/RWStepVisual_RWTriangulatedFace.hxx b/src/RWStepVisual/RWStepVisual_RWTriangulatedFace.hxx new file mode 100644 index 0000000000..e0ef703b15 --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWTriangulatedFace.hxx @@ -0,0 +1,53 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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_RWTriangulatedFace_HeaderFile_ +#define _RWStepVisual_RWTriangulatedFace_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepVisual_TriangulatedFace; + +//! Read & Write tool for TriangulatedFace +class RWStepVisual_RWTriangulatedFace +{ + +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepVisual_RWTriangulatedFace(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_TriangulatedFace)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, + const Handle(StepVisual_TriangulatedFace)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepVisual_TriangulatedFace)& theEnt, + Interface_EntityIterator& theIter) const; + +}; + +#endif // _RWStepVisual_RWTriangulatedFace_HeaderFile_ diff --git a/src/STEPCAFControl/STEPCAFControl_GDTProperty.cxx b/src/STEPCAFControl/STEPCAFControl_GDTProperty.cxx index 2c79553fcf..4823e4de1d 100644 --- a/src/STEPCAFControl/STEPCAFControl_GDTProperty.cxx +++ b/src/STEPCAFControl/STEPCAFControl_GDTProperty.cxx @@ -1311,6 +1311,7 @@ Handle(TCollection_HAsciiString) STEPCAFControl_GDTProperty::GetTolValueType(con //======================================================================= Handle(StepVisual_TessellatedGeometricSet) STEPCAFControl_GDTProperty::GetTessellation(const TopoDS_Shape theShape) { + Handle(StepVisual_TessellatedGeometricSet) aGeomSet; // Build coordinate list and curves NCollection_Handle aCurves = new StepVisual_VectorOfHSequenceOfInteger; NCollection_Vector aCoords; @@ -1344,6 +1345,11 @@ Handle(StepVisual_TessellatedGeometricSet) STEPCAFControl_GDTProperty::GetTessel aCurves->Append(aCurve); } + if (!aCoords.Length()) + { + return aGeomSet; + } + Handle(TColgp_HArray1OfXYZ) aPoints = new TColgp_HArray1OfXYZ(1, aCoords.Length()); for (Standard_Integer i = 1; i <= aPoints->Length(); i++) { aPoints->SetValue(i, aCoords.Value(i - 1)); @@ -1355,7 +1361,7 @@ Handle(StepVisual_TessellatedGeometricSet) STEPCAFControl_GDTProperty::GetTessel aCurveSet->Init(new TCollection_HAsciiString(), aCoordList, aCurves); NCollection_Handle aTessItems = new StepVisual_Array1OfTessellatedItem(1, 1); aTessItems->SetValue(1, aCurveSet); - Handle(StepVisual_TessellatedGeometricSet) aGeomSet = new StepVisual_TessellatedGeometricSet(); + aGeomSet = new StepVisual_TessellatedGeometricSet(); aGeomSet->Init(new TCollection_HAsciiString(), aTessItems); return aGeomSet; } diff --git a/src/STEPCAFControl/STEPCAFControl_Reader.cxx b/src/STEPCAFControl/STEPCAFControl_Reader.cxx index ba4ed3f5a1..58e9e576c9 100644 --- a/src/STEPCAFControl/STEPCAFControl_Reader.cxx +++ b/src/STEPCAFControl/STEPCAFControl_Reader.cxx @@ -277,6 +277,7 @@ #include #include #include +#include #include #include @@ -1746,54 +1747,201 @@ Standard_Boolean STEPCAFControl_Reader::ReadSHUOs(const Handle(XSControl_WorkSes return Standard_True; } +//======================================================================= +//function : GetMeasureWithUnit +//purpose : +//======================================================================= +static Handle(StepBasic_MeasureWithUnit) GetMeasureWithUnit(const Handle(Standard_Transient)& theMeasure) +{ + Handle(StepBasic_MeasureWithUnit) aMeasureWithUnit; + if (theMeasure->IsKind(STANDARD_TYPE(StepBasic_MeasureWithUnit))) + { + aMeasureWithUnit = Handle(StepBasic_MeasureWithUnit)::DownCast(theMeasure); + } + else if (theMeasure->IsKind(STANDARD_TYPE(StepRepr_ReprItemAndMeasureWithUnit))) + { + Handle(StepRepr_ReprItemAndMeasureWithUnit) aReprMeasureItem = + Handle(StepRepr_ReprItemAndMeasureWithUnit)::DownCast(theMeasure); + aMeasureWithUnit = aReprMeasureItem->GetMeasureWithUnit(); + } + return aMeasureWithUnit; +} + //======================================================================= //function : GetMassConversionFactor //purpose : //======================================================================= -static Standard_Boolean GetMassConversionFactor(Handle(StepBasic_NamedUnit)& NU, - Standard_Real& afact) +static Standard_Boolean GetMassConversionFactor(Handle(StepBasic_NamedUnit)& theNUnit, + Standard_Real& theFact) { - afact = 1.; - if (!NU->IsKind(STANDARD_TYPE(StepBasic_ConversionBasedUnitAndMassUnit))) return Standard_False; - Handle(StepBasic_ConversionBasedUnitAndMassUnit) CBUMU = - Handle(StepBasic_ConversionBasedUnitAndMassUnit)::DownCast(NU); - Handle(StepBasic_MeasureWithUnit) MWUCBU = CBUMU->ConversionFactor(); - afact = MWUCBU->ValueComponent(); - StepBasic_Unit anUnit2 = MWUCBU->UnitComponent(); - if (anUnit2.CaseNum(anUnit2.Value()) == 1) { + theFact = 1.; + if (!theNUnit->IsKind(STANDARD_TYPE(StepBasic_ConversionBasedUnitAndMassUnit))) + { + return Standard_False; + } + Handle(StepBasic_ConversionBasedUnitAndMassUnit) aCBUMU = + Handle(StepBasic_ConversionBasedUnitAndMassUnit)::DownCast(theNUnit); + Handle(StepBasic_MeasureWithUnit) aMWUCBU = GetMeasureWithUnit(aCBUMU->ConversionFactor()); + theFact = aMWUCBU->ValueComponent(); + StepBasic_Unit anUnit2 = aMWUCBU->UnitComponent(); + if (anUnit2.CaseNum(anUnit2.Value()) == 1) + { Handle(StepBasic_NamedUnit) NU2 = anUnit2.NamedUnit(); - if (NU2->IsKind(STANDARD_TYPE(StepBasic_SiUnit))) { + if (NU2->IsKind(STANDARD_TYPE(StepBasic_SiUnit))) + { Handle(StepBasic_SiUnit) SU = Handle(StepBasic_SiUnit)::DownCast(NU2); - if (SU->Name() == StepBasic_sunGram) { + if (SU->Name() == StepBasic_sunGram) + { if (SU->HasPrefix()) - afact *= STEPConstruct_UnitContext::ConvertSiPrefix(SU->Prefix()); + { + theFact *= STEPConstruct_UnitContext::ConvertSiPrefix(SU->Prefix()); + } } } } return Standard_True; } +// ============================================================================ +// Method : createMesh +// Purpose : creates a Poly_Triangulation from ComplexTriangulatedSurfaceSet +// ============================================================================ + +Handle(Poly_Triangulation) createMesh(const Handle(StepVisual_ComplexTriangulatedSurfaceSet)& theTriangulatedSufaceSet, + const Standard_Real theFact) +{ + Handle(StepVisual_CoordinatesList) aCoords = theTriangulatedSufaceSet->Coordinates(); + Handle(TColgp_HArray1OfXYZ) aNodes = aCoords->Points(); + Handle(TColStd_HArray1OfTransient) aTriaStrips = theTriangulatedSufaceSet->TriangleStrips(); + Handle(TColStd_HArray1OfTransient) aTriaFans = theTriangulatedSufaceSet->TriangleFans(); + const Standard_Boolean aHasUVNodes = Standard_False; + const Standard_Integer aNbNormals = theTriangulatedSufaceSet->NbNormals(); + // Number of pairs (Point, Normal). It is possible for one point to have multiple normals. This is + // useful when the underlying surface is not C1 continuous. + const Standard_Integer aNbPairs = aNbNormals > 1 ? theTriangulatedSufaceSet->NbPnindex() : aNodes->Length(); + const Standard_Boolean aHasNormals = aNbNormals > 0; + + // Counting number of triangles in the triangle strips list. + // A triangle strip is a list of 3 or more points defining a set of connected triangles. + Standard_Integer aNbTriaStrips = 0; + for (Standard_Integer i = 1; i <= theTriangulatedSufaceSet->NbTriangleStrips(); ++i) + { + Handle(TColStd_HArray1OfInteger) aTriangleStrip = Handle(TColStd_HArray1OfInteger)::DownCast(aTriaStrips->Value(i)); + aNbTriaStrips += aTriangleStrip->Length() - 2; + } + + // Counting number of triangles in the triangle fans list. + // A triangle fan is a set of 3 or more points defining a set of connected triangles sharing a common vertex. + Standard_Integer aNbTriaFans = 0; + for (Standard_Integer i = 1; i <= theTriangulatedSufaceSet->NbTriangleFans(); ++i) + { + Handle(TColStd_HArray1OfInteger) aTriangleFan = Handle(TColStd_HArray1OfInteger)::DownCast(aTriaFans->Value(i)); + aNbTriaFans += aTriangleFan->Length() - 2; + } + + Handle(Poly_Triangulation) aMesh = new Poly_Triangulation(aNbPairs, aNbTriaStrips + aNbTriaFans, aHasUVNodes); + + for (Standard_Integer j = 1; j <= aNbPairs; ++j) + { + const gp_XYZ& aPoint = aNodes->Value(aNbNormals > 1 ? theTriangulatedSufaceSet->PnindexValue(j) : j); + aMesh->ChangeNode(j) = theFact * aPoint; + } + + // Creating triangles from triangle strips. Processing is split in two parts to + // path through nodes in the same direction. + Standard_Integer k = 1; + for (Standard_Integer i = 1; i <= theTriangulatedSufaceSet->NbTriangleStrips(); ++i) + { + Handle(TColStd_HArray1OfInteger) aTriangleStrip = Handle(TColStd_HArray1OfInteger)::DownCast(aTriaStrips->Value(i)); + for (Standard_Integer j = 3; j <= aTriangleStrip->Length(); j += 2) + { + if (aTriangleStrip->Value(j) != aTriangleStrip->Value(j - 2) && + aTriangleStrip->Value(j) != aTriangleStrip->Value(j - 1)) + { + aMesh->ChangeTriangle(k++) = Poly_Triangle(aTriangleStrip->Value(j - 2), + aTriangleStrip->Value(j), + aTriangleStrip->Value(j - 1)); + } + } + for (Standard_Integer j = 4; j <= aTriangleStrip->Length(); j += 2) + { + if (aTriangleStrip->Value(j) != aTriangleStrip->Value(j - 2) && + aTriangleStrip->Value(j) != aTriangleStrip->Value(j - 1)) + { + aMesh->ChangeTriangle(k++) = Poly_Triangle(aTriangleStrip->Value(j - 2), + aTriangleStrip->Value(j - 1), + aTriangleStrip->Value(j)); + } + } + } + + // Creating triangles from triangle strips. + for (Standard_Integer i = 1; i <= theTriangulatedSufaceSet->NbTriangleFans(); ++i) + { + Handle(TColStd_HArray1OfInteger) aTriangleFan = Handle(TColStd_HArray1OfInteger)::DownCast(aTriaFans->Value(i)); + for (Standard_Integer j = 3; j <= aTriangleFan->Length(); ++j) + { + aMesh->ChangeTriangle(k++) = Poly_Triangle(aTriangleFan->Value(1), + aTriangleFan->Value(j - 1), + aTriangleFan->Value(j)); + } + } + + if (aHasNormals) + { + Handle(TColStd_HArray2OfReal) aNormals = theTriangulatedSufaceSet->Normals(); + Handle(TShort_HArray1OfShortReal) aPolyNormals = new TShort_HArray1OfShortReal(1, aNbPairs * 3); + aMesh->SetNormals(aPolyNormals); + gp_XYZ aNorm; + if (theTriangulatedSufaceSet->NbNormals() == 1) + { + aNorm.SetX(aNormals->Value(1, 1)); + aNorm.SetY(aNormals->Value(1, 2)); + aNorm.SetZ(aNormals->Value(1, 3)); + for (Standard_Integer i = 1; i <= aNbPairs; ++i) + { + aMesh->SetNormal(i, aNorm); + } + } + else + { + for (Standard_Integer i = 1; i <= aNbPairs; ++i) + { + aNorm.SetX(aNormals->Value(i, 1)); + aNorm.SetY(aNormals->Value(i, 2)); + aNorm.SetZ(aNormals->Value(i, 3)); + aMesh->SetNormal(i, aNorm); + } + } + } + + return aMesh; +} + //======================================================================= //function : readPMIPresentation //purpose : read polyline or tessellated presentation for // (Annotation_Curve_Occurrence or Draughting_Callout) //======================================================================= Standard_Boolean readPMIPresentation(const Handle(Standard_Transient)& thePresentEntity, - const Handle(XSControl_TransferReader)& theTR, - const Standard_Real theFact, - TopoDS_Shape& thePresentation, - Handle(TCollection_HAsciiString)& thePresentName, - Bnd_Box& theBox) + const Handle(XSControl_TransferReader)& theTR, + const Standard_Real theFact, + TopoDS_Shape& thePresentation, + Handle(TCollection_HAsciiString)& thePresentName, + Bnd_Box& theBox) { if (thePresentEntity.IsNull()) + { return Standard_False; + } Handle(Transfer_TransientProcess) aTP = theTR->TransientProcess(); Handle(StepVisual_AnnotationOccurrence) anAO; NCollection_Vector anAnnotations; if (thePresentEntity->IsKind(STANDARD_TYPE(StepVisual_AnnotationOccurrence))) { anAO = Handle(StepVisual_AnnotationOccurrence)::DownCast(thePresentEntity); - if (!anAO.IsNull()) { + if (!anAO.IsNull()) + { thePresentName = anAO->Name(); anAnnotations.Append(anAO); } @@ -1818,17 +1966,17 @@ Standard_Boolean readPMIPresentation(const Handle(Standard_Transient)& thePresen } if (!anAnnotations.Length()) + { return Standard_False; - + } BRep_Builder aB; TopoDS_Compound aResAnnotation; aB.MakeCompound(aResAnnotation); - Standard_Integer i = 0; Bnd_Box aBox; - Standard_Integer nbShapes = 0; - for (; i < anAnnotations.Length(); i++) + Standard_Integer aNbShapes = 0; + for (Standard_Integer i = 0; i < anAnnotations.Length(); i++) { Handle(StepVisual_StyledItem) anItem = anAnnotations(i); anAO = Handle(StepVisual_AnnotationOccurrence)::DownCast(anItem); @@ -1839,19 +1987,19 @@ Standard_Boolean readPMIPresentation(const Handle(Standard_Transient)& thePresen anAnnotationShape = STEPConstruct::FindShape(aTP, aCurveItem); if (anAnnotationShape.IsNull()) { - Handle(Transfer_Binder) binder = theTR->Actor()->Transfer(aCurveItem, aTP); - if (!binder.IsNull() && binder->HasResult()) { - anAnnotationShape = TransferBRep::ShapeResult(aTP, binder); + Handle(Transfer_Binder) aBinder = theTR->Actor()->Transfer(aCurveItem, aTP); + if (!aBinder.IsNull() && aBinder->HasResult()) { + anAnnotationShape = TransferBRep::ShapeResult(aTP, aBinder); } } } //case of tessellated entities else { - Handle(StepRepr_RepresentationItem) aTessItem = anItem->Item(); - if (aTessItem.IsNull()) + Handle(StepRepr_RepresentationItem) aRepresentationItem = anItem->Item(); + if (aRepresentationItem.IsNull()) continue; - Handle(StepVisual_TessellatedGeometricSet) aTessSet = Handle(StepVisual_TessellatedGeometricSet)::DownCast(aTessItem); + Handle(StepVisual_TessellatedGeometricSet) aTessSet = Handle(StepVisual_TessellatedGeometricSet)::DownCast(aRepresentationItem); if (aTessSet.IsNull()) continue; gp_Trsf aTransf; @@ -1874,55 +2022,75 @@ Standard_Boolean readPMIPresentation(const Handle(Standard_Transient)& thePresen } } NCollection_Handle aListItems = aTessSet->Items(); - Standard_Integer nb = aListItems.IsNull() ? 0 : aListItems->Length(); - Handle(StepVisual_TessellatedCurveSet) aTessCurve; - for (Standard_Integer n = 1; n <= nb && aTessCurve.IsNull(); n++) - { - aTessCurve = Handle(StepVisual_TessellatedCurveSet)::DownCast(aListItems->Value(n)); - } - if (aTessCurve.IsNull()) - continue; - Handle(StepVisual_CoordinatesList) aCoordList = aTessCurve->CoordList(); - if (aCoordList.IsNull()) - continue; - Handle(TColgp_HArray1OfXYZ) aPoints = aCoordList->Points(); - - if (aPoints.IsNull() || aPoints->Length() == 0) - continue; - NCollection_Handle aCurves = aTessCurve->Curves(); - Standard_Integer aNbC = (aCurves.IsNull() ? 0 : aCurves->Length()); + Standard_Integer aNbItems = aListItems.IsNull() ? 0 : aListItems->Length(); TopoDS_Compound aComp; aB.MakeCompound(aComp); - - Standard_Integer k = 0; - for (; k < aNbC; k++) + for (Standard_Integer j = 1; j <= aNbItems; j++) { - Handle(TColStd_HSequenceOfInteger) anIndexes = aCurves->Value(k); - TopoDS_Wire aCurW; - aB.MakeWire(aCurW); - - for (Standard_Integer n = 1; n < anIndexes->Length(); n++) + Handle(StepVisual_TessellatedItem) aTessItem = aListItems->Value(j); + if (aTessItem.IsNull()) { - Standard_Integer ind = anIndexes->Value(n); - Standard_Integer indnext = anIndexes->Value(n + 1); - if (ind > aPoints->Length() || indnext > aPoints->Length()) - continue; - gp_Pnt aP1(aPoints->Value(ind) * theFact); - gp_Pnt aP2(aPoints->Value(indnext) * theFact); - BRepBuilderAPI_MakeEdge aMaker(aP1, aP2); - if (aMaker.IsDone()) + continue; + } + if (aTessItem->IsKind(STANDARD_TYPE(StepVisual_TessellatedCurveSet))) + { + Handle(StepVisual_TessellatedCurveSet) aTessCurve = Handle(StepVisual_TessellatedCurveSet)::DownCast(aTessItem); + Handle(StepVisual_CoordinatesList) aCoordList = aTessCurve->CoordList(); + if (aCoordList.IsNull()) { - TopoDS_Edge aCurE = aMaker.Edge(); - aB.Add(aCurW, aCurE); + continue; + } + + Handle(TColgp_HArray1OfXYZ) aPoints = aCoordList->Points(); + if (aPoints.IsNull() || aPoints->Length() == 0) + { + continue; + } + + NCollection_Handle aCurves = aTessCurve->Curves(); + Standard_Integer aNbCurves = (aCurves.IsNull() ? 0 : aCurves->Length()); + for (Standard_Integer k = 0; k < aNbCurves; k++) + { + Handle(TColStd_HSequenceOfInteger) anIndexes = aCurves->Value(k); + TopoDS_Wire aCurW; + aB.MakeWire(aCurW); + for (Standard_Integer n = 1; n < anIndexes->Length(); n++) + { + Standard_Integer anIndex = anIndexes->Value(n); + Standard_Integer aNextIndex = anIndexes->Value(n + 1); + if (anIndex > aPoints->Length() || aNextIndex > aPoints->Length()) + { + continue; + } + gp_Pnt aP1(aPoints->Value(anIndex) * theFact); + gp_Pnt aP2(aPoints->Value(aNextIndex) * theFact); + BRepBuilderAPI_MakeEdge aMaker(aP1, aP2); + if (aMaker.IsDone()) + { + TopoDS_Edge aCurE = aMaker.Edge(); + aB.Add(aCurW, aCurE); + } + } + aB.Add(aComp, aCurW); } } - aB.Add(aComp, aCurW); + else if (aTessItem->IsKind(STANDARD_TYPE(StepVisual_ComplexTriangulatedSurfaceSet))) + { + Handle(StepVisual_ComplexTriangulatedSurfaceSet) aTessSurfSet = Handle(StepVisual_ComplexTriangulatedSurfaceSet)::DownCast(aTessItem); + Handle(Poly_Triangulation) aSurfSetMesh = createMesh(aTessSurfSet, theFact); + TopoDS_Face aFace; + aB.MakeFace(aFace, aSurfSetMesh); + aB.Add(aComp, aFace); + } + } + if (!aComp.IsNull()) + { + anAnnotationShape = aComp.Moved(aTransf); } - anAnnotationShape = aComp.Moved(aTransf); } if (!anAnnotationShape.IsNull()) { - nbShapes++; + aNbShapes++; aB.Add(aResAnnotation, anAnnotationShape); if (i == anAnnotations.Length() - 1) BRepBndLib::AddClose(anAnnotationShape, aBox); @@ -1931,7 +2099,7 @@ Standard_Boolean readPMIPresentation(const Handle(Standard_Transient)& thePresen thePresentation = aResAnnotation; theBox = aBox; - return (nbShapes > 0); + return (aNbShapes > 0); } //======================================================================= @@ -2957,24 +3125,32 @@ TDF_Label STEPCAFControl_Reader::createGDTObjectInXCAF(const Handle(Standard_Tra aDGTTool->SetDimTol(shL, 1, arr, aName, DimSize->Name()); } // read tolerances and datums - else if (theEnt->IsKind(STANDARD_TYPE(StepDimTol_GeometricTolerance))) { + else if (theEnt->IsKind(STANDARD_TYPE(StepDimTol_GeometricTolerance))) + { Handle(StepDimTol_GeometricTolerance) GT = Handle(StepDimTol_GeometricTolerance)::DownCast(theEnt); // read common data for tolerance //Standard_Real dim = GT->Magnitude()->ValueComponent(); - Handle(StepBasic_MeasureWithUnit) dim3 = GT->Magnitude(); - if (dim3.IsNull()) continue; - Standard_Real dim = dim3->ValueComponent(); - StepBasic_Unit anUnit = GT->Magnitude()->UnitComponent(); + if (GT->Magnitude().IsNull()) + { + continue; + } + Handle(StepBasic_MeasureWithUnit) aMWU = GetMeasureWithUnit(GT->Magnitude()); + if (aMWU.IsNull()) + { + continue; + } + Standard_Real aVal = aMWU->ValueComponent(); + StepBasic_Unit anUnit = aMWU->UnitComponent(); if (anUnit.IsNull()) continue; if (!(anUnit.CaseNum(anUnit.Value()) == 1)) continue; Handle(StepBasic_NamedUnit) NU = anUnit.NamedUnit(); STEPConstruct_UnitContext anUnitCtx; anUnitCtx.ComputeFactors(NU); - dim = dim * anUnitCtx.LengthFactor(); + aVal = aVal * anUnitCtx.LengthFactor(); //std::cout<<"GeometricTolerance: Magnitude = "<SetValue(1, dim); + arr->SetValue(1, aVal); Handle(TCollection_HAsciiString) aName = GT->Name(); Handle(TCollection_HAsciiString) aDescription = GT->Description(); Handle(StepShape_AdvancedFace) AF = Handle(StepShape_AdvancedFace)::DownCast(RI); @@ -3501,16 +3677,7 @@ static void setDimObjectToXCAF(const Handle(Standard_Transient)& theEnt, Handle(Standard_Transient) aUpperBound = aTV->UpperBound(); if(aUpperBound.IsNull()) continue; - Handle(StepBasic_MeasureWithUnit) aMWU; - if(aUpperBound->IsKind(STANDARD_TYPE(StepBasic_MeasureWithUnit)) ) - aMWU = Handle(StepBasic_MeasureWithUnit)::DownCast(aUpperBound); - else if(aUpperBound->IsKind(STANDARD_TYPE(StepRepr_ReprItemAndMeasureWithUnit)) ) - { - Handle(StepRepr_ReprItemAndMeasureWithUnit) aReprMeasureItem = - Handle(StepRepr_ReprItemAndMeasureWithUnit)::DownCast(aUpperBound); - aMWU = aReprMeasureItem->GetMeasureWithUnit(); - - } + Handle(StepBasic_MeasureWithUnit) aMWU = GetMeasureWithUnit(aUpperBound); if(aMWU.IsNull()) continue; Standard_Real aVal = aMWU->ValueComponent(); @@ -3537,15 +3704,7 @@ static void setDimObjectToXCAF(const Handle(Standard_Transient)& theEnt, if(aLowerBound.IsNull()) continue; - if(aLowerBound->IsKind(STANDARD_TYPE(StepBasic_MeasureWithUnit)) ) - aMWU = Handle(StepBasic_MeasureWithUnit)::DownCast(aLowerBound); - else if(aLowerBound->IsKind(STANDARD_TYPE(StepRepr_ReprItemAndMeasureWithUnit)) ) - { - Handle(StepRepr_ReprItemAndMeasureWithUnit) aReprMeasureItem = - Handle(StepRepr_ReprItemAndMeasureWithUnit)::DownCast(aLowerBound); - aMWU = aReprMeasureItem->GetMeasureWithUnit(); - - } + aMWU = GetMeasureWithUnit(aLowerBound); if(aMWU.IsNull()) continue; @@ -3904,17 +4063,26 @@ static void setGeomTolObjectToXCAF(const Handle(Standard_Transient)& theEnt, XCAFDimTolObjects_GeomToleranceType aType = XCAFDimTolObjects_GeomToleranceType_None; getTolType(theEnt, aType); aTolObj->SetType(aType); - if (!aTolEnt->Magnitude().IsNull()) { - //get value - Standard_Real aVal = aTolEnt->Magnitude()->ValueComponent(); - StepBasic_Unit anUnit = aTolEnt->Magnitude()->UnitComponent(); - if (anUnit.IsNull()) return; - if (!(anUnit.CaseNum(anUnit.Value()) == 1)) return; - Handle(StepBasic_NamedUnit) NU = anUnit.NamedUnit(); - STEPConstruct_UnitContext anUnitCtx; - anUnitCtx.ComputeFactors(NU); - aVal = aVal * anUnitCtx.LengthFactor(); - aTolObj->SetValue(aVal); + if (!aTolEnt->Magnitude().IsNull()) + { + Handle(StepBasic_MeasureWithUnit) aMWU = GetMeasureWithUnit(aTolEnt->Magnitude()); + if (!aMWU.IsNull()) + { + // Get value + Standard_Real aVal = aMWU->ValueComponent(); + StepBasic_Unit anUnit = aMWU->UnitComponent(); + if (!anUnit.IsNull() && anUnit.CaseNum(anUnit.Value()) == 1) + { + Handle(StepBasic_NamedUnit) aNU = anUnit.NamedUnit(); + STEPConstruct_UnitContext anUnitCtx; + anUnitCtx.ComputeFactors(aNU); + if (anUnitCtx.LengthFactor() > 0.) + { + aVal = aVal * anUnitCtx.LengthFactor(); + } + } + aTolObj->SetValue(aVal); + } } //get modifiers XCAFDimTolObjects_GeomToleranceTypeValue aTypeV = XCAFDimTolObjects_GeomToleranceTypeValue_None; diff --git a/src/STEPCAFControl/STEPCAFControl_Writer.cxx b/src/STEPCAFControl/STEPCAFControl_Writer.cxx index 083f89f66c..08d77a7ef7 100644 --- a/src/STEPCAFControl/STEPCAFControl_Writer.cxx +++ b/src/STEPCAFControl/STEPCAFControl_Writer.cxx @@ -2553,6 +2553,10 @@ void STEPCAFControl_Writer::WritePresentation(const Handle(XSControl_WorkSession // Presentation Handle(StepVisual_TessellatedGeometricSet) aGeomSet = STEPCAFControl_GDTProperty::GetTessellation(thePresentation); + if (aGeomSet.IsNull()) + { + return; + } Handle(StepVisual_TessellatedAnnotationOccurrence) aTAO = new StepVisual_TessellatedAnnotationOccurrence(); aTAO->Init(new TCollection_HAsciiString(), myGDTPrsCurveStyle, aGeomSet); StepVisual_DraughtingCalloutElement aDCElement; diff --git a/src/STEPConstruct/STEPConstruct_UnitContext.cxx b/src/STEPConstruct/STEPConstruct_UnitContext.cxx index 7804a95218..89b1367212 100644 --- a/src/STEPConstruct/STEPConstruct_UnitContext.cxx +++ b/src/STEPConstruct/STEPConstruct_UnitContext.cxx @@ -48,6 +48,7 @@ #include #include #include +#include #include #include @@ -121,13 +122,13 @@ void STEPConstruct_UnitContext::Init(const Standard_Real Tol3d) Handle(StepBasic_DimensionalExponents) theDimExp = new StepBasic_DimensionalExponents; theDimExp->Init ( 1., 0., 0., 0., 0., 0., 0. ); - - Handle(TCollection_HAsciiString) convName = new TCollection_HAsciiString ( uName ); - Handle(StepBasic_ConversionBasedUnitAndLengthUnit) convUnit = + + Handle(TCollection_HAsciiString) aConvName = new TCollection_HAsciiString(uName); + Handle(StepBasic_ConversionBasedUnitAndLengthUnit) aConvUnit = new StepBasic_ConversionBasedUnitAndLengthUnit; - convUnit->Init ( theDimExp, convName, measure ); - - lengthUnit = convUnit; + aConvUnit->Init(theDimExp, aConvName, measure); + + lengthUnit = aConvUnit; } else lengthUnit = siUnit; @@ -287,60 +288,74 @@ Standard_Integer STEPConstruct_UnitContext::ComputeFactors(const Handle(StepRepr } -Standard_Integer STEPConstruct_UnitContext::ComputeFactors(const Handle(StepBasic_NamedUnit)& aUnit) +Standard_Integer STEPConstruct_UnitContext::ComputeFactors(const Handle(StepBasic_NamedUnit)& theUnit) { - //:f3 abv 8 Apr 98: ProSTEP TR8 tr8_as_sd_sw: the case of unrecognized entity - if ( aUnit.IsNull() ) + if (theUnit.IsNull()) return -1; Standard_Integer status = 0; - Standard_Real theFactor= 0.; - Standard_Real theSIUNF = 0.; + Standard_Real theFactor = 0.; + Standard_Real theSIUNF = 0.; Standard_Real parameter= 0.; Standard_Boolean parameterDone = Standard_False; - if(aUnit->IsKind(STANDARD_TYPE(StepBasic_ConversionBasedUnit))) { - Handle(StepBasic_ConversionBasedUnit) theCBU = - Handle(StepBasic_ConversionBasedUnit)::DownCast(aUnit); + if(theUnit->IsKind(STANDARD_TYPE(StepBasic_ConversionBasedUnit))) + { + Handle(StepBasic_ConversionBasedUnit) aCBU = + Handle(StepBasic_ConversionBasedUnit)::DownCast(theUnit); // Handle(StepBasic_DimensionalExponents) theDimExp = theCBU->Dimensions(); - Handle(StepBasic_MeasureWithUnit) theMWU; - if(!theCBU.IsNull()) { - theMWU = theCBU->ConversionFactor(); - // sln 8.10.2001: the case of unrecognized entity - if(theMWU.IsNull()) - return -1; + Handle(StepBasic_MeasureWithUnit) aMWU; + if(!aCBU.IsNull()) + { + Handle(Standard_Transient) aConvFactor = aCBU->ConversionFactor(); + if (aConvFactor->IsKind(STANDARD_TYPE(StepBasic_MeasureWithUnit))) + { + aMWU = Handle(StepBasic_MeasureWithUnit)::DownCast(aConvFactor); + } + else if (aConvFactor->IsKind(STANDARD_TYPE(StepRepr_ReprItemAndMeasureWithUnit))) + { + Handle(StepRepr_ReprItemAndMeasureWithUnit) aReprMeasureItem = + Handle(StepRepr_ReprItemAndMeasureWithUnit)::DownCast(aConvFactor); + aMWU = aReprMeasureItem->GetMeasureWithUnit(); + } + // sln 8.10.2001: the case of unrecognized entity + if(aMWU.IsNull()) + return -1; //if (!theMWU->IsKind(STANDARD_TYPE(StepBasic_LengthMeasureWithUnit))) { gka - // return 2; + // return 2; //} - Handle(StepBasic_NamedUnit) theTargetUnit = theMWU->UnitComponent().NamedUnit(); + Handle(StepBasic_NamedUnit) theTargetUnit = aMWU->UnitComponent().NamedUnit(); //StepBasic_Unit theTargetUnit = theMWU->UnitComponent(); Standard_Real theSIPFactor = 1.; - + //:f5 abv 24 Apr 98: ProSTEP TR8 tr8_bv1_tc: INCHES -//gka Handle(StepBasic_SiUnitAndLengthUnit) theSUALU = -// Handle(StepBasic_SiUnitAndLengthUnit)::DownCast(theTargetUnit); -// Handle(StepBasic_SiUnit) theSIU; -// if ( ! theSUALU.IsNull() ) theSIU = Handle(StepBasic_SiUnit)::DownCast(theSUALU); - Handle(StepBasic_SiUnit) theSIU = //f5 - Handle(StepBasic_SiUnit)::DownCast(theTargetUnit);//f5 - - if (!theSIU.IsNull()) { - if (theSIU->HasPrefix()) { - // Treat the prefix - StepBasic_SiPrefix aPrefix = theSIU->Prefix(); - theSIPFactor = ConvertSiPrefix(aPrefix); - } - // Treat the SiUnitName - if (!SiUnitNameFactor(theSIU,theSIUNF)) status = 11; // et continue - //std::cout << "The SiUnitNameFactor is :"; - //std::cout << theSIUNF << std::endl; + //gka + //Handle(StepBasic_SiUnitAndLengthUnit) theSUALU = + //Handle(StepBasic_SiUnitAndLengthUnit)::DownCast(theTargetUnit); + //Handle(StepBasic_SiUnit) theSIU; + //if ( ! theSUALU.IsNull() ) theSIU = Handle(StepBasic_SiUnit)::DownCast(theSUALU); + Handle(StepBasic_SiUnit) theSIU = Handle(StepBasic_SiUnit)::DownCast(theTargetUnit); //f5 + + if (!theSIU.IsNull()) + { + if (theSIU->HasPrefix()) + { + // Treat the prefix + StepBasic_SiPrefix aPrefix = theSIU->Prefix(); + theSIPFactor = ConvertSiPrefix(aPrefix); + } + // Treat the SiUnitName + if (!SiUnitNameFactor(theSIU,theSIUNF)) status = 11; // et continue + //std::cout << "The SiUnitNameFactor is :"; + //std::cout << theSIUNF << std::endl; } - else { - // std::cout << "Recursive algo required - Aborted" << std::endl; - return 3; + else + { + //std::cout << "Recursive algo required - Aborted" << std::endl; + return 3; } - Standard_Real theMVAL = theMWU->ValueComponent(); + Standard_Real theMVAL = aMWU->ValueComponent(); theFactor = theSIPFactor * theMVAL; // * theSIUNF * pow(10.,theLExp) } parameter = theFactor; @@ -353,9 +368,10 @@ Standard_Integer STEPConstruct_UnitContext::ComputeFactors(const Handle(StepBasi std::cout << "Error in the file : parameter double defined" << std::endl; #endif } - } - else if (aUnit->IsKind(STANDARD_TYPE(StepBasic_SiUnit))) { - Handle(StepBasic_SiUnit) theSIU = Handle(StepBasic_SiUnit)::DownCast(aUnit); + } + else if (theUnit->IsKind(STANDARD_TYPE(StepBasic_SiUnit))) + { + Handle(StepBasic_SiUnit) theSIU = Handle(StepBasic_SiUnit)::DownCast(theUnit); Standard_Real theSIPFactor = 1.; if (theSIU->HasPrefix()) { // Treat the prefix @@ -388,8 +404,9 @@ Standard_Integer STEPConstruct_UnitContext::ComputeFactors(const Handle(StepBasi return 0; } - if (aUnit->IsKind(STANDARD_TYPE(StepBasic_ConversionBasedUnitAndLengthUnit))|| - aUnit->IsKind(STANDARD_TYPE(StepBasic_SiUnitAndLengthUnit))) { + if (theUnit->IsKind(STANDARD_TYPE(StepBasic_ConversionBasedUnitAndLengthUnit))|| + theUnit->IsKind(STANDARD_TYPE(StepBasic_SiUnitAndLengthUnit))) + { #ifdef METER lengthFactor = parameter; #else @@ -404,18 +421,21 @@ Standard_Integer STEPConstruct_UnitContext::ComputeFactors(const Handle(StepBasi #endif } } // end of LengthUnit - else if (aUnit->IsKind(STANDARD_TYPE(StepBasic_ConversionBasedUnitAndPlaneAngleUnit))|| - aUnit->IsKind(STANDARD_TYPE(StepBasic_SiUnitAndPlaneAngleUnit))) { + else if (theUnit->IsKind(STANDARD_TYPE(StepBasic_ConversionBasedUnitAndPlaneAngleUnit)) || + theUnit->IsKind(STANDARD_TYPE(StepBasic_SiUnitAndPlaneAngleUnit))) + { planeAngleFactor = parameter; planeAngleDone = Standard_True; } // end of PlaneAngleUnit - else if (aUnit->IsKind(STANDARD_TYPE(StepBasic_ConversionBasedUnitAndSolidAngleUnit))|| - aUnit->IsKind(STANDARD_TYPE(StepBasic_SiUnitAndSolidAngleUnit))) { + else if (theUnit->IsKind(STANDARD_TYPE(StepBasic_ConversionBasedUnitAndSolidAngleUnit)) || + theUnit->IsKind(STANDARD_TYPE(StepBasic_SiUnitAndSolidAngleUnit))) + { solidAngleFactor = parameter; solidAngleDone = Standard_True; } // end of SolidAngleUnit - else if (aUnit->IsKind(STANDARD_TYPE(StepBasic_ConversionBasedUnitAndAreaUnit)) || - aUnit->IsKind(STANDARD_TYPE(StepBasic_SiUnitAndAreaUnit))) { + else if (theUnit->IsKind(STANDARD_TYPE(StepBasic_ConversionBasedUnitAndAreaUnit)) || + theUnit->IsKind(STANDARD_TYPE(StepBasic_SiUnitAndAreaUnit))) + { Standard_Real af; #ifdef METER af = parameter; @@ -425,8 +445,9 @@ Standard_Integer STEPConstruct_UnitContext::ComputeFactors(const Handle(StepBasi areaDone = Standard_True; areaFactor = pow(af,2); } - else if (aUnit->IsKind(STANDARD_TYPE(StepBasic_ConversionBasedUnitAndVolumeUnit)) || - aUnit->IsKind(STANDARD_TYPE(StepBasic_SiUnitAndVolumeUnit))) { + else if (theUnit->IsKind(STANDARD_TYPE(StepBasic_ConversionBasedUnitAndVolumeUnit)) || + theUnit->IsKind(STANDARD_TYPE(StepBasic_SiUnitAndVolumeUnit))) + { Standard_Real af; #ifdef METER af = parameter; diff --git a/src/STEPControl/STEPControl_ActorRead.cxx b/src/STEPControl/STEPControl_ActorRead.cxx index 0fb9a2eb7a..6e15eea916 100644 --- a/src/STEPControl/STEPControl_ActorRead.cxx +++ b/src/STEPControl/STEPControl_ActorRead.cxx @@ -87,6 +87,10 @@ #include #include #include +#include +#include +#include +#include #include #include #include @@ -94,6 +98,7 @@ #include #include #include +#include #include #include #include @@ -102,6 +107,7 @@ #include #include #include +#include #include #include #include @@ -208,6 +214,7 @@ STEPControl_ActorRead::STEPControl_ActorRead() myMaxTol(0.0) { } + // ============================================================================ // Method : STEPControl_ActorRead::Recognize // Purpose : tells if an entity is valid for transfer by this Actor @@ -235,6 +242,8 @@ Standard_Boolean STEPControl_ActorRead::Recognize return Standard_False; } + const Standard_Boolean aCanReadTessGeom = (Interface_Static::IVal("read.step.tessellated") != 0); + if (start->IsKind(STANDARD_TYPE(StepShape_FacetedBrep))) return Standard_True; if (start->IsKind(STANDARD_TYPE(StepShape_BrepWithVoids))) return Standard_True; if (start->IsKind(STANDARD_TYPE(StepShape_ManifoldSolidBrep))) return Standard_True; @@ -245,6 +254,10 @@ Standard_Boolean STEPControl_ActorRead::Recognize if (start->IsKind(STANDARD_TYPE(StepShape_FaceSurface))) return Standard_True; if (start->IsKind(STANDARD_TYPE(StepShape_EdgeBasedWireframeModel))) return Standard_True; if (start->IsKind(STANDARD_TYPE(StepShape_FaceBasedSurfaceModel))) return Standard_True; + if (aCanReadTessGeom && start->IsKind(STANDARD_TYPE(StepVisual_TessellatedFace))) return Standard_True; + if (aCanReadTessGeom && start->IsKind(STANDARD_TYPE(StepVisual_TessellatedShell))) return Standard_True; + if (aCanReadTessGeom && start->IsKind(STANDARD_TYPE(StepVisual_TessellatedSolid))) return Standard_True; + if (aCanReadTessGeom && start->IsKind(STANDARD_TYPE(StepVisual_TessellatedShapeRepresentation))) return Standard_True; // REPRESENTATION_RELATIONSHIP et consorts : on regarde le contenu ... @@ -853,6 +866,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity( gp_Trsf aTrsf; Message_ProgressScope aPSRoot(theProgress, "Sub-assembly", isManifold ? 1 : 2); Message_ProgressScope aPS (aPSRoot.Next(), "Transfer", nb); + TopTools_IndexedMapOfShape aCompoundedShapes; for (Standard_Integer i = 1; i <= nb && aPS.More(); i ++) { Message_ProgressRange aRange = aPS.Next(); @@ -909,8 +923,13 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity( TopoDS_Shape theResult = TransferBRep::ShapeResult (binder); if (!theResult.IsNull()) { OneResult = theResult; - B.Add(comp, theResult); - nsh ++; + if (!aCompoundedShapes.Contains(theResult)) + { + aCompoundedShapes.Add(theResult); + TopExp::MapShapes(theResult, aCompoundedShapes); + B.Add(comp, theResult); + nsh++; + } } } @@ -1390,6 +1409,8 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity // Start progress scope (no need to check if progress exists -- it is safe) Message_ProgressScope aPS(theProgress, "Transfer stage", isManifold ? 2 : 1); + const Standard_Boolean aReadTessellatedWhenNoBRepOnly = (Interface_Static::IVal("read.step.tessellated") == 2); + Standard_Boolean aHasGeom = Standard_True; try { OCC_CATCH_SIGNALS Message_ProgressRange aRange = aPS.Next(); @@ -1425,6 +1446,27 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity myShapeBuilder.Init(GetCasted(StepShape_FaceBasedSurfaceModel, start), TP); found = Standard_True; } + // TODO: Normally, StepVisual_Tessellated* entities should be processed after + // StepShape_* entities in order to resolve links to BRep topological objects. + // Currently it is not guaranteed and might require changes in the processing order. + else if (start->IsKind(STANDARD_TYPE(StepVisual_TessellatedSolid))) + { + myShapeBuilder.Init(GetCasted(StepVisual_TessellatedSolid, start), TP, + aReadTessellatedWhenNoBRepOnly, aHasGeom, aRange); + found = Standard_True; + } + else if (start->IsKind(STANDARD_TYPE(StepVisual_TessellatedShell))) + { + myShapeBuilder.Init(GetCasted(StepVisual_TessellatedShell, start), TP, + aReadTessellatedWhenNoBRepOnly, aHasGeom, aRange); + found = Standard_True; + } + else if (start->IsKind(STANDARD_TYPE(StepVisual_TessellatedFace))) + { + myShapeBuilder.Init(GetCasted(StepVisual_TessellatedFace, start), TP, + aReadTessellatedWhenNoBRepOnly, aHasGeom); + found = Standard_True; + } } catch(Standard_Failure const&) { TP->AddFail(start,"Exeption is raised. Entity was not translated."); @@ -1438,7 +1480,8 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity if (found && myShapeBuilder.IsDone()) { mappedShape = myShapeBuilder.Value(); // Apply ShapeFix (on manifold shapes only. Non-manifold topology is processed separately: ssv; 13.11.2010) - if (isManifold) { + if (isManifold && aHasGeom) + { Handle(Standard_Transient) info; mappedShape = XSAlgo::AlgoContainer()->ProcessShape( mappedShape, myPrecision, myMaxTol, diff --git a/src/STEPControl/STEPControl_ActorWrite.cxx b/src/STEPControl/STEPControl_ActorWrite.cxx index 54295e1030..bfb0c09069 100644 --- a/src/STEPControl/STEPControl_ActorWrite.cxx +++ b/src/STEPControl/STEPControl_ActorWrite.cxx @@ -19,6 +19,7 @@ #include #include +#include #include #include #include @@ -70,6 +71,9 @@ #include #include #include +#include +#include +#include #include #include #include @@ -80,7 +84,6 @@ #include #include #include -#include #include #include #include @@ -169,6 +172,58 @@ static void DumpWhatIs(const TopoDS_Shape& S) { } #endif +static Standard_Boolean hasGeometry(const TopoDS_Shape& theShape) +{ + TopAbs_ShapeEnum aType = theShape.ShapeType(); + + if (aType == TopAbs_VERTEX) + { + return Standard_True; + } + else if (aType == TopAbs_EDGE) + { + Handle(BRep_TEdge) TE = Handle(BRep_TEdge)::DownCast(theShape.TShape()); + BRep_ListIteratorOfListOfCurveRepresentation itrc(TE->Curves()); + + while (itrc.More()) + { + const Handle(BRep_CurveRepresentation)& CR = itrc.Value(); + Standard_Boolean aHasGeometry = (CR->IsCurve3D() && !CR->Curve3D().IsNull()) + || CR->IsCurveOnSurface() + || CR->IsRegularity() + || (CR->IsPolygon3D() && !CR->Polygon3D().IsNull()) + || CR->IsPolygonOnTriangulation() + || CR->IsPolygonOnSurface(); + if (!aHasGeometry) + return Standard_False; + itrc.Next(); + } + return Standard_True; + } + else if (aType == TopAbs_FACE) + { + Handle(BRep_TFace) TF = Handle(BRep_TFace)::DownCast(theShape.TShape()); + if (!TF->Surface().IsNull()) + { + return Standard_True; + } + } + else + { + TopoDS_Iterator anIt(theShape, Standard_False, Standard_False); + for (; anIt.More(); anIt.Next()) + { + const TopoDS_Shape& aShape = anIt.Value(); + Standard_Boolean aHasGeometry = hasGeometry(aShape); + if (!aHasGeometry) + return Standard_False; + } + return Standard_True; + } + + return Standard_False; +} + //======================================================================= // Function : IsManifoldShape // Purpose : Used to define whether the passed shape has manifold @@ -904,25 +959,30 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape // BRepTools_Modifier DMT(aShape,DM); // if ( DMT.IsDone() ) aShape = DMT.ModifiedShape ( aShape ); //// aShape = TopoDSToStep::DirectFaces(xShape); + Message_ProgressScope aPS1(aPS.Next(), NULL, 2); + + TopoDS_Shape aShape = xShape; Handle(Standard_Transient) info; - Standard_Real maxTol = Interface_Static::RVal("read.maxprecision.val"); - Message_ProgressScope aPS1 (aPS.Next(), NULL, 2); + if (hasGeometry(aShape)) + { + Standard_Real maxTol = Interface_Static::RVal("read.maxprecision.val"); - TopoDS_Shape aShape; - aShape = XSAlgo::AlgoContainer()->ProcessShape(xShape, Tol, maxTol, - "write.step.resource.name", - "write.step.sequence", info, - aPS1.Next()); - if (aPS1.UserBreak()) - return Handle(Transfer_Binder)(); + aShape = XSAlgo::AlgoContainer()->ProcessShape(xShape, Tol, maxTol, + "write.step.resource.name", + "write.step.sequence", info, + aPS1.Next()); + if (aPS1.UserBreak()) + return Handle(Transfer_Binder)(); + } - if (!isManifold) { + if (!isManifold) + { mergeInfoForNM(FP, info); } // create a STEP entity corresponding to shape - Handle(StepGeom_GeometricRepresentationItem) item; + Handle(StepGeom_GeometricRepresentationItem) item, itemTess; switch (trmode) { case STEPControl_ManifoldSolidBrep: @@ -938,28 +998,33 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape if ( nbShells >1 ) { TopoDSToStep_MakeBrepWithVoids MkBRepWithVoids(aSolid,FP, aPS1.Next()); MkBRepWithVoids.Tolerance() = Tol; - if (MkBRepWithVoids.IsDone()) { + if (MkBRepWithVoids.IsDone()) + { item = MkBRepWithVoids.Value(); - } - else nbShells = 1; //smth went wrong; let it will be just Manifold + itemTess = MkBRepWithVoids.TessellatedValue(); + } + else nbShells = 1; //smth went wrong; let it will be just Manifold } if ( nbShells ==1 ) { - - TopoDSToStep_MakeManifoldSolidBrep MkManifoldSolidBrep(aSolid,FP, aPS1.Next()); + TopoDSToStep_MakeManifoldSolidBrep MkManifoldSolidBrep(aSolid,FP, aPS1.Next()); MkManifoldSolidBrep.Tolerance() = Tol; - if (MkManifoldSolidBrep.IsDone()) { + if (MkManifoldSolidBrep.IsDone()) + { item = MkManifoldSolidBrep.Value(); - } - } + itemTess = MkManifoldSolidBrep.TessellatedValue(); + } + } } else if (aShape.ShapeType() == TopAbs_SHELL) { TopoDS_Shell aShell = TopoDS::Shell(aShape); TopoDSToStep_MakeManifoldSolidBrep MkManifoldSolidBrep(aShell,FP, aPS1.Next()); MkManifoldSolidBrep.Tolerance() = Tol; - if (MkManifoldSolidBrep.IsDone()) { + if (MkManifoldSolidBrep.IsDone()) + { item = MkManifoldSolidBrep.Value(); - } - } + itemTess = MkManifoldSolidBrep.TessellatedValue(); + } + } break; } case STEPControl_BrepWithVoids: @@ -968,8 +1033,10 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape TopoDS_Solid aSolid = TopoDS::Solid(aShape); TopoDSToStep_MakeBrepWithVoids MkBRepWithVoids(aSolid,FP, aPS1.Next()); MkBRepWithVoids.Tolerance() = Tol; - if (MkBRepWithVoids.IsDone()) { + if (MkBRepWithVoids.IsDone()) + { item = MkBRepWithVoids.Value(); + itemTess = MkBRepWithVoids.TessellatedValue(); } } break; @@ -991,9 +1058,11 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape TopoDS_Solid aSolid = TopoDS::Solid(aShape); TopoDSToStep_MakeFacetedBrep MkFacetedBrep(aSolid,FP, aPS1.Next()); MkFacetedBrep.Tolerance() = Tol; - if (MkFacetedBrep.IsDone()) { + if (MkFacetedBrep.IsDone()) + { item = MkFacetedBrep.Value(); - } + itemTess = MkFacetedBrep.TessellatedValue(); + } } break; } @@ -1015,9 +1084,11 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape TopoDSToStep_MakeFacetedBrepAndBrepWithVoids MkFacetedBrepAndBrepWithVoids(aSolid,FP, aPS1.Next()); MkFacetedBrepAndBrepWithVoids.Tolerance() = Tol; - if (MkFacetedBrepAndBrepWithVoids.IsDone()) { + if (MkFacetedBrepAndBrepWithVoids.IsDone()) + { item = MkFacetedBrepAndBrepWithVoids.Value(); - } + itemTess = MkFacetedBrepAndBrepWithVoids.TessellatedValue(); + } } break; } @@ -1028,28 +1099,34 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape TopoDSToStep_MakeShellBasedSurfaceModel MkShellBasedSurfaceModel(aSolid, FP, aPS1.Next()); MkShellBasedSurfaceModel.Tolerance() = Tol; - if (MkShellBasedSurfaceModel.IsDone()) { + if (MkShellBasedSurfaceModel.IsDone()) + { item = MkShellBasedSurfaceModel.Value(); - } + itemTess = MkShellBasedSurfaceModel.TessellatedValue(); + } } else if (aShape.ShapeType() == TopAbs_SHELL) { TopoDS_Shell aShell = TopoDS::Shell(aShape); // Non-manifold topology is stored via NMSSR containing series of SBSM (ssv; 13.11.2010) TopoDSToStep_MakeShellBasedSurfaceModel MkShellBasedSurfaceModel(aShell, FP, aPS1.Next()); MkShellBasedSurfaceModel.Tolerance() = Tol; - if (MkShellBasedSurfaceModel.IsDone()) { + if (MkShellBasedSurfaceModel.IsDone()) + { item = MkShellBasedSurfaceModel.Value(); + itemTess = MkShellBasedSurfaceModel.TessellatedValue(); } } else if (aShape.ShapeType() == TopAbs_FACE) { TopoDS_Face aFace = TopoDS::Face(aShape); - TopoDSToStep_MakeShellBasedSurfaceModel + TopoDSToStep_MakeShellBasedSurfaceModel MkShellBasedSurfaceModel(aFace, FP, aPS1.Next()); MkShellBasedSurfaceModel.Tolerance() = Tol; - if (MkShellBasedSurfaceModel.IsDone()) { + if (MkShellBasedSurfaceModel.IsDone()) + { item = MkShellBasedSurfaceModel.Value(); - } - } + itemTess = MkShellBasedSurfaceModel.TessellatedValue(); + } + } break; } case STEPControl_GeometricCurveSet: @@ -1097,24 +1174,48 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape } default: break; } - if ( item.IsNull() ) continue; + if ( item.IsNull() && itemTess.IsNull() ) continue; // add resulting item to the FP - ItemSeq->Append(item); - Handle(TransferBRep_ShapeMapper) submapper; - if ( xShape.IsSame ( mapper->Value() ) ) - submapper = Handle(TransferBRep_ShapeMapper)::DownCast ( start ); - if ( submapper.IsNull() ) submapper = TransferBRep::ShapeMapper (FP,xShape); - Handle(Transfer_Binder) subbind = FP->Find ( submapper ); - if ( subbind.IsNull() ) { - subbind = TransientResult ( item ); - FP->Bind ( submapper, subbind ); + if (!item.IsNull()) + { + ItemSeq->Append(item); + Handle(TransferBRep_ShapeMapper) submapper; + if (xShape.IsSame(mapper->Value())) + submapper = Handle(TransferBRep_ShapeMapper)::DownCast(start); + if (submapper.IsNull()) + submapper = TransferBRep::ShapeMapper(FP, xShape); + Handle(Transfer_Binder) subbind = FP->Find(submapper); + if (subbind.IsNull()) + { + subbind = TransientResult(item); + FP->Bind(submapper, subbind); + } + else + subbind->AddResult(TransientResult(item)); + } + if (!itemTess.IsNull()) + { + ItemSeq->Append(itemTess); + Handle(TransferBRep_ShapeMapper) submapper; + if (xShape.IsSame(mapper->Value())) + submapper = Handle(TransferBRep_ShapeMapper)::DownCast(start); + if (submapper.IsNull()) + submapper = TransferBRep::ShapeMapper(FP, xShape); + Handle(Transfer_Binder) subbind = FP->Find(submapper); + if (subbind.IsNull()) + { + subbind = TransientResult(itemTess); + FP->Bind(submapper, subbind); + } + else + subbind->AddResult(TransientResult(itemTess)); } - else subbind->AddResult ( TransientResult ( item ) ); //:abv 24Jan99 CAX-IF TRJ3: Update FinderProcess map to take into account shape processing // UpdateMap ( xShape, CSMT, DMT, FP ); - XSAlgo::AlgoContainer()->MergeTransferInfo(FP, info); + if (!info.IsNull()) + XSAlgo::AlgoContainer()->MergeTransferInfo(FP, info); } // - Make Shape Representation @@ -1210,6 +1311,8 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape ShapeRepr1 = new StepShape_GeometricallyBoundedWireframeShapeRepresentation; else if (items->Value(j)->IsKind(STANDARD_TYPE(StepShape_FacetedBrep))) ShapeRepr1 = new StepShape_FacetedBrepShapeRepresentation; + else if (items->Value(j)->IsKind(STANDARD_TYPE(StepVisual_TessellatedItem))) + ShapeRepr1 = new StepVisual_TessellatedShapeRepresentation; else ShapeRepr1 = new StepShape_ShapeRepresentation; Handle(StepRepr_HArray1OfRepresentationItem) repr1 = new StepRepr_HArray1OfRepresentationItem(1,2); @@ -1233,6 +1336,33 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape } } else { + Standard_Integer nC = 0; + for (Standard_Integer i = 1; i <= items->Length(); i++) + { + if (!items->Value(i)->IsKind(STANDARD_TYPE(StepVisual_TessellatedItem))) + continue; + ++nC; + } + if (nC > 0) + { + Handle(StepRepr_HArray1OfRepresentationItem) itemsTess = new StepRepr_HArray1OfRepresentationItem(1, nC); + Standard_Integer i = 1; + for (Standard_Integer j = 1; j <= items->Length(); j++) + { + if (!items->Value(j)->IsKind(STANDARD_TYPE(StepVisual_TessellatedItem))) + continue; + itemsTess->SetValue(i++, items->Value(j)); + } + + Handle(StepShape_ShapeRepresentation) shapeTessRepr = new StepVisual_TessellatedShapeRepresentation; + shapeTessRepr->SetItems(itemsTess); + STEPConstruct_UnitContext mk1; + mk1.Init(Tol); + shapeTessRepr->SetContextOfItems(mk1.Value()); + shapeTessRepr->SetName(new TCollection_HAsciiString("")); + + aSeqBindRelation.Append(TransientResult(shapeTessRepr)); + } if (!useExistingNMSSR) shapeRep->SetItems(items); else { diff --git a/src/STEPControl/STEPControl_Controller.cxx b/src/STEPControl/STEPControl_Controller.cxx index c8df0600a1..1dd44f6aef 100644 --- a/src/STEPControl/STEPControl_Controller.cxx +++ b/src/STEPControl/STEPControl_Controller.cxx @@ -247,6 +247,22 @@ STEPControl_Controller::STEPControl_Controller () Interface_Static::Init("step", "read.step.codepage", '&', "eval iso8859-9"); // Resource_FormatType_iso8859_9 Interface_Static::SetCVal("read.step.codepage", "UTF8"); + // Tessellated geometry reading: Off by default + Interface_Static::Init("step", "read.step.tessellated", 'e', ""); + Interface_Static::Init("step", "read.step.tessellated", '&', "enum 0"); + Interface_Static::Init("step", "read.step.tessellated", '&', "eval Off"); // 0 + Interface_Static::Init("step", "read.step.tessellated", '&', "eval On"); // 1 + Interface_Static::Init("step", "read.step.tessellated", '&', "eval OnNoBRep"); // 2 + Interface_Static::SetCVal("read.step.tessellated", "On"); + + // Tessellated geometry writing: Off by default + Interface_Static::Init("step", "write.step.tessellated", 'e', ""); + Interface_Static::Init("step", "write.step.tessellated", '&', "enum 0"); + Interface_Static::Init("step", "write.step.tessellated", '&', "eval Off"); // 0 + Interface_Static::Init("step", "write.step.tessellated", '&', "eval On"); // 1 + Interface_Static::Init("step", "write.step.tessellated", '&', "eval OnNoBRep"); // 2 + Interface_Static::SetCVal("write.step.tessellated", "OnNoBRep"); + Standard_STATIC_ASSERT((int)Resource_FormatType_iso8859_9 - (int)Resource_FormatType_CP1250 == 17); // "Error: Invalid Codepage Enumeration" init = Standard_True; diff --git a/src/STEPControl/STEPControl_Reader.cxx b/src/STEPControl/STEPControl_Reader.cxx index 15ea180ba0..ee2c537b09 100644 --- a/src/STEPControl/STEPControl_Reader.cxx +++ b/src/STEPControl/STEPControl_Reader.cxx @@ -52,6 +52,7 @@ #include #include #include +#include #include #include #include @@ -514,21 +515,32 @@ Standard_Boolean STEPControl_Reader::findUnits( Handle(StepBasic_HArray1OfNamedUnit) anUnits = aContext->Units(); Standard_Integer nbU = aContext->NbUnits(); Standard_Integer nbFind = 0; - for (Standard_Integer i = 1; i <= nbU; i++) { + for (Standard_Integer i = 1; i <= nbU; i++) + { Handle(StepBasic_NamedUnit) aNamedUnit = aContext->UnitsValue(i); Handle(StepBasic_ConversionBasedUnit) aConvUnit = Handle(StepBasic_ConversionBasedUnit)::DownCast(aNamedUnit); Standard_Integer anInd = 0; TCollection_AsciiString aName; Standard_Real anUnitFact = 0; - if( !aConvUnit.IsNull() ) + if(!aConvUnit.IsNull()) { - Handle(StepBasic_MeasureWithUnit) aMeasWithUnit = - aConvUnit->ConversionFactor(); - + Handle(StepBasic_MeasureWithUnit) aMeasWithUnit; + Handle(Standard_Transient) aConvFactor = aConvUnit->ConversionFactor(); + if (aConvFactor->IsKind(STANDARD_TYPE(StepBasic_MeasureWithUnit))) + { + aMeasWithUnit = Handle(StepBasic_MeasureWithUnit)::DownCast(aConvFactor); + } + else if (aConvFactor->IsKind(STANDARD_TYPE(StepRepr_ReprItemAndMeasureWithUnit))) + { + Handle(StepRepr_ReprItemAndMeasureWithUnit) aReprMeasureItem = + Handle(StepRepr_ReprItemAndMeasureWithUnit)::DownCast(aConvFactor); + aMeasWithUnit = aReprMeasureItem->GetMeasureWithUnit(); + } + if(aMeasWithUnit.IsNull()) continue; - + if( aMeasWithUnit->IsKind(STANDARD_TYPE(StepBasic_LengthMeasureWithUnit)) ) anInd = 1; else if( aMeasWithUnit->IsKind(STANDARD_TYPE(StepBasic_PlaneAngleMeasureWithUnit)) ) diff --git a/src/StepAP214/StepAP214_Protocol.cxx b/src/StepAP214/StepAP214_Protocol.cxx index 89f3a08c06..f0014be77e 100644 --- a/src/StepAP214/StepAP214_Protocol.cxx +++ b/src/StepAP214/StepAP214_Protocol.cxx @@ -757,6 +757,22 @@ static Standard_CString schemaAP242DIS = "AP242_MANAGED_MODEL_BASED_3D_ENGINEERI #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + static int THE_StepAP214_Protocol_init = 0; static Interface_DataMapOfTransientInteger types(803); @@ -1472,6 +1488,21 @@ StepAP214_Protocol::StepAP214_Protocol () types.Bind (STANDARD_TYPE(StepVisual_SurfaceStyleRenderingWithProperties), 723); types.Bind(STANDARD_TYPE(StepVisual_RepositionedTessellatedGeometricSet), 802); types.Bind(STANDARD_TYPE(StepVisual_RepositionedTessellatedItem), 803); + types.Bind(STANDARD_TYPE(StepVisual_TessellatedConnectingEdge), 804); + types.Bind(STANDARD_TYPE(StepVisual_TessellatedEdge), 805); + types.Bind(STANDARD_TYPE(StepVisual_TessellatedPointSet), 806); + types.Bind(STANDARD_TYPE(StepVisual_TessellatedShapeRepresentation), 807); + types.Bind(STANDARD_TYPE(StepVisual_TessellatedShapeRepresentationWithAccuracyParameters), 808); + types.Bind(STANDARD_TYPE(StepVisual_TessellatedShell), 809); + types.Bind(STANDARD_TYPE(StepVisual_TessellatedSolid), 810); + types.Bind(STANDARD_TYPE(StepVisual_TessellatedStructuredItem), 811); + types.Bind(STANDARD_TYPE(StepVisual_TessellatedVertex), 812); + types.Bind(STANDARD_TYPE(StepVisual_TessellatedWire), 813); + types.Bind(STANDARD_TYPE(StepVisual_TriangulatedFace), 814); + types.Bind(STANDARD_TYPE(StepVisual_ComplexTriangulatedFace), 815); + types.Bind(STANDARD_TYPE(StepVisual_ComplexTriangulatedSurfaceSet), 816); + types.Bind(STANDARD_TYPE(StepVisual_CubicBezierTessellatedEdge), 817); + types.Bind(STANDARD_TYPE(StepVisual_CubicBezierTriangulatedFace), 818); } diff --git a/src/StepBasic/StepBasic_ConversionBasedUnit.cxx b/src/StepBasic/StepBasic_ConversionBasedUnit.cxx index c04c73da17..c2580313d0 100644 --- a/src/StepBasic/StepBasic_ConversionBasedUnit.cxx +++ b/src/StepBasic/StepBasic_ConversionBasedUnit.cxx @@ -15,42 +15,40 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepBasic_ConversionBasedUnit,StepBasic_NamedUnit) StepBasic_ConversionBasedUnit::StepBasic_ConversionBasedUnit () {} -void StepBasic_ConversionBasedUnit::Init( - const Handle(StepBasic_DimensionalExponents)& aDimensions, - const Handle(TCollection_HAsciiString)& aName, - const Handle(StepBasic_MeasureWithUnit)& aConversionFactor) +void StepBasic_ConversionBasedUnit::Init(const Handle(StepBasic_DimensionalExponents)& theDimensions, + const Handle(TCollection_HAsciiString)& theName, + const Handle(Standard_Transient)& theConversionFactor) { - // --- classe own fields --- - name = aName; - conversionFactor = aConversionFactor; - // --- classe inherited fields --- - StepBasic_NamedUnit::Init(aDimensions); + // --- classe own fields --- + myName = theName; + myConversionFactor = theConversionFactor; + // --- classe inherited fields --- + StepBasic_NamedUnit::Init(theDimensions); } -void StepBasic_ConversionBasedUnit::SetName(const Handle(TCollection_HAsciiString)& aName) +void StepBasic_ConversionBasedUnit::SetName(const Handle(TCollection_HAsciiString)& theName) { - name = aName; + myName = theName; } Handle(TCollection_HAsciiString) StepBasic_ConversionBasedUnit::Name() const { - return name; + return myName; } -void StepBasic_ConversionBasedUnit::SetConversionFactor(const Handle(StepBasic_MeasureWithUnit)& aConversionFactor) +void StepBasic_ConversionBasedUnit::SetConversionFactor(const Handle(Standard_Transient)& theConversionFactor) { - conversionFactor = aConversionFactor; + myConversionFactor = theConversionFactor; } -Handle(StepBasic_MeasureWithUnit) StepBasic_ConversionBasedUnit::ConversionFactor() const +Handle(Standard_Transient) StepBasic_ConversionBasedUnit::ConversionFactor() const { - return conversionFactor; + return myConversionFactor; } diff --git a/src/StepBasic/StepBasic_ConversionBasedUnit.hxx b/src/StepBasic/StepBasic_ConversionBasedUnit.hxx index 64dec81b81..a2ecc1832b 100644 --- a/src/StepBasic/StepBasic_ConversionBasedUnit.hxx +++ b/src/StepBasic/StepBasic_ConversionBasedUnit.hxx @@ -22,7 +22,6 @@ #include class TCollection_HAsciiString; -class StepBasic_MeasureWithUnit; class StepBasic_DimensionalExponents; @@ -39,15 +38,17 @@ public: //! Returns a ConversionBasedUnit Standard_EXPORT StepBasic_ConversionBasedUnit(); - Standard_EXPORT void Init (const Handle(StepBasic_DimensionalExponents)& aDimensions, const Handle(TCollection_HAsciiString)& aName, const Handle(StepBasic_MeasureWithUnit)& aConversionFactor); + Standard_EXPORT void Init (const Handle(StepBasic_DimensionalExponents)& theDimensions, + const Handle(TCollection_HAsciiString)& theName, + const Handle(Standard_Transient)& theConversionFactor); - Standard_EXPORT void SetName (const Handle(TCollection_HAsciiString)& aName); + Standard_EXPORT void SetName (const Handle(TCollection_HAsciiString)& theName); Standard_EXPORT Handle(TCollection_HAsciiString) Name() const; - Standard_EXPORT void SetConversionFactor (const Handle(StepBasic_MeasureWithUnit)& aConversionFactor); + Standard_EXPORT void SetConversionFactor (const Handle(Standard_Transient)& theConversionFactor); - Standard_EXPORT Handle(StepBasic_MeasureWithUnit) ConversionFactor() const; + Standard_EXPORT Handle(Standard_Transient) ConversionFactor() const; @@ -62,8 +63,8 @@ protected: private: - Handle(TCollection_HAsciiString) name; - Handle(StepBasic_MeasureWithUnit) conversionFactor; + Handle(TCollection_HAsciiString) myName; + Handle(Standard_Transient) myConversionFactor; }; diff --git a/src/StepBasic/StepBasic_ConversionBasedUnitAndLengthUnit.cxx b/src/StepBasic/StepBasic_ConversionBasedUnitAndLengthUnit.cxx index 2c222e9342..57d252aabc 100644 --- a/src/StepBasic/StepBasic_ConversionBasedUnitAndLengthUnit.cxx +++ b/src/StepBasic/StepBasic_ConversionBasedUnitAndLengthUnit.cxx @@ -17,33 +17,32 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepBasic_ConversionBasedUnitAndLengthUnit,StepBasic_ConversionBasedUnit) StepBasic_ConversionBasedUnitAndLengthUnit::StepBasic_ConversionBasedUnitAndLengthUnit () {} -void StepBasic_ConversionBasedUnitAndLengthUnit::Init(const Handle(StepBasic_DimensionalExponents)& aDimensions, - const Handle(TCollection_HAsciiString)& aName, - const Handle(StepBasic_MeasureWithUnit)& aConversionFactor) +void StepBasic_ConversionBasedUnitAndLengthUnit::Init(const Handle(StepBasic_DimensionalExponents)& theDimensions, + const Handle(TCollection_HAsciiString)& theName, + const Handle(Standard_Transient)& theConversionFactor) { // --- ANDOR componant fields --- - StepBasic_ConversionBasedUnit::Init(aDimensions, aName, aConversionFactor); + StepBasic_ConversionBasedUnit::Init(theDimensions, theName, theConversionFactor); // --- ANDOR componant fields --- - lengthUnit = new StepBasic_LengthUnit(); - lengthUnit->Init(aDimensions); + myLengthUnit = new StepBasic_LengthUnit(); + myLengthUnit->Init(theDimensions); } -void StepBasic_ConversionBasedUnitAndLengthUnit::SetLengthUnit(const Handle(StepBasic_LengthUnit)& aLengthUnit) +void StepBasic_ConversionBasedUnitAndLengthUnit::SetLengthUnit(const Handle(StepBasic_LengthUnit)& theLengthUnit) { - lengthUnit = aLengthUnit; + myLengthUnit = theLengthUnit; } Handle(StepBasic_LengthUnit) StepBasic_ConversionBasedUnitAndLengthUnit::LengthUnit() const { - return lengthUnit; + return myLengthUnit; } diff --git a/src/StepBasic/StepBasic_ConversionBasedUnitAndLengthUnit.hxx b/src/StepBasic/StepBasic_ConversionBasedUnitAndLengthUnit.hxx index 12339a7267..bbcc2797a9 100644 --- a/src/StepBasic/StepBasic_ConversionBasedUnitAndLengthUnit.hxx +++ b/src/StepBasic/StepBasic_ConversionBasedUnitAndLengthUnit.hxx @@ -24,7 +24,6 @@ class StepBasic_LengthUnit; class StepBasic_DimensionalExponents; class TCollection_HAsciiString; -class StepBasic_MeasureWithUnit; class StepBasic_ConversionBasedUnitAndLengthUnit; @@ -40,9 +39,11 @@ public: //! Returns a ConversionBasedUnitAndLengthUnit Standard_EXPORT StepBasic_ConversionBasedUnitAndLengthUnit(); - Standard_EXPORT void Init (const Handle(StepBasic_DimensionalExponents)& aDimensions, const Handle(TCollection_HAsciiString)& aName, const Handle(StepBasic_MeasureWithUnit)& aConversionFactor); + Standard_EXPORT void Init (const Handle(StepBasic_DimensionalExponents)& theDimensions, + const Handle(TCollection_HAsciiString)& theName, + const Handle(Standard_Transient)& theConversionFactor); - Standard_EXPORT void SetLengthUnit (const Handle(StepBasic_LengthUnit)& aLengthUnit); + Standard_EXPORT void SetLengthUnit (const Handle(StepBasic_LengthUnit)& theLengthUnit); Standard_EXPORT Handle(StepBasic_LengthUnit) LengthUnit() const; @@ -59,7 +60,7 @@ protected: private: - Handle(StepBasic_LengthUnit) lengthUnit; + Handle(StepBasic_LengthUnit) myLengthUnit; }; diff --git a/src/StepBasic/StepBasic_ConversionBasedUnitAndMassUnit.cxx b/src/StepBasic/StepBasic_ConversionBasedUnitAndMassUnit.cxx index ca94c4bb2a..046c181e0f 100644 --- a/src/StepBasic/StepBasic_ConversionBasedUnitAndMassUnit.cxx +++ b/src/StepBasic/StepBasic_ConversionBasedUnitAndMassUnit.cxx @@ -17,7 +17,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepBasic_ConversionBasedUnitAndMassUnit,StepBasic_ConversionBasedUnit) @@ -36,17 +35,16 @@ StepBasic_ConversionBasedUnitAndMassUnit::StepBasic_ConversionBasedUnitAndMassUn //purpose : //======================================================================= -void StepBasic_ConversionBasedUnitAndMassUnit::Init - (const Handle(StepBasic_DimensionalExponents)& aDimensions, - const Handle(TCollection_HAsciiString)& aName, - const Handle(StepBasic_MeasureWithUnit)& aConversionFactor) +void StepBasic_ConversionBasedUnitAndMassUnit::Init(const Handle(StepBasic_DimensionalExponents)& theDimensions, + const Handle(TCollection_HAsciiString)& theName, + const Handle(Standard_Transient)& theConversionFactor) { // --- ANDOR componant fields --- - StepBasic_ConversionBasedUnit::Init(aDimensions, aName, aConversionFactor); + StepBasic_ConversionBasedUnit::Init(theDimensions, theName, theConversionFactor); // --- ANDOR componant fields --- - massUnit = new StepBasic_MassUnit(); - massUnit->Init(aDimensions); + myMassUnit = new StepBasic_MassUnit(); + myMassUnit->Init(theDimensions); } @@ -55,10 +53,9 @@ void StepBasic_ConversionBasedUnitAndMassUnit::Init //purpose : //======================================================================= -void StepBasic_ConversionBasedUnitAndMassUnit::SetMassUnit - (const Handle(StepBasic_MassUnit)& aMassUnit) +void StepBasic_ConversionBasedUnitAndMassUnit::SetMassUnit(const Handle(StepBasic_MassUnit)& theMassUnit) { - massUnit = aMassUnit; + myMassUnit = theMassUnit; } @@ -69,6 +66,6 @@ void StepBasic_ConversionBasedUnitAndMassUnit::SetMassUnit Handle(StepBasic_MassUnit) StepBasic_ConversionBasedUnitAndMassUnit::MassUnit() const { - return massUnit; + return myMassUnit; } diff --git a/src/StepBasic/StepBasic_ConversionBasedUnitAndMassUnit.hxx b/src/StepBasic/StepBasic_ConversionBasedUnitAndMassUnit.hxx index 9014ea8e5f..3d4a7d305a 100644 --- a/src/StepBasic/StepBasic_ConversionBasedUnitAndMassUnit.hxx +++ b/src/StepBasic/StepBasic_ConversionBasedUnitAndMassUnit.hxx @@ -23,7 +23,6 @@ class StepBasic_MassUnit; class StepBasic_DimensionalExponents; class TCollection_HAsciiString; -class StepBasic_MeasureWithUnit; class StepBasic_ConversionBasedUnitAndMassUnit; @@ -39,9 +38,11 @@ public: //! Returns a ConversionBasedUnitAndLengthUnit Standard_EXPORT StepBasic_ConversionBasedUnitAndMassUnit(); - Standard_EXPORT void Init (const Handle(StepBasic_DimensionalExponents)& aDimensions, const Handle(TCollection_HAsciiString)& aName, const Handle(StepBasic_MeasureWithUnit)& aConversionFactor); + Standard_EXPORT void Init (const Handle(StepBasic_DimensionalExponents)& theDimensions, + const Handle(TCollection_HAsciiString)& theName, + const Handle(Standard_Transient)& theConversionFactor); - Standard_EXPORT void SetMassUnit (const Handle(StepBasic_MassUnit)& aMassUnit); + Standard_EXPORT void SetMassUnit (const Handle(StepBasic_MassUnit)& theMassUnit); Standard_EXPORT Handle(StepBasic_MassUnit) MassUnit() const; @@ -58,7 +59,7 @@ protected: private: - Handle(StepBasic_MassUnit) massUnit; + Handle(StepBasic_MassUnit) myMassUnit; }; diff --git a/src/StepBasic/StepBasic_ConversionBasedUnitAndPlaneAngleUnit.cxx b/src/StepBasic/StepBasic_ConversionBasedUnitAndPlaneAngleUnit.cxx index b72c5b6549..481bfbbd11 100644 --- a/src/StepBasic/StepBasic_ConversionBasedUnitAndPlaneAngleUnit.cxx +++ b/src/StepBasic/StepBasic_ConversionBasedUnitAndPlaneAngleUnit.cxx @@ -16,7 +16,6 @@ #include #include #include -#include #include #include @@ -26,26 +25,26 @@ StepBasic_ConversionBasedUnitAndPlaneAngleUnit::StepBasic_ConversionBasedUnitAnd { } -void StepBasic_ConversionBasedUnitAndPlaneAngleUnit::Init(const Handle(StepBasic_DimensionalExponents)& aDimensions, - const Handle(TCollection_HAsciiString)& aName, - const Handle(StepBasic_MeasureWithUnit)& aConversionFactor) +void StepBasic_ConversionBasedUnitAndPlaneAngleUnit::Init(const Handle(StepBasic_DimensionalExponents)& theDimensions, + const Handle(TCollection_HAsciiString)& theName, + const Handle(Standard_Transient)& theConversionFactor) { // --- ANDOR componant fields --- - StepBasic_ConversionBasedUnit::Init(aDimensions, aName, aConversionFactor); + StepBasic_ConversionBasedUnit::Init(theDimensions, theName, theConversionFactor); // --- ANDOR componant fields --- - planeAngleUnit = new StepBasic_PlaneAngleUnit(); - planeAngleUnit->Init(aDimensions); + myPlaneAngleUnit = new StepBasic_PlaneAngleUnit(); + myPlaneAngleUnit->Init(theDimensions); } -void StepBasic_ConversionBasedUnitAndPlaneAngleUnit::SetPlaneAngleUnit(const Handle(StepBasic_PlaneAngleUnit)& aPlaneAngleUnit) +void StepBasic_ConversionBasedUnitAndPlaneAngleUnit::SetPlaneAngleUnit(const Handle(StepBasic_PlaneAngleUnit)& thePlaneAngleUnit) { - planeAngleUnit = aPlaneAngleUnit; + myPlaneAngleUnit = thePlaneAngleUnit; } Handle(StepBasic_PlaneAngleUnit) StepBasic_ConversionBasedUnitAndPlaneAngleUnit::PlaneAngleUnit() const { - return planeAngleUnit; + return myPlaneAngleUnit; } diff --git a/src/StepBasic/StepBasic_ConversionBasedUnitAndPlaneAngleUnit.hxx b/src/StepBasic/StepBasic_ConversionBasedUnitAndPlaneAngleUnit.hxx index 8abbf10ccc..9ad2ee2303 100644 --- a/src/StepBasic/StepBasic_ConversionBasedUnitAndPlaneAngleUnit.hxx +++ b/src/StepBasic/StepBasic_ConversionBasedUnitAndPlaneAngleUnit.hxx @@ -24,7 +24,6 @@ class StepBasic_PlaneAngleUnit; class StepBasic_DimensionalExponents; class TCollection_HAsciiString; -class StepBasic_MeasureWithUnit; class StepBasic_ConversionBasedUnitAndPlaneAngleUnit; @@ -40,9 +39,11 @@ public: //! Returns a ConversionBasedUnitAndPlaneAngleUnit Standard_EXPORT StepBasic_ConversionBasedUnitAndPlaneAngleUnit(); - Standard_EXPORT void Init (const Handle(StepBasic_DimensionalExponents)& aDimensions, const Handle(TCollection_HAsciiString)& aName, const Handle(StepBasic_MeasureWithUnit)& aConversionFactor); + Standard_EXPORT void Init (const Handle(StepBasic_DimensionalExponents)& theDimensions, + const Handle(TCollection_HAsciiString)& theName, + const Handle(Standard_Transient)& theConversionFactor); - Standard_EXPORT void SetPlaneAngleUnit (const Handle(StepBasic_PlaneAngleUnit)& aPlaneAngleUnit); + Standard_EXPORT void SetPlaneAngleUnit (const Handle(StepBasic_PlaneAngleUnit)& thePlaneAngleUnit); Standard_EXPORT Handle(StepBasic_PlaneAngleUnit) PlaneAngleUnit() const; @@ -59,7 +60,7 @@ protected: private: - Handle(StepBasic_PlaneAngleUnit) planeAngleUnit; + Handle(StepBasic_PlaneAngleUnit) myPlaneAngleUnit; }; diff --git a/src/StepBasic/StepBasic_ConversionBasedUnitAndRatioUnit.cxx b/src/StepBasic/StepBasic_ConversionBasedUnitAndRatioUnit.cxx index 12c5bc91b1..825a7076ca 100644 --- a/src/StepBasic/StepBasic_ConversionBasedUnitAndRatioUnit.cxx +++ b/src/StepBasic/StepBasic_ConversionBasedUnitAndRatioUnit.cxx @@ -16,7 +16,6 @@ #include #include #include -#include #include #include @@ -26,25 +25,25 @@ StepBasic_ConversionBasedUnitAndRatioUnit::StepBasic_ConversionBasedUnitAndRatio { } -void StepBasic_ConversionBasedUnitAndRatioUnit::Init(const Handle(StepBasic_DimensionalExponents)& aDimensions, - const Handle(TCollection_HAsciiString)& aName, - const Handle(StepBasic_MeasureWithUnit)& aConversionFactor) +void StepBasic_ConversionBasedUnitAndRatioUnit::Init(const Handle(StepBasic_DimensionalExponents)& theDimensions, + const Handle(TCollection_HAsciiString)& theName, + const Handle(Standard_Transient)& theConversionFactor) { // --- ANDOR componant fields --- - StepBasic_ConversionBasedUnit::Init(aDimensions, aName, aConversionFactor); + StepBasic_ConversionBasedUnit::Init(theDimensions, theName, theConversionFactor); // --- ANDOR componant fields --- - ratioUnit = new StepBasic_RatioUnit(); - ratioUnit->Init(aDimensions); + myRatioUnit = new StepBasic_RatioUnit(); + myRatioUnit->Init(theDimensions); } -void StepBasic_ConversionBasedUnitAndRatioUnit::SetRatioUnit(const Handle(StepBasic_RatioUnit)& aRatioUnit) +void StepBasic_ConversionBasedUnitAndRatioUnit::SetRatioUnit(const Handle(StepBasic_RatioUnit)& theRatioUnit) { - ratioUnit = aRatioUnit; + myRatioUnit = theRatioUnit; } Handle(StepBasic_RatioUnit) StepBasic_ConversionBasedUnitAndRatioUnit::RatioUnit() const { - return ratioUnit; + return myRatioUnit; } diff --git a/src/StepBasic/StepBasic_ConversionBasedUnitAndRatioUnit.hxx b/src/StepBasic/StepBasic_ConversionBasedUnitAndRatioUnit.hxx index 2adb7fbb86..3312cc81a2 100644 --- a/src/StepBasic/StepBasic_ConversionBasedUnitAndRatioUnit.hxx +++ b/src/StepBasic/StepBasic_ConversionBasedUnitAndRatioUnit.hxx @@ -24,7 +24,6 @@ class StepBasic_RatioUnit; class StepBasic_DimensionalExponents; class TCollection_HAsciiString; -class StepBasic_MeasureWithUnit; class StepBasic_ConversionBasedUnitAndRatioUnit; @@ -40,9 +39,11 @@ public: //! Returns a ConversionBasedUnitAndRatioUnit Standard_EXPORT StepBasic_ConversionBasedUnitAndRatioUnit(); - Standard_EXPORT void Init (const Handle(StepBasic_DimensionalExponents)& aDimensions, const Handle(TCollection_HAsciiString)& aName, const Handle(StepBasic_MeasureWithUnit)& aConversionFactor); + Standard_EXPORT void Init (const Handle(StepBasic_DimensionalExponents)& theDimensions, + const Handle(TCollection_HAsciiString)& theName, + const Handle(Standard_Transient)& theConversionFactor); - Standard_EXPORT void SetRatioUnit (const Handle(StepBasic_RatioUnit)& aRatioUnit); + Standard_EXPORT void SetRatioUnit (const Handle(StepBasic_RatioUnit)& theRatioUnit); Standard_EXPORT Handle(StepBasic_RatioUnit) RatioUnit() const; @@ -59,7 +60,7 @@ protected: private: - Handle(StepBasic_RatioUnit) ratioUnit; + Handle(StepBasic_RatioUnit) myRatioUnit; }; diff --git a/src/StepBasic/StepBasic_ConversionBasedUnitAndSolidAngleUnit.cxx b/src/StepBasic/StepBasic_ConversionBasedUnitAndSolidAngleUnit.cxx index fab575aa75..c4bcc8a26c 100644 --- a/src/StepBasic/StepBasic_ConversionBasedUnitAndSolidAngleUnit.cxx +++ b/src/StepBasic/StepBasic_ConversionBasedUnitAndSolidAngleUnit.cxx @@ -16,7 +16,6 @@ #include #include #include -#include #include #include @@ -26,26 +25,26 @@ StepBasic_ConversionBasedUnitAndSolidAngleUnit::StepBasic_ConversionBasedUnitAnd { } -void StepBasic_ConversionBasedUnitAndSolidAngleUnit::Init(const Handle(StepBasic_DimensionalExponents)& aDimensions, - const Handle(TCollection_HAsciiString)& aName, - const Handle(StepBasic_MeasureWithUnit)& aConversionFactor) +void StepBasic_ConversionBasedUnitAndSolidAngleUnit::Init(const Handle(StepBasic_DimensionalExponents)& theDimensions, + const Handle(TCollection_HAsciiString)& theName, + const Handle(Standard_Transient)& theConversionFactor) { // --- ANDOR componant fields --- - StepBasic_ConversionBasedUnit::Init(aDimensions, aName, aConversionFactor); + StepBasic_ConversionBasedUnit::Init(theDimensions, theName, theConversionFactor); // --- ANDOR componant fields --- - solidAngleUnit = new StepBasic_SolidAngleUnit(); - solidAngleUnit->Init(aDimensions); + mySolidAngleUnit = new StepBasic_SolidAngleUnit(); + mySolidAngleUnit->Init(theDimensions); } -void StepBasic_ConversionBasedUnitAndSolidAngleUnit::SetSolidAngleUnit(const Handle(StepBasic_SolidAngleUnit)& aSolidAngleUnit) +void StepBasic_ConversionBasedUnitAndSolidAngleUnit::SetSolidAngleUnit(const Handle(StepBasic_SolidAngleUnit)& theSolidAngleUnit) { - solidAngleUnit = aSolidAngleUnit; + mySolidAngleUnit = theSolidAngleUnit; } Handle(StepBasic_SolidAngleUnit) StepBasic_ConversionBasedUnitAndSolidAngleUnit::SolidAngleUnit() const { - return solidAngleUnit; + return mySolidAngleUnit; } diff --git a/src/StepBasic/StepBasic_ConversionBasedUnitAndSolidAngleUnit.hxx b/src/StepBasic/StepBasic_ConversionBasedUnitAndSolidAngleUnit.hxx index 1115e305b9..49b4ddcb6e 100644 --- a/src/StepBasic/StepBasic_ConversionBasedUnitAndSolidAngleUnit.hxx +++ b/src/StepBasic/StepBasic_ConversionBasedUnitAndSolidAngleUnit.hxx @@ -24,7 +24,6 @@ class StepBasic_SolidAngleUnit; class StepBasic_DimensionalExponents; class TCollection_HAsciiString; -class StepBasic_MeasureWithUnit; class StepBasic_ConversionBasedUnitAndSolidAngleUnit; @@ -40,9 +39,11 @@ public: //! Returns a ConversionBasedUnitAndSolidAngleUnit Standard_EXPORT StepBasic_ConversionBasedUnitAndSolidAngleUnit(); - Standard_EXPORT void Init (const Handle(StepBasic_DimensionalExponents)& aDimensions, const Handle(TCollection_HAsciiString)& aName, const Handle(StepBasic_MeasureWithUnit)& aConversionFactor); + Standard_EXPORT void Init (const Handle(StepBasic_DimensionalExponents)& theDimensions, + const Handle(TCollection_HAsciiString)& theName, + const Handle(Standard_Transient)& theConversionFactor); - Standard_EXPORT void SetSolidAngleUnit (const Handle(StepBasic_SolidAngleUnit)& aSolidAngleUnit); + Standard_EXPORT void SetSolidAngleUnit (const Handle(StepBasic_SolidAngleUnit)& theSolidAngleUnit); Standard_EXPORT Handle(StepBasic_SolidAngleUnit) SolidAngleUnit() const; @@ -59,7 +60,7 @@ protected: private: - Handle(StepBasic_SolidAngleUnit) solidAngleUnit; + Handle(StepBasic_SolidAngleUnit) mySolidAngleUnit; }; diff --git a/src/StepBasic/StepBasic_ConversionBasedUnitAndTimeUnit.cxx b/src/StepBasic/StepBasic_ConversionBasedUnitAndTimeUnit.cxx index b3129200ed..f31bb89635 100644 --- a/src/StepBasic/StepBasic_ConversionBasedUnitAndTimeUnit.cxx +++ b/src/StepBasic/StepBasic_ConversionBasedUnitAndTimeUnit.cxx @@ -16,7 +16,6 @@ #include #include #include -#include #include #include @@ -26,26 +25,26 @@ StepBasic_ConversionBasedUnitAndTimeUnit::StepBasic_ConversionBasedUnitAndTimeUn { } -void StepBasic_ConversionBasedUnitAndTimeUnit::Init(const Handle(StepBasic_DimensionalExponents)& aDimensions, - const Handle(TCollection_HAsciiString)& aName, - const Handle(StepBasic_MeasureWithUnit)& aConversionFactor) +void StepBasic_ConversionBasedUnitAndTimeUnit::Init(const Handle(StepBasic_DimensionalExponents)& theDimensions, + const Handle(TCollection_HAsciiString)& theName, + const Handle(Standard_Transient)& theConversionFactor) { // --- ANDOR componant fields --- - StepBasic_ConversionBasedUnit::Init(aDimensions, aName, aConversionFactor); + StepBasic_ConversionBasedUnit::Init(theDimensions, theName, theConversionFactor); // --- ANDOR componant fields --- - timeUnit = new StepBasic_TimeUnit(); - timeUnit->Init(aDimensions); + myTimeUnit = new StepBasic_TimeUnit(); + myTimeUnit->Init(theDimensions); } -void StepBasic_ConversionBasedUnitAndTimeUnit::SetTimeUnit(const Handle(StepBasic_TimeUnit)& aTimeUnit) +void StepBasic_ConversionBasedUnitAndTimeUnit::SetTimeUnit(const Handle(StepBasic_TimeUnit)& theTimeUnit) { - timeUnit = aTimeUnit; + myTimeUnit = theTimeUnit; } Handle(StepBasic_TimeUnit) StepBasic_ConversionBasedUnitAndTimeUnit::TimeUnit() const { - return timeUnit; + return myTimeUnit; } diff --git a/src/StepBasic/StepBasic_ConversionBasedUnitAndTimeUnit.hxx b/src/StepBasic/StepBasic_ConversionBasedUnitAndTimeUnit.hxx index aee23c3160..db1377fa03 100644 --- a/src/StepBasic/StepBasic_ConversionBasedUnitAndTimeUnit.hxx +++ b/src/StepBasic/StepBasic_ConversionBasedUnitAndTimeUnit.hxx @@ -24,7 +24,6 @@ class StepBasic_TimeUnit; class StepBasic_DimensionalExponents; class TCollection_HAsciiString; -class StepBasic_MeasureWithUnit; class StepBasic_ConversionBasedUnitAndTimeUnit; @@ -40,9 +39,11 @@ public: //! Returns a ConversionBasedUnitAndTimeUnit Standard_EXPORT StepBasic_ConversionBasedUnitAndTimeUnit(); - Standard_EXPORT void Init (const Handle(StepBasic_DimensionalExponents)& aDimensions, const Handle(TCollection_HAsciiString)& aName, const Handle(StepBasic_MeasureWithUnit)& aConversionFactor); + Standard_EXPORT void Init (const Handle(StepBasic_DimensionalExponents)& theDimensions, + const Handle(TCollection_HAsciiString)& theName, + const Handle(Standard_Transient)& theConversionFactor); - Standard_EXPORT void SetTimeUnit (const Handle(StepBasic_TimeUnit)& aTimeUnit); + Standard_EXPORT void SetTimeUnit (const Handle(StepBasic_TimeUnit)& theTimeUnit); Standard_EXPORT Handle(StepBasic_TimeUnit) TimeUnit() const; @@ -59,7 +60,7 @@ protected: private: - Handle(StepBasic_TimeUnit) timeUnit; + Handle(StepBasic_TimeUnit) myTimeUnit; }; diff --git a/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRef.cxx b/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRef.cxx index 9bca2414f4..20c2ceab80 100644 --- a/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRef.cxx +++ b/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRef.cxx @@ -14,8 +14,6 @@ // commercial license or contractual agreement. -#include -#include #include #include #include @@ -41,7 +39,7 @@ StepDimTol_GeoTolAndGeoTolWthDatRef::StepDimTol_GeoTolAndGeoTolWthDatRef() void StepDimTol_GeoTolAndGeoTolWthDatRef::Init (const Handle(TCollection_HAsciiString)& theName, const Handle(TCollection_HAsciiString)& theDescription, - const Handle(StepBasic_MeasureWithUnit)& theMagnitude, + const Handle(Standard_Transient)& theMagnitude, const Handle(StepRepr_ShapeAspect)& theTolerancedShapeAspect, const Handle(StepDimTol_GeometricToleranceWithDatumReference)& theGTWDR, const StepDimTol_GeometricToleranceType theType) @@ -62,7 +60,7 @@ void StepDimTol_GeoTolAndGeoTolWthDatRef::Init void StepDimTol_GeoTolAndGeoTolWthDatRef::Init (const Handle(TCollection_HAsciiString)& theName, const Handle(TCollection_HAsciiString)& theDescription, - const Handle(StepBasic_MeasureWithUnit)& theMagnitude, + const Handle(Standard_Transient)& theMagnitude, const StepDimTol_GeometricToleranceTarget& theTolerancedShapeAspect, const Handle(StepDimTol_GeometricToleranceWithDatumReference)& theGTWDR, const StepDimTol_GeometricToleranceType theType) diff --git a/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRef.hxx b/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRef.hxx index 532c811a28..a2900d299b 100644 --- a/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRef.hxx +++ b/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRef.hxx @@ -24,7 +24,6 @@ class StepDimTol_GeometricToleranceTarget; class StepDimTol_GeometricToleranceWithDatumReference; class TCollection_HAsciiString; -class StepBasic_MeasureWithUnit; class StepRepr_ShapeAspect; @@ -41,16 +40,16 @@ public: Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& theName, const Handle(TCollection_HAsciiString)& theDescription, - const Handle(StepBasic_MeasureWithUnit)& theMagnitude, + const Handle(Standard_Transient)& theMagnitude, const Handle(StepRepr_ShapeAspect)& theTolerancedShapeAspect, const Handle(StepDimTol_GeometricToleranceWithDatumReference)& theGTWDR, const StepDimTol_GeometricToleranceType theType); - Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& aName, - const Handle(TCollection_HAsciiString)& aDescription, - const Handle(StepBasic_MeasureWithUnit)& aMagnitude, - const StepDimTol_GeometricToleranceTarget& aTolerancedShapeAspect, - const Handle(StepDimTol_GeometricToleranceWithDatumReference)& aGTWDR, + Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& theName, + const Handle(TCollection_HAsciiString)& theDescription, + const Handle(Standard_Transient)& theMagnitude, + const StepDimTol_GeometricToleranceTarget& theTolerancedShapeAspect, + const Handle(StepDimTol_GeometricToleranceWithDatumReference)& theGTWDR, const StepDimTol_GeometricToleranceType theType); inline void SetGeometricToleranceWithDatumReference (const Handle(StepDimTol_GeometricToleranceWithDatumReference)& theGTWDR){ diff --git a/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol.cxx b/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol.cxx index ca0d8e29d9..8c87f371b9 100644 --- a/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol.cxx +++ b/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol.cxx @@ -16,7 +16,6 @@ #include #include -#include #include #include #include @@ -43,7 +42,7 @@ StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol::StepDimTol_GeoTolAndGeoTo void StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol::Init (const Handle(TCollection_HAsciiString)& theName, const Handle(TCollection_HAsciiString)& theDescription, - const Handle(StepBasic_MeasureWithUnit)& theMagnitude, + const Handle(Standard_Transient)& theMagnitude, const Handle(StepRepr_ShapeAspect)& theTolerancedShapeAspect, const Handle(StepDimTol_GeometricToleranceWithDatumReference)& theGTWDR, const Handle(StepDimTol_GeometricToleranceWithModifiers)& theGTWM, @@ -63,7 +62,7 @@ void StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol::Init void StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol::Init (const Handle(TCollection_HAsciiString)& theName, const Handle(TCollection_HAsciiString)& theDescription, - const Handle(StepBasic_MeasureWithUnit)& theMagnitude, + const Handle(Standard_Transient)& theMagnitude, const StepDimTol_GeometricToleranceTarget& theTolerancedShapeAspect, const Handle(StepDimTol_GeometricToleranceWithDatumReference)& theGTWDR, const Handle(StepDimTol_GeometricToleranceWithModifiers)& theGTWM, diff --git a/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol.hxx b/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol.hxx index 566434b8a4..3cc880ca87 100644 --- a/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol.hxx +++ b/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol.hxx @@ -26,7 +26,6 @@ class StepDimTol_GeometricToleranceWithDatumReference; class StepDimTol_GeometricToleranceWithModifiers; class TCollection_HAsciiString; class StepBasic_LengthMeasureWithUnit; -class StepBasic_MeasureWithUnit; class StepRepr_ShapeAspect; @@ -42,7 +41,7 @@ public: Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& theName, const Handle(TCollection_HAsciiString)& theDescription, - const Handle(StepBasic_MeasureWithUnit)& theMagnitude, + const Handle(Standard_Transient)& theMagnitude, const Handle(StepRepr_ShapeAspect)& theTolerancedShapeAspect, const Handle(StepDimTol_GeometricToleranceWithDatumReference)& theGTWDR, const Handle(StepDimTol_GeometricToleranceWithModifiers)& theGTWM, @@ -51,7 +50,7 @@ public: Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& aName, const Handle(TCollection_HAsciiString)& aDescription, - const Handle(StepBasic_MeasureWithUnit)& aMagnitude, + const Handle(Standard_Transient)& theMagnitude, const StepDimTol_GeometricToleranceTarget& aTolerancedShapeAspect, const Handle(StepDimTol_GeometricToleranceWithDatumReference)& aGTWDR, const Handle(StepDimTol_GeometricToleranceWithModifiers)& aGTWM, diff --git a/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMod.cxx b/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMod.cxx index 3f56ccfa5e..b96e8b36b7 100644 --- a/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMod.cxx +++ b/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMod.cxx @@ -14,8 +14,6 @@ // commercial license or contractual agreement. -#include -#include #include #include #include @@ -42,7 +40,7 @@ StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMod::StepDimTol_GeoTolAndGeoTolWt void StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMod::Init (const Handle(TCollection_HAsciiString)& theName, const Handle(TCollection_HAsciiString)& theDescription, - const Handle(StepBasic_MeasureWithUnit)& theMagnitude, + const Handle(Standard_Transient)& theMagnitude, const Handle(StepRepr_ShapeAspect)& theTolerancedShapeAspect, const Handle(StepDimTol_GeometricToleranceWithDatumReference)& theGTWDR, const Handle(StepDimTol_GeometricToleranceWithModifiers)& theGTWM, @@ -65,7 +63,7 @@ void StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMod::Init void StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMod::Init (const Handle(TCollection_HAsciiString)& theName, const Handle(TCollection_HAsciiString)& theDescription, - const Handle(StepBasic_MeasureWithUnit)& theMagnitude, + const Handle(Standard_Transient)& theMagnitude, const StepDimTol_GeometricToleranceTarget& theTolerancedShapeAspect, const Handle(StepDimTol_GeometricToleranceWithDatumReference)& theGTWDR, const Handle(StepDimTol_GeometricToleranceWithModifiers)& theGTWM, diff --git a/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMod.hxx b/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMod.hxx index f80a577c20..d446d99091 100644 --- a/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMod.hxx +++ b/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMod.hxx @@ -25,7 +25,6 @@ class StepDimTol_GeometricToleranceTarget; class StepDimTol_GeometricToleranceWithDatumReference; class StepDimTol_GeometricToleranceWithModifiers; class TCollection_HAsciiString; -class StepBasic_MeasureWithUnit; class StepRepr_ShapeAspect; @@ -42,7 +41,7 @@ public: Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& theName, const Handle(TCollection_HAsciiString)& theDescription, - const Handle(StepBasic_MeasureWithUnit)& theMagnitude, + const Handle(Standard_Transient)& theMagnitude, const Handle(StepRepr_ShapeAspect)& theTolerancedShapeAspect, const Handle(StepDimTol_GeometricToleranceWithDatumReference)& theGTWDR, const Handle(StepDimTol_GeometricToleranceWithModifiers)& theGTWM, @@ -50,7 +49,7 @@ public: Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& aName, const Handle(TCollection_HAsciiString)& aDescription, - const Handle(StepBasic_MeasureWithUnit)& aMagnitude, + const Handle(Standard_Transient)& theMagnitude, const StepDimTol_GeometricToleranceTarget& aTolerancedShapeAspect, const Handle(StepDimTol_GeometricToleranceWithDatumReference)& aGTWDR, const Handle(StepDimTol_GeometricToleranceWithModifiers)& aGTWM, diff --git a/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol.cxx b/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol.cxx index 1c2eaba55c..28a3d5506a 100644 --- a/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol.cxx +++ b/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol.cxx @@ -12,8 +12,6 @@ // commercial license or contractual agreement. -#include -#include #include #include #include @@ -39,19 +37,19 @@ StepDimTol_GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol::StepDimTol_GeoTolAndGe //======================================================================= void StepDimTol_GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol::Init - (const Handle(TCollection_HAsciiString)& aName, - const Handle(TCollection_HAsciiString)& aDescription, - const Handle(StepBasic_MeasureWithUnit)& aMagnitude, - const Handle(StepRepr_ShapeAspect)& aTolerancedShapeAspect, - const Handle(StepDimTol_GeometricToleranceWithDatumReference)& aGTWDR, - const Handle(StepDimTol_ModifiedGeometricTolerance)& aMGT) + (const Handle(TCollection_HAsciiString)& theName, + const Handle(TCollection_HAsciiString)& theDescription, + const Handle(Standard_Transient)& theMagnitude, + const Handle(StepRepr_ShapeAspect)& theTolerancedShapeAspect, + const Handle(StepDimTol_GeometricToleranceWithDatumReference)& theGTWDR, + const Handle(StepDimTol_ModifiedGeometricTolerance)& theMGT) { - SetName(aName); - SetDescription(aDescription); - SetMagnitude(aMagnitude); - SetTolerancedShapeAspect(aTolerancedShapeAspect); - myGeometricToleranceWithDatumReference = aGTWDR; - myModifiedGeometricTolerance = aMGT; + SetName(theName); + SetDescription(theDescription); + SetMagnitude(theMagnitude); + SetTolerancedShapeAspect(theTolerancedShapeAspect); + myGeometricToleranceWithDatumReference = theGTWDR; + myModifiedGeometricTolerance = theMGT; } //======================================================================= @@ -60,19 +58,19 @@ void StepDimTol_GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol::Init //======================================================================= void StepDimTol_GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol::Init - (const Handle(TCollection_HAsciiString)& aName, - const Handle(TCollection_HAsciiString)& aDescription, - const Handle(StepBasic_MeasureWithUnit)& aMagnitude, - const StepDimTol_GeometricToleranceTarget& aTolerancedShapeAspect, - const Handle(StepDimTol_GeometricToleranceWithDatumReference)& aGTWDR, - const Handle(StepDimTol_ModifiedGeometricTolerance)& aMGT) + (const Handle(TCollection_HAsciiString)& theName, + const Handle(TCollection_HAsciiString)& theDescription, + const Handle(Standard_Transient)& theMagnitude, + const StepDimTol_GeometricToleranceTarget& theTolerancedShapeAspect, + const Handle(StepDimTol_GeometricToleranceWithDatumReference)& theGTWDR, + const Handle(StepDimTol_ModifiedGeometricTolerance)& theMGT) { - SetName(aName); - SetDescription(aDescription); - SetMagnitude(aMagnitude); - SetTolerancedShapeAspect(aTolerancedShapeAspect); - myGeometricToleranceWithDatumReference = aGTWDR; - myModifiedGeometricTolerance = aMGT; + SetName(theName); + SetDescription(theDescription); + SetMagnitude(theMagnitude); + SetTolerancedShapeAspect(theTolerancedShapeAspect); + myGeometricToleranceWithDatumReference = theGTWDR; + myModifiedGeometricTolerance = theMGT; } @@ -82,9 +80,9 @@ void StepDimTol_GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol::Init //======================================================================= void StepDimTol_GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol::SetGeometricToleranceWithDatumReference - (const Handle(StepDimTol_GeometricToleranceWithDatumReference)& aGTWDR) + (const Handle(StepDimTol_GeometricToleranceWithDatumReference)& theGTWDR) { - myGeometricToleranceWithDatumReference = aGTWDR; + myGeometricToleranceWithDatumReference = theGTWDR; } @@ -105,9 +103,9 @@ Handle(StepDimTol_GeometricToleranceWithDatumReference) StepDimTol_GeoTolAndGeoT //======================================================================= void StepDimTol_GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol::SetModifiedGeometricTolerance - (const Handle(StepDimTol_ModifiedGeometricTolerance)& aMGT) + (const Handle(StepDimTol_ModifiedGeometricTolerance)& theMGT) { - myModifiedGeometricTolerance = aMGT; + myModifiedGeometricTolerance = theMGT; } @@ -128,9 +126,9 @@ Handle(StepDimTol_ModifiedGeometricTolerance) StepDimTol_GeoTolAndGeoTolWthDatRe //======================================================================= void StepDimTol_GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol::SetPositionTolerance - (const Handle(StepDimTol_PositionTolerance)& aPT) + (const Handle(StepDimTol_PositionTolerance)& thePT) { - myPositionTolerance = aPT; + myPositionTolerance = thePT; } diff --git a/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol.hxx b/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol.hxx index 24d1045d26..039efde378 100644 --- a/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol.hxx +++ b/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol.hxx @@ -25,7 +25,6 @@ class StepDimTol_GeometricToleranceWithDatumReference; class StepDimTol_ModifiedGeometricTolerance; class StepDimTol_PositionTolerance; class TCollection_HAsciiString; -class StepBasic_MeasureWithUnit; class StepRepr_ShapeAspect; @@ -41,19 +40,29 @@ public: Standard_EXPORT StepDimTol_GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol(); - Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& aName, const Handle(TCollection_HAsciiString)& aDescription, const Handle(StepBasic_MeasureWithUnit)& aMagnitude, const Handle(StepRepr_ShapeAspect)& aTolerancedShapeAspect, const Handle(StepDimTol_GeometricToleranceWithDatumReference)& aGTWDR, const Handle(StepDimTol_ModifiedGeometricTolerance)& aMGT); + Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& theName, + const Handle(TCollection_HAsciiString)& theDescription, + const Handle(Standard_Transient)& theMagnitude, + const Handle(StepRepr_ShapeAspect)& theTolerancedShapeAspect, + const Handle(StepDimTol_GeometricToleranceWithDatumReference)& theGTWDR, + const Handle(StepDimTol_ModifiedGeometricTolerance)& theMGT); - Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& aName, const Handle(TCollection_HAsciiString)& aDescription, const Handle(StepBasic_MeasureWithUnit)& aMagnitude, const StepDimTol_GeometricToleranceTarget& aTolerancedShapeAspect, const Handle(StepDimTol_GeometricToleranceWithDatumReference)& aGTWDR, const Handle(StepDimTol_ModifiedGeometricTolerance)& aMGT); + Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& theName, + const Handle(TCollection_HAsciiString)& theDescription, + const Handle(Standard_Transient)& theMagnitude, + const StepDimTol_GeometricToleranceTarget& theTolerancedShapeAspect, + const Handle(StepDimTol_GeometricToleranceWithDatumReference)& theGTWDR, + const Handle(StepDimTol_ModifiedGeometricTolerance)& theMGT); - Standard_EXPORT void SetGeometricToleranceWithDatumReference (const Handle(StepDimTol_GeometricToleranceWithDatumReference)& aGTWDR); + Standard_EXPORT void SetGeometricToleranceWithDatumReference (const Handle(StepDimTol_GeometricToleranceWithDatumReference)& theGTWDR); Standard_EXPORT Handle(StepDimTol_GeometricToleranceWithDatumReference) GetGeometricToleranceWithDatumReference() const; - Standard_EXPORT void SetModifiedGeometricTolerance (const Handle(StepDimTol_ModifiedGeometricTolerance)& aMGT); + Standard_EXPORT void SetModifiedGeometricTolerance (const Handle(StepDimTol_ModifiedGeometricTolerance)& theMGT); Standard_EXPORT Handle(StepDimTol_ModifiedGeometricTolerance) GetModifiedGeometricTolerance() const; - Standard_EXPORT void SetPositionTolerance (const Handle(StepDimTol_PositionTolerance)& aPT); + Standard_EXPORT void SetPositionTolerance (const Handle(StepDimTol_PositionTolerance)& thePT); Standard_EXPORT Handle(StepDimTol_PositionTolerance) GetPositionTolerance() const; diff --git a/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndUneqDisGeoTol.cxx b/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndUneqDisGeoTol.cxx index 42272790da..c3c5958e32 100644 --- a/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndUneqDisGeoTol.cxx +++ b/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndUneqDisGeoTol.cxx @@ -42,7 +42,7 @@ StepDimTol_GeoTolAndGeoTolWthDatRefAndUneqDisGeoTol::StepDimTol_GeoTolAndGeoTolW void StepDimTol_GeoTolAndGeoTolWthDatRefAndUneqDisGeoTol::Init (const Handle(TCollection_HAsciiString)& theName, const Handle(TCollection_HAsciiString)& theDescription, - const Handle(StepBasic_MeasureWithUnit)& theMagnitude, + const Handle(Standard_Transient)& theMagnitude, const Handle(StepRepr_ShapeAspect)& theTolerancedShapeAspect, const Handle(StepDimTol_GeometricToleranceWithDatumReference)& theGTWDR, const StepDimTol_GeometricToleranceType theType, @@ -61,7 +61,7 @@ void StepDimTol_GeoTolAndGeoTolWthDatRefAndUneqDisGeoTol::Init void StepDimTol_GeoTolAndGeoTolWthDatRefAndUneqDisGeoTol::Init (const Handle(TCollection_HAsciiString)& theName, const Handle(TCollection_HAsciiString)& theDescription, - const Handle(StepBasic_MeasureWithUnit)& theMagnitude, + const Handle(Standard_Transient)& theMagnitude, const StepDimTol_GeometricToleranceTarget& theTolerancedShapeAspect, const Handle(StepDimTol_GeometricToleranceWithDatumReference)& theGTWDR, const StepDimTol_GeometricToleranceType theType, diff --git a/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndUneqDisGeoTol.hxx b/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndUneqDisGeoTol.hxx index 94276eb6e4..0f1effa0d4 100644 --- a/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndUneqDisGeoTol.hxx +++ b/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndUneqDisGeoTol.hxx @@ -24,7 +24,6 @@ class StepDimTol_GeometricToleranceTarget; class StepDimTol_GeometricToleranceWithDatumReference; class StepDimTol_UnequallyDisposedGeometricTolerance; class TCollection_HAsciiString; -class StepBasic_MeasureWithUnit; class StepRepr_ShapeAspect; @@ -41,17 +40,17 @@ public: Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& theName, const Handle(TCollection_HAsciiString)& theDescription, - const Handle(StepBasic_MeasureWithUnit)& theMagnitude, + const Handle(Standard_Transient)& theMagnitude, const Handle(StepRepr_ShapeAspect)& theTolerancedShapeAspect, const Handle(StepDimTol_GeometricToleranceWithDatumReference)& theGTWDR, const StepDimTol_GeometricToleranceType theType, const Handle(StepDimTol_UnequallyDisposedGeometricTolerance)& theUDGT); - Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& aName, - const Handle(TCollection_HAsciiString)& aDescription, - const Handle(StepBasic_MeasureWithUnit)& aMagnitude, - const StepDimTol_GeometricToleranceTarget& aTolerancedShapeAspect, - const Handle(StepDimTol_GeometricToleranceWithDatumReference)& aGTWDR, + Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& theName, + const Handle(TCollection_HAsciiString)& theDescription, + const Handle(Standard_Transient)& theMagnitude, + const StepDimTol_GeometricToleranceTarget& theTolerancedShapeAspect, + const Handle(StepDimTol_GeometricToleranceWithDatumReference)& theGTWDR, const StepDimTol_GeometricToleranceType theType, const Handle(StepDimTol_UnequallyDisposedGeometricTolerance)& theUDGT); diff --git a/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthMaxTol.cxx b/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthMaxTol.cxx index 151f056d94..2f1abd872c 100644 --- a/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthMaxTol.cxx +++ b/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthMaxTol.cxx @@ -13,10 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. - #include #include -#include #include #include #include @@ -42,7 +40,7 @@ StepDimTol_GeoTolAndGeoTolWthMaxTol::StepDimTol_GeoTolAndGeoTolWthMaxTol() void StepDimTol_GeoTolAndGeoTolWthMaxTol::Init (const Handle(TCollection_HAsciiString)& theName, const Handle(TCollection_HAsciiString)& theDescription, - const Handle(StepBasic_MeasureWithUnit)& theMagnitude, + const Handle(Standard_Transient)& theMagnitude, const Handle(StepRepr_ShapeAspect)& theTolerancedShapeAspect, const Handle(StepDimTol_GeometricToleranceWithModifiers)& theGTWM, const Handle(StepBasic_LengthMeasureWithUnit)& theMaxTol, @@ -60,7 +58,7 @@ void StepDimTol_GeoTolAndGeoTolWthMaxTol::Init void StepDimTol_GeoTolAndGeoTolWthMaxTol::Init (const Handle(TCollection_HAsciiString)& theName, const Handle(TCollection_HAsciiString)& theDescription, - const Handle(StepBasic_MeasureWithUnit)& theMagnitude, + const Handle(Standard_Transient)& theMagnitude, const StepDimTol_GeometricToleranceTarget& theTolerancedShapeAspect, const Handle(StepDimTol_GeometricToleranceWithModifiers)& theGTWM, const Handle(StepBasic_LengthMeasureWithUnit)& theMaxTol, diff --git a/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthMaxTol.hxx b/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthMaxTol.hxx index 078c953651..541fd23638 100644 --- a/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthMaxTol.hxx +++ b/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthMaxTol.hxx @@ -25,7 +25,6 @@ class StepDimTol_GeometricToleranceTarget; class StepDimTol_GeometricToleranceWithModifiers; class TCollection_HAsciiString; class StepBasic_LengthMeasureWithUnit; -class StepBasic_MeasureWithUnit; class StepRepr_ShapeAspect; @@ -40,19 +39,19 @@ public: Standard_EXPORT StepDimTol_GeoTolAndGeoTolWthMaxTol(); - Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& theName, - const Handle(TCollection_HAsciiString)& theDescription, - const Handle(StepBasic_MeasureWithUnit)& theMagnitude, - const Handle(StepRepr_ShapeAspect)& theTolerancedShapeAspect, + Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& theName, + const Handle(TCollection_HAsciiString)& theDescription, + const Handle(Standard_Transient)& theMagnitude, + const Handle(StepRepr_ShapeAspect)& theTolerancedShapeAspect, const Handle(StepDimTol_GeometricToleranceWithModifiers)& theGTWM, const Handle(StepBasic_LengthMeasureWithUnit)& theMaxTol, const StepDimTol_GeometricToleranceType theType); - Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& aName, - const Handle(TCollection_HAsciiString)& aDescription, - const Handle(StepBasic_MeasureWithUnit)& aMagnitude, - const StepDimTol_GeometricToleranceTarget& aTolerancedShapeAspect, - const Handle(StepDimTol_GeometricToleranceWithModifiers)& aGTWM, + Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& theName, + const Handle(TCollection_HAsciiString)& theDescription, + const Handle(Standard_Transient)& theMagnitude, + const StepDimTol_GeometricToleranceTarget& theTolerancedShapeAspect, + const Handle(StepDimTol_GeometricToleranceWithModifiers)& theGTWM, const Handle(StepBasic_LengthMeasureWithUnit)& theMaxTol, const StepDimTol_GeometricToleranceType theType); diff --git a/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthMod.cxx b/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthMod.cxx index 870f3116f3..218635796f 100644 --- a/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthMod.cxx +++ b/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthMod.cxx @@ -41,7 +41,7 @@ StepDimTol_GeoTolAndGeoTolWthMod::StepDimTol_GeoTolAndGeoTolWthMod() void StepDimTol_GeoTolAndGeoTolWthMod::Init (const Handle(TCollection_HAsciiString)& theName, const Handle(TCollection_HAsciiString)& theDescription, - const Handle(StepBasic_MeasureWithUnit)& theMagnitude, + const Handle(Standard_Transient)& theMagnitude, const Handle(StepRepr_ShapeAspect)& theTolerancedShapeAspect, const Handle(StepDimTol_GeometricToleranceWithModifiers)& theGTWM, const StepDimTol_GeometricToleranceType theType) @@ -62,7 +62,7 @@ void StepDimTol_GeoTolAndGeoTolWthMod::Init void StepDimTol_GeoTolAndGeoTolWthMod::Init (const Handle(TCollection_HAsciiString)& theName, const Handle(TCollection_HAsciiString)& theDescription, - const Handle(StepBasic_MeasureWithUnit)& theMagnitude, + const Handle(Standard_Transient)& theMagnitude, const StepDimTol_GeometricToleranceTarget& theTolerancedShapeAspect, const Handle(StepDimTol_GeometricToleranceWithModifiers)& theGTWM, const StepDimTol_GeometricToleranceType theType) diff --git a/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthMod.hxx b/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthMod.hxx index 849314d6dc..0afd66d94b 100644 --- a/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthMod.hxx +++ b/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthMod.hxx @@ -39,18 +39,18 @@ public: Standard_EXPORT StepDimTol_GeoTolAndGeoTolWthMod(); - Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& theName, - const Handle(TCollection_HAsciiString)& theDescription, - const Handle(StepBasic_MeasureWithUnit)& theMagnitude, - const Handle(StepRepr_ShapeAspect)& theTolerancedShapeAspect, + Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& theName, + const Handle(TCollection_HAsciiString)& theDescription, + const Handle(Standard_Transient)& theMagnitude, + const Handle(StepRepr_ShapeAspect)& theTolerancedShapeAspect, const Handle(StepDimTol_GeometricToleranceWithModifiers)& theGTWM, const StepDimTol_GeometricToleranceType theType); - Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& aName, - const Handle(TCollection_HAsciiString)& aDescription, - const Handle(StepBasic_MeasureWithUnit)& aMagnitude, - const StepDimTol_GeometricToleranceTarget& aTolerancedShapeAspect, - const Handle(StepDimTol_GeometricToleranceWithModifiers)& aGTWM, + Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& theName, + const Handle(TCollection_HAsciiString)& theDescription, + const Handle(Standard_Transient)& theMagnitude, + const StepDimTol_GeometricToleranceTarget& theTolerancedShapeAspect, + const Handle(StepDimTol_GeometricToleranceWithModifiers)& theGTWM, const StepDimTol_GeometricToleranceType theType); inline void SetGeometricToleranceWithModifiers (const Handle(StepDimTol_GeometricToleranceWithModifiers)& theGTWM) { diff --git a/src/StepDimTol/StepDimTol_GeometricTolerance.cxx b/src/StepDimTol/StepDimTol_GeometricTolerance.cxx index 39297f9f42..33ef97eeeb 100644 --- a/src/StepDimTol/StepDimTol_GeometricTolerance.cxx +++ b/src/StepDimTol/StepDimTol_GeometricTolerance.cxx @@ -15,8 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include -#include #include #include #include @@ -39,7 +37,7 @@ StepDimTol_GeometricTolerance::StepDimTol_GeometricTolerance () void StepDimTol_GeometricTolerance::Init (const Handle(TCollection_HAsciiString) &theName, const Handle(TCollection_HAsciiString) &theDescription, - const Handle(StepBasic_MeasureWithUnit) &theMagnitude, + const Handle(Standard_Transient)& theMagnitude, const StepDimTol_GeometricToleranceTarget &theTolerancedShapeAspect) { @@ -59,7 +57,7 @@ void StepDimTol_GeometricTolerance::Init (const Handle(TCollection_HAsciiString) void StepDimTol_GeometricTolerance::Init (const Handle(TCollection_HAsciiString) &theName, const Handle(TCollection_HAsciiString) &theDescription, - const Handle(StepBasic_MeasureWithUnit) &theMagnitude, + const Handle(Standard_Transient)& theMagnitude, const Handle(StepRepr_ShapeAspect) &theTolerancedShapeAspect) { @@ -117,7 +115,7 @@ void StepDimTol_GeometricTolerance::SetDescription (const Handle(TCollection_HAs //purpose : //======================================================================= -Handle(StepBasic_MeasureWithUnit) StepDimTol_GeometricTolerance::Magnitude () const +Handle(Standard_Transient) StepDimTol_GeometricTolerance::Magnitude() const { return myMagnitude; } @@ -127,7 +125,7 @@ Handle(StepBasic_MeasureWithUnit) StepDimTol_GeometricTolerance::Magnitude () co //purpose : //======================================================================= -void StepDimTol_GeometricTolerance::SetMagnitude (const Handle(StepBasic_MeasureWithUnit) &theMagnitude) +void StepDimTol_GeometricTolerance::SetMagnitude (const Handle(Standard_Transient)& theMagnitude) { myMagnitude = theMagnitude; } diff --git a/src/StepDimTol/StepDimTol_GeometricTolerance.hxx b/src/StepDimTol/StepDimTol_GeometricTolerance.hxx index e333d964ce..541be59554 100644 --- a/src/StepDimTol/StepDimTol_GeometricTolerance.hxx +++ b/src/StepDimTol/StepDimTol_GeometricTolerance.hxx @@ -21,12 +21,11 @@ #include #include + class TCollection_HAsciiString; -class StepBasic_MeasureWithUnit; class StepDimTol_GeometricToleranceTarget; class StepRepr_ShapeAspect; - class StepDimTol_GeometricTolerance; DEFINE_STANDARD_HANDLE(StepDimTol_GeometricTolerance, Standard_Transient) @@ -43,13 +42,13 @@ public: //! Initialize all fields (own and inherited) AP214 Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theName, const Handle(TCollection_HAsciiString)& theDescription, - const Handle(StepBasic_MeasureWithUnit)& theMagnitude, + const Handle(Standard_Transient)& theMagnitude, const Handle(StepRepr_ShapeAspect)& theTolerancedShapeAspect); //! Initialize all fields (own and inherited) AP242 Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theName, const Handle(TCollection_HAsciiString)& theDescription, - const Handle(StepBasic_MeasureWithUnit)& theMagnitude, + const Handle(Standard_Transient)& theMagnitude, const StepDimTol_GeometricToleranceTarget& theTolerancedShapeAspect); //! Returns field Name @@ -65,11 +64,11 @@ public: Standard_EXPORT void SetDescription (const Handle(TCollection_HAsciiString)& theDescription); //! Returns field Magnitude - Standard_EXPORT Handle(StepBasic_MeasureWithUnit) Magnitude() const; - + Standard_EXPORT Handle(Standard_Transient) Magnitude() const; + //! Set field Magnitude - Standard_EXPORT void SetMagnitude (const Handle(StepBasic_MeasureWithUnit)& theMagnitude); - + Standard_EXPORT void SetMagnitude(const Handle(Standard_Transient)& theMagnitude); + //! Returns field TolerancedShapeAspect //! Note: in AP214(203) type of this attribute can be only StepRepr_ShapeAspect Standard_EXPORT StepDimTol_GeometricToleranceTarget TolerancedShapeAspect() const; @@ -95,7 +94,7 @@ private: Handle(TCollection_HAsciiString) myName; Handle(TCollection_HAsciiString) myDescription; - Handle(StepBasic_MeasureWithUnit) myMagnitude; + Handle(Standard_Transient) myMagnitude; StepDimTol_GeometricToleranceTarget myTolerancedShapeAspect; diff --git a/src/StepDimTol/StepDimTol_GeometricToleranceWithDatumReference.cxx b/src/StepDimTol/StepDimTol_GeometricToleranceWithDatumReference.cxx index b9635a9546..2eb8641916 100644 --- a/src/StepDimTol/StepDimTol_GeometricToleranceWithDatumReference.cxx +++ b/src/StepDimTol/StepDimTol_GeometricToleranceWithDatumReference.cxx @@ -39,7 +39,7 @@ StepDimTol_GeometricToleranceWithDatumReference::StepDimTol_GeometricToleranceWi void StepDimTol_GeometricToleranceWithDatumReference::Init (const Handle(TCollection_HAsciiString) &theGeometricTolerance_Name, const Handle(TCollection_HAsciiString) &theGeometricTolerance_Description, - const Handle(StepBasic_MeasureWithUnit) &theGeometricTolerance_Magnitude, + const Handle(Standard_Transient)& theGeometricTolerance_Magnitude, const Handle(StepRepr_ShapeAspect) &theGeometricTolerance_TolerancedShapeAspect, const Handle(StepDimTol_HArray1OfDatumReference) &theDatumSystem) { @@ -63,7 +63,7 @@ void StepDimTol_GeometricToleranceWithDatumReference::Init (const Handle(TCollec void StepDimTol_GeometricToleranceWithDatumReference::Init (const Handle(TCollection_HAsciiString) &theGeometricTolerance_Name, const Handle(TCollection_HAsciiString) &theGeometricTolerance_Description, - const Handle(StepBasic_MeasureWithUnit) &theGeometricTolerance_Magnitude, + const Handle(Standard_Transient)& theGeometricTolerance_Magnitude, const StepDimTol_GeometricToleranceTarget &theGeometricTolerance_TolerancedShapeAspect, const Handle(StepDimTol_HArray1OfDatumSystemOrReference) &theDatumSystem) { diff --git a/src/StepDimTol/StepDimTol_GeometricToleranceWithDatumReference.hxx b/src/StepDimTol/StepDimTol_GeometricToleranceWithDatumReference.hxx index a0a1aa3390..d95521350e 100644 --- a/src/StepDimTol/StepDimTol_GeometricToleranceWithDatumReference.hxx +++ b/src/StepDimTol/StepDimTol_GeometricToleranceWithDatumReference.hxx @@ -44,14 +44,14 @@ public: //! Initialize all fields (own and inherited) AP214 Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& theGeometricTolerance_Name, const Handle(TCollection_HAsciiString)& theGeometricTolerance_Description, - const Handle(StepBasic_MeasureWithUnit)& theGeometricTolerance_Magnitude, + const Handle(Standard_Transient)& theGeometricTolerance_Magnitude, const Handle(StepRepr_ShapeAspect)& theGeometricTolerance_TolerancedShapeAspect, const Handle(StepDimTol_HArray1OfDatumReference)& theDatumSystem); //! Initialize all fields (own and inherited) AP242 Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& theGeometricTolerance_Name, const Handle(TCollection_HAsciiString)& theGeometricTolerance_Description, - const Handle(StepBasic_MeasureWithUnit)& theGeometricTolerance_Magnitude, + const Handle(Standard_Transient)& theGeometricTolerance_Magnitude, const StepDimTol_GeometricToleranceTarget& theGeometricTolerance_TolerancedShapeAspect, const Handle(StepDimTol_HArray1OfDatumSystemOrReference)& theDatumSystem); diff --git a/src/StepDimTol/StepDimTol_GeometricToleranceWithDefinedAreaUnit.cxx b/src/StepDimTol/StepDimTol_GeometricToleranceWithDefinedAreaUnit.cxx index fc731cbed3..9029c0ecf7 100644 --- a/src/StepDimTol/StepDimTol_GeometricToleranceWithDefinedAreaUnit.cxx +++ b/src/StepDimTol/StepDimTol_GeometricToleranceWithDefinedAreaUnit.cxx @@ -34,7 +34,7 @@ StepDimTol_GeometricToleranceWithDefinedAreaUnit::StepDimTol_GeometricToleranceW void StepDimTol_GeometricToleranceWithDefinedAreaUnit:: Init (const Handle(TCollection_HAsciiString) &theName, const Handle(TCollection_HAsciiString) &theDescription, - const Handle(StepBasic_MeasureWithUnit) &theMagnitude, + const Handle(Standard_Transient)& theMagnitude, const StepDimTol_GeometricToleranceTarget &theTolerancedShapeAspect, const Handle(StepBasic_LengthMeasureWithUnit) &theUnitSize, const StepDimTol_AreaUnitType theUnitType, diff --git a/src/StepDimTol/StepDimTol_GeometricToleranceWithDefinedAreaUnit.hxx b/src/StepDimTol/StepDimTol_GeometricToleranceWithDefinedAreaUnit.hxx index cacc2069e9..37bea13293 100644 --- a/src/StepDimTol/StepDimTol_GeometricToleranceWithDefinedAreaUnit.hxx +++ b/src/StepDimTol/StepDimTol_GeometricToleranceWithDefinedAreaUnit.hxx @@ -43,7 +43,7 @@ public: //! Initialize all fields (own and inherited) Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theName, const Handle(TCollection_HAsciiString)& theDescription, - const Handle(StepBasic_MeasureWithUnit)& theMagnitude, + const Handle(Standard_Transient)& theMagnitude, const StepDimTol_GeometricToleranceTarget& theTolerancedShapeAspect, const Handle(StepBasic_LengthMeasureWithUnit)& theUnitSize, const StepDimTol_AreaUnitType theAreaType, const Standard_Boolean theHasSecondUnitSize, diff --git a/src/StepDimTol/StepDimTol_GeometricToleranceWithDefinedUnit.cxx b/src/StepDimTol/StepDimTol_GeometricToleranceWithDefinedUnit.cxx index 3a2deaaf3e..9168250b9d 100644 --- a/src/StepDimTol/StepDimTol_GeometricToleranceWithDefinedUnit.cxx +++ b/src/StepDimTol/StepDimTol_GeometricToleranceWithDefinedUnit.cxx @@ -36,7 +36,7 @@ StepDimTol_GeometricToleranceWithDefinedUnit::StepDimTol_GeometricToleranceWithD void StepDimTol_GeometricToleranceWithDefinedUnit::Init (const Handle(TCollection_HAsciiString) &theName, const Handle(TCollection_HAsciiString) &theDescription, - const Handle(StepBasic_MeasureWithUnit) &theMagnitude, + const Handle(Standard_Transient)& theMagnitude, const Handle(StepRepr_ShapeAspect) &theTolerancedShapeAspect, const Handle(StepBasic_LengthMeasureWithUnit) &theUnitSize) { @@ -51,7 +51,7 @@ void StepDimTol_GeometricToleranceWithDefinedUnit::Init (const Handle(TCollectio void StepDimTol_GeometricToleranceWithDefinedUnit::Init (const Handle(TCollection_HAsciiString) &theName, const Handle(TCollection_HAsciiString) &theDescription, - const Handle(StepBasic_MeasureWithUnit) &theMagnitude, + const Handle(Standard_Transient)& theMagnitude, const StepDimTol_GeometricToleranceTarget &theTolerancedShapeAspect, const Handle(StepBasic_LengthMeasureWithUnit) &theUnitSize) { diff --git a/src/StepDimTol/StepDimTol_GeometricToleranceWithDefinedUnit.hxx b/src/StepDimTol/StepDimTol_GeometricToleranceWithDefinedUnit.hxx index b990cb03ae..1787898796 100644 --- a/src/StepDimTol/StepDimTol_GeometricToleranceWithDefinedUnit.hxx +++ b/src/StepDimTol/StepDimTol_GeometricToleranceWithDefinedUnit.hxx @@ -23,7 +23,6 @@ class StepBasic_LengthMeasureWithUnit; class TCollection_HAsciiString; -class StepBasic_MeasureWithUnit; class StepDimTol_GeometricToleranceTarget; class StepRepr_ShapeAspect; @@ -39,10 +38,18 @@ public: Standard_EXPORT StepDimTol_GeometricToleranceWithDefinedUnit(); //! Initialize all fields (own and inherited) AP214 - Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& theName, const Handle(TCollection_HAsciiString)& theDescription, const Handle(StepBasic_MeasureWithUnit)& theMagnitude, const Handle(StepRepr_ShapeAspect)& theTolerancedShapeAspect, const Handle(StepBasic_LengthMeasureWithUnit)& theUnitSize) ; + Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& theName, + const Handle(TCollection_HAsciiString)& theDescription, + const Handle(Standard_Transient)& theMagnitude, + const Handle(StepRepr_ShapeAspect)& theTolerancedShapeAspect, + const Handle(StepBasic_LengthMeasureWithUnit)& theUnitSize); //! Initialize all fields (own and inherited) AP242 - Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& theName, const Handle(TCollection_HAsciiString)& theDescription, const Handle(StepBasic_MeasureWithUnit)& theMagnitude, const StepDimTol_GeometricToleranceTarget& theTolerancedShapeAspect, const Handle(StepBasic_LengthMeasureWithUnit)& theUnitSize) ; + Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& theName, + const Handle(TCollection_HAsciiString)& theDescription, + const Handle(Standard_Transient)& theMagnitude, + const StepDimTol_GeometricToleranceTarget& theTolerancedShapeAspect, + const Handle(StepBasic_LengthMeasureWithUnit)& theUnitSize) ; //! Returns field UnitSize inline Handle(StepBasic_LengthMeasureWithUnit) UnitSize () const diff --git a/src/StepDimTol/StepDimTol_GeometricToleranceWithMaximumTolerance.cxx b/src/StepDimTol/StepDimTol_GeometricToleranceWithMaximumTolerance.cxx index 498faf79f5..1fdc1c925b 100644 --- a/src/StepDimTol/StepDimTol_GeometricToleranceWithMaximumTolerance.cxx +++ b/src/StepDimTol/StepDimTol_GeometricToleranceWithMaximumTolerance.cxx @@ -37,7 +37,7 @@ StepDimTol_GeometricToleranceWithMaximumTolerance::StepDimTol_GeometricTolerance void StepDimTol_GeometricToleranceWithMaximumTolerance:: Init (const Handle(TCollection_HAsciiString) &theName, const Handle(TCollection_HAsciiString) &theDescription, - const Handle(StepBasic_MeasureWithUnit) &theMagnitude, + const Handle(Standard_Transient)& theMagnitude, const StepDimTol_GeometricToleranceTarget &theTolerancedShapeAspect, const Handle(StepDimTol_HArray1OfGeometricToleranceModifier) &theModifiers, const Handle(StepBasic_LengthMeasureWithUnit) &theMaximumUpperTolerance) diff --git a/src/StepDimTol/StepDimTol_GeometricToleranceWithMaximumTolerance.hxx b/src/StepDimTol/StepDimTol_GeometricToleranceWithMaximumTolerance.hxx index 79f4ad1ba1..8ad515ad6a 100644 --- a/src/StepDimTol/StepDimTol_GeometricToleranceWithMaximumTolerance.hxx +++ b/src/StepDimTol/StepDimTol_GeometricToleranceWithMaximumTolerance.hxx @@ -23,7 +23,6 @@ #include class TCollection_HAsciiString; -class StepBasic_MeasureWithUnit; class StepDimTol_GeometricToleranceTarget; class StepDimTol_HArray1OfGeometricToleranceModifier; @@ -39,7 +38,12 @@ public: Standard_EXPORT StepDimTol_GeometricToleranceWithMaximumTolerance(); //! Initialize all fields (own and inherited) - Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& theName, const Handle(TCollection_HAsciiString)& theDescription, const Handle(StepBasic_MeasureWithUnit)& theMagnitude, const StepDimTol_GeometricToleranceTarget& theTolerancedShapeAspect, const Handle(StepDimTol_HArray1OfGeometricToleranceModifier)& theModifiers, const Handle(StepBasic_LengthMeasureWithUnit)& theUnitSize) ; + Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& theName, + const Handle(TCollection_HAsciiString)& theDescription, + const Handle(Standard_Transient)& theMagnitude, + const StepDimTol_GeometricToleranceTarget& theTolerancedShapeAspect, + const Handle(StepDimTol_HArray1OfGeometricToleranceModifier)& theModifiers, + const Handle(StepBasic_LengthMeasureWithUnit)& theUnitSize) ; //! Returns field MaximumUpperTolerance inline Handle(StepBasic_LengthMeasureWithUnit) MaximumUpperTolerance () const diff --git a/src/StepDimTol/StepDimTol_GeometricToleranceWithModifiers.cxx b/src/StepDimTol/StepDimTol_GeometricToleranceWithModifiers.cxx index ddd197903f..8510d3549a 100644 --- a/src/StepDimTol/StepDimTol_GeometricToleranceWithModifiers.cxx +++ b/src/StepDimTol/StepDimTol_GeometricToleranceWithModifiers.cxx @@ -36,7 +36,7 @@ StepDimTol_GeometricToleranceWithModifiers::StepDimTol_GeometricToleranceWithMod void StepDimTol_GeometricToleranceWithModifiers::Init (const Handle(TCollection_HAsciiString) &theName, const Handle(TCollection_HAsciiString) &theDescription, - const Handle(StepBasic_MeasureWithUnit) &theMagnitude, + const Handle(Standard_Transient)& theMagnitude, const StepDimTol_GeometricToleranceTarget &theTolerancedShapeAspect, const Handle(StepDimTol_HArray1OfGeometricToleranceModifier) &theModifiers) { diff --git a/src/StepDimTol/StepDimTol_GeometricToleranceWithModifiers.hxx b/src/StepDimTol/StepDimTol_GeometricToleranceWithModifiers.hxx index f66d662807..e0e7394009 100644 --- a/src/StepDimTol/StepDimTol_GeometricToleranceWithModifiers.hxx +++ b/src/StepDimTol/StepDimTol_GeometricToleranceWithModifiers.hxx @@ -26,7 +26,6 @@ class StepDimTol_HArray1OfGeometricToleranceModifier; class TCollection_HAsciiString; -class StepBasic_MeasureWithUnit; class StepDimTol_GeometricToleranceTarget; class StepDimTol_GeometricToleranceWithModifiers; @@ -43,7 +42,7 @@ public: //! Initialize all fields (own and inherited) Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& theName, const Handle(TCollection_HAsciiString)& theDescription, - const Handle(StepBasic_MeasureWithUnit)& theMagnitude, + const Handle(Standard_Transient)& theMagnitude, const StepDimTol_GeometricToleranceTarget& theTolerancedShapeAspect, const Handle(StepDimTol_HArray1OfGeometricToleranceModifier)& theModifiers) ; diff --git a/src/StepDimTol/StepDimTol_ModifiedGeometricTolerance.cxx b/src/StepDimTol/StepDimTol_ModifiedGeometricTolerance.cxx index 15543fb670..044ee003af 100644 --- a/src/StepDimTol/StepDimTol_ModifiedGeometricTolerance.cxx +++ b/src/StepDimTol/StepDimTol_ModifiedGeometricTolerance.cxx @@ -15,8 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include -#include #include #include #include @@ -39,7 +37,7 @@ StepDimTol_ModifiedGeometricTolerance::StepDimTol_ModifiedGeometricTolerance () void StepDimTol_ModifiedGeometricTolerance::Init (const Handle(TCollection_HAsciiString) &theGeometricTolerance_Name, const Handle(TCollection_HAsciiString) &theGeometricTolerance_Description, - const Handle(StepBasic_MeasureWithUnit) &theGeometricTolerance_Magnitude, + const Handle(Standard_Transient)& theGeometricTolerance_Magnitude, const Handle(StepRepr_ShapeAspect) &theGeometricTolerance_TolerancedShapeAspect, const StepDimTol_LimitCondition theModifier) { @@ -58,7 +56,7 @@ void StepDimTol_ModifiedGeometricTolerance::Init (const Handle(TCollection_HAsci void StepDimTol_ModifiedGeometricTolerance::Init (const Handle(TCollection_HAsciiString) &theGeometricTolerance_Name, const Handle(TCollection_HAsciiString) &theGeometricTolerance_Description, - const Handle(StepBasic_MeasureWithUnit) &theGeometricTolerance_Magnitude, + const Handle(Standard_Transient)& theGeometricTolerance_Magnitude, const StepDimTol_GeometricToleranceTarget &theGeometricTolerance_TolerancedShapeAspect, const StepDimTol_LimitCondition theModifier) { diff --git a/src/StepDimTol/StepDimTol_ModifiedGeometricTolerance.hxx b/src/StepDimTol/StepDimTol_ModifiedGeometricTolerance.hxx index 80923be07f..17699e2d5b 100644 --- a/src/StepDimTol/StepDimTol_ModifiedGeometricTolerance.hxx +++ b/src/StepDimTol/StepDimTol_ModifiedGeometricTolerance.hxx @@ -22,7 +22,6 @@ #include #include class TCollection_HAsciiString; -class StepBasic_MeasureWithUnit; class StepDimTol_GeometricToleranceTarget; class StepRepr_ShapeAspect; @@ -43,14 +42,14 @@ public: //! Initialize all fields (own and inherited) AP214 Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& theGeometricTolerance_Name, const Handle(TCollection_HAsciiString)& theGeometricTolerance_Description, - const Handle(StepBasic_MeasureWithUnit)& theGeometricTolerance_Magnitude, + const Handle(Standard_Transient)& theGeometricTolerance_Magnitude, const Handle(StepRepr_ShapeAspect)& theGeometricTolerance_TolerancedShapeAspect, const StepDimTol_LimitCondition theModifier); //! Initialize all fields (own and inherited) AP242 Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& theGeometricTolerance_Name, const Handle(TCollection_HAsciiString)& theGeometricTolerance_Description, - const Handle(StepBasic_MeasureWithUnit)& theGeometricTolerance_Magnitude, + const Handle(Standard_Transient)& theGeometricTolerance_Magnitude, const StepDimTol_GeometricToleranceTarget& theGeometricTolerance_TolerancedShapeAspect, const StepDimTol_LimitCondition theModifier); diff --git a/src/StepDimTol/StepDimTol_UnequallyDisposedGeometricTolerance.cxx b/src/StepDimTol/StepDimTol_UnequallyDisposedGeometricTolerance.cxx index 6e749feb20..fde6d10f4b 100644 --- a/src/StepDimTol/StepDimTol_UnequallyDisposedGeometricTolerance.cxx +++ b/src/StepDimTol/StepDimTol_UnequallyDisposedGeometricTolerance.cxx @@ -36,7 +36,7 @@ StepDimTol_UnequallyDisposedGeometricTolerance::StepDimTol_UnequallyDisposedGeom void StepDimTol_UnequallyDisposedGeometricTolerance::Init (const Handle(TCollection_HAsciiString) &theName, const Handle(TCollection_HAsciiString) &theDescription, - const Handle(StepBasic_MeasureWithUnit) &theMagnitude, + const Handle(Standard_Transient)& theMagnitude, const StepDimTol_GeometricToleranceTarget &theTolerancedShapeAspect, const Handle(StepBasic_LengthMeasureWithUnit) &theDisplacement) { diff --git a/src/StepDimTol/StepDimTol_UnequallyDisposedGeometricTolerance.hxx b/src/StepDimTol/StepDimTol_UnequallyDisposedGeometricTolerance.hxx index de9d3d8186..4b4c0c2959 100644 --- a/src/StepDimTol/StepDimTol_UnequallyDisposedGeometricTolerance.hxx +++ b/src/StepDimTol/StepDimTol_UnequallyDisposedGeometricTolerance.hxx @@ -23,7 +23,6 @@ #include class TCollection_HAsciiString; -class StepBasic_MeasureWithUnit; class StepDimTol_GeometricToleranceTarget; class StepDimTol_UnequallyDisposedGeometricTolerance; @@ -38,7 +37,11 @@ public: Standard_EXPORT StepDimTol_UnequallyDisposedGeometricTolerance(); //! Initialize all fields (own and inherited) - Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& theName, const Handle(TCollection_HAsciiString)& theDescription, const Handle(StepBasic_MeasureWithUnit)& theMagnitude, const StepDimTol_GeometricToleranceTarget& theTolerancedShapeAspect, const Handle(StepBasic_LengthMeasureWithUnit)& theDisplacement) ; + Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& theName, + const Handle(TCollection_HAsciiString)& theDescription, + const Handle(Standard_Transient)& theMagnitude, + const StepDimTol_GeometricToleranceTarget& theTolerancedShapeAspect, + const Handle(StepBasic_LengthMeasureWithUnit)& theDisplacement) ; //! Returns field Displacement inline Handle(StepBasic_LengthMeasureWithUnit) Displacement () const diff --git a/src/StepRepr/StepRepr_MakeFromUsageOption.cxx b/src/StepRepr/StepRepr_MakeFromUsageOption.cxx index 2c8b58cc7a..5387648ff8 100644 --- a/src/StepRepr/StepRepr_MakeFromUsageOption.cxx +++ b/src/StepRepr/StepRepr_MakeFromUsageOption.cxx @@ -36,28 +36,28 @@ StepRepr_MakeFromUsageOption::StepRepr_MakeFromUsageOption () //purpose : //======================================================================= -void StepRepr_MakeFromUsageOption::Init (const Handle(TCollection_HAsciiString) &aProductDefinitionRelationship_Id, - const Handle(TCollection_HAsciiString) &aProductDefinitionRelationship_Name, +void StepRepr_MakeFromUsageOption::Init (const Handle(TCollection_HAsciiString)& theProductDefinitionRelationship_Id, + const Handle(TCollection_HAsciiString)& theProductDefinitionRelationship_Name, const Standard_Boolean hasProductDefinitionRelationship_Description, - const Handle(TCollection_HAsciiString) &aProductDefinitionRelationship_Description, - const Handle(StepBasic_ProductDefinition) &aProductDefinitionRelationship_RelatingProductDefinition, - const Handle(StepBasic_ProductDefinition) &aProductDefinitionRelationship_RelatedProductDefinition, - const Standard_Integer aRanking, - const Handle(TCollection_HAsciiString) &aRankingRationale, - const Handle(StepBasic_MeasureWithUnit) &aQuantity) + const Handle(TCollection_HAsciiString)& theProductDefinitionRelationship_Description, + const Handle(StepBasic_ProductDefinition)& theProductDefinitionRelationship_RelatingProductDefinition, + const Handle(StepBasic_ProductDefinition)& theProductDefinitionRelationship_RelatedProductDefinition, + const Standard_Integer theRanking, + const Handle(TCollection_HAsciiString)& theRankingRationale, + const Handle(Standard_Transient)& theQuantity) { - StepRepr_ProductDefinitionUsage::Init(aProductDefinitionRelationship_Id, - aProductDefinitionRelationship_Name, + StepRepr_ProductDefinitionUsage::Init(theProductDefinitionRelationship_Id, + theProductDefinitionRelationship_Name, hasProductDefinitionRelationship_Description, - aProductDefinitionRelationship_Description, - aProductDefinitionRelationship_RelatingProductDefinition, - aProductDefinitionRelationship_RelatedProductDefinition); + theProductDefinitionRelationship_Description, + theProductDefinitionRelationship_RelatingProductDefinition, + theProductDefinitionRelationship_RelatedProductDefinition); - theRanking = aRanking; + myRanking = theRanking; - theRankingRationale = aRankingRationale; + myRankingRationale = theRankingRationale; - theQuantity = aQuantity; + myQuantity = theQuantity; } //======================================================================= @@ -65,28 +65,28 @@ void StepRepr_MakeFromUsageOption::Init (const Handle(TCollection_HAsciiString) //purpose : //======================================================================= -void StepRepr_MakeFromUsageOption::Init (const Handle(TCollection_HAsciiString) &aProductDefinitionRelationship_Id, - const Handle(TCollection_HAsciiString) &aProductDefinitionRelationship_Name, +void StepRepr_MakeFromUsageOption::Init (const Handle(TCollection_HAsciiString)& theProductDefinitionRelationship_Id, + const Handle(TCollection_HAsciiString)& theProductDefinitionRelationship_Name, const Standard_Boolean hasProductDefinitionRelationship_Description, - const Handle(TCollection_HAsciiString) &aProductDefinitionRelationship_Description, - const StepBasic_ProductDefinitionOrReference &aProductDefinitionRelationship_RelatingProductDefinition, - const StepBasic_ProductDefinitionOrReference &aProductDefinitionRelationship_RelatedProductDefinition, - const Standard_Integer aRanking, - const Handle(TCollection_HAsciiString) &aRankingRationale, - const Handle(StepBasic_MeasureWithUnit) &aQuantity) + const Handle(TCollection_HAsciiString)& theProductDefinitionRelationship_Description, + const StepBasic_ProductDefinitionOrReference& theProductDefinitionRelationship_RelatingProductDefinition, + const StepBasic_ProductDefinitionOrReference& theProductDefinitionRelationship_RelatedProductDefinition, + const Standard_Integer theRanking, + const Handle(TCollection_HAsciiString)& theRankingRationale, + const Handle(Standard_Transient)& theQuantity) { - StepRepr_ProductDefinitionUsage::Init(aProductDefinitionRelationship_Id, - aProductDefinitionRelationship_Name, + StepRepr_ProductDefinitionUsage::Init(theProductDefinitionRelationship_Id, + theProductDefinitionRelationship_Name, hasProductDefinitionRelationship_Description, - aProductDefinitionRelationship_Description, - aProductDefinitionRelationship_RelatingProductDefinition, - aProductDefinitionRelationship_RelatedProductDefinition); + theProductDefinitionRelationship_Description, + theProductDefinitionRelationship_RelatingProductDefinition, + theProductDefinitionRelationship_RelatedProductDefinition); - theRanking = aRanking; + myRanking = theRanking; - theRankingRationale = aRankingRationale; + myRankingRationale = theRankingRationale; - theQuantity = aQuantity; + myQuantity = theQuantity; } //======================================================================= @@ -96,7 +96,7 @@ void StepRepr_MakeFromUsageOption::Init (const Handle(TCollection_HAsciiString) Standard_Integer StepRepr_MakeFromUsageOption::Ranking () const { - return theRanking; + return myRanking; } //======================================================================= @@ -104,9 +104,9 @@ Standard_Integer StepRepr_MakeFromUsageOption::Ranking () const //purpose : //======================================================================= -void StepRepr_MakeFromUsageOption::SetRanking (const Standard_Integer aRanking) +void StepRepr_MakeFromUsageOption::SetRanking (const Standard_Integer theRanking) { - theRanking = aRanking; + myRanking = theRanking; } //======================================================================= @@ -116,7 +116,7 @@ void StepRepr_MakeFromUsageOption::SetRanking (const Standard_Integer aRanking) Handle(TCollection_HAsciiString) StepRepr_MakeFromUsageOption::RankingRationale () const { - return theRankingRationale; + return myRankingRationale; } //======================================================================= @@ -124,9 +124,9 @@ Handle(TCollection_HAsciiString) StepRepr_MakeFromUsageOption::RankingRationale //purpose : //======================================================================= -void StepRepr_MakeFromUsageOption::SetRankingRationale (const Handle(TCollection_HAsciiString) &aRankingRationale) +void StepRepr_MakeFromUsageOption::SetRankingRationale (const Handle(TCollection_HAsciiString)& theRankingRationale) { - theRankingRationale = aRankingRationale; + myRankingRationale = theRankingRationale; } //======================================================================= @@ -134,9 +134,9 @@ void StepRepr_MakeFromUsageOption::SetRankingRationale (const Handle(TCollection //purpose : //======================================================================= -Handle(StepBasic_MeasureWithUnit) StepRepr_MakeFromUsageOption::Quantity () const +Handle(Standard_Transient) StepRepr_MakeFromUsageOption::Quantity () const { - return theQuantity; + return myQuantity; } //======================================================================= @@ -144,7 +144,7 @@ Handle(StepBasic_MeasureWithUnit) StepRepr_MakeFromUsageOption::Quantity () cons //purpose : //======================================================================= -void StepRepr_MakeFromUsageOption::SetQuantity (const Handle(StepBasic_MeasureWithUnit) &aQuantity) +void StepRepr_MakeFromUsageOption::SetQuantity (const Handle(Standard_Transient)& theQuantity) { - theQuantity = aQuantity; + myQuantity = theQuantity; } diff --git a/src/StepRepr/StepRepr_MakeFromUsageOption.hxx b/src/StepRepr/StepRepr_MakeFromUsageOption.hxx index 04be16c7e7..30d5d8afe7 100644 --- a/src/StepRepr/StepRepr_MakeFromUsageOption.hxx +++ b/src/StepRepr/StepRepr_MakeFromUsageOption.hxx @@ -23,7 +23,6 @@ #include #include class TCollection_HAsciiString; -class StepBasic_MeasureWithUnit; class StepBasic_ProductDefinition; @@ -41,28 +40,44 @@ public: Standard_EXPORT StepRepr_MakeFromUsageOption(); //! Initialize all fields (own and inherited) - Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& aProductDefinitionRelationship_Id, const Handle(TCollection_HAsciiString)& aProductDefinitionRelationship_Name, const Standard_Boolean hasProductDefinitionRelationship_Description, const Handle(TCollection_HAsciiString)& aProductDefinitionRelationship_Description, const Handle(StepBasic_ProductDefinition)& aProductDefinitionRelationship_RelatingProductDefinition, const Handle(StepBasic_ProductDefinition)& aProductDefinitionRelationship_RelatedProductDefinition, const Standard_Integer aRanking, const Handle(TCollection_HAsciiString)& aRankingRationale, const Handle(StepBasic_MeasureWithUnit)& aQuantity); + Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& theProductDefinitionRelationship_Id, + const Handle(TCollection_HAsciiString)& theProductDefinitionRelationship_Name, + const Standard_Boolean hasProductDefinitionRelationship_Description, + const Handle(TCollection_HAsciiString)& theProductDefinitionRelationship_Description, + const Handle(StepBasic_ProductDefinition)& theProductDefinitionRelationship_RelatingProductDefinition, + const Handle(StepBasic_ProductDefinition)& theProductDefinitionRelationship_RelatedProductDefinition, + const Standard_Integer theRanking, + const Handle(TCollection_HAsciiString)& theRankingRationale, + const Handle(Standard_Transient)& theQuantity); //! Initialize all fields (own and inherited) - Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& aProductDefinitionRelationship_Id, const Handle(TCollection_HAsciiString)& aProductDefinitionRelationship_Name, const Standard_Boolean hasProductDefinitionRelationship_Description, const Handle(TCollection_HAsciiString)& aProductDefinitionRelationship_Description, const StepBasic_ProductDefinitionOrReference& aProductDefinitionRelationship_RelatingProductDefinition, const StepBasic_ProductDefinitionOrReference& aProductDefinitionRelationship_RelatedProductDefinition, const Standard_Integer aRanking, const Handle(TCollection_HAsciiString)& aRankingRationale, const Handle(StepBasic_MeasureWithUnit)& aQuantity); + Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& theProductDefinitionRelationship_Id, + const Handle(TCollection_HAsciiString)& theProductDefinitionRelationship_Name, + const Standard_Boolean hasProductDefinitionRelationship_Description, + const Handle(TCollection_HAsciiString)& theProductDefinitionRelationship_Description, + const StepBasic_ProductDefinitionOrReference& theProductDefinitionRelationship_RelatingProductDefinition, + const StepBasic_ProductDefinitionOrReference& theProductDefinitionRelationship_RelatedProductDefinition, + const Standard_Integer theRanking, + const Handle(TCollection_HAsciiString)& theRankingRationale, + const Handle(Standard_Transient)& theQuantity); //! Returns field Ranking Standard_EXPORT Standard_Integer Ranking() const; //! Set field Ranking - Standard_EXPORT void SetRanking (const Standard_Integer Ranking); + Standard_EXPORT void SetRanking (const Standard_Integer theRanking); //! Returns field RankingRationale Standard_EXPORT Handle(TCollection_HAsciiString) RankingRationale() const; //! Set field RankingRationale - Standard_EXPORT void SetRankingRationale (const Handle(TCollection_HAsciiString)& RankingRationale); + Standard_EXPORT void SetRankingRationale (const Handle(TCollection_HAsciiString)& theRankingRationale); //! Returns field Quantity - Standard_EXPORT Handle(StepBasic_MeasureWithUnit) Quantity() const; + Standard_EXPORT Handle(Standard_Transient) Quantity() const; //! Set field Quantity - Standard_EXPORT void SetQuantity (const Handle(StepBasic_MeasureWithUnit)& Quantity); + Standard_EXPORT void SetQuantity (const Handle(Standard_Transient)& theQuantity); @@ -77,9 +92,9 @@ protected: private: - Standard_Integer theRanking; - Handle(TCollection_HAsciiString) theRankingRationale; - Handle(StepBasic_MeasureWithUnit) theQuantity; + Standard_Integer myRanking; + Handle(TCollection_HAsciiString) myRankingRationale; + Handle(Standard_Transient) myQuantity; }; diff --git a/src/StepRepr/StepRepr_ParallelOffset.cxx b/src/StepRepr/StepRepr_ParallelOffset.cxx index d6ab382242..dcc7fcacfe 100644 --- a/src/StepRepr/StepRepr_ParallelOffset.cxx +++ b/src/StepRepr/StepRepr_ParallelOffset.cxx @@ -24,17 +24,16 @@ StepRepr_ParallelOffset::StepRepr_ParallelOffset () { } //purpose : //======================================================================= -void StepRepr_ParallelOffset::Init( - const Handle(TCollection_HAsciiString)& theShapeAspect_Name, - const Handle(TCollection_HAsciiString)& theShapeAspect_Description, - const Handle(StepRepr_ProductDefinitionShape)& theShapeAspect_OfShape, - const StepData_Logical theShapeAspect_ProductDefinitional, - const Handle(StepBasic_MeasureWithUnit) &theOffset) +void StepRepr_ParallelOffset::Init(const Handle(TCollection_HAsciiString)& theShapeAspect_Name, + const Handle(TCollection_HAsciiString)& theShapeAspect_Description, + const Handle(StepRepr_ProductDefinitionShape)& theShapeAspect_OfShape, + const StepData_Logical theShapeAspect_ProductDefinitional, + const Handle(Standard_Transient)& theOffset) { StepRepr_ShapeAspect::Init(theShapeAspect_Name, theShapeAspect_Description, theShapeAspect_OfShape, theShapeAspect_ProductDefinitional); - offset = theOffset; + myOffset = theOffset; } diff --git a/src/StepRepr/StepRepr_ParallelOffset.hxx b/src/StepRepr/StepRepr_ParallelOffset.hxx index e261980431..41693df59d 100644 --- a/src/StepRepr/StepRepr_ParallelOffset.hxx +++ b/src/StepRepr/StepRepr_ParallelOffset.hxx @@ -21,7 +21,7 @@ #include #include -class StepBasic_MeasureWithUnit; + class TCollection_HAsciiString; class StepRepr_ProductDefinitionShape; @@ -36,23 +36,27 @@ public: Standard_EXPORT StepRepr_ParallelOffset(); //! Initialize all fields (own and inherited) - Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& theName, const Handle(TCollection_HAsciiString)& theDescription, const Handle(StepRepr_ProductDefinitionShape)& theOfShape, const StepData_Logical theProductDefinitional, const Handle(StepBasic_MeasureWithUnit)& theOffset) ; + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theName, + const Handle(TCollection_HAsciiString)& theDescription, + const Handle(StepRepr_ProductDefinitionShape)& theOfShape, + const StepData_Logical theProductDefinitional, + const Handle(Standard_Transient)& theOffset) ; //! Returns field Offset - inline Handle(StepBasic_MeasureWithUnit) Offset () const + inline Handle(Standard_Transient) Offset () const { - return offset; + return myOffset; } //! Set field Offset - inline void SetOffset (const Handle(StepBasic_MeasureWithUnit)& theOffset) + inline void SetOffset (const Handle(Standard_Transient)& theOffset) { - offset = theOffset; + myOffset = theOffset; } DEFINE_STANDARD_RTTIEXT(StepRepr_ParallelOffset,StepRepr_DerivedShapeAspect) private: - Handle(StepBasic_MeasureWithUnit) offset; + Handle(Standard_Transient) myOffset; }; #endif // _StepRepr_ParallelOffset_HeaderFile diff --git a/src/StepRepr/StepRepr_QuantifiedAssemblyComponentUsage.cxx b/src/StepRepr/StepRepr_QuantifiedAssemblyComponentUsage.cxx index 9e760ea96b..6bbefe4051 100644 --- a/src/StepRepr/StepRepr_QuantifiedAssemblyComponentUsage.cxx +++ b/src/StepRepr/StepRepr_QuantifiedAssemblyComponentUsage.cxx @@ -15,8 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include -#include #include #include #include @@ -36,26 +34,26 @@ StepRepr_QuantifiedAssemblyComponentUsage::StepRepr_QuantifiedAssemblyComponentU //purpose : //======================================================================= -void StepRepr_QuantifiedAssemblyComponentUsage::Init (const Handle(TCollection_HAsciiString) &aProductDefinitionRelationship_Id, - const Handle(TCollection_HAsciiString) &aProductDefinitionRelationship_Name, +void StepRepr_QuantifiedAssemblyComponentUsage::Init (const Handle(TCollection_HAsciiString)& theProductDefinitionRelationship_Id, + const Handle(TCollection_HAsciiString)& theProductDefinitionRelationship_Name, const Standard_Boolean hasProductDefinitionRelationship_Description, - const Handle(TCollection_HAsciiString) &aProductDefinitionRelationship_Description, - const Handle(StepBasic_ProductDefinition) &aProductDefinitionRelationship_RelatingProductDefinition, - const Handle(StepBasic_ProductDefinition) &aProductDefinitionRelationship_RelatedProductDefinition, + const Handle(TCollection_HAsciiString)& theProductDefinitionRelationship_Description, + const Handle(StepBasic_ProductDefinition)& theProductDefinitionRelationship_RelatingProductDefinition, + const Handle(StepBasic_ProductDefinition)& theProductDefinitionRelationship_RelatedProductDefinition, const Standard_Boolean hasAssemblyComponentUsage_ReferenceDesignator, - const Handle(TCollection_HAsciiString) &aAssemblyComponentUsage_ReferenceDesignator, - const Handle(StepBasic_MeasureWithUnit) &aQuantity) + const Handle(TCollection_HAsciiString)& theAssemblyComponentUsage_ReferenceDesignator, + const Handle(Standard_Transient)& theQuantity) { - StepRepr_AssemblyComponentUsage::Init(aProductDefinitionRelationship_Id, - aProductDefinitionRelationship_Name, + StepRepr_AssemblyComponentUsage::Init(theProductDefinitionRelationship_Id, + theProductDefinitionRelationship_Name, hasProductDefinitionRelationship_Description, - aProductDefinitionRelationship_Description, - aProductDefinitionRelationship_RelatingProductDefinition, - aProductDefinitionRelationship_RelatedProductDefinition, + theProductDefinitionRelationship_Description, + theProductDefinitionRelationship_RelatingProductDefinition, + theProductDefinitionRelationship_RelatedProductDefinition, hasAssemblyComponentUsage_ReferenceDesignator, - aAssemblyComponentUsage_ReferenceDesignator); + theAssemblyComponentUsage_ReferenceDesignator); - theQuantity = aQuantity; + myQuantity = theQuantity; } //======================================================================= @@ -63,26 +61,26 @@ void StepRepr_QuantifiedAssemblyComponentUsage::Init (const Handle(TCollection_H //purpose : //======================================================================= -void StepRepr_QuantifiedAssemblyComponentUsage::Init (const Handle(TCollection_HAsciiString) &aProductDefinitionRelationship_Id, - const Handle(TCollection_HAsciiString) &aProductDefinitionRelationship_Name, +void StepRepr_QuantifiedAssemblyComponentUsage::Init (const Handle(TCollection_HAsciiString)& theProductDefinitionRelationship_Id, + const Handle(TCollection_HAsciiString)& theProductDefinitionRelationship_Name, const Standard_Boolean hasProductDefinitionRelationship_Description, - const Handle(TCollection_HAsciiString) &aProductDefinitionRelationship_Description, - const StepBasic_ProductDefinitionOrReference &aProductDefinitionRelationship_RelatingProductDefinition, - const StepBasic_ProductDefinitionOrReference &aProductDefinitionRelationship_RelatedProductDefinition, + const Handle(TCollection_HAsciiString)& theProductDefinitionRelationship_Description, + const StepBasic_ProductDefinitionOrReference& theProductDefinitionRelationship_RelatingProductDefinition, + const StepBasic_ProductDefinitionOrReference& theProductDefinitionRelationship_RelatedProductDefinition, const Standard_Boolean hasAssemblyComponentUsage_ReferenceDesignator, - const Handle(TCollection_HAsciiString) &aAssemblyComponentUsage_ReferenceDesignator, - const Handle(StepBasic_MeasureWithUnit) &aQuantity) + const Handle(TCollection_HAsciiString)& theAssemblyComponentUsage_ReferenceDesignator, + const Handle(Standard_Transient)& theQuantity) { - StepRepr_AssemblyComponentUsage::Init(aProductDefinitionRelationship_Id, - aProductDefinitionRelationship_Name, + StepRepr_AssemblyComponentUsage::Init(theProductDefinitionRelationship_Id, + theProductDefinitionRelationship_Name, hasProductDefinitionRelationship_Description, - aProductDefinitionRelationship_Description, - aProductDefinitionRelationship_RelatingProductDefinition, - aProductDefinitionRelationship_RelatedProductDefinition, + theProductDefinitionRelationship_Description, + theProductDefinitionRelationship_RelatingProductDefinition, + theProductDefinitionRelationship_RelatedProductDefinition, hasAssemblyComponentUsage_ReferenceDesignator, - aAssemblyComponentUsage_ReferenceDesignator); + theAssemblyComponentUsage_ReferenceDesignator); - theQuantity = aQuantity; + myQuantity = theQuantity; } //======================================================================= @@ -90,9 +88,9 @@ void StepRepr_QuantifiedAssemblyComponentUsage::Init (const Handle(TCollection_H //purpose : //======================================================================= -Handle(StepBasic_MeasureWithUnit) StepRepr_QuantifiedAssemblyComponentUsage::Quantity () const +Handle(Standard_Transient) StepRepr_QuantifiedAssemblyComponentUsage::Quantity () const { - return theQuantity; + return myQuantity; } //======================================================================= @@ -100,7 +98,7 @@ Handle(StepBasic_MeasureWithUnit) StepRepr_QuantifiedAssemblyComponentUsage::Qua //purpose : //======================================================================= -void StepRepr_QuantifiedAssemblyComponentUsage::SetQuantity (const Handle(StepBasic_MeasureWithUnit) &aQuantity) +void StepRepr_QuantifiedAssemblyComponentUsage::SetQuantity (const Handle(Standard_Transient)& theQuantity) { - theQuantity = aQuantity; + myQuantity = theQuantity; } diff --git a/src/StepRepr/StepRepr_QuantifiedAssemblyComponentUsage.hxx b/src/StepRepr/StepRepr_QuantifiedAssemblyComponentUsage.hxx index 7d93d5ea8d..a32e0ddb61 100644 --- a/src/StepRepr/StepRepr_QuantifiedAssemblyComponentUsage.hxx +++ b/src/StepRepr/StepRepr_QuantifiedAssemblyComponentUsage.hxx @@ -20,8 +20,7 @@ #include #include -#include -class StepBasic_MeasureWithUnit; + class TCollection_HAsciiString; class StepBasic_ProductDefinition; @@ -40,16 +39,32 @@ public: Standard_EXPORT StepRepr_QuantifiedAssemblyComponentUsage(); //! Initialize all fields (own and inherited) - Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& aProductDefinitionRelationship_Id, const Handle(TCollection_HAsciiString)& aProductDefinitionRelationship_Name, const Standard_Boolean hasProductDefinitionRelationship_Description, const Handle(TCollection_HAsciiString)& aProductDefinitionRelationship_Description, const Handle(StepBasic_ProductDefinition)& aProductDefinitionRelationship_RelatingProductDefinition, const Handle(StepBasic_ProductDefinition)& aProductDefinitionRelationship_RelatedProductDefinition, const Standard_Boolean hasAssemblyComponentUsage_ReferenceDesignator, const Handle(TCollection_HAsciiString)& aAssemblyComponentUsage_ReferenceDesignator, const Handle(StepBasic_MeasureWithUnit)& aQuantity); + Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& theProductDefinitionRelationship_Id, + const Handle(TCollection_HAsciiString)& theProductDefinitionRelationship_Name, + const Standard_Boolean hasProductDefinitionRelationship_Description, + const Handle(TCollection_HAsciiString)& theProductDefinitionRelationship_Description, + const Handle(StepBasic_ProductDefinition)& theProductDefinitionRelationship_RelatingProductDefinition, + const Handle(StepBasic_ProductDefinition)& theProductDefinitionRelationship_RelatedProductDefinition, + const Standard_Boolean hasAssemblyComponentUsage_ReferenceDesignator, + const Handle(TCollection_HAsciiString)& theAssemblyComponentUsage_ReferenceDesignator, + const Handle(Standard_Transient)& theQuantity); //! Initialize all fields (own and inherited) - Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& aProductDefinitionRelationship_Id, const Handle(TCollection_HAsciiString)& aProductDefinitionRelationship_Name, const Standard_Boolean hasProductDefinitionRelationship_Description, const Handle(TCollection_HAsciiString)& aProductDefinitionRelationship_Description, const StepBasic_ProductDefinitionOrReference& aProductDefinitionRelationship_RelatingProductDefinition, const StepBasic_ProductDefinitionOrReference& aProductDefinitionRelationship_RelatedProductDefinition, const Standard_Boolean hasAssemblyComponentUsage_ReferenceDesignator, const Handle(TCollection_HAsciiString)& aAssemblyComponentUsage_ReferenceDesignator, const Handle(StepBasic_MeasureWithUnit)& aQuantity); + Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& theProductDefinitionRelationship_Id, + const Handle(TCollection_HAsciiString)& theProductDefinitionRelationship_Name, + const Standard_Boolean hasProductDefinitionRelationship_Description, + const Handle(TCollection_HAsciiString)& theProductDefinitionRelationship_Description, + const StepBasic_ProductDefinitionOrReference& theProductDefinitionRelationship_RelatingProductDefinition, + const StepBasic_ProductDefinitionOrReference& theProductDefinitionRelationship_RelatedProductDefinition, + const Standard_Boolean hasAssemblyComponentUsage_ReferenceDesignator, + const Handle(TCollection_HAsciiString)& theAssemblyComponentUsage_ReferenceDesignator, + const Handle(Standard_Transient)& theQuantity); //! Returns field Quantity - Standard_EXPORT Handle(StepBasic_MeasureWithUnit) Quantity() const; + Standard_EXPORT Handle(Standard_Transient) Quantity() const; //! Set field Quantity - Standard_EXPORT void SetQuantity (const Handle(StepBasic_MeasureWithUnit)& Quantity); + Standard_EXPORT void SetQuantity (const Handle(Standard_Transient)& theQuantity); @@ -64,7 +79,7 @@ protected: private: - Handle(StepBasic_MeasureWithUnit) theQuantity; + Handle(Standard_Transient) myQuantity; }; diff --git a/src/StepShape/StepShape_MeasureQualification.cxx b/src/StepShape/StepShape_MeasureQualification.cxx index 5d01a1529b..bda799fe83 100644 --- a/src/StepShape/StepShape_MeasureQualification.cxx +++ b/src/StepShape/StepShape_MeasureQualification.cxx @@ -22,53 +22,68 @@ IMPLEMENT_STANDARD_RTTIEXT(StepShape_MeasureQualification,Standard_Transient) StepShape_MeasureQualification::StepShape_MeasureQualification () { } -void StepShape_MeasureQualification::Init - (const Handle(TCollection_HAsciiString)& name, - const Handle(TCollection_HAsciiString)& description, - const Handle(StepBasic_MeasureWithUnit)& qualified_measure, - const Handle(StepShape_HArray1OfValueQualifier)& qualifiers) +void StepShape_MeasureQualification::Init(const Handle(TCollection_HAsciiString)& theName, + const Handle(TCollection_HAsciiString)& theDescription, + const Handle(Standard_Transient)& theQualifiedMeasure, + const Handle(StepShape_HArray1OfValueQualifier)& theQualifiers) { - theName = name; - theDescription = description; - theQualifiedMeasure = qualified_measure; - theQualifiers = qualifiers; + myName = theName; + myDescription = theDescription; + myQualifiedMeasure = theQualifiedMeasure; + myQualifiers = theQualifiers; } Handle(TCollection_HAsciiString) StepShape_MeasureQualification::Name () const -{ return theName; } +{ + return myName; +} -void StepShape_MeasureQualification::SetName - (const Handle(TCollection_HAsciiString)& name) -{ theName = name; } +void StepShape_MeasureQualification::SetName(const Handle(TCollection_HAsciiString)& theName) +{ + myName = theName; +} Handle(TCollection_HAsciiString) StepShape_MeasureQualification::Description () const -{ return theDescription; } +{ + return myDescription; +} -void StepShape_MeasureQualification::SetDescription - (const Handle(TCollection_HAsciiString)& description) -{ theDescription = description; } +void StepShape_MeasureQualification::SetDescription(const Handle(TCollection_HAsciiString)& theDescription) +{ + myDescription = theDescription; +} -Handle(StepBasic_MeasureWithUnit) StepShape_MeasureQualification::QualifiedMeasure () const -{ return theQualifiedMeasure; } +Handle(Standard_Transient) StepShape_MeasureQualification::QualifiedMeasure () const +{ + return myQualifiedMeasure; +} -void StepShape_MeasureQualification::SetQualifiedMeasure - (const Handle(StepBasic_MeasureWithUnit)& qualified_measure) -{ theQualifiedMeasure = qualified_measure; } +void StepShape_MeasureQualification::SetQualifiedMeasure(const Handle(Standard_Transient)& theQualifiedMeasure) +{ + myQualifiedMeasure = theQualifiedMeasure; +} Handle(StepShape_HArray1OfValueQualifier) StepShape_MeasureQualification::Qualifiers () const -{ return theQualifiers; } +{ + return myQualifiers; +} Standard_Integer StepShape_MeasureQualification::NbQualifiers () const -{ return theQualifiers->Length(); } +{ + return myQualifiers->Length(); +} -void StepShape_MeasureQualification::SetQualifiers - (const Handle(StepShape_HArray1OfValueQualifier)& qualifiers) -{ theQualifiers = qualifiers; } +void StepShape_MeasureQualification::SetQualifiers(const Handle(StepShape_HArray1OfValueQualifier)& theQualifiers) +{ + myQualifiers = theQualifiers; +} -StepShape_ValueQualifier StepShape_MeasureQualification::QualifiersValue - (const Standard_Integer num) const -{ return theQualifiers->Value(num); } +StepShape_ValueQualifier StepShape_MeasureQualification::QualifiersValue(const Standard_Integer theNum) const +{ + return myQualifiers->Value(theNum); +} -void StepShape_MeasureQualification::SetQualifiersValue - (const Standard_Integer num, const StepShape_ValueQualifier& aqualifier) -{ theQualifiers->SetValue (num,aqualifier); } +void StepShape_MeasureQualification::SetQualifiersValue(const Standard_Integer theNum, const StepShape_ValueQualifier& theQualifier) +{ + myQualifiers->SetValue(theNum, theQualifier); +} diff --git a/src/StepShape/StepShape_MeasureQualification.hxx b/src/StepShape/StepShape_MeasureQualification.hxx index bbb288a53d..8954d55c56 100644 --- a/src/StepShape/StepShape_MeasureQualification.hxx +++ b/src/StepShape/StepShape_MeasureQualification.hxx @@ -23,7 +23,6 @@ #include #include class TCollection_HAsciiString; -class StepBasic_MeasureWithUnit; class StepShape_ValueQualifier; @@ -39,29 +38,32 @@ public: Standard_EXPORT StepShape_MeasureQualification(); - Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& name, const Handle(TCollection_HAsciiString)& description, const Handle(StepBasic_MeasureWithUnit)& qualified_measure, const Handle(StepShape_HArray1OfValueQualifier)& qualifiers); + Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& theName, + const Handle(TCollection_HAsciiString)& theDescription, + const Handle(Standard_Transient)& theQualifiedMeasure, + const Handle(StepShape_HArray1OfValueQualifier)& theQualifiers); Standard_EXPORT Handle(TCollection_HAsciiString) Name() const; - Standard_EXPORT void SetName (const Handle(TCollection_HAsciiString)& name); + Standard_EXPORT void SetName (const Handle(TCollection_HAsciiString)& theName); Standard_EXPORT Handle(TCollection_HAsciiString) Description() const; - Standard_EXPORT void SetDescription (const Handle(TCollection_HAsciiString)& description); + Standard_EXPORT void SetDescription (const Handle(TCollection_HAsciiString)& theDescription); - Standard_EXPORT Handle(StepBasic_MeasureWithUnit) QualifiedMeasure() const; + Standard_EXPORT Handle(Standard_Transient) QualifiedMeasure() const; - Standard_EXPORT void SetQualifiedMeasure (const Handle(StepBasic_MeasureWithUnit)& qualified_measure); + Standard_EXPORT void SetQualifiedMeasure (const Handle(Standard_Transient)& theQualifiedMeasure); Standard_EXPORT Handle(StepShape_HArray1OfValueQualifier) Qualifiers() const; Standard_EXPORT Standard_Integer NbQualifiers() const; - Standard_EXPORT void SetQualifiers (const Handle(StepShape_HArray1OfValueQualifier)& qualifiers); + Standard_EXPORT void SetQualifiers (const Handle(StepShape_HArray1OfValueQualifier)& theQualifiers); - Standard_EXPORT StepShape_ValueQualifier QualifiersValue (const Standard_Integer num) const; + Standard_EXPORT StepShape_ValueQualifier QualifiersValue (const Standard_Integer theNum) const; - Standard_EXPORT void SetQualifiersValue (const Standard_Integer num, const StepShape_ValueQualifier& aqualifier); + Standard_EXPORT void SetQualifiersValue (const Standard_Integer theNum, const StepShape_ValueQualifier& theQualifier); @@ -76,10 +78,10 @@ protected: private: - Handle(TCollection_HAsciiString) theName; - Handle(TCollection_HAsciiString) theDescription; - Handle(StepBasic_MeasureWithUnit) theQualifiedMeasure; - Handle(StepShape_HArray1OfValueQualifier) theQualifiers; + Handle(TCollection_HAsciiString) myName; + Handle(TCollection_HAsciiString) myDescription; + Handle(Standard_Transient) myQualifiedMeasure; + Handle(StepShape_HArray1OfValueQualifier) myQualifiers; }; diff --git a/src/StepShape/StepShape_ToleranceValue.cxx b/src/StepShape/StepShape_ToleranceValue.cxx index dee367d7d8..d4cb75d16c 100644 --- a/src/StepShape/StepShape_ToleranceValue.cxx +++ b/src/StepShape/StepShape_ToleranceValue.cxx @@ -12,8 +12,6 @@ // commercial license or contractual agreement. -#include -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepShape_ToleranceValue,Standard_Transient) diff --git a/src/StepToTopoDS/FILES b/src/StepToTopoDS/FILES index 9b1333e256..26c27041ad 100644 --- a/src/StepToTopoDS/FILES +++ b/src/StepToTopoDS/FILES @@ -51,6 +51,9 @@ StepToTopoDS_TranslatePolyLoopError.hxx StepToTopoDS_TranslateShell.cxx StepToTopoDS_TranslateShell.hxx StepToTopoDS_TranslateShellError.hxx +StepToTopoDS_TranslateSolid.cxx +StepToTopoDS_TranslateSolid.hxx +StepToTopoDS_TranslateSolidError.hxx StepToTopoDS_TranslateVertex.cxx StepToTopoDS_TranslateVertex.hxx StepToTopoDS_TranslateVertexError.hxx diff --git a/src/StepToTopoDS/StepToTopoDS_Builder.cxx b/src/StepToTopoDS/StepToTopoDS_Builder.cxx index 1fcbc6607d..1bd869f585 100644 --- a/src/StepToTopoDS/StepToTopoDS_Builder.cxx +++ b/src/StepToTopoDS/StepToTopoDS_Builder.cxx @@ -66,6 +66,9 @@ #include #include #include +#include +#include +#include #include #include #include @@ -76,6 +79,7 @@ #include #include #include +#include #include #include #include @@ -805,6 +809,120 @@ void StepToTopoDS_Builder::Init } // ***end DTH Apr/6 +// ============================================================================ +// Method : StepToTopoDS_Builder::Init +// Purpose : Builds a TopoDS_Solid from StepVisual_TessellatedSolid +// ============================================================================ + +void StepToTopoDS_Builder::Init(const Handle(StepVisual_TessellatedSolid)& theTSo, + const Handle(Transfer_TransientProcess)& theTP, + const Standard_Boolean theReadTessellatedWhenNoBRepOnly, + Standard_Boolean& theHasGeom, + const Message_ProgressRange& theProgress) +{ + StepToTopoDS_TranslateSolid aTranSolid; + aTranSolid.SetPrecision(Precision()); + aTranSolid.SetMaxTol(MaxTol()); + + StepToTopoDS_Tool aTool; + StepToTopoDS_DataMapOfTRI aMap; + aTool.Init(aMap, theTP); + + StepToTopoDS_NMTool dummyNMTool; + aTranSolid.Init(theTSo, theTP, aTool, dummyNMTool, theReadTessellatedWhenNoBRepOnly, + theHasGeom, theProgress); + + if (aTranSolid.IsDone()) + { + TopoDS_Shape aS = aTranSolid.Value(); + TransferBRep::SetShapeResult(theTP, theTSo, aS); + myResult = TopoDS::Solid(aS); + myError = StepToTopoDS_BuilderDone; + done = Standard_True; + } + else + { + theTP->AddWarning(theTSo, " TessellatedSolid not mapped to TopoDS"); + myError = StepToTopoDS_BuilderOther; + done = Standard_True; + } +} + +// ============================================================================ +// Method : StepToTopoDS_Builder::Init +// Purpose : Builds a TopoDS_Shell from StepVisual_TessellatedShell +// ============================================================================ + +void StepToTopoDS_Builder::Init(const Handle(StepVisual_TessellatedShell)& theTSh, + const Handle(Transfer_TransientProcess)& theTP, + const Standard_Boolean theReadTessellatedWhenNoBRepOnly, + Standard_Boolean& theHasGeom, + const Message_ProgressRange& theProgress) +{ + StepToTopoDS_TranslateShell aTranShell; + aTranShell.SetPrecision(Precision()); + aTranShell.SetMaxTol(MaxTol()); + + StepToTopoDS_Tool aTool; + StepToTopoDS_DataMapOfTRI aMap; + aTool.Init(aMap, theTP); + + StepToTopoDS_NMTool dummyNMTool; + aTranShell.Init(theTSh, aTool, dummyNMTool, theReadTessellatedWhenNoBRepOnly, + theHasGeom, theProgress); + + if (aTranShell.IsDone()) + { + TopoDS_Shape aS = aTranShell.Value(); + TransferBRep::SetShapeResult(theTP, theTSh, aS); + myResult = TopoDS::Shell(aS); + myError = StepToTopoDS_BuilderDone; + done = Standard_True; + } + else + { + theTP->AddWarning(theTSh, " TessellatedShell not mapped to TopoDS"); + myError = StepToTopoDS_BuilderOther; + done = Standard_True; + } +} + +// ============================================================================ +// Method : StepToTopoDS_Builder::Init +// Purpose : Builds a TopoDS_Face from StepVisual_TessellatedFace +// ============================================================================ + +void StepToTopoDS_Builder::Init(const Handle(StepVisual_TessellatedFace)& theTF, + const Handle(Transfer_TransientProcess)& theTP, + const Standard_Boolean theReadTessellatedWhenNoBRepOnly, + Standard_Boolean& theHasGeom) +{ + StepToTopoDS_TranslateFace aTranFace; + aTranFace.SetPrecision(Precision()); + aTranFace.SetMaxTol(MaxTol()); + + StepToTopoDS_Tool aTool; + StepToTopoDS_DataMapOfTRI aMap; + aTool.Init(aMap, theTP); + + StepToTopoDS_NMTool dummyNMTool; + aTranFace.Init(theTF, aTool, dummyNMTool, theReadTessellatedWhenNoBRepOnly, theHasGeom); + + if (aTranFace.IsDone()) + { + TopoDS_Shape aS = aTranFace.Value(); + TransferBRep::SetShapeResult(theTP, theTF, aS); + myResult = TopoDS::Face(aS); + myError = StepToTopoDS_BuilderDone; + done = Standard_True; + } + else + { + theTP->AddWarning(theTF, " TessellatedFace not mapped to TopoDS"); + myError = StepToTopoDS_BuilderOther; + done = Standard_True; + } +} // ============================================================================ // Method : Value diff --git a/src/StepToTopoDS/StepToTopoDS_Builder.hxx b/src/StepToTopoDS/StepToTopoDS_Builder.hxx index 0481052920..af13f0b441 100644 --- a/src/StepToTopoDS/StepToTopoDS_Builder.hxx +++ b/src/StepToTopoDS/StepToTopoDS_Builder.hxx @@ -38,6 +38,9 @@ class StepToTopoDS_NMTool; class StepShape_GeometricSet; class StepShape_EdgeBasedWireframeModel; class StepShape_FaceBasedSurfaceModel; +class StepVisual_TessellatedFace; +class StepVisual_TessellatedShell; +class StepVisual_TessellatedSolid; class Transfer_ActorOfTransientProcess; class TopoDS_Shape; @@ -85,6 +88,23 @@ public: const Standard_Boolean isManifold = Standard_False, const Message_ProgressRange& theProgress = Message_ProgressRange()); + Standard_EXPORT void Init (const Handle(StepVisual_TessellatedSolid)& theTSo, + const Handle(Transfer_TransientProcess)& theTP, + const Standard_Boolean theReadTessellatedWhenNoBRepOnly, + Standard_Boolean& theHasGeom, + const Message_ProgressRange& theProgress = Message_ProgressRange()); + + Standard_EXPORT void Init (const Handle(StepVisual_TessellatedShell)& theTSh, + const Handle(Transfer_TransientProcess)& theTP, + const Standard_Boolean theReadTessellatedWhenNoBRepOnly, + Standard_Boolean& theHasGeom, + const Message_ProgressRange& theProgress = Message_ProgressRange()); + + Standard_EXPORT void Init (const Handle(StepVisual_TessellatedFace)& theTF, + const Handle(Transfer_TransientProcess)& theTP, + const Standard_Boolean theReadTessellatedWhenNoBRepOnly, + Standard_Boolean& theHasGeom); + Standard_EXPORT const TopoDS_Shape& Value() const; Standard_EXPORT StepToTopoDS_BuilderError Error() const; diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateFace.cxx b/src/StepToTopoDS/StepToTopoDS_TranslateFace.cxx index 6dbd42ce36..78181a1275 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateFace.cxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateFace.cxx @@ -42,6 +42,7 @@ #include #include #include +#include #include #include #include @@ -78,8 +79,11 @@ #include #include #include +#include #include #include +#include +#include //#3 rln 16/02/98 //#include @@ -112,6 +116,21 @@ StepToTopoDS_TranslateFace::StepToTopoDS_TranslateFace Init(FS, T, NMTool); } +// ============================================================================ +// Method : StepToTopoDS_TranslateFace::StepToTopoDS_TranslateFace +// Purpose : Constructor with either TriangulatedFace or +// ComplexTriangulatedFace and a Tool +// ============================================================================ + +StepToTopoDS_TranslateFace::StepToTopoDS_TranslateFace(const Handle(StepVisual_TessellatedFace)& theTF, + StepToTopoDS_Tool& theTool, + StepToTopoDS_NMTool& theNMTool, + const Standard_Boolean theReadTessellatedWhenNoBRepOnly, + Standard_Boolean& theHasGeom) +{ + Init(theTF, theTool, theNMTool, theReadTessellatedWhenNoBRepOnly, theHasGeom); +} + // ============================================================================ // Method : Init // Purpose : Init with a FaceSurface and a Tool @@ -373,6 +392,237 @@ void StepToTopoDS_TranslateFace::Init done = Standard_True; } +// ============================================================================ +// Method : Init +// Purpose : Init with either StepVisual_TriangulatedFace or +// StepVisual_ComplexTriangulatedFace and a Tool +// ============================================================================ + +void StepToTopoDS_TranslateFace::Init(const Handle(StepVisual_TessellatedFace)& theTF, + StepToTopoDS_Tool& theTool, + StepToTopoDS_NMTool& theNMTool, + const Standard_Boolean theReadTessellatedWhenNoBRepOnly, + Standard_Boolean& theHasGeom) +{ + if (theTF.IsNull()) + return; + + Handle(Transfer_TransientProcess) aTP = theTool.TransientProcess(); + + BRep_Builder aB; + TopoDS_Face aF; + + if (theTF->HasGeometricLink()) + { + Handle(TransferBRep_ShapeBinder) aBinder + = Handle(TransferBRep_ShapeBinder)::DownCast(aTP->Find(theTF->GeometricLink().Face())); + if (aBinder) + { + aF = aBinder->Face(); + theHasGeom = Standard_True; + } + if (!aF.IsNull() && !BRep_Tool::Surface(aF).IsNull() && theReadTessellatedWhenNoBRepOnly) + { + // Face has BRep but OnNoBRep param is specified + return; + } + } + + if (aF.IsNull()) + { + aB.MakeFace(aF); + theHasGeom = Standard_False; + } + + Handle(Poly_Triangulation) aMesh; + if (DeclareAndCast(StepVisual_TriangulatedFace, aTriaF, theTF)) + { + aMesh = createMesh(aTriaF); + } + else if (DeclareAndCast(StepVisual_ComplexTriangulatedFace, aCompTriaF, theTF)) + { + aMesh = createMesh(aCompTriaF); + } + else + { + aTP->AddWarning(theTF, " Triangulated or ComplexTriangulated entity is supported only."); + return; + } + + if (aMesh.IsNull()) + { + aTP->AddWarning(theTF, " Poly triangulation is not set to TopoDS face."); + return; + } + + aB.UpdateFace(aF, aMesh); + + if (theNMTool.IsActive()) + theNMTool.Bind(theTF, aF); + + myResult = aF; + myError = StepToTopoDS_TranslateFaceDone; + done = Standard_True; +} + +// ============================================================================ +// Method : createMesh +// Purpose : creates a Poly_Triangulation from TriangulatedFace +// ============================================================================ + +Handle(Poly_Triangulation) +StepToTopoDS_TranslateFace::createMesh(const Handle(StepVisual_TriangulatedFace)& theTF) const +{ + Handle(StepVisual_CoordinatesList) aCoords = theTF->Coordinates(); + Handle(TColgp_HArray1OfXYZ) aNodes = aCoords->Points(); + Handle(TColStd_HArray2OfInteger) aTriangles = theTF->Triangles(); + const Standard_Boolean aHasUVNodes = Standard_False; + const Standard_Boolean aHasNormals = (theTF->NbNormals() > 0); + Handle(Poly_Triangulation) aMesh = new Poly_Triangulation(theTF->NbPnindex(), theTF->NbTriangles(), aHasUVNodes); + + for (Standard_Integer j = 1; j <= theTF->NbPnindex(); ++j) + { + aMesh->ChangeNode(j) = aNodes->Value(theTF->PnindexValue(j)); + } + + for (Standard_Integer k = 1; k <= theTF->NbTriangles(); ++k) + { + aMesh->ChangeTriangle(k) = Poly_Triangle(aTriangles->Value(k, 1), aTriangles->Value(k, 2), aTriangles->Value(k, 3)); + } + + if (aHasNormals) + { + Handle(TColStd_HArray2OfReal) aNormals = theTF->Normals(); + gp_XYZ aNorm; + if (theTF->NbNormals() == 1) + { + aNorm.SetX(aNormals->Value(1, 1)); + aNorm.SetY(aNormals->Value(1, 2)); + aNorm.SetZ(aNormals->Value(1, 3)); + for (Standard_Integer i = 1; i <= theTF->NbPnindex(); ++i) + { + aMesh->SetNormal(i, aNorm); + } + } + else + { + for (Standard_Integer i = 1; i <= theTF->NbNormals(); ++i) + { + aNorm.SetX(aNormals->Value(i, 1)); + aNorm.SetY(aNormals->Value(i, 2)); + aNorm.SetZ(aNormals->Value(i, 3)); + aMesh->SetNormal(i, aNorm); + } + } + } + + return aMesh; +} + +// ============================================================================ +// Method : createMesh +// Purpose : creates a Poly_Triangulation from ComplexTriangulatedFace +// ============================================================================ + +Handle(Poly_Triangulation) +StepToTopoDS_TranslateFace::createMesh(const Handle(StepVisual_ComplexTriangulatedFace)& theTF) const +{ + Handle(StepVisual_CoordinatesList) aCoords = theTF->Coordinates(); + Handle(TColgp_HArray1OfXYZ) aNodes = aCoords->Points(); + Handle(TColStd_HArray2OfInteger) aTriaStrips = theTF->TriangleStrips(); + Handle(TColStd_HArray2OfInteger) aTriaFans = theTF->TriangleFans(); + const Standard_Boolean aHasUVNodes = Standard_False; + const Standard_Boolean aHasNormals = (theTF->NbNormals() > 0); + + Standard_Integer aNbTriaStrips = 0; + for (Standard_Integer i = 1; i <= theTF->NbTriangleStrips(); ++i) + { + for (Standard_Integer j = 3; j <= aTriaStrips->UpperCol(); j += 2) + { + if (aTriaStrips->Value(i, j) != aTriaStrips->Value(i, j - 2) && + aTriaStrips->Value(i, j) != aTriaStrips->Value(i, j - 1)) + ++aNbTriaStrips; + } + for (Standard_Integer j = 4; j <= aTriaStrips->UpperCol(); j += 2) + { + if (aTriaStrips->Value(i, j) != aTriaStrips->Value(i, j - 2) && + aTriaStrips->Value(i, j) != aTriaStrips->Value(i, j - 1)) + ++aNbTriaStrips; + } + } + + Standard_Integer aNbTriaFans = 0; + for (Standard_Integer i = 1; i <= theTF->NbTriangleFans(); ++i) + { + Standard_Integer v1 = aTriaStrips->Value(i, 1); + for (Standard_Integer j = 3; j <= aTriaStrips->UpperCol(); ++j) + { + if (aTriaStrips->Value(i, j) != v1 && aTriaStrips->Value(i, j - 1) != v1) + ++aNbTriaFans; + } + } + + Handle(Poly_Triangulation) aMesh = new Poly_Triangulation(theTF->NbPnindex(), + aNbTriaStrips + aNbTriaFans, aHasUVNodes); + + for (Standard_Integer j = 1; j <= theTF->NbPnindex(); ++j) + { + aMesh->ChangeNode(j) = aNodes->Value(theTF->PnindexValue(j)); + } + + Standard_Integer k = 1; + for (Standard_Integer i = 1; i <= theTF->NbTriangleStrips(); ++i) + { + for (Standard_Integer j = 3; j <= aTriaStrips->UpperCol(); j += 2) + { + if (aTriaStrips->Value(i, j) != aTriaStrips->Value(i, j - 2) && + aTriaStrips->Value(i, j) != aTriaStrips->Value(i, j - 1)) + { + aMesh->ChangeTriangle(k++) = Poly_Triangle(aTriaStrips->Value(i, j - 2), + aTriaStrips->Value(i, j), + aTriaStrips->Value(i, j - 1)); + } + } + for (Standard_Integer j = 4; j <= aTriaStrips->UpperCol(); j += 2) + { + if (aTriaStrips->Value(i, j) != aTriaStrips->Value(i, j - 2) && + aTriaStrips->Value(i, j) != aTriaStrips->Value(i, j - 1)) + { + aMesh->ChangeTriangle(k++) = Poly_Triangle(aTriaStrips->Value(i, j - 2), + aTriaStrips->Value(i, j - 1), + aTriaStrips->Value(i, j)); + } + } + } + + if (aHasNormals) + { + Handle(TColStd_HArray2OfReal) aNormals = theTF->Normals(); + gp_XYZ aNorm; + if (theTF->NbNormals() == 1) + { + aNorm.SetX(aNormals->Value(1, 1)); + aNorm.SetY(aNormals->Value(1, 2)); + aNorm.SetZ(aNormals->Value(1, 3)); + for (Standard_Integer i = 1; i <= theTF->NbPnindex(); ++i) + { + aMesh->SetNormal(i, aNorm); + } + } + else + { + for (Standard_Integer i = 1; i <= theTF->NbNormals(); ++i) + { + aNorm.SetX(aNormals->Value(i, 1)); + aNorm.SetY(aNormals->Value(i, 2)); + aNorm.SetZ(aNormals->Value(i, 3)); + aMesh->SetNormal(i, aNorm); + } + } + } + + return aMesh; +} // ============================================================================ // Method : Value diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateFace.hxx b/src/StepToTopoDS/StepToTopoDS_TranslateFace.hxx index 3ce19fc207..8d106c781e 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateFace.hxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateFace.hxx @@ -24,14 +24,17 @@ #include #include #include +class Poly_Triangulation; class StdFail_NotDone; class StepShape_FaceSurface; class StepToTopoDS_Tool; class StepToTopoDS_NMTool; +class StepVisual_TessellatedFace; +class StepVisual_TriangulatedFace; +class StepVisual_ComplexTriangulatedFace; class TopoDS_Shape; - class StepToTopoDS_TranslateFace : public StepToTopoDS_Root { public: @@ -43,8 +46,20 @@ public: Standard_EXPORT StepToTopoDS_TranslateFace(const Handle(StepShape_FaceSurface)& FS, StepToTopoDS_Tool& T, StepToTopoDS_NMTool& NMTool); + Standard_EXPORT StepToTopoDS_TranslateFace(const Handle(StepVisual_TessellatedFace)& theTF, + StepToTopoDS_Tool& theTool, + StepToTopoDS_NMTool& theNMTool, + const Standard_Boolean theReadTessellatedWhenNoBRepOnly, + Standard_Boolean& theHasGeom); + Standard_EXPORT void Init (const Handle(StepShape_FaceSurface)& FS, StepToTopoDS_Tool& T, StepToTopoDS_NMTool& NMTool); + Standard_EXPORT void Init (const Handle(StepVisual_TessellatedFace)& theTF, + StepToTopoDS_Tool& theTool, + StepToTopoDS_NMTool& theNMTool, + const Standard_Boolean theReadTessellatedWhenNoBRepOnly, + Standard_Boolean& theHasGeom); + Standard_EXPORT const TopoDS_Shape& Value() const; Standard_EXPORT StepToTopoDS_TranslateFaceError Error() const; @@ -60,6 +75,8 @@ protected: private: + Handle(Poly_Triangulation) createMesh(const Handle(StepVisual_TriangulatedFace)& theTF) const; + Handle(Poly_Triangulation) createMesh(const Handle(StepVisual_ComplexTriangulatedFace)& theTF) const; StepToTopoDS_TranslateFaceError myError; diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateShell.cxx b/src/StepToTopoDS/StepToTopoDS_TranslateShell.cxx index 1cffe990e7..b011d8adbf 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateShell.cxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateShell.cxx @@ -25,11 +25,14 @@ #include #include #include +#include +#include #include #include #include #include #include +#include // ============================================================================ // Method : StepToTopoDS_TranslateShell::StepToTopoDS_TranslateShell @@ -108,6 +111,88 @@ void StepToTopoDS_TranslateShell::Init } } +// ============================================================================ +// Method : Init +// Purpose : Init with a ConnectedFaceSet and a Tool +// ============================================================================ + +void StepToTopoDS_TranslateShell::Init(const Handle(StepVisual_TessellatedShell)& theTSh, + StepToTopoDS_Tool& theTool, + StepToTopoDS_NMTool& theNMTool, + const Standard_Boolean theReadTessellatedWhenNoBRepOnly, + Standard_Boolean& theHasGeom, + const Message_ProgressRange& theProgress) +{ + if (theTSh.IsNull()) + return; + + BRep_Builder aB; + TopoDS_Shell aSh; + + Standard_Integer aNb = theTSh->NbItems(); + Message_ProgressScope aPS(theProgress, "Face", theTSh->HasTopologicalLink() ? aNb + 1 : aNb); + + Handle(Transfer_TransientProcess) aTP = theTool.TransientProcess(); + + if (theTSh->HasTopologicalLink()) + { + Handle(TransferBRep_ShapeBinder) aBinder + = Handle(TransferBRep_ShapeBinder)::DownCast(aTP->Find(theTSh->TopologicalLink())); + if (aBinder.IsNull()) + { + aSh = aBinder->Shell(); + theHasGeom = Standard_True; + } + } + + Standard_Boolean aNewShell = Standard_False; + if (aSh.IsNull()) + { + aB.MakeShell(aSh); + aNewShell = Standard_True; + theHasGeom = Standard_False; + } + + StepToTopoDS_TranslateFace aTranTF; + aTranTF.SetPrecision(Precision()); + aTranTF.SetMaxTol(MaxTol()); + + for (Standard_Integer i = 1; i <= aNb && aPS.More(); i++, aPS.Next()) + { +#ifdef OCCT_DEBUG + std::cout << "Processing Face : " << i << std::endl; +#endif + Handle(StepVisual_TessellatedStructuredItem) anItem = theTSh->ItemsValue(i); + if (anItem->IsKind(STANDARD_TYPE(StepVisual_TessellatedFace))) + { + Handle(StepVisual_TessellatedFace) aTFace = Handle(StepVisual_TessellatedFace)::DownCast(anItem); + Standard_Boolean aHasFaceGeom = Standard_False; + aTranTF.Init(aTFace, theTool, theNMTool, theReadTessellatedWhenNoBRepOnly, aHasFaceGeom); + if (aTranTF.IsDone()) + { + if (aNewShell) + { + aB.Add(aSh, TopoDS::Face(aTranTF.Value())); + } + theHasGeom &= aHasFaceGeom; + } + else + { + aTP->AddWarning(anItem, " Triangulated face if not mapped to TopoDS"); + } + } + else + { + aTP->AddWarning(anItem, " Face is not of TriangulatedFace Type; not mapped to TopoDS"); + } + } + + aSh.Closed(BRep_Tool::IsClosed(aSh)); + myResult = aSh; + myError = StepToTopoDS_TranslateShellDone; + done = Standard_True; +} + // ============================================================================ // Method : Value // Purpose : Return the mapped Shape diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateShell.hxx b/src/StepToTopoDS/StepToTopoDS_TranslateShell.hxx index dcaa3b61f4..26b8aa1084 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateShell.hxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateShell.hxx @@ -28,12 +28,12 @@ class StdFail_NotDone; class StepShape_ConnectedFaceSet; +class StepVisual_TessellatedShell; class StepToTopoDS_Tool; class StepToTopoDS_NMTool; class TopoDS_Shape; - class StepToTopoDS_TranslateShell : public StepToTopoDS_Root { public: @@ -48,6 +48,13 @@ public: StepToTopoDS_NMTool& NMTool, const Message_ProgressRange& theProgress = Message_ProgressRange()); + Standard_EXPORT void Init (const Handle(StepVisual_TessellatedShell)& theTSh, + StepToTopoDS_Tool& theTool, + StepToTopoDS_NMTool& theNMTool, + const Standard_Boolean theReadTessellatedWhenNoBRepOnly, + Standard_Boolean& theHasGeom, + const Message_ProgressRange& theProgress = Message_ProgressRange()); + Standard_EXPORT const TopoDS_Shape& Value() const; Standard_EXPORT StepToTopoDS_TranslateShellError Error() const; diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateSolid.cxx b/src/StepToTopoDS/StepToTopoDS_TranslateSolid.cxx new file mode 100644 index 0000000000..1007cc42e4 --- /dev/null +++ b/src/StepToTopoDS/StepToTopoDS_TranslateSolid.cxx @@ -0,0 +1,148 @@ +// 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// ============================================================================ +// Method : StepToTopoDS_TranslateSolid::StepToTopoDS_TranslateSolid +// Purpose : Empty Constructor +// ============================================================================ +StepToTopoDS_TranslateSolid::StepToTopoDS_TranslateSolid() + : myError(StepToTopoDS_TranslateSolidOther) +{ + done = Standard_False; +} + +// ============================================================================ +// Method : Init +// Purpose : Init with a TessellatedSolid and a Tool +// ============================================================================ + +void StepToTopoDS_TranslateSolid::Init(const Handle(StepVisual_TessellatedSolid)& theTSo, + const Handle(Transfer_TransientProcess)& theTP, + StepToTopoDS_Tool& theTool, + StepToTopoDS_NMTool& theNMTool, + const Standard_Boolean theReadTessellatedWhenNoBRepOnly, + Standard_Boolean& theHasGeom, + const Message_ProgressRange& theProgress) +{ + if (theTSo.IsNull()) + return; + + BRep_Builder aB; + TopoDS_Shell aSh; + TopoDS_Solid aSo; + + Standard_Integer aNb = theTSo->NbItems(); + Message_ProgressScope aPS(theProgress, "Face", aNb); + + if (theTSo->HasGeometricLink() && theTP->IsBound(theTSo->GeometricLink())) + { + Handle(TransferBRep_ShapeBinder) aBinder + = Handle(TransferBRep_ShapeBinder)::DownCast(theTP->Find(theTSo->GeometricLink())); + if (aBinder) + aSo = aBinder->Solid(); + } + + Standard_Boolean aNewSolid = Standard_False; + if (aSo.IsNull()) + { + aB.MakeShell(aSh); + aB.MakeSolid(aSo); + aNewSolid = Standard_True; + theHasGeom = Standard_False; + } + + Handle(Transfer_TransientProcess) aTP = theTool.TransientProcess(); + + StepToTopoDS_TranslateFace aTranTF; + aTranTF.SetPrecision(Precision()); + aTranTF.SetMaxTol(MaxTol()); + + for (Standard_Integer i = 1; i <= aNb && aPS.More(); i++, aPS.Next()) + { +#ifdef OCCT_DEBUG + std::cout << "Processing Face : " << i << std::endl; +#endif + Handle(StepVisual_TessellatedStructuredItem) anItem = theTSo->ItemsValue(i); + if (anItem->IsKind(STANDARD_TYPE(StepVisual_TessellatedFace))) + { + Handle(StepVisual_TessellatedFace) aTFace = Handle(StepVisual_TessellatedFace)::DownCast(anItem); + Standard_Boolean aHasFaceGeom = Standard_False; + aTranTF.Init(aTFace, theTool, theNMTool, theReadTessellatedWhenNoBRepOnly, aHasFaceGeom); + if (aTranTF.IsDone()) + { + if (aNewSolid) + { + aB.Add(aSh, TopoDS::Face(aTranTF.Value())); + } + theHasGeom &= aHasFaceGeom; + } + else + { + aTP->AddWarning(anItem, " Tessellated face if not mapped to TopoDS"); + } + } + else + { + aTP->AddWarning(anItem, " Face is not of TessellatedFace Type; not mapped to TopoDS"); + } + } + + if (aNewSolid) + { + aB.Add(aSo, aSh); + } + + myResult = aSo; + myError = StepToTopoDS_TranslateSolidDone; + done = Standard_True; +} + +// ============================================================================ +// Method : Value +// Purpose : Return the mapped Shape +// ============================================================================ + +const TopoDS_Shape& StepToTopoDS_TranslateSolid::Value() const +{ + StdFail_NotDone_Raise_if (!done, "StepToTopoDS_TranslateSolid::Value() - no result"); + return myResult; +} + +// ============================================================================ +// Method : Error +// Purpose : Return the TranslateShell Error code +// ============================================================================ + +StepToTopoDS_TranslateSolidError StepToTopoDS_TranslateSolid::Error() const +{ + return myError; +} + diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateSolid.hxx b/src/StepToTopoDS/StepToTopoDS_TranslateSolid.hxx new file mode 100644 index 0000000000..9720d7ec4b --- /dev/null +++ b/src/StepToTopoDS/StepToTopoDS_TranslateSolid.hxx @@ -0,0 +1,62 @@ +// 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 _StepToTopoDS_TranslateSolid_HeaderFile +#define _StepToTopoDS_TranslateSolid_HeaderFile + +#include +#include +#include + +#include +#include +#include +#include + +class StepShape_ConnectedFaceSet; +class StepVisual_TessellatedSolid; +class StepToTopoDS_Tool; +class StepToTopoDS_NMTool; +class Transfer_TransientProcess; + +class StepToTopoDS_TranslateSolid : public StepToTopoDS_Root +{ +public: + + DEFINE_STANDARD_ALLOC + + + Standard_EXPORT StepToTopoDS_TranslateSolid(); + + Standard_EXPORT void Init(const Handle(StepVisual_TessellatedSolid)& theTSo, + const Handle(Transfer_TransientProcess)& theTP, + StepToTopoDS_Tool& theTool, + StepToTopoDS_NMTool& theNMTool, + const Standard_Boolean theReadTessellatedWhenNoBRepOnly, + Standard_Boolean& theHasGeom, + const Message_ProgressRange& theProgress = Message_ProgressRange()); + + Standard_EXPORT const TopoDS_Shape& Value() const; + + Standard_EXPORT StepToTopoDS_TranslateSolidError Error() const; + +protected: + +private: + + StepToTopoDS_TranslateSolidError myError; + TopoDS_Shape myResult; + +}; + +#endif // _StepToTopoDS_TranslateSolid_HeaderFile diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateSolidError.hxx b/src/StepToTopoDS/StepToTopoDS_TranslateSolidError.hxx new file mode 100644 index 0000000000..105eff90bb --- /dev/null +++ b/src/StepToTopoDS/StepToTopoDS_TranslateSolidError.hxx @@ -0,0 +1,23 @@ +// 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 _StepToTopoDS_TranslateSolidError_HeaderFile +#define _StepToTopoDS_TranslateSolidError_HeaderFile + +enum StepToTopoDS_TranslateSolidError +{ + StepToTopoDS_TranslateSolidDone, + StepToTopoDS_TranslateSolidOther +}; + +#endif // _StepToTopoDS_TranslateSolidError_HeaderFile diff --git a/src/StepVisual/FILES b/src/StepVisual/FILES index 83e199d91d..ab69d5c5b3 100644 --- a/src/StepVisual/FILES +++ b/src/StepVisual/FILES @@ -262,3 +262,49 @@ StepVisual_TessellatedCurveSet.hxx StepVisual_TessellatedCurveSet.cxx StepVisual_CoordinatesList.hxx StepVisual_CoordinatesList.cxx +StepVisual_Array1OfTessellatedEdgeOrVertex.hxx +StepVisual_Array1OfTessellatedStructuredItem.hxx +StepVisual_ComplexTriangulatedFace.cxx +StepVisual_ComplexTriangulatedFace.hxx +StepVisual_ComplexTriangulatedSurfaceSet.cxx +StepVisual_ComplexTriangulatedSurfaceSet.hxx +StepVisual_CubicBezierTessellatedEdge.cxx +StepVisual_CubicBezierTessellatedEdge.hxx +StepVisual_CubicBezierTriangulatedFace.cxx +StepVisual_CubicBezierTriangulatedFace.hxx +StepVisual_EdgeOrCurve.cxx +StepVisual_EdgeOrCurve.hxx +StepVisual_FaceOrSurface.cxx +StepVisual_FaceOrSurface.hxx +StepVisual_HArray1OfTessellatedEdgeOrVertex.hxx +StepVisual_HArray1OfTessellatedStructuredItem.hxx +StepVisual_PathOrCompositeCurve.cxx +StepVisual_PathOrCompositeCurve.hxx +StepVisual_TessellatedConnectingEdge.cxx +StepVisual_TessellatedConnectingEdge.hxx +StepVisual_TessellatedEdge.cxx +StepVisual_TessellatedEdge.hxx +StepVisual_TessellatedEdgeOrVertex.cxx +StepVisual_TessellatedEdgeOrVertex.hxx +StepVisual_TessellatedFace.cxx +StepVisual_TessellatedFace.hxx +StepVisual_TessellatedPointSet.cxx +StepVisual_TessellatedPointSet.hxx +StepVisual_TessellatedShapeRepresentation.cxx +StepVisual_TessellatedShapeRepresentation.hxx +StepVisual_TessellatedShapeRepresentationWithAccuracyParameters.cxx +StepVisual_TessellatedShapeRepresentationWithAccuracyParameters.hxx +StepVisual_TessellatedShell.cxx +StepVisual_TessellatedShell.hxx +StepVisual_TessellatedSolid.cxx +StepVisual_TessellatedSolid.hxx +StepVisual_TessellatedStructuredItem.cxx +StepVisual_TessellatedStructuredItem.hxx +StepVisual_TessellatedSurfaceSet.cxx +StepVisual_TessellatedSurfaceSet.hxx +StepVisual_TessellatedVertex.cxx +StepVisual_TessellatedVertex.hxx +StepVisual_TessellatedWire.cxx +StepVisual_TessellatedWire.hxx +StepVisual_TriangulatedFace.cxx +StepVisual_TriangulatedFace.hxx diff --git a/src/StepVisual/StepVisual_Array1OfTessellatedEdgeOrVertex.hxx b/src/StepVisual/StepVisual_Array1OfTessellatedEdgeOrVertex.hxx new file mode 100644 index 0000000000..9500617ed3 --- /dev/null +++ b/src/StepVisual/StepVisual_Array1OfTessellatedEdgeOrVertex.hxx @@ -0,0 +1,26 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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_Array1OfTessellatedEdgeOrVertex_HeaderFile +#define StepVisual_Array1OfTessellatedEdgeOrVertex_HeaderFile + +#include +#include + +typedef NCollection_Array1 StepVisual_Array1OfTessellatedEdgeOrVertex; + +#endif diff --git a/src/StepVisual/StepVisual_Array1OfTessellatedStructuredItem.hxx b/src/StepVisual/StepVisual_Array1OfTessellatedStructuredItem.hxx new file mode 100644 index 0000000000..c6d3bdf002 --- /dev/null +++ b/src/StepVisual/StepVisual_Array1OfTessellatedStructuredItem.hxx @@ -0,0 +1,26 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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_Array1OfTessellatedStructuredItem_HeaderFile +#define StepVisual_Array1OfTessellatedStructuredItem_HeaderFile + +#include +#include + +typedef NCollection_Array1 StepVisual_Array1OfTessellatedStructuredItem; + +#endif diff --git a/src/StepVisual/StepVisual_ComplexTriangulatedFace.cxx b/src/StepVisual/StepVisual_ComplexTriangulatedFace.cxx new file mode 100644 index 0000000000..741603f545 --- /dev/null +++ b/src/StepVisual/StepVisual_ComplexTriangulatedFace.cxx @@ -0,0 +1,171 @@ +// Created on : Thu Mar 24 18:30:11 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 + +IMPLEMENT_STANDARD_RTTIEXT(StepVisual_ComplexTriangulatedFace, StepVisual_TessellatedFace) + +//======================================================================= +//function : StepVisual_ComplexTriangulatedFace +//purpose : +//======================================================================= + +StepVisual_ComplexTriangulatedFace::StepVisual_ComplexTriangulatedFace () +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= + +void StepVisual_ComplexTriangulatedFace::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepVisual_CoordinatesList)& theTessellatedFace_Coordinates, + const Standard_Integer theTessellatedFace_Pnmax, + const Handle(TColStd_HArray2OfReal)& theTessellatedFace_Normals, + const Standard_Boolean theHasTessellatedFace_GeometricLink, + const StepVisual_FaceOrSurface& theTessellatedFace_GeometricLink, + const Handle(TColStd_HArray1OfInteger)& thePnindex, + const Handle(TColStd_HArray2OfInteger)& theTriangleStrips, + const Handle(TColStd_HArray2OfInteger)& theTriangleFans) +{ + StepVisual_TessellatedFace::Init(theRepresentationItem_Name, + theTessellatedFace_Coordinates, + theTessellatedFace_Pnmax, + theTessellatedFace_Normals, + theHasTessellatedFace_GeometricLink, + theTessellatedFace_GeometricLink); + + myPnindex = thePnindex; + + myTriangleStrips = theTriangleStrips; + + myTriangleFans = theTriangleFans; +} + +//======================================================================= +//function : Pnindex +//purpose : +//======================================================================= + +Handle(TColStd_HArray1OfInteger) StepVisual_ComplexTriangulatedFace::Pnindex () const +{ + return myPnindex; +} + +//======================================================================= +//function : SetPnindex +//purpose : +//======================================================================= + +void StepVisual_ComplexTriangulatedFace::SetPnindex(const Handle(TColStd_HArray1OfInteger)& thePnindex) +{ + myPnindex = thePnindex; +} + + +//======================================================================= +//function : NbPnindex +//purpose : +//======================================================================= + +Standard_Integer StepVisual_ComplexTriangulatedFace::NbPnindex() const +{ + if (myPnindex.IsNull()) + { + return 0; + } + return myPnindex->Length(); +} + + +//======================================================================= +//function : PnindexValue +//purpose : +//======================================================================= + +Standard_Integer StepVisual_ComplexTriangulatedFace::PnindexValue(const Standard_Integer theNum) const +{ + return myPnindex->Value(theNum); +} + +//======================================================================= +//function : TriangleStrips +//purpose : +//======================================================================= + +Handle(TColStd_HArray2OfInteger) StepVisual_ComplexTriangulatedFace::TriangleStrips () const +{ + return myTriangleStrips; +} + +//======================================================================= +//function : SetTriangleStrips +//purpose : +//======================================================================= + +void StepVisual_ComplexTriangulatedFace::SetTriangleStrips(const Handle(TColStd_HArray2OfInteger)& theTriangleStrips) +{ + myTriangleStrips = theTriangleStrips; +} + +//======================================================================= +//function : NbTriangleStrips +//purpose : +//======================================================================= + +Standard_Integer StepVisual_ComplexTriangulatedFace::NbTriangleStrips() const +{ + if (myTriangleStrips.IsNull()) + { + return 0; + } + return myTriangleStrips->ColLength(); +} + +//======================================================================= +//function : TriangleFans +//purpose : +//======================================================================= + +Handle(TColStd_HArray2OfInteger) StepVisual_ComplexTriangulatedFace::TriangleFans () const +{ + return myTriangleFans; +} + +//======================================================================= +//function : SetTriangleFans +//purpose : +//======================================================================= + +void StepVisual_ComplexTriangulatedFace::SetTriangleFans(const Handle(TColStd_HArray2OfInteger)& theTriangleFans) +{ + myTriangleFans = theTriangleFans; +} + +//======================================================================= +//function : NbTriangleFans +//purpose : +//======================================================================= + +Standard_Integer StepVisual_ComplexTriangulatedFace::NbTriangleFans() const +{ + if (myTriangleFans.IsNull()) + { + return 0; + } + return myTriangleFans->ColLength(); +} diff --git a/src/StepVisual/StepVisual_ComplexTriangulatedFace.hxx b/src/StepVisual/StepVisual_ComplexTriangulatedFace.hxx new file mode 100644 index 0000000000..b89b6a5b34 --- /dev/null +++ b/src/StepVisual/StepVisual_ComplexTriangulatedFace.hxx @@ -0,0 +1,89 @@ +// Created on : Thu Mar 24 18:30:11 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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_ComplexTriangulatedFace_HeaderFile_ +#define _StepVisual_ComplexTriangulatedFace_HeaderFile_ + +#include +#include +#include + +#include +#include + +DEFINE_STANDARD_HANDLE(StepVisual_ComplexTriangulatedFace, StepVisual_TessellatedFace) + +//! Representation of STEP entity ComplexTriangulatedFace +class StepVisual_ComplexTriangulatedFace : public StepVisual_TessellatedFace +{ + +public : + + //! default constructor + Standard_EXPORT StepVisual_ComplexTriangulatedFace(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepVisual_CoordinatesList)& theTessellatedFace_Coordinates, + const Standard_Integer theTessellatedFace_Pnmax, + const Handle(TColStd_HArray2OfReal)& theTessellatedFace_Normals, + const Standard_Boolean theHasTessellatedFace_GeometricLink, + const StepVisual_FaceOrSurface& theTessellatedFace_GeometricLink, + const Handle(TColStd_HArray1OfInteger)& thePnindex, + const Handle(TColStd_HArray2OfInteger)& theTriangleStrips, + const Handle(TColStd_HArray2OfInteger)& theTriangleFans); + + //! Returns field Pnindex + Standard_EXPORT Handle(TColStd_HArray1OfInteger) Pnindex() const; + + //! Sets field Pnindex + Standard_EXPORT void SetPnindex (const Handle(TColStd_HArray1OfInteger)& thePnindex); + + //! Returns number of Pnindex + Standard_EXPORT Standard_Integer NbPnindex() const; + + //! Returns value of Pnindex by its num + Standard_EXPORT Standard_Integer PnindexValue(const Standard_Integer theNum) const; + + //! Returns field TriangleStrips + Standard_EXPORT Handle(TColStd_HArray2OfInteger) TriangleStrips() const; + + //! Sets field TriangleStrips + Standard_EXPORT void SetTriangleStrips (const Handle(TColStd_HArray2OfInteger)& theTriangleStrips); + + //! Returns number of TriangleStrips + Standard_EXPORT Standard_Integer NbTriangleStrips() const; + + //! Returns field TriangleFans + Standard_EXPORT Handle(TColStd_HArray2OfInteger) TriangleFans() const; + + //! Sets field TriangleFans + Standard_EXPORT void SetTriangleFans (const Handle(TColStd_HArray2OfInteger)& theTriangleFans); + + //! Returns number of TriangleFans + Standard_EXPORT Standard_Integer NbTriangleFans() const; + + DEFINE_STANDARD_RTTIEXT(StepVisual_ComplexTriangulatedFace, StepVisual_TessellatedFace) + +private: + + Handle(TColStd_HArray1OfInteger) myPnindex; + Handle(TColStd_HArray2OfInteger) myTriangleStrips; + Handle(TColStd_HArray2OfInteger) myTriangleFans; + +}; + +#endif // _StepVisual_ComplexTriangulatedFace_HeaderFile_ diff --git a/src/StepVisual/StepVisual_ComplexTriangulatedSurfaceSet.cxx b/src/StepVisual/StepVisual_ComplexTriangulatedSurfaceSet.cxx new file mode 100644 index 0000000000..7b3ca3eac0 --- /dev/null +++ b/src/StepVisual/StepVisual_ComplexTriangulatedSurfaceSet.cxx @@ -0,0 +1,167 @@ +// Created on : Thu Mar 24 18:30:11 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 + +IMPLEMENT_STANDARD_RTTIEXT(StepVisual_ComplexTriangulatedSurfaceSet, StepVisual_TessellatedSurfaceSet) + +//======================================================================= +//function : StepVisual_ComplexTriangulatedSurfaceSet +//purpose : +//======================================================================= + +StepVisual_ComplexTriangulatedSurfaceSet::StepVisual_ComplexTriangulatedSurfaceSet () +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= + +void StepVisual_ComplexTriangulatedSurfaceSet::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepVisual_CoordinatesList)& theTessellatedSurfaceSet_Coordinates, + const Standard_Integer theTessellatedSurfaceSet_Pnmax, + const Handle(TColStd_HArray2OfReal)& theTessellatedSurfaceSet_Normals, + const Handle(TColStd_HArray1OfInteger)& thePnindex, + const Handle(TColStd_HArray1OfTransient)& theTriangleStrips, + const Handle(TColStd_HArray1OfTransient)& theTriangleFans) +{ + StepVisual_TessellatedSurfaceSet::Init(theRepresentationItem_Name, + theTessellatedSurfaceSet_Coordinates, + theTessellatedSurfaceSet_Pnmax, + theTessellatedSurfaceSet_Normals); + + myPnindex = thePnindex; + + myTriangleStrips = theTriangleStrips; + + myTriangleFans = theTriangleFans; +} + +//======================================================================= +//function : Pnindex +//purpose : +//======================================================================= + +Handle(TColStd_HArray1OfInteger) StepVisual_ComplexTriangulatedSurfaceSet::Pnindex () const +{ + return myPnindex; +} + +//======================================================================= +//function : SetPnindex +//purpose : +//======================================================================= + +void StepVisual_ComplexTriangulatedSurfaceSet::SetPnindex(const Handle(TColStd_HArray1OfInteger)& thePnindex) +{ + myPnindex = thePnindex; +} + + +//======================================================================= +//function : NbPnindex +//purpose : +//======================================================================= + +Standard_Integer StepVisual_ComplexTriangulatedSurfaceSet::NbPnindex() const +{ + if (myPnindex.IsNull()) + { + return 0; + } + return myPnindex->Length(); +} + + +//======================================================================= +//function : PnindexValue +//purpose : +//======================================================================= + +Standard_Integer StepVisual_ComplexTriangulatedSurfaceSet::PnindexValue(const Standard_Integer theNum) const +{ + return myPnindex->Value(theNum); +} + +//======================================================================= +//function : TriangleStrips +//purpose : +//======================================================================= + +Handle(TColStd_HArray1OfTransient) StepVisual_ComplexTriangulatedSurfaceSet::TriangleStrips () const +{ + return myTriangleStrips; +} + +//======================================================================= +//function : SetTriangleStrips +//purpose : +//======================================================================= + +void StepVisual_ComplexTriangulatedSurfaceSet::SetTriangleStrips(const Handle(TColStd_HArray1OfTransient)& theTriangleStrips) +{ + myTriangleStrips = theTriangleStrips; +} + +//======================================================================= +//function : NbTriangleStrips +//purpose : +//======================================================================= + +Standard_Integer StepVisual_ComplexTriangulatedSurfaceSet::NbTriangleStrips() const +{ + if (myTriangleStrips.IsNull()) + { + return 0; + } + return myTriangleStrips->Length(); +} + +//======================================================================= +//function : TriangleFans +//purpose : +//======================================================================= + +Handle(TColStd_HArray1OfTransient) StepVisual_ComplexTriangulatedSurfaceSet::TriangleFans () const +{ + return myTriangleFans; +} + +//======================================================================= +//function : SetTriangleFans +//purpose : +//======================================================================= + +void StepVisual_ComplexTriangulatedSurfaceSet::SetTriangleFans(const Handle(TColStd_HArray1OfTransient)& theTriangleFans) +{ + myTriangleFans = theTriangleFans; +} + +//======================================================================= +//function : NbTriangleFans +//purpose : +//======================================================================= + +Standard_Integer StepVisual_ComplexTriangulatedSurfaceSet::NbTriangleFans() const +{ + if (myTriangleFans.IsNull()) + { + return 0; + } + return myTriangleFans->Length(); +} diff --git a/src/StepVisual/StepVisual_ComplexTriangulatedSurfaceSet.hxx b/src/StepVisual/StepVisual_ComplexTriangulatedSurfaceSet.hxx new file mode 100644 index 0000000000..8d840f4518 --- /dev/null +++ b/src/StepVisual/StepVisual_ComplexTriangulatedSurfaceSet.hxx @@ -0,0 +1,87 @@ +// Created on : Thu Mar 24 18:30:11 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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_ComplexTriangulatedSurfaceSet_HeaderFile_ +#define _StepVisual_ComplexTriangulatedSurfaceSet_HeaderFile_ + +#include +#include +#include + +#include +#include + +DEFINE_STANDARD_HANDLE(StepVisual_ComplexTriangulatedSurfaceSet, StepVisual_TessellatedSurfaceSet) + +//! Representation of STEP entity ComplexTriangulatedSurfaceSet +class StepVisual_ComplexTriangulatedSurfaceSet : public StepVisual_TessellatedSurfaceSet +{ + +public : + + //! default constructor + Standard_EXPORT StepVisual_ComplexTriangulatedSurfaceSet(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepVisual_CoordinatesList)& theTessellatedSurfaceSet_Coordinates, + const Standard_Integer theTessellatedSurfaceSet_Pnmax, + const Handle(TColStd_HArray2OfReal)& theTessellatedSurfaceSet_Normals, + const Handle(TColStd_HArray1OfInteger)& thePnindex, + const Handle(TColStd_HArray1OfTransient)& theTriangleStrips, + const Handle(TColStd_HArray1OfTransient)& theTriangleFans); + + //! Returns field Pnindex + Standard_EXPORT Handle(TColStd_HArray1OfInteger) Pnindex() const; + + //! Sets field Pnindex + Standard_EXPORT void SetPnindex (const Handle(TColStd_HArray1OfInteger)& thePnindex); + + //! Returns number of Pnindex + Standard_EXPORT Standard_Integer NbPnindex() const; + + //! Returns value of Pnindex by its num + Standard_EXPORT Standard_Integer PnindexValue(const Standard_Integer theNum) const; + + //! Returns field TriangleStrips + Standard_EXPORT Handle(TColStd_HArray1OfTransient) TriangleStrips() const; + + //! Sets field TriangleStrips + Standard_EXPORT void SetTriangleStrips (const Handle(TColStd_HArray1OfTransient)& theTriangleStrips); + + //! Returns number of TriangleStrips + Standard_EXPORT Standard_Integer NbTriangleStrips() const; + + //! Returns field TriangleFans + Standard_EXPORT Handle(TColStd_HArray1OfTransient) TriangleFans() const; + + //! Sets field TriangleFans + Standard_EXPORT void SetTriangleFans (const Handle(TColStd_HArray1OfTransient)& theTriangleFans); + + //! Returns number of TriangleFans + Standard_EXPORT Standard_Integer NbTriangleFans() const; + + DEFINE_STANDARD_RTTIEXT(StepVisual_ComplexTriangulatedSurfaceSet, StepVisual_TessellatedSurfaceSet) + +private: + + Handle(TColStd_HArray1OfInteger) myPnindex; + Handle(TColStd_HArray1OfTransient) myTriangleStrips; + Handle(TColStd_HArray1OfTransient) myTriangleFans; + +}; + +#endif // _StepVisual_ComplexTriangulatedSurfaceSet_HeaderFile_ diff --git a/src/StepVisual/StepVisual_CubicBezierTessellatedEdge.cxx b/src/StepVisual/StepVisual_CubicBezierTessellatedEdge.cxx new file mode 100644 index 0000000000..471e8f2957 --- /dev/null +++ b/src/StepVisual/StepVisual_CubicBezierTessellatedEdge.cxx @@ -0,0 +1,28 @@ +// Created on : Thu Mar 24 18:30:11 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 + +IMPLEMENT_STANDARD_RTTIEXT(StepVisual_CubicBezierTessellatedEdge, StepVisual_TessellatedEdge) + +//======================================================================= +//function : StepVisual_CubicBezierTessellatedEdge +//purpose : +//======================================================================= + +StepVisual_CubicBezierTessellatedEdge::StepVisual_CubicBezierTessellatedEdge () +{ +} diff --git a/src/StepVisual/StepVisual_CubicBezierTessellatedEdge.hxx b/src/StepVisual/StepVisual_CubicBezierTessellatedEdge.hxx new file mode 100644 index 0000000000..1a9c63efc7 --- /dev/null +++ b/src/StepVisual/StepVisual_CubicBezierTessellatedEdge.hxx @@ -0,0 +1,40 @@ +// Created on : Thu Mar 24 18:30:11 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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_CubicBezierTessellatedEdge_HeaderFile_ +#define _StepVisual_CubicBezierTessellatedEdge_HeaderFile_ + +#include +#include +#include + + +DEFINE_STANDARD_HANDLE(StepVisual_CubicBezierTessellatedEdge, StepVisual_TessellatedEdge) + +//! Representation of STEP entity CubicBezierTessellatedEdge +class StepVisual_CubicBezierTessellatedEdge : public StepVisual_TessellatedEdge +{ + +public : + + //! default constructor + Standard_EXPORT StepVisual_CubicBezierTessellatedEdge(); + + DEFINE_STANDARD_RTTIEXT(StepVisual_CubicBezierTessellatedEdge, StepVisual_TessellatedEdge) + +}; + +#endif // _StepVisual_CubicBezierTessellatedEdge_HeaderFile_ diff --git a/src/StepVisual/StepVisual_CubicBezierTriangulatedFace.cxx b/src/StepVisual/StepVisual_CubicBezierTriangulatedFace.cxx new file mode 100644 index 0000000000..9c0a32e93f --- /dev/null +++ b/src/StepVisual/StepVisual_CubicBezierTriangulatedFace.cxx @@ -0,0 +1,80 @@ +// Created on : Thu Mar 24 18:30:11 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 + +IMPLEMENT_STANDARD_RTTIEXT(StepVisual_CubicBezierTriangulatedFace, StepVisual_TessellatedFace) + +//======================================================================= +//function : StepVisual_CubicBezierTriangulatedFace +//purpose : +//======================================================================= + +StepVisual_CubicBezierTriangulatedFace::StepVisual_CubicBezierTriangulatedFace () +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= + +void StepVisual_CubicBezierTriangulatedFace::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepVisual_CoordinatesList)& theTessellatedFace_Coordinates, + const Standard_Integer theTessellatedFace_Pnmax, + const Handle(TColStd_HArray2OfReal)& theTessellatedFace_Normals, + const Standard_Boolean theHasTessellatedFace_GeometricLink, + const StepVisual_FaceOrSurface& theTessellatedFace_GeometricLink, + const Handle(TColStd_HArray2OfInteger)& theCtriangles) +{ + StepVisual_TessellatedFace::Init(theRepresentationItem_Name, + theTessellatedFace_Coordinates, + theTessellatedFace_Pnmax, + theTessellatedFace_Normals, + theHasTessellatedFace_GeometricLink, + theTessellatedFace_GeometricLink); + + myCtriangles = theCtriangles; +} + +//======================================================================= +//function : Ctriangles +//purpose : +//======================================================================= + +Handle(TColStd_HArray2OfInteger) StepVisual_CubicBezierTriangulatedFace::Ctriangles () const +{ + return myCtriangles; +} + +//======================================================================= +//function : SetCtriangles +//purpose : +//======================================================================= + +void StepVisual_CubicBezierTriangulatedFace::SetCtriangles(const Handle(TColStd_HArray2OfInteger)& theCtriangles) +{ + myCtriangles = theCtriangles; +} + +Standard_Integer StepVisual_CubicBezierTriangulatedFace::NbCtriangles() const +{ + if (myCtriangles.IsNull()) + { + return 0; + } + return myCtriangles->ColLength(); +} \ No newline at end of file diff --git a/src/StepVisual/StepVisual_CubicBezierTriangulatedFace.hxx b/src/StepVisual/StepVisual_CubicBezierTriangulatedFace.hxx new file mode 100644 index 0000000000..56b41f2e6b --- /dev/null +++ b/src/StepVisual/StepVisual_CubicBezierTriangulatedFace.hxx @@ -0,0 +1,63 @@ +// Created on : Thu Mar 24 18:30:11 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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_CubicBezierTriangulatedFace_HeaderFile_ +#define _StepVisual_CubicBezierTriangulatedFace_HeaderFile_ + +#include +#include +#include + +#include + +DEFINE_STANDARD_HANDLE(StepVisual_CubicBezierTriangulatedFace, StepVisual_TessellatedFace) + +//! Representation of STEP entity CubicBezierTriangulatedFace +class StepVisual_CubicBezierTriangulatedFace : public StepVisual_TessellatedFace +{ + +public : + + //! default constructor + Standard_EXPORT StepVisual_CubicBezierTriangulatedFace(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepVisual_CoordinatesList)& theTessellatedFace_Coordinates, + const Standard_Integer theTessellatedFace_Pnmax, + const Handle(TColStd_HArray2OfReal)& theTessellatedFace_Normals, + const Standard_Boolean theHasTessellatedFace_GeometricLink, + const StepVisual_FaceOrSurface& theTessellatedFace_GeometricLink, + const Handle(TColStd_HArray2OfInteger)& theCtriangles); + + //! Returns field Ctriangles + Standard_EXPORT Handle(TColStd_HArray2OfInteger) Ctriangles() const; + + //! Sets field Ctriangles + Standard_EXPORT void SetCtriangles (const Handle(TColStd_HArray2OfInteger)& theCtriangles); + + //! Returns number of Ctriangles + Standard_EXPORT Standard_Integer NbCtriangles() const; + + DEFINE_STANDARD_RTTIEXT(StepVisual_CubicBezierTriangulatedFace, StepVisual_TessellatedFace) + +private: + + Handle(TColStd_HArray2OfInteger) myCtriangles; + +}; + +#endif // _StepVisual_CubicBezierTriangulatedFace_HeaderFile_ diff --git a/src/StepVisual/StepVisual_EdgeOrCurve.cxx b/src/StepVisual/StepVisual_EdgeOrCurve.cxx new file mode 100644 index 0000000000..17f8f67ae0 --- /dev/null +++ b/src/StepVisual/StepVisual_EdgeOrCurve.cxx @@ -0,0 +1,61 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 +#include +#include + +//======================================================================= +//function : StepVisual_EdgeOrCurve +//purpose : +//======================================================================= + +StepVisual_EdgeOrCurve::StepVisual_EdgeOrCurve () +{ +} + +//======================================================================= +//function : CaseNum +//purpose : +//======================================================================= + +Standard_Integer StepVisual_EdgeOrCurve::CaseNum (const Handle(Standard_Transient)& ent) const +{ + if (ent.IsNull()) return 0; + if (ent->IsKind(STANDARD_TYPE(StepGeom_Curve))) return 1; + if (ent->IsKind(STANDARD_TYPE(StepShape_Edge))) return 2; + return 0; +} + +//======================================================================= +//function : Curve +//purpose : +//======================================================================= + +Handle(StepGeom_Curve) StepVisual_EdgeOrCurve::Curve () const +{ + return Handle(StepGeom_Curve)::DownCast(Value()); +} + +//======================================================================= +//function : Edge +//purpose : +//======================================================================= + +Handle(StepShape_Edge) StepVisual_EdgeOrCurve::Edge () const +{ + return Handle(StepShape_Edge)::DownCast(Value()); +} diff --git a/src/StepVisual/StepVisual_EdgeOrCurve.hxx b/src/StepVisual/StepVisual_EdgeOrCurve.hxx new file mode 100644 index 0000000000..70a61bb3f9 --- /dev/null +++ b/src/StepVisual/StepVisual_EdgeOrCurve.hxx @@ -0,0 +1,53 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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_EdgeOrCurve_HeaderFile +#define _StepVisual_EdgeOrCurve_HeaderFile + +#include +#include +#include +#include +#include + +class Standard_Transient; +class StepGeom_Curve; +class StepShape_Edge; + +//! Representation of STEP SELECT type EdgeOrCurve +class StepVisual_EdgeOrCurve : public StepData_SelectType +{ + +public: + + DEFINE_STANDARD_ALLOC + + //! Empty constructor + Standard_EXPORT StepVisual_EdgeOrCurve(); + + //! Recognizes a kind of EdgeOrCurve select type + //! -- 1 -> Curve + //! -- 2 -> Edge + Standard_EXPORT Standard_Integer CaseNum (const Handle(Standard_Transient)& ent) const Standard_OVERRIDE; + + //! Returns Value as Curve (or Null if another type) + Standard_EXPORT Handle(StepGeom_Curve) Curve() const; + + //! Returns Value as Edge (or Null if another type) + Standard_EXPORT Handle(StepShape_Edge) Edge() const; + +}; +#endif // _StepVisual_EdgeOrCurve_HeaderFile diff --git a/src/StepVisual/StepVisual_FaceOrSurface.cxx b/src/StepVisual/StepVisual_FaceOrSurface.cxx new file mode 100644 index 0000000000..e0819ce242 --- /dev/null +++ b/src/StepVisual/StepVisual_FaceOrSurface.cxx @@ -0,0 +1,61 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 +#include +#include + +//======================================================================= +//function : StepVisual_FaceOrSurface +//purpose : +//======================================================================= + +StepVisual_FaceOrSurface::StepVisual_FaceOrSurface () +{ +} + +//======================================================================= +//function : CaseNum +//purpose : +//======================================================================= + +Standard_Integer StepVisual_FaceOrSurface::CaseNum (const Handle(Standard_Transient)& ent) const +{ + if (ent.IsNull()) return 0; + if (ent->IsKind(STANDARD_TYPE(StepShape_Face))) return 1; + if (ent->IsKind(STANDARD_TYPE(StepGeom_Surface))) return 2; + return 0; +} + +//======================================================================= +//function : Face +//purpose : +//======================================================================= + +Handle(StepShape_Face) StepVisual_FaceOrSurface::Face () const +{ + return Handle(StepShape_Face)::DownCast(Value()); +} + +//======================================================================= +//function : Surface +//purpose : +//======================================================================= + +Handle(StepGeom_Surface) StepVisual_FaceOrSurface::Surface () const +{ + return Handle(StepGeom_Surface)::DownCast(Value()); +} diff --git a/src/StepVisual/StepVisual_FaceOrSurface.hxx b/src/StepVisual/StepVisual_FaceOrSurface.hxx new file mode 100644 index 0000000000..78a08f8df8 --- /dev/null +++ b/src/StepVisual/StepVisual_FaceOrSurface.hxx @@ -0,0 +1,53 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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_FaceOrSurface_HeaderFile +#define _StepVisual_FaceOrSurface_HeaderFile + +#include +#include +#include +#include +#include + +class Standard_Transient; +class StepShape_Face; +class StepGeom_Surface; + +//! Representation of STEP SELECT type FaceOrSurface +class StepVisual_FaceOrSurface : public StepData_SelectType +{ + +public: + + DEFINE_STANDARD_ALLOC + + //! Empty constructor + Standard_EXPORT StepVisual_FaceOrSurface(); + + //! Recognizes a kind of FaceOrSurface select type + //! -- 1 -> Face + //! -- 2 -> Surface + Standard_EXPORT Standard_Integer CaseNum (const Handle(Standard_Transient)& ent) const Standard_OVERRIDE; + + //! Returns Value as Face (or Null if another type) + Standard_EXPORT Handle(StepShape_Face) Face() const; + + //! Returns Value as Surface (or Null if another type) + Standard_EXPORT Handle(StepGeom_Surface) Surface() const; + +}; +#endif // _StepVisual_FaceOrSurface_HeaderFile diff --git a/src/StepVisual/StepVisual_HArray1OfTessellatedEdgeOrVertex.hxx b/src/StepVisual/StepVisual_HArray1OfTessellatedEdgeOrVertex.hxx new file mode 100644 index 0000000000..0ab282ca5c --- /dev/null +++ b/src/StepVisual/StepVisual_HArray1OfTessellatedEdgeOrVertex.hxx @@ -0,0 +1,26 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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_HArray1OfTessellatedEdgeOrVertex_HeaderFile +#define StepVisual_HArray1OfTessellatedEdgeOrVertex_HeaderFile + +#include +#include + +DEFINE_HARRAY1(StepVisual_HArray1OfTessellatedEdgeOrVertex, StepVisual_Array1OfTessellatedEdgeOrVertex); + +#endif diff --git a/src/StepVisual/StepVisual_HArray1OfTessellatedStructuredItem.hxx b/src/StepVisual/StepVisual_HArray1OfTessellatedStructuredItem.hxx new file mode 100644 index 0000000000..cb6a2a1f85 --- /dev/null +++ b/src/StepVisual/StepVisual_HArray1OfTessellatedStructuredItem.hxx @@ -0,0 +1,26 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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_HArray1OfTessellatedStructuredItem_HeaderFile +#define StepVisual_HArray1OfTessellatedStructuredItem_HeaderFile + +#include +#include + +DEFINE_HARRAY1(StepVisual_HArray1OfTessellatedStructuredItem, StepVisual_Array1OfTessellatedStructuredItem); + +#endif diff --git a/src/StepVisual/StepVisual_PathOrCompositeCurve.cxx b/src/StepVisual/StepVisual_PathOrCompositeCurve.cxx new file mode 100644 index 0000000000..5915494810 --- /dev/null +++ b/src/StepVisual/StepVisual_PathOrCompositeCurve.cxx @@ -0,0 +1,61 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 +#include +#include + +//======================================================================= +//function : StepVisual_PathOrCompositeCurve +//purpose : +//======================================================================= + +StepVisual_PathOrCompositeCurve::StepVisual_PathOrCompositeCurve () +{ +} + +//======================================================================= +//function : CaseNum +//purpose : +//======================================================================= + +Standard_Integer StepVisual_PathOrCompositeCurve::CaseNum (const Handle(Standard_Transient)& ent) const +{ + if (ent.IsNull()) return 0; + if (ent->IsKind(STANDARD_TYPE(StepGeom_CompositeCurve))) return 1; + if (ent->IsKind(STANDARD_TYPE(StepShape_Path))) return 2; + return 0; +} + +//======================================================================= +//function : CompositeCurve +//purpose : +//======================================================================= + +Handle(StepGeom_CompositeCurve) StepVisual_PathOrCompositeCurve::CompositeCurve () const +{ + return Handle(StepGeom_CompositeCurve)::DownCast(Value()); +} + +//======================================================================= +//function : Path +//purpose : +//======================================================================= + +Handle(StepShape_Path) StepVisual_PathOrCompositeCurve::Path () const +{ + return Handle(StepShape_Path)::DownCast(Value()); +} diff --git a/src/StepVisual/StepVisual_PathOrCompositeCurve.hxx b/src/StepVisual/StepVisual_PathOrCompositeCurve.hxx new file mode 100644 index 0000000000..7eb81a0209 --- /dev/null +++ b/src/StepVisual/StepVisual_PathOrCompositeCurve.hxx @@ -0,0 +1,53 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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_PathOrCompositeCurve_HeaderFile +#define _StepVisual_PathOrCompositeCurve_HeaderFile + +#include +#include +#include +#include +#include + +class Standard_Transient; +class StepGeom_CompositeCurve; +class StepShape_Path; + +//! Representation of STEP SELECT type PathOrCompositeCurve +class StepVisual_PathOrCompositeCurve : public StepData_SelectType +{ + +public: + + DEFINE_STANDARD_ALLOC + + //! Empty constructor + Standard_EXPORT StepVisual_PathOrCompositeCurve(); + + //! Recognizes a kind of PathOrCompositeCurve select type + //! -- 1 -> CompositeCurve + //! -- 2 -> Path + Standard_EXPORT Standard_Integer CaseNum (const Handle(Standard_Transient)& ent) const Standard_OVERRIDE; + + //! Returns Value as CompositeCurve (or Null if another type) + Standard_EXPORT Handle(StepGeom_CompositeCurve) CompositeCurve() const; + + //! Returns Value as Path (or Null if another type) + Standard_EXPORT Handle(StepShape_Path) Path() const; + +}; +#endif // _StepVisual_PathOrCompositeCurve_HeaderFile diff --git a/src/StepVisual/StepVisual_TessellatedConnectingEdge.cxx b/src/StepVisual/StepVisual_TessellatedConnectingEdge.cxx new file mode 100644 index 0000000000..51cb4bbace --- /dev/null +++ b/src/StepVisual/StepVisual_TessellatedConnectingEdge.cxx @@ -0,0 +1,213 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 + +IMPLEMENT_STANDARD_RTTIEXT(StepVisual_TessellatedConnectingEdge, StepVisual_TessellatedEdge) + +//======================================================================= +//function : StepVisual_TessellatedConnectingEdge +//purpose : +//======================================================================= + +StepVisual_TessellatedConnectingEdge::StepVisual_TessellatedConnectingEdge () +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= + +void StepVisual_TessellatedConnectingEdge::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepVisual_CoordinatesList)& theTessellatedEdge_Coordinates, + const Standard_Boolean theHasTessellatedEdge_GeometricLink, + const StepVisual_EdgeOrCurve& theTessellatedEdge_GeometricLink, + const Handle(TColStd_HArray1OfInteger)& theTessellatedEdge_LineStrip, + const StepData_Logical theSmooth, + const Handle(StepVisual_TessellatedFace)& theFace1, + const Handle(StepVisual_TessellatedFace)& theFace2, + const Handle(TColStd_HArray1OfInteger)& theLineStripFace1, + const Handle(TColStd_HArray1OfInteger)& theLineStripFace2) +{ + StepVisual_TessellatedEdge::Init(theRepresentationItem_Name, + theTessellatedEdge_Coordinates, + theHasTessellatedEdge_GeometricLink, + theTessellatedEdge_GeometricLink, + theTessellatedEdge_LineStrip); + + mySmooth = theSmooth; + + myFace1 = theFace1; + + myFace2 = theFace2; + + myLineStripFace1 = theLineStripFace1; + + myLineStripFace2 = theLineStripFace2; +} + +//======================================================================= +//function : Smooth +//purpose : +//======================================================================= + +StepData_Logical StepVisual_TessellatedConnectingEdge::Smooth () const +{ + return mySmooth; +} + +//======================================================================= +//function : SetSmooth +//purpose : +//======================================================================= + +void StepVisual_TessellatedConnectingEdge::SetSmooth(const StepData_Logical theSmooth) +{ + mySmooth = theSmooth; +} + +//======================================================================= +//function : Face1 +//purpose : +//======================================================================= + +Handle(StepVisual_TessellatedFace) StepVisual_TessellatedConnectingEdge::Face1 () const +{ + return myFace1; +} + +//======================================================================= +//function : SetFace1 +//purpose : +//======================================================================= + +void StepVisual_TessellatedConnectingEdge::SetFace1(const Handle(StepVisual_TessellatedFace)& theFace1) +{ + myFace1 = theFace1; +} + +//======================================================================= +//function : Face2 +//purpose : +//======================================================================= + +Handle(StepVisual_TessellatedFace) StepVisual_TessellatedConnectingEdge::Face2 () const +{ + return myFace2; +} + +//======================================================================= +//function : SetFace2 +//purpose : +//======================================================================= + +void StepVisual_TessellatedConnectingEdge::SetFace2(const Handle(StepVisual_TessellatedFace)& theFace2) +{ + myFace2 = theFace2; +} + +//======================================================================= +//function : LineStripFace1 +//purpose : +//======================================================================= + +Handle(TColStd_HArray1OfInteger) StepVisual_TessellatedConnectingEdge::LineStripFace1 () const +{ + return myLineStripFace1; +} + +//======================================================================= +//function : SetLineStripFace1 +//purpose : +//======================================================================= + +void StepVisual_TessellatedConnectingEdge::SetLineStripFace1(const Handle(TColStd_HArray1OfInteger)& theLineStripFace1) +{ + myLineStripFace1 = theLineStripFace1; +} + + +//======================================================================= +//function : NbLineStripFace1 +//purpose : +//======================================================================= + +Standard_Integer StepVisual_TessellatedConnectingEdge::NbLineStripFace1() const +{ + if (myLineStripFace1.IsNull()) + { + return 0; + } + return myLineStripFace1->Length(); +} + + +//======================================================================= +//function : LineStripFace1Value +//purpose : +//======================================================================= + +Standard_Integer StepVisual_TessellatedConnectingEdge::LineStripFace1Value(const Standard_Integer theNum) const +{ + return myLineStripFace1->Value(theNum); +} + +//======================================================================= +//function : LineStripFace2 +//purpose : +//======================================================================= + +Handle(TColStd_HArray1OfInteger) StepVisual_TessellatedConnectingEdge::LineStripFace2 () const +{ + return myLineStripFace2; +} + +//======================================================================= +//function : SetLineStripFace2 +//purpose : +//======================================================================= + +void StepVisual_TessellatedConnectingEdge::SetLineStripFace2(const Handle(TColStd_HArray1OfInteger)& theLineStripFace2) +{ + myLineStripFace2 = theLineStripFace2; +} + + +//======================================================================= +//function : NbLineStripFace2 +//purpose : +//======================================================================= + +Standard_Integer StepVisual_TessellatedConnectingEdge::NbLineStripFace2() const +{ + if (myLineStripFace2.IsNull()) + { + return 0; + } + return myLineStripFace2->Length(); +} + + +//======================================================================= +//function : LineStripFace2Value +//purpose : +//======================================================================= + +Standard_Integer StepVisual_TessellatedConnectingEdge::LineStripFace2Value(const Standard_Integer theNum) const +{ + return myLineStripFace2->Value(theNum); +} diff --git a/src/StepVisual/StepVisual_TessellatedConnectingEdge.hxx b/src/StepVisual/StepVisual_TessellatedConnectingEdge.hxx new file mode 100644 index 0000000000..d240baf80d --- /dev/null +++ b/src/StepVisual/StepVisual_TessellatedConnectingEdge.hxx @@ -0,0 +1,105 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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_TessellatedConnectingEdge_HeaderFile_ +#define _StepVisual_TessellatedConnectingEdge_HeaderFile_ + +#include +#include +#include + +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepVisual_TessellatedConnectingEdge, StepVisual_TessellatedEdge) + +//! Representation of STEP entity TessellatedConnectingEdge +class StepVisual_TessellatedConnectingEdge : public StepVisual_TessellatedEdge +{ + +public : + + //! default constructor + Standard_EXPORT StepVisual_TessellatedConnectingEdge(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepVisual_CoordinatesList)& theTessellatedEdge_Coordinates, + const Standard_Boolean theHasTessellatedEdge_GeometricLink, + const StepVisual_EdgeOrCurve& theTessellatedEdge_GeometricLink, + const Handle(TColStd_HArray1OfInteger)& theTessellatedEdge_LineStrip, + const StepData_Logical theSmooth, + const Handle(StepVisual_TessellatedFace)& theFace1, + const Handle(StepVisual_TessellatedFace)& theFace2, + const Handle(TColStd_HArray1OfInteger)& theLineStripFace1, + const Handle(TColStd_HArray1OfInteger)& theLineStripFace2); + + //! Returns field Smooth + Standard_EXPORT StepData_Logical Smooth() const; + + //! Sets field Smooth + Standard_EXPORT void SetSmooth (const StepData_Logical theSmooth); + + //! Returns field Face1 + Standard_EXPORT Handle(StepVisual_TessellatedFace) Face1() const; + + //! Sets field Face1 + Standard_EXPORT void SetFace1 (const Handle(StepVisual_TessellatedFace)& theFace1); + + //! Returns field Face2 + Standard_EXPORT Handle(StepVisual_TessellatedFace) Face2() const; + + //! Sets field Face2 + Standard_EXPORT void SetFace2 (const Handle(StepVisual_TessellatedFace)& theFace2); + + //! Returns field LineStripFace1 + Standard_EXPORT Handle(TColStd_HArray1OfInteger) LineStripFace1() const; + + //! Sets field LineStripFace1 + Standard_EXPORT void SetLineStripFace1 (const Handle(TColStd_HArray1OfInteger)& theLineStripFace1); + + //! Returns number of LineStripFace1 + Standard_EXPORT Standard_Integer NbLineStripFace1() const; + + //! Returns value of LineStripFace1 by its num + Standard_EXPORT Standard_Integer LineStripFace1Value(const Standard_Integer theNum) const; + + //! Returns field LineStripFace2 + Standard_EXPORT Handle(TColStd_HArray1OfInteger) LineStripFace2() const; + + //! Sets field LineStripFace2 + Standard_EXPORT void SetLineStripFace2 (const Handle(TColStd_HArray1OfInteger)& theLineStripFace2); + + //! Returns number of LineStripFace2 + Standard_EXPORT Standard_Integer NbLineStripFace2() const; + + //! Returns value of LineStripFace2 by its num + Standard_EXPORT Standard_Integer LineStripFace2Value(const Standard_Integer theNum) const; + + DEFINE_STANDARD_RTTIEXT(StepVisual_TessellatedConnectingEdge, StepVisual_TessellatedEdge) + +private: + + StepData_Logical mySmooth; + Handle(StepVisual_TessellatedFace) myFace1; + Handle(StepVisual_TessellatedFace) myFace2; + Handle(TColStd_HArray1OfInteger) myLineStripFace1; + Handle(TColStd_HArray1OfInteger) myLineStripFace2; + +}; + +#endif // _StepVisual_TessellatedConnectingEdge_HeaderFile_ diff --git a/src/StepVisual/StepVisual_TessellatedEdge.cxx b/src/StepVisual/StepVisual_TessellatedEdge.cxx new file mode 100644 index 0000000000..7096b10ba0 --- /dev/null +++ b/src/StepVisual/StepVisual_TessellatedEdge.cxx @@ -0,0 +1,153 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 + +IMPLEMENT_STANDARD_RTTIEXT(StepVisual_TessellatedEdge, StepVisual_TessellatedStructuredItem) + +//======================================================================= +//function : StepVisual_TessellatedEdge +//purpose : +//======================================================================= + +StepVisual_TessellatedEdge::StepVisual_TessellatedEdge () +{ + myHasGeometricLink = Standard_False; +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= + +void StepVisual_TessellatedEdge::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepVisual_CoordinatesList)& theCoordinates, + const Standard_Boolean theHasGeometricLink, + const StepVisual_EdgeOrCurve& theGeometricLink, + const Handle(TColStd_HArray1OfInteger)& theLineStrip) +{ + StepVisual_TessellatedStructuredItem::Init(theRepresentationItem_Name); + + myCoordinates = theCoordinates; + + myHasGeometricLink = theHasGeometricLink; + if (myHasGeometricLink) + { + myGeometricLink = theGeometricLink; + } + else + { + myGeometricLink = StepVisual_EdgeOrCurve(); + } + + myLineStrip = theLineStrip; +} + +//======================================================================= +//function : Coordinates +//purpose : +//======================================================================= + +Handle(StepVisual_CoordinatesList) StepVisual_TessellatedEdge::Coordinates () const +{ + return myCoordinates; +} + +//======================================================================= +//function : SetCoordinates +//purpose : +//======================================================================= + +void StepVisual_TessellatedEdge::SetCoordinates(const Handle(StepVisual_CoordinatesList)& theCoordinates) +{ + myCoordinates = theCoordinates; +} + +//======================================================================= +//function : GeometricLink +//purpose : +//======================================================================= + +StepVisual_EdgeOrCurve StepVisual_TessellatedEdge::GeometricLink () const +{ + return myGeometricLink; +} + +//======================================================================= +//function : SetGeometricLink +//purpose : +//======================================================================= + +void StepVisual_TessellatedEdge::SetGeometricLink(const StepVisual_EdgeOrCurve& theGeometricLink) +{ + myGeometricLink = theGeometricLink; +} + +//======================================================================= +//function : HasGeometricLink +//purpose : +//======================================================================= + +Standard_Boolean StepVisual_TessellatedEdge::HasGeometricLink () const +{ + return myHasGeometricLink; +} + +//======================================================================= +//function : LineStrip +//purpose : +//======================================================================= + +Handle(TColStd_HArray1OfInteger) StepVisual_TessellatedEdge::LineStrip () const +{ + return myLineStrip; +} + +//======================================================================= +//function : SetLineStrip +//purpose : +//======================================================================= + +void StepVisual_TessellatedEdge::SetLineStrip(const Handle(TColStd_HArray1OfInteger)& theLineStrip) +{ + myLineStrip = theLineStrip; +} + + +//======================================================================= +//function : NbLineStrip +//purpose : +//======================================================================= + +Standard_Integer StepVisual_TessellatedEdge::NbLineStrip() const +{ + if (myLineStrip.IsNull()) + { + return 0; + } + return myLineStrip->Length(); +} + + +//======================================================================= +//function : LineStripValue +//purpose : +//======================================================================= + +Standard_Integer StepVisual_TessellatedEdge::LineStripValue(const Standard_Integer theNum) const +{ + return myLineStrip->Value(theNum); +} diff --git a/src/StepVisual/StepVisual_TessellatedEdge.hxx b/src/StepVisual/StepVisual_TessellatedEdge.hxx new file mode 100644 index 0000000000..70a3ced02a --- /dev/null +++ b/src/StepVisual/StepVisual_TessellatedEdge.hxx @@ -0,0 +1,84 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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_TessellatedEdge_HeaderFile_ +#define _StepVisual_TessellatedEdge_HeaderFile_ + +#include +#include +#include + +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepVisual_TessellatedEdge, StepVisual_TessellatedStructuredItem) + +//! Representation of STEP entity TessellatedEdge +class StepVisual_TessellatedEdge : public StepVisual_TessellatedStructuredItem +{ + +public : + + //! default constructor + Standard_EXPORT StepVisual_TessellatedEdge(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepVisual_CoordinatesList)& theCoordinates, + const Standard_Boolean theHasGeometricLink, + const StepVisual_EdgeOrCurve& theGeometricLink, + const Handle(TColStd_HArray1OfInteger)& theLineStrip); + + //! Returns field Coordinates + Standard_EXPORT Handle(StepVisual_CoordinatesList) Coordinates() const; + + //! Sets field Coordinates + Standard_EXPORT void SetCoordinates (const Handle(StepVisual_CoordinatesList)& theCoordinates); + + //! Returns field GeometricLink + Standard_EXPORT StepVisual_EdgeOrCurve GeometricLink() const; + + //! Sets field GeometricLink + Standard_EXPORT void SetGeometricLink (const StepVisual_EdgeOrCurve& theGeometricLink); + + //! Returns True if optional field GeometricLink is defined + Standard_EXPORT Standard_Boolean HasGeometricLink() const; + + //! Returns field LineStrip + Standard_EXPORT Handle(TColStd_HArray1OfInteger) LineStrip() const; + + //! Sets field LineStrip + Standard_EXPORT void SetLineStrip (const Handle(TColStd_HArray1OfInteger)& theLineStrip); + + //! Returns number of LineStrip + Standard_EXPORT Standard_Integer NbLineStrip() const; + + //! Returns value of LineStrip by its num + Standard_EXPORT Standard_Integer LineStripValue(const Standard_Integer theNum) const; + + DEFINE_STANDARD_RTTIEXT(StepVisual_TessellatedEdge, StepVisual_TessellatedStructuredItem) + +private: + + Handle(StepVisual_CoordinatesList) myCoordinates; + StepVisual_EdgeOrCurve myGeometricLink; //!< optional + Handle(TColStd_HArray1OfInteger) myLineStrip; + Standard_Boolean myHasGeometricLink; //!< flag "is GeometricLink defined" + +}; + +#endif // _StepVisual_TessellatedEdge_HeaderFile_ diff --git a/src/StepVisual/StepVisual_TessellatedEdgeOrVertex.cxx b/src/StepVisual/StepVisual_TessellatedEdgeOrVertex.cxx new file mode 100644 index 0000000000..b3f1c67aff --- /dev/null +++ b/src/StepVisual/StepVisual_TessellatedEdgeOrVertex.cxx @@ -0,0 +1,61 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 +#include +#include + +//======================================================================= +//function : StepVisual_TessellatedEdgeOrVertex +//purpose : +//======================================================================= + +StepVisual_TessellatedEdgeOrVertex::StepVisual_TessellatedEdgeOrVertex () +{ +} + +//======================================================================= +//function : CaseNum +//purpose : +//======================================================================= + +Standard_Integer StepVisual_TessellatedEdgeOrVertex::CaseNum (const Handle(Standard_Transient)& ent) const +{ + if (ent.IsNull()) return 0; + if (ent->IsKind(STANDARD_TYPE(StepVisual_TessellatedEdge))) return 1; + if (ent->IsKind(STANDARD_TYPE(StepVisual_TessellatedVertex))) return 2; + return 0; +} + +//======================================================================= +//function : TessellatedEdge +//purpose : +//======================================================================= + +Handle(StepVisual_TessellatedEdge) StepVisual_TessellatedEdgeOrVertex::TessellatedEdge () const +{ + return Handle(StepVisual_TessellatedEdge)::DownCast(Value()); +} + +//======================================================================= +//function : TessellatedVertex +//purpose : +//======================================================================= + +Handle(StepVisual_TessellatedVertex) StepVisual_TessellatedEdgeOrVertex::TessellatedVertex () const +{ + return Handle(StepVisual_TessellatedVertex)::DownCast(Value()); +} diff --git a/src/StepVisual/StepVisual_TessellatedEdgeOrVertex.hxx b/src/StepVisual/StepVisual_TessellatedEdgeOrVertex.hxx new file mode 100644 index 0000000000..20a803755e --- /dev/null +++ b/src/StepVisual/StepVisual_TessellatedEdgeOrVertex.hxx @@ -0,0 +1,53 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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_TessellatedEdgeOrVertex_HeaderFile +#define _StepVisual_TessellatedEdgeOrVertex_HeaderFile + +#include +#include +#include +#include +#include + +class Standard_Transient; +class StepVisual_TessellatedEdge; +class StepVisual_TessellatedVertex; + +//! Representation of STEP SELECT type TessellatedEdgeOrVertex +class StepVisual_TessellatedEdgeOrVertex : public StepData_SelectType +{ + +public: + + DEFINE_STANDARD_ALLOC + + //! Empty constructor + Standard_EXPORT StepVisual_TessellatedEdgeOrVertex(); + + //! Recognizes a kind of TessellatedEdgeOrVertex select type + //! -- 1 -> TessellatedEdge + //! -- 2 -> TessellatedVertex + Standard_EXPORT Standard_Integer CaseNum (const Handle(Standard_Transient)& ent) const Standard_OVERRIDE; + + //! Returns Value as TessellatedEdge (or Null if another type) + Standard_EXPORT Handle(StepVisual_TessellatedEdge) TessellatedEdge() const; + + //! Returns Value as TessellatedVertex (or Null if another type) + Standard_EXPORT Handle(StepVisual_TessellatedVertex) TessellatedVertex() const; + +}; +#endif // _StepVisual_TessellatedEdgeOrVertex_HeaderFile diff --git a/src/StepVisual/StepVisual_TessellatedFace.cxx b/src/StepVisual/StepVisual_TessellatedFace.cxx new file mode 100644 index 0000000000..1432d69d95 --- /dev/null +++ b/src/StepVisual/StepVisual_TessellatedFace.cxx @@ -0,0 +1,164 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 + +IMPLEMENT_STANDARD_RTTIEXT(StepVisual_TessellatedFace, StepVisual_TessellatedStructuredItem) + +//======================================================================= +//function : StepVisual_TessellatedFace +//purpose : +//======================================================================= + +StepVisual_TessellatedFace::StepVisual_TessellatedFace () +{ + myHasGeometricLink = Standard_False; +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= + +void StepVisual_TessellatedFace::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepVisual_CoordinatesList)& theCoordinates, + const Standard_Integer thePnmax, + const Handle(TColStd_HArray2OfReal)& theNormals, + const Standard_Boolean theHasGeometricLink, + const StepVisual_FaceOrSurface& theGeometricLink) +{ + StepVisual_TessellatedStructuredItem::Init(theRepresentationItem_Name); + + myCoordinates = theCoordinates; + + myPnmax = thePnmax; + + myNormals = theNormals; + + myHasGeometricLink = theHasGeometricLink; + if (myHasGeometricLink) + { + myGeometricLink = theGeometricLink; + } + else + { + myGeometricLink = StepVisual_FaceOrSurface(); + } +} + +//======================================================================= +//function : Coordinates +//purpose : +//======================================================================= + +Handle(StepVisual_CoordinatesList) StepVisual_TessellatedFace::Coordinates () const +{ + return myCoordinates; +} + +//======================================================================= +//function : SetCoordinates +//purpose : +//======================================================================= + +void StepVisual_TessellatedFace::SetCoordinates(const Handle(StepVisual_CoordinatesList)& theCoordinates) +{ + myCoordinates = theCoordinates; +} + +//======================================================================= +//function : Pnmax +//purpose : +//======================================================================= + +Standard_Integer StepVisual_TessellatedFace::Pnmax () const +{ + return myPnmax; +} + +//======================================================================= +//function : SetPnmax +//purpose : +//======================================================================= + +void StepVisual_TessellatedFace::SetPnmax(const Standard_Integer thePnmax) +{ + myPnmax = thePnmax; +} + +//======================================================================= +//function : Normals +//purpose : +//======================================================================= + +Handle(TColStd_HArray2OfReal) StepVisual_TessellatedFace::Normals () const +{ + return myNormals; +} + +//======================================================================= +//function : SetNormals +//purpose : +//======================================================================= + +void StepVisual_TessellatedFace::SetNormals(const Handle(TColStd_HArray2OfReal)& theNormals) +{ + myNormals = theNormals; +} + +//======================================================================= +//function : NbNormals +//purpose : +//======================================================================= + +Standard_Integer StepVisual_TessellatedFace::NbNormals() const +{ + if (myNormals.IsNull()) + { + return 0; + } + return myNormals->ColLength(); +} + +//======================================================================= +//function : GeometricLink +//purpose : +//======================================================================= + +StepVisual_FaceOrSurface StepVisual_TessellatedFace::GeometricLink () const +{ + return myGeometricLink; +} + +//======================================================================= +//function : SetGeometricLink +//purpose : +//======================================================================= + +void StepVisual_TessellatedFace::SetGeometricLink(const StepVisual_FaceOrSurface& theGeometricLink) +{ + myGeometricLink = theGeometricLink; +} + +//======================================================================= +//function : HasGeometricLink +//purpose : +//======================================================================= + +Standard_Boolean StepVisual_TessellatedFace::HasGeometricLink () const +{ + return myHasGeometricLink; +} diff --git a/src/StepVisual/StepVisual_TessellatedFace.hxx b/src/StepVisual/StepVisual_TessellatedFace.hxx new file mode 100644 index 0000000000..9386ed3822 --- /dev/null +++ b/src/StepVisual/StepVisual_TessellatedFace.hxx @@ -0,0 +1,89 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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_TessellatedFace_HeaderFile_ +#define _StepVisual_TessellatedFace_HeaderFile_ + +#include +#include +#include + +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepVisual_TessellatedFace, StepVisual_TessellatedStructuredItem) + +//! Representation of STEP entity TessellatedFace +class StepVisual_TessellatedFace : public StepVisual_TessellatedStructuredItem +{ + +public : + + //! default constructor + Standard_EXPORT StepVisual_TessellatedFace(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepVisual_CoordinatesList)& theCoordinates, + const Standard_Integer thePnmax, + const Handle(TColStd_HArray2OfReal)& theNormals, + const Standard_Boolean theHasGeometricLink, + const StepVisual_FaceOrSurface& theGeometricLink); + + //! Returns field Coordinates + Standard_EXPORT Handle(StepVisual_CoordinatesList) Coordinates() const; + + //! Sets field Coordinates + Standard_EXPORT void SetCoordinates (const Handle(StepVisual_CoordinatesList)& theCoordinates); + + //! Returns field Pnmax + Standard_EXPORT Standard_Integer Pnmax() const; + + //! Sets field Pnmax + Standard_EXPORT void SetPnmax (const Standard_Integer thePnmax); + + //! Returns field Normals + Standard_EXPORT Handle(TColStd_HArray2OfReal) Normals() const; + + //! Sets field Normals + Standard_EXPORT void SetNormals (const Handle(TColStd_HArray2OfReal)& theNormals); + + //! Returns number of Normals + Standard_EXPORT Standard_Integer NbNormals() const; + + //! Returns field GeometricLink + Standard_EXPORT StepVisual_FaceOrSurface GeometricLink() const; + + //! Sets field GeometricLink + Standard_EXPORT void SetGeometricLink (const StepVisual_FaceOrSurface& theGeometricLink); + + //! Returns True if optional field GeometricLink is defined + Standard_EXPORT Standard_Boolean HasGeometricLink() const; + + DEFINE_STANDARD_RTTIEXT(StepVisual_TessellatedFace, StepVisual_TessellatedStructuredItem) + +private: + + Handle(StepVisual_CoordinatesList) myCoordinates; + Standard_Integer myPnmax; + Handle(TColStd_HArray2OfReal) myNormals; + StepVisual_FaceOrSurface myGeometricLink; //!< optional + Standard_Boolean myHasGeometricLink; //!< flag "is GeometricLink defined" + +}; + +#endif // _StepVisual_TessellatedFace_HeaderFile_ diff --git a/src/StepVisual/StepVisual_TessellatedPointSet.cxx b/src/StepVisual/StepVisual_TessellatedPointSet.cxx new file mode 100644 index 0000000000..6950c9e422 --- /dev/null +++ b/src/StepVisual/StepVisual_TessellatedPointSet.cxx @@ -0,0 +1,110 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 + +IMPLEMENT_STANDARD_RTTIEXT(StepVisual_TessellatedPointSet, StepVisual_TessellatedItem) + +//======================================================================= +//function : StepVisual_TessellatedPointSet +//purpose : +//======================================================================= + +StepVisual_TessellatedPointSet::StepVisual_TessellatedPointSet () +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= + +void StepVisual_TessellatedPointSet::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepVisual_CoordinatesList)& theCoordinates, + const Handle(TColStd_HArray1OfInteger)& thePointList) +{ + StepVisual_TessellatedItem::Init(theRepresentationItem_Name); + + myCoordinates = theCoordinates; + + myPointList = thePointList; +} + +//======================================================================= +//function : Coordinates +//purpose : +//======================================================================= + +Handle(StepVisual_CoordinatesList) StepVisual_TessellatedPointSet::Coordinates () const +{ + return myCoordinates; +} + +//======================================================================= +//function : SetCoordinates +//purpose : +//======================================================================= + +void StepVisual_TessellatedPointSet::SetCoordinates(const Handle(StepVisual_CoordinatesList)& theCoordinates) +{ + myCoordinates = theCoordinates; +} + +//======================================================================= +//function : PointList +//purpose : +//======================================================================= + +Handle(TColStd_HArray1OfInteger) StepVisual_TessellatedPointSet::PointList () const +{ + return myPointList; +} + +//======================================================================= +//function : SetPointList +//purpose : +//======================================================================= + +void StepVisual_TessellatedPointSet::SetPointList(const Handle(TColStd_HArray1OfInteger)& thePointList) +{ + myPointList = thePointList; +} + + +//======================================================================= +//function : NbPointList +//purpose : +//======================================================================= + +Standard_Integer StepVisual_TessellatedPointSet::NbPointList() const +{ + if (myPointList.IsNull()) + { + return 0; + } + return myPointList->Length(); +} + + +//======================================================================= +//function : PointListValue +//purpose : +//======================================================================= + +Standard_Integer StepVisual_TessellatedPointSet::PointListValue(const Standard_Integer theNum) const +{ + return myPointList->Value(theNum); +} diff --git a/src/StepVisual/StepVisual_TessellatedPointSet.hxx b/src/StepVisual/StepVisual_TessellatedPointSet.hxx new file mode 100644 index 0000000000..5f5595055b --- /dev/null +++ b/src/StepVisual/StepVisual_TessellatedPointSet.hxx @@ -0,0 +1,70 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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_TessellatedPointSet_HeaderFile_ +#define _StepVisual_TessellatedPointSet_HeaderFile_ + +#include +#include +#include + +#include +#include + +DEFINE_STANDARD_HANDLE(StepVisual_TessellatedPointSet, StepVisual_TessellatedItem) + +//! Representation of STEP entity TessellatedPointSet +class StepVisual_TessellatedPointSet : public StepVisual_TessellatedItem +{ + +public : + + //! default constructor + Standard_EXPORT StepVisual_TessellatedPointSet(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepVisual_CoordinatesList)& theCoordinates, + const Handle(TColStd_HArray1OfInteger)& thePointList); + + //! Returns field Coordinates + Standard_EXPORT Handle(StepVisual_CoordinatesList) Coordinates() const; + + //! Sets field Coordinates + Standard_EXPORT void SetCoordinates (const Handle(StepVisual_CoordinatesList)& theCoordinates); + + //! Returns field PointList + Standard_EXPORT Handle(TColStd_HArray1OfInteger) PointList() const; + + //! Sets field PointList + Standard_EXPORT void SetPointList (const Handle(TColStd_HArray1OfInteger)& thePointList); + + //! Returns number of PointList + Standard_EXPORT Standard_Integer NbPointList() const; + + //! Returns value of PointList by its num + Standard_EXPORT Standard_Integer PointListValue(const Standard_Integer theNum) const; + + DEFINE_STANDARD_RTTIEXT(StepVisual_TessellatedPointSet, StepVisual_TessellatedItem) + +private: + + Handle(StepVisual_CoordinatesList) myCoordinates; + Handle(TColStd_HArray1OfInteger) myPointList; + +}; + +#endif // _StepVisual_TessellatedPointSet_HeaderFile_ diff --git a/src/StepVisual/StepVisual_TessellatedShapeRepresentation.cxx b/src/StepVisual/StepVisual_TessellatedShapeRepresentation.cxx new file mode 100644 index 0000000000..af9b81980b --- /dev/null +++ b/src/StepVisual/StepVisual_TessellatedShapeRepresentation.cxx @@ -0,0 +1,28 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 + +IMPLEMENT_STANDARD_RTTIEXT(StepVisual_TessellatedShapeRepresentation, StepShape_ShapeRepresentation) + +//======================================================================= +//function : StepVisual_TessellatedShapeRepresentation +//purpose : +//======================================================================= + +StepVisual_TessellatedShapeRepresentation::StepVisual_TessellatedShapeRepresentation () +{ +} diff --git a/src/StepVisual/StepVisual_TessellatedShapeRepresentation.hxx b/src/StepVisual/StepVisual_TessellatedShapeRepresentation.hxx new file mode 100644 index 0000000000..579c8b9d1f --- /dev/null +++ b/src/StepVisual/StepVisual_TessellatedShapeRepresentation.hxx @@ -0,0 +1,40 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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_TessellatedShapeRepresentation_HeaderFile_ +#define _StepVisual_TessellatedShapeRepresentation_HeaderFile_ + +#include +#include +#include + + +DEFINE_STANDARD_HANDLE(StepVisual_TessellatedShapeRepresentation, StepShape_ShapeRepresentation) + +//! Representation of STEP entity TessellatedShapeRepresentation +class StepVisual_TessellatedShapeRepresentation : public StepShape_ShapeRepresentation +{ + +public : + + //! default constructor + Standard_EXPORT StepVisual_TessellatedShapeRepresentation(); + + DEFINE_STANDARD_RTTIEXT(StepVisual_TessellatedShapeRepresentation, StepShape_ShapeRepresentation) + +}; + +#endif // _StepVisual_TessellatedShapeRepresentation_HeaderFile_ diff --git a/src/StepVisual/StepVisual_TessellatedShapeRepresentationWithAccuracyParameters.cxx b/src/StepVisual/StepVisual_TessellatedShapeRepresentationWithAccuracyParameters.cxx new file mode 100644 index 0000000000..99ba3d35d9 --- /dev/null +++ b/src/StepVisual/StepVisual_TessellatedShapeRepresentationWithAccuracyParameters.cxx @@ -0,0 +1,91 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 + +IMPLEMENT_STANDARD_RTTIEXT(StepVisual_TessellatedShapeRepresentationWithAccuracyParameters, StepVisual_TessellatedShapeRepresentation) + +//======================================================================= +//function : StepVisual_TessellatedShapeRepresentationWithAccuracyParameters +//purpose : +//======================================================================= + +StepVisual_TessellatedShapeRepresentationWithAccuracyParameters::StepVisual_TessellatedShapeRepresentationWithAccuracyParameters () +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= + +void StepVisual_TessellatedShapeRepresentationWithAccuracyParameters::Init (const Handle(TCollection_HAsciiString)& theRepresentation_Name, + const Handle(StepRepr_HArray1OfRepresentationItem)& theRepresentation_Items, + const Handle(StepRepr_RepresentationContext)& theRepresentation_ContextOfItems, + const Handle(TColStd_HArray1OfReal)& theTessellationAccuracyParameters) +{ + StepVisual_TessellatedShapeRepresentation::Init(theRepresentation_Name, + theRepresentation_Items, + theRepresentation_ContextOfItems); + + myTessellationAccuracyParameters = theTessellationAccuracyParameters; +} + +//======================================================================= +//function : TessellationAccuracyParameters +//purpose : +//======================================================================= + +Handle(TColStd_HArray1OfReal) StepVisual_TessellatedShapeRepresentationWithAccuracyParameters::TessellationAccuracyParameters () const +{ + return myTessellationAccuracyParameters; +} + +//======================================================================= +//function : SetTessellationAccuracyParameters +//purpose : +//======================================================================= + +void StepVisual_TessellatedShapeRepresentationWithAccuracyParameters::SetTessellationAccuracyParameters(const Handle(TColStd_HArray1OfReal)& theTessellationAccuracyParameters) +{ + myTessellationAccuracyParameters = theTessellationAccuracyParameters; +} + + +//======================================================================= +//function : NbTessellationAccuracyParameters +//purpose : +//======================================================================= + +Standard_Integer StepVisual_TessellatedShapeRepresentationWithAccuracyParameters::NbTessellationAccuracyParameters() const +{ + if (myTessellationAccuracyParameters.IsNull()) + { + return 0; + } + return myTessellationAccuracyParameters->Length(); +} + + +//======================================================================= +//function : TessellationAccuracyParametersValue +//purpose : +//======================================================================= + +const Standard_Real& StepVisual_TessellatedShapeRepresentationWithAccuracyParameters::TessellationAccuracyParametersValue(const Standard_Integer theNum) const +{ + return myTessellationAccuracyParameters->Value(theNum); +} diff --git a/src/StepVisual/StepVisual_TessellatedShapeRepresentationWithAccuracyParameters.hxx b/src/StepVisual/StepVisual_TessellatedShapeRepresentationWithAccuracyParameters.hxx new file mode 100644 index 0000000000..25bd62915d --- /dev/null +++ b/src/StepVisual/StepVisual_TessellatedShapeRepresentationWithAccuracyParameters.hxx @@ -0,0 +1,62 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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_TessellatedShapeRepresentationWithAccuracyParameters_HeaderFile_ +#define _StepVisual_TessellatedShapeRepresentationWithAccuracyParameters_HeaderFile_ + +#include +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepVisual_TessellatedShapeRepresentationWithAccuracyParameters, StepVisual_TessellatedShapeRepresentation) + +//! Representation of STEP entity TessellatedShapeRepresentationWithAccuracyParameters +class StepVisual_TessellatedShapeRepresentationWithAccuracyParameters : public StepVisual_TessellatedShapeRepresentation +{ + +public : + + //! default constructor + Standard_EXPORT StepVisual_TessellatedShapeRepresentationWithAccuracyParameters(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentation_Name, + const Handle(StepRepr_HArray1OfRepresentationItem)& theRepresentation_Items, + const Handle(StepRepr_RepresentationContext)& theRepresentation_ContextOfItems, + const Handle(TColStd_HArray1OfReal)& theTessellationAccuracyParameters); + + //! Returns field TessellationAccuracyParameters + Standard_EXPORT Handle(TColStd_HArray1OfReal) TessellationAccuracyParameters() const; + + //! Sets field TessellationAccuracyParameters + Standard_EXPORT void SetTessellationAccuracyParameters (const Handle(TColStd_HArray1OfReal)& theTessellationAccuracyParameters); + + //! Returns number of TessellationAccuracyParameters + Standard_EXPORT Standard_Integer NbTessellationAccuracyParameters() const; + + //! Returns value of TessellationAccuracyParameters by its num + Standard_EXPORT const Standard_Real& TessellationAccuracyParametersValue(const Standard_Integer theNum) const; + + DEFINE_STANDARD_RTTIEXT(StepVisual_TessellatedShapeRepresentationWithAccuracyParameters, StepVisual_TessellatedShapeRepresentation) + +private: + + Handle(TColStd_HArray1OfReal) myTessellationAccuracyParameters; + +}; + +#endif // _StepVisual_TessellatedShapeRepresentationWithAccuracyParameters_HeaderFile_ diff --git a/src/StepVisual/StepVisual_TessellatedShell.cxx b/src/StepVisual/StepVisual_TessellatedShell.cxx new file mode 100644 index 0000000000..879282aba4 --- /dev/null +++ b/src/StepVisual/StepVisual_TessellatedShell.cxx @@ -0,0 +1,130 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 + +IMPLEMENT_STANDARD_RTTIEXT(StepVisual_TessellatedShell, StepVisual_TessellatedItem) + +//======================================================================= +//function : StepVisual_TessellatedShell +//purpose : +//======================================================================= + +StepVisual_TessellatedShell::StepVisual_TessellatedShell () +{ + myHasTopologicalLink = Standard_False; +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= + +void StepVisual_TessellatedShell::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepVisual_HArray1OfTessellatedStructuredItem)& theItems, + const Standard_Boolean theHasTopologicalLink, + const Handle(StepShape_ConnectedFaceSet)& theTopologicalLink) +{ + StepVisual_TessellatedItem::Init(theRepresentationItem_Name); + + myItems = theItems; + + myHasTopologicalLink = theHasTopologicalLink; + if (myHasTopologicalLink) + { + myTopologicalLink = theTopologicalLink; + } + else + { + myTopologicalLink.Nullify(); + } +} + +//======================================================================= +//function : Items +//purpose : +//======================================================================= + +Handle(StepVisual_HArray1OfTessellatedStructuredItem) StepVisual_TessellatedShell::Items () const +{ + return myItems; +} + +//======================================================================= +//function : SetItems +//purpose : +//======================================================================= + +void StepVisual_TessellatedShell::SetItems(const Handle(StepVisual_HArray1OfTessellatedStructuredItem)& theItems) +{ + myItems = theItems; +} + + +//======================================================================= +//function : NbItems +//purpose : +//======================================================================= + +Standard_Integer StepVisual_TessellatedShell::NbItems() const +{ + if (myItems.IsNull()) + { + return 0; + } + return myItems->Length(); +} + + +//======================================================================= +//function : ItemsValue +//purpose : +//======================================================================= + +Handle(StepVisual_TessellatedStructuredItem) StepVisual_TessellatedShell::ItemsValue(const Standard_Integer theNum) const +{ + return myItems->Value(theNum); +} + +//======================================================================= +//function : TopologicalLink +//purpose : +//======================================================================= + +Handle(StepShape_ConnectedFaceSet) StepVisual_TessellatedShell::TopologicalLink () const +{ + return myTopologicalLink; +} + +//======================================================================= +//function : SetTopologicalLink +//purpose : +//======================================================================= + +void StepVisual_TessellatedShell::SetTopologicalLink(const Handle(StepShape_ConnectedFaceSet)& theTopologicalLink) +{ + myTopologicalLink = theTopologicalLink; +} + +//======================================================================= +//function : HasTopologicalLink +//purpose : +//======================================================================= + +Standard_Boolean StepVisual_TessellatedShell::HasTopologicalLink () const +{ + return myHasTopologicalLink; +} diff --git a/src/StepVisual/StepVisual_TessellatedShell.hxx b/src/StepVisual/StepVisual_TessellatedShell.hxx new file mode 100644 index 0000000000..6b063e7b60 --- /dev/null +++ b/src/StepVisual/StepVisual_TessellatedShell.hxx @@ -0,0 +1,75 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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_TessellatedShell_HeaderFile_ +#define _StepVisual_TessellatedShell_HeaderFile_ + +#include +#include +#include + +#include +#include + +DEFINE_STANDARD_HANDLE(StepVisual_TessellatedShell, StepVisual_TessellatedItem) + +//! Representation of STEP entity TessellatedShell +class StepVisual_TessellatedShell : public StepVisual_TessellatedItem +{ + +public : + + //! default constructor + Standard_EXPORT StepVisual_TessellatedShell(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepVisual_HArray1OfTessellatedStructuredItem)& theItems, + const Standard_Boolean theHasTopologicalLink, + const Handle(StepShape_ConnectedFaceSet)& theTopologicalLink); + + //! Returns field Items + Standard_EXPORT Handle(StepVisual_HArray1OfTessellatedStructuredItem) Items() const; + + //! Sets field Items + Standard_EXPORT void SetItems (const Handle(StepVisual_HArray1OfTessellatedStructuredItem)& theItems); + + //! Returns number of Items + Standard_EXPORT Standard_Integer NbItems() const; + + //! Returns value of Items by its num + Standard_EXPORT Handle(StepVisual_TessellatedStructuredItem) ItemsValue(const Standard_Integer theNum) const; + + //! Returns field TopologicalLink + Standard_EXPORT Handle(StepShape_ConnectedFaceSet) TopologicalLink() const; + + //! Sets field TopologicalLink + Standard_EXPORT void SetTopologicalLink (const Handle(StepShape_ConnectedFaceSet)& theTopologicalLink); + + //! Returns True if optional field TopologicalLink is defined + Standard_EXPORT Standard_Boolean HasTopologicalLink() const; + + DEFINE_STANDARD_RTTIEXT(StepVisual_TessellatedShell, StepVisual_TessellatedItem) + +private: + + Handle(StepVisual_HArray1OfTessellatedStructuredItem) myItems; + Handle(StepShape_ConnectedFaceSet) myTopologicalLink; //!< optional + Standard_Boolean myHasTopologicalLink; //!< flag "is TopologicalLink defined" + +}; + +#endif // _StepVisual_TessellatedShell_HeaderFile_ diff --git a/src/StepVisual/StepVisual_TessellatedSolid.cxx b/src/StepVisual/StepVisual_TessellatedSolid.cxx new file mode 100644 index 0000000000..169ecd240d --- /dev/null +++ b/src/StepVisual/StepVisual_TessellatedSolid.cxx @@ -0,0 +1,130 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 + +IMPLEMENT_STANDARD_RTTIEXT(StepVisual_TessellatedSolid, StepVisual_TessellatedItem) + +//======================================================================= +//function : StepVisual_TessellatedSolid +//purpose : +//======================================================================= + +StepVisual_TessellatedSolid::StepVisual_TessellatedSolid () +{ + myHasGeometricLink = Standard_False; +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= + +void StepVisual_TessellatedSolid::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepVisual_HArray1OfTessellatedStructuredItem)& theItems, + const Standard_Boolean theHasGeometricLink, + const Handle(StepShape_ManifoldSolidBrep)& theGeometricLink) +{ + StepVisual_TessellatedItem::Init(theRepresentationItem_Name); + + myItems = theItems; + + myHasGeometricLink = theHasGeometricLink; + if (myHasGeometricLink) + { + myGeometricLink = theGeometricLink; + } + else + { + myGeometricLink.Nullify(); + } +} + +//======================================================================= +//function : Items +//purpose : +//======================================================================= + +Handle(StepVisual_HArray1OfTessellatedStructuredItem) StepVisual_TessellatedSolid::Items () const +{ + return myItems; +} + +//======================================================================= +//function : SetItems +//purpose : +//======================================================================= + +void StepVisual_TessellatedSolid::SetItems(const Handle(StepVisual_HArray1OfTessellatedStructuredItem)& theItems) +{ + myItems = theItems; +} + + +//======================================================================= +//function : NbItems +//purpose : +//======================================================================= + +Standard_Integer StepVisual_TessellatedSolid::NbItems() const +{ + if (myItems.IsNull()) + { + return 0; + } + return myItems->Length(); +} + + +//======================================================================= +//function : ItemsValue +//purpose : +//======================================================================= + +Handle(StepVisual_TessellatedStructuredItem) StepVisual_TessellatedSolid::ItemsValue(const Standard_Integer theNum) const +{ + return myItems->Value(theNum); +} + +//======================================================================= +//function : GeometricLink +//purpose : +//======================================================================= + +Handle(StepShape_ManifoldSolidBrep) StepVisual_TessellatedSolid::GeometricLink () const +{ + return myGeometricLink; +} + +//======================================================================= +//function : SetGeometricLink +//purpose : +//======================================================================= + +void StepVisual_TessellatedSolid::SetGeometricLink(const Handle(StepShape_ManifoldSolidBrep)& theGeometricLink) +{ + myGeometricLink = theGeometricLink; +} + +//======================================================================= +//function : HasGeometricLink +//purpose : +//======================================================================= + +Standard_Boolean StepVisual_TessellatedSolid::HasGeometricLink () const +{ + return myHasGeometricLink; +} diff --git a/src/StepVisual/StepVisual_TessellatedSolid.hxx b/src/StepVisual/StepVisual_TessellatedSolid.hxx new file mode 100644 index 0000000000..3ee205142b --- /dev/null +++ b/src/StepVisual/StepVisual_TessellatedSolid.hxx @@ -0,0 +1,75 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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_TessellatedSolid_HeaderFile_ +#define _StepVisual_TessellatedSolid_HeaderFile_ + +#include +#include +#include + +#include +#include + +DEFINE_STANDARD_HANDLE(StepVisual_TessellatedSolid, StepVisual_TessellatedItem) + +//! Representation of STEP entity TessellatedSolid +class StepVisual_TessellatedSolid : public StepVisual_TessellatedItem +{ + +public : + + //! default constructor + Standard_EXPORT StepVisual_TessellatedSolid(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepVisual_HArray1OfTessellatedStructuredItem)& theItems, + const Standard_Boolean theHasGeometricLink, + const Handle(StepShape_ManifoldSolidBrep)& theGeometricLink); + + //! Returns field Items + Standard_EXPORT Handle(StepVisual_HArray1OfTessellatedStructuredItem) Items() const; + + //! Sets field Items + Standard_EXPORT void SetItems (const Handle(StepVisual_HArray1OfTessellatedStructuredItem)& theItems); + + //! Returns number of Items + Standard_EXPORT Standard_Integer NbItems() const; + + //! Returns value of Items by its num + Standard_EXPORT Handle(StepVisual_TessellatedStructuredItem) ItemsValue(const Standard_Integer theNum) const; + + //! Returns field GeometricLink + Standard_EXPORT Handle(StepShape_ManifoldSolidBrep) GeometricLink() const; + + //! Sets field GeometricLink + Standard_EXPORT void SetGeometricLink (const Handle(StepShape_ManifoldSolidBrep)& theGeometricLink); + + //! Returns True if optional field GeometricLink is defined + Standard_EXPORT Standard_Boolean HasGeometricLink() const; + + DEFINE_STANDARD_RTTIEXT(StepVisual_TessellatedSolid, StepVisual_TessellatedItem) + +private: + + Handle(StepVisual_HArray1OfTessellatedStructuredItem) myItems; + Handle(StepShape_ManifoldSolidBrep) myGeometricLink; //!< optional + Standard_Boolean myHasGeometricLink; //!< flag "is GeometricLink defined" + +}; + +#endif // _StepVisual_TessellatedSolid_HeaderFile_ diff --git a/src/StepVisual/StepVisual_TessellatedStructuredItem.cxx b/src/StepVisual/StepVisual_TessellatedStructuredItem.cxx new file mode 100644 index 0000000000..3a609e6f54 --- /dev/null +++ b/src/StepVisual/StepVisual_TessellatedStructuredItem.cxx @@ -0,0 +1,28 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 + +IMPLEMENT_STANDARD_RTTIEXT(StepVisual_TessellatedStructuredItem, StepVisual_TessellatedItem) + +//======================================================================= +//function : StepVisual_TessellatedStructuredItem +//purpose : +//======================================================================= + +StepVisual_TessellatedStructuredItem::StepVisual_TessellatedStructuredItem () +{ +} diff --git a/src/StepVisual/StepVisual_TessellatedStructuredItem.hxx b/src/StepVisual/StepVisual_TessellatedStructuredItem.hxx new file mode 100644 index 0000000000..e2202aba86 --- /dev/null +++ b/src/StepVisual/StepVisual_TessellatedStructuredItem.hxx @@ -0,0 +1,40 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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_TessellatedStructuredItem_HeaderFile_ +#define _StepVisual_TessellatedStructuredItem_HeaderFile_ + +#include +#include +#include + + +DEFINE_STANDARD_HANDLE(StepVisual_TessellatedStructuredItem, StepVisual_TessellatedItem) + +//! Representation of STEP entity TessellatedStructuredItem +class StepVisual_TessellatedStructuredItem : public StepVisual_TessellatedItem +{ + +public : + + //! default constructor + Standard_EXPORT StepVisual_TessellatedStructuredItem(); + + DEFINE_STANDARD_RTTIEXT(StepVisual_TessellatedStructuredItem, StepVisual_TessellatedItem) + +}; + +#endif // _StepVisual_TessellatedStructuredItem_HeaderFile_ diff --git a/src/StepVisual/StepVisual_TessellatedSurfaceSet.cxx b/src/StepVisual/StepVisual_TessellatedSurfaceSet.cxx new file mode 100644 index 0000000000..da09e06e3b --- /dev/null +++ b/src/StepVisual/StepVisual_TessellatedSurfaceSet.cxx @@ -0,0 +1,121 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 + +IMPLEMENT_STANDARD_RTTIEXT(StepVisual_TessellatedSurfaceSet, StepVisual_TessellatedItem) + +//======================================================================= +//function : StepVisual_TessellatedSurfaceSet +//purpose : +//======================================================================= + +StepVisual_TessellatedSurfaceSet::StepVisual_TessellatedSurfaceSet () +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= + +void StepVisual_TessellatedSurfaceSet::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepVisual_CoordinatesList)& theCoordinates, + const Standard_Integer thePnmax, + const Handle(TColStd_HArray2OfReal)& theNormals) +{ + StepVisual_TessellatedItem::Init(theRepresentationItem_Name); + + myCoordinates = theCoordinates; + + myPnmax = thePnmax; + + myNormals = theNormals; +} + +//======================================================================= +//function : Coordinates +//purpose : +//======================================================================= + +Handle(StepVisual_CoordinatesList) StepVisual_TessellatedSurfaceSet::Coordinates () const +{ + return myCoordinates; +} + +//======================================================================= +//function : SetCoordinates +//purpose : +//======================================================================= + +void StepVisual_TessellatedSurfaceSet::SetCoordinates(const Handle(StepVisual_CoordinatesList)& theCoordinates) +{ + myCoordinates = theCoordinates; +} + +//======================================================================= +//function : Pnmax +//purpose : +//======================================================================= + +Standard_Integer StepVisual_TessellatedSurfaceSet::Pnmax () const +{ + return myPnmax; +} + +//======================================================================= +//function : SetPnmax +//purpose : +//======================================================================= + +void StepVisual_TessellatedSurfaceSet::SetPnmax(const Standard_Integer thePnmax) +{ + myPnmax = thePnmax; +} + +//======================================================================= +//function : Normals +//purpose : +//======================================================================= + +Handle(TColStd_HArray2OfReal) StepVisual_TessellatedSurfaceSet::Normals () const +{ + return myNormals; +} + +//======================================================================= +//function : SetNormals +//purpose : +//======================================================================= + +void StepVisual_TessellatedSurfaceSet::SetNormals(const Handle(TColStd_HArray2OfReal)& theNormals) +{ + myNormals = theNormals; +} + +//======================================================================= +//function : NbNormals +//purpose : +//======================================================================= + +Standard_Integer StepVisual_TessellatedSurfaceSet::NbNormals() const +{ + if (myNormals.IsNull()) + { + return 0; + } + return myNormals->ColLength(); +} \ No newline at end of file diff --git a/src/StepVisual/StepVisual_TessellatedSurfaceSet.hxx b/src/StepVisual/StepVisual_TessellatedSurfaceSet.hxx new file mode 100644 index 0000000000..436aa4645b --- /dev/null +++ b/src/StepVisual/StepVisual_TessellatedSurfaceSet.hxx @@ -0,0 +1,75 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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_TessellatedSurfaceSet_HeaderFile_ +#define _StepVisual_TessellatedSurfaceSet_HeaderFile_ + +#include +#include +#include + +#include +#include + +DEFINE_STANDARD_HANDLE(StepVisual_TessellatedSurfaceSet, StepVisual_TessellatedItem) + +//! Representation of STEP entity TessellatedSurfaceSet +class StepVisual_TessellatedSurfaceSet : public StepVisual_TessellatedItem +{ + +public : + + //! default constructor + Standard_EXPORT StepVisual_TessellatedSurfaceSet(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepVisual_CoordinatesList)& theCoordinates, + const Standard_Integer thePnmax, + const Handle(TColStd_HArray2OfReal)& theNormals); + + //! Returns field Coordinates + Standard_EXPORT Handle(StepVisual_CoordinatesList) Coordinates() const; + + //! Sets field Coordinates + Standard_EXPORT void SetCoordinates (const Handle(StepVisual_CoordinatesList)& theCoordinates); + + //! Returns field Pnmax + Standard_EXPORT Standard_Integer Pnmax() const; + + //! Sets field Pnmax + Standard_EXPORT void SetPnmax (const Standard_Integer thePnmax); + + //! Returns field Normals + Standard_EXPORT Handle(TColStd_HArray2OfReal) Normals() const; + + //! Sets field Normals + Standard_EXPORT void SetNormals (const Handle(TColStd_HArray2OfReal)& theNormals); + + //! Returns number of Normals + Standard_EXPORT Standard_Integer NbNormals() const; + + DEFINE_STANDARD_RTTIEXT(StepVisual_TessellatedSurfaceSet, StepVisual_TessellatedItem) + +private: + + Handle(StepVisual_CoordinatesList) myCoordinates; + Standard_Integer myPnmax; + Handle(TColStd_HArray2OfReal) myNormals; + +}; + +#endif // _StepVisual_TessellatedSurfaceSet_HeaderFile_ diff --git a/src/StepVisual/StepVisual_TessellatedVertex.cxx b/src/StepVisual/StepVisual_TessellatedVertex.cxx new file mode 100644 index 0000000000..59527941c3 --- /dev/null +++ b/src/StepVisual/StepVisual_TessellatedVertex.cxx @@ -0,0 +1,128 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 + +IMPLEMENT_STANDARD_RTTIEXT(StepVisual_TessellatedVertex, StepVisual_TessellatedStructuredItem) + +//======================================================================= +//function : StepVisual_TessellatedVertex +//purpose : +//======================================================================= + +StepVisual_TessellatedVertex::StepVisual_TessellatedVertex () +{ + myPointIndex = 0; + myHasTopologicalLink = Standard_False; +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= + +void StepVisual_TessellatedVertex::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepVisual_CoordinatesList)& theCoordinates, + const Standard_Boolean theHasTopologicalLink, + const Handle(StepShape_VertexPoint)& theTopologicalLink, + const Standard_Integer thePointIndex) +{ + StepVisual_TessellatedStructuredItem::Init(theRepresentationItem_Name); + + myCoordinates = theCoordinates; + + myHasTopologicalLink = theHasTopologicalLink; + if (myHasTopologicalLink) + { + myTopologicalLink = theTopologicalLink; + } + else + { + myTopologicalLink.Nullify(); + } + + myPointIndex = thePointIndex; +} + +//======================================================================= +//function : Coordinates +//purpose : +//======================================================================= + +Handle(StepVisual_CoordinatesList) StepVisual_TessellatedVertex::Coordinates () const +{ + return myCoordinates; +} + +//======================================================================= +//function : SetCoordinates +//purpose : +//======================================================================= + +void StepVisual_TessellatedVertex::SetCoordinates(const Handle(StepVisual_CoordinatesList)& theCoordinates) +{ + myCoordinates = theCoordinates; +} + +//======================================================================= +//function : TopologicalLink +//purpose : +//======================================================================= + +Handle(StepShape_VertexPoint) StepVisual_TessellatedVertex::TopologicalLink () const +{ + return myTopologicalLink; +} + +//======================================================================= +//function : SetTopologicalLink +//purpose : +//======================================================================= + +void StepVisual_TessellatedVertex::SetTopologicalLink(const Handle(StepShape_VertexPoint)& theTopologicalLink) +{ + myTopologicalLink = theTopologicalLink; +} + +//======================================================================= +//function : HasTopologicalLink +//purpose : +//======================================================================= + +Standard_Boolean StepVisual_TessellatedVertex::HasTopologicalLink () const +{ + return myHasTopologicalLink; +} + +//======================================================================= +//function : PointIndex +//purpose : +//======================================================================= + +Standard_Integer StepVisual_TessellatedVertex::PointIndex () const +{ + return myPointIndex; +} + +//======================================================================= +//function : SetPointIndex +//purpose : +//======================================================================= + +void StepVisual_TessellatedVertex::SetPointIndex(const Standard_Integer thePointIndex) +{ + myPointIndex = thePointIndex; +} diff --git a/src/StepVisual/StepVisual_TessellatedVertex.hxx b/src/StepVisual/StepVisual_TessellatedVertex.hxx new file mode 100644 index 0000000000..16f5ba1dfb --- /dev/null +++ b/src/StepVisual/StepVisual_TessellatedVertex.hxx @@ -0,0 +1,77 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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_TessellatedVertex_HeaderFile_ +#define _StepVisual_TessellatedVertex_HeaderFile_ + +#include +#include +#include + +#include +#include + +DEFINE_STANDARD_HANDLE(StepVisual_TessellatedVertex, StepVisual_TessellatedStructuredItem) + +//! Representation of STEP entity TessellatedVertex +class StepVisual_TessellatedVertex : public StepVisual_TessellatedStructuredItem +{ + +public : + + //! default constructor + Standard_EXPORT StepVisual_TessellatedVertex(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepVisual_CoordinatesList)& theCoordinates, + const Standard_Boolean theHasTopologicalLink, + const Handle(StepShape_VertexPoint)& theTopologicalLink, + const Standard_Integer thePointIndex); + + //! Returns field Coordinates + Standard_EXPORT Handle(StepVisual_CoordinatesList) Coordinates() const; + + //! Sets field Coordinates + Standard_EXPORT void SetCoordinates (const Handle(StepVisual_CoordinatesList)& theCoordinates); + + //! Returns field TopologicalLink + Standard_EXPORT Handle(StepShape_VertexPoint) TopologicalLink() const; + + //! Sets field TopologicalLink + Standard_EXPORT void SetTopologicalLink (const Handle(StepShape_VertexPoint)& theTopologicalLink); + + //! Returns True if optional field TopologicalLink is defined + Standard_EXPORT Standard_Boolean HasTopologicalLink() const; + + //! Returns field PointIndex + Standard_EXPORT Standard_Integer PointIndex() const; + + //! Sets field PointIndex + Standard_EXPORT void SetPointIndex (const Standard_Integer thePointIndex); + + DEFINE_STANDARD_RTTIEXT(StepVisual_TessellatedVertex, StepVisual_TessellatedStructuredItem) + +private: + + Handle(StepVisual_CoordinatesList) myCoordinates; + Handle(StepShape_VertexPoint) myTopologicalLink; //!< optional + Standard_Integer myPointIndex; + Standard_Boolean myHasTopologicalLink; //!< flag "is TopologicalLink defined" + +}; + +#endif // _StepVisual_TessellatedVertex_HeaderFile_ diff --git a/src/StepVisual/StepVisual_TessellatedWire.cxx b/src/StepVisual/StepVisual_TessellatedWire.cxx new file mode 100644 index 0000000000..bfb34eed41 --- /dev/null +++ b/src/StepVisual/StepVisual_TessellatedWire.cxx @@ -0,0 +1,130 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 + +IMPLEMENT_STANDARD_RTTIEXT(StepVisual_TessellatedWire, StepVisual_TessellatedItem) + +//======================================================================= +//function : StepVisual_TessellatedWire +//purpose : +//======================================================================= + +StepVisual_TessellatedWire::StepVisual_TessellatedWire () +{ + myHasGeometricModelLink = Standard_False; +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= + +void StepVisual_TessellatedWire::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepVisual_HArray1OfTessellatedEdgeOrVertex)& theItems, + const Standard_Boolean theHasGeometricModelLink, + const StepVisual_PathOrCompositeCurve& theGeometricModelLink) +{ + StepVisual_TessellatedItem::Init(theRepresentationItem_Name); + + myItems = theItems; + + myHasGeometricModelLink = theHasGeometricModelLink; + if (myHasGeometricModelLink) + { + myGeometricModelLink = theGeometricModelLink; + } + else + { + myGeometricModelLink = StepVisual_PathOrCompositeCurve(); + } +} + +//======================================================================= +//function : Items +//purpose : +//======================================================================= + +Handle(StepVisual_HArray1OfTessellatedEdgeOrVertex) StepVisual_TessellatedWire::Items () const +{ + return myItems; +} + +//======================================================================= +//function : SetItems +//purpose : +//======================================================================= + +void StepVisual_TessellatedWire::SetItems(const Handle(StepVisual_HArray1OfTessellatedEdgeOrVertex)& theItems) +{ + myItems = theItems; +} + + +//======================================================================= +//function : NbItems +//purpose : +//======================================================================= + +Standard_Integer StepVisual_TessellatedWire::NbItems() const +{ + if (myItems.IsNull()) + { + return 0; + } + return myItems->Length(); +} + + +//======================================================================= +//function : ItemsValue +//purpose : +//======================================================================= + +const StepVisual_TessellatedEdgeOrVertex& StepVisual_TessellatedWire::ItemsValue(const Standard_Integer theNum) const +{ + return myItems->Value(theNum); +} + +//======================================================================= +//function : GeometricModelLink +//purpose : +//======================================================================= + +StepVisual_PathOrCompositeCurve StepVisual_TessellatedWire::GeometricModelLink () const +{ + return myGeometricModelLink; +} + +//======================================================================= +//function : SetGeometricModelLink +//purpose : +//======================================================================= + +void StepVisual_TessellatedWire::SetGeometricModelLink(const StepVisual_PathOrCompositeCurve& theGeometricModelLink) +{ + myGeometricModelLink = theGeometricModelLink; +} + +//======================================================================= +//function : HasGeometricModelLink +//purpose : +//======================================================================= + +Standard_Boolean StepVisual_TessellatedWire::HasGeometricModelLink () const +{ + return myHasGeometricModelLink; +} diff --git a/src/StepVisual/StepVisual_TessellatedWire.hxx b/src/StepVisual/StepVisual_TessellatedWire.hxx new file mode 100644 index 0000000000..fa23613a6d --- /dev/null +++ b/src/StepVisual/StepVisual_TessellatedWire.hxx @@ -0,0 +1,75 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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_TessellatedWire_HeaderFile_ +#define _StepVisual_TessellatedWire_HeaderFile_ + +#include +#include +#include + +#include +#include + +DEFINE_STANDARD_HANDLE(StepVisual_TessellatedWire, StepVisual_TessellatedItem) + +//! Representation of STEP entity TessellatedWire +class StepVisual_TessellatedWire : public StepVisual_TessellatedItem +{ + +public : + + //! default constructor + Standard_EXPORT StepVisual_TessellatedWire(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepVisual_HArray1OfTessellatedEdgeOrVertex)& theItems, + const Standard_Boolean theHasGeometricModelLink, + const StepVisual_PathOrCompositeCurve& theGeometricModelLink); + + //! Returns field Items + Standard_EXPORT Handle(StepVisual_HArray1OfTessellatedEdgeOrVertex) Items() const; + + //! Sets field Items + Standard_EXPORT void SetItems (const Handle(StepVisual_HArray1OfTessellatedEdgeOrVertex)& theItems); + + //! Returns number of Items + Standard_EXPORT Standard_Integer NbItems() const; + + //! Returns value of Items by its num + Standard_EXPORT const StepVisual_TessellatedEdgeOrVertex& ItemsValue(const Standard_Integer theNum) const; + + //! Returns field GeometricModelLink + Standard_EXPORT StepVisual_PathOrCompositeCurve GeometricModelLink() const; + + //! Sets field GeometricModelLink + Standard_EXPORT void SetGeometricModelLink (const StepVisual_PathOrCompositeCurve& theGeometricModelLink); + + //! Returns True if optional field GeometricModelLink is defined + Standard_EXPORT Standard_Boolean HasGeometricModelLink() const; + + DEFINE_STANDARD_RTTIEXT(StepVisual_TessellatedWire, StepVisual_TessellatedItem) + +private: + + Handle(StepVisual_HArray1OfTessellatedEdgeOrVertex) myItems; + StepVisual_PathOrCompositeCurve myGeometricModelLink; //!< optional + Standard_Boolean myHasGeometricModelLink; //!< flag "is GeometricModelLink defined" + +}; + +#endif // _StepVisual_TessellatedWire_HeaderFile_ diff --git a/src/StepVisual/StepVisual_TriangulatedFace.cxx b/src/StepVisual/StepVisual_TriangulatedFace.cxx new file mode 100644 index 0000000000..eb1a2b9f14 --- /dev/null +++ b/src/StepVisual/StepVisual_TriangulatedFace.cxx @@ -0,0 +1,134 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 + +IMPLEMENT_STANDARD_RTTIEXT(StepVisual_TriangulatedFace, StepVisual_TessellatedFace) + +//======================================================================= +//function : StepVisual_TriangulatedFace +//purpose : +//======================================================================= + +StepVisual_TriangulatedFace::StepVisual_TriangulatedFace () +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= + +void StepVisual_TriangulatedFace::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepVisual_CoordinatesList)& theTessellatedFace_Coordinates, + const Standard_Integer theTessellatedFace_Pnmax, + const Handle(TColStd_HArray2OfReal)& theTessellatedFace_Normals, + const Standard_Boolean theHasTessellatedFace_GeometricLink, + const StepVisual_FaceOrSurface& theTessellatedFace_GeometricLink, + const Handle(TColStd_HArray1OfInteger)& thePnindex, + const Handle(TColStd_HArray2OfInteger)& theTriangles) +{ + StepVisual_TessellatedFace::Init(theRepresentationItem_Name, + theTessellatedFace_Coordinates, + theTessellatedFace_Pnmax, + theTessellatedFace_Normals, + theHasTessellatedFace_GeometricLink, + theTessellatedFace_GeometricLink); + + myPnindex = thePnindex; + + myTriangles = theTriangles; +} + +//======================================================================= +//function : Pnindex +//purpose : +//======================================================================= + +Handle(TColStd_HArray1OfInteger) StepVisual_TriangulatedFace::Pnindex () const +{ + return myPnindex; +} + +//======================================================================= +//function : SetPnindex +//purpose : +//======================================================================= + +void StepVisual_TriangulatedFace::SetPnindex(const Handle(TColStd_HArray1OfInteger)& thePnindex) +{ + myPnindex = thePnindex; +} + + +//======================================================================= +//function : NbPnindex +//purpose : +//======================================================================= + +Standard_Integer StepVisual_TriangulatedFace::NbPnindex() const +{ + if (myPnindex.IsNull()) + { + return 0; + } + return myPnindex->Length(); +} + + +//======================================================================= +//function : PnindexValue +//purpose : +//======================================================================= + +Standard_Integer StepVisual_TriangulatedFace::PnindexValue(const Standard_Integer theNum) const +{ + return myPnindex->Value(theNum); +} + +//======================================================================= +//function : Triangles +//purpose : +//======================================================================= + +Handle(TColStd_HArray2OfInteger) StepVisual_TriangulatedFace::Triangles () const +{ + return myTriangles; +} + +//======================================================================= +//function : NbTriangles +//purpose : +//======================================================================= + +Standard_Integer StepVisual_TriangulatedFace::NbTriangles() const +{ + if (myTriangles.IsNull()) + { + return 0; + } + return myTriangles->ColLength(); +} + +//======================================================================= +//function : SetTriangles +//purpose : +//======================================================================= + +void StepVisual_TriangulatedFace::SetTriangles(const Handle(TColStd_HArray2OfInteger)& theTriangles) +{ + myTriangles = theTriangles; +} diff --git a/src/StepVisual/StepVisual_TriangulatedFace.hxx b/src/StepVisual/StepVisual_TriangulatedFace.hxx new file mode 100644 index 0000000000..151e8a5343 --- /dev/null +++ b/src/StepVisual/StepVisual_TriangulatedFace.hxx @@ -0,0 +1,78 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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_TriangulatedFace_HeaderFile_ +#define _StepVisual_TriangulatedFace_HeaderFile_ + +#include +#include +#include + +#include +#include + +DEFINE_STANDARD_HANDLE(StepVisual_TriangulatedFace, StepVisual_TessellatedFace) + +//! Representation of STEP entity TriangulatedFace +class StepVisual_TriangulatedFace : public StepVisual_TessellatedFace +{ + +public : + + //! default constructor + Standard_EXPORT StepVisual_TriangulatedFace(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepVisual_CoordinatesList)& theTessellatedFace_Coordinates, + const Standard_Integer theTessellatedFace_Pnmax, + const Handle(TColStd_HArray2OfReal)& theTessellatedFace_Normals, + const Standard_Boolean theHasTessellatedFace_GeometricLink, + const StepVisual_FaceOrSurface& theTessellatedFace_GeometricLink, + const Handle(TColStd_HArray1OfInteger)& thePnindex, + const Handle(TColStd_HArray2OfInteger)& theTriangles); + + //! Returns field Pnindex + Standard_EXPORT Handle(TColStd_HArray1OfInteger) Pnindex() const; + + //! Sets field Pnindex + Standard_EXPORT void SetPnindex (const Handle(TColStd_HArray1OfInteger)& thePnindex); + + //! Returns number of Pnindex + Standard_EXPORT Standard_Integer NbPnindex() const; + + //! Returns value of Pnindex by its num + Standard_EXPORT Standard_Integer PnindexValue(const Standard_Integer theNum) const; + + //! Returns field Triangles + Standard_EXPORT Handle(TColStd_HArray2OfInteger) Triangles() const; + + //! Sets field Triangles + Standard_EXPORT void SetTriangles (const Handle(TColStd_HArray2OfInteger)& theTriangles); + + //! Returns number of Triangles + Standard_EXPORT Standard_Integer NbTriangles() const; + + DEFINE_STANDARD_RTTIEXT(StepVisual_TriangulatedFace, StepVisual_TessellatedFace) + +private: + + Handle(TColStd_HArray1OfInteger) myPnindex; + Handle(TColStd_HArray2OfInteger) myTriangles; + +}; + +#endif // _StepVisual_TriangulatedFace_HeaderFile_ diff --git a/src/TopoDSToStep/FILES b/src/TopoDSToStep/FILES index 0e632a308e..584d3704c2 100644 --- a/src/TopoDSToStep/FILES +++ b/src/TopoDSToStep/FILES @@ -36,3 +36,5 @@ TopoDSToStep_Tool.cxx TopoDSToStep_Tool.hxx TopoDSToStep_WireframeBuilder.cxx TopoDSToStep_WireframeBuilder.hxx +TopoDSToStep_MakeTessellatedItem.cxx +TopoDSToStep_MakeTessellatedItem.hxx \ No newline at end of file diff --git a/src/TopoDSToStep/TopoDSToStep_Builder.cxx b/src/TopoDSToStep/TopoDSToStep_Builder.cxx index f17e5df00a..0a2130e1db 100644 --- a/src/TopoDSToStep/TopoDSToStep_Builder.cxx +++ b/src/TopoDSToStep/TopoDSToStep_Builder.cxx @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -54,12 +55,13 @@ TopoDSToStep_Builder::TopoDSToStep_Builder() TopoDSToStep_Builder::TopoDSToStep_Builder (const TopoDS_Shape& aShape, - TopoDSToStep_Tool& aTool, - const Handle(Transfer_FinderProcess)& FP, - const Message_ProgressRange& theProgress) + TopoDSToStep_Tool& aTool, + const Handle(Transfer_FinderProcess)& FP, + const Standard_Integer theTessellatedGeomParam, + const Message_ProgressRange& theProgress) { done = Standard_False; - Init(aShape, aTool, FP, theProgress); + Init(aShape, aTool, FP, theTessellatedGeomParam, theProgress); } // ============================================================================ @@ -68,143 +70,168 @@ TopoDSToStep_Builder::TopoDSToStep_Builder // ============================================================================ void TopoDSToStep_Builder::Init(const TopoDS_Shape& aShape, - TopoDSToStep_Tool& myTool, - const Handle(Transfer_FinderProcess)& FP, - const Message_ProgressRange& theProgress) + TopoDSToStep_Tool& myTool, + const Handle(Transfer_FinderProcess)& FP, + const Standard_Integer theTessellatedGeomParam, + const Message_ProgressRange& theProgress) { - - if (myTool.IsBound(aShape)) { - myError = TopoDSToStep_BuilderDone; - done = Standard_True; + + if (myTool.IsBound(aShape)) { + myError = TopoDSToStep_BuilderDone; + done = Standard_True; myResult = myTool.Find(aShape); return; } - switch (aShape.ShapeType()) - { - case TopAbs_SHELL: - { - TopoDS_Shell myShell = TopoDS::Shell(aShape); - myTool.SetCurrentShell(myShell); - - Handle(StepShape_FaceSurface) FS; - Handle(StepShape_TopologicalRepresentationItem) Fpms; - TColStd_SequenceOfTransient mySeq; - -// const TopoDS_Shell ForwardShell = -// TopoDS::Shell(myShell.Oriented(TopAbs_FORWARD)); + switch (aShape.ShapeType()) + { + case TopAbs_SHELL: + { + TopoDS_Shell myShell = TopoDS::Shell(aShape); + myTool.SetCurrentShell(myShell); -// TopExp_Explorer myExp(ForwardShell, TopAbs_FACE); -// CKY 9-DEC-1997 (PRO9824 et consorts) -// Pour passer les orientations : ELLES SONT DONNEES EN RELATIF -// Donc, pour SHELL, on doit l ecrire en direct en STEP (pas le choix) -// -> il faut repercuter en dessous, donc explorer le Shell TEL QUEL -// Pour FACE WIRE, d une part on ECRIT SON ORIENTATION relative au contenant -// (puisqu on peut), d autre part on EXPLORE EN FORWARD : ainsi les -// orientations des sous-shapes sont relatives a leur contenant immediat -// et la recombinaison en lecture est sans malice -// Il reste ici et la du code relatif a "en Faceted on combine differemment" -// -> reste encore du menage a faire + Handle(StepShape_FaceSurface) FS; + Handle(StepShape_TopologicalRepresentationItem) Fpms; + TColStd_SequenceOfTransient mySeq; + + // const TopoDS_Shell ForwardShell = + // TopoDS::Shell(myShell.Oriented(TopAbs_FORWARD)); + + // TopExp_Explorer myExp(ForwardShell, TopAbs_FACE); + // CKY 9-DEC-1997 (PRO9824 et consorts) + // Pour passer les orientations : ELLES SONT DONNEES EN RELATIF + // Donc, pour SHELL, on doit l ecrire en direct en STEP (pas le choix) + // -> il faut repercuter en dessous, donc explorer le Shell TEL QUEL + // Pour FACE WIRE, d une part on ECRIT SON ORIENTATION relative au contenant + // (puisqu on peut), d autre part on EXPLORE EN FORWARD : ainsi les + // orientations des sous-shapes sont relatives a leur contenant immediat + // et la recombinaison en lecture est sans malice + // Il reste ici et la du code relatif a "en Faceted on combine differemment" + // -> reste encore du menage a faire - TopExp_Explorer anExp; + TopExp_Explorer anExp; - TopoDSToStep_MakeStepFace MkFace; + TopoDSToStep_MakeStepFace MkFace; - Standard_Integer nbshapes = 0; - for (anExp.Init(myShell, TopAbs_FACE); anExp.More(); anExp.Next()) - nbshapes++; - Message_ProgressScope aPS(theProgress, NULL, nbshapes); - for (anExp.Init(myShell, TopAbs_FACE); anExp.More() && aPS.More(); anExp.Next(), aPS.Next()) - { - const TopoDS_Face Face = TopoDS::Face(anExp.Current()); - - MkFace.Init(Face, myTool, FP); + Message_ProgressScope aPS(theProgress, NULL, (theTessellatedGeomParam != 0) ? 2 : 1); - if (MkFace.IsDone()) { - FS = Handle(StepShape_FaceSurface)::DownCast(MkFace.Value()); - Fpms = FS; - mySeq.Append(Fpms); - } - else { - // MakeFace Error Handling : warning only -// std::cout << "Warning : one Face has not been mapped" << std::endl; -// Handle(TransferBRep_ShapeMapper) errShape = -// new TransferBRep_ShapeMapper(Face); -// FP->AddWarning(errShape, " a Face from a Shell has not been mapped"); - } - } - if (!aPS.More()) - return; + Standard_Integer nbshapes = 0; + for (anExp.Init(myShell, TopAbs_FACE); anExp.More(); anExp.Next()) + nbshapes++; + Message_ProgressScope aPS1(aPS.Next(), NULL, nbshapes); + for (anExp.Init(myShell, TopAbs_FACE); anExp.More() && aPS1.More(); anExp.Next(), aPS1.Next()) + { + const TopoDS_Face Face = TopoDS::Face(anExp.Current()); - Standard_Integer nbFaces = mySeq.Length(); - if ( nbFaces >= 1) { - Handle(StepShape_HArray1OfFace) aSet = - new StepShape_HArray1OfFace(1,nbFaces); - for (Standard_Integer i=1; i<=nbFaces; i++ ) { - aSet->SetValue(i, Handle(StepShape_Face)::DownCast(mySeq.Value(i))); - } - Handle(StepShape_ConnectedFaceSet) CFSpms; - if (myShell.Closed()) - CFSpms = new StepShape_ClosedShell(); - else - CFSpms = new StepShape_OpenShell(); - Handle(TCollection_HAsciiString) aName = - new TCollection_HAsciiString(""); - CFSpms->Init(aName, aSet); + MkFace.Init(Face, myTool, FP); - // -------------------------------------------------------------- - // To add later : if not facetted context & shell is reversed - // then shall create an oriented_shell with - // orientation flag to false. - // -------------------------------------------------------------- - - myTool.Bind(aShape, CFSpms); - myResult = CFSpms; - done = Standard_True; - } - else { - // Builder Error handling; - myError = TopoDSToStep_NoFaceMapped; - done = Standard_False; - } - break; + if (MkFace.IsDone()) { + FS = Handle(StepShape_FaceSurface)::DownCast(MkFace.Value()); + Fpms = FS; + mySeq.Append(Fpms); } - - case TopAbs_FACE: - { - const TopoDS_Face Face = TopoDS::Face(aShape); - - Handle(StepShape_FaceSurface) FS; - Handle(StepShape_TopologicalRepresentationItem) Fpms; - - TopoDSToStep_MakeStepFace MkFace(Face, myTool, FP); - - if (MkFace.IsDone()) { - FS = Handle(StepShape_FaceSurface)::DownCast(MkFace.Value()); - Fpms = FS; - myResult = Fpms; - myError = TopoDSToStep_BuilderDone; - done = Standard_True; - } - else { - // MakeFace Error Handling : Face not Mapped - myError = TopoDSToStep_BuilderOther; -// Handle(TransferBRep_ShapeMapper) errShape = -// new TransferBRep_ShapeMapper(Face); -// FP->AddWarning(errShape, " the Face has not been mapped"); - done = Standard_False; - } - break; + else { + // MakeFace Error Handling : warning only + // std::cout << "Warning : one Face has not been mapped" << std::endl; + // Handle(TransferBRep_ShapeMapper) errShape = + // new TransferBRep_ShapeMapper(Face); + // FP->AddWarning(errShape, " a Face from a Shell has not been mapped"); } - default: break; } + if (!aPS1.More()) + return; + + Standard_Integer nbFaces = mySeq.Length(); + if (nbFaces >= 1) { + Handle(StepShape_HArray1OfFace) aSet = + new StepShape_HArray1OfFace(1, nbFaces); + for (Standard_Integer i = 1; i <= nbFaces; i++) { + aSet->SetValue(i, Handle(StepShape_Face)::DownCast(mySeq.Value(i))); + } + Handle(StepShape_ConnectedFaceSet) CFSpms; + if (myShell.Closed()) + CFSpms = new StepShape_ClosedShell(); + else + CFSpms = new StepShape_OpenShell(); + Handle(TCollection_HAsciiString) aName = + new TCollection_HAsciiString(""); + CFSpms->Init(aName, aSet); + + // -------------------------------------------------------------- + // To add later : if not facetted context & shell is reversed + // then shall create an oriented_shell with + // orientation flag to false. + // -------------------------------------------------------------- + + myTool.Bind(aShape, CFSpms); + myResult = CFSpms; + done = Standard_True; + } + else { + // Builder Error handling; + myError = TopoDSToStep_NoFaceMapped; + done = Standard_False; + } + + if (theTessellatedGeomParam == 1 || (theTessellatedGeomParam == 2 && myResult.IsNull())) { + TopoDSToStep_MakeTessellatedItem MkTessShell(myShell, myTool, FP, aPS.Next()); + if (MkTessShell.IsDone()) { + myTessellatedResult = MkTessShell.Value(); + myError = TopoDSToStep_BuilderDone; + done = Standard_True; + } + } + + break; + } + + case TopAbs_FACE: + { + const TopoDS_Face Face = TopoDS::Face(aShape); + + Handle(StepShape_FaceSurface) FS; + Handle(StepShape_TopologicalRepresentationItem) Fpms; + + TopoDSToStep_MakeStepFace MkFace(Face, myTool, FP); + + TopoDSToStep_MakeTessellatedItem MkTessFace; + + if (theTessellatedGeomParam == 1 || (theTessellatedGeomParam == 2 && !MkFace.IsDone())) { + Message_ProgressScope aPS(theProgress, NULL, 1); + MkTessFace.Init(Face, myTool, FP, aPS.Next()); + } + + if (MkFace.IsDone() || MkTessFace.IsDone()) { + if (MkFace.IsDone()) { + FS = Handle(StepShape_FaceSurface)::DownCast(MkFace.Value()); + Fpms = FS; + myResult = Fpms; + } + if (MkTessFace.IsDone()) { + myTessellatedResult = MkTessFace.Value(); + } + myError = TopoDSToStep_BuilderDone; + done = Standard_True; + } + else { + // MakeFace Error Handling : Face not Mapped + myError = TopoDSToStep_BuilderOther; + // Handle(TransferBRep_ShapeMapper) errShape = + // new TransferBRep_ShapeMapper(Face); + // FP->AddWarning(errShape, " the Face has not been mapped"); + done = Standard_False; + } + break; + } + default: break; + } } // ============================================================================ // Method : TopoDSToStep_Builder::Value -// Purpose : +// Purpose : Returns TopologicalRepresentationItem as the result // ============================================================================ const Handle(StepShape_TopologicalRepresentationItem)& @@ -214,9 +241,21 @@ TopoDSToStep_Builder::Value() const return myResult; } +// ============================================================================ +// Method : TopoDSToStep_Builder::TessellatedValue +// Purpose : Returns TopologicalRepresentationItem as the optional result +// ============================================================================ + +const Handle(StepVisual_TessellatedItem)& +TopoDSToStep_Builder::TessellatedValue() const +{ + StdFail_NotDone_Raise_if(!done, "TopoDSToStep_Builder::TessellatedValue() - no result"); + return myTessellatedResult; +} + // ============================================================================ // Method : TopoDSToStep_Builder::Error -// Purpose : +// Purpose : Returns builder error if the process is not done // ============================================================================ TopoDSToStep_BuilderError TopoDSToStep_Builder::Error() const diff --git a/src/TopoDSToStep/TopoDSToStep_Builder.hxx b/src/TopoDSToStep/TopoDSToStep_Builder.hxx index 9c2b23ba75..b4fb7c4001 100644 --- a/src/TopoDSToStep/TopoDSToStep_Builder.hxx +++ b/src/TopoDSToStep/TopoDSToStep_Builder.hxx @@ -26,6 +26,7 @@ #include class StepShape_TopologicalRepresentationItem; +class StepVisual_TessellatedItem; class StdFail_NotDone; class TopoDS_Shape; class TopoDSToStep_Tool; @@ -46,16 +47,19 @@ public: Standard_EXPORT TopoDSToStep_Builder(const TopoDS_Shape& S, TopoDSToStep_Tool& T, const Handle(Transfer_FinderProcess)& FP, + const Standard_Integer theTessellatedGeomParam, const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT void Init (const TopoDS_Shape& S, TopoDSToStep_Tool& T, const Handle(Transfer_FinderProcess)& FP, + const Standard_Integer theTessellatedGeomParam, const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT TopoDSToStep_BuilderError Error() const; Standard_EXPORT const Handle(StepShape_TopologicalRepresentationItem)& Value() const; + Standard_EXPORT const Handle(StepVisual_TessellatedItem)& TessellatedValue() const; @@ -71,6 +75,7 @@ private: Handle(StepShape_TopologicalRepresentationItem) myResult; + Handle(StepVisual_TessellatedItem) myTessellatedResult; TopoDSToStep_BuilderError myError; diff --git a/src/TopoDSToStep/TopoDSToStep_MakeBrepWithVoids.cxx b/src/TopoDSToStep/TopoDSToStep_MakeBrepWithVoids.cxx index c6c07349fb..fb12faef86 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeBrepWithVoids.cxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeBrepWithVoids.cxx @@ -16,6 +16,7 @@ #include +#include #include #include #include @@ -25,6 +26,9 @@ #include #include #include +#include +#include +#include #include #include #include @@ -53,115 +57,162 @@ TopoDSToStep_MakeBrepWithVoids:: const Handle(Transfer_FinderProcess)& FP, const Message_ProgressRange& theProgress) { - done = Standard_False ; - TopoDS_Iterator It; - MoniTool_DataMapOfShapeTransient aMap; - TColStd_SequenceOfTransient S; - TopoDS_Shell aOutShell; + done = Standard_False; + TopoDS_Iterator It; + MoniTool_DataMapOfShapeTransient aMap; + TColStd_SequenceOfTransient S; + TopoDS_Shell aOutShell; Handle(StepShape_TopologicalRepresentationItem) aItem; Handle(StepShape_ClosedShell) aOuter, aCShell; Handle(StepShape_OrientedClosedShell) aOCShell; Handle(StepShape_HArray1OfOrientedClosedShell) aVoids; + TColStd_SequenceOfTransient aTessShells; - aOutShell = BRepClass3d::OuterShell(aSolid); + const Standard_Integer aWriteTessGeom = Interface_Static::IVal("write.step.tessellated"); + + try + { + // BRepClass3d::OuterShell requires geometry when the solid has voids + aOutShell = BRepClass3d::OuterShell(aSolid); + } + catch (...) + { + } TopoDSToStep_Builder StepB; TopoDSToStep_Tool aTool; - - if (!aOutShell.IsNull()) { - Standard_Integer nbshapes = 0; - for (It.Initialize(aSolid); It.More(); It.Next()) - if (It.Value().ShapeType() == TopAbs_SHELL) - nbshapes++; - Message_ProgressScope aPS(theProgress, NULL, nbshapes); - for (It.Initialize(aSolid); It.More() && aPS.More(); It.Next()) - { - if (It.Value().ShapeType() == TopAbs_SHELL) { - TopoDS_Shell CurrentShell = TopoDS::Shell(It.Value()); - if ( ! aOutShell.IsEqual(CurrentShell) ) //:e0 abv 25 Mar 98: voids should be reversed according to EXPRESS for ABSR - CurrentShell.Reverse(); - //:d7 abv 16 Mar 98: try to treat 'open' shells as closed since flag - // IsClosed() is often incorrect (taken from MakeManifoldSolid(Solid)) - aTool.Init(aMap, Standard_False); - StepB.Init(CurrentShell, aTool, FP, aPS.Next()); - TopoDSToStep::AddResult ( FP, aTool ); - if (StepB.IsDone()) { - aCShell = Handle(StepShape_ClosedShell)::DownCast(StepB.Value()); - // si OPEN on le force a CLOSED mais que c est une honte ! - if (aCShell.IsNull()) { - Handle(StepShape_OpenShell) aOShell = Handle(StepShape_OpenShell)::DownCast(StepB.Value()); - if (!aOShell.IsNull()) { - aCShell = new StepShape_ClosedShell; - aCShell->Init (aOShell->Name(),aOShell->CfsFaces()); -#ifdef OCCT_DEBUG - std::cout<<"Warning: MakeBRepWithVoids: Open shell in the solid; treated as closed"<=1 ) { - Handle(TCollection_HAsciiString) aName = - new TCollection_HAsciiString(""); - aVoids = new StepShape_HArray1OfOrientedClosedShell(1,N); - for ( Standard_Integer i=1; i<=N; i++ ) { - aOCShell = new StepShape_OrientedClosedShell; - // Warning : the Oriented Shell Orientation is not always - // TRUE. - // Shall check the TopoDS_Shell orientation. - // => if the Shell is reversed, shall create an OrientedShell. - aOCShell -> Init(aName,Handle(StepShape_ClosedShell)::DownCast(S.Value(i)), - Standard_False); //:e0 -//:e0 Standard_True); - aVoids->SetValue(i, aOCShell); + Standard_Integer nbshapes = 0; + for (It.Initialize(aSolid); It.More(); It.Next()) + if (It.Value().ShapeType() == TopAbs_SHELL) + nbshapes++; + Message_ProgressScope aPS(theProgress, NULL, nbshapes); + for (It.Initialize(aSolid); It.More() && aPS.More(); It.Next()) + { + if (It.Value().ShapeType() == TopAbs_SHELL) + { + TopoDS_Shell CurrentShell = TopoDS::Shell(It.Value()); + if (!aOutShell.IsNull() && !aOutShell.IsEqual(CurrentShell)) //:e0 abv 25 Mar 98: voids should be reversed according to EXPRESS for ABSR + CurrentShell.Reverse(); + //:d7 abv 16 Mar 98: try to treat 'open' shells as closed since flag + // IsClosed() is often incorrect (taken from MakeManifoldSolid(Solid)) + aTool.Init(aMap, Standard_False); + StepB.Init(CurrentShell, aTool, FP, aWriteTessGeom, aPS.Next()); + TopoDSToStep::AddResult(FP, aTool); + if (StepB.IsDone()) + { + aCShell = Handle(StepShape_ClosedShell)::DownCast(StepB.Value()); + // si OPEN on le force a CLOSED mais que c est une honte ! + if (aCShell.IsNull()) + { + Handle(StepShape_OpenShell) aOShell = Handle(StepShape_OpenShell)::DownCast(StepB.Value()); + if (!aOShell.IsNull()) + { + aCShell = new StepShape_ClosedShell; + aCShell->Init(aOShell->Name(), aOShell->CfsFaces()); +#ifdef OCCT_DEBUG + std::cout << "Warning: MakeBRepWithVoids: Open shell in the solid; treated as closed" << std::endl; +#endif + } + } + Handle(StepVisual_TessellatedItem) aTessShell = StepB.TessellatedValue(); + if (!aTessShell.IsNull()) + { + aTessShells.Append(aTessShell); + } + if (!aOutShell.IsNull() && !aCShell.IsNull()) + { + if (aOutShell.IsEqual(It.Value())) + aOuter = aCShell; + else + S.Append(aCShell); + } +#ifdef OCCT_DEBUG + else std::cout << "*** MakeBRepWithVoids : Shell not mapped" << std::endl; +#endif } - theBrepWithVoids = new StepShape_BrepWithVoids(); - theBrepWithVoids->Init(aName, aOuter, aVoids); - done = Standard_True; +#ifdef OCCT_DEBUG + else std::cout << "Shell not mapped" << std::endl; +#endif + /* //:d7 + if (It.Value().Closed()) { + aTool.Init(aMap, Standard_False); + StepB.Init(CurrentShell, aTool, FP); + TopoDSToStep::AddResult ( FP, aTool ); + if (StepB.IsDone()) { + aCShell = Handle(StepShape_ClosedShell)::DownCast(StepB.Value()); + if ( aOutShell.IsEqual(It.Value()) ) + aOuter = aCShell; + else + S.Append(aCShell); + } + else { + #ifdef OCCT_DEBUG + std::cout << "Shell not mapped" << std::endl; + #endif + done = Standard_False; + } + } + else { + // Error Handling : the Shape is not closed + done = Standard_False; + } + */ } - else done = Standard_False; + } + if (!aPS.More()) + return; + + Standard_Integer N = S.Length(); + if (N >= 1) + { + Handle(TCollection_HAsciiString) aName = + new TCollection_HAsciiString(""); + aVoids = new StepShape_HArray1OfOrientedClosedShell(1, N); + for (Standard_Integer i = 1; i <= N; i++) { + aOCShell = new StepShape_OrientedClosedShell; + // Warning : the Oriented Shell Orientation is not always + // TRUE. + // Shall check the TopoDS_Shell orientation. + // => if the Shell is reversed, shall create an OrientedShell. + aOCShell->Init(aName, Handle(StepShape_ClosedShell)::DownCast(S.Value(i)), + Standard_False); //:e0 + //:e0 Standard_True); + aVoids->SetValue(i, aOCShell); + } + + theBrepWithVoids = new StepShape_BrepWithVoids(); + theBrepWithVoids->Init(aName, aOuter, aVoids); + + done = Standard_True; + } + + if (!aTessShells.IsEmpty()) + { + Handle(StepVisual_TessellatedSolid) aTessSolid = new StepVisual_TessellatedSolid(); + Handle(TCollection_HAsciiString) aTessName = new TCollection_HAsciiString(""); + Standard_Integer aNbItems = 0; + for (TColStd_SequenceOfTransient::Iterator anIt(aTessShells); anIt.More(); anIt.Next()) + { + Handle(StepVisual_TessellatedShell) aTessShell = Handle(StepVisual_TessellatedShell)::DownCast(anIt.Value()); + aNbItems += aTessShell->NbItems(); + } + Handle(StepVisual_HArray1OfTessellatedStructuredItem) anItems + = new StepVisual_HArray1OfTessellatedStructuredItem(1, aNbItems); + Standard_Integer j = 1; + for (TColStd_SequenceOfTransient::Iterator anIt(aTessShells); anIt.More(); anIt.Next()) + { + Handle(StepVisual_TessellatedShell) aTessShell = Handle(StepVisual_TessellatedShell)::DownCast(anIt.Value()); + for (Standard_Integer i = 1; i <= aTessShell->NbItems(); ++i) { + anItems->SetValue(j++, aTessShell->ItemsValue(i)); + } + } + Standard_Boolean aHasGeomLink = !theBrepWithVoids.IsNull(); + aTessSolid->Init(aTessName, anItems, aHasGeomLink, theBrepWithVoids); + theTessellatedItem = aTessSolid; + + done = Standard_True; } } @@ -175,3 +226,15 @@ const Handle(StepShape_BrepWithVoids) & StdFail_NotDone_Raise_if (!done, "TopoDSToStep_MakeBrepWithVoids::Value() - no result"); return theBrepWithVoids; } + +// ============================================================================ +// Method : TopoDSToStep_MakeBrepWithVoids::TessellatedValue +// Purpose : Returns TessellatedItem as the optional result +// ============================================================================ + +const Handle(StepVisual_TessellatedItem) & +TopoDSToStep_MakeBrepWithVoids::TessellatedValue() const +{ + StdFail_NotDone_Raise_if(!done, "TopoDSToStep_MakeBrepWithVoids::TessellatedValue() - no result"); + return theTessellatedItem; +} diff --git a/src/TopoDSToStep/TopoDSToStep_MakeBrepWithVoids.hxx b/src/TopoDSToStep/TopoDSToStep_MakeBrepWithVoids.hxx index 97d86dc7b0..1ebd94a888 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeBrepWithVoids.hxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeBrepWithVoids.hxx @@ -25,6 +25,7 @@ #include class StepShape_BrepWithVoids; +class StepVisual_TessellatedItem; class StdFail_NotDone; class TopoDS_Solid; class Transfer_FinderProcess; @@ -47,7 +48,7 @@ public: const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT const Handle(StepShape_BrepWithVoids)& Value() const; - + Standard_EXPORT const Handle(StepVisual_TessellatedItem)& TessellatedValue() const; @@ -62,7 +63,7 @@ private: Handle(StepShape_BrepWithVoids) theBrepWithVoids; - + Handle(StepVisual_TessellatedItem) theTessellatedItem; }; diff --git a/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrep.cxx b/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrep.cxx index 0cf4d08c58..0315b45c45 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrep.cxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrep.cxx @@ -16,11 +16,14 @@ #include +#include #include #include #include #include #include +#include +#include #include #include #include @@ -43,9 +46,11 @@ TopoDSToStep_MakeFacetedBrep:: if (aShell.Closed()) { Handle(StepShape_TopologicalRepresentationItem) aItem; MoniTool_DataMapOfShapeTransient aMap; - + + const Standard_Integer aWriteTessGeom = Interface_Static::IVal("write.step.tessellated"); + TopoDSToStep_Tool aTool(aMap, Standard_True); - TopoDSToStep_Builder StepB(aShell, aTool, FP, theProgress); + TopoDSToStep_Builder StepB(aShell, aTool, FP, aWriteTessGeom, theProgress); if (theProgress.UserBreak()) return; TopoDSToStep::AddResult ( FP, aTool ); @@ -55,23 +60,24 @@ TopoDSToStep_MakeFacetedBrep:: Handle(StepShape_ClosedShell) aCShell; aCShell = Handle(StepShape_ClosedShell)::DownCast(aItem); theFacetedBrep = new StepShape_FacetedBrep(); - Handle(TCollection_HAsciiString) aName = - new TCollection_HAsciiString(""); + Handle(TCollection_HAsciiString) aName = + new TCollection_HAsciiString(""); theFacetedBrep->Init(aName, aCShell); + theTessellatedItem = StepB.TessellatedValue(); done = Standard_True; } else { done = Standard_False; Handle(TransferBRep_ShapeMapper) errShape = - new TransferBRep_ShapeMapper(aShell); - FP->AddWarning(errShape," Closed Shell not mapped to FacetedBrep"); + new TransferBRep_ShapeMapper(aShell); + FP->AddWarning(errShape, " Closed Shell not mapped to FacetedBrep"); } } else { done = Standard_False; Handle(TransferBRep_ShapeMapper) errShape = new TransferBRep_ShapeMapper(aShell); - FP->AddWarning(errShape," Shell not closed; not mapped to FacetedBrep"); + FP->AddWarning(errShape, " Shell not closed; not mapped to FacetedBrep"); } } @@ -94,42 +100,60 @@ TopoDSToStep_MakeFacetedBrep:: if (aOuterShell.Closed()) { Handle(StepShape_TopologicalRepresentationItem) aItem; MoniTool_DataMapOfShapeTransient aMap; - + + const Standard_Integer aWriteTessGeom = Interface_Static::IVal("write.step.tessellated"); + TopoDSToStep_Tool aTool(aMap, Standard_True); - TopoDSToStep_Builder StepB(aOuterShell, aTool, FP, theProgress); + TopoDSToStep_Builder StepB(aOuterShell, aTool, FP, aWriteTessGeom, theProgress); if (theProgress.UserBreak()) return; TopoDSToStep::AddResult ( FP, aTool ); if (StepB.IsDone()) { - aItem = StepB.Value(); - Handle(StepShape_ClosedShell) aCShell; - aCShell = Handle(StepShape_ClosedShell)::DownCast(aItem); - theFacetedBrep = new StepShape_FacetedBrep(); - Handle(TCollection_HAsciiString) aName = - new TCollection_HAsciiString(""); - theFacetedBrep->Init(aName, aCShell); - done = Standard_True; + aItem = StepB.Value(); + Handle(StepShape_ClosedShell) aCShell; + aCShell = Handle(StepShape_ClosedShell)::DownCast(aItem); + theFacetedBrep = new StepShape_FacetedBrep(); + Handle(TCollection_HAsciiString) aName = + new TCollection_HAsciiString(""); + theFacetedBrep->Init(aName, aCShell); + done = Standard_True; + if (!StepB.TessellatedValue()) + { + Handle(StepVisual_TessellatedSolid) aTessSolid = new StepVisual_TessellatedSolid(); + Handle(StepVisual_TessellatedShell) aTessShell + = Handle(StepVisual_TessellatedShell)::DownCast(StepB.TessellatedValue()); + Handle(TCollection_HAsciiString) aTessName = new TCollection_HAsciiString(""); + Handle(StepVisual_HArray1OfTessellatedStructuredItem) anItems + = new StepVisual_HArray1OfTessellatedStructuredItem(1, aTessShell->NbItems()); + for (Standard_Integer i = 1; i <= aTessShell->NbItems(); ++i) + { + anItems->SetValue(i, aTessShell->ItemsValue(i)); + } + Standard_Boolean aHasGeomLink = !theFacetedBrep.IsNull(); + aTessSolid->Init(aTessName, anItems, aHasGeomLink, theFacetedBrep); + theTessellatedItem = aTessSolid; + } } else { - done = Standard_False; - Handle(TransferBRep_ShapeMapper) errShape = - new TransferBRep_ShapeMapper(aOuterShell); - FP->AddWarning(errShape," Closed Outer Shell from Solid not mapped to FacetedBrep"); + done = Standard_False; + Handle(TransferBRep_ShapeMapper) errShape = + new TransferBRep_ShapeMapper(aOuterShell); + FP->AddWarning(errShape, " Closed Outer Shell from Solid not mapped to FacetedBrep"); } } else { done = Standard_False; Handle(TransferBRep_ShapeMapper) errShape = - new TransferBRep_ShapeMapper(aOuterShell); - FP->AddWarning(errShape," Shell not closed; not mapped to FacetedBrep"); + new TransferBRep_ShapeMapper(aOuterShell); + FP->AddWarning(errShape, " Shell not closed; not mapped to FacetedBrep"); } } else { done = Standard_False; Handle(TransferBRep_ShapeMapper) errShape = new TransferBRep_ShapeMapper(aOuterShell); - FP->AddWarning(errShape," Solid contains no Outer Shell to be mapped to FacetedBrep"); + FP->AddWarning(errShape, " Solid contains no Outer Shell to be mapped to FacetedBrep"); } } @@ -143,3 +167,15 @@ const Handle(StepShape_FacetedBrep) & StdFail_NotDone_Raise_if (!done, "TopoDSToStep_MakeFacetedBrep::Value() - no result"); return theFacetedBrep; } + +// ============================================================================ +// Method : TopoDSToStep_MakeFacetedBrep::TessellatedValue +// Purpose : Returns TessellatedItem as the optional result +// ============================================================================ + +const Handle(StepVisual_TessellatedItem) & +TopoDSToStep_MakeFacetedBrep::TessellatedValue() const +{ + StdFail_NotDone_Raise_if(!done, "TopoDSToStep_MakeFacetedBrep::TessellatedValue() - no result"); + return theTessellatedItem; +} diff --git a/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrep.hxx b/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrep.hxx index a86cc2bc70..17f289c2b9 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrep.hxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrep.hxx @@ -25,6 +25,7 @@ #include class StepShape_FacetedBrep; +class StepVisual_TessellatedItem; class StdFail_NotDone; class TopoDS_Shell; class Transfer_FinderProcess; @@ -52,7 +53,7 @@ public: const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT const Handle(StepShape_FacetedBrep)& Value() const; - + Standard_EXPORT const Handle(StepVisual_TessellatedItem)& TessellatedValue() const; @@ -67,6 +68,7 @@ private: Handle(StepShape_FacetedBrep) theFacetedBrep; + Handle(StepVisual_TessellatedItem) theTessellatedItem; }; diff --git a/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrepAndBrepWithVoids.cxx b/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrepAndBrepWithVoids.cxx index e47b2d63eb..14b0305607 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrepAndBrepWithVoids.cxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrepAndBrepWithVoids.cxx @@ -24,6 +24,9 @@ #include #include #include +#include +#include +#include #include #include #include @@ -56,6 +59,7 @@ TopoDSToStep_MakeFacetedBrepAndBrepWithVoids:: Handle(StepShape_ClosedShell) aOuter, aCShell; Handle(StepShape_OrientedClosedShell) aOCShell; Handle(StepShape_HArray1OfOrientedClosedShell) aVoids; + TColStd_SequenceOfTransient aTessShells; aOutShell = BRepClass3d::OuterShell(aSolid); @@ -72,32 +76,37 @@ TopoDSToStep_MakeFacetedBrepAndBrepWithVoids:: { if (It.Value().ShapeType() == TopAbs_SHELL) { Message_ProgressRange aRange = aPS.Next(); - TopoDS_Shell CurrentShell = TopoDS::Shell(It.Value()); - if (It.Value().Closed()) { + TopoDS_Shell CurrentShell = TopoDS::Shell(It.Value()); + if (It.Value().Closed()) { - aTool.Init(aMap, Standard_False); - StepB.Init(CurrentShell, aTool, FP, aRange); - TopoDSToStep::AddResult ( FP, aTool ); + aTool.Init(aMap, Standard_False); + StepB.Init(CurrentShell, aTool, FP, Standard_False, aRange); + TopoDSToStep::AddResult(FP, aTool); - if (StepB.IsDone()) { - aCShell = Handle(StepShape_ClosedShell)::DownCast(StepB.Value()); - if ( aOutShell.IsEqual(It.Value()) ) - aOuter = aCShell; - else - S.Append(aCShell); - } - else { - Handle(TransferBRep_ShapeMapper) errShape = - new TransferBRep_ShapeMapper(CurrentShell); - FP->AddWarning(errShape," Shell from Solid not mapped to FacetedBrepAndBrepWithVoids"); - } - } - else { - done = Standard_False; - Handle(TransferBRep_ShapeMapper) errShape = - new TransferBRep_ShapeMapper(CurrentShell); - FP->AddWarning(errShape," Shell from Solid not closed; not mapped to FacetedBrepAndBrepWithVoids"); - } + if (StepB.IsDone()) { + aCShell = Handle(StepShape_ClosedShell)::DownCast(StepB.Value()); + if (aOutShell.IsEqual(It.Value())) + aOuter = aCShell; + else + S.Append(aCShell); + Handle(StepVisual_TessellatedItem) aTessShell = StepB.TessellatedValue(); + if (!aTessShell.IsNull()) + { + aTessShells.Append(aTessShell); + } + } + else { + Handle(TransferBRep_ShapeMapper) errShape = + new TransferBRep_ShapeMapper(CurrentShell); + FP->AddWarning(errShape, " Shell from Solid not mapped to FacetedBrepAndBrepWithVoids"); + } + } + else { + done = Standard_False; + Handle(TransferBRep_ShapeMapper) errShape = + new TransferBRep_ShapeMapper(CurrentShell); + FP->AddWarning(errShape, " Shell from Solid not closed; not mapped to FacetedBrepAndBrepWithVoids"); + } } } if (!aPS.More()) @@ -111,12 +120,38 @@ TopoDSToStep_MakeFacetedBrepAndBrepWithVoids:: for ( Standard_Integer i=1; i<=N; i++ ) { aOCShell = new StepShape_OrientedClosedShell(); aOCShell->Init(aName, Handle(StepShape_ClosedShell)::DownCast(S.Value(i)), - Standard_True); + Standard_True); aVoids->SetValue(i, aOCShell); } theFacetedBrepAndBrepWithVoids = new StepShape_FacetedBrepAndBrepWithVoids(); theFacetedBrepAndBrepWithVoids->Init(aName, aOuter, aVoids); + + if (!aTessShells.IsEmpty()) + { + Handle(StepVisual_TessellatedSolid) aTessSolid = new StepVisual_TessellatedSolid(); + Handle(TCollection_HAsciiString) aTessName = new TCollection_HAsciiString(""); + Standard_Integer aNbItems = 0; + for (TColStd_SequenceOfTransient::Iterator anIt(aTessShells); anIt.More(); anIt.Next()) + { + Handle(StepVisual_TessellatedShell) aTessShell = Handle(StepVisual_TessellatedShell)::DownCast(anIt.Value()); + aNbItems += aTessShell->NbItems(); + } + Handle(StepVisual_HArray1OfTessellatedStructuredItem) anItems + = new StepVisual_HArray1OfTessellatedStructuredItem(1, aNbItems); + for (TColStd_SequenceOfTransient::Iterator anIt(aTessShells); anIt.More(); anIt.Next()) + { + Handle(StepVisual_TessellatedShell) aTessShell = Handle(StepVisual_TessellatedShell)::DownCast(anIt.Value()); + for (Standard_Integer i = 1; i <= aTessShell->NbItems(); ++i) + { + anItems->SetValue(i, aTessShell->ItemsValue(i)); + } + } + Standard_Boolean aHasGeomLink = !theFacetedBrepAndBrepWithVoids.IsNull(); + aTessSolid->Init(aTessName, anItems, aHasGeomLink, theFacetedBrepAndBrepWithVoids); + theTessellatedItem = aTessSolid; + } + done = Standard_True; } else { @@ -137,3 +172,15 @@ const Handle(StepShape_FacetedBrepAndBrepWithVoids) & StdFail_NotDone_Raise_if (!done, "TopoDSToStep_MakeFacetedBrepAndBrepWithVoids::Value() - no result"); return theFacetedBrepAndBrepWithVoids; } + +// ============================================================================ +// Method : TopoDSToStep_MakeFacetedBrepAndBrepWithVoids::TessellatedValue +// Purpose : Returns TessellatedItem as the optional result +// ============================================================================ + +const Handle(StepVisual_TessellatedItem)& +TopoDSToStep_MakeFacetedBrepAndBrepWithVoids::TessellatedValue() const +{ + StdFail_NotDone_Raise_if(!done, "TopoDSToStep_MakeFacetedBrepAndBrepWithVoids::TessellatedValue() - no result"); + return theTessellatedItem; +} diff --git a/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrepAndBrepWithVoids.hxx b/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrepAndBrepWithVoids.hxx index 3cffbd719a..369b632825 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrepAndBrepWithVoids.hxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrepAndBrepWithVoids.hxx @@ -25,6 +25,7 @@ #include class StepShape_FacetedBrepAndBrepWithVoids; +class StepVisual_TessellatedItem; class StdFail_NotDone; class TopoDS_Solid; class Transfer_FinderProcess; @@ -46,7 +47,7 @@ public: const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT const Handle(StepShape_FacetedBrepAndBrepWithVoids)& Value() const; - + Standard_EXPORT const Handle(StepVisual_TessellatedItem)& TessellatedValue() const; @@ -61,6 +62,7 @@ private: Handle(StepShape_FacetedBrepAndBrepWithVoids) theFacetedBrepAndBrepWithVoids; + Handle(StepVisual_TessellatedItem) theTessellatedItem; }; diff --git a/src/TopoDSToStep/TopoDSToStep_MakeManifoldSolidBrep.cxx b/src/TopoDSToStep/TopoDSToStep_MakeManifoldSolidBrep.cxx index fc0eea736f..b165a9e067 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeManifoldSolidBrep.cxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeManifoldSolidBrep.cxx @@ -16,12 +16,15 @@ #include +#include #include #include #include #include #include #include +#include +#include #include #include #include @@ -32,30 +35,35 @@ #include #include -static Handle(StepShape_ManifoldSolidBrep) MakeManifoldSolidBrep (const TopoDS_Shell& aShell, - const Handle(Transfer_FinderProcess)& FP, - const Message_ProgressRange& theProgress) +static std::pair +MakeManifoldSolidBrep(const TopoDS_Shell& aShell, + const Handle(Transfer_FinderProcess)& FP, + const Message_ProgressRange& theProgress) { Handle(StepShape_ManifoldSolidBrep) theManifoldSolidBrep; + Handle(StepVisual_TessellatedItem) aTessItem; MoniTool_DataMapOfShapeTransient aMap; TopoDSToStep_Tool aTool(aMap, Standard_False); - - TopoDSToStep_Builder StepB(aShell, aTool, FP, theProgress); + + const Standard_Integer aWriteTessGeom = Interface_Static::IVal("write.step.tessellated"); + + TopoDSToStep_Builder StepB(aShell, aTool, FP, aWriteTessGeom, theProgress); if (theProgress.UserBreak()) - return theManifoldSolidBrep; + return std::make_pair(theManifoldSolidBrep, aTessItem); TopoDSToStep::AddResult(FP, aTool); if (StepB.IsDone()) { + aTessItem = StepB.TessellatedValue(); Handle(StepShape_ClosedShell) aCShell = Handle(StepShape_ClosedShell)::DownCast(StepB.Value()); // si OPEN on le force a CLOSED mais que c est une honte ! if (aCShell.IsNull()) { Handle(StepShape_OpenShell) aOShell = Handle(StepShape_OpenShell)::DownCast(StepB.Value()); - if (aOShell.IsNull()) return theManifoldSolidBrep; + if (aOShell.IsNull()) return std::make_pair(theManifoldSolidBrep, aTessItem); else { - aCShell = new StepShape_ClosedShell; - aCShell->Init(aOShell->Name(),aOShell->CfsFaces()); + aCShell = new StepShape_ClosedShell; + aCShell->Init(aOShell->Name(), aOShell->CfsFaces()); } } theManifoldSolidBrep = new StepShape_ManifoldSolidBrep(); @@ -63,7 +71,7 @@ static Handle(StepShape_ManifoldSolidBrep) MakeManifoldSolidBrep (const TopoDS_S theManifoldSolidBrep->Init(aName, aCShell); } - return theManifoldSolidBrep; + return std::make_pair(theManifoldSolidBrep, aTessItem); } //============================================================================= @@ -75,9 +83,16 @@ TopoDSToStep_MakeManifoldSolidBrep:: const Handle(Transfer_FinderProcess)& FP, const Message_ProgressRange& theProgress) { - theManifoldSolidBrep = MakeManifoldSolidBrep(aShell, FP, theProgress); - done = !theManifoldSolidBrep.IsNull(); - if (!done && !theProgress.UserBreak()) { + std::pair + aResult = MakeManifoldSolidBrep(aShell, FP, theProgress); + done = !aResult.first.IsNull() || !aResult.second.IsNull(); + if (done) + { + theManifoldSolidBrep = aResult.first; + theTessellatedItem = aResult.second; + } + if (!done && !theProgress.UserBreak()) + { Handle(TransferBRep_ShapeMapper) errShape = new TransferBRep_ShapeMapper(aShell); FP->AddWarning(errShape, " Closed Shell not mapped to ManifoldSolidBrep"); } @@ -94,16 +109,37 @@ TopoDSToStep_MakeManifoldSolidBrep:: const Message_ProgressRange& theProgress) { TopoDS_Shell aOuterShell = BRepClass3d::OuterShell(aSolid); - if (!aOuterShell.IsNull()) { - - theManifoldSolidBrep = MakeManifoldSolidBrep(aOuterShell, FP, theProgress); - done = !theManifoldSolidBrep.IsNull(); - if (!done && !theProgress.UserBreak()) { + if (!aOuterShell.IsNull()) + { + std::pair + aResult = MakeManifoldSolidBrep(aOuterShell, FP, theProgress); + done = !aResult.first.IsNull() || !aResult.second.IsNull(); + if (done) + { + theManifoldSolidBrep = aResult.first; + if (!aResult.second.IsNull()) { + Handle(StepVisual_TessellatedSolid) aTessSolid = new StepVisual_TessellatedSolid(); + Handle(StepVisual_TessellatedShell) aTessShell = Handle(StepVisual_TessellatedShell)::DownCast(aResult.second); + Handle(TCollection_HAsciiString) aName = new TCollection_HAsciiString(""); + Handle(StepVisual_HArray1OfTessellatedStructuredItem) anItems + = new StepVisual_HArray1OfTessellatedStructuredItem(1, aTessShell->NbItems()); + for (Standard_Integer i = 1; i <= aTessShell->NbItems(); ++i) + { + anItems->SetValue(i, aTessShell->ItemsValue(i)); + } + Standard_Boolean aHasGeomLink = !theManifoldSolidBrep.IsNull(); + aTessSolid->Init(aName, anItems, aHasGeomLink, theManifoldSolidBrep); + theTessellatedItem = aTessSolid; + } + } + if (!done && !theProgress.UserBreak()) + { Handle(TransferBRep_ShapeMapper) errShape = new TransferBRep_ShapeMapper(aOuterShell); FP->AddWarning(errShape, " Outer Shell of Solid not mapped to ManifoldSolidBrep"); } } - else { + else + { Handle(TransferBRep_ShapeMapper) errShape = new TransferBRep_ShapeMapper(aOuterShell); FP->AddWarning(errShape, " Outer Shell is null; not mapped to ManifoldSolidBrep "); done = Standard_False; @@ -120,3 +156,15 @@ const Handle(StepShape_ManifoldSolidBrep) & StdFail_NotDone_Raise_if (!done, "TopoDSToStep_MakeManifoldSolidBrep::Value() - no result"); return theManifoldSolidBrep; } + +// ============================================================================ +// Method : TopoDSToStep_MakeManifoldSolidBrep::TessellatedValue +// Purpose : Returns TessellatedItem as the optional result +// ============================================================================ + +const Handle(StepVisual_TessellatedItem)& +TopoDSToStep_MakeManifoldSolidBrep::TessellatedValue() const +{ + StdFail_NotDone_Raise_if(!done, "TopoDSToStep_MakeManifoldSolidBrep::TessellatedValue() - no result"); + return theTessellatedItem; +} diff --git a/src/TopoDSToStep/TopoDSToStep_MakeManifoldSolidBrep.hxx b/src/TopoDSToStep/TopoDSToStep_MakeManifoldSolidBrep.hxx index 0bf9e3ff77..ccc63454a0 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeManifoldSolidBrep.hxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeManifoldSolidBrep.hxx @@ -25,6 +25,7 @@ #include class StepShape_ManifoldSolidBrep; +class StepVisual_TessellatedItem; class StdFail_NotDone; class TopoDS_Shell; class Transfer_FinderProcess; @@ -51,6 +52,7 @@ public: const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT const Handle(StepShape_ManifoldSolidBrep)& Value() const; + Standard_EXPORT const Handle(StepVisual_TessellatedItem)& TessellatedValue() const; @@ -66,6 +68,7 @@ private: Handle(StepShape_ManifoldSolidBrep) theManifoldSolidBrep; + Handle(StepVisual_TessellatedItem) theTessellatedItem; }; diff --git a/src/TopoDSToStep/TopoDSToStep_MakeShellBasedSurfaceModel.cxx b/src/TopoDSToStep/TopoDSToStep_MakeShellBasedSurfaceModel.cxx index a2faeee224..e266905abd 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeShellBasedSurfaceModel.cxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeShellBasedSurfaceModel.cxx @@ -15,6 +15,7 @@ // commercial license or contractual agreement. +#include #include #include #include @@ -27,6 +28,9 @@ #include #include #include +#include +#include +#include #include #include #include @@ -52,34 +56,42 @@ TopoDSToStep_MakeShellBasedSurfaceModel:: done = Standard_False; MoniTool_DataMapOfShapeTransient aMap; + const Standard_Integer aWriteTessGeom = Interface_Static::IVal("write.step.tessellated"); + TopoDSToStep_Tool aTool(aMap, Standard_False); - TopoDSToStep_Builder StepB(aFace, aTool, FP, theProgress); + TopoDSToStep_Builder StepB(aFace, aTool, FP, aWriteTessGeom, theProgress); if (theProgress.UserBreak()) return; TopoDSToStep::AddResult ( FP, aTool ); - if (StepB.IsDone()) { + if (StepB.IsDone()) + { Handle(StepShape_FaceSurface) aFS = Handle(StepShape_FaceSurface)::DownCast(StepB.Value()); - StepShape_Shell aShellSelect; - Handle(StepShape_OpenShell) aOpenShell - = new StepShape_OpenShell(); - Handle(StepShape_HArray1OfFace) aCfsFaces = - new StepShape_HArray1OfFace(1,1); - aCfsFaces->SetValue(1,aFS); - Handle(TCollection_HAsciiString) aName = - new TCollection_HAsciiString(""); - aOpenShell->Init(aName, aCfsFaces); - aShellSelect.SetValue(aOpenShell); - Handle(StepShape_HArray1OfShell) aSbsmFaces = - new StepShape_HArray1OfShell(1,1); - aSbsmFaces->SetValue(1, aShellSelect); - theShellBasedSurfaceModel = new StepShape_ShellBasedSurfaceModel(); - theShellBasedSurfaceModel->Init(aName, aSbsmFaces); + if (!aFS.IsNull()) + { + StepShape_Shell aShellSelect; + Handle(StepShape_OpenShell) aOpenShell + = new StepShape_OpenShell(); + Handle(StepShape_HArray1OfFace) aCfsFaces = + new StepShape_HArray1OfFace(1, 1); + aCfsFaces->SetValue(1, aFS); + Handle(TCollection_HAsciiString) aName = + new TCollection_HAsciiString(""); + aOpenShell->Init(aName, aCfsFaces); + aShellSelect.SetValue(aOpenShell); + Handle(StepShape_HArray1OfShell) aSbsmFaces = + new StepShape_HArray1OfShell(1, 1); + aSbsmFaces->SetValue(1, aShellSelect); + theShellBasedSurfaceModel = new StepShape_ShellBasedSurfaceModel(); + theShellBasedSurfaceModel->Init(aName, aSbsmFaces); + } + theTessellatedItem = StepB.TessellatedValue(); done = Standard_True; } - else { + else + { done = Standard_False; Handle(TransferBRep_ShapeMapper) errShape = new TransferBRep_ShapeMapper(aFace); @@ -102,31 +114,34 @@ TopoDSToStep_MakeShellBasedSurfaceModel:: Handle(StepShape_OpenShell) aOpenShell; Handle(StepShape_ClosedShell) aClosedShell; MoniTool_DataMapOfShapeTransient aMap; - + + const Standard_Integer aWriteTessGeom = Interface_Static::IVal("write.step.tessellated"); + TopoDSToStep_Tool aTool(aMap, Standard_False); - TopoDSToStep_Builder StepB(aShell, aTool, FP, theProgress); + TopoDSToStep_Builder StepB(aShell, aTool, FP, aWriteTessGeom, theProgress); if (theProgress.UserBreak()) return; //TopoDSToStep::AddResult ( FP, aTool ); if (StepB.IsDone()) { - aSbsmBoundary = new StepShape_HArray1OfShell(1,1); - if (aShell.Closed()) { - aClosedShell = Handle(StepShape_ClosedShell)::DownCast(StepB.Value()); - aShellSelect.SetValue(aClosedShell); + if (!StepB.Value().IsNull()) { + aSbsmBoundary = new StepShape_HArray1OfShell(1, 1); + if (aShell.Closed()) { + aClosedShell = Handle(StepShape_ClosedShell)::DownCast(StepB.Value()); + aShellSelect.SetValue(aClosedShell); + } + else { + aOpenShell = Handle(StepShape_OpenShell)::DownCast(StepB.Value()); + aShellSelect.SetValue(aOpenShell); + } + aSbsmBoundary->SetValue(1, aShellSelect); + theShellBasedSurfaceModel = new StepShape_ShellBasedSurfaceModel(); + Handle(TCollection_HAsciiString) aName = + new TCollection_HAsciiString(""); + theShellBasedSurfaceModel->Init(aName, aSbsmBoundary); + TopoDSToStep::AddResult(FP, aShell, theShellBasedSurfaceModel); } - else { - aOpenShell = Handle(StepShape_OpenShell)::DownCast(StepB.Value()); - aShellSelect.SetValue(aOpenShell); - } - aSbsmBoundary->SetValue(1,aShellSelect); - theShellBasedSurfaceModel = new StepShape_ShellBasedSurfaceModel(); - Handle(TCollection_HAsciiString) aName = - new TCollection_HAsciiString(""); - theShellBasedSurfaceModel->Init(aName, aSbsmBoundary); - - // bind SBSM - TopoDSToStep::AddResult(FP,aShell,theShellBasedSurfaceModel); + theTessellatedItem = StepB.TessellatedValue(); done = Standard_True; } else { @@ -135,7 +150,7 @@ TopoDSToStep_MakeShellBasedSurfaceModel:: new TransferBRep_ShapeMapper(aShell); FP->AddWarning(errShape, " Shell not mapped to ShellBasedSurfaceModel"); } - + TopoDSToStep::AddResult ( FP, aTool ); } @@ -153,11 +168,14 @@ TopoDSToStep_MakeShellBasedSurfaceModel:: Handle(StepShape_HArray1OfShell) aSbsmBoundary; Handle(StepShape_OpenShell) aOpenShell; Handle(StepShape_ClosedShell) aClosedShell; - TopoDS_Iterator It; - TopoDS_Shell aShell; - MoniTool_DataMapOfShapeTransient aMap; - TColStd_SequenceOfTransient S; - + TopoDS_Iterator It; + TopoDS_Shell aShell; + MoniTool_DataMapOfShapeTransient aMap; + TColStd_SequenceOfTransient S; + TColStd_SequenceOfTransient aTessShells; + + const Standard_Integer aWriteTessGeom = Interface_Static::IVal("write.step.tessellated"); + Standard_Integer nbshapes = 0; for (It.Initialize(aSolid); It.More(); It.Next()) if (It.Value().ShapeType() == TopAbs_SHELL) @@ -169,16 +187,23 @@ TopoDSToStep_MakeShellBasedSurfaceModel:: aShell = TopoDS::Shell(It.Value()); TopoDSToStep_Tool aTool(aMap, Standard_False); - TopoDSToStep_Builder StepB(aShell, aTool, FP, aPS.Next()); + TopoDSToStep_Builder StepB(aShell, aTool, FP, aWriteTessGeom, aPS.Next()); TopoDSToStep::AddResult ( FP, aTool ); if (StepB.IsDone()) { - S.Append(StepB.Value()); + if (!StepB.Value().IsNull()) { + S.Append(StepB.Value()); + } + Handle(StepVisual_TessellatedItem) aTessShell = StepB.TessellatedValue(); + if (!aTessShell.IsNull()) + { + aTessShells.Append(aTessShell); + } } else { - Handle(TransferBRep_ShapeMapper) errShape = - new TransferBRep_ShapeMapper(aShell); - FP->AddWarning(errShape," Shell from Solid not mapped to ShellBasedSurfaceModel"); + Handle(TransferBRep_ShapeMapper) errShape = + new TransferBRep_ShapeMapper(aShell); + FP->AddWarning(errShape, " Shell from Solid not mapped to ShellBasedSurfaceModel"); } } } @@ -190,11 +215,11 @@ TopoDSToStep_MakeShellBasedSurfaceModel:: for (Standard_Integer i=1; i<=N; i++) { aOpenShell = Handle(StepShape_OpenShell)::DownCast(S.Value(i)); if (!aOpenShell.IsNull()) { - aShellSelect.SetValue(aOpenShell); + aShellSelect.SetValue(aOpenShell); } else { - aClosedShell = Handle(StepShape_ClosedShell)::DownCast(S.Value(i)); - aShellSelect.SetValue(aClosedShell); + aClosedShell = Handle(StepShape_ClosedShell)::DownCast(S.Value(i)); + aShellSelect.SetValue(aClosedShell); } aSbsmBoundary->SetValue(i,aShellSelect); } @@ -203,6 +228,22 @@ TopoDSToStep_MakeShellBasedSurfaceModel:: Handle(TCollection_HAsciiString) aName = new TCollection_HAsciiString(""); theShellBasedSurfaceModel->Init(aName,aSbsmBoundary); + + if (!aTessShells.IsEmpty()) + { + Handle(StepVisual_TessellatedGeometricSet) aTessGS = new StepVisual_TessellatedGeometricSet(); + Handle(TCollection_HAsciiString) aTessName = new TCollection_HAsciiString(""); + NCollection_Handle anItems + = new StepVisual_Array1OfTessellatedItem(1, aTessShells.Length()); + Standard_Integer i = 1; + for (TColStd_SequenceOfTransient::Iterator anIt(aTessShells); anIt.More(); anIt.Next(), ++i) + { + Handle(StepVisual_TessellatedShell) aTessShell = Handle(StepVisual_TessellatedShell)::DownCast(anIt.Value()); + anItems->SetValue(i, aTessShell); + } + aTessGS->Init(aTessName, anItems); + } + done = Standard_True; } else { @@ -223,3 +264,15 @@ const Handle(StepShape_ShellBasedSurfaceModel) & StdFail_NotDone_Raise_if (!done, "TopoDSToStep_MakeShellBasedSurfaceModel::Value() - no result"); return theShellBasedSurfaceModel; } + +// ============================================================================ +// Method : TopoDSToStep_MakeShellBasedSurfaceModel::TessellatedValue +// Purpose : Returns TessellatedItem as the optional result +// ============================================================================ + +const Handle(StepVisual_TessellatedItem)& +TopoDSToStep_MakeShellBasedSurfaceModel::TessellatedValue() const +{ + StdFail_NotDone_Raise_if(!done, "TopoDSToStep_MakeShellBasedSurfaceModel::TessellatedValue() - no result"); + return theTessellatedItem; +} diff --git a/src/TopoDSToStep/TopoDSToStep_MakeShellBasedSurfaceModel.hxx b/src/TopoDSToStep/TopoDSToStep_MakeShellBasedSurfaceModel.hxx index 098622a986..9e1e7f437f 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeShellBasedSurfaceModel.hxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeShellBasedSurfaceModel.hxx @@ -25,6 +25,7 @@ #include class StepShape_ShellBasedSurfaceModel; +class StepVisual_TessellatedItem; class StdFail_NotDone; class TopoDS_Face; class Transfer_FinderProcess; @@ -56,7 +57,7 @@ public: const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT const Handle(StepShape_ShellBasedSurfaceModel)& Value() const; - + Standard_EXPORT const Handle(StepVisual_TessellatedItem)& TessellatedValue() const; @@ -71,6 +72,7 @@ private: Handle(StepShape_ShellBasedSurfaceModel) theShellBasedSurfaceModel; + Handle(StepVisual_TessellatedItem) theTessellatedItem; }; diff --git a/src/TopoDSToStep/TopoDSToStep_MakeStepFace.cxx b/src/TopoDSToStep/TopoDSToStep_MakeStepFace.cxx index 7cea157b53..71d70edff1 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeStepFace.cxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeStepFace.cxx @@ -187,6 +187,18 @@ void TopoDSToStep_MakeStepFace::Init(const TopoDS_Face& aFace, // ----------------- Handle(Geom_Surface) Su = BRep_Tool::Surface(ForwardFace); + + if (Su.IsNull()) + { +#ifdef OCCT_DEBUG + std::cout << "Warning : Face without geometry not mapped"; +#endif + FP->AddWarning(errShape, " Face without geometry not mapped"); + myError = TopoDSToStep_FaceOther; + done = Standard_False; + return; + } + // CKY 23 SEP 1996 : une FACE de Step n a pas droit a RECTANGULAR_TRIMMED... // Il faut donc d abord "demonter" la RectangularTrimmedSurface pour // passer la Surface de base diff --git a/src/TopoDSToStep/TopoDSToStep_MakeTessellatedItem.cxx b/src/TopoDSToStep/TopoDSToStep_MakeTessellatedItem.cxx new file mode 100644 index 0000000000..07efb29c47 --- /dev/null +++ b/src/TopoDSToStep/TopoDSToStep_MakeTessellatedItem.cxx @@ -0,0 +1,210 @@ +// 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//============================================================================= +// +//============================================================================= + +TopoDSToStep_MakeTessellatedItem::TopoDSToStep_MakeTessellatedItem() + : TopoDSToStep_Root() +{ +} + +TopoDSToStep_MakeTessellatedItem:: +TopoDSToStep_MakeTessellatedItem(const TopoDS_Face& theFace, + TopoDSToStep_Tool& theTool, + const Handle(Transfer_FinderProcess)& theFP, + const Message_ProgressRange& theProgress) + : TopoDSToStep_Root() +{ + Init(theFace, theTool, theFP, theProgress); +} + +//============================================================================= +// +//============================================================================= + +TopoDSToStep_MakeTessellatedItem:: +TopoDSToStep_MakeTessellatedItem(const TopoDS_Shell& theShell, + TopoDSToStep_Tool& theTool, + const Handle(Transfer_FinderProcess)& theFP, + const Message_ProgressRange& theProgress) + : TopoDSToStep_Root() +{ + Init(theShell, theTool, theFP, theProgress); +} + +//============================================================================= +// Create a TriangulatedFace of StepVisual from a Face of TopoDS +//============================================================================= + +void TopoDSToStep_MakeTessellatedItem::Init(const TopoDS_Face& theFace, + TopoDSToStep_Tool& theTool, + const Handle(Transfer_FinderProcess)& theFP, + const Message_ProgressRange& theProgress) +{ + done = Standard_False; + + if (theProgress.UserBreak()) + return; + + TopLoc_Location aLoc; + const Handle(Poly_Triangulation)& aMesh = BRep_Tool::Triangulation(theFace, aLoc); + if (!aMesh.IsNull()) + { + Handle(StepVisual_TriangulatedFace) aTriaFace = new StepVisual_TriangulatedFace(); + Handle(TCollection_HAsciiString) aName = new TCollection_HAsciiString(""); + Handle(StepVisual_CoordinatesList) aCoordinates = new StepVisual_CoordinatesList(); + Handle(TColgp_HArray1OfXYZ) aPoints = new TColgp_HArray1OfXYZ(1, aMesh->NbNodes()); + for (Standard_Integer i = 1; i <= aMesh->NbNodes(); ++i) + { + aPoints->SetValue(i, aMesh->Node(i).XYZ()); + } + aCoordinates->Init(aName, aPoints); + Handle(TColStd_HArray2OfReal) aNormals = new TColStd_HArray2OfReal(1, aMesh->NbNodes(), 1, 3); + if (!aMesh->HasNormals()) + { + Poly::ComputeNormals(aMesh); + } + for (Standard_Integer i = 1; i <= aMesh->NbNodes(); ++i) + { + gp_Dir aNorm = aMesh->Normal(i); + aNormals->SetValue(i, 1, aNorm.X()); + aNormals->SetValue(i, 2, aNorm.Y()); + aNormals->SetValue(i, 3, aNorm.Z()); + } + const Standard_Boolean aHasGeomLink = theTool.IsBound(theFace); + StepVisual_FaceOrSurface aGeomLink; + if (aHasGeomLink) + { + Handle(StepShape_TopologicalRepresentationItem) aTopoItem = theTool.Find(theFace); + aGeomLink.SetValue(aTopoItem); + } + Handle(TColStd_HArray1OfInteger) anIndices = new TColStd_HArray1OfInteger(1, aMesh->NbNodes()); + for (Standard_Integer i = 1; i <= aMesh->NbNodes(); ++i) + { + anIndices->SetValue(i, i); + } + Handle(TColStd_HArray2OfInteger) aTrias = new TColStd_HArray2OfInteger(1, aMesh->NbTriangles(), 1, 3); + for (Standard_Integer i = 1; i <= aMesh->NbTriangles(); ++i) + { + const Poly_Triangle& aT = aMesh->Triangle(i); + aTrias->SetValue(i, 1, aT.Value(1)); + aTrias->SetValue(i, 2, aT.Value(2)); + aTrias->SetValue(i, 3, aT.Value(3)); + } + aTriaFace->Init(aName, aCoordinates, aMesh->NbNodes(), aNormals, aHasGeomLink, aGeomLink, anIndices, aTrias); + theTessellatedItem = aTriaFace; + + done = Standard_True; + } + else + { + done = Standard_False; + Handle(TransferBRep_ShapeMapper) anErrShape = + new TransferBRep_ShapeMapper(theFace); + theFP->AddWarning(anErrShape, " Face not mapped to TessellatedItem"); + } + +} + +//============================================================================= +// Create a TesselatedShell of StepVisual from a Shell of TopoDS +//============================================================================= + +void TopoDSToStep_MakeTessellatedItem::Init(const TopoDS_Shell& theShell, + TopoDSToStep_Tool& theTool, + const Handle(Transfer_FinderProcess)& theFP, + const Message_ProgressRange& theProgress) +{ + done = Standard_False; + theTessellatedItem.Nullify(); + + if (theProgress.UserBreak()) + return; + + TopExp_Explorer anExp; + Standard_Integer aNbFaces = 0; + for (anExp.Init(theShell, TopAbs_FACE); anExp.More(); anExp.Next(), ++aNbFaces) {} + + Message_ProgressScope aPS(theProgress, NULL, aNbFaces); + + NCollection_Sequence aTessFaces; + for (anExp.Init(theShell, TopAbs_FACE); anExp.More() && aPS.More(); anExp.Next(), aPS.Next()) + { + const TopoDS_Face aFace = TopoDS::Face(anExp.Current()); + TopoDSToStep_MakeTessellatedItem aMakeFace(aFace, theTool, theFP, aPS.Next()); + if (aMakeFace.IsDone()) + { + aTessFaces.Append(Handle(StepVisual_TessellatedStructuredItem)::DownCast(aMakeFace.Value())); + } + } + + if (aTessFaces.IsEmpty()) + { + return; + } + + Handle(StepVisual_TessellatedShell) aTessShell = new StepVisual_TessellatedShell(); + Handle(TCollection_HAsciiString) aName = new TCollection_HAsciiString(""); + + Handle(StepVisual_HArray1OfTessellatedStructuredItem) anItems + = new StepVisual_HArray1OfTessellatedStructuredItem(1, aTessFaces.Size()); + for (Standard_Integer i = aTessFaces.Lower(); i <= aTessFaces.Upper(); ++i) + { + anItems->SetValue(i, aTessFaces.Value(i)); + } + + Handle(StepShape_ConnectedFaceSet) aFaceSet; + if (theTool.IsBound(theShell)) + { + aFaceSet = Handle(StepShape_ConnectedFaceSet)::DownCast(theTool.Find(theShell)); + } + + const Standard_Boolean aHasTopoLink = !aFaceSet.IsNull(); + aTessShell->Init(aName, anItems, aHasTopoLink, aFaceSet); + + theTessellatedItem = aTessShell; + + //TopoDSToStep::AddResult(theFP, theShell, theTessellatedItem); + done = Standard_True; +} + +// ============================================================================ +// Method : TopoDSToStep_MakeTessellatedItem::Value +// Purpose : Returns TessellatedItem as the result +// ============================================================================ + +const Handle(StepVisual_TessellatedItem) & +TopoDSToStep_MakeTessellatedItem::Value() const +{ + StdFail_NotDone_Raise_if (!done, "TopoDSToStep_MakeTessellatedItem::Value() - no result"); + return theTessellatedItem; +} diff --git a/src/TopoDSToStep/TopoDSToStep_MakeTessellatedItem.hxx b/src/TopoDSToStep/TopoDSToStep_MakeTessellatedItem.hxx new file mode 100644 index 0000000000..41a2cb8b2d --- /dev/null +++ b/src/TopoDSToStep/TopoDSToStep_MakeTessellatedItem.hxx @@ -0,0 +1,86 @@ +// 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 _TopoDSToStep_MakeTessellatedItem_HeaderFile +#define _TopoDSToStep_MakeTessellatedItem_HeaderFile + +#include +#include +#include + +#include +#include + +class StepVisual_TessellatedItem; +class TopoDS_Face; +class TopoDS_Shell; +class Transfer_FinderProcess; + +//! This class implements the mapping between +//! Face, Shell fromTopoDS and TriangulatedFace from StepVisual. +class TopoDSToStep_MakeTessellatedItem : public TopoDSToStep_Root +{ +public: + + DEFINE_STANDARD_ALLOC + + + Standard_EXPORT TopoDSToStep_MakeTessellatedItem(); + + Standard_EXPORT TopoDSToStep_MakeTessellatedItem(const TopoDS_Face& theFace, + TopoDSToStep_Tool& theTool, + const Handle(Transfer_FinderProcess)& theFP, + const Message_ProgressRange& theProgress = Message_ProgressRange()); + + Standard_EXPORT TopoDSToStep_MakeTessellatedItem(const TopoDS_Shell& theShell, + TopoDSToStep_Tool& theTool, + const Handle(Transfer_FinderProcess)& theFP, + const Message_ProgressRange& theProgress = Message_ProgressRange()); + + Standard_EXPORT void Init(const TopoDS_Face& theFace, + TopoDSToStep_Tool& theTool, + const Handle(Transfer_FinderProcess)& theFP, + const Message_ProgressRange& theProgress = Message_ProgressRange()); + + Standard_EXPORT void Init(const TopoDS_Shell& theShell, + TopoDSToStep_Tool& theTool, + const Handle(Transfer_FinderProcess)& theFP, + const Message_ProgressRange& theProgress = Message_ProgressRange()); + + Standard_EXPORT const Handle(StepVisual_TessellatedItem)& Value() const; + + + + +protected: + + + + + +private: + + + + Handle(StepVisual_TessellatedItem) theTessellatedItem; + + +}; + + + + + + + +#endif // _TopoDSToStep_MakeTessellatedItem_HeaderFile diff --git a/tests/bugs/step/bug31685_1 b/tests/bugs/step/bug31685_1 index 0b789b5804..58734ecb7f 100644 --- a/tests/bugs/step/bug31685_1 +++ b/tests/bugs/step/bug31685_1 @@ -14,12 +14,12 @@ checkshape res f set dump [XDumpNbDGTs D f] set info " - NbOfDimensions : 14 + NbOfDimensions : 15 NbOfDimensionalSize : 7 NbOfDimensionalLocation: 0 NbOfAngular : 0 NbOfWithPath : 0 - NbOfCommonLabels : 0 + NbOfCommonLabels : 1 NbOfTolerances : 22 NbOfGTWithModifiers : 4 NbOfGTWithMaxTolerance : 0 diff --git a/tests/bugs/step/bug33099 b/tests/bugs/step/bug33099 new file mode 100644 index 0000000000..6edaafe10d --- /dev/null +++ b/tests/bugs/step/bug33099 @@ -0,0 +1,58 @@ +puts "====================================" +puts "0033099: Data Exchange, Step Import - Wrong PMI values in GDT" +puts "====================================" + +pload OCAF + +Close D -silent + +ReadStep D [locate_data_file bug33099.stp] + +set tolType0 [XGetTypeOfTolerance D 0:1:4:1] +set tolVal0 [XGetToleranceValue D 0:1:4:1] +if {[string first "ProfileOfSurface" $tolType0] == -1 + || [expr {double(round(100 * $tolVal0))/100}] != 0.1} { + puts "Error: Tolerance data is not correct" +} + +set tolType1 [XGetTypeOfTolerance D 0:1:4:5] +set tolVal1 [XGetToleranceValue D 0:1:4:5] +if {[string first "Position" $tolType1] == -1 + || $tolVal1 != 0} { + puts "Error: Tolerance data is not correct" +} + +set tolType2 [XGetTypeOfTolerance D 0:1:4:6] +set tolVal2 [XGetToleranceValue D 0:1:4:6] +if {[string first "Position" $tolType2] == -1 + || $tolVal2 != 0} { + puts "Error: Tolerance data is not correct" +} + +set tolType3 [XGetTypeOfTolerance D 0:1:4:7] +set tolVal3 [XGetToleranceValue D 0:1:4:7] +if {[string first "Position" $tolType3] == -1 + || $tolVal3 != 0} { + puts "Error: Tolerance data is not correct" +} + +set dimType0 [XGetDimensionType D 0:1:4:8] +set dimVal0 [XGetDimensionValue D 0:1:4:8] +if {[string first "Location_LinearDistance" $dimType0] == -1 + || [expr {double(round(100 * $dimVal0))/100}] != 21.0} { + puts "Error: Dimension data is not correct" +} + +set dimType1 [XGetDimensionType D 0:1:4:9] +set dimVal1 [XGetDimensionValue D 0:1:4:9] +if {[string first "Location_LinearDistance" $dimType1] == -1 + || [expr {double(round(100 * $dimVal1))/100}] != 5.0} { + puts "Error: Dimension data is not correct" +} + +set dimType2 [XGetDimensionType D 0:1:4:10] +set dimVal2 [XGetDimensionValue D 0:1:4:10] +if {[string first "Location_LinearDistance" $dimType2] == -1 + || [expr {double(round(100 * $dimVal2))/100}] != 2.5} { + puts "Error: Dimension data is not correct" +} \ No newline at end of file diff --git a/tests/de_mesh/grids.list b/tests/de_mesh/grids.list index 60189db3b1..d7aabf0c4c 100644 --- a/tests/de_mesh/grids.list +++ b/tests/de_mesh/grids.list @@ -1,5 +1,7 @@ 001 stl_read 002 shape_write_stl 003 gltf_read -004 obj_read -005 gltf_write +004 gltf_write +005 obj_read +006 step_read +007 step_write \ No newline at end of file diff --git a/tests/de_mesh/step_read/A1 b/tests/de_mesh/step_read/A1 new file mode 100644 index 0000000000..6d367a3f74 --- /dev/null +++ b/tests/de_mesh/step_read/A1 @@ -0,0 +1,10 @@ + +set filename "bug30024_tessell.stp" + +ReadStep D [locate_data_file ${filename}] + +XGetOneShape S D + +set nb_faces 131 +set nb_nodes 2216 +set nb_triangles 2118 diff --git a/tests/de_mesh/step_read/A2 b/tests/de_mesh/step_read/A2 new file mode 100644 index 0000000000..33aaba4759 --- /dev/null +++ b/tests/de_mesh/step_read/A2 @@ -0,0 +1,12 @@ + +puts "0030839: Data Exchange - triangulation-only STEP file is read as empty shape" + +set filename "nist_ftc_08_asme1_ap242-2.stp" + +ReadStep D [locate_data_file ${filename}] + +XGetOneShape S D + +set nb_faces 273 +set nb_nodes 3788 +set nb_triangles 2893 diff --git a/tests/de_mesh/step_read/A3 b/tests/de_mesh/step_read/A3 new file mode 100644 index 0000000000..04b720352a --- /dev/null +++ b/tests/de_mesh/step_read/A3 @@ -0,0 +1,15 @@ + +puts "0032666: Cannot write STEP file from an XCAF document containing only triangulations in the faces" + +set filename "bug32666.xbf" + +XOpen [locate_data_file ${filename}] D0 +WriteStep D0 ${imagedir}/${casename}.stp + +ReadStep D ${imagedir}/${casename}.stp + +XGetOneShape S D + +set nb_faces 3 +set nb_nodes 428 +set nb_triangles 372 diff --git a/tests/de_mesh/step_read/B1 b/tests/de_mesh/step_read/B1 new file mode 100644 index 0000000000..075dd878b2 --- /dev/null +++ b/tests/de_mesh/step_read/B1 @@ -0,0 +1,16 @@ + +box S -min -5 -5 -5 -max 5 5 5 + +incmesh S 0.1 + +stepwrite a S "${imagedir}/${casename}.stp" + +param read.step.tessellated OnNoBRep + +ReadStep D "${imagedir}/${casename}.stp" + +XGetOneShape S D + +set nb_faces 6 +set nb_nodes 0 +set nb_triangles 0 diff --git a/tests/de_mesh/step_read/begin b/tests/de_mesh/step_read/begin new file mode 100644 index 0000000000..07d984e683 --- /dev/null +++ b/tests/de_mesh/step_read/begin @@ -0,0 +1,5 @@ +pload XDE OCAF MODELING + +# enable reading/writing tessellated STEP geometry +param read.step.tessellated On +param write.step.tessellated On diff --git a/tests/de_mesh/step_read/end b/tests/de_mesh/step_read/end new file mode 100644 index 0000000000..fd5f18a17d --- /dev/null +++ b/tests/de_mesh/step_read/end @@ -0,0 +1,20 @@ + +checktrinfo S -face ${nb_faces} -nod ${nb_nodes} -tri ${nb_triangles} + +vclear +vinit View1 +XDisplay -dispMode 1 D -explore +vaxo +vfit + +vrenderparams -shadingModel PHONG +vlight -change 0 -intensity 2.5 +vlight -change 1 -intensity 0.3 +vcamera -orthographic +vdump ${imagedir}/${casename}.png + +Close D -silent +unset S + +param read.step.tessellated Off +param write.step.tessellated Off diff --git a/tests/de_mesh/step_write/A1 b/tests/de_mesh/step_write/A1 new file mode 100644 index 0000000000..c8adfc1417 --- /dev/null +++ b/tests/de_mesh/step_write/A1 @@ -0,0 +1,8 @@ + +# load from mesh (STL) format + +readstl S [locate_data_file "b4.stl"] + +set nb_faces 1 +set nb_nodes 8 +set nb_triangles 12 diff --git a/tests/de_mesh/step_write/A2 b/tests/de_mesh/step_write/A2 new file mode 100644 index 0000000000..7530f41a21 --- /dev/null +++ b/tests/de_mesh/step_write/A2 @@ -0,0 +1,8 @@ + +# load from mesh (STL) format + +readstl S [locate_data_file "model_stl_001.stl"] + +set nb_faces 1 +set nb_nodes 1807 +set nb_triangles 3609 diff --git a/tests/de_mesh/step_write/A3 b/tests/de_mesh/step_write/A3 new file mode 100644 index 0000000000..319d7d06ef --- /dev/null +++ b/tests/de_mesh/step_write/A3 @@ -0,0 +1,8 @@ + +# load from mesh (STL) format + +readstl S [locate_data_file "model_stl_005.stl"] + +set nb_faces 1 +set nb_nodes 5265 +set nb_triangles 10526 diff --git a/tests/de_mesh/step_write/A4 b/tests/de_mesh/step_write/A4 new file mode 100644 index 0000000000..577a3d88db --- /dev/null +++ b/tests/de_mesh/step_write/A4 @@ -0,0 +1,8 @@ + +# load from mesh (STL) format + +readstl S [locate_data_file "OCC6652.stl"] + +set nb_faces 1 +set nb_nodes 13441 +set nb_triangles 26966 diff --git a/tests/de_mesh/step_write/B1 b/tests/de_mesh/step_write/B1 new file mode 100644 index 0000000000..2fe5b3973b --- /dev/null +++ b/tests/de_mesh/step_write/B1 @@ -0,0 +1,9 @@ + +# simple meshed box (mesh + brep) + +box S 1 1 1 +incmesh S 0.1 + +set nb_faces 6 +set nb_nodes 24 +set nb_triangles 12 diff --git a/tests/de_mesh/step_write/B2 b/tests/de_mesh/step_write/B2 new file mode 100644 index 0000000000..badc7685cd --- /dev/null +++ b/tests/de_mesh/step_write/B2 @@ -0,0 +1,13 @@ + +# simple meshed box with void (mesh + brep) + +box b1 -min -5 -5 -5 -max 5 5 5 +box b2 -min -3 -3 -3 -max 3 3 3 + +bcut S b1 b2 + +incmesh S 0.1 + +set nb_faces 12 +set nb_nodes 48 +set nb_triangles 24 diff --git a/tests/de_mesh/step_write/C1 b/tests/de_mesh/step_write/C1 new file mode 100644 index 0000000000..efc9869359 --- /dev/null +++ b/tests/de_mesh/step_write/C1 @@ -0,0 +1,10 @@ + +# simple meshed box (mesh without brep) + +box S 1 1 1 +incmesh S 0.1 +tclean -geom S + +set nb_faces 6 +set nb_nodes 24 +set nb_triangles 12 diff --git a/tests/de_mesh/step_write/C2 b/tests/de_mesh/step_write/C2 new file mode 100644 index 0000000000..8b67153803 --- /dev/null +++ b/tests/de_mesh/step_write/C2 @@ -0,0 +1,11 @@ + +# simple meshed box (mesh with brep) + +param write.step.tessellated OnNoBRep + +box S 1 1 1 +incmesh S 0.1 + +set nb_faces 6 +set nb_nodes 0 +set nb_triangles 0 diff --git a/tests/de_mesh/step_write/begin b/tests/de_mesh/step_write/begin new file mode 100644 index 0000000000..07d984e683 --- /dev/null +++ b/tests/de_mesh/step_write/begin @@ -0,0 +1,5 @@ +pload XDE OCAF MODELING + +# enable reading/writing tessellated STEP geometry +param read.step.tessellated On +param write.step.tessellated On diff --git a/tests/de_mesh/step_write/end b/tests/de_mesh/step_write/end new file mode 100644 index 0000000000..3a5f84ddcf --- /dev/null +++ b/tests/de_mesh/step_write/end @@ -0,0 +1,33 @@ + +# save the initial shape to STEP +stepwrite a S "${imagedir}/${casename}.stp" + +# read saved STEP into an OCAF document +ReadStep D "${imagedir}/${casename}.stp" + +# get document model as a single shape +XGetOneShape S1 D + +# check tessellation metrics of the shape restored from STEP +checktrinfo S1 -face ${nb_faces} -nod ${nb_nodes} -tri ${nb_triangles} + +vclear +vinit View1 +XDisplay -dispMode 1 D -explore +vaxo +vfit + +vrenderparams -shadingModel PHONG +vlight -change 0 -intensity 2.5 +vlight -change 1 -intensity 0.3 +vcamera -orthographic +vdump ${imagedir}/${casename}.png + +Close D -silent +Close D1 -silent +unset S +unset S1 + +# restore reading/writing tessellated STEP geometry default parameters +param read.step.tessellated On +param write.step.tessellated OnNoBRep diff --git a/tests/gdt/presentation/C2 b/tests/gdt/presentation/C2 new file mode 100644 index 0000000000..8f2c84f6c1 --- /dev/null +++ b/tests/gdt/presentation/C2 @@ -0,0 +1,16 @@ +# !!!! This file is generated automatically, do not edit manually! See end script +puts "TODO CR11111 ALL: Error on writing file" + +set filename bug33484.stp + +set ref_data { +Centre of mass: 9.0027001005108751 9.2917129312715954 -5.5470782136393613 +Mass: 8176.9848537285679 + +} + +set ref_data_write { +Centre of mass: 9.4672345259051625 8.9728431848515342 -5.6865065278091702 +Mass: 8083.3051701204768 + +} diff --git a/tests/gdt/presentation/end b/tests/gdt/presentation/end index 26a1011860..b5d684e8f8 100644 --- a/tests/gdt/presentation/end +++ b/tests/gdt/presentation/end @@ -108,39 +108,61 @@ if { $dump_file == 1 } { puts $fd_stream "set ref_data \{" puts $fd_stream $result puts $fd_stream "\}" + if (![string equal $xst $xst2]) { + puts $fd_stream "" + puts $fd_stream "set ref_data_write \{" + puts $fd_stream $result2 + puts $fd_stream "\}" + } } close $fd_stream } elseif { $mist != 1 } { puts "========================== Comparision with reference data ========" puts "" # Comparision of reference data with obtained result + # Variable ref_data is used to check values on the first read. + # If after writing and reading file again values differ, variable + # ref_data_write should be used for the new reference data. In + # case if it is not set, ref_data will be used to check the result again. set x_Ref 0; set y_Ref 0; set z_Ref 0; + set x_Ref_write 0; set y_Ref_write 0; set z_Ref_write 0; set mass_Ref 0; + set mass_Ref_write 0; regexp {Centre of mass+: +([-0-9.+eE]+) +([-0-9.+eE]+) +([-0-9.+eE]+)} $ref_data full x_Ref y_Ref z_Ref regexp {Mass+: +([-0-9.+eE]+)} $ref_data full mass_Ref - if {[expr abs($x_Ref - $x_First)] > 1e-4 || [expr abs($x_Ref - $x_Second)] > 1e-4} { + if { [info exists ref_data_write] } { + regexp {Centre of mass+: +([-0-9.+eE]+) +([-0-9.+eE]+) +([-0-9.+eE]+)} $ref_data_write full x_Ref_write y_Ref_write z_Ref_write + regexp {Mass+: +([-0-9.+eE]+)} $ref_data_write full mass_Ref_write + } else { + set x_Ref_write $x_Ref; + set y_Ref_write $y_Ref; + set z_Ref_write $z_Ref; + set mass_Ref_write $mass_Ref; + } + + if {[expr abs($x_Ref - $x_First)] > 1e-4 || [expr abs($x_Ref_write - $x_Second)] > 1e-4} { incr ref_Compare - append err_compare_ref " Reference data - $x_Ref\n" + append err_compare_ref " Reference data - $x_Ref_write ($x_Ref)\n" append err_compare_ref " Current data - $x_Second ($x_First)\n" append err_compare_ref "--------------------------------------------------------------------\n" } - if {[expr abs($y_Ref - $y_First)] > 1e-4 || [expr abs($y_Ref - $y_Second)] > 1e-4} { + if {[expr abs($y_Ref - $y_First)] > 1e-4 || [expr abs($y_Ref_write - $y_Second)] > 1e-4} { incr ref_Compare - append err_compare_ref " Reference data - $y_Ref\n" + append err_compare_ref " Reference data - $y_Ref_write ($y_Ref)\n" append err_compare_ref " Current data - $y_Second ($y_First)\n" append err_compare_ref "--------------------------------------------------------------------\n" } - if {[expr abs($z_Ref - $z_First)] > 1e-4 || [expr abs($z_Ref - $z_Second)] > 1e-4} { + if {[expr abs($z_Ref - $z_First)] > 1e-4 || [expr abs($z_Ref_write - $z_Second)] > 1e-4} { incr ref_Compare - append err_compare_ref " Reference data - $z_Ref\n" + append err_compare_ref " Reference data - $z_Ref_write ($z_Ref)\n" append err_compare_ref " Current data - $z_Second ($z_First)\n" append err_compare_ref "--------------------------------------------------------------------\n" } - if {[expr abs($mass_Ref - $mass_First)] > 1e-4 || [expr abs($mass_Ref - $mass_Second)] > 1e-4} { + if {[expr abs($mass_Ref - $mass_First)] > 1e-4 || [expr abs($mass_Ref_write - $mass_Second)] > 1e-4} { incr ref_Compare - append err_compare_ref " Reference data - $mass_Ref\n" + append err_compare_ref " Reference data - $mass_Ref_write ($mass_Ref)\n" append err_compare_ref " Current data - $mass_Second ($mass_First)\n" append err_compare_ref "--------------------------------------------------------------------\n" }