STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC)
SET(${PROJECT_NAME_UC}_MAJOR_VERSION 8)
-SET(${PROJECT_NAME_UC}_MINOR_VERSION 4)
+SET(${PROJECT_NAME_UC}_MINOR_VERSION 5)
SET(${PROJECT_NAME_UC}_PATCH_VERSION 0)
SET(${PROJECT_NAME_UC}_VERSION
${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION})
## GEOM specifics
##
-FIND_PACKAGE(SalomeCAS REQUIRED)
+FIND_PACKAGE(SalomeOpenCASCADE REQUIRED)
IF(SALOME_GEOM_USE_VTK)
FIND_PACKAGE(SalomeVTK REQUIRED)
# Ensure the variables are always defined for the configure:
SET(KERNEL_ROOT_DIR "${KERNEL_ROOT_DIR}")
SET(GUI_ROOT_DIR "${GUI_ROOT_DIR}")
-SET(CAS_ROOT_DIR "${CAS_ROOT_DIR}")
+SET(OPENCASCADE_ROOT_DIR "${OPENCASCADE_ROOT_DIR}")
SET(VTK_ROOT_DIR "${VTK_ROOT_DIR}")
SET(OPENCV_ROOT_DIR "${OPENCV_ROOT_DIR}")
SET(CONF_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/include" "${PROJECT_BINARY_DIR}/include")
# Build variables that will be expanded when configuring Salome<MODULE>Config.cmake:
-SALOME_CONFIGURE_PREPARE(OpenCV CAS VTK)
+SALOME_CONFIGURE_PREPARE(OpenCV OpenCASCADE VTK)
CONFIGURE_PACKAGE_CONFIG_FILE(${PROJECT_NAME}Config.cmake.in
${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake
INSTALL_DESTINATION "${SALOME_INSTALL_CMAKE_LOCAL}"
PATH_VARS CONF_INCLUDE_DIRS SALOME_INSTALL_CMAKE_LOCAL CMAKE_INSTALL_PREFIX
- KERNEL_ROOT_DIR GUI_ROOT_DIR CAS_ROOT_DIR VTK_ROOT_DIR OPENCV_ROOT_DIR)
+ KERNEL_ROOT_DIR GUI_ROOT_DIR OPENCASCADE_ROOT_DIR VTK_ROOT_DIR OPENCV_ROOT_DIR)
# - in the install tree (VSR 16/08/2013: TEMPORARILY COMMENT THIS - TO REMOVE?):
# Get the relative path of the include directory so
# ${PROJECT_BINARY_DIR}/to_install/${PROJECT_NAME}Config.cmake
# INSTALL_DESTINATION "${SALOME_INSTALL_CMAKE}"
# PATH_VARS CONF_INCLUDE_DIRS SALOME_INSTALL_CMAKE CMAKE_INSTALL_PREFIX
-# KERNEL_ROOT_DIR GUI_ROOT_DIR CAS_ROOT_DIR VTK_ROOT_DIR OPENCV_ROOT_DIR)
+# KERNEL_ROOT_DIR GUI_ROOT_DIR OPENCASCADE_ROOT_DIR VTK_ROOT_DIR OPENCV_ROOT_DIR)
WRITE_BASIC_PACKAGE_VERSION_FILE(${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake
VERSION ${${PROJECT_NAME_UC}_VERSION}
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-SET(SALOME_TEST_DRIVER "$ENV{ABSOLUTE_APPLI_PATH}/bin/salome/appliskel/salome_test_driver.py")
+SET(SALOME_TEST_DRIVER "$ENV{KERNEL_ROOT_DIR}/bin/salome/appliskel/salome_test_driver.py")
SET(COMPONENT_NAME GEOM)
SET(TIMEOUT 300)
# Level 1 prerequisites:
SET_AND_CHECK(KERNEL_ROOT_DIR_EXP "@PACKAGE_KERNEL_ROOT_DIR@")
-SET_AND_CHECK(CAS_ROOT_DIR_EXP "@PACKAGE_CAS_ROOT_DIR@")
+SET_AND_CHECK(OPENCASCADE_ROOT_DIR_EXP "@PACKAGE_OPENCASCADE_ROOT_DIR@")
# Optional level 1 prerequisites:
IF(SALOME_GEOM_BUILD_GUI)
\n <b>TUI command:</b> <em>geompy.MakeMarker(OX, OY, OZ, XDX, XDY, XDZ,
YDX, YDY, YDZ)</em>, where OX, OY, OZ are coordinates of the origin of
LCS, XDX, XDY, XDZ is a vector of OX direction of the LCS and YDX,
-YDY, YDZ is a a vector of OY direction of the LCS.
+YDY, YDZ is a vector of OY direction of the LCS.
\n <b>Arguments:</b> Name + Coordinates of origin, X axis direction, Y axis direction.
\image html neo-localcs1.png
* \param theShape Shape to find sub-shapes of.
* \param theShapeType Type of sub-shapes to be retrieved.
* \param theTopLeftPoint Top left quadrangle corner
- * \param theTopRigthPoint Top right quadrangle corner
+ * \param theTopRightPoint Top right quadrangle corner
* \param theBottomLeftPoint Bottom left quadrangle corner
- * \param theBottomRigthPoint Bottom right quadrangle corner
+ * \param theBottomRightPoint Bottom right quadrangle corner
* \param theState The state of the sub-shapes to find.
* \return List of all found sub-shapes.
*/
ListOfGO GetShapesOnQuadrangle (in GEOM_Object theShape,
in long theShapeType,
in GEOM_Object theTopLeftPoint,
- in GEOM_Object theTopRigthPoint,
+ in GEOM_Object theTopRightPoint,
in GEOM_Object theBottomLeftPoint,
- in GEOM_Object theBottomRigthPoint,
+ in GEOM_Object theBottomRightPoint,
in shape_state theState);
/*!
* \param theShape Shape to find sub-shapes of.
* \param theShapeType Type of sub-shapes to be retrieved.
* \param theTopLeftPoint Top left quadrangle corner
- * \param theTopRigthPoint Top right quadrangle corner
+ * \param theTopRightPoint Top right quadrangle corner
* \param theBottomLeftPoint Bottom left quadrangle corner
- * \param theBottomRigthPoint Bottom right quadrangle corner
+ * \param theBottomRightPoint Bottom right quadrangle corner
* \param theState The state of the sub-shapes to find.
* \return List of IDs of all found sub-shapes.
*/
ListOfLong GetShapesOnQuadrangleIDs (in GEOM_Object theShape,
in long theShapeType,
in GEOM_Object theTopLeftPoint,
- in GEOM_Object theTopRigthPoint,
+ in GEOM_Object theTopRightPoint,
in GEOM_Object theBottomLeftPoint,
- in GEOM_Object theBottomRigthPoint,
+ in GEOM_Object theBottomRightPoint,
in shape_state theState);
/*!
<parameter name="version" value="@SALOMEGEOM_VERSION@"/>
</section>
<section name="geom_help" >
- <parameter name="sub_menu" value="%1 module"/>
- <parameter name="User's Guide" value="%GEOM_ROOT_DIR%/share/doc/salome/gui/GEOM/index.html"/>
- <parameter name="Developer's Guide" value="%GEOM_ROOT_DIR%/share/doc/salome/tui/GEOM/index.html"/>
+ <parameter name="User's Guide/Geometry module/User's Guide" value="%GEOM_ROOT_DIR%/share/doc/salome/gui/GEOM/index.html"/>
+ <parameter name="Developer's Guide/Geometry module/Developer's Guide" value="%GEOM_ROOT_DIR%/share/doc/salome/tui/GEOM/index.html"/>
</section>
<section name="resources">
<!-- Module resources -->
<parameter name="geom_preview" value="true" />
<parameter name="hide_input_object" value="true" />
<parameter name="material" value="[ Default ]" />
- <parameter name="predef_materials" value="true" />
+ <parameter name="predef_materials" value="false" />
<parameter name="edge_width" value="1" />
<parameter name="isolines_width" value="1" />
<parameter name="preview_edge_width" value="1" />
# additional include directories
INCLUDE_DIRECTORIES(
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${PTHREAD_INCLUDE_DIR}
)
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
)
# libraries to link to
-SET(_link_LIBRARIES
- ${CAS_KERNEL} ${CAS_MODELER} ${CAS_TKMesh}
+SET(_link_LIBRARIES
+ ${OpenCASCADE_FoundationClasses_LIBRARIES}
+ ${OpenCASCADE_ModelingAlgorithms_LIBRARIES}
${KERNEL_SALOMELocalTrace}
)
INCLUDE_DIRECTORIES(
${OMNIORB_INCLUDE_DIR}
${PTHREAD_INCLUDE_DIR}
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${PROJECT_SOURCE_DIR}/src/GEOMImpl
${PROJECT_SOURCE_DIR}/src/GEOM
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
)
${PTHREAD_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${GUI_INCLUDE_DIRS}
${PROJECT_BINARY_DIR}/idl
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
${QT_DEFINITIONS}
)
# additional include directories
INCLUDE_DIRECTORIES(
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${PROJECT_BINARY_DIR}/idl
${PROJECT_SOURCE_DIR}/src/GEOMAlgo
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
)
# libraries to link to
SET(_link_engine_LIBRARIES
- ${CAS_TKBREP}
+ ${OpenCASCADE_ModelingData_LIBRARIES}
${KERNEL_SALOMELocalTrace}
${KERNEL_OpUtil}
SalomeIDLGEOM
${PTHREAD_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${GUI_INCLUDE_DIRS}
${PROJECT_BINARY_DIR}/idl
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
${QT_DEFINITIONS}
)
Handle(Geom_Curve) C3d = BRep_Tool::Curve ( E, LC, f, l );
Handle(Geom_Surface) S = BRep_Tool::Surface(F, LS);
- //taking into accound the orientation of the seam
+ //taking into account the orientation of the seam
C = BRep_Tool::CurveOnSurface(E,F,f,l);
Tol = BRep_Tool::Tolerance(E);
Handle(Geom_Curve) C3d = BRep_Tool::Curve ( E, LC, f, l );
Handle(Geom_Surface) S = BRep_Tool::Surface(F, LS);
- //taking into accound the orientation of the seam
+ //taking into account the orientation of the seam
C = BRep_Tool::CurveOnSurface(E,F,f,l);
Tol = BRep_Tool::Tolerance(E);
TopoDS_Wire aWireFixed = sfw->Wire();
aContext->Replace(aWire,aWireFixed);
// add resulting wire
- if(isEdge3d) {
+ if (isEdge3d) {
B.Add(aResult,aWireFixed);
}
else {
ShapeAnalysis_WireOrder sawo(Standard_False, 0);
ShapeAnalysis_Edge sae;
Standard_Integer aLastEdge = nbEdges;
- for(Standard_Integer j = 1; j <= nbEdges; j++) {
+ for (Standard_Integer j = 1; j <= nbEdges; j++) {
Standard_Real f,l;
//smh protection on NULL pcurve
Handle(Geom2d_Curve) c2d;
- if(!sae.PCurve(sbwd->Edge(j),aResult,c2d,f,l)) {
+ if (!sae.PCurve(sbwd->Edge(j),aResult,c2d,f,l)) {
aLastEdge--;
continue;
}
sawo.Add(c2d->Value(f).XY(),c2d->Value(l).XY());
}
- sawo.Perform();
-
- // constructind one degenerative edge
- gp_XY aStart, anEnd, tmp;
- Standard_Integer nbFirst = sawo.Ordered(1);
- TopoDS_Edge anOrigE = TopoDS::Edge(sbwd->Edge(nbFirst).Oriented(TopAbs_FORWARD));
- ShapeBuild_Edge sbe;
- TopoDS_Vertex aDummyV;
- TopoDS_Edge E = sbe.CopyReplaceVertices(anOrigE,aDummyV,aDummyV);
- sawo.XY(nbFirst,aStart,tmp);
- sawo.XY(sawo.Ordered(aLastEdge),tmp,anEnd);
-
- gp_XY aVec = anEnd-aStart;
- Handle(Geom2d_Line) aLine = new Geom2d_Line(aStart,gp_Dir2d(anEnd-aStart));
-
- B.UpdateEdge(E,aLine,aResult,0.);
- B.Range(E,aResult,0.,aVec.Modulus());
- Handle(Geom_Curve) C3d;
- B.UpdateEdge(E,C3d,0.);
- B.Degenerated(E,Standard_True);
- TopoDS_Wire aW;
- B.MakeWire(aW);
- B.Add(aW,E);
- B.Add(aResult,aW);
+ if (aLastEdge > 0) {
+ sawo.Perform();
+
+ // constructing one degenerative edge
+ gp_XY aStart, anEnd, tmp;
+ Standard_Integer nbFirst = sawo.Ordered(1);
+ TopoDS_Edge anOrigE = TopoDS::Edge(sbwd->Edge(nbFirst).Oriented(TopAbs_FORWARD));
+ ShapeBuild_Edge sbe;
+ TopoDS_Vertex aDummyV;
+ TopoDS_Edge E = sbe.CopyReplaceVertices(anOrigE,aDummyV,aDummyV);
+ sawo.XY(nbFirst,aStart,tmp);
+ sawo.XY(sawo.Ordered(aLastEdge),tmp,anEnd);
+
+ gp_XY aVec = anEnd-aStart;
+ Handle(Geom2d_Line) aLine = new Geom2d_Line(aStart,gp_Dir2d(anEnd-aStart));
+
+ B.UpdateEdge(E,aLine,aResult,0.);
+ B.Range(E,aResult,0.,aVec.Modulus());
+ Handle(Geom_Curve) C3d;
+ B.UpdateEdge(E,C3d,0.);
+ B.Degenerated(E,Standard_True);
+ TopoDS_Wire aW;
+ B.MakeWire(aW);
+ B.Add(aW,E);
+ B.Add(aResult,aW);
+ }
}
}
# additional include directories
INCLUDE_DIRECTORIES(
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${PTHREAD_INCLUDE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
)
# libraries to link to
SET(_link_LIBRARIES
- ${CAS_KERNEL}
- ${CAS_TKOffset} ${CAS_TKBool} ${CAS_TKBO}
- ${CAS_TKShHealing}
+ ${OpenCASCADE_FoundationClasses_LIBRARIES}
+ ${OpenCASCADE_ModelingAlgorithms_LIBRARIES}
${KERNEL_SALOMELocalTrace}
)
${PTHREAD_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${GUI_INCLUDE_DIRS}
${PROJECT_BINARY_DIR}/idl
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
${QT_DEFINITIONS}
)
${PTHREAD_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${GUI_INCLUDE_DIRS}
${PROJECT_BINARY_DIR}/idl
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
${QT_DEFINITIONS}
)
${PTHREAD_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${GUI_INCLUDE_DIRS}
${PROJECT_BINARY_DIR}/idl
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
${QT_DEFINITIONS}
)
# additional include directories
INCLUDE_DIRECTORIES(
${PTHREAD_INCLUDE_DIR}
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${GUI_INCLUDE_DIRS}
${PROJECT_SOURCE_DIR}/src/GEOMUtils
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${QT_DEFINITIONS}
)
myNbRedos (0),
myUndoDepth (-1),
myOpLevel(0),
- mySkipSorting(false)
+ mySkipSorting(false),
+ myPointAspectColor (Quantity_NOC_ROYALBLUE4),
+ myCurveColor (Quantity_NOC_RED),
+ myEraseAll(true),
+ myLineWidth(1)
{
}
}
}
-void CurveCreator_Curve::redisplayCurve()
+void CurveCreator_Curve::redisplayCurve(bool preEraseAllObjects)
{
//DEBTRACE("redisplayCurve");
- if( myDisplayer ) {
- myDisplayer->eraseAll( false );
+ if( myDisplayer )
+ {
+ if (preEraseAllObjects)
+ myDisplayer->eraseAll( false );
+ else
+ myDisplayer->erase( myAISShape, false);
myAISShape = NULL;
-
myDisplayer->display( getAISObject( true ), true );
}
}
bool CurveCreator_Curve::clearInternal()
{
// erase curve from the viewer
- if( myDisplayer ) {
- myDisplayer->eraseAll( true );
+ if( myDisplayer )
+ {
+ if (myEraseAll)
+ myDisplayer->eraseAll( true );
+ else
+ myDisplayer->erase(myAISShape, false);
myAISShape = NULL;
}
// Delete all allocated data.
return res;
}
+//=======================================================================
+// function: clear
+// purpose:
+//=======================================================================
+void CurveCreator_Curve::SetEraseAllState(bool toEraseAll)
+{
+ myEraseAll = toEraseAll;
+}
+//=======================================================================
+// function: clear
+// purpose:
+//=======================================================================
+bool CurveCreator_Curve::GetEraseAllState() const
+{
+ return myEraseAll;
+}
+
//! For internal use only! Undo/Redo are not used here.
bool CurveCreator_Curve::joinInternal( const std::list<int>& theSections )
{
break;
}
- redisplayCurve();
+ redisplayCurve(false);
return res;
}
aSection->myIsClosed = theIsClosed;
aSection->myPoints = thePoints;
mySections.push_back(aSection);
- redisplayCurve();
+ redisplayCurve(false);
return mySections.size()-1;
}
delete *anIterRm;
mySections.erase(anIterRm);
}
- redisplayCurve();
+ redisplayCurve(false);
return true;
}
aSection = (CurveCreator_Section*)getSection( i );
if( aSection ) {
aSection->myIsClosed = theIsClosed;
- redisplayCurve();
+ redisplayCurve(false);
}
}
} else {
aSection = (CurveCreator_Section*)getSection( theISection );
if ( aSection ) {
aSection->myIsClosed = theIsClosed;
- redisplayCurve();
+ redisplayCurve(false);
}
}
return true;
if ( aSection )
aSection->myType = theType;
}
- redisplayCurve();
+ redisplayCurve(false);
} else {
aSection = (CurveCreator_Section*)getSection( theISection );
if ( aSection && aSection->myType != theType ){
aSection->myType = theType;
- redisplayCurve();
+ redisplayCurve(false);
}
}
return true;
}
}
if(res)
- redisplayCurve();
+ redisplayCurve(false);
return res;
}
}
}
if(res)
- redisplayCurve();
+ redisplayCurve(false);
return res;
}
aRes = removeSectionPoints(aSectionId, anIt->second);
}
if( aRes)
- redisplayCurve();
+ redisplayCurve(false);
return aRes;
}
// function: getPoints
// purpose:
//=======================================================================
-CurveCreator::Coordinates CurveCreator_Curve::getPoints( const int theISection ) const
+CurveCreator::Coordinates CurveCreator_Curve::getCoords( int theISection ) const
{
- //DEBTRACE("getPoints");
CurveCreator_Section* aSection = (CurveCreator_Section*)getSection( theISection );
return aSection ? aSection->myPoints : CurveCreator::Coordinates();
}
+Handle(TColgp_HArray1OfPnt) CurveCreator_Curve::GetDifferentPoints( int theISection ) const
+{
+ //DEBTRACE("getPoints");
+ CurveCreator_Section* aSection = (CurveCreator_Section*)getSection( theISection );
+ return aSection ? aSection->GetDifferentPoints( (int)myDimension ) : Handle(TColgp_HArray1OfPnt)();
+}
+
void CurveCreator_Curve::constructAISObject()
{
//DEBTRACE("constructAISObject");
TopoDS_Shape aShape;
CurveCreator_Utils::constructShape( this, aShape );
-
- myAISShape = new AIS_Shape( aShape );
+ myAISShape = new AIS_Shape( aShape );
+ myAISShape->SetColor( myCurveColor );
+ myAISShape->SetWidth( myLineWidth );
Handle(Prs3d_PointAspect) anAspect = myAISShape->Attributes()->PointAspect();
anAspect->SetScale( 3.0 );
anAspect->SetTypeOfMarker(Aspect_TOM_O_POINT);
- anAspect->SetColor(Quantity_NOC_ROYALBLUE4);
+ anAspect->SetColor(myPointAspectColor);
myAISShape->Attributes()->SetPointAspect( anAspect );
-
}
Handle(AIS_InteractiveObject) CurveCreator_Curve::getAISObject( const bool theNeedToBuild ) const
{
//DEBTRACE("getAISObject");
- if ( !myAISShape && theNeedToBuild ) {
+ if ( !myAISShape && theNeedToBuild )
+ {
CurveCreator_Curve* aCurve = (CurveCreator_Curve*)this;
aCurve->constructAISObject();
}
class CurveCreator_Displayer;
class AIS_Shape;
class AIS_InteractiveObject;
+class Quantity_Color;
/**
* The CurveCreator_Curve object is represented as one or more sets of
public: // TODO: remove public
void getCoordinates( int theISection, int theIPoint, double& theX, double& theY, double& theZ ) const;
protected: // TODO: remove public
- void redisplayCurve();
+ void redisplayCurve(bool preEraseAllObjects = true);
public:
/************ Implementation of INTERFACE methods ************/
//! Clear the polyline (remove all sections)
virtual bool clear();
+ //! set erase-all state
+ //! if true => erase all objects from viever, else remove only the current curve
+ void SetEraseAllState(bool toEraseAll);
+
+ //! get erase-all state
+ //! if true => erase all objects from viever, else remove only the current curve
+ bool GetEraseAllState() const;
+
//! For internal use only! Undo/Redo are not used here.
virtual bool joinInternal( const std::list<int>& theSections );
/**
* Get points of a section (the total points in Curve if theISection is equal to -1)..
*/
- virtual CurveCreator::Coordinates getPoints( const int theISection = -1 ) const;
+ virtual Handle(TColgp_HArray1OfPnt) GetDifferentPoints( int theISection = -1 ) const;
+
+ CurveCreator::Coordinates getCoords( int theISection = -1 ) const;
/**
/**
* Get the curve AIS object
*/
- virtual Handle(AIS_InteractiveObject) getAISObject( const bool theNeedToBuild = false ) const;
+ virtual Handle(AIS_InteractiveObject) getAISObject( const bool theNeedToBuild = false) const;
protected:
/**
CurveCreator::Sections mySections; //!< curve data
CurveCreator::Dimension myDimension; //!< curve dimension
CurveCreator_Displayer* myDisplayer; //!< curve displayer
+ Quantity_Color myPointAspectColor;
+ Quantity_Color myCurveColor;
+ double myLineWidth;
private:
int myUndoDepth;
int myOpLevel;
AIS_Shape* myAISShape; //!< AIS shape
+ bool myEraseAll;
};
#endif
aSectionId = anIt->first;
aPointId = anIt->second;
const CurveCreator::Coordinates &aPoints =
- theCurve->getPoints(aSectionId);
+ theCurve->getCoords(aSectionId);
CurveCreator::Coordinates::const_iterator anIterBegin =
aPoints.begin() + (aDim*aPointId);
CurveCreator::Coordinates::const_iterator anIterEnd =
CurveCreator_Operation &theOperation) const
{
const std::string aName = theCurve->getSectionName(theIndex);
- const CurveCreator::Coordinates &aPnts = theCurve->getPoints(theIndex);
+ const CurveCreator::Coordinates &aPnts = theCurve->getCoords(theIndex);
const CurveCreator::SectionType aType = theCurve->getSectionType(theIndex);
const bool isClosed = theCurve->isClosed(theIndex);
{
if(myObjects.empty())
return;
- for( int i = 0 ; i < myObjects.size() ; i++ ){
+ for( int i = 0 ; i < myObjects.size() ; i++ )
myContext->Erase(myObjects[i], Standard_False);
- }
myObjects.clear();
if( isUpdate )
myContext->UpdateCurrentViewer();
}
+void CurveCreator_Displayer::erase( const Handle(AIS_InteractiveObject)& theObject, bool isUpdate )
+{
+ if(theObject.IsNull())
+ return;
+ myContext->Erase(theObject, Standard_False);
+ if( isUpdate )
+ myContext->UpdateCurrentViewer();
+}
+
Quantity_Color CurveCreator_Displayer::getActiveColor( bool isHL )
{
if( isHL ){
return Quantity_Color( 0., 1., 0., Quantity_TOC_RGB );
}
+void CurveCreator_Displayer::Update()
+{
+ for( int i = 0 ; i < myObjects.size() ; i++ )
+ myContext->Update(myObjects[i], Standard_True);
+ myContext->UpdateCurrentViewer();
+}
+
/*void CurveCreator_Displayer::highlight( const AISObjectsList& theObjects, bool isHL )
{
return;
void display( const Handle(AIS_InteractiveObject)& theObject, bool isUpdate );
void eraseAll( bool isUpdate );
+ void erase( const Handle(AIS_InteractiveObject)& theObject, bool isUpdate );
+ void Update();
//void highlight( const AISObjectsList& theObjects, bool isHL );
protected:
virtual ~CurveCreator_ISection() {}
//! Calculates the different points of the section.
- virtual void GetDifferentPoints(
- const int theDimension, Handle(TColgp_HArray1OfPnt)& thePoints) const = 0;
+ virtual Handle(TColgp_HArray1OfPnt) GetDifferentPoints( int theDimension ) const = 0;
};
/**
/**
* Get points of a section (the total points in Curve if theISection is equal to -1)..
*/
- virtual CurveCreator::Coordinates getPoints( const int theISection = -1 ) const = 0;
+ virtual Handle(TColgp_HArray1OfPnt) GetDifferentPoints( int theISection = -1 ) const = 0;
/**
* Get number of points in specified section or (the total number of points
// function: GetDifferentPoints
// purpose:
//=======================================================================
-void CurveCreator_Section::GetDifferentPoints(
- const int theDimension, Handle(TColgp_HArray1OfPnt)& thePoints) const
+Handle(TColgp_HArray1OfPnt) CurveCreator_Section::GetDifferentPoints( int theDimension ) const
{
+ Handle(TColgp_HArray1OfPnt) points;
+
std::vector<gp_Pnt> aTmpPoints;
+
CurveCreator::Coordinates::const_iterator aPIt = myPoints.begin();
CurveCreator::Coordinates::const_iterator aPItLast = myPoints.end();
- const gp_Pnt aFirstPoint(
- *aPIt, *(aPIt + 1), (theDimension == 2) ? 0 : *(aPIt + 2));
- gp_Pnt aPoint = aFirstPoint;
- aTmpPoints.push_back(aPoint);
+
+ gp_Pnt aFirstPoint;
+ gp_Pnt aPoint;
+
+ if( myPoints.size() > 0 )
+ {
+ aFirstPoint = gp_Pnt(*aPIt, *(aPIt + 1), (theDimension == 2) ? 0 : *(aPIt + 2));
+ aPoint = aFirstPoint;
+ aTmpPoints.push_back(aPoint);
+ }
for (; aPIt != aPItLast; aPIt += theDimension)
{
}
}
- thePoints = new TColgp_HArray1OfPnt(1, aPointCount);
+ points = new TColgp_HArray1OfPnt(1, aPointCount);
for (int aPI = 0; aPI < aPointCount; ++aPI)
{
- thePoints->SetValue(aPI + 1, aTmpPoints[aPI]);
+ points->SetValue(aPI + 1, aTmpPoints[aPI]);
}
+
+ return points;
}
CurveCreator_Section() : myName("Section"),myType(CurveCreator::Polyline), myIsClosed(false)
{ }
- std::string myName; //!< section name
+ std::string myName; //!< section name
CurveCreator::Coordinates myPoints; //!< points coordinates
CurveCreator::SectionType myType; //!< type of the section
bool myIsClosed; //!< closed or not
//! A virtual method.
- void GetDifferentPoints(const int theDimension, Handle(TColgp_HArray1OfPnt)& thePoints) const;
+ Handle(TColgp_HArray1OfPnt) GetDifferentPoints( int theDimension ) const;
};
#endif
#include "CurveCreator_TableView.h"
#include "CurveCreator_UtilsICurve.hxx"
+#include "CurveCreator_Widget.h"
#include <gp_Pnt.hxx>
QItemDelegate::setModelData( theEditor, theModel, theIndex );
}
+
+
+
CurveCreator_TableView::CurveCreator_TableView( CurveCreator_ICurve* theCurve,
- QWidget* theParent,
+ CurveCreator_Widget* theParent,
const QStringList& theCoordTitles )
-: QTableWidget( theParent ), myCurve( theCurve )
+ : QTableWidget( theParent ), myWidget( theParent ),
+ myCurve( theCurve ), myCurrentSortId( -1 ), myCurrentSortOrder( Qt::AscendingOrder )
{
setItemDelegate( new CurveCreator_TableItemDelegate( this ) );
setVisible( false );
void CurveCreator_TableView::OnHeaderClick( int theLogicalId )
{
- sortByColumn( theLogicalId, Qt::AscendingOrder );
+ if( theLogicalId == myCurrentSortId )
+ if( myCurrentSortOrder == Qt::AscendingOrder )
+ myCurrentSortOrder = Qt::DescendingOrder;
+ else
+ myCurrentSortOrder = Qt::AscendingOrder;
+
+ sortByColumn( theLogicalId, myCurrentSortOrder );
+
+ CurveCreator_ICurve::SectionToPointList selected;
+ for( int r=0, n=rowCount(); r<n; r++ )
+ {
+ int section = item( r, 0 )->data( Qt::UserRole ).toInt();
+ int point = item( r, 1 )->data( Qt::UserRole ).toInt();
+ selected.push_back( CurveCreator_ICurve::SectionToPoint( section, point ) );
+ }
+ myWidget->setSelectedPoints( selected );
+
+ myCurrentSortId = theLogicalId;
}
#include <QItemDelegate>
#include <QTableWidget>
+class CurveCreator_Widget;
+
class CurveCreator_TableItemDelegate : public QItemDelegate
{
public:
const QModelIndex& theIndex ) const;
};
-class CurveCreator_TableView : public QTableWidget
+class CURVECREATOR_EXPORT CurveCreator_TableView : public QTableWidget
{
Q_OBJECT
public:
- CurveCreator_TableView( CurveCreator_ICurve* theCurve, QWidget* theParent = 0,
+ CurveCreator_TableView( CurveCreator_ICurve* theCurve, CurveCreator_Widget* theParent,
const QStringList& theCoordTitles = QStringList() );
~CurveCreator_TableView() {};
*/
int getPointId( const int theRowId ) const;
-private slots:
+public slots:
void OnHeaderClick( int );
private:
+ CurveCreator_Widget* myWidget;
CurveCreator_ICurve* myCurve;
+ int myCurrentSortId;
+ Qt::SortOrder myCurrentSortOrder;
};
#endif // CURVECREATOR_TABLEVIEW_H
void CurveCreator_TreeViewModel::setCurve( CurveCreator_ICurve* theCurve )
{
- myCurve = theCurve;
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
+ myCurve = theCurve;
reset();
+#else
+ beginResetModel();
+ myCurve = theCurve;
+ endResetModel();
#endif
}
}
// Get the different points.
- const CurveCreator_ISection* aSection = theCurve->getSection(aSectionI);
- Handle(TColgp_HArray1OfPnt) aPoints;
- aSection->GetDifferentPoints(theCurve->getDimension(), aPoints);
+ Handle(TColgp_HArray1OfPnt) aPoints = theCurve->GetDifferentPoints( aSectionI );
const int aPointCount = aPoints->Length();
const bool isClosed = theCurve->isClosed(aSectionI);
theContext->SetAutomaticHilight( Standard_False );
Handle(SelectMgr_Selection) aSelection = anAISShape->Selection( AIS_Shape::SelectionMode( TopAbs_VERTEX ) );
+
+ CurveCreator_ICurve::SectionToPointList::const_iterator anIt = thePoints.begin(),
+ aLast = thePoints.end();
+ bool isFound = false;
+ for( int i=0; i<aSize; i++ )
+ {
for( aSelection->Init(); aSelection->More(); aSelection->Next() )
{
const Handle(SelectMgr_SensitiveEntity) aHSenEntity = aSelection->Sensitive();
gp_Pnt anOwnerPnt = aSenPnt->Point();
Handle(SelectMgr_EntityOwner) anOwner = Handle(SelectMgr_EntityOwner)::DownCast( aSenPnt->OwnerId() );
-
- CurveCreator_ICurve::SectionToPointList::const_iterator anIt = thePoints.begin(),
- aLast = thePoints.end();
- bool isFound = false;
- for( int i=0; i<aSize; i++ )
- {
bool isIntersect = fabs( aPntsToSelect[i].X() - anOwnerPnt.X() ) < LOCAL_SELECTION_TOLERANCE &&
fabs( aPntsToSelect[i].Y() - anOwnerPnt.Y() ) < LOCAL_SELECTION_TOLERANCE;
if( isIntersect )
CurveCreator_ICurve *theCurve,
const int theActionFlags,
const QStringList& theCoordTitles,
- Qt::WindowFlags fl,
- int theLocalPointRowLimit )
+ Qt::WindowFlags fl )
: QWidget(parent), myNewSectionEditor(NULL), myCurve(theCurve), mySection(0),
myDragStarted( false ), myDragInteractionStyle( SUIT_ViewModel::STANDARD ),
- myOCCViewer( 0 ), myLocalPointRowLimit( theLocalPointRowLimit ),
+ myOCCViewer( 0 ),
myOld2DMode(OCCViewer_ViewWindow::No2dMode)
{
bool isToEnableClosed = !( theActionFlags & DisableClosedSection );
CurveCreator_Utils::getSelectedPoints( aContext, myCurve, myLocalPoints );
int aNbPoints = myLocalPoints.size();
- bool isRowLimit = aNbPoints > myLocalPointRowLimit;
- myLocalPointView->setVisible( getActionMode() == ModificationMode && !isRowLimit );
+ //bool isRowLimit = aNbPoints > myLocalPointRowLimit;
+ myLocalPointView->setVisible( getActionMode() == ModificationMode/* && !isRowLimit */);
- if ( !isRowLimit ) {
- bool isBlocked = myLocalPointView->blockSignals(true);
+ //if ( !isRowLimit ) {
+ bool isBlocked = myLocalPointView->blockSignals(true);
- myLocalPointView->setLocalPointsToTable( myLocalPoints );
+ myLocalPointView->setLocalPointsToTable( myLocalPoints );
- myLocalPointView->blockSignals( isBlocked );
- }
+ myLocalPointView->blockSignals( isBlocked );
+ //}
}
/**
CurveCreator_ICurve *theCurve,
const int theActionFlags = NoFlags,
const QStringList& theCoordTitles = QStringList(),
- Qt::WindowFlags fl=0,
- int theLocalPointRowLimit = 20);
+ Qt::WindowFlags fl=0);
// OCC viewer manipulation
void setOCCViewer( OCCViewer_Viewer* theViewer );
void SetViewer2DMode(const bool To2D);
+ void setSelectedPoints( const CurveCreator_ICurve::SectionToPointList& =
+ CurveCreator_ICurve::SectionToPointList() );
+
+ void updateLocalPointView();
+ void setLocalPointContext( const bool theOpen, const bool isUpdateTable = false );
+
signals:
void selectionChanged();
void subOperationStarted( QWidget*, bool );
void subOperationFinished( QWidget* );
public slots:
-
-protected slots:
void onAdditionMode(bool checked);
void onModificationMode(bool checked);
void onDetectionMode(bool checked);
BRING_TOGETHER_ID
};
+public:
+ QAction* getAction(ActionId theId);
+ QAction* getAction(ActionMode theMode);
+
private:
OCCViewer_Viewer* getOCCViewer();
QAction* createAction( ActionId theId, const QString& theName, const QPixmap& theImage,
const QString& theToolTip, const QKeySequence& theShortcut );
- QAction* getAction(ActionId theId);
- QAction* getAction(ActionMode theMode);
void updateActionsStates();
void updateUndoRedo();
void insertPointToSelectedSegment( const int theXPosition,
const int theYPosition );
void moveSelectedPoints( const int theXPosition, const int theYPosition );
- void updateLocalPointView();
- void setLocalPointContext( const bool theOpen, const bool isUpdateTable = false );
void setDragStarted( const bool theState, const QPoint& thePoint = QPoint() );
void getSelectedPoints( CurveCreator_ICurve::SectionToPointList& thePoints );
- void setSelectedPoints( const CurveCreator_ICurve::SectionToPointList& =
- CurveCreator_ICurve::SectionToPointList() );
void stopActionMode();
INCLUDE_DIRECTORIES(
${QT_INCLUDES}
${GUI_INCLUDE_DIRS}
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${PROJECT_SOURCE_DIR}/src/GEOMGUI
${PROJECT_SOURCE_DIR}/src/GEOMBase
${PROJECT_SOURCE_DIR}/src/GEOM
${QT_DEFINITIONS}
${GUI_DEFINITIONS}
${OMNIORB_DEFINITIONS}
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
)
IF(WIN32)
ADD_DEFINITIONS(-DNOGDI)
${PTHREAD_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${GUI_INCLUDE_DIRS}
${PROJECT_BINARY_DIR}/idl
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
${QT_DEFINITIONS}
)
${VTK_INCLUDE_DIRS}
${OPENCV_INCLUDE_DIR}
${OMNIORB_INCLUDE_DIR}
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${GUI_INCLUDE_DIRS}
${PROJECT_BINARY_DIR}/idl
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
${QT_DEFINITIONS}
${OPENCV_DEFINITIONS}
0.0);
// Express the coordinates in the reference coordinate system (OXY)
- gp_Trsf aTranform = toReferenceSystem(P0);
- P1.Transform(aTranform);
- P2.Transform(aTranform);
+ gp_Trsf aTransform = toReferenceSystem(P0);
+ P1.Transform(aTransform);
+ P2.Transform(aTransform);
P1.Translate(Origin, P0);
P2.Translate(Origin, P0);
for (i = 0; i < aNbSec; ++i) {
// Set coordinates
- CurveCreator::Coordinates aCoords = myCurve->getPoints(i);
+ CurveCreator::Coordinates aCoords = myCurve->getCoords(i);
const int aNbPoints = aCoords.size();
theCoords[i].length(aNbPoints);
# additional include directories
INCLUDE_DIRECTORIES(
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${PTHREAD_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${PROJECT_SOURCE_DIR}/src/SKETCHER
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
)
# libraries to link to
SET(_link_LIBRARIES
- ${CAS_OCAFVIS}
- ${CAS_TKLCAF}
- ${CAS_TKCDF}
- ${CAS_TKG3d}
- ${CAS_TKStdL}
- ${CAS_TKStd}
- ${CAS_TKBin}
+ ${OpenCASCADE_ApplicationFramework_LIBRARIES} ${OpenCASCADE_ModelingData_LIBRARIES}
${KERNEL_SALOMELocalTrace}
${KERNEL_OpUtil}
GEOMSketcher
# additional include directories
INCLUDE_DIRECTORIES(
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${PROJECT_SOURCE_DIR}/src/GEOMUtils
${PROJECT_SOURCE_DIR}/src/GEOM
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
)
# libraries to link to
SET(_link_LIBRARIES
- ${CAS_KERNEL} ${CAS_TKBool} ${CAS_TKBO} ${CAS_TKMesh}
+ ${OpenCASCADE_FoundationClasses_LIBRARIES}
+ ${OpenCASCADE_ModelingAlgorithms_LIBRARIES}
GEOMbasic GEOMUtils
${KERNEL_SALOMELocalTrace}
)
GEOMAlgo_BndSphere.hxx
GEOMAlgo_BndSphereTree.hxx
GEOMAlgo_BoxBndTree.hxx
- GEOMAlgo_BuilderShape.hxx
GEOMAlgo_Clsf.hxx
GEOMAlgo_ClsfBox.hxx
GEOMAlgo_ClsfQuad.hxx
//purpose :
//=======================================================================
void GEOMAlgo_ClsfQuad::SetCorners(const gp_Pnt &theTopLeftPoint,
- const gp_Pnt &theTopRigthPoint,
+ const gp_Pnt &theTopRightPoint,
const gp_Pnt &theBottomLeftPoint,
- const gp_Pnt &theBottomRigthPoint)
+ const gp_Pnt &theBottomRightPoint)
{
myPoints.resize(6);
myPoints[0] = theTopLeftPoint;
- myPoints[1] = theTopRigthPoint;
- myPoints[2] = theBottomRigthPoint;
+ myPoints[1] = theTopRightPoint;
+ myPoints[2] = theBottomRightPoint;
myPoints[3] = theBottomLeftPoint;
myPoints[4] = myPoints[0];
myPoints[5] = myPoints[1];
//purpose :
//=======================================================================
void GEOMAlgo_ClsfQuad::GetCorners(gp_Pnt &theTopLeftPoint,
- gp_Pnt &theTopRigthPoint,
+ gp_Pnt &theTopRightPoint,
gp_Pnt &theBottomLeftPoint,
- gp_Pnt &theBottomRigthPoint) const
+ gp_Pnt &theBottomRightPoint) const
{
if (myPoints.size() == 6) {
theTopLeftPoint = myPoints[0];
- theTopRigthPoint = myPoints[1];
+ theTopRightPoint = myPoints[1];
theBottomLeftPoint = myPoints[3];
- theBottomRigthPoint = myPoints[2];
+ theBottomRightPoint = myPoints[2];
}
}
Standard_EXPORT
void SetCorners(const gp_Pnt &theTopLeftPoint,
- const gp_Pnt &theTopRigthPoint,
+ const gp_Pnt &theTopRightPoint,
const gp_Pnt &theBottomLeftPoint,
- const gp_Pnt &theBottomRigthPoint);
+ const gp_Pnt &theBottomRightPoint);
Standard_EXPORT
void GetCorners(gp_Pnt &theTopLeftPoint,
- gp_Pnt &theTopRigthPoint,
+ gp_Pnt &theTopRightPoint,
gp_Pnt &theBottomLeftPoint,
- gp_Pnt &theBottomRigthPoint) const;
+ gp_Pnt &theBottomRightPoint) const;
Standard_EXPORT
virtual void Perform();
GEOMAlgo_FinderShapeOnQuad::GEOMAlgo_FinderShapeOnQuad(const gp_Pnt & theTopLeftPoint,
- const gp_Pnt & theTopRigthPoint,
+ const gp_Pnt & theTopRightPoint,
const gp_Pnt & theBottomLeftPoint,
- const gp_Pnt & theBottomRigthPoint)
+ const gp_Pnt & theBottomRightPoint)
{
myPoints.resize(6);
myPoints[0] = theTopLeftPoint ;
- myPoints[1] = theTopRigthPoint ;
- myPoints[2] = theBottomRigthPoint;
+ myPoints[1] = theTopRightPoint ;
+ myPoints[2] = theBottomRightPoint;
myPoints[3] = theBottomLeftPoint ;
myPoints[4] = myPoints[0];
myPoints[5] = myPoints[1];
Standard_EXPORT
GEOMAlgo_FinderShapeOnQuad(const gp_Pnt & theTopLeftPoint,
- const gp_Pnt & theTopRigthPoint,
+ const gp_Pnt & theTopRightPoint,
const gp_Pnt & theBottomLeftPoint,
- const gp_Pnt & theBottomRigthPoint);
+ const gp_Pnt & theBottomRightPoint);
protected:
${PTHREAD_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${GUI_INCLUDE_DIRS}
${PROJECT_BINARY_DIR}/idl
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
${QT_DEFINITIONS}
)
# additional include directories
INCLUDE_DIRECTORIES(
${OMNIORB_INCLUDE_DIR}
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${PTHREAD_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${PROJECT_BINARY_DIR}/idl
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
)
# libraries to link to
SET(_link_LIBRARIES
SalomeIDLGEOM
- ${CAS_TKBRep}
+ ${OpenCASCADE_ModelingData_LIBRARIES}
${KERNEL_SALOMELocalTrace}
)
INCLUDE_DIRECTORIES(
${OMNIORB_INCLUDE_DIR}
${PTHREAD_INCLUDE_DIR}
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${GUI_INCLUDE_DIRS}
${PROJECT_BINARY_DIR}/idl
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
${QT_DEFINITIONS}
)
SET(_link_LIBRARIES
SalomeIDLGEOM
GEOMClient
- ${CAS_TKBRep}
+ ${OpenCASCADE_ModelingData_LIBRARIES}
${KERNEL_SALOMELocalTrace}
${GUI_SalomeApp}
)
${PTHREAD_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${GUI_INCLUDE_DIRS}
${PROJECT_BINARY_DIR}/idl
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
${QT_DEFINITIONS}
${OPENCV_DEFINITIONS}
AISShape->Attributes()->SetUnFreeBoundaryAspect( anAspect );
// - free boundaries color
- anAspect = AISShape->Attributes()->FreeBoundaryAspect();
- anAspect->SetColor( HasColor() ? (Quantity_NameOfColor)GetColor() :
+ Handle(Prs3d_LineAspect) aFreeBoundaryAspect =
+ new Prs3d_LineAspect (Quantity_NOC_RED, Aspect_TOL_SOLID, 1.0);
+ *aFreeBoundaryAspect->Aspect() = *AISShape->Attributes()->FreeBoundaryAspect()->Aspect();
+ aFreeBoundaryAspect->SetColor( HasColor() ? (Quantity_NameOfColor)GetColor() :
SalomeApp_Tools::color( propMap.value( GEOM::propertyName( GEOM::FreeBndColor ) ).value<QColor>() ) );
- AISShape->Attributes()->SetFreeBoundaryAspect( anAspect );
+ AISShape->Attributes()->SetFreeBoundaryAspect( aFreeBoundaryAspect );
// - standalone edges color
anAspect = AISShape->Attributes()->WireAspect();
getApp()->selectionMgr()->selectedObjects( lst );
//Add submenu for predefined materials
- bool isPredefMat = SUIT_Session::session()->resourceMgr()->booleanValue( "Geometry", "predef_materials" );
+ // RNV: '#23552: Unable to use the contextual menu of Object Browser window' issue:
+ // Temporary solution: do not show 'Materials' submenu forcibly
+ //bool isPredefMat = SUIT_Session::session()->resourceMgr()->booleanValue( "Geometry", "predef_materials" );
+ bool isPredefMat = false;
+
if ( ( client == "OCCViewer" || client == "VTKViewer" ) && lst.Extent() > 0 ) {
QtxPopupMgr* mgr = popupMgr();
//get parrent for submenu
int defl = addPreference( tr( "PREF_DEFLECTION" ), genGroup,
LightApp_Preferences::DblSpin, "Geometry", "deflection_coeff" );
- addPreference( tr( "PREF_PREDEF_MATERIALS" ), genGroup,
- LightApp_Preferences::Bool, "Geometry", "predef_materials" );
+ // RNV: Temporary hide this preference, because of the '#23552: Unable to use the contextual menu of Object Browser window' issue
+ //addPreference( tr( "PREF_PREDEF_MATERIALS" ), genGroup,
+ // LightApp_Preferences::Bool, "Geometry", "predef_materials" );
int material = addPreference( tr( "PREF_MATERIAL" ), genGroup,
LightApp_Preferences::Selector,
# additional include directories
INCLUDE_DIRECTORIES(
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${PTHREAD_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${PYTHON_INCLUDE_DIRS}
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${PYTHON_DEFINITIONS}
)
# libraries to link to
SET(_link_LIBRARIES
- ${CAS_TKFeat}
- ${CAS_TKFillet}
+ ${OpenCASCADE_ModelingAlgorithms_LIBRARIES}
${PYTHON_LIBRARIES}
ShHealOper GEOMbasic BlockFix GEOMAlgo GEOMUtils GEOMSketcher GEOMArchimede XAO
${KERNEL_SALOMELocalTrace}
* \param theShape - the shape to explore
* \param theShapeType - type of sub-shape of theShape
* \param theTopLeftPoint - top left quadrangle corner
- * \param theTopRigthPoint - top right quadrangle corner
+ * \param theTopRightPoint - top right quadrangle corner
* \param theBottomLeftPoint - bottom left quadrangle corner
- * \param theBottomRigthPoint - bottom right quadrangle corner
+ * \param theBottomRightPoint - bottom right quadrangle corner
* \param theState - required state
* \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
*/
GEOMImpl_IShapesOperations::getShapesOnQuadrangleIDs (const Handle(GEOM_Object)& theShape,
const Standard_Integer theShapeType,
const Handle(GEOM_Object)& theTopLeftPoint,
- const Handle(GEOM_Object)& theTopRigthPoint,
+ const Handle(GEOM_Object)& theTopRightPoint,
const Handle(GEOM_Object)& theBottomLeftPoint,
- const Handle(GEOM_Object)& theBottomRigthPoint,
+ const Handle(GEOM_Object)& theBottomRightPoint,
const GEOMAlgo_State theState)
{
SetErrorCode(KO);
if ( theShape.IsNull() ||
theTopLeftPoint.IsNull() ||
- theTopRigthPoint.IsNull() ||
+ theTopRightPoint.IsNull() ||
theBottomLeftPoint.IsNull() ||
- theBottomRigthPoint.IsNull() )
+ theBottomRightPoint.IsNull() )
return NULL;
TopoDS_Shape aShape = theShape->GetValue();
TopoDS_Shape aTL = theTopLeftPoint->GetValue();
- TopoDS_Shape aTR = theTopRigthPoint->GetValue();
+ TopoDS_Shape aTR = theTopRightPoint->GetValue();
TopoDS_Shape aBL = theBottomLeftPoint->GetValue();
- TopoDS_Shape aBR = theBottomRigthPoint->GetValue();
+ TopoDS_Shape aBR = theBottomRightPoint->GetValue();
if (aShape.IsNull() ||
aTL.IsNull() ||
* \param theShape - the shape to explore
* \param theShapeType - type of sub-shape of theShape
* \param theTopLeftPoint - top left quadrangle corner
- * \param theTopRigthPoint - top right quadrangle corner
+ * \param theTopRightPoint - top right quadrangle corner
* \param theBottomLeftPoint - bottom left quadrangle corner
- * \param theBottomRigthPoint - bottom right quadrangle corner
+ * \param theBottomRightPoint - bottom right quadrangle corner
* \param theState - required state
* \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
*/
GEOMImpl_IShapesOperations::GetShapesOnQuadrangle (const Handle(GEOM_Object)& theShape,
const Standard_Integer theShapeType,
const Handle(GEOM_Object)& theTopLeftPoint,
- const Handle(GEOM_Object)& theTopRigthPoint,
+ const Handle(GEOM_Object)& theTopRightPoint,
const Handle(GEOM_Object)& theBottomLeftPoint,
- const Handle(GEOM_Object)& theBottomRigthPoint,
+ const Handle(GEOM_Object)& theBottomRightPoint,
const GEOMAlgo_State theState)
{
// Find indices
getShapesOnQuadrangleIDs( theShape,
theShapeType,
theTopLeftPoint,
- theTopRigthPoint,
+ theTopRightPoint,
theBottomLeftPoint,
- theBottomRigthPoint,
+ theBottomRightPoint,
theState);
if ( aSeqOfIDs.IsNull() || aSeqOfIDs->IsEmpty() )
return NULL;
<< theShape << ", "
<< TopAbs_ShapeEnum(theShapeType) << ", "
<< theTopLeftPoint << ", "
- << theTopRigthPoint << ", "
+ << theTopRightPoint << ", "
<< theBottomLeftPoint << ", "
- << theBottomRigthPoint << ", "
+ << theBottomRightPoint << ", "
<< theState << ")";
SetErrorCode(OK);
* \param theShape - the shape to explore
* \param theShapeType - type of sub-shape of theShape
* \param theTopLeftPoint - top left quadrangle corner
- * \param theTopRigthPoint - top right quadrangle corner
+ * \param theTopRightPoint - top right quadrangle corner
* \param theBottomLeftPoint - bottom left quadrangle corner
- * \param theBottomRigthPoint - bottom right quadrangle corner
+ * \param theBottomRightPoint - bottom right quadrangle corner
* \param theState - required state
* \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
*/
GEOMImpl_IShapesOperations::GetShapesOnQuadrangleIDs (const Handle(GEOM_Object)& theShape,
const Standard_Integer theShapeType,
const Handle(GEOM_Object)& theTopLeftPoint,
- const Handle(GEOM_Object)& theTopRigthPoint,
+ const Handle(GEOM_Object)& theTopRightPoint,
const Handle(GEOM_Object)& theBottomLeftPoint,
- const Handle(GEOM_Object)& theBottomRigthPoint,
+ const Handle(GEOM_Object)& theBottomRightPoint,
const GEOMAlgo_State theState)
{
// Find indices
getShapesOnQuadrangleIDs( theShape,
theShapeType,
theTopLeftPoint,
- theTopRigthPoint,
+ theTopRightPoint,
theBottomLeftPoint,
- theBottomRigthPoint,
+ theBottomRightPoint,
theState);
if ( aSeqOfIDs.IsNull() || aSeqOfIDs->IsEmpty() )
return NULL;
// The GetShapesOnCylinder() doesn't change object so no new function is required.
Handle(GEOM_BaseObject) lastObj = GEOM::GetCreatedLast(theShape,theTopLeftPoint);
- lastObj = GEOM::GetCreatedLast(lastObj,theTopRigthPoint);
- lastObj = GEOM::GetCreatedLast(lastObj,theBottomRigthPoint);
+ lastObj = GEOM::GetCreatedLast(lastObj,theTopRightPoint);
+ lastObj = GEOM::GetCreatedLast(lastObj,theBottomRightPoint);
lastObj = GEOM::GetCreatedLast(lastObj,theBottomLeftPoint);
Handle(GEOM_Function) aFunction = lastObj->GetLastFunction();
<< theShape << ", "
<< TopAbs_ShapeEnum(theShapeType) << ", "
<< theTopLeftPoint << ", "
- << theTopRigthPoint << ", "
+ << theTopRightPoint << ", "
<< theBottomLeftPoint << ", "
- << theBottomRigthPoint << ", "
+ << theBottomRightPoint << ", "
<< theState << ")";
#endif // DUMP_SUBSHAPE_IDS
* \param theShape - the shape to explore
* \param theShapeType - type of sub-shape of theShape
* \param theTopLeftPoint - top left quadrangle corner
- * \param theTopRigthPoint - top right quadrangle corner
+ * \param theTopRightPoint - top right quadrangle corner
* \param theBottomLeftPoint - bottom left quadrangle corner
- * \param theBottomRigthPoint - bottom right quadrangle corner
+ * \param theBottomRightPoint - bottom right quadrangle corner
* \param theState - required state
* \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
*/
GetShapesOnQuadrangle (const Handle(GEOM_Object)& theShape,
const Standard_Integer theShapeType,
const Handle(GEOM_Object)& theTopLeftPoint,
- const Handle(GEOM_Object)& theTopRigthPoint,
+ const Handle(GEOM_Object)& theTopRightPoint,
const Handle(GEOM_Object)& theBottomLeftPoint,
- const Handle(GEOM_Object)& theBottomRigthPoint,
+ const Handle(GEOM_Object)& theBottomRightPoint,
const GEOMAlgo_State theState);
/*!
* \param theShape - the shape to explore
* \param theShapeType - type of sub-shape of theShape
* \param theTopLeftPoint - top left quadrangle corner
- * \param theTopRigthPoint - top right quadrangle corner
+ * \param theTopRightPoint - top right quadrangle corner
* \param theBottomLeftPoint - bottom left quadrangle corner
- * \param theBottomRigthPoint - bottom right quadrangle corner
+ * \param theBottomRightPoint - bottom right quadrangle corner
* \param theState - required state
* \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
*/
GetShapesOnQuadrangleIDs (const Handle(GEOM_Object)& theShape,
const Standard_Integer theShapeType,
const Handle(GEOM_Object)& theTopLeftPoint,
- const Handle(GEOM_Object)& theTopRigthPoint,
+ const Handle(GEOM_Object)& theTopRightPoint,
const Handle(GEOM_Object)& theBottomLeftPoint,
- const Handle(GEOM_Object)& theBottomRigthPoint,
+ const Handle(GEOM_Object)& theBottomRightPoint,
const GEOMAlgo_State theState);
Standard_EXPORT Handle(GEOM_Object) GetShapesOnCylinderOld (Handle(GEOM_Object) theShape,
* \param theShape - the shape to explore
* \param theShapeType - type of sub-shape of theShape
* \param theTopLeftPoint - top left quadrangle corner
- * \param theTopRigthPoint - top right quadrangle corner
+ * \param theTopRightPoint - top right quadrangle corner
* \param theBottomLeftPoint - bottom left quadrangle corner
- * \param theBottomRigthPoint - bottom right quadrangle corner
+ * \param theBottomRightPoint - bottom right quadrangle corner
* \param theState - required state
* \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
*/
getShapesOnQuadrangleIDs (const Handle(GEOM_Object)& theShape,
const Standard_Integer theShapeType,
const Handle(GEOM_Object)& theTopLeftPoint,
- const Handle(GEOM_Object)& theTopRigthPoint,
+ const Handle(GEOM_Object)& theTopRightPoint,
const Handle(GEOM_Object)& theBottomLeftPoint,
- const Handle(GEOM_Object)& theBottomRigthPoint,
+ const Handle(GEOM_Object)& theBottomRightPoint,
const GEOMAlgo_State theState);
/*!
const TopoDS_Shape& V1,
TopTools_IndexedDataMapOfShapeShape& FF)
{
- //cout<<"FillForOtherEdges"<<endl;
// find other pairs for vertexes and edges
// creating map of vertex edges for both faces
TopTools_IndexedDataMapOfShapeListOfShape aMapVertEdge1;
TopExp::MapShapesAndAncestors(F1, TopAbs_VERTEX, TopAbs_EDGE, aMapVertEdge1);
- if (!FF.Contains(F1))
- MESSAGE(" FillForOtherEdges: map FF not contains key F1");
- if (!FF.Contains(E1))
- MESSAGE(" FillForOtherEdges: map FF not contains key E1");
- if (!FF.Contains(V1))
- MESSAGE(" FillForOtherEdges: map FF not contains key V1");
+ if (!FF.Contains(F1)) MESSAGE(" FillForOtherEdges: map FF not contains key F1");
+ if (!FF.Contains(E1)) MESSAGE(" FillForOtherEdges: map FF not contains key E1");
+ if (!FF.Contains(V1)) MESSAGE(" FillForOtherEdges: map FF not contains key V1");
const TopoDS_Shape& F2 = FF.FindFromKey(F1);
const TopoDS_Shape& E2 = FF.FindFromKey(E1);
const TopoDS_Shape& V2 = FF.FindFromKey(V1);
ShapeAnalysis_Edge sae;
while(1) {
- if (!aMapVertEdge1.Contains(VS1))
- MESSAGE (" FillForOtherEdges: map aMapVertEdge1 not contains key VS1");
+ if (!aMapVertEdge1.Contains(VS1)) MESSAGE (" FillForOtherEdges: map aMapVertEdge1 not contains key VS1");
const TopTools_ListOfShape& aList1 = aMapVertEdge1.FindFromKey(VS1);
- //TopoDS_Shape E1next;
TopTools_ListIteratorOfListOfShape anIter1(aList1);
if (anIter1.Value().IsSame(ES1)) {
anIter1.Next();
}
- //E1next = anIter1.Value();
- if (!aMapVertEdge2.Contains(VS2))
- MESSAGE (" FillForOtherEdges: map aMapVertEdge2 not contains key VS2");
+ if (!aMapVertEdge2.Contains(VS2)) MESSAGE (" FillForOtherEdges: map aMapVertEdge2 not contains key VS2");
const TopTools_ListOfShape& aList2 = aMapVertEdge2.FindFromKey(VS2);
- //TopoDS_Shape E2next;
TopTools_ListIteratorOfListOfShape anIter2(aList2);
if (anIter2.Value().IsSame(ES2)) {
anIter2.Next();
}
- //E2next = anIter2.Value();
- //ES1 = TopoDS::Edge(E1next);
- //ES2 = TopoDS::Edge(E2next);
ES1 = TopoDS::Edge(anIter1.Value());
ES2 = TopoDS::Edge(anIter2.Value());
if (!FF.Contains(ES1)) {
const TopoDS_Wire& aWirePath,
TopTools_IndexedDataMapOfShapeShape& FF)
{
- //cout<<"FillCorrespondingEdges"<<endl;
// find corresponding edges
TopExp_Explorer expw1(FS1,TopAbs_WIRE);
TopoDS_Wire aWire1 = TopoDS::Wire(expw1.Current());
TopoDS_Vertex V21 = sae.LastVertex(E1);
gp_Pnt P11 = BRep_Tool::Pnt(V11);
gp_Pnt P21 = BRep_Tool::Pnt(V21);
- //cout<<"P11("<<P11.X()<<","<<P11.Y()<<","<<P11.Z()<<")"<<endl;
- //cout<<"P21("<<P21.X()<<","<<P21.Y()<<","<<P21.Z()<<")"<<endl;
// find corresponding vertexes from created shape
TopoDS_Vertex VN11,VN21;
for (exp.Init(aShape, TopAbs_VERTEX); exp.More(); exp.Next()) {
TopoDS_Vertex V12,V22;
gp_Pnt PN12 = BRep_Tool::Pnt(VN12);
gp_Pnt PN22 = BRep_Tool::Pnt(VN22);
- //cout<<"PN12("<<PN12.X()<<","<<PN12.Y()<<","<<PN12.Z()<<")"<<endl;
- //cout<<"PN22("<<PN22.X()<<","<<PN22.Y()<<","<<PN22.Z()<<")"<<endl;
TopoDS_Edge E2;
TopExp_Explorer expe;
for (expe.Init(FS2, TopAbs_EDGE); expe.More(); expe.Next()) {
const TopoDS_Vertex& aLoc2,
TopTools_IndexedDataMapOfShapeShape& FF)
{
- //cout<<"FillCorrespondingEdges"<<endl;
-
gp_Pnt P1 = BRep_Tool::Pnt(aLoc1);
gp_Pnt P2 = BRep_Tool::Pnt(aLoc2);
gp_Vec aDir(P1,P2);
TopoDS_Vertex V2 = sae.LastVertex(E1);
gp_Pnt Ptmp1 = BRep_Tool::Pnt(V1);
gp_Pnt Ptmp2 = BRep_Tool::Pnt(V2);
- //cout<<"P11("<<P11.X()<<","<<P11.Y()<<","<<P11.Z()<<")"<<endl;
- //cout<<"P21("<<P21.X()<<","<<P21.Y()<<","<<P21.Z()<<")"<<endl;
if (P1.Distance(Ptmp1)<tol) {
V21 = V2;
break;
TopTools_IndexedDataMapOfShapeShape& FF,
GEOMImpl_IPipe* aCI)
{
- //cout<<"FindNextPairOfFaces"<<endl;
TopExp_Explorer anExp;
for (anExp.Init(aCurFace, TopAbs_EDGE); anExp.More(); anExp.Next()) {
TopoDS_Shape E1 = anExp.Current();
if (aCI) delete aCI;
Standard_ConstructionError::Raise("FindNextPairOfFaces: Can not find edge in map");
}
- if (!FF.Contains(E1))
- MESSAGE (" FindNextPairOfFaces: map FF not contains key E1");
+ if (!FF.Contains(E1)) MESSAGE (" FindNextPairOfFaces: map FF not contains key E1");
const TopoDS_Shape& E2 = FF.FindFromKey(E1);
TopExp_Explorer anExpV;
anExpV.Init(E1, TopAbs_VERTEX);
Standard_ConstructionError::Raise("FindNextPairOfFaces: Can not find vertex in map");
}
- if (!aMapEdgeFaces1.Contains(E1))
- MESSAGE (" FindNextPairOfFaces: map aMapEdgeFaces1 not contains key E1");
+ if (!aMapEdgeFaces1.Contains(E1)) MESSAGE (" FindNextPairOfFaces: map aMapEdgeFaces1 not contains key E1");
const TopTools_ListOfShape& aList1 = aMapEdgeFaces1.FindFromKey(E1);
if (aList1.Extent()<2)
continue;
if (FF.Contains(F1other))
continue;
- if (!FF.Contains(aCurFace))
- MESSAGE (" FindNextPairOfFaces: map FF not contains key aCurFace");
+ if (!FF.Contains(aCurFace)) MESSAGE (" FindNextPairOfFaces: map FF not contains key aCurFace");
const TopoDS_Shape& F2 = FF.FindFromKey(aCurFace);
- if (!aMapEdgeFaces2.Contains(E2))
- MESSAGE (" FindNextPairOfFaces: map aMapEdgeFaces2 not contains key E2");
+ if (!aMapEdgeFaces2.Contains(E2)) MESSAGE (" FindNextPairOfFaces: map aMapEdgeFaces2 not contains key E2");
const TopTools_ListOfShape& aList2 = aMapEdgeFaces2.FindFromKey(E2);
if (aList2.Extent()<2) {
if (aCI) delete aCI;
TopoDS_Vertex& V1, TopoDS_Vertex& V2,
TopoDS_Shape& FS1, TopoDS_Shape& FS2)
{
- //cout<<"FindFirstPairFaces"<<endl;
-
// check if vertexes are sub-shapes of sections
gp_Pnt P1 = BRep_Tool::Pnt(V1);
gp_Pnt P2 = BRep_Tool::Pnt(V2);
}
}
- //gp_Pnt P1new = BRep_Tool::Pnt(V1new);
- //gp_Pnt P2new = BRep_Tool::Pnt(V2new);
- //cout<<" P1("<<P1.X()<<","<<P1.Y()<<","<<P1.Z()<<")"<<endl;
- //cout<<" P2("<<P2.X()<<","<<P2.Y()<<","<<P2.Z()<<")"<<endl;
- //cout<<" P1new("<<P1new.X()<<","<<P1new.Y()<<","<<P1new.Z()<<")"<<endl;
- //cout<<" P2new("<<P2new.X()<<","<<P2new.Y()<<","<<P2new.Z()<<")"<<endl;
-
// replace vertexes if it is needed
if (!V1.IsSame(V1new)) {
V1 = V1new;
return aResult;
}
+//=======================================================================
+//function : makeSolid
+//purpose : auxilary for CreatePipeWithDifferentSections
+//=======================================================================
+Standard_Boolean makeSolid(
+ BRepOffsetAPI_MakePipeShell aBuilder,
+ const TopoDS_Shape& aSh1,
+ const TopoDS_Shape& aSh2,
+ TopoDS_Shape& aShape)
+{
+ Standard_Boolean isDone = Standard_True;
+ Standard_Integer nbPlanar = 0;
+ if (aSh1.ShapeType() == TopAbs_FACE && aSh2.ShapeType() == TopAbs_FACE)
+ {
+ Handle(Geom_Surface) aS = BRep_Tool::Surface(TopoDS::Face(aSh1));
+ if (aS->IsKind(STANDARD_TYPE(Geom_Plane))) {
+ nbPlanar++;
+ }
+ else if (aS->IsKind(STANDARD_TYPE(Geom_RectangularTrimmedSurface))) {
+ Handle(Geom_RectangularTrimmedSurface) aTS = Handle(Geom_RectangularTrimmedSurface)::DownCast(aS);
+ if (aTS->BasisSurface()->IsKind(STANDARD_TYPE(Geom_Plane))) {
+ nbPlanar++;
+ }
+ }
+ aS = BRep_Tool::Surface(TopoDS::Face(aSh2));
+ if (aS->IsKind(STANDARD_TYPE(Geom_Plane))) {
+ nbPlanar++;
+ }
+ else if (aS->IsKind(STANDARD_TYPE(Geom_RectangularTrimmedSurface))) {
+ Handle(Geom_RectangularTrimmedSurface) aTS = Handle(Geom_RectangularTrimmedSurface)::DownCast(aS);
+ if (aTS->BasisSurface()->IsKind(STANDARD_TYPE(Geom_Plane))) {
+ nbPlanar++;
+ }
+ }
+ }
+ if (nbPlanar < 2) {
+ TopoDS_Shape aPipe = aBuilder.Shape();
+ // make sewing for result
+ Handle(BRepBuilderAPI_Sewing) aSewing = new BRepBuilderAPI_Sewing;
+ Standard_Real aTol = Precision::Confusion();
+ aSewing->SetTolerance(aTol);
+ aSewing->SetFaceMode(Standard_True);
+ aSewing->SetFloatingEdgesMode(Standard_False);
+ aSewing->SetNonManifoldMode(Standard_False);
+ TopExp_Explorer anExp;
+ for (anExp.Init(aPipe, TopAbs_FACE); anExp.More(); anExp.Next()) {
+ aSewing->Add(anExp.Current());
+ }
+ aSewing->Add(aSh1);
+ aSewing->Add(aSh2);
+ aSewing->Perform();
+ aShape = aSewing->SewedShape();
+ if (aShape.ShapeType() == TopAbs_SHELL) {
+ // Build a solid.
+ BRepBuilderAPI_MakeSolid aMkSolid;
+ aMkSolid.Add(TopoDS::Shell(aShape));
+ if (!aMkSolid.IsDone()) {
+ isDone = Standard_False;
+ }
+ else {
+ TopoDS_Solid aSolid = aMkSolid.Solid();
+ BRepClass3d_SolidClassifier aSC(aSolid);
+ aSC.PerformInfinitePoint(Precision::Confusion());
+ if (aSC.State() == TopAbs_IN) {
+ aShape = aSolid.Reversed();
+ }
+ else {
+ aShape = aSolid;
+ }
+ }
+ }
+ else {
+ isDone = Standard_False;
+ }
+ }
+ else {
+ isDone = Standard_False;
+ }
+ if (!isDone) {
+ isDone = aBuilder.MakeSolid();
+ if (isDone) {
+ aShape = aBuilder.Shape();
+ }
+ }
+ return isDone;
+}
+
//=======================================================================
//function : CreatePipeWithDifferentSections
//purpose :
double tol = BRep_Tool::Tolerance(edge);
TopoDS_Vertex VF = sae.FirstVertex(edge);
gp_Pnt PF = BRep_Tool::Pnt(VF);
- //cout<<"PF("<<PF.X()<<","<<PF.Y()<<","<<PF.Z()<<")"<<endl;
if (PF.Distance(PLocs.First()) > tol) {
Standard_ConstructionError::Raise
("First location shapes is not coincided with first vertex of aWirePath");
P1 = P2;
}
int LastLoc = 1;
- //cout<<"Edges.Length()="<<Edges.Length()<<endl;
for (i=2; i<=Edges.Length(); i++) {
TopoDS_Edge edge = TopoDS::Edge(Edges.Value(i));
double tol = BRep_Tool::Tolerance(edge);
Standard_Boolean isDone = BuildPipeShell(aBuilder);
- if (isDone && NeedCreateSolid) {
- isDone = aBuilder.MakeSolid();
+ if (isDone) {
+ if (NeedCreateSolid) {
+ TopoDS_Shape aSh1 = aSeqFaces.Value(1);
+ TopoDS_Shape aSh2 = aSeqFaces.Value(aSeqFaces.Length());
+ isDone = makeSolid(aBuilder, aSh1, aSh2, aShape);
+ }
+ else {
+ aShape = aBuilder.Shape();
+ }
}
if (!isDone) {
Standard_ConstructionError::Raise("Pipe construction failure");
}
- aShape = aBuilder.Shape();
if (isCreateGroups) {
// Make groups.
double tol = BRep_Tool::Tolerance(edge);
TopoDS_Vertex VF = sae.FirstVertex(edge);
gp_Pnt PF = BRep_Tool::Pnt(VF);
- //cout<<"PF("<<PF.X()<<","<<PF.Y()<<","<<PF.Z()<<")"<<endl;
if (PF.Distance(PLocs.First()) > tol) {
if (aCI) delete aCI;
Standard_ConstructionError::Raise
aShell = TopoDS::Shell(aSewShape);
GProp_GProps aSystem;
BRepGProp::VolumeProperties(aShell, aSystem);
- if (aSystem.Mass()<0) {
- //cout<<"aSewShape is reversed"<<endl;
+ if (aSystem.Mass() < 0) {
aShell.Reverse();
}
if (BRep_Tool::IsClosed(aShell)) {
//=======================================================================
static TopoDS_Shape CreatePipeShellsWithoutPath(GEOMImpl_IPipe* aCI)
{
- //cout<<"CreatePipeShellsWithoutPath"<<endl;
int i,j;
BRep_Builder B;
for (anExp.Init(aShBase2, TopAbs_FACE); anExp.More(); anExp.Next()) {
nbf2++;
}
- //cout<<"nbf1="<<nbf1<<" nbf2="<<nbf2<<endl;
if (nbf1!=nbf2) {
if (aCI) delete aCI;
Standard_ConstructionError::Raise("Different number of faces in the sections");
// auxiliary map vertex->edge for created pipe edges
TopTools_IndexedDataMapOfShapeShape VPE;
ShapeAnalysis_Edge sae;
- //cout<<"FF.Extent()="<<FF.Extent()<<endl;
int nbff = 0;
for (j=1; j<=FF.Extent(); j++) {
TopoDS_Shape F1 = FF.FindKey(j);
double fp,lp;
Handle(Geom_Curve) C1 = BRep_Tool::Curve(E1,fp,lp);
- //bool IsConicC1 = false;
- //if (C1->IsKind(STANDARD_TYPE(Geom_Conic))) {
- // IsConicC1 = true;
- // cout<<"C1 - Geom_Conic"<<endl;
- //}
if (C1->IsKind(STANDARD_TYPE(Geom_Line)) || C1->IsKind(STANDARD_TYPE(Geom_Conic))) {
C1 = new Geom_TrimmedCurve(C1,fp,lp);
}
- //if (IsConicC1) {
- // double tol = BRep_Tool::Tolerance(E1);
- // GeomConvert_ApproxCurve ApxC1(C1,tol,GeomAbs_C1,10,5);
- // C1 = ApxC1.Curve();
- //}
Handle(Geom_Curve) C3 = BRep_Tool::Curve(E3,fp,lp);
if (C3->IsKind(STANDARD_TYPE(Geom_Line)) || C3->IsKind(STANDARD_TYPE(Geom_Conic))) {
C3 = new Geom_TrimmedCurve(C3,fp,lp);
}
- //filebuf fic;
- //ostream os(&fic);
- //os.precision(15);
Handle(Geom_BSplineCurve) CE1 =
GeomConvert::CurveToBSplineCurve(C1,Convert_RationalC1);
if (CE1->Degree()<3)
aShell = TopoDS::Shell(aSewShape);
GProp_GProps aSystem;
BRepGProp::VolumeProperties(aShell, aSystem);
- if (aSystem.Mass()<0) {
- //cout<<"aSewShape is reversed"<<endl;
+ if (aSystem.Mass() < 0) {
aShell.Reverse();
}
if (BRep_Tool::IsClosed(aShell)) {
${PTHREAD_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${GUI_INCLUDE_DIRS}
${PROJECT_BINARY_DIR}/idl
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
${QT_DEFINITIONS}
)
# additional include directories
INCLUDE_DIRECTORIES(
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${PTHREAD_INCLUDE_DIR}
${LIBXML2_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${LIBXML2_DEFINITIONS}
)
# libraries to link to
SET(_link_LIBRARIES
- ${CAS_TKBRep} ${CAS_TKShHealing} ${CAS_TKMesh} ${CAS_TKGeomAlgo}
- ${CAS_TKTopAlgo}
- ${CAS_TKG2d}
- ${CAS_TKG3d}
- ${CAS_TKV3d}
- ${CAS_TKGeomBase}
- ${CAS_TKBO}
+ ${OpenCASCADE_ModelingData_LIBRARIES}
+ ${OpenCASCADE_ModelingAlgorithms_LIBRARIES}
+ ${OpenCASCADE_Visualization_LIBRARIES}
${LIBXML2_LIBRARIES}
${KERNEL_SALOMELocalTrace}
)
INCLUDE_DIRECTORIES(
${OMNIORB_INCLUDE_DIR}
${PTHREAD_INCLUDE_DIR}
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${PROJECT_SOURCE_DIR}/src/GEOMImpl
${PROJECT_SOURCE_DIR}/src/GEOM
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
)
(GEOM::GEOM_Object_ptr theShape,
CORBA::Long theShapeType,
GEOM::GEOM_Object_ptr theTopLeftPoint,
- GEOM::GEOM_Object_ptr theTopRigthPoint,
+ GEOM::GEOM_Object_ptr theTopRightPoint,
GEOM::GEOM_Object_ptr theBottomLeftPoint,
- GEOM::GEOM_Object_ptr theBottomRigthPoint,
+ GEOM::GEOM_Object_ptr theBottomRightPoint,
GEOM::shape_state theState)
{
GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
//Get the reference objects
Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
Handle(::GEOM_Object) aTopLeftPoint = GetObjectImpl(theTopLeftPoint);
- Handle(::GEOM_Object) aTopRigthPoint = GetObjectImpl(theTopRigthPoint);
+ Handle(::GEOM_Object) aTopRightPoint = GetObjectImpl(theTopRightPoint);
Handle(::GEOM_Object) aBottomLeftPoint = GetObjectImpl(theBottomLeftPoint);
- Handle(::GEOM_Object) aBottomRigthPoint = GetObjectImpl(theBottomRigthPoint);
+ Handle(::GEOM_Object) aBottomRightPoint = GetObjectImpl(theBottomRightPoint);
if (aShape.IsNull() ||
aTopLeftPoint.IsNull() ||
- aTopRigthPoint.IsNull() ||
+ aTopRightPoint.IsNull() ||
aBottomLeftPoint.IsNull() ||
- aBottomRigthPoint.IsNull())
+ aBottomRightPoint.IsNull())
return aSeq._retn();
//Get Shapes On Quadrangle
Handle(TColStd_HSequenceOfTransient) aHSeq = GetOperations()->GetShapesOnQuadrangle
(aShape, theShapeType,
- aTopLeftPoint, aTopRigthPoint, aBottomLeftPoint, aBottomRigthPoint,
+ aTopLeftPoint, aTopRightPoint, aBottomLeftPoint, aBottomRightPoint,
ShapeState(theState));
if (!GetOperations()->IsDone() || aHSeq.IsNull())
return aSeq._retn();
(GEOM::GEOM_Object_ptr theShape,
CORBA::Long theShapeType,
GEOM::GEOM_Object_ptr theTopLeftPoint,
- GEOM::GEOM_Object_ptr theTopRigthPoint,
+ GEOM::GEOM_Object_ptr theTopRightPoint,
GEOM::GEOM_Object_ptr theBottomLeftPoint,
- GEOM::GEOM_Object_ptr theBottomRigthPoint,
+ GEOM::GEOM_Object_ptr theBottomRightPoint,
GEOM::shape_state theState)
{
GEOM::ListOfLong_var aSeq = new GEOM::ListOfLong;
//Get the reference objects
Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
Handle(::GEOM_Object) aTopLeftPoint = GetObjectImpl(theTopLeftPoint);
- Handle(::GEOM_Object) aTopRigthPoint = GetObjectImpl(theTopRigthPoint);
+ Handle(::GEOM_Object) aTopRightPoint = GetObjectImpl(theTopRightPoint);
Handle(::GEOM_Object) aBottomLeftPoint = GetObjectImpl(theBottomLeftPoint);
- Handle(::GEOM_Object) aBottomRigthPoint = GetObjectImpl(theBottomRigthPoint);
+ Handle(::GEOM_Object) aBottomRightPoint = GetObjectImpl(theBottomRightPoint);
if (aShape.IsNull() ||
aTopLeftPoint.IsNull() ||
- aTopRigthPoint.IsNull() ||
+ aTopRightPoint.IsNull() ||
aBottomLeftPoint.IsNull() ||
- aBottomRigthPoint.IsNull() )
+ aBottomRightPoint.IsNull() )
return aSeq._retn();
//Get Shapes On Quadrangle
Handle(TColStd_HSequenceOfInteger) aHSeq = GetOperations()->GetShapesOnQuadrangleIDs
(aShape, theShapeType,
- aTopLeftPoint, aTopRigthPoint, aBottomLeftPoint, aBottomRigthPoint,
+ aTopLeftPoint, aTopRightPoint, aBottomLeftPoint, aBottomRightPoint,
ShapeState(theState));
if (!GetOperations()->IsDone() || aHSeq.IsNull())
return aSeq._retn();
GEOM::ListOfGO* GetShapesOnQuadrangle (GEOM::GEOM_Object_ptr theShape,
CORBA::Long theShapeType,
GEOM::GEOM_Object_ptr theTopLeftPoint,
- GEOM::GEOM_Object_ptr theTopRigthPoint,
+ GEOM::GEOM_Object_ptr theTopRightPoint,
GEOM::GEOM_Object_ptr theBottomLeftPoint,
- GEOM::GEOM_Object_ptr theBottomRigthPoint,
+ GEOM::GEOM_Object_ptr theBottomRightPoint,
GEOM::shape_state theState);
GEOM::ListOfLong* GetShapesOnPlaneIDs (GEOM::GEOM_Object_ptr theShape,
GEOM::ListOfLong* GetShapesOnQuadrangleIDs (GEOM::GEOM_Object_ptr theShape,
CORBA::Long theShapeType,
GEOM::GEOM_Object_ptr theTopLeftPoint,
- GEOM::GEOM_Object_ptr theTopRigthPoint,
+ GEOM::GEOM_Object_ptr theTopRightPoint,
GEOM::GEOM_Object_ptr theBottomLeftPoint,
- GEOM::GEOM_Object_ptr theBottomRigthPoint,
+ GEOM::GEOM_Object_ptr theBottomRightPoint,
GEOM::shape_state theState);
GEOM::ListOfGO* GetShapesOnBox (GEOM::GEOM_Object_ptr theBox,
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
)
geompy.addToStudy(Fillet_1, "Fillet_1")
#Chamfer applying
-Chamfer_1 = geompy.MakeChamferEdge(Fillet_1, 10, 10, 15, 49 )
+Chamfer_1 = geompy.MakeChamferEdge(Fillet_1, 10, 10, 44, 114 )
geompy.addToStudy(Chamfer_1, "Chamfer_1")
Chamfer_2 = geompy.MakeChamferEdge(Chamfer_1, 10, 10, 20, 30 )
# @param theShape Shape to find sub-shapes of.
# @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
# @param theTopLeftPoint Point, specifying top left corner of a quadrangle
- # @param theTopRigthPoint Point, specifying top right corner of a quadrangle
+ # @param theTopRightPoint Point, specifying top right corner of a quadrangle
# @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
- # @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
+ # @param theBottomRightPoint Point, specifying bottom right corner of a quadrangle
# @param theState The state of the sub-shapes to find (see GEOM::shape_state)
# @param theName Object name; when specified, this parameter is used
# for result publication in the study. Otherwise, if automatic
# @ref swig_GetShapesOnQuadrangle "Example"
@ManageTransactions("ShapesOp")
def GetShapesOnQuadrangle(self, theShape, theShapeType,
- theTopLeftPoint, theTopRigthPoint,
- theBottomLeftPoint, theBottomRigthPoint, theState, theName=None):
+ theTopLeftPoint, theTopRightPoint,
+ theBottomLeftPoint, theBottomRightPoint, theState, theName=None):
"""
Find in theShape all sub-shapes of type theShapeType, situated relatively
the specified quadrangle by the certain way, defined through theState parameter.
theShape Shape to find sub-shapes of.
theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
theTopLeftPoint Point, specifying top left corner of a quadrangle
- theTopRigthPoint Point, specifying top right corner of a quadrangle
+ theTopRightPoint Point, specifying top right corner of a quadrangle
theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
- theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
+ theBottomRightPoint Point, specifying bottom right corner of a quadrangle
theState The state of the sub-shapes to find (see GEOM::shape_state)
theName Object name; when specified, this parameter is used
for result publication in the study. Otherwise, if automatic
"""
# Example: see GEOM_TestOthers.py
aList = self.ShapesOp.GetShapesOnQuadrangle(theShape, theShapeType,
- theTopLeftPoint, theTopRigthPoint,
- theBottomLeftPoint, theBottomRigthPoint, theState)
+ theTopLeftPoint, theTopRightPoint,
+ theBottomLeftPoint, theBottomRightPoint, theState)
RaiseIfFailed("GetShapesOnQuadrangle", self.ShapesOp)
self._autoPublish(aList, theName, "shapeOnQuadrangle")
return aList
# @param theShape Shape to find sub-shapes of.
# @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
# @param theTopLeftPoint Point, specifying top left corner of a quadrangle
- # @param theTopRigthPoint Point, specifying top right corner of a quadrangle
+ # @param theTopRightPoint Point, specifying top right corner of a quadrangle
# @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
- # @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
+ # @param theBottomRightPoint Point, specifying bottom right corner of a quadrangle
# @param theState The state of the sub-shapes to find (see GEOM::shape_state)
#
# @return List of all found sub-shapes indices.
# @ref swig_GetShapesOnQuadrangleIDs "Example"
@ManageTransactions("ShapesOp")
def GetShapesOnQuadrangleIDs(self, theShape, theShapeType,
- theTopLeftPoint, theTopRigthPoint,
- theBottomLeftPoint, theBottomRigthPoint, theState):
+ theTopLeftPoint, theTopRightPoint,
+ theBottomLeftPoint, theBottomRightPoint, theState):
"""
Find in theShape all sub-shapes of type theShapeType, situated relatively
the specified quadrangle by the certain way, defined through theState parameter.
theShape Shape to find sub-shapes of.
theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
theTopLeftPoint Point, specifying top left corner of a quadrangle
- theTopRigthPoint Point, specifying top right corner of a quadrangle
+ theTopRightPoint Point, specifying top right corner of a quadrangle
theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
- theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
+ theBottomRightPoint Point, specifying bottom right corner of a quadrangle
theState The state of the sub-shapes to find (see GEOM::shape_state)
Returns:
# Example: see GEOM_TestOthers.py
aList = self.ShapesOp.GetShapesOnQuadrangleIDs(theShape, theShapeType,
- theTopLeftPoint, theTopRigthPoint,
- theBottomLeftPoint, theBottomRigthPoint, theState)
+ theTopLeftPoint, theTopRightPoint,
+ theBottomLeftPoint, theBottomRightPoint, theState)
RaiseIfFailed("GetShapesOnQuadrangleIDs", self.ShapesOp)
return aList
${PTHREAD_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${GUI_INCLUDE_DIRS}
${PROJECT_BINARY_DIR}/idl
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
${QT_DEFINITIONS}
)
${PTHREAD_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${GUI_INCLUDE_DIRS}
${PROJECT_BINARY_DIR}/idl
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
${QT_DEFINITIONS}
)
${PTHREAD_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${GUI_INCLUDE_DIRS}
${PROJECT_BINARY_DIR}/idl
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
${QT_DEFINITIONS}
)
# additional include directories
INCLUDE_DIRECTORIES(
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${PROJECT_BINARY_DIR}/idl
${PROJECT_SOURCE_DIR}/src/GEOMAlgo
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
)
# libraries to link to
SET(_link_engine_LIBRARIES
- ${CAS_TKIGES}
+ ${OpenCASCADE_DataExchange_LIBRARIES}
${KERNEL_SALOMELocalTrace}
${KERNEL_OpUtil}
SalomeIDLGEOM
${QT_INCLUDE_DIRS}
${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${GUI_INCLUDE_DIRS}
${PROJECT_BINARY_DIR}/idl
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
${QT_DEFINITIONS}
)
SET(_link_LIBRARIES
GEOMObject
GEOMClient
- ${CAS_TKBRep}
+ ${OpenCASCADE_ModelingData_LIBRARIES}
${KERNEL_SALOMELocalTrace}
${GUI_SalomeApp}
)
${PTHREAD_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${GUI_INCLUDE_DIRS}
${PROJECT_BINARY_DIR}/idl
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
${QT_DEFINITIONS}
)
// function : OnGaps()
// purpose :
//=================================================================================
-void MeasureGUI_FastCheckIntersectionsDlg::OnGaps(bool cheked)
+void MeasureGUI_FastCheckIntersectionsDlg::OnGaps(bool checked)
{
clear();
- myTolerance->setEnabled(cheked);
+ myTolerance->setEnabled(checked);
}
//=================================================================================
// function : SelectionIntoArgument
${VTK_INCLUDE_DIRS}
${PTHREAD_INCLUDE_DIR}
${OMNIORB_INCLUDE_DIR}
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${GUI_INCLUDE_DIRS}
${PROJECT_BINARY_DIR}/idl
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
${QT_DEFINITIONS}
)
SET(_link_LIBRARIES
OCC2VTK
SalomeIDLGEOM
- ${CAS_TKBRep}
- ${CAS_TKOpenGl}
+ ${OpenCASCADE_ModelingData_LIBRARIES}
+ ${OpenCASCADE_Visualization_LIBRARIES}
${KERNEL_SALOMELocalTrace}
${GUI_SalomeObject}
${GUI_SVTK}
#include <Graphic3d_AspectLine3d.hxx>
#include <Graphic3d_AspectMarker3d.hxx>
#include <Graphic3d_AspectText3d.hxx>
+#include <Prs3d.hxx>
#include <Prs3d_Arrow.hxx>
#include <Prs3d_IsoAspect.hxx>
#include <Prs3d_ShadingAspect.hxx>
#include <SelectMgr_IndexedMapOfOwner.hxx>
#include <SelectMgr_Selection.hxx>
#include <StdPrs_ShadedShape.hxx>
+#include <StdPrs_ToolTriangulatedShape.hxx>
#include <StdSelect_BRepOwner.hxx>
#include <StdSelect_DisplayMode.hxx>
#include <TColStd_IndexedMapOfInteger.hxx>
bool isTopLev = isTopLevel() && switchTopLevel();
switch (aMode) {
case Wireframe:
+ // Begin 0023271: [CEA 1823] Deflection Coefficient not taken into account in wireframe
+ {
+ StdPrs_ToolTriangulatedShape::ClearOnOwnDeflectionChange (myshape, myDrawer, Standard_True);
+
+ // After this call if type of deflection is relative
+ // computed deflection coefficient is stored as absolute.
+ Prs3d::GetDeflection (myshape, myDrawer);
+ }
+ // End 0023271
case CustomHighlight:
{
if(isTopLev) {
# additional include directories
INCLUDE_DIRECTORIES(
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${VTK_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
)
# libraries to link to
SET(_link_LIBRARIES
vtkFiltersCore
- ${CAS_KERNEL}
- ${CAS_TKMesh} ${CAS_TKTopAlgo}
- ${CAS_MODELER}
+ ${OpenCASCADE_FoundationClasses_LIBRARIES}
+ ${OpenCASCADE_ModelingAlgorithms_LIBRARIES}
${KERNEL_SALOMELocalTrace}
GEOMUtils
)
${PTHREAD_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${GUI_INCLUDE_DIRS}
${PROJECT_BINARY_DIR}/idl
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
${QT_DEFINITIONS}
)
${PTHREAD_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${GUI_INCLUDE_DIRS}
${PROJECT_BINARY_DIR}/idl
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
${QT_DEFINITIONS}
)
${PTHREAD_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${GUI_INCLUDE_DIRS}
${PROJECT_BINARY_DIR}/idl
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
${QT_DEFINITIONS}
)
# additional include directories
INCLUDE_DIRECTORIES(
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${PTHREAD_INCLUDE_DIR}
)
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
)
# libraries to link to
SET(_link_LIBRARIES
- ${CAS_KERNEL}
- ${CAS_TKGeomAlgo} ${CAS_TKTopAlgo}
- ${CAS_TKBRep}
- ${CAS_TKG2d}
+ ${OpenCASCADE_FoundationClasses_LIBRARIES}
+ ${OpenCASCADE_ModelingAlgorithms_LIBRARIES}
+ ${OpenCASCADE_ModelingData_LIBRARIES}
${KERNEL_SALOMELocalTrace}
)
# additional include directories
INCLUDE_DIRECTORIES(
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${PROJECT_BINARY_DIR}/idl
${PROJECT_SOURCE_DIR}/src/GEOMAlgo
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
)
# libraries to link to
SET(_link_engine_LIBRARIES
- ${CAS_TKSTEP}
- ${CAS_TKSTEPBase}
+ ${OpenCASCADE_DataExchange_LIBRARIES}
${KERNEL_SALOMELocalTrace}
${KERNEL_OpUtil}
SalomeIDLGEOM
# additional include directories
INCLUDE_DIRECTORIES(
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${PROJECT_BINARY_DIR}/idl
${PROJECT_SOURCE_DIR}/src/GEOMAlgo
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
)
# libraries to link to
SET(_link_engine_LIBRARIES
- ${CAS_TKSTL}
+ ${OpenCASCADE_DataExchange_LIBRARIES}
${KERNEL_SALOMELocalTrace}
${KERNEL_OpUtil}
SalomeIDLGEOM
# additional include directories
INCLUDE_DIRECTORIES(
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}
)
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
)
# libraries to link to
SET(_link_LIBRARIES
- ${CAS_TKCAF} ${CAS_TKShHealing} ${CAS_TKBool}
+ ${OpenCASCADE_ApplicationFramework_LIBRARIES} ${OpenCASCADE_ModelingAlgorithms_LIBRARIES}
${KERNEL_SALOMELocalTrace}
)
# additional include directories
INCLUDE_DIRECTORIES(
- #${CAS_INCLUDE_DIRS}
${KERNEL_INCLUDE_DIRS}
${OPENCV_INCLUDE_DIR}
${QT_INCLUDES}
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- #${CAS_DEFINITIONS}
${QT_DEFINITIONS}
)
IF(NOT SALOME_GUI_BUILD_WITH_QT5)
// Author : Renaud NEDELEC, Open CASCADE S.A.S.
// OpenCV includes
-#include <cv.h>
-#include <highgui.h>
-#include <opencv2/imgproc/imgproc.hpp>
-#include <opencv2/highgui/highgui.hpp>
+// RNV: Workaround: HAVE_TBB definition from OCCT conflicts with OPENCV, undef it.
+// This workaround will be removed after correction of the
+// https://tracker.dev.opencascade.org/view.php?id=28457 issue.
+#ifdef HAVE_TBB
+ #undef HAVE_TBB
+ #include <cv.h>
+ #include <highgui.h>
+ #include <opencv2/imgproc/imgproc.hpp>
+ #include <opencv2/highgui/highgui.hpp>
+ #define HAVE_TBB
+#else
+ #include <cv.h>
+ #include <highgui.h>
+ #include <opencv2/imgproc/imgproc.hpp>
+ #include <opencv2/highgui/highgui.hpp>
+#endif
// Qt
#include <QRect>
${PTHREAD_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${GUI_INCLUDE_DIRS}
${PROJECT_BINARY_DIR}/idl
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
${QT_DEFINITIONS}
)
# additional include directories
INCLUDE_DIRECTORIES(
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${KERNEL_INCLUDE_DIRS}
${PROJECT_BINARY_DIR}/idl
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
)
# libraries to link to
SET(_link_engine_LIBRARIES
- ${CAS_TKVTK}
${KERNEL_SALOMELocalTrace}
${KERNEL_OpUtil}
SalomeIDLGEOM
INCLUDE_DIRECTORIES(
${PTHREAD_INCLUDE_DIR}
${LIBXML2_INCLUDE_DIR}
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
)
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
${LIBXML2_DEFINITIONS}
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
)
# libraries to link to
SET(_link_LIBRARIES
${PTHREAD_LIBRARIES}
${LIBXML2_LIBRARIES}
- ${CAS_TKBRep} ${CAS_TKTopAlgo} ${CAS_TKG2d}
+ ${OpenCASCADE_ModelingData_LIBRARIES}
+ ${OpenCASCADE_ModelingAlgorithms_LIBRARIES}
)
# --- headers ---
# additional include directories
INCLUDE_DIRECTORIES(
${PTHREAD_INCLUDE_DIR}
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${CPPUNIT_INCLUDE_DIRS}
)
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${CPPUNIT_DEFINITIONS}
)
# additional include directories
INCLUDE_DIRECTORIES(
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${PROJECT_BINARY_DIR}/idl
${PROJECT_SOURCE_DIR}/src/GEOMAlgo
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
)
# libraries to link to
SET(_link_engine_LIBRARIES
- ${CAS_TKXAO}
${KERNEL_SALOMELocalTrace}
${KERNEL_OpUtil}
SalomeIDLGEOM
INCLUDE_DIRECTORIES(
${PYTHON_INCLUDE_DIRS}
${PTHREAD_INCLUDE_DIR}
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${PROJECT_SOURCE_DIR}/src/XAO
)
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
${PYTHON_DEFINITIONS}
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
)
# libraries to link to