Fix building of Axis2Placement3d.
return aName;
}
-//=======================================================================
-//function : GetAxis2Placement3D
-//purpose :
-//=======================================================================
-Handle(StepGeom_Axis2Placement3d) STEPCAFControl_GDTProperty::GetAxis2Placement3D(const gp_Ax2& theAxis)
-{
- Handle(StepGeom_Axis2Placement3d) anA2P3D = new StepGeom_Axis2Placement3d();
- Handle(StepGeom_CartesianPoint) aPoint = new StepGeom_CartesianPoint();
- Handle(TColStd_HArray1OfReal) aCoords = new TColStd_HArray1OfReal(1, 3);
- for (Standard_Integer i = 1; i <= 3; i++)
- aCoords->SetValue(i, theAxis.Location().Coord(i));
- aPoint->Init(new TCollection_HAsciiString(), aCoords);
- Handle(StepGeom_Direction) anAxis, aRefDirection;
- Handle(TColStd_HArray1OfReal) anAxisCoords = new TColStd_HArray1OfReal(1, 3);
- for (Standard_Integer i = 1; i <= 3; i++)
- anAxisCoords->SetValue(i, theAxis.XDirection().Coord(i));
- anAxis = new StepGeom_Direction();
- anAxis->Init(new TCollection_HAsciiString(), anAxisCoords);
- Handle(TColStd_HArray1OfReal) aDirCoords = new TColStd_HArray1OfReal(1, 3);
- for (Standard_Integer i = 1; i <= 3; i++)
- aDirCoords->SetValue(i, theAxis.YDirection().Coord(i));
- aRefDirection = new StepGeom_Direction();
- aRefDirection->Init(new TCollection_HAsciiString(), aDirCoords);
- anA2P3D->Init(new TCollection_HAsciiString(), aPoint, Standard_True, anAxis, Standard_True, aRefDirection);
- return anA2P3D;
-}
-
//=======================================================================
//function : IsDimensionalSize
//purpose :
Standard_EXPORT static Handle(TCollection_HAsciiString) GetDatumTargetName(const XCAFDimTolObjects_DatumTargetType theDatumType);
- Standard_EXPORT static Handle(StepGeom_Axis2Placement3d) GetAxis2Placement3D(const gp_Ax2& theAxis);
-
Standard_EXPORT static Standard_Boolean IsDimensionalLocation(const XCAFDimTolObjects_DimensionType theType);
Standard_EXPORT static Standard_Boolean IsDimensionalSize(const XCAFDimTolObjects_DimensionType theType);
// Names and validation props are supported for top-level shapes only
#include <BRep_Builder.hxx>
+#include <GeomToStep_MakeAxis2Placement3d.hxx>
#include <GeomToStep_MakeCartesianPoint.hxx>
#include <HeaderSection_FileSchema.hxx>
#include <Interface_EntityIterator.hxx>
aPrsStyles->SetValue(1, aPrsStyle);
// Plane
Handle(StepGeom_Plane) aPlane = new StepGeom_Plane();
- Handle(StepGeom_Axis2Placement3d) anAxis = STEPCAFControl_GDTProperty::GetAxis2Placement3D(theAnnotationPlane);
+ GeomToStep_MakeAxis2Placement3d anAxisMaker(theAnnotationPlane);
+ Handle(StepGeom_Axis2Placement3d) anAxis = anAxisMaker.Value();
// Set text position to plane origin
Handle(StepGeom_CartesianPoint) aTextPos = new StepGeom_CartesianPoint();
Handle(TColStd_HArray1OfReal) aCoords = new TColStd_HArray1OfReal(1, 3);
// Common for all datum targets
StepBasic_Unit aUnit = GetUnit(aRC);
gp_Ax2 aDTAxis = anObject->GetDatumTargetAxis();
- Handle(StepGeom_Axis2Placement3d) anA2P3D =
- STEPCAFControl_GDTProperty::GetAxis2Placement3D(aDTAxis);
+ GeomToStep_MakeAxis2Placement3d anAxisMaker(aDTAxis);
+ Handle(StepGeom_Axis2Placement3d) anA2P3D = anAxisMaker.Value();
anA2P3D->SetName(new TCollection_HAsciiString("orientation"));
Handle(StepRepr_HArray1OfRepresentationItem) anItems;
// Process each datum target type
// Axis
if (anObject->HasAxis()) {
- Handle(StepGeom_Axis2Placement3d) anAxis =
- STEPCAFControl_GDTProperty::GetAxis2Placement3D(anObject->GetAxis());
+ GeomToStep_MakeAxis2Placement3d anAxisMaker(anObject->GetAxis());
+ Handle(StepGeom_Axis2Placement3d) anAxis = anAxisMaker.Value();
anAxis->SetName(new TCollection_HAsciiString("orientation"));
Handle(StepAP242_GeometricItemSpecificUsage) aGISU = new StepAP242_GeometricItemSpecificUsage();
StepAP242_ItemIdentifiedRepresentationUsageDefinition aDefinition;
set c_value "10"
set c_type "Size_CurveLength"
set c_pos {position: -5 0 7
-normal: 0 1 0
-x_direction: 0 0 -1
+normal: -1 0 0
+x_direction: 0 1 0
}
}