//==================================================================================================
PrimitivesAPI_Cylinder::PrimitivesAPI_Cylinder(const std::shared_ptr<ModelAPI_Feature>& theFeature,
//==================================================================================================
PrimitivesAPI_Cylinder::PrimitivesAPI_Cylinder(const std::shared_ptr<ModelAPI_Feature>& theFeature,
- const ModelHighAPI_Selection& theBasePoint,
- const ModelHighAPI_Selection& theAxis,
- const ModelHighAPI_Double& theRadius,
- const ModelHighAPI_Double& theHeight)
+ const ModelHighAPI_Selection& theBasePoint,
+ const ModelHighAPI_Selection& theAxis,
+ const ModelHighAPI_Double& theRadius,
+ const ModelHighAPI_Double& theHeight)
: ModelHighAPI_Interface(theFeature)
{
if (initialize()) {
fillAttribute(PrimitivesPlugin_Cylinder::CREATION_METHOD_CYLINDER(), creationMethod());
: ModelHighAPI_Interface(theFeature)
{
if (initialize()) {
fillAttribute(PrimitivesPlugin_Cylinder::CREATION_METHOD_CYLINDER(), creationMethod());
- setObjects(theBasePoint, theAxis);
+ fillAttribute(theBasePoint, basePoint());
+ fillAttribute(theAxis, axis());
setSizes(theRadius, theHeight);
}
}
//==================================================================================================
PrimitivesAPI_Cylinder::PrimitivesAPI_Cylinder(const std::shared_ptr<ModelAPI_Feature>& theFeature,
setSizes(theRadius, theHeight);
}
}
//==================================================================================================
PrimitivesAPI_Cylinder::PrimitivesAPI_Cylinder(const std::shared_ptr<ModelAPI_Feature>& theFeature,
- const ModelHighAPI_Selection& theBasePoint,
- const ModelHighAPI_Selection& theAxis,
- const ModelHighAPI_Double& theRadius,
- const ModelHighAPI_Double& theHeight,
- const ModelHighAPI_Double& theAngle)
+ const ModelHighAPI_Selection& theBasePoint,
+ const ModelHighAPI_Selection& theAxis,
+ const ModelHighAPI_Double& theRadius,
+ const ModelHighAPI_Double& theHeight,
+ const ModelHighAPI_Double& theAngle)
: ModelHighAPI_Interface(theFeature)
{
if (initialize()) {
fillAttribute(PrimitivesPlugin_Cylinder::CREATION_METHOD_CYLINDER_PORTION(), creationMethod());
: ModelHighAPI_Interface(theFeature)
{
if (initialize()) {
fillAttribute(PrimitivesPlugin_Cylinder::CREATION_METHOD_CYLINDER_PORTION(), creationMethod());
- setObjects(theBasePoint, theAxis);
+ fillAttribute(theBasePoint, basePoint());
+ fillAttribute(theAxis, axis());
+ fillAttribute(theAngle, angle());
{
fillAttribute(theRadius, radius());
fillAttribute(theHeight, height());
{
fillAttribute(theRadius, radius());
fillAttribute(theHeight, height());
AttributeSelectionPtr anAttrBasePoint =
aBase->selection(PrimitivesPlugin_Cylinder::BASE_POINT_ID());
AttributeSelectionPtr anAttrAxis = aBase->selection(PrimitivesPlugin_Cylinder::AXIS_ID());
AttributeSelectionPtr anAttrBasePoint =
aBase->selection(PrimitivesPlugin_Cylinder::BASE_POINT_ID());
AttributeSelectionPtr anAttrAxis = aBase->selection(PrimitivesPlugin_Cylinder::AXIS_ID());
AttributeDoublePtr anAttrRadius = aBase->real(PrimitivesPlugin_Cylinder::RADIUS_ID());
AttributeDoublePtr anAttrHeight = aBase->real(PrimitivesPlugin_Cylinder::HEIGHT_ID());
AttributeDoublePtr anAttrRadius = aBase->real(PrimitivesPlugin_Cylinder::RADIUS_ID());
AttributeDoublePtr anAttrHeight = aBase->real(PrimitivesPlugin_Cylinder::HEIGHT_ID());
if (aCreationMethod == PrimitivesPlugin_Cylinder::CREATION_METHOD_CYLINDER_PORTION()) {
AttributeDoublePtr anAttrAngle = aBase->real(PrimitivesPlugin_Cylinder::ANGLE_ID());
theDumper << ", " << anAttrAngle;
if (aCreationMethod == PrimitivesPlugin_Cylinder::CREATION_METHOD_CYLINDER_PORTION()) {
AttributeDoublePtr anAttrAngle = aBase->real(PrimitivesPlugin_Cylinder::ANGLE_ID());
theDumper << ", " << anAttrAngle;
const ModelHighAPI_Selection& theBasePoint,
const ModelHighAPI_Selection& theAxis,
const ModelHighAPI_Double& theRadius,
const ModelHighAPI_Selection& theBasePoint,
const ModelHighAPI_Selection& theAxis,
const ModelHighAPI_Double& theRadius,
{
std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(PrimitivesAPI_Cylinder::ID());
return CylinderPtr(new PrimitivesAPI_Cylinder(aFeature, theBasePoint, theAxis,
{
std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(PrimitivesAPI_Cylinder::ID());
return CylinderPtr(new PrimitivesAPI_Cylinder(aFeature, theBasePoint, theAxis,
const ModelHighAPI_Selection& theBasePoint,
const ModelHighAPI_Selection& theAxis,
const ModelHighAPI_Double& theRadius,
const ModelHighAPI_Selection& theBasePoint,
const ModelHighAPI_Selection& theAxis,
const ModelHighAPI_Double& theRadius,
{
std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(PrimitivesAPI_Cylinder::ID());
return CylinderPtr(new PrimitivesAPI_Cylinder(aFeature, theBasePoint, theAxis,
{
std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(PrimitivesAPI_Cylinder::ID());
return CylinderPtr(new PrimitivesAPI_Cylinder(aFeature, theBasePoint, theAxis,
}
//==================================================================================================
CylinderPtr addCylinder(const std::shared_ptr<ModelAPI_Document>& thePart,
const ModelHighAPI_Double& theRadius,
}
//==================================================================================================
CylinderPtr addCylinder(const std::shared_ptr<ModelAPI_Document>& thePart,
const ModelHighAPI_Double& theRadius,
ModelHighAPI_Selection aBasePoint("VERT", "Origin");
ModelHighAPI_Selection anAxis("EDGE", "OZ");
ModelHighAPI_Selection aBasePoint("VERT", "Origin");
ModelHighAPI_Selection anAxis("EDGE", "OZ");
return CylinderPtr(new PrimitivesAPI_Cylinder(aFeature, aBasePoint, anAxis,
return CylinderPtr(new PrimitivesAPI_Cylinder(aFeature, aBasePoint, anAxis,
}
//==================================================================================================
CylinderPtr addCylinder(const std::shared_ptr<ModelAPI_Document>& thePart,
const ModelHighAPI_Double& theRadius,
}
//==================================================================================================
CylinderPtr addCylinder(const std::shared_ptr<ModelAPI_Document>& thePart,
const ModelHighAPI_Double& theRadius,
ModelHighAPI_Selection aBasePoint("VERT", "Origin");
ModelHighAPI_Selection anAxis("EDGE", "OZ");
ModelHighAPI_Selection aBasePoint("VERT", "Origin");
ModelHighAPI_Selection anAxis("EDGE", "OZ");
return CylinderPtr(new PrimitivesAPI_Cylinder(aFeature, aBasePoint, anAxis,
theRadius, theHeight));
}
\ No newline at end of file
return CylinderPtr(new PrimitivesAPI_Cylinder(aFeature, aBasePoint, anAxis,
theRadius, theHeight));
}
\ No newline at end of file