mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-03 14:10:33 +03:00
Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
32c19c4cd4 | ||
|
ed20837d8b | ||
|
2ab4e9e180 | ||
|
d83d72acf9 | ||
|
fae5678dc7 | ||
|
488c43ed0c |
13
.github/workflows/codemsvc.yml
vendored
13
.github/workflows/codemsvc.yml
vendored
@@ -56,14 +56,7 @@ jobs:
|
|||||||
# ignoredPaths: ${{ github.workspace }}/dependencies;${{ github.workspace }}/test
|
# ignoredPaths: ${{ github.workspace }}/dependencies;${{ github.workspace }}/test
|
||||||
|
|
||||||
# Upload SARIF file to GitHub Code Scanning Alerts
|
# Upload SARIF file to GitHub Code Scanning Alerts
|
||||||
#- name: Upload SARIF to GitHub
|
- name: Upload SARIF to GitHub
|
||||||
# uses: github/codeql-action/upload-sarif@v3.26.5
|
uses: github/codeql-action/upload-sarif@v3.26.5
|
||||||
# with:
|
|
||||||
# sarif_file: ${{ steps.run-analysis.outputs.sarif }}
|
|
||||||
|
|
||||||
# Upload SARIF file as an Artifact to download and view
|
|
||||||
- name: Upload SARIF as an Artifact
|
|
||||||
uses: actions/upload-artifact@v4.3.6
|
|
||||||
with:
|
with:
|
||||||
name: sarif-file
|
sarif_file: ${{ steps.run-analysis.outputs.sarif }}
|
||||||
path: ${{ steps.run-analysis.outputs.sarif }}
|
|
||||||
|
@@ -168,7 +168,7 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "[Cc][Ll][Aa][Nn][Gg]")
|
|||||||
set (CMAKE_CXX_FLAGS "-stdlib=libc++ ${CMAKE_CXX_FLAGS}")
|
set (CMAKE_CXX_FLAGS "-stdlib=libc++ ${CMAKE_CXX_FLAGS}")
|
||||||
endif()
|
endif()
|
||||||
# Optimize size of binaries
|
# Optimize size of binaries
|
||||||
set (CMAKE_SHARED_LINKER_FLAGS "-Wl,-s ${CMAKE_SHARED_LINKER_FLAGS}")
|
set (CMAKE_SHARED_LINKER_FLAGS_RELEASE "-Wl,-s ${CMAKE_SHARED_LINKER_FLAGS_RELEASE}")
|
||||||
elseif(MINGW)
|
elseif(MINGW)
|
||||||
add_definitions(-D_WIN32_WINNT=0x0601)
|
add_definitions(-D_WIN32_WINNT=0x0601)
|
||||||
# _WIN32_WINNT=0x0601 (use Windows 7 SDK)
|
# _WIN32_WINNT=0x0601 (use Windows 7 SDK)
|
||||||
|
@@ -479,8 +479,8 @@ if (BUILD_SHARED_LIBS OR EXECUTABLE_PROJECT)
|
|||||||
if(IS_VTK_9XX)
|
if(IS_VTK_9XX)
|
||||||
string (REGEX REPLACE "vtk" "VTK::" USED_TOOLKITS_BY_CURRENT_PROJECT "${USED_TOOLKITS_BY_CURRENT_PROJECT}")
|
string (REGEX REPLACE "vtk" "VTK::" USED_TOOLKITS_BY_CURRENT_PROJECT "${USED_TOOLKITS_BY_CURRENT_PROJECT}")
|
||||||
endif()
|
endif()
|
||||||
target_link_libraries (${PROJECT_NAME} ${USED_TOOLKITS_BY_CURRENT_PROJECT} ${USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT})
|
|
||||||
endif()
|
endif()
|
||||||
|
target_link_libraries (${PROJECT_NAME} ${USED_TOOLKITS_BY_CURRENT_PROJECT} ${USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT})
|
||||||
|
|
||||||
if (USE_QT)
|
if (USE_QT)
|
||||||
foreach (PROJECT_LIBRARY_DEBUG ${PROJECT_LIBRARIES_DEBUG})
|
foreach (PROJECT_LIBRARY_DEBUG ${PROJECT_LIBRARIES_DEBUG})
|
||||||
|
@@ -11,7 +11,7 @@ project (ImportExport)
|
|||||||
add_definitions (-DWINVER=0x0501 -DUNICODE -D_UNICODE)
|
add_definitions (-DWINVER=0x0501 -DUNICODE -D_UNICODE)
|
||||||
set (CMAKE_MFC_FLAG 2)
|
set (CMAKE_MFC_FLAG 2)
|
||||||
|
|
||||||
set (ImportExport_SRC_DIR ${MFC_STANDARD_SAMPLES_DIR}/05_ImportExport/src)
|
set (ImportExport_SRC_DIR ${MFC_STANDARD_SAMPLES_DIR}/03_ImportExport/src)
|
||||||
set (ImportExport_HEADER_FILES ${ImportExport_SRC_DIR}/ColoredShapes.h
|
set (ImportExport_HEADER_FILES ${ImportExport_SRC_DIR}/ColoredShapes.h
|
||||||
${ImportExport_SRC_DIR}/ImportExportApp.h
|
${ImportExport_SRC_DIR}/ImportExportApp.h
|
||||||
${ImportExport_SRC_DIR}/ImportExportDoc.h
|
${ImportExport_SRC_DIR}/ImportExportDoc.h
|
||||||
@@ -21,7 +21,7 @@ set (ImportExport_SOURCE_FILES ${ImportExport_SRC_DIR}/ColoredShapes.cpp
|
|||||||
${ImportExport_SRC_DIR}/ImportExportDoc.cpp
|
${ImportExport_SRC_DIR}/ImportExportDoc.cpp
|
||||||
${ImportExport_SRC_DIR}/StdAfx.cpp)
|
${ImportExport_SRC_DIR}/StdAfx.cpp)
|
||||||
|
|
||||||
set (ImportExport_RESOURCE_DIR ${MFC_STANDARD_SAMPLES_DIR}/05_ImportExport/res)
|
set (ImportExport_RESOURCE_DIR ${MFC_STANDARD_SAMPLES_DIR}/03_ImportExport/res)
|
||||||
set (ImportExport_RESOURCE_HEADER ${ImportExport_RESOURCE_DIR}/resource.h)
|
set (ImportExport_RESOURCE_HEADER ${ImportExport_RESOURCE_DIR}/resource.h)
|
||||||
set (ImportExport_RESOURCE_FILES ${ImportExport_RESOURCE_DIR}/Toolbar.bmp
|
set (ImportExport_RESOURCE_FILES ${ImportExport_RESOURCE_DIR}/Toolbar.bmp
|
||||||
${ImportExport_RESOURCE_DIR}/ImportExport.rc)
|
${ImportExport_RESOURCE_DIR}/ImportExport.rc)
|
||||||
@@ -55,7 +55,7 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
include_directories (${CMAKE_BINARY_DIR}/inc
|
include_directories (${CMAKE_BINARY_DIR}/inc
|
||||||
${MFC_STANDARD_SAMPLES_DIR}/05_ImportExport
|
${MFC_STANDARD_SAMPLES_DIR}/03_ImportExport
|
||||||
${ImportExport_SRC_DIR}
|
${ImportExport_SRC_DIR}
|
||||||
${MFC_STANDARD_SAMPLES_DIR}/Common)
|
${MFC_STANDARD_SAMPLES_DIR}/Common)
|
||||||
|
|
||||||
|
@@ -11,7 +11,7 @@ project (HLR)
|
|||||||
add_definitions(-DWINVER=0x0501 -DUNICODE -D_UNICODE)
|
add_definitions(-DWINVER=0x0501 -DUNICODE -D_UNICODE)
|
||||||
set (CMAKE_MFC_FLAG 2)
|
set (CMAKE_MFC_FLAG 2)
|
||||||
|
|
||||||
set (HLR_SRC_DIR ${MFC_STANDARD_SAMPLES_DIR}/08_HLR/src)
|
set (HLR_SRC_DIR ${MFC_STANDARD_SAMPLES_DIR}/04_HLR/src)
|
||||||
set (HLR_HEADER_FILES ${HLR_SRC_DIR}/HLRApp.h
|
set (HLR_HEADER_FILES ${HLR_SRC_DIR}/HLRApp.h
|
||||||
${HLR_SRC_DIR}/HLRDoc.h
|
${HLR_SRC_DIR}/HLRDoc.h
|
||||||
${HLR_SRC_DIR}/HLRView2D.h
|
${HLR_SRC_DIR}/HLRView2D.h
|
||||||
@@ -23,7 +23,7 @@ set (HLR_SOURCE_FILES ${HLR_SRC_DIR}/HLRApp.cpp
|
|||||||
${HLR_SRC_DIR}/SelectionDialog.cpp
|
${HLR_SRC_DIR}/SelectionDialog.cpp
|
||||||
${HLR_SRC_DIR}/StdAfx.cpp )
|
${HLR_SRC_DIR}/StdAfx.cpp )
|
||||||
|
|
||||||
set (HLR_RESOURCE_DIR ${MFC_STANDARD_SAMPLES_DIR}/08_HLR/res)
|
set (HLR_RESOURCE_DIR ${MFC_STANDARD_SAMPLES_DIR}/04_HLR/res)
|
||||||
set (HLR_RESOURCE_HEADER ${HLR_RESOURCE_DIR}/resource.h)
|
set (HLR_RESOURCE_HEADER ${HLR_RESOURCE_DIR}/resource.h)
|
||||||
set (HLR_RESOURCE_FILES ${HLR_RESOURCE_DIR}/axoviewd.bmp
|
set (HLR_RESOURCE_FILES ${HLR_RESOURCE_DIR}/axoviewd.bmp
|
||||||
${HLR_RESOURCE_DIR}/axoviewf.bmp
|
${HLR_RESOURCE_DIR}/axoviewf.bmp
|
||||||
|
@@ -82,7 +82,6 @@ set (COMMON_HEADER_FILES ${MFC_STANDARD_COMMON_SAMPLES_DIR}/AISDialogs.h
|
|||||||
${MFC_STANDARD_COMMON_SAMPLES_DIR}/OCC_StereoConfigDlg.h
|
${MFC_STANDARD_COMMON_SAMPLES_DIR}/OCC_StereoConfigDlg.h
|
||||||
${MFC_STANDARD_COMMON_SAMPLES_DIR}/ParamsFacesPage.h
|
${MFC_STANDARD_COMMON_SAMPLES_DIR}/ParamsFacesPage.h
|
||||||
${MFC_STANDARD_COMMON_SAMPLES_DIR}/ResultDialog.h
|
${MFC_STANDARD_COMMON_SAMPLES_DIR}/ResultDialog.h
|
||||||
${MFC_STANDARD_COMMON_SAMPLES_DIR}/User_Cylinder.hxx
|
|
||||||
${MFC_STANDARD_COMMON_SAMPLES_DIR}/ColoredMeshDlg.h
|
${MFC_STANDARD_COMMON_SAMPLES_DIR}/ColoredMeshDlg.h
|
||||||
${MFC_STANDARD_COMMON_SAMPLES_DIR}/DimensionDlg.h
|
${MFC_STANDARD_COMMON_SAMPLES_DIR}/DimensionDlg.h
|
||||||
${MFC_STANDARD_COMMON_SAMPLES_DIR}/LengthParamsEdgePage.h
|
${MFC_STANDARD_COMMON_SAMPLES_DIR}/LengthParamsEdgePage.h
|
||||||
|
@@ -264,12 +264,12 @@ static Standard_Boolean KPartCircle
|
|||||||
}
|
}
|
||||||
else if (AHC->GetType() == GeomAbs_Circle)
|
else if (AHC->GetType() == GeomAbs_Circle)
|
||||||
{
|
{
|
||||||
if (E.Orientation() == TopAbs_FORWARD)
|
// Reverse the offset function when the edge is FORWARD and CLOSED
|
||||||
anOffset *= -1;
|
if (E.Orientation() == TopAbs_FORWARD && BRep_Tool::IsClosed(E))
|
||||||
if (!BRep_Tool::IsClosed(E))
|
|
||||||
{
|
{
|
||||||
anOffset *= -1;
|
anOffset *= -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
gp_Circ2d theCirc = AHC->Circle();
|
gp_Circ2d theCirc = AHC->Circle();
|
||||||
if (anOffset > 0. || Abs(anOffset) < theCirc.Radius())
|
if (anOffset > 0. || Abs(anOffset) < theCirc.Radius())
|
||||||
OC = new Geom2d_Circle (theCirc.Position(), theCirc.Radius() + anOffset);
|
OC = new Geom2d_Circle (theCirc.Position(), theCirc.Radius() + anOffset);
|
||||||
|
@@ -562,40 +562,54 @@ void StdSelect_BRepSelectionTool::GetEdgeSensitive (const TopoDS_Shape& theShape
|
|||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : getCylinderCircles
|
//function : getCylinderHeight
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
static NCollection_Array1<gp_Circ> getCylinderCircles (const TopoDS_Face& theHollowCylinder, Standard_Size& theNumCircles)
|
static Standard_Real getCylinderHeight (const Handle(Poly_Triangulation)& theTriangulation,
|
||||||
|
const TopLoc_Location& theLoc)
|
||||||
{
|
{
|
||||||
NCollection_Array1<gp_Circ> aCircles (1, 2);
|
Bnd_Box aBox;
|
||||||
theNumCircles = 0;
|
gp_Trsf aScaleTrsf;
|
||||||
Standard_Integer aLinesNb = 0;
|
aScaleTrsf.SetScaleFactor (theLoc.Transformation().ScaleFactor());
|
||||||
|
theTriangulation->MinMax (aBox, aScaleTrsf);
|
||||||
|
return aBox.CornerMax().Z() - aBox.CornerMin().Z();
|
||||||
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : isCylinderOrCone
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
static Standard_Boolean isCylinderOrCone (const TopoDS_Face& theHollowCylinder, const gp_Pnt& theLocation, gp_Dir& theDirection)
|
||||||
|
{
|
||||||
|
Standard_Integer aCirclesNb = 0;
|
||||||
|
Standard_Boolean isCylinder = Standard_False;
|
||||||
|
gp_Pnt aPos;
|
||||||
|
|
||||||
TopExp_Explorer anEdgeExp;
|
TopExp_Explorer anEdgeExp;
|
||||||
for (anEdgeExp.Init (theHollowCylinder, TopAbs_EDGE); anEdgeExp.More(); anEdgeExp.Next())
|
for (anEdgeExp.Init (theHollowCylinder, TopAbs_EDGE); anEdgeExp.More(); anEdgeExp.Next())
|
||||||
{
|
{
|
||||||
const TopoDS_Edge& anEdge = TopoDS::Edge (anEdgeExp.Current());
|
const TopoDS_Edge& anEdge = TopoDS::Edge (anEdgeExp.Current());
|
||||||
BRepAdaptor_Curve anAdaptor (anEdge);
|
BRepAdaptor_Curve anAdaptor (anEdge);
|
||||||
aLinesNb++;
|
|
||||||
|
|
||||||
if (anAdaptor.GetType() == GeomAbs_Circle
|
if (anAdaptor.GetType() == GeomAbs_Circle
|
||||||
&& BRep_Tool::IsClosed (anEdge))
|
&& BRep_Tool::IsClosed (anEdge))
|
||||||
{
|
{
|
||||||
theNumCircles++;
|
aCirclesNb++;
|
||||||
aCircles[theNumCircles] = anAdaptor.Circle();
|
isCylinder = Standard_True;
|
||||||
}
|
if (aCirclesNb == 2)
|
||||||
else if (anAdaptor.GetType() != GeomAbs_Line || aLinesNb > 4)
|
{
|
||||||
{
|
// Reverse the direction of the cylinder, relevant if the cylinder was created as a prism
|
||||||
theNumCircles = 0;
|
if (aPos.IsEqual (theLocation, Precision::Confusion()))
|
||||||
return NCollection_Array1<gp_Circ>();
|
{
|
||||||
}
|
theDirection.Reverse();
|
||||||
if (theNumCircles == 2)
|
}
|
||||||
{
|
return Standard_True;
|
||||||
break;
|
}
|
||||||
|
aPos = anAdaptor.Circle().Location().XYZ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return aCircles;
|
return isCylinder;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@@ -644,33 +658,29 @@ Standard_Boolean StdSelect_BRepSelectionTool::GetSensitiveForFace (const TopoDS_
|
|||||||
}
|
}
|
||||||
else if (Handle(Geom_ConicalSurface) aGeomCone = Handle(Geom_ConicalSurface)::DownCast (aSurf))
|
else if (Handle(Geom_ConicalSurface) aGeomCone = Handle(Geom_ConicalSurface)::DownCast (aSurf))
|
||||||
{
|
{
|
||||||
Standard_Size aNumCircles;
|
gp_Dir aDummyDir;
|
||||||
NCollection_Array1<gp_Circ> aCircles = getCylinderCircles (theFace, aNumCircles);
|
if (isCylinderOrCone (theFace, gp_Pnt(), aDummyDir))
|
||||||
if (aNumCircles > 0 && aNumCircles < 3)
|
|
||||||
{
|
{
|
||||||
const gp_Cone aCone = BRepAdaptor_Surface (theFace).Cone();
|
const gp_Cone aCone = BRepAdaptor_Surface (theFace).Cone();
|
||||||
|
const Standard_Real aRad1 = aCone.RefRadius();
|
||||||
|
const Standard_Real aHeight = getCylinderHeight (aTriangulation, aLoc);
|
||||||
|
|
||||||
gp_Trsf aTrsf;
|
gp_Trsf aTrsf;
|
||||||
Standard_Real aRad1;
|
aTrsf.SetTransformation (aCone.Position(), gp::XOY());
|
||||||
|
|
||||||
Standard_Real aRad2;
|
Standard_Real aRad2;
|
||||||
Standard_Real aHeight;
|
if (aRad1 == 0.0)
|
||||||
if (aNumCircles == 1)
|
|
||||||
{
|
{
|
||||||
aRad1 = 0.0;
|
aRad2 = Tan (aCone.SemiAngle()) * aHeight;
|
||||||
aRad2 = aCircles.First().Radius();
|
|
||||||
aHeight = aRad2 * Tan (aCone.SemiAngle());
|
|
||||||
aTrsf.SetTransformation (aCone.Position(), gp::XOY());
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
aRad1 = aCircles.First().Radius();
|
const Standard_Real aTriangleHeight = (aCone.SemiAngle() > 0.0)
|
||||||
aRad2 = aCircles.Last().Radius();
|
? aRad1 / Tan (aCone.SemiAngle())
|
||||||
aHeight = aCircles.First().Location().Distance (aCircles.Last().Location());
|
: aRad1 / Tan (Abs (aCone.SemiAngle())) - aHeight;
|
||||||
|
aRad2 = (aCone.SemiAngle() > 0.0)
|
||||||
const gp_Pnt aPos = aCircles.First().Location();
|
? aRad1 * (aTriangleHeight + aHeight) / aTriangleHeight
|
||||||
const gp_Dir aDirection (aCircles.Last().Location().XYZ() - aPos.XYZ());
|
: aRad1 * aTriangleHeight / (aTriangleHeight + aHeight);
|
||||||
|
|
||||||
aTrsf.SetTransformation (gp_Ax3(aPos, aDirection), gp::XOY());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Handle(Select3D_SensitiveCylinder) aSensSCyl = new Select3D_SensitiveCylinder (theOwner, aRad1, aRad2, aHeight, aTrsf, true);
|
Handle(Select3D_SensitiveCylinder) aSensSCyl = new Select3D_SensitiveCylinder (theOwner, aRad1, aRad2, aHeight, aTrsf, true);
|
||||||
@@ -680,19 +690,18 @@ Standard_Boolean StdSelect_BRepSelectionTool::GetSensitiveForFace (const TopoDS_
|
|||||||
}
|
}
|
||||||
else if (Handle(Geom_CylindricalSurface) aGeomCyl = Handle(Geom_CylindricalSurface)::DownCast (aSurf))
|
else if (Handle(Geom_CylindricalSurface) aGeomCyl = Handle(Geom_CylindricalSurface)::DownCast (aSurf))
|
||||||
{
|
{
|
||||||
Standard_Size aNumCircles;
|
const gp_Cylinder aCyl = BRepAdaptor_Surface (theFace).Cylinder();
|
||||||
NCollection_Array1<gp_Circ> aCircles = getCylinderCircles (theFace, aNumCircles);
|
gp_Ax3 aPos = aCyl.Position();
|
||||||
if (aNumCircles == 2)
|
gp_Dir aDirection = aPos.Direction();
|
||||||
{
|
|
||||||
const gp_Cylinder aCyl = BRepAdaptor_Surface (theFace).Cylinder();
|
|
||||||
|
|
||||||
|
if (isCylinderOrCone (theFace, aPos.Location(), aDirection))
|
||||||
|
{
|
||||||
const Standard_Real aRad = aCyl.Radius();
|
const Standard_Real aRad = aCyl.Radius();
|
||||||
const gp_Pnt aPos = aCircles.First().Location();
|
const Standard_Real aHeight = getCylinderHeight (aTriangulation, aLoc);
|
||||||
const gp_Dir aDirection (aCircles.Last().Location().XYZ() - aPos.XYZ());
|
|
||||||
const Standard_Real aHeight = aPos.Distance (aCircles.Last().Location());
|
|
||||||
|
|
||||||
gp_Trsf aTrsf;
|
gp_Trsf aTrsf;
|
||||||
aTrsf.SetTransformation (gp_Ax3 (aPos, aDirection), gp::XOY());
|
aPos.SetDirection (aDirection);
|
||||||
|
aTrsf.SetTransformation (aPos, gp::XOY());
|
||||||
|
|
||||||
Handle(Select3D_SensitiveCylinder) aSensSCyl = new Select3D_SensitiveCylinder (theOwner, aRad, aRad, aHeight, aTrsf, true);
|
Handle(Select3D_SensitiveCylinder) aSensSCyl = new Select3D_SensitiveCylinder (theOwner, aRad, aRad, aHeight, aTrsf, true);
|
||||||
theSensitiveList.Append (aSensSCyl);
|
theSensitiveList.Append (aSensSCyl);
|
||||||
|
@@ -134,9 +134,6 @@ void TopoDSToStep_MakeStepEdge::Init(const TopoDS_Edge& aEdge,
|
|||||||
if ( count < 2 ) isSeam = Standard_False;
|
if ( count < 2 ) isSeam = Standard_False;
|
||||||
}
|
}
|
||||||
|
|
||||||
BRepAdaptor_Curve CA = BRepAdaptor_Curve(aEdge);
|
|
||||||
BRepAdaptor_Surface SA = BRepAdaptor_Surface(aTool.CurrentFace());
|
|
||||||
|
|
||||||
if (aEdge.Orientation() == TopAbs_INTERNAL ||
|
if (aEdge.Orientation() == TopAbs_INTERNAL ||
|
||||||
aEdge.Orientation() == TopAbs_EXTERNAL ) {
|
aEdge.Orientation() == TopAbs_EXTERNAL ) {
|
||||||
Handle(TransferBRep_ShapeMapper) errShape =
|
Handle(TransferBRep_ShapeMapper) errShape =
|
||||||
@@ -184,7 +181,7 @@ void TopoDSToStep_MakeStepEdge::Init(const TopoDS_Edge& aEdge,
|
|||||||
// ---------------------------------------
|
// ---------------------------------------
|
||||||
// Translate 3D representation of the Edge
|
// Translate 3D representation of the Edge
|
||||||
// ---------------------------------------
|
// ---------------------------------------
|
||||||
|
BRepAdaptor_Curve CA = BRepAdaptor_Curve(aEdge);
|
||||||
Handle(StepGeom_Curve) Gpms;
|
Handle(StepGeom_Curve) Gpms;
|
||||||
Handle(Geom_Curve) C = CA.Curve().Curve();
|
Handle(Geom_Curve) C = CA.Curve().Curve();
|
||||||
|
|
||||||
@@ -262,6 +259,8 @@ void TopoDSToStep_MakeStepEdge::Init(const TopoDS_Edge& aEdge,
|
|||||||
#ifdef OCCT_DEBUG
|
#ifdef OCCT_DEBUG
|
||||||
std::cout << "Warning: TopoDSToStep_MakeStepEdge: edge without 3d curve; creating..." << std::endl;
|
std::cout << "Warning: TopoDSToStep_MakeStepEdge: edge without 3d curve; creating..." << std::endl;
|
||||||
#endif
|
#endif
|
||||||
|
BRepAdaptor_Surface SA = BRepAdaptor_Surface(aTool.CurrentFace());
|
||||||
|
|
||||||
if ((SA.GetType() == GeomAbs_Plane) &&
|
if ((SA.GetType() == GeomAbs_Plane) &&
|
||||||
(CA.GetType() == GeomAbs_Line)) {
|
(CA.GetType() == GeomAbs_Line)) {
|
||||||
U1 = CA.FirstParameter();
|
U1 = CA.FirstParameter();
|
||||||
|
@@ -23,7 +23,7 @@ vori result
|
|||||||
|
|
||||||
fit
|
fit
|
||||||
|
|
||||||
checkprops result -l 613.39
|
checkprops result -l 644.509
|
||||||
checkshape result
|
checkshape result
|
||||||
checksection result
|
checksection result
|
||||||
|
|
||||||
|
@@ -23,7 +23,7 @@ vori result
|
|||||||
|
|
||||||
fit
|
fit
|
||||||
|
|
||||||
checkprops result -l 354.958
|
checkprops result -l 386.077
|
||||||
checkshape result
|
checkshape result
|
||||||
checksection result
|
checksection result
|
||||||
|
|
||||||
|
39
tests/bugs/modalg_8/bug33759
Normal file
39
tests/bugs/modalg_8/bug33759
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
puts "==========================================================="
|
||||||
|
puts "0033759: Modeling Algorithms - Offset is in wrong direction"
|
||||||
|
puts "==========================================================="
|
||||||
|
puts ""
|
||||||
|
|
||||||
|
pload MODELING
|
||||||
|
circle c1 0 0 0 30
|
||||||
|
|
||||||
|
# make and check FORWARD, NOT CLOSED edge
|
||||||
|
mkedge e1 c1 1.5*pi 0
|
||||||
|
wire w1 e1
|
||||||
|
plane pln1 0 0 0 0 0 1 1 0 0
|
||||||
|
mkface f1 pln1 w1
|
||||||
|
openoffset of1 f1 1 7
|
||||||
|
checkprops of1_1 -l 58.1195
|
||||||
|
|
||||||
|
# make and check REVERSED, NOT CLOSED edge
|
||||||
|
complement e1
|
||||||
|
wire w1 e1
|
||||||
|
plane pln1 0 0 0 0 0 1 1 0 0
|
||||||
|
mkface f1 pln1 w1
|
||||||
|
openoffset of1 f1 1 7
|
||||||
|
checkprops of1_1 -l 58.1195
|
||||||
|
|
||||||
|
# make and check FORWARD CLOSED edge
|
||||||
|
mkedge e1 c1 0 0
|
||||||
|
wire w1 e1
|
||||||
|
plane pln1 0 0 0 0 0 1 1 0 0
|
||||||
|
mkface f1 pln1 w1
|
||||||
|
openoffset of1 f1 1 7
|
||||||
|
checkprops of1_1 -l 232.478
|
||||||
|
|
||||||
|
# make and check REVERSED CLOSED edge
|
||||||
|
complement e1
|
||||||
|
wire w1 e1
|
||||||
|
plane pln1 0 0 0 0 0 1 1 0 0
|
||||||
|
mkface f1 pln1 w1
|
||||||
|
openoffset of1 f1 1 7
|
||||||
|
checkprops of1_1 -l 232.478
|
@@ -1,21 +0,0 @@
|
|||||||
puts "============"
|
|
||||||
puts "0033664: Visualization - Selection does not work for simple shape"
|
|
||||||
puts "============"
|
|
||||||
puts ""
|
|
||||||
|
|
||||||
pload MODELING VISUALIZATION
|
|
||||||
vclear
|
|
||||||
vinit View1
|
|
||||||
|
|
||||||
restore [locate_data_file cylinder_surface.brep] b
|
|
||||||
vdisplay -dispMode 1 b
|
|
||||||
vfit
|
|
||||||
vsensdis
|
|
||||||
|
|
||||||
vselect 200 200
|
|
||||||
if {[vnbselected] != "1"} {
|
|
||||||
puts "ERROR: wrong sensitive area"
|
|
||||||
}
|
|
||||||
|
|
||||||
vselect 0 0
|
|
||||||
vdump $::imagedir/${::casename}_cylinder.png
|
|
@@ -1,36 +0,0 @@
|
|||||||
puts "============"
|
|
||||||
puts "0033664: Visualization - Selection does not work for simple shape"
|
|
||||||
puts "============"
|
|
||||||
puts ""
|
|
||||||
|
|
||||||
pload MODELING VISUALIZATION
|
|
||||||
vclear
|
|
||||||
vinit View1
|
|
||||||
|
|
||||||
pcone c1 50 100 100
|
|
||||||
ttranslate c1 100 0 100
|
|
||||||
explode c1
|
|
||||||
explode c1_1
|
|
||||||
|
|
||||||
pcone c2 100 50 100
|
|
||||||
ttranslate c2 -100 0 100
|
|
||||||
explode c2
|
|
||||||
explode c2_1
|
|
||||||
|
|
||||||
pcone c3 0 100 100
|
|
||||||
ttranslate c3 100 0 -100
|
|
||||||
explode c3
|
|
||||||
explode c3_1
|
|
||||||
|
|
||||||
pcone c4 100 0 100
|
|
||||||
ttranslate c4 -100 0 -100
|
|
||||||
explode c4
|
|
||||||
explode c4_1
|
|
||||||
|
|
||||||
vdisplay c1_1_1 c2_1_1 c3_1_1 c4_1_1 -dispmode 1
|
|
||||||
vsensdis
|
|
||||||
|
|
||||||
vfront
|
|
||||||
vfit
|
|
||||||
|
|
||||||
vdump $::imagedir/${::casename}_cone.png
|
|
Reference in New Issue
Block a user