Пример #1
0
TechDrawGeometry::GeometryObject* DrawProjectSplit::buildGeometryObject(TopoDS_Shape shape,
                                                                        const gp_Ax2& viewAxis)
{
    TechDrawGeometry::GeometryObject* geometryObject = new TechDrawGeometry::GeometryObject("DrawProjectSplit",nullptr);

    geometryObject->projectShape(shape,
                                 viewAxis);
    geometryObject->extractGeometry(TechDrawGeometry::ecHARD,                   //always show the hard&outline visible lines
                                    true);
    geometryObject->extractGeometry(TechDrawGeometry::ecOUTLINE,
                                    true);
    return geometryObject;
}
Пример #2
0
TechDrawGeometry::GeometryObject* DrawProjectSplit::buildGeometryObject(
                                           TopoDS_Shape shape, 
                                           gp_Pnt& inputCenter, 
                                           Base::Vector3d direction)
{
    TechDrawGeometry::GeometryObject* geometryObject = new TechDrawGeometry::GeometryObject("DrawProjectSplit");

    geometryObject->projectShape(shape,
                            inputCenter,
                            direction);
    geometryObject->extractGeometry(TechDrawGeometry::ecHARD,                   //always show the hard&outline visible lines
                                    true);
    geometryObject->extractGeometry(TechDrawGeometry::ecOUTLINE,
                                    true);
    return geometryObject;
}
Пример #3
0
//note: slightly different than routine with same name in DrawProjectSplit
TechDrawGeometry::GeometryObject* DrawViewPart::buildGeometryObject(TopoDS_Shape shape, gp_Pnt& inputCenter)
{
    TechDrawGeometry::GeometryObject* go = new TechDrawGeometry::GeometryObject(getNameInDocument());
    go->setIsoCount(IsoCount.getValue());

    Base::Vector3d baseProjDir = Direction.getValue();
    saveParamSpace(baseProjDir);

    go->projectShape(shape,
                     inputCenter,
                     Direction.getValue());
    go->extractGeometry(TechDrawGeometry::ecHARD,                   //always show the hard&outline visible lines
                        true);
    go->extractGeometry(TechDrawGeometry::ecOUTLINE,
                        true);
    if (SmoothVisible.getValue()) {
        go->extractGeometry(TechDrawGeometry::ecSMOOTH,
                            true);
    }
    if (SeamVisible.getValue()) {
        go->extractGeometry(TechDrawGeometry::ecSEAM,
                            true);
    }
    if ((IsoVisible.getValue()) && (IsoCount.getValue() > 0)) {
        go->extractGeometry(TechDrawGeometry::ecUVISO,
                            true);
    }
    if (HardHidden.getValue()) {
        go->extractGeometry(TechDrawGeometry::ecHARD,
                            false);
        go->extractGeometry(TechDrawGeometry::ecOUTLINE,
                            false);
    }
    if (SmoothHidden.getValue()) {
        go->extractGeometry(TechDrawGeometry::ecSMOOTH,
                            false);
    }
    if (SeamHidden.getValue()) {
        go->extractGeometry(TechDrawGeometry::ecSEAM,
                            false);
    }
    if (IsoHidden.getValue() && (IsoCount.getValue() > 0)) {
        go->extractGeometry(TechDrawGeometry::ecUVISO,
                            false);
    }
    bbox = go->calcBoundingBox();
    return go;
}