mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-19 13:40:49 +03:00
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
c88a9e8472 | ||
|
14a58b6472 | ||
|
585659c9ed | ||
|
2ac2591bca |
@@ -25,9 +25,6 @@ if (NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
# suppress C26812 on VS2019/C++20 (prefer 'enum class' over 'enum')
|
|
||||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /fp:precise /wd\"26812\"")
|
|
||||||
# suppress warning on using portable non-secure functions in favor of non-portable secure ones
|
|
||||||
add_definitions (-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE)
|
add_definitions (-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE)
|
||||||
else()
|
else()
|
||||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions -fPIC")
|
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions -fPIC")
|
||||||
|
@@ -255,8 +255,7 @@ else()
|
|||||||
EXPORT OpenCASCADE${CURRENT_MODULE}Targets
|
EXPORT OpenCASCADE${CURRENT_MODULE}Targets
|
||||||
RUNTIME DESTINATION "${INSTALL_DIR_BIN}\${OCCT_INSTALL_BIN_LETTER}"
|
RUNTIME DESTINATION "${INSTALL_DIR_BIN}\${OCCT_INSTALL_BIN_LETTER}"
|
||||||
ARCHIVE DESTINATION "${INSTALL_DIR_LIB}\${OCCT_INSTALL_BIN_LETTER}"
|
ARCHIVE DESTINATION "${INSTALL_DIR_LIB}\${OCCT_INSTALL_BIN_LETTER}"
|
||||||
LIBRARY DESTINATION "${INSTALL_DIR_LIB}\${OCCT_INSTALL_BIN_LETTER}"
|
LIBRARY DESTINATION "${INSTALL_DIR_LIB}\${OCCT_INSTALL_BIN_LETTER}")
|
||||||
INCLUDES DESTINATION ${INSTALL_DIR_INCLUDE})
|
|
||||||
|
|
||||||
if (NOT WIN32)
|
if (NOT WIN32)
|
||||||
if (BUILD_SHARED_LIBS AND NOT "${BUILD_SHARED_LIBRARY_NAME_POSTFIX}" STREQUAL "")
|
if (BUILD_SHARED_LIBS AND NOT "${BUILD_SHARED_LIBRARY_NAME_POSTFIX}" STREQUAL "")
|
||||||
|
@@ -100,7 +100,7 @@
|
|||||||
<ProgramDataBaseFileName>.\..\..\..\win32\__VCVER__\obj\__TKNAM__/</ProgramDataBaseFileName>
|
<ProgramDataBaseFileName>.\..\..\..\win32\__VCVER__\obj\__TKNAM__/</ProgramDataBaseFileName>
|
||||||
<WarningLevel>Level4</WarningLevel>
|
<WarningLevel>Level4</WarningLevel>
|
||||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
<DisableSpecificWarnings>26812</DisableSpecificWarnings>
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
<FloatingPointModel>Precise</FloatingPointModel>
|
<FloatingPointModel>Precise</FloatingPointModel>
|
||||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||||
__VCMPL32__
|
__VCMPL32__
|
||||||
@@ -148,7 +148,7 @@
|
|||||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
<CompileAs>Default</CompileAs>
|
<CompileAs>Default</CompileAs>
|
||||||
<DisableSpecificWarnings>26812</DisableSpecificWarnings>
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
<FloatingPointModel>Precise</FloatingPointModel>
|
<FloatingPointModel>Precise</FloatingPointModel>
|
||||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||||
@@ -196,7 +196,7 @@
|
|||||||
<ProgramDataBaseFileName>.\..\..\..\win64\__VCVER__\obj\__TKNAM__/</ProgramDataBaseFileName>
|
<ProgramDataBaseFileName>.\..\..\..\win64\__VCVER__\obj\__TKNAM__/</ProgramDataBaseFileName>
|
||||||
<WarningLevel>Level4</WarningLevel>
|
<WarningLevel>Level4</WarningLevel>
|
||||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
<DisableSpecificWarnings>26812</DisableSpecificWarnings>
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
<FloatingPointModel>Precise</FloatingPointModel>
|
<FloatingPointModel>Precise</FloatingPointModel>
|
||||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||||
__VCMPL64__
|
__VCMPL64__
|
||||||
@@ -244,7 +244,7 @@
|
|||||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
<CompileAs>Default</CompileAs>
|
<CompileAs>Default</CompileAs>
|
||||||
<DisableSpecificWarnings>26812</DisableSpecificWarnings>
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
<FloatingPointModel>Precise</FloatingPointModel>
|
<FloatingPointModel>Precise</FloatingPointModel>
|
||||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||||
|
@@ -95,7 +95,7 @@
|
|||||||
<ProgramDataBaseFileName>.\..\..\..\win32\__VCVER__\obj\__XQTNAM__/</ProgramDataBaseFileName>
|
<ProgramDataBaseFileName>.\..\..\..\win32\__VCVER__\obj\__XQTNAM__/</ProgramDataBaseFileName>
|
||||||
<WarningLevel>Level4</WarningLevel>
|
<WarningLevel>Level4</WarningLevel>
|
||||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
<DisableSpecificWarnings>26812</DisableSpecificWarnings>
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
<FloatingPointModel>Precise</FloatingPointModel>__VCMPL32__
|
<FloatingPointModel>Precise</FloatingPointModel>__VCMPL32__
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ResourceCompile>
|
<ResourceCompile>
|
||||||
@@ -140,7 +140,7 @@
|
|||||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
<CompileAs>Default</CompileAs>
|
<CompileAs>Default</CompileAs>
|
||||||
<DisableSpecificWarnings>26812</DisableSpecificWarnings>
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
<FloatingPointModel>Precise</FloatingPointModel>__VCMPL32__
|
<FloatingPointModel>Precise</FloatingPointModel>__VCMPL32__
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
@@ -185,7 +185,7 @@
|
|||||||
<ProgramDataBaseFileName>.\..\..\..\win64\__VCVER__\obj\__XQTNAM__/</ProgramDataBaseFileName>
|
<ProgramDataBaseFileName>.\..\..\..\win64\__VCVER__\obj\__XQTNAM__/</ProgramDataBaseFileName>
|
||||||
<WarningLevel>Level4</WarningLevel>
|
<WarningLevel>Level4</WarningLevel>
|
||||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
<DisableSpecificWarnings>26812</DisableSpecificWarnings>
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
<FloatingPointModel>Precise</FloatingPointModel>__VCMPL64__
|
<FloatingPointModel>Precise</FloatingPointModel>__VCMPL64__
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ResourceCompile>
|
<ResourceCompile>
|
||||||
@@ -229,7 +229,7 @@
|
|||||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
<CompileAs>Default</CompileAs>
|
<CompileAs>Default</CompileAs>
|
||||||
<DisableSpecificWarnings>26812</DisableSpecificWarnings>
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
<FloatingPointModel>Precise</FloatingPointModel>__VCMPL64__
|
<FloatingPointModel>Precise</FloatingPointModel>__VCMPL64__
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
@@ -2333,8 +2333,3 @@ Applications extending OCCT 3D Viewer and calling OpenGL functions directly (lik
|
|||||||
This header, as well as `OpenGl_GlCore20.hxx` and similar, no more include system OpenGL / OpenGL ES headers to define function table.
|
This header, as well as `OpenGl_GlCore20.hxx` and similar, no more include system OpenGL / OpenGL ES headers to define function table.
|
||||||
Application code calling OpenGL functions directly should be changed to either use `OpenGl_Context::core11fwd` (as designed)
|
Application code calling OpenGL functions directly should be changed to either use `OpenGl_Context::core11fwd` (as designed)
|
||||||
or to include system OpenGL headers in advance (with help of `OpenGl_GlNative.hxx`).
|
or to include system OpenGL headers in advance (with help of `OpenGl_GlNative.hxx`).
|
||||||
|
|
||||||
@subsection upgrade_occt770_tooltriangulatedshape StdPrs_ToolTriangulatedShape
|
|
||||||
|
|
||||||
Method `StdPrs_ToolTriangulatedShape::Normal()` has been removed.
|
|
||||||
Please use `BRepLib_ToolTriangulatedShape::ComputeNormals()` to fill in normal attributes in triangulation and fetch them directly using `Poly_Triangulation::Normal()`.
|
|
||||||
|
@@ -25,7 +25,6 @@
|
|||||||
#include <AIS_InteractiveObject.hxx>
|
#include <AIS_InteractiveObject.hxx>
|
||||||
#include <Geom2d_TrimmedCurve.hxx>
|
#include <Geom2d_TrimmedCurve.hxx>
|
||||||
#include <Graphic3d_ArrayOfPolylines.hxx>
|
#include <Graphic3d_ArrayOfPolylines.hxx>
|
||||||
#include <Graphic3d_AspectLine3d.hxx>
|
|
||||||
#include <TopoDS_Face.hxx>
|
#include <TopoDS_Face.hxx>
|
||||||
#include <TColGeom_SequenceOfCurve.hxx>
|
#include <TColGeom_SequenceOfCurve.hxx>
|
||||||
|
|
||||||
|
@@ -24,7 +24,6 @@
|
|||||||
|
|
||||||
#include <AIS_InteractiveObject.hxx>
|
#include <AIS_InteractiveObject.hxx>
|
||||||
#include <Graphic3d_ArrayOfPoints.hxx>
|
#include <Graphic3d_ArrayOfPoints.hxx>
|
||||||
#include <Graphic3d_AspectMarker3d.hxx>
|
|
||||||
|
|
||||||
//! AIS AIS interactive object for sample 2D marker
|
//! AIS AIS interactive object for sample 2D marker
|
||||||
class Sample2D_Markers : public AIS_InteractiveObject
|
class Sample2D_Markers : public AIS_InteractiveObject
|
||||||
|
@@ -17,8 +17,6 @@
|
|||||||
#define _AIS_LightSource_HeaderFile
|
#define _AIS_LightSource_HeaderFile
|
||||||
|
|
||||||
#include <AIS_InteractiveObject.hxx>
|
#include <AIS_InteractiveObject.hxx>
|
||||||
#include <Graphic3d_AspectLine3d.hxx>
|
|
||||||
#include <Graphic3d_AspectMarker3d.hxx>
|
|
||||||
#include <SelectMgr_EntityOwner.hxx>
|
#include <SelectMgr_EntityOwner.hxx>
|
||||||
|
|
||||||
class Select3D_SensitiveSphere;
|
class Select3D_SensitiveSphere;
|
||||||
|
@@ -34,8 +34,6 @@ enum AIS_MouseGesture
|
|||||||
AIS_MouseGesture_Pan, //!< view panning gesture
|
AIS_MouseGesture_Pan, //!< view panning gesture
|
||||||
AIS_MouseGesture_RotateOrbit, //!< orbit rotation gesture
|
AIS_MouseGesture_RotateOrbit, //!< orbit rotation gesture
|
||||||
AIS_MouseGesture_RotateView, //!< view rotation gesture
|
AIS_MouseGesture_RotateView, //!< view rotation gesture
|
||||||
AIS_MouseGesture_Drag, //!< object dragging;
|
|
||||||
//! press button to start, move mouse to define rectangle, release to finish
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//! Map defining mouse gestures.
|
//! Map defining mouse gestures.
|
||||||
|
@@ -18,7 +18,6 @@
|
|||||||
|
|
||||||
#include <AIS_Shape.hxx>
|
#include <AIS_Shape.hxx>
|
||||||
#include <gp_Pnt2d.hxx>
|
#include <gp_Pnt2d.hxx>
|
||||||
#include <Graphic3d_NameOfTexture2D.hxx>
|
|
||||||
#include <Image_PixMap.hxx>
|
#include <Image_PixMap.hxx>
|
||||||
#include <Standard_Type.hxx>
|
#include <Standard_Type.hxx>
|
||||||
#include <TCollection_AsciiString.hxx>
|
#include <TCollection_AsciiString.hxx>
|
||||||
|
@@ -92,7 +92,6 @@ AIS_ViewController::AIS_ViewController()
|
|||||||
myTouchPanThresholdPx (4.0f),
|
myTouchPanThresholdPx (4.0f),
|
||||||
myTouchZoomThresholdPx (6.0f),
|
myTouchZoomThresholdPx (6.0f),
|
||||||
myTouchZoomRatio (0.13f),
|
myTouchZoomRatio (0.13f),
|
||||||
myTouchDraggingThresholdPx (6.0f),
|
|
||||||
//
|
//
|
||||||
myNbTouchesLast (0),
|
myNbTouchesLast (0),
|
||||||
myUpdateStartPointPan (true),
|
myUpdateStartPointPan (true),
|
||||||
@@ -117,37 +116,22 @@ AIS_ViewController::AIS_ViewController()
|
|||||||
myRubberBand->SetDisplayMode (0);
|
myRubberBand->SetDisplayMode (0);
|
||||||
myRubberBand->SetMutable (true);
|
myRubberBand->SetMutable (true);
|
||||||
|
|
||||||
myMouseGestureMap.Bind ((Standard_UInteger )Aspect_VKeyMouse_LeftButton,
|
myMouseGestureMap.Bind (Aspect_VKeyMouse_LeftButton, AIS_MouseGesture_RotateOrbit);
|
||||||
AIS_MouseGesture_RotateOrbit);
|
myMouseGestureMap.Bind (Aspect_VKeyMouse_LeftButton | Aspect_VKeyFlags_CTRL, AIS_MouseGesture_Zoom);
|
||||||
myMouseGestureMap.Bind ((Standard_UInteger )Aspect_VKeyMouse_LeftButton | (Standard_UInteger )Aspect_VKeyFlags_CTRL,
|
myMouseGestureMap.Bind (Aspect_VKeyMouse_LeftButton | Aspect_VKeyFlags_SHIFT, AIS_MouseGesture_Pan);
|
||||||
AIS_MouseGesture_Zoom);
|
myMouseGestureMap.Bind (Aspect_VKeyMouse_LeftButton | Aspect_VKeyFlags_ALT, AIS_MouseGesture_SelectRectangle);
|
||||||
myMouseGestureMap.Bind ((Standard_UInteger )Aspect_VKeyMouse_LeftButton | (Standard_UInteger )Aspect_VKeyFlags_SHIFT,
|
myMouseGestureMap.Bind (Aspect_VKeyMouse_LeftButton | Aspect_VKeyFlags_ALT | Aspect_VKeyFlags_SHIFT, AIS_MouseGesture_SelectRectangle);
|
||||||
AIS_MouseGesture_Pan);
|
|
||||||
myMouseGestureMap.Bind ((Standard_UInteger )Aspect_VKeyMouse_LeftButton | (Standard_UInteger )Aspect_VKeyFlags_ALT,
|
|
||||||
AIS_MouseGesture_SelectRectangle);
|
|
||||||
myMouseGestureMap.Bind ((Standard_UInteger )Aspect_VKeyMouse_LeftButton | (Standard_UInteger )Aspect_VKeyFlags_ALT | (Standard_UInteger )Aspect_VKeyFlags_SHIFT,
|
|
||||||
AIS_MouseGesture_SelectRectangle);
|
|
||||||
|
|
||||||
myMouseSelectionSchemes.Bind ((Standard_UInteger )Aspect_VKeyMouse_LeftButton,
|
myMouseSelectionSchemes.Bind (Aspect_VKeyMouse_LeftButton, AIS_SelectionScheme_Replace);
|
||||||
AIS_SelectionScheme_Replace);
|
myMouseSelectionSchemes.Bind (Aspect_VKeyMouse_LeftButton | Aspect_VKeyFlags_ALT, AIS_SelectionScheme_Replace);
|
||||||
myMouseSelectionSchemes.Bind ((Standard_UInteger )Aspect_VKeyMouse_LeftButton | (Standard_UInteger )Aspect_VKeyFlags_ALT,
|
myMouseSelectionSchemes.Bind (Aspect_VKeyMouse_LeftButton | Aspect_VKeyFlags_SHIFT, AIS_SelectionScheme_XOR);
|
||||||
AIS_SelectionScheme_Replace);
|
myMouseSelectionSchemes.Bind (Aspect_VKeyMouse_LeftButton | Aspect_VKeyFlags_ALT | Aspect_VKeyFlags_SHIFT, AIS_SelectionScheme_XOR);
|
||||||
myMouseSelectionSchemes.Bind ((Standard_UInteger )Aspect_VKeyMouse_LeftButton | (Standard_UInteger )Aspect_VKeyFlags_SHIFT,
|
|
||||||
AIS_SelectionScheme_XOR);
|
|
||||||
myMouseSelectionSchemes.Bind ((Standard_UInteger )Aspect_VKeyMouse_LeftButton | (Standard_UInteger )Aspect_VKeyFlags_ALT | (Standard_UInteger )Aspect_VKeyFlags_SHIFT,
|
|
||||||
AIS_SelectionScheme_XOR);
|
|
||||||
|
|
||||||
myMouseGestureMap.Bind ((Standard_UInteger )Aspect_VKeyMouse_RightButton,
|
myMouseGestureMap.Bind (Aspect_VKeyMouse_RightButton, AIS_MouseGesture_Zoom);
|
||||||
AIS_MouseGesture_Zoom);
|
myMouseGestureMap.Bind (Aspect_VKeyMouse_RightButton | Aspect_VKeyFlags_CTRL, AIS_MouseGesture_RotateOrbit);
|
||||||
myMouseGestureMap.Bind ((Standard_UInteger )Aspect_VKeyMouse_RightButton | (Standard_UInteger )Aspect_VKeyFlags_CTRL,
|
|
||||||
AIS_MouseGesture_RotateOrbit);
|
|
||||||
|
|
||||||
myMouseGestureMap.Bind ((Standard_UInteger )Aspect_VKeyMouse_MiddleButton,
|
myMouseGestureMap.Bind (Aspect_VKeyMouse_MiddleButton, AIS_MouseGesture_Pan);
|
||||||
AIS_MouseGesture_Pan);
|
myMouseGestureMap.Bind (Aspect_VKeyMouse_MiddleButton | Aspect_VKeyFlags_CTRL, AIS_MouseGesture_Pan);
|
||||||
myMouseGestureMap.Bind ((Standard_UInteger )Aspect_VKeyMouse_MiddleButton | (Standard_UInteger )Aspect_VKeyFlags_CTRL,
|
|
||||||
AIS_MouseGesture_Pan);
|
|
||||||
|
|
||||||
myMouseGestureMapDrag.Bind (Aspect_VKeyMouse_LeftButton, AIS_MouseGesture_Drag);
|
|
||||||
|
|
||||||
myXRTeleportHaptic.Duration = 3600.0f;
|
myXRTeleportHaptic.Duration = 3600.0f;
|
||||||
myXRTeleportHaptic.Frequency = 0.1f;
|
myXRTeleportHaptic.Frequency = 0.1f;
|
||||||
@@ -197,53 +181,6 @@ void AIS_ViewController::FlushViewEvents (const Handle(AIS_InteractiveContext)&
|
|||||||
{
|
{
|
||||||
flushBuffers (theCtx, theView);
|
flushBuffers (theCtx, theView);
|
||||||
flushGestures(theCtx, theView);
|
flushGestures(theCtx, theView);
|
||||||
|
|
||||||
if (theView->IsSubview())
|
|
||||||
{
|
|
||||||
// move input coordinates inside the view
|
|
||||||
const Graphic3d_Vec2i aDelta = theView->View()->SubviewTopLeft();
|
|
||||||
if (myGL.MoveTo.ToHilight || myGL.Dragging.ToStart)
|
|
||||||
{
|
|
||||||
myGL.MoveTo.Point -= aDelta;
|
|
||||||
}
|
|
||||||
if (myGL.Panning.ToStart)
|
|
||||||
{
|
|
||||||
myGL.Panning.PointStart -= aDelta;
|
|
||||||
}
|
|
||||||
if (myGL.Dragging.ToStart)
|
|
||||||
{
|
|
||||||
myGL.Dragging.PointStart -= aDelta;
|
|
||||||
}
|
|
||||||
if (myGL.Dragging.ToMove)
|
|
||||||
{
|
|
||||||
myGL.Dragging.PointTo -= aDelta;
|
|
||||||
}
|
|
||||||
if (myGL.OrbitRotation.ToStart)
|
|
||||||
{
|
|
||||||
myGL.OrbitRotation.PointStart -= Graphic3d_Vec2d (aDelta);
|
|
||||||
}
|
|
||||||
if (myGL.OrbitRotation.ToRotate)
|
|
||||||
{
|
|
||||||
myGL.OrbitRotation.PointTo -= Graphic3d_Vec2d (aDelta);
|
|
||||||
}
|
|
||||||
if (myGL.ViewRotation.ToStart)
|
|
||||||
{
|
|
||||||
myGL.ViewRotation.PointStart -= Graphic3d_Vec2d (aDelta);
|
|
||||||
}
|
|
||||||
if (myGL.ViewRotation.ToRotate)
|
|
||||||
{
|
|
||||||
myGL.ViewRotation.PointTo -= Graphic3d_Vec2d (aDelta);
|
|
||||||
}
|
|
||||||
for (Graphic3d_Vec2i& aPntIter : myGL.Selection.Points)
|
|
||||||
{
|
|
||||||
aPntIter -= aDelta;
|
|
||||||
}
|
|
||||||
for (Aspect_ScrollDelta& aZoomIter : myGL.ZoomActions)
|
|
||||||
{
|
|
||||||
aZoomIter.Point -= aDelta;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (theToHandle)
|
if (theToHandle)
|
||||||
{
|
{
|
||||||
HandleViewEvents (theCtx, theView);
|
HandleViewEvents (theCtx, theView);
|
||||||
@@ -324,21 +261,12 @@ void AIS_ViewController::flushBuffers (const Handle(AIS_InteractiveContext)& ,
|
|||||||
myUI.Dragging.ToStop = false;
|
myUI.Dragging.ToStop = false;
|
||||||
myGL.Dragging.ToStop = true;
|
myGL.Dragging.ToStop = true;
|
||||||
}
|
}
|
||||||
else
|
else if (myUI.Dragging.ToStart)
|
||||||
{
|
{
|
||||||
if (myUI.Dragging.ToStart)
|
myUI.Dragging.ToStart = false;
|
||||||
{
|
myGL.Dragging.ToStart = true;
|
||||||
myUI.Dragging.ToStart = false;
|
myGL.Dragging.PointStart = myUI.Dragging.PointStart;
|
||||||
myGL.Dragging.ToStart = true;
|
|
||||||
myGL.Dragging.PointStart = myUI.Dragging.PointStart;
|
|
||||||
}
|
|
||||||
if (myUI.Dragging.ToMove)
|
|
||||||
{
|
|
||||||
myUI.Dragging.ToMove = false;
|
|
||||||
myGL.Dragging.ToMove = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
myGL.Dragging.PointTo = myUI.Dragging.PointTo;
|
myGL.Dragging.PointTo = myUI.Dragging.PointTo;
|
||||||
|
|
||||||
if (myUI.OrbitRotation.ToStart)
|
if (myUI.OrbitRotation.ToStart)
|
||||||
@@ -423,7 +351,6 @@ void AIS_ViewController::flushGestures (const Handle(AIS_InteractiveContext)& ,
|
|||||||
const Graphic3d_Vec2d aRotDelta = aTouch.To - myGL.OrbitRotation.PointStart;
|
const Graphic3d_Vec2d aRotDelta = aTouch.To - myGL.OrbitRotation.PointStart;
|
||||||
myGL.OrbitRotation.ToRotate = true;
|
myGL.OrbitRotation.ToRotate = true;
|
||||||
myGL.OrbitRotation.PointTo = myGL.OrbitRotation.PointStart + aRotDelta * aRotAccel;
|
myGL.OrbitRotation.PointTo = myGL.OrbitRotation.PointStart + aRotDelta * aRotAccel;
|
||||||
myGL.Dragging.ToMove = true;
|
|
||||||
myGL.Dragging.PointTo.SetValues ((int )aTouch.To.x(), (int )aTouch.To.y());
|
myGL.Dragging.PointTo.SetValues ((int )aTouch.To.x(), (int )aTouch.To.y());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -431,7 +358,6 @@ void AIS_ViewController::flushGestures (const Handle(AIS_InteractiveContext)& ,
|
|||||||
const Graphic3d_Vec2d aRotDelta = aTouch.To - myGL.ViewRotation.PointStart;
|
const Graphic3d_Vec2d aRotDelta = aTouch.To - myGL.ViewRotation.PointStart;
|
||||||
myGL.ViewRotation.ToRotate = true;
|
myGL.ViewRotation.ToRotate = true;
|
||||||
myGL.ViewRotation.PointTo = myGL.ViewRotation.PointStart + aRotDelta * aRotAccel;
|
myGL.ViewRotation.PointTo = myGL.ViewRotation.PointStart + aRotDelta * aRotAccel;
|
||||||
myGL.Dragging.ToMove = true;
|
|
||||||
myGL.Dragging.PointTo.SetValues ((int )aTouch.To.x(), (int )aTouch.To.y());
|
myGL.Dragging.PointTo.SetValues ((int )aTouch.To.x(), (int )aTouch.To.y());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -854,19 +780,6 @@ bool AIS_ViewController::UpdateMouseButtons (const Graphic3d_Vec2i& thePoint,
|
|||||||
UpdatePolySelection (thePoint, true);
|
UpdatePolySelection (thePoint, true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case AIS_MouseGesture_Drag:
|
|
||||||
{
|
|
||||||
if (myToAllowDragging)
|
|
||||||
{
|
|
||||||
myUI.Dragging.ToStart = true;
|
|
||||||
myUI.Dragging.PointStart = thePoint;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
myMouseActiveGesture = AIS_MouseGesture_NONE;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case AIS_MouseGesture_NONE:
|
case AIS_MouseGesture_NONE:
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
@@ -874,19 +787,12 @@ bool AIS_ViewController::UpdateMouseButtons (const Graphic3d_Vec2i& thePoint,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
AIS_MouseGesture aSecGesture = AIS_MouseGesture_NONE;
|
if (theButtons == Aspect_VKeyMouse_LeftButton
|
||||||
if (myMouseGestureMapDrag.Find (theButtons | theModifiers, aSecGesture))
|
&& theModifiers == Aspect_VKeyFlags_NONE
|
||||||
|
&& myToAllowDragging)
|
||||||
{
|
{
|
||||||
if (aSecGesture == AIS_MouseGesture_Drag
|
myUI.Dragging.ToStart = true;
|
||||||
&& myToAllowDragging)
|
myUI.Dragging.PointStart = thePoint;
|
||||||
{
|
|
||||||
myUI.Dragging.ToStart = true;
|
|
||||||
myUI.Dragging.PointStart = thePoint;
|
|
||||||
if (myMouseActiveGesture == AIS_MouseGesture_NONE)
|
|
||||||
{
|
|
||||||
myMouseActiveGesture = aSecGesture;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1010,8 +916,7 @@ bool AIS_ViewController::UpdateMousePosition (const Graphic3d_Vec2i& thePoint,
|
|||||||
const double aRotTol = theIsEmulated
|
const double aRotTol = theIsEmulated
|
||||||
? double(myTouchToleranceScale) * myTouchRotationThresholdPx
|
? double(myTouchToleranceScale) * myTouchRotationThresholdPx
|
||||||
: 0.0;
|
: 0.0;
|
||||||
const Graphic3d_Vec2d aDeltaF (aDelta);
|
if (double (Abs (aDelta.x()) + Abs (aDelta.y())) > aRotTol)
|
||||||
if (Abs (aDeltaF.x()) + Abs (aDeltaF.y()) > aRotTol)
|
|
||||||
{
|
{
|
||||||
const double aRotAccel = myNavigationMode == AIS_NavigationMode_FirstPersonWalk ? myMouseAccel : myOrbitAccel;
|
const double aRotAccel = myNavigationMode == AIS_NavigationMode_FirstPersonWalk ? myMouseAccel : myOrbitAccel;
|
||||||
const Graphic3d_Vec2i aRotDelta = thePoint - myMousePressPoint;
|
const Graphic3d_Vec2i aRotDelta = thePoint - myMousePressPoint;
|
||||||
@@ -1027,8 +932,6 @@ bool AIS_ViewController::UpdateMousePosition (const Graphic3d_Vec2i& thePoint,
|
|||||||
myUI.ViewRotation.PointTo = Graphic3d_Vec2d (myMousePressPoint.x(), myMousePressPoint.y())
|
myUI.ViewRotation.PointTo = Graphic3d_Vec2d (myMousePressPoint.x(), myMousePressPoint.y())
|
||||||
+ Graphic3d_Vec2d (aRotDelta.x(), aRotDelta.y()) * aRotAccel;
|
+ Graphic3d_Vec2d (aRotDelta.x(), aRotDelta.y()) * aRotAccel;
|
||||||
}
|
}
|
||||||
|
|
||||||
myUI.Dragging.ToMove = true;
|
|
||||||
myUI.Dragging.PointTo = thePoint;
|
myUI.Dragging.PointTo = thePoint;
|
||||||
|
|
||||||
myMouseProgressPoint = thePoint;
|
myMouseProgressPoint = thePoint;
|
||||||
@@ -1064,8 +967,7 @@ bool AIS_ViewController::UpdateMousePosition (const Graphic3d_Vec2i& thePoint,
|
|||||||
const double aPanTol = theIsEmulated
|
const double aPanTol = theIsEmulated
|
||||||
? double(myTouchToleranceScale) * myTouchPanThresholdPx
|
? double(myTouchToleranceScale) * myTouchPanThresholdPx
|
||||||
: 0.0;
|
: 0.0;
|
||||||
const Graphic3d_Vec2d aDeltaF (aDelta);
|
if (double (Abs (aDelta.x()) + Abs (aDelta.y())) > aPanTol)
|
||||||
if (Abs (aDeltaF.x()) + Abs (aDeltaF.y()) > aPanTol)
|
|
||||||
{
|
{
|
||||||
if (myUpdateStartPointPan)
|
if (myUpdateStartPointPan)
|
||||||
{
|
{
|
||||||
@@ -1089,31 +991,6 @@ bool AIS_ViewController::UpdateMousePosition (const Graphic3d_Vec2i& thePoint,
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case AIS_MouseGesture_Drag:
|
|
||||||
{
|
|
||||||
if (!myToAllowDragging)
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
const double aDragTol = theIsEmulated
|
|
||||||
? double(myTouchToleranceScale) * myTouchDraggingThresholdPx
|
|
||||||
: 0.0;
|
|
||||||
if (double (Abs (aDelta.x()) + Abs (aDelta.y())) > aDragTol)
|
|
||||||
{
|
|
||||||
const double aRotAccel = myNavigationMode == AIS_NavigationMode_FirstPersonWalk ? myMouseAccel : myOrbitAccel;
|
|
||||||
const Graphic3d_Vec2i aRotDelta = thePoint - myMousePressPoint;
|
|
||||||
myUI.ViewRotation.ToRotate = true;
|
|
||||||
myUI.ViewRotation.PointTo = Graphic3d_Vec2d (myMousePressPoint.x(), myMousePressPoint.y())
|
|
||||||
+ Graphic3d_Vec2d (aRotDelta.x(), aRotDelta.y()) * aRotAccel;
|
|
||||||
myUI.Dragging.ToMove = true;
|
|
||||||
myUI.Dragging.PointTo = thePoint;
|
|
||||||
|
|
||||||
myMouseProgressPoint = thePoint;
|
|
||||||
toUpdateView = true;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
@@ -1631,11 +1508,10 @@ void AIS_ViewController::handleZoom (const Handle(V3d_View)& theView,
|
|||||||
|
|
||||||
Graphic3d_Vec2i aWinSize;
|
Graphic3d_Vec2i aWinSize;
|
||||||
theView->Window()->Size (aWinSize.x(), aWinSize.y());
|
theView->Window()->Size (aWinSize.x(), aWinSize.y());
|
||||||
const Graphic3d_Vec2d aWinSizeF (aWinSize);
|
const Graphic3d_Vec2d aPanFromCenterPx (double(theParams.Point.x()) - 0.5 * double(aWinSize.x()),
|
||||||
const Graphic3d_Vec2d aPanFromCenterPx (double(theParams.Point.x()) - 0.5 * aWinSizeF.x(),
|
double(aWinSize.y() - theParams.Point.y() - 1) - 0.5 * double(aWinSize.y()));
|
||||||
aWinSizeF.y() - double(theParams.Point.y()) - 1.0 - 0.5 * aWinSizeF.y());
|
aDxy.x() += -aViewDims1.X() * aPanFromCenterPx.x() / double(aWinSize.x());
|
||||||
aDxy.x() += -aViewDims1.X() * aPanFromCenterPx.x() / aWinSizeF.x();
|
aDxy.y() += -aViewDims1.Y() * aPanFromCenterPx.y() / double(aWinSize.y());
|
||||||
aDxy.y() += -aViewDims1.Y() * aPanFromCenterPx.y() / aWinSizeF.y();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//theView->Translate (aCam, aDxy.x(), aDxy.y());
|
//theView->Translate (aCam, aDxy.x(), aDxy.y());
|
||||||
@@ -2690,17 +2566,6 @@ void AIS_ViewController::OnSelectionChanged (const Handle(AIS_InteractiveContext
|
|||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
// =======================================================================
|
|
||||||
// function : OnSubviewChanged
|
|
||||||
// purpose :
|
|
||||||
// =======================================================================
|
|
||||||
void AIS_ViewController::OnSubviewChanged (const Handle(AIS_InteractiveContext)& ,
|
|
||||||
const Handle(V3d_View)& ,
|
|
||||||
const Handle(V3d_View)& )
|
|
||||||
{
|
|
||||||
//
|
|
||||||
}
|
|
||||||
|
|
||||||
// =======================================================================
|
// =======================================================================
|
||||||
// function : OnObjectDragged
|
// function : OnObjectDragged
|
||||||
// purpose :
|
// purpose :
|
||||||
@@ -3048,7 +2913,8 @@ void AIS_ViewController::handleDynamicHighlight (const Handle(AIS_InteractiveCon
|
|||||||
myGL.OrbitRotation.ToRotate = false;
|
myGL.OrbitRotation.ToRotate = false;
|
||||||
myGL.ViewRotation .ToRotate = false;
|
myGL.ViewRotation .ToRotate = false;
|
||||||
}
|
}
|
||||||
else if (myGL.Dragging.ToMove)
|
else if (myGL.OrbitRotation.ToRotate
|
||||||
|
|| myGL.ViewRotation.ToRotate)
|
||||||
{
|
{
|
||||||
OnObjectDragged (theCtx, theView, AIS_DragAction_Update);
|
OnObjectDragged (theCtx, theView, AIS_DragAction_Update);
|
||||||
myGL.OrbitRotation.ToRotate = false;
|
myGL.OrbitRotation.ToRotate = false;
|
||||||
@@ -3076,8 +2942,6 @@ void AIS_ViewController::handleMoveTo (const Handle(AIS_InteractiveContext)& the
|
|||||||
void AIS_ViewController::handleViewRedraw (const Handle(AIS_InteractiveContext)& ,
|
void AIS_ViewController::handleViewRedraw (const Handle(AIS_InteractiveContext)& ,
|
||||||
const Handle(V3d_View)& theView)
|
const Handle(V3d_View)& theView)
|
||||||
{
|
{
|
||||||
Handle(V3d_View) aParentView = theView->IsSubview() ? theView->ParentView() : theView;
|
|
||||||
|
|
||||||
// manage animation state
|
// manage animation state
|
||||||
if (!myViewAnimation.IsNull()
|
if (!myViewAnimation.IsNull()
|
||||||
&& !myViewAnimation->IsStopped())
|
&& !myViewAnimation->IsStopped())
|
||||||
@@ -3105,82 +2969,31 @@ void AIS_ViewController::handleViewRedraw (const Handle(AIS_InteractiveContext)&
|
|||||||
myToAskNextFrame = true;
|
myToAskNextFrame = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int aSubViewPass = 0; aSubViewPass < 2; ++aSubViewPass)
|
for (V3d_ListOfViewIterator aViewIter (theView->Viewer()->ActiveViewIterator()); aViewIter.More(); aViewIter.Next())
|
||||||
{
|
{
|
||||||
const bool isSubViewPass = (aSubViewPass == 0);
|
const Handle(V3d_View)& aView = aViewIter.Value();
|
||||||
for (V3d_ListOfViewIterator aViewIter (theView->Viewer()->ActiveViewIterator()); aViewIter.More(); aViewIter.Next())
|
if (aView->IsInvalidated()
|
||||||
|
|| (myToAskNextFrame && aView == theView))
|
||||||
{
|
{
|
||||||
const Handle(V3d_View)& aView = aViewIter.Value();
|
if (aView->ComputedMode())
|
||||||
if (isSubViewPass
|
|
||||||
&& !aView->IsSubview())
|
|
||||||
{
|
{
|
||||||
for (const Handle(V3d_View)& aSubviewIter : aView->Subviews())
|
aView->Update();
|
||||||
{
|
|
||||||
if (aSubviewIter->Viewer() != theView->Viewer())
|
|
||||||
{
|
|
||||||
if (aSubviewIter->IsInvalidated())
|
|
||||||
{
|
|
||||||
if (aSubviewIter->ComputedMode())
|
|
||||||
{
|
|
||||||
aSubviewIter->Update();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
aSubviewIter->Redraw();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (aSubviewIter->IsInvalidatedImmediate())
|
|
||||||
{
|
|
||||||
aSubviewIter->RedrawImmediate();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
else if (!isSubViewPass
|
else
|
||||||
&& aView->IsSubview())
|
|
||||||
{
|
{
|
||||||
continue;
|
aView->Redraw();
|
||||||
}
|
|
||||||
|
|
||||||
if (aView->IsInvalidated()
|
|
||||||
|| (myToAskNextFrame && aView == theView))
|
|
||||||
{
|
|
||||||
if (aView->ComputedMode())
|
|
||||||
{
|
|
||||||
aView->Update();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
aView->Redraw();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (aView->IsSubview())
|
|
||||||
{
|
|
||||||
aView->ParentView()->InvalidateImmediate();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (aView->IsInvalidatedImmediate())
|
|
||||||
{
|
|
||||||
if (aView->IsSubview())
|
|
||||||
{
|
|
||||||
aView->ParentView()->InvalidateImmediate();
|
|
||||||
}
|
|
||||||
|
|
||||||
aView->RedrawImmediate();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
else if (aView->IsInvalidatedImmediate())
|
||||||
if (theView->IsSubview()
|
{
|
||||||
&& theView->Viewer() != aParentView->Viewer())
|
aView->RedrawImmediate();
|
||||||
{
|
}
|
||||||
aParentView->RedrawImmediate();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (myToAskNextFrame)
|
if (myToAskNextFrame)
|
||||||
{
|
{
|
||||||
// ask more frames
|
// ask more frames
|
||||||
aParentView->Window()->InvalidateContent (Handle(Aspect_DisplayConnection)());
|
theView->Window()->InvalidateContent (Handle(Aspect_DisplayConnection)());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3425,36 +3238,6 @@ void AIS_ViewController::HandleViewEvents (const Handle(AIS_InteractiveContext)&
|
|||||||
{
|
{
|
||||||
const bool wasImmediateUpdate = theView->SetImmediateUpdate (false);
|
const bool wasImmediateUpdate = theView->SetImmediateUpdate (false);
|
||||||
|
|
||||||
Handle(V3d_View) aPickedView;
|
|
||||||
if (theView->IsSubview()
|
|
||||||
|| !theView->Subviews().IsEmpty())
|
|
||||||
{
|
|
||||||
// activate another subview on mouse click
|
|
||||||
bool toPickSubview = false;
|
|
||||||
Graphic3d_Vec2i aClickPoint;
|
|
||||||
if (myGL.Selection.Tool == AIS_ViewSelectionTool_Picking
|
|
||||||
&& !myGL.Selection.Points.IsEmpty())
|
|
||||||
{
|
|
||||||
aClickPoint = myGL.Selection.Points.Last();
|
|
||||||
toPickSubview = true;
|
|
||||||
}
|
|
||||||
else if (!myGL.ZoomActions.IsEmpty())
|
|
||||||
{
|
|
||||||
//aClickPoint = myGL.ZoomActions.Last().Point;
|
|
||||||
//toPickSubview = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (toPickSubview)
|
|
||||||
{
|
|
||||||
if (theView->IsSubview())
|
|
||||||
{
|
|
||||||
aClickPoint += theView->View()->SubviewTopLeft();
|
|
||||||
}
|
|
||||||
Handle(V3d_View) aParent = !theView->IsSubview() ? theView : theView->ParentView();
|
|
||||||
aPickedView = aParent->PickSubview (aClickPoint);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
handleViewOrientationKeys (theCtx, theView);
|
handleViewOrientationKeys (theCtx, theView);
|
||||||
const AIS_WalkDelta aWalk = handleNavigationKeys (theCtx, theView);
|
const AIS_WalkDelta aWalk = handleNavigationKeys (theCtx, theView);
|
||||||
handleXRInput (theCtx, theView, aWalk);
|
handleXRInput (theCtx, theView, aWalk);
|
||||||
@@ -3472,12 +3255,6 @@ void AIS_ViewController::HandleViewEvents (const Handle(AIS_InteractiveContext)&
|
|||||||
|
|
||||||
theView->SetImmediateUpdate (wasImmediateUpdate);
|
theView->SetImmediateUpdate (wasImmediateUpdate);
|
||||||
|
|
||||||
if (!aPickedView.IsNull()
|
|
||||||
&& aPickedView != theView)
|
|
||||||
{
|
|
||||||
OnSubviewChanged (theCtx, theView, aPickedView);
|
|
||||||
}
|
|
||||||
|
|
||||||
// make sure to not process the same events twice
|
// make sure to not process the same events twice
|
||||||
myGL.Reset();
|
myGL.Reset();
|
||||||
myToAskNextFrame = false;
|
myToAskNextFrame = false;
|
||||||
|
@@ -492,12 +492,6 @@ public:
|
|||||||
const Handle(V3d_View)& theView,
|
const Handle(V3d_View)& theView,
|
||||||
AIS_DragAction theAction);
|
AIS_DragAction theAction);
|
||||||
|
|
||||||
//! Callback called by HandleViewEvents() on Selection of another (sub)view.
|
|
||||||
//! This method is expected to be called from rendering thread.
|
|
||||||
Standard_EXPORT virtual void OnSubviewChanged (const Handle(AIS_InteractiveContext)& theCtx,
|
|
||||||
const Handle(V3d_View)& theOldView,
|
|
||||||
const Handle(V3d_View)& theNewView);
|
|
||||||
|
|
||||||
//! Pick closest point under mouse cursor.
|
//! Pick closest point under mouse cursor.
|
||||||
//! This method is expected to be called from rendering thread.
|
//! This method is expected to be called from rendering thread.
|
||||||
//! @param thePnt [out] result point
|
//! @param thePnt [out] result point
|
||||||
@@ -763,7 +757,6 @@ protected: //! @name mouse input variables
|
|||||||
Standard_ShortReal myScrollZoomRatio; //!< distance ratio for mapping mouse scroll event to zoom; 15.0 by default
|
Standard_ShortReal myScrollZoomRatio; //!< distance ratio for mapping mouse scroll event to zoom; 15.0 by default
|
||||||
|
|
||||||
AIS_MouseGestureMap myMouseGestureMap; //!< map defining mouse gestures
|
AIS_MouseGestureMap myMouseGestureMap; //!< map defining mouse gestures
|
||||||
AIS_MouseGestureMap myMouseGestureMapDrag; //!< secondary map defining mouse gestures for dragging
|
|
||||||
AIS_MouseGesture myMouseActiveGesture; //!< initiated mouse gesture (by pressing mouse button)
|
AIS_MouseGesture myMouseActiveGesture; //!< initiated mouse gesture (by pressing mouse button)
|
||||||
AIS_MouseSelectionSchemeMap
|
AIS_MouseSelectionSchemeMap
|
||||||
myMouseSelectionSchemes; //!< map defining selection schemes bound to mouse + modifiers
|
myMouseSelectionSchemes; //!< map defining selection schemes bound to mouse + modifiers
|
||||||
@@ -784,7 +777,6 @@ protected: //! @name multi-touch input variables
|
|||||||
Standard_ShortReal myTouchPanThresholdPx; //!< threshold for starting two-touch panning gesture in pixels; 4 by default
|
Standard_ShortReal myTouchPanThresholdPx; //!< threshold for starting two-touch panning gesture in pixels; 4 by default
|
||||||
Standard_ShortReal myTouchZoomThresholdPx; //!< threshold for starting two-touch zoom (pitch) gesture in pixels; 6 by default
|
Standard_ShortReal myTouchZoomThresholdPx; //!< threshold for starting two-touch zoom (pitch) gesture in pixels; 6 by default
|
||||||
Standard_ShortReal myTouchZoomRatio; //!< distance ratio for mapping two-touch zoom (pitch) gesture from pixels to zoom; 0.13 by default
|
Standard_ShortReal myTouchZoomRatio; //!< distance ratio for mapping two-touch zoom (pitch) gesture from pixels to zoom; 0.13 by default
|
||||||
Standard_ShortReal myTouchDraggingThresholdPx; //!< distance for starting one-touch dragging gesture in pixels; 6 by default
|
|
||||||
|
|
||||||
Aspect_Touch myTouchClick; //!< single touch position for handling clicks
|
Aspect_Touch myTouchClick; //!< single touch position for handling clicks
|
||||||
OSD_Timer myTouchDoubleTapTimer; //!< timer for handling double tap
|
OSD_Timer myTouchDoubleTapTimer; //!< timer for handling double tap
|
||||||
|
@@ -87,13 +87,12 @@ public:
|
|||||||
struct _draggingParams
|
struct _draggingParams
|
||||||
{
|
{
|
||||||
bool ToStart; //!< start dragging
|
bool ToStart; //!< start dragging
|
||||||
bool ToMove; //!< perform dragging
|
|
||||||
bool ToStop; //!< stop dragging
|
bool ToStop; //!< stop dragging
|
||||||
bool ToAbort; //!< abort dragging (restore previous position)
|
bool ToAbort; //!< abort dragging (restore previous position)
|
||||||
Graphic3d_Vec2i PointStart; //!< drag start point
|
Graphic3d_Vec2i PointStart; //!< drag start point
|
||||||
Graphic3d_Vec2i PointTo; //!< drag end point
|
Graphic3d_Vec2i PointTo; //!< drag end point
|
||||||
|
|
||||||
_draggingParams() : ToStart (false), ToMove (false), ToStop (false), ToAbort (false) {}
|
_draggingParams() : ToStart (false), ToStop (false), ToAbort (false) {}
|
||||||
} Dragging;
|
} Dragging;
|
||||||
|
|
||||||
struct _orbitRotation
|
struct _orbitRotation
|
||||||
@@ -142,7 +141,6 @@ public:
|
|||||||
Panning.ToStart = false;
|
Panning.ToStart = false;
|
||||||
Panning.ToPan = false;
|
Panning.ToPan = false;
|
||||||
Dragging.ToStart = false;
|
Dragging.ToStart = false;
|
||||||
Dragging.ToMove = false;
|
|
||||||
Dragging.ToStop = false;
|
Dragging.ToStop = false;
|
||||||
Dragging.ToAbort = false;
|
Dragging.ToAbort = false;
|
||||||
OrbitRotation.ToStart = false;
|
OrbitRotation.ToStart = false;
|
||||||
|
@@ -15,7 +15,6 @@
|
|||||||
|
|
||||||
#include <Graphic3d_ArrayOfSegments.hxx>
|
#include <Graphic3d_ArrayOfSegments.hxx>
|
||||||
#include <Graphic3d_ArrayOfTriangles.hxx>
|
#include <Graphic3d_ArrayOfTriangles.hxx>
|
||||||
#include <Graphic3d_Texture2Dmanual.hxx>
|
|
||||||
#include <Graphic3d_Group.hxx>
|
#include <Graphic3d_Group.hxx>
|
||||||
#include <Image_Texture.hxx>
|
#include <Image_Texture.hxx>
|
||||||
#include <Prs3d_LineAspect.hxx>
|
#include <Prs3d_LineAspect.hxx>
|
||||||
|
@@ -99,10 +99,10 @@ static gp_Parab to3d(const gp_Pln& Pl, const gp_Parab2d& P)
|
|||||||
return gp_Parab(to3d(Pl,P.Axis()),P.Focal());
|
return gp_Parab(to3d(Pl,P.Axis()),P.Focal());
|
||||||
}
|
}
|
||||||
|
|
||||||
static gp_Vec SetLinearForm(const gp_Vec2d& DW, const gp_Vec2d& D2W, const gp_Vec2d& D3W,
|
static gp_Vec SetLinearForm(const gp_Vec2d DW, const gp_Vec2d D2W,const gp_Vec2d D3W,
|
||||||
const gp_Vec& D1U, const gp_Vec& D1V, const gp_Vec& D2U,
|
const gp_Vec D1U, const gp_Vec D1V, const gp_Vec D2U,
|
||||||
const gp_Vec& D2V, const gp_Vec& D2UV, const gp_Vec& D3U,
|
const gp_Vec D2V, const gp_Vec D2UV, const gp_Vec D3U,
|
||||||
const gp_Vec& D3V, const gp_Vec& D3UUV,const gp_Vec& D3UVV)
|
const gp_Vec D3V, const gp_Vec D3UUV,const gp_Vec D3UVV)
|
||||||
{gp_Vec V31, V32, V33, V34,V3 ;
|
{gp_Vec V31, V32, V33, V34,V3 ;
|
||||||
V31.SetLinearForm(DW.X(),D1U,
|
V31.SetLinearForm(DW.X(),D1U,
|
||||||
D2W.X()*DW.X(),D2U,
|
D2W.X()*DW.X(),D2U,
|
||||||
|
@@ -108,7 +108,7 @@ void Approx_SameParameter_Evaluator::Evaluate (Standard_Integer *,/*Dimension*/
|
|||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
static void ProjectPointOnCurve(const Standard_Real InitValue,
|
static void ProjectPointOnCurve(const Standard_Real InitValue,
|
||||||
const gp_Pnt& APoint,
|
const gp_Pnt APoint,
|
||||||
const Standard_Real Tolerance,
|
const Standard_Real Tolerance,
|
||||||
const Standard_Integer NumIteration,
|
const Standard_Integer NumIteration,
|
||||||
const Adaptor3d_Curve& Curve,
|
const Adaptor3d_Curve& Curve,
|
||||||
|
@@ -40,58 +40,18 @@ class Aspect_Window : public Standard_Transient
|
|||||||
DEFINE_STANDARD_RTTIEXT(Aspect_Window, Standard_Transient)
|
DEFINE_STANDARD_RTTIEXT(Aspect_Window, Standard_Transient)
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//! Returns True if the window <me> is virtual
|
//! Modifies the window background.
|
||||||
Standard_EXPORT Standard_Boolean IsVirtual() const;
|
Standard_EXPORT void SetBackground (const Aspect_Background& ABack);
|
||||||
|
|
||||||
//! Setup the virtual state
|
|
||||||
Standard_EXPORT void SetVirtual (const Standard_Boolean theVirtual);
|
|
||||||
|
|
||||||
//! Returns window top-left corner.
|
|
||||||
Graphic3d_Vec2i TopLeft() const
|
|
||||||
{
|
|
||||||
Graphic3d_Vec2i aTopLeft, aBotRight;
|
|
||||||
Position (aTopLeft.x(), aTopLeft.y(), aBotRight.x(), aBotRight.y());
|
|
||||||
return aTopLeft;
|
|
||||||
}
|
|
||||||
|
|
||||||
//! Returns window dimensions.
|
|
||||||
Graphic3d_Vec2i Dimensions() const
|
|
||||||
{
|
|
||||||
Graphic3d_Vec2i aSize;
|
|
||||||
Size (aSize.x(), aSize.y());
|
|
||||||
return aSize;
|
|
||||||
}
|
|
||||||
|
|
||||||
//! Returns connection to Display or NULL.
|
|
||||||
const Handle(Aspect_DisplayConnection)& DisplayConnection() const { return myDisplay; }
|
|
||||||
|
|
||||||
//! Returns the window background.
|
|
||||||
Standard_EXPORT Aspect_Background Background() const;
|
|
||||||
|
|
||||||
//! Returns the current image background fill mode.
|
|
||||||
Standard_EXPORT Aspect_FillMethod BackgroundFillMethod() const;
|
|
||||||
|
|
||||||
//! Returns the window gradient background.
|
|
||||||
Standard_EXPORT Aspect_GradientBackground GradientBackground() const;
|
|
||||||
|
|
||||||
//! Modifies the window background.
|
//! Modifies the window background.
|
||||||
Standard_EXPORT void SetBackground (const Aspect_Background& theBack);
|
Standard_EXPORT void SetBackground (const Quantity_Color& color);
|
||||||
|
|
||||||
//! Modifies the window background.
|
|
||||||
Standard_EXPORT void SetBackground (const Quantity_Color& theColor);
|
|
||||||
|
|
||||||
//! Modifies the window gradient background.
|
//! Modifies the window gradient background.
|
||||||
Standard_EXPORT void SetBackground (const Aspect_GradientBackground& theBackground);
|
Standard_EXPORT void SetBackground (const Aspect_GradientBackground& ABackground);
|
||||||
|
|
||||||
//! Modifies the window gradient background.
|
//! Modifies the window gradient background.
|
||||||
Standard_EXPORT void SetBackground (const Quantity_Color& theFirstColor, const Quantity_Color& theSecondColor, const Aspect_GradientFillMethod theFillMethod);
|
Standard_EXPORT void SetBackground (const Quantity_Color& theFirstColor, const Quantity_Color& theSecondColor, const Aspect_GradientFillMethod theFillMethod);
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
//! Returns True if the window <me> is opened
|
|
||||||
//! and False if the window is closed.
|
|
||||||
Standard_EXPORT virtual Standard_Boolean IsMapped() const = 0;
|
|
||||||
|
|
||||||
//! Opens the window <me>.
|
//! Opens the window <me>.
|
||||||
Standard_EXPORT virtual void Map() const = 0;
|
Standard_EXPORT virtual void Map() const = 0;
|
||||||
|
|
||||||
@@ -105,6 +65,25 @@ public:
|
|||||||
//! and returns TRUE if the window is mapped at screen.
|
//! and returns TRUE if the window is mapped at screen.
|
||||||
Standard_EXPORT virtual Standard_Boolean DoMapping() const = 0;
|
Standard_EXPORT virtual Standard_Boolean DoMapping() const = 0;
|
||||||
|
|
||||||
|
//! Returns the window background.
|
||||||
|
Standard_EXPORT Aspect_Background Background() const;
|
||||||
|
|
||||||
|
//! Returns the current image background fill mode.
|
||||||
|
Standard_EXPORT Aspect_FillMethod BackgroundFillMethod() const;
|
||||||
|
|
||||||
|
//! Returns the window gradient background.
|
||||||
|
Standard_EXPORT Aspect_GradientBackground GradientBackground() const;
|
||||||
|
|
||||||
|
//! Returns True if the window <me> is opened
|
||||||
|
//! and False if the window is closed.
|
||||||
|
Standard_EXPORT virtual Standard_Boolean IsMapped() const = 0;
|
||||||
|
|
||||||
|
//! Returns True if the window <me> is virtual
|
||||||
|
Standard_EXPORT Standard_Boolean IsVirtual() const;
|
||||||
|
|
||||||
|
//! Setup the virtual state
|
||||||
|
Standard_EXPORT void SetVirtual (const Standard_Boolean theVirtual);
|
||||||
|
|
||||||
//! Returns The Window RATIO equal to the physical
|
//! Returns The Window RATIO equal to the physical
|
||||||
//! WIDTH/HEIGHT dimensions
|
//! WIDTH/HEIGHT dimensions
|
||||||
Standard_EXPORT virtual Standard_Real Ratio() const = 0;
|
Standard_EXPORT virtual Standard_Real Ratio() const = 0;
|
||||||
@@ -124,6 +103,9 @@ public:
|
|||||||
//! Returns native Window FB config (GLXFBConfig on Xlib)
|
//! Returns native Window FB config (GLXFBConfig on Xlib)
|
||||||
Standard_EXPORT virtual Aspect_FBConfig NativeFBConfig() const = 0;
|
Standard_EXPORT virtual Aspect_FBConfig NativeFBConfig() const = 0;
|
||||||
|
|
||||||
|
//! Returns connection to Display or NULL.
|
||||||
|
const Handle(Aspect_DisplayConnection)& DisplayConnection() const { return myDisplay; }
|
||||||
|
|
||||||
//! Sets window title.
|
//! Sets window title.
|
||||||
virtual void SetTitle (const TCollection_AsciiString& theTitle) { (void )theTitle; }
|
virtual void SetTitle (const TCollection_AsciiString& theTitle) { (void )theTitle; }
|
||||||
|
|
||||||
|
@@ -525,7 +525,7 @@ protected:
|
|||||||
Standard_EXPORT void UpdateEdgeTolerance(const Standard_Integer nE,
|
Standard_EXPORT void UpdateEdgeTolerance(const Standard_Integer nE,
|
||||||
const Standard_Real aTolNew);
|
const Standard_Real aTolNew);
|
||||||
|
|
||||||
Standard_EXPORT void RemovePaveBlocks(const TColStd_MapOfInteger& theEdges);
|
Standard_EXPORT void RemovePaveBlocks(const TColStd_MapOfInteger theEdges);
|
||||||
|
|
||||||
Standard_EXPORT void CorrectToleranceOfSE();
|
Standard_EXPORT void CorrectToleranceOfSE();
|
||||||
|
|
||||||
|
@@ -3394,7 +3394,7 @@ void BOPAlgo_PaveFiller::UpdatePaveBlocks
|
|||||||
//function : RemovePaveBlocks
|
//function : RemovePaveBlocks
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void BOPAlgo_PaveFiller::RemovePaveBlocks(const TColStd_MapOfInteger& theEdges)
|
void BOPAlgo_PaveFiller::RemovePaveBlocks(const TColStd_MapOfInteger theEdges)
|
||||||
{
|
{
|
||||||
// Remove all pave blocks referring to input edges:
|
// Remove all pave blocks referring to input edges:
|
||||||
//
|
//
|
||||||
|
@@ -334,7 +334,7 @@ void BRepAlgo_NormalProjection::SetDefaultParams()
|
|||||||
|
|
||||||
if(Only2d && Only3d) {
|
if(Only2d && Only3d) {
|
||||||
BRepLib_MakeEdge MKed(GeomAdaptor::MakeCurve(hcur->Curve()),
|
BRepLib_MakeEdge MKed(GeomAdaptor::MakeCurve(hcur->Curve()),
|
||||||
Udeb, Ufin);
|
Ufin, Udeb);
|
||||||
prj = MKed.Edge();
|
prj = MKed.Edge();
|
||||||
BB.UpdateEdge(TopoDS::Edge(prj),
|
BB.UpdateEdge(TopoDS::Edge(prj),
|
||||||
PCur2d,
|
PCur2d,
|
||||||
|
@@ -31,13 +31,11 @@
|
|||||||
#include <BRepCheck_ListOfStatus.hxx>
|
#include <BRepCheck_ListOfStatus.hxx>
|
||||||
#include <BRepCheck_Wire.hxx>
|
#include <BRepCheck_Wire.hxx>
|
||||||
#include <BRepTools_WireExplorer.hxx>
|
#include <BRepTools_WireExplorer.hxx>
|
||||||
#include <BRepTools.hxx>
|
|
||||||
#include <ElCLib.hxx>
|
#include <ElCLib.hxx>
|
||||||
#include <Geom2d_Curve.hxx>
|
#include <Geom2d_Curve.hxx>
|
||||||
#include <Geom2dAdaptor_Curve.hxx>
|
#include <Geom2dAdaptor_Curve.hxx>
|
||||||
#include <Geom2dInt_GInter.hxx>
|
#include <Geom2dInt_GInter.hxx>
|
||||||
#include <Geom_Curve.hxx>
|
#include <Geom_Curve.hxx>
|
||||||
#include <Geom_RectangularTrimmedSurface.hxx>
|
|
||||||
#include <gp_Lin.hxx>
|
#include <gp_Lin.hxx>
|
||||||
#include <gp_Pnt.hxx>
|
#include <gp_Pnt.hxx>
|
||||||
#include <gp_Pnt2d.hxx>
|
#include <gp_Pnt2d.hxx>
|
||||||
@@ -116,11 +114,6 @@ static Standard_Boolean GetPnt2d(const TopoDS_Vertex &theVertex,
|
|||||||
const TopoDS_Edge &theEdge,
|
const TopoDS_Edge &theEdge,
|
||||||
const TopoDS_Face &theFace,
|
const TopoDS_Face &theFace,
|
||||||
gp_Pnt2d &aPnt);
|
gp_Pnt2d &aPnt);
|
||||||
|
|
||||||
static void DefinePeriods(const TopoDS_Face& theFace,
|
|
||||||
Standard_Real& theUperiod,
|
|
||||||
Standard_Real& theVperiod);
|
|
||||||
|
|
||||||
// Modified by Sergey KHROMOV - Wed May 22 10:44:08 2002 End
|
// Modified by Sergey KHROMOV - Wed May 22 10:44:08 2002 End
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@@ -426,24 +419,12 @@ Standard_Boolean IsDistanceIn2DTolerance (const BRepAdaptor_Surface& aFaceSurfac
|
|||||||
const gp_Pnt2d& thePnt,
|
const gp_Pnt2d& thePnt,
|
||||||
const gp_Pnt2d& thePntRef,
|
const gp_Pnt2d& thePntRef,
|
||||||
const Standard_Real aTol3d,
|
const Standard_Real aTol3d,
|
||||||
const Standard_Boolean theIsOnSingularity,
|
|
||||||
#ifdef OCCT_DEBUG
|
#ifdef OCCT_DEBUG
|
||||||
const Standard_Boolean PrintWarnings = Standard_True)
|
const Standard_Boolean PrintWarnings = Standard_True)
|
||||||
#else
|
#else
|
||||||
const Standard_Boolean = Standard_True)
|
const Standard_Boolean = Standard_True)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
gp_Pnt aP;
|
|
||||||
gp_Vec aDU, aDV;
|
|
||||||
Standard_Real um = (thePnt.X() + thePntRef.X()) / 2.;
|
|
||||||
Standard_Real vm = (thePnt.Y() + thePntRef.Y()) / 2.;
|
|
||||||
aFaceSurface.D1(um, vm, aP, aDU, aDV);
|
|
||||||
Standard_Real aMDU = aDU.Magnitude();
|
|
||||||
Standard_Real aMDV = aDV.Magnitude();
|
|
||||||
if (!theIsOnSingularity ||
|
|
||||||
(aMDU > Precision::Confusion() && aMDV > Precision::Confusion()))
|
|
||||||
return Standard_True; //we are not in singularity
|
|
||||||
|
|
||||||
Standard_Real dumax = 0.01 * (aFaceSurface.LastUParameter() - aFaceSurface.FirstUParameter());
|
Standard_Real dumax = 0.01 * (aFaceSurface.LastUParameter() - aFaceSurface.FirstUParameter());
|
||||||
Standard_Real dvmax = 0.01 * (aFaceSurface.LastVParameter() - aFaceSurface.FirstVParameter());
|
Standard_Real dvmax = 0.01 * (aFaceSurface.LastVParameter() - aFaceSurface.FirstVParameter());
|
||||||
Standard_Real dumin = Abs(thePnt.X() - thePntRef.X());
|
Standard_Real dumin = Abs(thePnt.X() - thePntRef.X());
|
||||||
@@ -472,17 +453,17 @@ Standard_Boolean IsDistanceIn2DTolerance (const BRepAdaptor_Surface& aFaceSurfac
|
|||||||
#endif
|
#endif
|
||||||
dumax = aFaceSurface.UResolution(aTol3d);
|
dumax = aFaceSurface.UResolution(aTol3d);
|
||||||
dvmax = aFaceSurface.VResolution(aTol3d);
|
dvmax = aFaceSurface.VResolution(aTol3d);
|
||||||
//gp_Pnt aP;
|
gp_Pnt aP;
|
||||||
//gp_Vec aDU, aDV;
|
gp_Vec aDU, aDV;
|
||||||
//Standard_Real um = (thePnt.X() + thePntRef.X()) / 2.;
|
Standard_Real um = (thePnt.X() + thePntRef.X()) / 2.;
|
||||||
//Standard_Real vm = (thePnt.Y() + thePntRef.Y()) / 2.;
|
Standard_Real vm = (thePnt.Y() + thePntRef.Y()) / 2.;
|
||||||
//aFaceSurface.D1(um, vm, aP, aDU, aDV);
|
aFaceSurface.D1(um, vm, aP, aDU, aDV);
|
||||||
//Standard_Real aMDU = aDU.Magnitude();
|
Standard_Real aMDU = aDU.Magnitude();
|
||||||
if (aMDU > Precision::Confusion())
|
if (aMDU > Precision::Confusion())
|
||||||
{
|
{
|
||||||
dumax = Max((aTol3d / aMDU), dumax);
|
dumax = Max((aTol3d / aMDU), dumax);
|
||||||
}
|
}
|
||||||
//Standard_Real aMDV = aDV.Magnitude();
|
Standard_Real aMDV = aDV.Magnitude();
|
||||||
if (aMDV > Precision::Confusion())
|
if (aMDV > Precision::Confusion())
|
||||||
{
|
{
|
||||||
dvmax = Max((aTol3d / aMDV), dvmax);
|
dvmax = Max((aTol3d / aMDV), dvmax);
|
||||||
@@ -695,14 +676,7 @@ BRepCheck_Status BRepCheck_Wire::Closed2d(const TopoDS_Face& theFace,
|
|||||||
gp_Pnt aPntRef = BRep_Tool::Pnt(aFirstVertex);
|
gp_Pnt aPntRef = BRep_Tool::Pnt(aFirstVertex);
|
||||||
gp_Pnt aPnt = BRep_Tool::Pnt(aWireExp.CurrentVertex());
|
gp_Pnt aPnt = BRep_Tool::Pnt(aWireExp.CurrentVertex());
|
||||||
|
|
||||||
Standard_Real aUperiod = 0., aVperiod = 0.;
|
if (!(IsDistanceIn2DTolerance(aFaceSurface, aP_first, aP_last, aTol3d)))
|
||||||
DefinePeriods (theFace, aUperiod, aVperiod);
|
|
||||||
|
|
||||||
if ((aUperiod != 0. && Abs(aP_first.X() - aP_last.X()) > aUperiod/2) ||
|
|
||||||
(aVperiod != 0. && Abs(aP_first.Y() - aP_last.Y()) > aVperiod/2))
|
|
||||||
aClosedStat = BRepCheck_NotClosed;
|
|
||||||
|
|
||||||
if (!(IsDistanceIn2DTolerance(aFaceSurface, aP_first, aP_last, aTol3d, Standard_True)))
|
|
||||||
aClosedStat = BRepCheck_NotClosed;
|
aClosedStat = BRepCheck_NotClosed;
|
||||||
|
|
||||||
if(!IsDistanceIn3DTolerance(aPntRef, aPnt, aTol3d))
|
if(!IsDistanceIn3DTolerance(aPntRef, aPnt, aTol3d))
|
||||||
@@ -1736,24 +1710,10 @@ void ChoixUV(const TopoDS_Vertex& theVertex,
|
|||||||
if (aVOrientation != anEdgOrientation)
|
if (aVOrientation != anEdgOrientation)
|
||||||
aDerRef.Reverse();
|
aDerRef.Reverse();
|
||||||
|
|
||||||
//Check if there is a seam edge in the list
|
|
||||||
Standard_Real aUperiod = 0., aVperiod = 0.;
|
|
||||||
DefinePeriods (theFace, aUperiod, aVperiod);
|
|
||||||
Standard_Boolean anIsOnSingularity = Standard_False;
|
|
||||||
for (It.Initialize(theLOfShape); It.More(); It.Next())
|
|
||||||
{
|
|
||||||
TopoDS_Edge anEdge = TopoDS::Edge (It.Value());
|
|
||||||
if (BRep_Tool::Degenerated (anEdge))
|
|
||||||
{
|
|
||||||
anIsOnSingularity = Standard_True;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
It.Initialize(theLOfShape);
|
It.Initialize(theLOfShape);
|
||||||
|
|
||||||
for (; It.More(); It.Next())
|
for (; It.More(); It.Next())
|
||||||
{
|
{
|
||||||
anIndex++;
|
anIndex++;
|
||||||
const TopoDS_Edge& anE=TopoDS::Edge(It.Value());
|
const TopoDS_Edge& anE=TopoDS::Edge(It.Value());
|
||||||
C2d = BRep_Tool::CurveOnSurface(anE, theFace, aFirstParam, aLastParam);
|
C2d = BRep_Tool::CurveOnSurface(anE, theFace, aFirstParam, aLastParam);
|
||||||
@@ -1764,11 +1724,7 @@ void ChoixUV(const TopoDS_Vertex& theVertex,
|
|||||||
aParam =(aVOrientation != anE.Orientation()) ? aFirstParam : aLastParam;
|
aParam =(aVOrientation != anE.Orientation()) ? aFirstParam : aLastParam;
|
||||||
aPnt = aCA.Value(aParam);
|
aPnt = aCA.Value(aParam);
|
||||||
|
|
||||||
if ((aUperiod != 0. && Abs(aPnt.X() - aPntRef.X()) > aUperiod/2) ||
|
if(!IsDistanceIn2DTolerance(aFaceSurface, aPnt, aPntRef, aTol3d, Standard_False))
|
||||||
(aVperiod != 0. && Abs(aPnt.Y() - aPntRef.Y()) > aVperiod/2))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if(!IsDistanceIn2DTolerance(aFaceSurface, aPnt, aPntRef, aTol3d, anIsOnSingularity, Standard_False))
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
CurveDirForParameter(aCA, aParam, aPnt, aDer);
|
CurveDirForParameter(aCA, aParam, aPnt, aDer);
|
||||||
@@ -1787,22 +1743,22 @@ void ChoixUV(const TopoDS_Vertex& theVertex,
|
|||||||
anAngle += 2.*M_PI;
|
anAngle += 2.*M_PI;
|
||||||
|
|
||||||
if ( theFace.Orientation() == TopAbs_FORWARD )
|
if ( theFace.Orientation() == TopAbs_FORWARD )
|
||||||
{
|
|
||||||
if ( anAngle < aMinAngle )
|
|
||||||
{
|
{
|
||||||
|
if ( anAngle < aMinAngle )
|
||||||
|
{
|
||||||
anIndMin = anIndex;
|
anIndMin = anIndex;
|
||||||
aMinAngle = anAngle;
|
aMinAngle = anAngle;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else //theFace.Orientation() != TopAbs_FORWARD
|
else //theFace.Orientation() != TopAbs_FORWARD
|
||||||
{
|
|
||||||
if ( anAngle > aMaxAngle )
|
|
||||||
{
|
{
|
||||||
|
if ( anAngle > aMaxAngle )
|
||||||
|
{
|
||||||
anIndMin = anIndex;
|
anIndMin = anIndex;
|
||||||
aMaxAngle = anAngle;
|
aMaxAngle = anAngle;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}//end of for
|
||||||
}//end of for
|
|
||||||
|
|
||||||
// Update edge
|
// Update edge
|
||||||
if (anIndMin == 0)
|
if (anIndMin == 0)
|
||||||
@@ -1814,7 +1770,7 @@ void ChoixUV(const TopoDS_Vertex& theVertex,
|
|||||||
if(anEFound.IsNull() || BRep_Tool::Degenerated(theEdge) ||
|
if(anEFound.IsNull() || BRep_Tool::Degenerated(theEdge) ||
|
||||||
BRep_Tool::Degenerated(anEFound))
|
BRep_Tool::Degenerated(anEFound))
|
||||||
IsFound = Standard_False; //bad
|
IsFound = Standard_False; //bad
|
||||||
else if (!IsDistanceIn2DTolerance(aFaceSurface, aPnt, aPntRef, aTol3d, Standard_True))
|
else if (!IsDistanceIn2DTolerance(aFaceSurface, aPnt, aPntRef, aTol3d))
|
||||||
IsFound = Standard_False; //bad
|
IsFound = Standard_False; //bad
|
||||||
else
|
else
|
||||||
// clousureness in 3D
|
// clousureness in 3D
|
||||||
@@ -2003,20 +1959,3 @@ static Standard_Boolean IsClosed2dForPeriodicFace
|
|||||||
return Standard_True;
|
return Standard_True;
|
||||||
}
|
}
|
||||||
// Modified by Sergey KHROMOV - Thu Jun 20 10:58:05 2002 End
|
// Modified by Sergey KHROMOV - Thu Jun 20 10:58:05 2002 End
|
||||||
|
|
||||||
void DefinePeriods(const TopoDS_Face& theFace,
|
|
||||||
Standard_Real& theUperiod,
|
|
||||||
Standard_Real& theVperiod)
|
|
||||||
{
|
|
||||||
theUperiod = theVperiod = 0.;
|
|
||||||
|
|
||||||
Handle(Geom_Surface) aSurf = BRep_Tool::Surface (theFace);
|
|
||||||
if (aSurf->IsKind(STANDARD_TYPE(Geom_RectangularTrimmedSurface)))
|
|
||||||
aSurf = (Handle(Geom_RectangularTrimmedSurface)::DownCast(aSurf))->BasisSurface();
|
|
||||||
Standard_Real aUmin, aUmax, aVmin, aVmax;
|
|
||||||
aSurf->Bounds (aUmin, aUmax, aVmin, aVmax);
|
|
||||||
if (aSurf->IsUClosed())
|
|
||||||
theUperiod = aUmax - aUmin;
|
|
||||||
if (aSurf->IsVClosed())
|
|
||||||
theVperiod = aVmax - aVmin;
|
|
||||||
}
|
|
||||||
|
@@ -861,8 +861,7 @@ static Standard_Boolean Filling(const TopoDS_Shape& EF,
|
|||||||
Prof2 = BRep_Tool::Curve(E2, f2, l2);
|
Prof2 = BRep_Tool::Curve(E2, f2, l2);
|
||||||
|
|
||||||
// Indeed, both Prof1 and Prof2 are the same curves but in different positions
|
// Indeed, both Prof1 and Prof2 are the same curves but in different positions
|
||||||
// Prof1's param domain may equals to Prof2's param domain *(-1), which means EF.Orientation() == EL.Orientation()
|
|
||||||
Standard_Boolean bSameCurveDomain = EF.Orientation() != EL.Orientation();
|
|
||||||
gp_Pnt P1, P2, P;
|
gp_Pnt P1, P2, P;
|
||||||
|
|
||||||
// Choose the angle of opening
|
// Choose the angle of opening
|
||||||
@@ -888,8 +887,7 @@ static Standard_Boolean Filling(const TopoDS_Shape& EF,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const Standard_Real aPrm2[] = { f2, 0.5*(f2 + l2), l2 };
|
const gp_Pnt aP2 = Prof2->Value(aPrm[aMaxIdx]).Transformed(aTf);
|
||||||
const gp_Pnt aP2 = Prof2->Value(aPrm2[bSameCurveDomain ? aMaxIdx : 2 - aMaxIdx]).Transformed(aTf);
|
|
||||||
const gp_Vec2d aV1(aP1[aMaxIdx].Z(), aP1[aMaxIdx].X());
|
const gp_Vec2d aV1(aP1[aMaxIdx].Z(), aP1[aMaxIdx].X());
|
||||||
const gp_Vec2d aV2(aP2.Z(), aP2.X());
|
const gp_Vec2d aV2(aP2.Z(), aP2.X());
|
||||||
if (aV1.SquareMagnitude() <= gp::Resolution() ||
|
if (aV1.SquareMagnitude() <= gp::Resolution() ||
|
||||||
|
@@ -205,10 +205,10 @@ static void fillParams (const TColStd_Array1OfReal& theKnots,
|
|||||||
theParams.Append (theParMax);
|
theParams.Append (theParMax);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void fillPoints (const BRepAdaptor_Curve& theCurve,
|
static void fillPoints (const BRepAdaptor_Curve& theCurve,
|
||||||
const NCollection_Vector<Standard_Real>& theParams,
|
const NCollection_Vector<Standard_Real> theParams,
|
||||||
TColgp_SequenceOfPnt& thePoints,
|
TColgp_SequenceOfPnt& thePoints,
|
||||||
TColStd_SequenceOfReal& theWeights)
|
TColStd_SequenceOfReal& theWeights)
|
||||||
{
|
{
|
||||||
Standard_Real aDistPrev = 0., aDistNext;
|
Standard_Real aDistPrev = 0., aDistNext;
|
||||||
gp_Pnt aPPrev (theCurve.Value (theParams (0))), aPNext;
|
gp_Pnt aPPrev (theCurve.Value (theParams (0))), aPNext;
|
||||||
|
@@ -29,7 +29,7 @@
|
|||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
static Handle(Geom2d_Curve) Project(const Handle(Geom_Curve)& M,
|
static Handle(Geom2d_Curve) Project(const Handle(Geom_Curve)& M,
|
||||||
const gp_Ax3& Axis)
|
const gp_Ax3 Axis)
|
||||||
{
|
{
|
||||||
Handle(Geom2d_Curve) C;
|
Handle(Geom2d_Curve) C;
|
||||||
C = GeomProjLib::Curve2d(M,new Geom_Plane(Axis));
|
C = GeomProjLib::Curve2d(M,new Geom_Plane(Axis));
|
||||||
|
@@ -42,7 +42,6 @@
|
|||||||
#include <LocOpe_FindEdgesInFace.hxx>
|
#include <LocOpe_FindEdgesInFace.hxx>
|
||||||
|
|
||||||
#include <BRepOffset_MakeOffset.hxx>
|
#include <BRepOffset_MakeOffset.hxx>
|
||||||
#include <BRepOffsetAPI_MakeOffsetShape.hxx>
|
|
||||||
#include <BRepOffset_MakeSimpleOffset.hxx>
|
#include <BRepOffset_MakeSimpleOffset.hxx>
|
||||||
#include <BRep_Builder.hxx>
|
#include <BRep_Builder.hxx>
|
||||||
#include <DBRep.hxx>
|
#include <DBRep.hxx>
|
||||||
@@ -977,81 +976,6 @@ Standard_Integer thickshell(Draw_Interpretor& theCommands,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
|
||||||
//function : mkoffsetshape
|
|
||||||
//purpose :
|
|
||||||
//=======================================================================
|
|
||||||
static Standard_Integer mkoffsetshape(Draw_Interpretor& theDI,
|
|
||||||
Standard_Integer theArgNb,
|
|
||||||
const char** theArgVec)
|
|
||||||
{
|
|
||||||
if (theArgNb < 4)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
TopoDS_Shape aShape = DBRep::Get(theArgVec[2]);
|
|
||||||
if (aShape.IsNull())
|
|
||||||
{
|
|
||||||
theDI << "Shape is null";
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
Standard_Real anOffVal = Draw::Atof(theArgVec[3]);
|
|
||||||
BRepOffsetAPI_MakeOffsetShape aMaker;
|
|
||||||
if (theArgNb == 4)
|
|
||||||
{
|
|
||||||
aMaker.PerformBySimple(aShape, anOffVal);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Standard_Real aTol = Draw::Atof(theArgVec[4]);
|
|
||||||
|
|
||||||
Standard_Boolean anInt = Standard_False;
|
|
||||||
if (theArgNb > 5)
|
|
||||||
{
|
|
||||||
if ((Draw::Atof(theArgVec[5]) == 1))
|
|
||||||
{
|
|
||||||
anInt = Standard_True;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Standard_Boolean aSelfInt = Standard_False;
|
|
||||||
if (theArgNb > 6)
|
|
||||||
{
|
|
||||||
if (Draw::Atof(theArgVec[6]) == 1)
|
|
||||||
{
|
|
||||||
aSelfInt = Standard_True;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
GeomAbs_JoinType aJoin = GeomAbs_Arc;
|
|
||||||
if (theArgNb > 7)
|
|
||||||
{
|
|
||||||
if (!strcmp(theArgVec[7], "i"))
|
|
||||||
{
|
|
||||||
aJoin = GeomAbs_Intersection;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Standard_Boolean aRemIntEdges = Standard_False;
|
|
||||||
if (theArgNb > 8)
|
|
||||||
{
|
|
||||||
if (Draw::Atof(theArgVec[8]) == 1)
|
|
||||||
{
|
|
||||||
aRemIntEdges = Standard_True;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
aMaker.PerformByJoin(aShape, anOffVal, aTol, BRepOffset_Skin, anInt, aSelfInt, aJoin, aRemIntEdges);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!aMaker.IsDone())
|
|
||||||
{
|
|
||||||
theDI << " Error: Offset is not done.\n";
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
DBRep::Set(theArgVec[1], aMaker.Shape());
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : offsetshape
|
//function : offsetshape
|
||||||
//purpose :
|
//purpose :
|
||||||
@@ -2553,10 +2477,6 @@ void BRepTest::FeatureCommands(Draw_Interpretor& theCommands)
|
|||||||
"thickshell r shape offset [jointype [tol] ]",
|
"thickshell r shape offset [jointype [tol] ]",
|
||||||
__FILE__, thickshell, g);
|
__FILE__, thickshell, g);
|
||||||
|
|
||||||
theCommands.Add("mkoffsetshape",
|
|
||||||
"mkoffsetshape r shape offset [Tol] [Intersection(0/1)] [SelfInter(0/1)] [JoinType(a/i)] [RemoveInternalEdges(0/1)]",
|
|
||||||
__FILE__, mkoffsetshape, g);
|
|
||||||
|
|
||||||
theCommands.Add("offsetshape",
|
theCommands.Add("offsetshape",
|
||||||
"offsetshape r shape offset [tol] [face ...]",
|
"offsetshape r shape offset [tol] [face ...]",
|
||||||
__FILE__, offsetshape, g);
|
__FILE__, offsetshape, g);
|
||||||
|
@@ -308,8 +308,8 @@ Handle(IGESData_IGESEntity) BRepToIGES_BRWire ::TransferEdge (const TopoDS_Edge&
|
|||||||
const Standard_Boolean theIsBRepMode)
|
const Standard_Boolean theIsBRepMode)
|
||||||
{
|
{
|
||||||
Handle(IGESData_IGESEntity) res;
|
Handle(IGESData_IGESEntity) res;
|
||||||
if (theEdge.IsNull() || GetPCurveMode() ==0 ||
|
if (theEdge.IsNull() || ( ! theIsBRepMode && BRep_Tool::Degenerated (theEdge) ) )
|
||||||
( ! theIsBRepMode && BRep_Tool::Degenerated (theEdge) ) ) return res;
|
return res;
|
||||||
|
|
||||||
//S4181 pdn 23.04.99 adjusting length factor according to analytic mode.
|
//S4181 pdn 23.04.99 adjusting length factor according to analytic mode.
|
||||||
Standard_Real myLen = theLength;
|
Standard_Real myLen = theLength;
|
||||||
|
@@ -54,29 +54,6 @@ static Standard_Real GetNextParamOnPC(const Handle(Geom2d_Curve)& aPC,
|
|||||||
const Standard_Real& tolV,
|
const Standard_Real& tolV,
|
||||||
const Standard_Boolean& reverse);
|
const Standard_Boolean& reverse);
|
||||||
|
|
||||||
static Standard_Real LocalUresol (const TopoDS_Vertex& theVertex,
|
|
||||||
const TopoDS_Face& theFace,
|
|
||||||
const gp_Pnt2d& theP2d1,
|
|
||||||
const gp_Pnt2d& theP2d2)
|
|
||||||
{
|
|
||||||
Standard_Real aResol = -1;
|
|
||||||
|
|
||||||
BRepAdaptor_Surface aBAsurf (theFace, Standard_False);
|
|
||||||
if (aBAsurf.GetType() == GeomAbs_Sphere)
|
|
||||||
{
|
|
||||||
Standard_Real aRadius = aBAsurf.Sphere().Radius();
|
|
||||||
Standard_Real aVmid = (theP2d1.Y() + theP2d2.Y())/2.;
|
|
||||||
Standard_Real aLocalRad = aRadius * Cos(aVmid);
|
|
||||||
if (aLocalRad > Precision::Confusion())
|
|
||||||
{
|
|
||||||
Standard_Real aTolVertex = BRep_Tool::Tolerance (theVertex);
|
|
||||||
aResol = aTolVertex / aLocalRad;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return aResol;
|
|
||||||
}
|
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : BRepTools_WireExplorer
|
//function : BRepTools_WireExplorer
|
||||||
//purpose :
|
//purpose :
|
||||||
@@ -559,56 +536,56 @@ void BRepTools_WireExplorer::Next()
|
|||||||
it.Initialize(l);
|
it.Initialize(l);
|
||||||
while( it.More() )
|
while( it.More() )
|
||||||
{
|
{
|
||||||
const TopoDS_Edge& E = TopoDS::Edge(it.Value());
|
const TopoDS_Edge& E = TopoDS::Edge(it.Value());
|
||||||
if( E.IsSame(myEdge) )
|
if( E.IsSame(myEdge) )
|
||||||
|
{
|
||||||
|
it.Next();
|
||||||
|
k++;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
TopoDS_Vertex aVert1, aVert2;
|
||||||
|
TopExp::Vertices (E, aVert1, aVert2, Standard_True);
|
||||||
|
if( aVert1.IsNull() || aVert2.IsNull() )
|
||||||
{
|
{
|
||||||
it.Next();
|
it.Next();
|
||||||
k++;
|
k++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
TopoDS_Vertex aVert1, aVert2;
|
aPCurve = BRep_Tool::CurveOnSurface (E, myFace, dfFPar, dfLPar);
|
||||||
TopExp::Vertices (E, aVert1, aVert2, Standard_True);
|
if( aPCurve.IsNull() )
|
||||||
if( aVert1.IsNull() || aVert2.IsNull() )
|
|
||||||
{
|
{
|
||||||
it.Next();
|
it.Next();
|
||||||
k++;
|
k++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
aPCurve = BRep_Tool::CurveOnSurface (E, myFace, dfFPar, dfLPar);
|
gp_Pnt2d aPEb, aPEe;
|
||||||
if( aPCurve.IsNull() )
|
if( aVert1.IsSame(aVert2) == isDegenerated )
|
||||||
{
|
{
|
||||||
it.Next();
|
if( E.Orientation() == TopAbs_REVERSED )
|
||||||
k++;
|
aPCurve->D0(dfLPar, aPEb);
|
||||||
continue;
|
else
|
||||||
}
|
aPCurve->D0(dfFPar, aPEb);
|
||||||
|
|
||||||
gp_Pnt2d aPEb, aPEe;
|
if( Abs(dfLPar-dfFPar) > Precision::PConfusion() )
|
||||||
if( aVert1.IsSame(aVert2) == isDegenerated )
|
{
|
||||||
{
|
isrevese = ( E.Orientation() == TopAbs_REVERSED );
|
||||||
if( E.Orientation() == TopAbs_REVERSED )
|
isrevese = !isrevese;
|
||||||
aPCurve->D0(dfLPar, aPEb);
|
Standard_Real aEPm = GetNextParamOnPC(aPCurve,aPEb,dfFPar,dfLPar,myTolU,myTolV,isrevese);
|
||||||
else
|
|
||||||
aPCurve->D0(dfFPar, aPEb);
|
aPCurve->D0 (aEPm, aPEe);
|
||||||
|
|
||||||
if( Abs(dfLPar-dfFPar) > Precision::PConfusion() )
|
|
||||||
{
|
|
||||||
isrevese = ( E.Orientation() == TopAbs_REVERSED );
|
|
||||||
isrevese = !isrevese;
|
|
||||||
Standard_Real aEPm = GetNextParamOnPC(aPCurve,aPEb,dfFPar,dfLPar,myTolU,myTolV,isrevese);
|
|
||||||
|
|
||||||
aPCurve->D0 (aEPm, aPEe);
|
|
||||||
if(aPEb.SquareDistance(aPEe) <= gp::Resolution())
|
if(aPEb.SquareDistance(aPEe) <= gp::Resolution())
|
||||||
{
|
{
|
||||||
//seems to be very short curve
|
//seems to be very short curve
|
||||||
gp_Vec2d aD;
|
gp_Vec2d aD;
|
||||||
aPCurve->D1(aEPm, aPEe, aD);
|
aPCurve->D1(aEPm, aPEe, aD);
|
||||||
if( E.Orientation() == TopAbs_REVERSED )
|
if( E.Orientation() == TopAbs_REVERSED )
|
||||||
aPEe.SetXY(aPEb.XY()-aD.XY());
|
aPEe.SetXY(aPEb.XY()-aD.XY());
|
||||||
else
|
else
|
||||||
aPEe.SetXY(aPEb.XY()+aD.XY());
|
aPEe.SetXY(aPEb.XY()+aD.XY());
|
||||||
|
|
||||||
if(aPEb.SquareDistance(aPEe) <= gp::Resolution())
|
if(aPEb.SquareDistance(aPEe) <= gp::Resolution())
|
||||||
{
|
{
|
||||||
it.Next();
|
it.Next();
|
||||||
@@ -616,39 +593,35 @@ void BRepTools_WireExplorer::Next()
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
gp_Vec2d anEDir(aPEb, aPEe);
|
gp_Vec2d anEDir(aPEb, aPEe);
|
||||||
dfCurAngle = Abs( anEDir.Angle(anERefDir) );
|
dfCurAngle = Abs( anEDir.Angle(anERefDir) );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( dfCurAngle <= dfMinAngle )
|
if( dfCurAngle <= dfMinAngle )
|
||||||
{
|
{
|
||||||
Standard_Real d = PRef.SquareDistance(aPEb);
|
Standard_Real d = PRef.SquareDistance(aPEb);
|
||||||
if( d <= Precision::PConfusion() )
|
if( d <= Precision::PConfusion() )
|
||||||
d = 0.;
|
d = 0.;
|
||||||
//jgv
|
if( Abs(aPEb.X()-PRef.X()) < myTolU && Abs(aPEb.Y()-PRef.Y()) < myTolV )
|
||||||
Standard_Real aLocalUresol = LocalUresol (myVertex, myFace, PRef, aPEb);
|
{
|
||||||
aLocalUresol = Max (aLocalUresol, myTolU);
|
if( d <= dmin )
|
||||||
/////
|
{
|
||||||
if( Abs(aPEb.X()-PRef.X()) < aLocalUresol && Abs(aPEb.Y()-PRef.Y()) < myTolV )
|
dfMinAngle = dfCurAngle;
|
||||||
{
|
kMin = k;
|
||||||
if( d <= dmin )
|
dmin = d;
|
||||||
{
|
}
|
||||||
dfMinAngle = dfCurAngle;
|
}
|
||||||
kMin = k;
|
}
|
||||||
dmin = d;
|
}
|
||||||
}
|
it.Next();
|
||||||
}
|
k++;
|
||||||
}
|
|
||||||
}
|
|
||||||
it.Next();
|
|
||||||
k++;
|
|
||||||
}// while it
|
}// while it
|
||||||
|
|
||||||
if( kMin == 0 )
|
if( kMin == 0 )
|
||||||
{
|
{
|
||||||
isDegenerated = Standard_False;
|
isDegenerated = Standard_False;
|
||||||
k = 1;
|
k = 1;
|
||||||
dmin = RealLast();
|
dmin = RealLast();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
break;
|
break;
|
||||||
|
@@ -28,7 +28,7 @@ const Standard_CString BinTools_ShapeSetBase::THE_ASCII_VERSIONS[BinTools_Format
|
|||||||
//function : operator << (gp_Pnt)
|
//function : operator << (gp_Pnt)
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
Standard_OStream& operator << (Standard_OStream& OS, const gp_Pnt& P)
|
Standard_OStream& operator << (Standard_OStream& OS, const gp_Pnt P)
|
||||||
{
|
{
|
||||||
BinTools::PutReal (OS, P.X());
|
BinTools::PutReal (OS, P.X());
|
||||||
BinTools::PutReal (OS, P.Y());
|
BinTools::PutReal (OS, P.Y());
|
||||||
|
@@ -27,7 +27,7 @@ class TopoDS_Shape;
|
|||||||
class gp_Pnt;
|
class gp_Pnt;
|
||||||
|
|
||||||
//! Writes to the stream a gp_Pnt data
|
//! Writes to the stream a gp_Pnt data
|
||||||
Standard_OStream& operator << (Standard_OStream& OS, const gp_Pnt& P);
|
Standard_OStream& operator << (Standard_OStream& OS, const gp_Pnt P);
|
||||||
|
|
||||||
//! Computes a hash code for the given value of the uint64_t type, in range [1, theUpperBound]
|
//! Computes a hash code for the given value of the uint64_t type, in range [1, theUpperBound]
|
||||||
inline Standard_Integer HashCode (const uint64_t theValue, const Standard_Integer theUpperBound)
|
inline Standard_Integer HashCode (const uint64_t theValue, const Standard_Integer theUpperBound)
|
||||||
|
@@ -46,7 +46,7 @@ Bnd_Box::Bnd_Box()
|
|||||||
//function : Bnd_Box
|
//function : Bnd_Box
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
Bnd_Box::Bnd_Box (const gp_Pnt& theMin, const gp_Pnt& theMax)
|
Bnd_Box::Bnd_Box (const gp_Pnt theMin, const gp_Pnt theMax)
|
||||||
: Gap (0.0)
|
: Gap (0.0)
|
||||||
{
|
{
|
||||||
SetVoid();
|
SetVoid();
|
||||||
|
@@ -71,7 +71,7 @@ public:
|
|||||||
//! Creates a bounding box, it contains:
|
//! Creates a bounding box, it contains:
|
||||||
//! - minimum/maximum point of bounding box,
|
//! - minimum/maximum point of bounding box,
|
||||||
//! The constructed box is qualified Void. Its gap is null.
|
//! The constructed box is qualified Void. Its gap is null.
|
||||||
Standard_EXPORT Bnd_Box (const gp_Pnt& theMin, const gp_Pnt& theMax);
|
Standard_EXPORT Bnd_Box (const gp_Pnt theMin, const gp_Pnt theMax);
|
||||||
|
|
||||||
//! Sets this bounding box so that it covers the whole of 3D space.
|
//! Sets this bounding box so that it covers the whole of 3D space.
|
||||||
//! It is infinitely long in all directions.
|
//! It is infinitely long in all directions.
|
||||||
|
@@ -798,7 +798,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
SurfMaxMinCoord & operator = (const SurfMaxMinCoord & theOther);
|
SurfMaxMinCoord & operator = (const SurfMaxMinCoord & theOther);
|
||||||
|
|
||||||
Standard_Boolean CheckInputData(const math_Vector& theParams)
|
Standard_Boolean CheckInputData(const math_Vector theParams)
|
||||||
{
|
{
|
||||||
if (theParams(1) < myUMin ||
|
if (theParams(1) < myUMin ||
|
||||||
theParams(1) > myUMax ||
|
theParams(1) > myUMax ||
|
||||||
|
@@ -1502,12 +1502,12 @@ static Standard_Boolean containE(const TopoDS_Face & F1,
|
|||||||
// <tol> from <Param>, check points between <Pf> and <Pl>
|
// <tol> from <Param>, check points between <Pf> and <Pl>
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
static Standard_Boolean IsShrink(const Geom2dAdaptor_Curve& PC,
|
static Standard_Boolean IsShrink(const Geom2dAdaptor_Curve PC,
|
||||||
const Standard_Real Pf,
|
const Standard_Real Pf,
|
||||||
const Standard_Real Pl,
|
const Standard_Real Pl,
|
||||||
const Standard_Real Param,
|
const Standard_Real Param,
|
||||||
const Standard_Boolean isU,
|
const Standard_Boolean isU,
|
||||||
const Standard_Real tol)
|
const Standard_Real tol)
|
||||||
{
|
{
|
||||||
switch (PC.GetType()) {
|
switch (PC.GetType()) {
|
||||||
case GeomAbs_Line: {
|
case GeomAbs_Line: {
|
||||||
|
@@ -60,10 +60,10 @@
|
|||||||
// la distance de PntD par rapport au plan passant par les trois
|
// la distance de PntD par rapport au plan passant par les trois
|
||||||
// points PntA, PntB, PntC
|
// points PntA, PntB, PntC
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
static Standard_Boolean CoPlanar(const gp_Pnt& PntA,
|
static Standard_Boolean CoPlanar(const gp_Pnt PntA,
|
||||||
const gp_Pnt& PntB,
|
const gp_Pnt PntB,
|
||||||
const gp_Pnt& PntC,
|
const gp_Pnt PntC,
|
||||||
const gp_Pnt& PntD)
|
const gp_Pnt PntD)
|
||||||
{
|
{
|
||||||
gp_Vec vecAB(PntA, PntB);
|
gp_Vec vecAB(PntA, PntB);
|
||||||
gp_Vec vecAC(PntA, PntC);
|
gp_Vec vecAC(PntA, PntC);
|
||||||
|
@@ -128,8 +128,7 @@ IDirect3DSurface9* D3DHost_View::D3dColorSurface() const
|
|||||||
// function : SetWindow
|
// function : SetWindow
|
||||||
// purpose :
|
// purpose :
|
||||||
// =======================================================================
|
// =======================================================================
|
||||||
void D3DHost_View::SetWindow (const Handle(Graphic3d_CView)& theParentVIew,
|
void D3DHost_View::SetWindow (const Handle(Aspect_Window)& theWindow,
|
||||||
const Handle(Aspect_Window)& theWindow,
|
|
||||||
const Aspect_RenderingContext theContext)
|
const Aspect_RenderingContext theContext)
|
||||||
{
|
{
|
||||||
if (!myD3dWglFbo.IsNull())
|
if (!myD3dWglFbo.IsNull())
|
||||||
@@ -143,7 +142,7 @@ void D3DHost_View::SetWindow (const Handle(Graphic3d_CView)& theParentVIew,
|
|||||||
myD3dDevice = NULL;
|
myD3dDevice = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
OpenGl_View::SetWindow (theParentVIew, theWindow, theContext);
|
OpenGl_View::SetWindow (theWindow, theContext);
|
||||||
|
|
||||||
if (!myWindow.IsNull())
|
if (!myWindow.IsNull())
|
||||||
{
|
{
|
||||||
|
@@ -44,8 +44,12 @@ public:
|
|||||||
Standard_EXPORT virtual void ReleaseGlResources (const Handle(OpenGl_Context)& theCtx) Standard_OVERRIDE;
|
Standard_EXPORT virtual void ReleaseGlResources (const Handle(OpenGl_Context)& theCtx) Standard_OVERRIDE;
|
||||||
|
|
||||||
//! Creates and maps rendering window to the view.
|
//! Creates and maps rendering window to the view.
|
||||||
Standard_EXPORT virtual void SetWindow (const Handle(Graphic3d_CView)& theParentVIew,
|
//! @param theWindow [in] the window.
|
||||||
const Handle(Aspect_Window)& theWindow,
|
//! @param theContext [in] the rendering context. If NULL the context will be created internally.
|
||||||
|
//! @param theDisplayCB [in] the display callback function. If is not a NULL value, then the callback will be
|
||||||
|
//! invoked at the end of the OCC graphic traversal and just before the swap of buffers.
|
||||||
|
//! @param theClientData [in] the client data for the callback.
|
||||||
|
Standard_EXPORT virtual void SetWindow (const Handle(Aspect_Window)& theWindow,
|
||||||
const Aspect_RenderingContext theContext) Standard_OVERRIDE;
|
const Aspect_RenderingContext theContext) Standard_OVERRIDE;
|
||||||
|
|
||||||
//! Resizes the window.
|
//! Resizes the window.
|
||||||
|
@@ -56,7 +56,7 @@ static Standard_Integer DPrsStd_AISInitViewer (Draw_Interpretor& theDI,
|
|||||||
TCollection_AsciiString aViewName = TCollection_AsciiString ("Driver1/Document_") + theArgVec[1] + "/View1";
|
TCollection_AsciiString aViewName = TCollection_AsciiString ("Driver1/Document_") + theArgVec[1] + "/View1";
|
||||||
if (!TPrsStd_AISViewer::Find (aRoot, aDocViewer))
|
if (!TPrsStd_AISViewer::Find (aRoot, aDocViewer))
|
||||||
{
|
{
|
||||||
ViewerTest::ViewerInit (aViewName);
|
ViewerTest::ViewerInit (0, 0, 0, 0, aViewName.ToCString(), "");
|
||||||
aDocViewer = TPrsStd_AISViewer::New (aRoot, ViewerTest::GetAISContext());
|
aDocViewer = TPrsStd_AISViewer::New (aRoot, ViewerTest::GetAISContext());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -602,9 +602,6 @@ void Extrema_ExtCC::PrepareParallelResult(const Standard_Real theUt11,
|
|||||||
const Bnd_Range aRange(theUt21, theUt22);
|
const Bnd_Range aRange(theUt21, theUt22);
|
||||||
Bnd_Range aProjRng1;
|
Bnd_Range aProjRng1;
|
||||||
|
|
||||||
// Precision of the calculation depends on circles radii
|
|
||||||
const Standard_Real aPrecision = Max(Epsilon(myC[0]->Circle().Radius()), Epsilon(myC[1]->Circle().Radius()));
|
|
||||||
|
|
||||||
// Project arc of the 1st circle between points theUt11 and theUt12 to the
|
// Project arc of the 1st circle between points theUt11 and theUt12 to the
|
||||||
// 2nd circle. It is necessary to chose correct arc from two possible ones.
|
// 2nd circle. It is necessary to chose correct arc from two possible ones.
|
||||||
|
|
||||||
@@ -681,7 +678,7 @@ void Extrema_ExtCC::PrepareParallelResult(const Standard_Real theUt11,
|
|||||||
aMinSqD = Min(aMinSqD, ExtPCir.SquareDistance(anExtID));
|
aMinSqD = Min(aMinSqD, ExtPCir.SquareDistance(anExtID));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (aMinSqD <= aMinSquareDist + (1. + aMinSqD) * aPrecision)
|
if (aMinSqD <= aMinSquareDist + (1. + aMinSqD) * Epsilon(1. + aMinSqD))
|
||||||
{
|
{
|
||||||
ClearSolutions();
|
ClearSolutions();
|
||||||
mySqDist.Append(aMinSqD);
|
mySqDist.Append(aMinSqD);
|
||||||
@@ -781,7 +778,7 @@ void Extrema_ExtCC::PrepareParallelResult(const Standard_Real theUt11,
|
|||||||
imin = k;
|
imin = k;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (aDmin <= aMinSquareDist + (1. + aDmin) * aPrecision)
|
if (aDmin <= aMinSquareDist + (1. + aDmin) * Epsilon(1. + aDmin))
|
||||||
{
|
{
|
||||||
if (imin == 0)
|
if (imin == 0)
|
||||||
{
|
{
|
||||||
|
@@ -163,6 +163,7 @@ static Standard_Real ProjPOnC(const Pnt& theP,
|
|||||||
if (aD < aDist)
|
if (aD < aDist)
|
||||||
aDist = aD;
|
aDist = aD;
|
||||||
}
|
}
|
||||||
|
aDist = sqrt(aDist);
|
||||||
}
|
}
|
||||||
return aDist;
|
return aDist;
|
||||||
}
|
}
|
||||||
@@ -339,20 +340,10 @@ void Extrema_GenExtCC::Perform()
|
|||||||
aNbInter[1] = anIntervals2->Length() - 1;
|
aNbInter[1] = anIntervals2->Length() - 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (C1.IsClosed() && aNbInter[0] == 1)
|
|
||||||
{
|
|
||||||
ChangeIntervals(anIntervals1, 3);
|
|
||||||
aNbInter[0] = anIntervals1->Length() - 1;
|
|
||||||
}
|
|
||||||
if (C2.IsClosed() && aNbInter[1] == 1)
|
|
||||||
{
|
|
||||||
ChangeIntervals(anIntervals2, 3);
|
|
||||||
aNbInter[1] = anIntervals2->Length() - 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Lipchitz constant computation.
|
// Lipchitz constant computation.
|
||||||
const Standard_Real aMaxLC = 10000.;
|
const Standard_Real aMaxLC = 10000.;
|
||||||
Standard_Real aLC = 100.0; // Default value.
|
Standard_Real aLC = 9.0; // Default value.
|
||||||
const Standard_Real aMaxDer1 = 1.0 / C1.Resolution(1.0);
|
const Standard_Real aMaxDer1 = 1.0 / C1.Resolution(1.0);
|
||||||
const Standard_Real aMaxDer2 = 1.0 / C2.Resolution(1.0);
|
const Standard_Real aMaxDer2 = 1.0 / C2.Resolution(1.0);
|
||||||
Standard_Real aMaxDer = Max(aMaxDer1, aMaxDer2) * Sqrt(2.0);
|
Standard_Real aMaxDer = Max(aMaxDer1, aMaxDer2) * Sqrt(2.0);
|
||||||
@@ -392,43 +383,6 @@ void Extrema_GenExtCC::Perform()
|
|||||||
}
|
}
|
||||||
|
|
||||||
Extrema_GlobOptFuncCCC2 aFunc (C1, C2);
|
Extrema_GlobOptFuncCCC2 aFunc (C1, C2);
|
||||||
if (aLC < aMaxLC || aMaxDer > aMaxLC)
|
|
||||||
{
|
|
||||||
//Estimation of Lipschitz constant by gradient of optimization function
|
|
||||||
//using sampling in parameter space.
|
|
||||||
math_Vector aT(1, 2), aG(1, 2);
|
|
||||||
Standard_Real aF, aMaxG = 0.;
|
|
||||||
Standard_Real t1, t2, dt1, dt2;
|
|
||||||
Standard_Integer n1 = 21, n2 = 21, i1, i2;
|
|
||||||
dt1 = (C1.LastParameter() - C1.FirstParameter()) / (n1 - 1);
|
|
||||||
dt2 = (C2.LastParameter() - C2.FirstParameter()) / (n2 - 1);
|
|
||||||
for (i1 = 1, t1 = C1.FirstParameter(); i1 <= n1; ++i1, t1 += dt1)
|
|
||||||
{
|
|
||||||
aT(1) = t1;
|
|
||||||
for (i2 = 1, t2 = C2.FirstParameter(); i2 <= n2; ++i2, t2 += dt2)
|
|
||||||
{
|
|
||||||
aT(2) = t2;
|
|
||||||
aFunc.Values(aT, aF, aG);
|
|
||||||
Standard_Real aMod = aG(1)*aG(1) + aG(2)*aG(2);
|
|
||||||
aMaxG = Max(aMaxG, aMod);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
aMaxG = Sqrt(aMaxG);
|
|
||||||
if (aMaxG > aMaxDer)
|
|
||||||
{
|
|
||||||
aLC = Min(aMaxG, aMaxLC);
|
|
||||||
isConstLockedFlag = Standard_True;
|
|
||||||
}
|
|
||||||
if (aMaxG > 100. * aMaxLC)
|
|
||||||
{
|
|
||||||
aLC = 100. * aMaxLC;
|
|
||||||
isConstLockedFlag = Standard_True;
|
|
||||||
}
|
|
||||||
else if (aMaxG < 0.1 * aMaxDer)
|
|
||||||
{
|
|
||||||
isConstLockedFlag = Standard_True;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
math_GlobOptMin aFinder(&aFunc, myLowBorder, myUppBorder, aLC);
|
math_GlobOptMin aFinder(&aFunc, myLowBorder, myUppBorder, aLC);
|
||||||
aFinder.SetLipConstState(isConstLockedFlag);
|
aFinder.SetLipConstState(isConstLockedFlag);
|
||||||
aFinder.SetContinuity(aContinuity == GeomAbs_C2 ? 2 : 1);
|
aFinder.SetContinuity(aContinuity == GeomAbs_C2 ? 2 : 1);
|
||||||
@@ -564,6 +518,7 @@ void Extrema_GenExtCC::Perform()
|
|||||||
aVec(2) = (aCurrent.Y() + aNext.Y()) * 0.5;
|
aVec(2) = (aCurrent.Y() + aNext.Y()) * 0.5;
|
||||||
|
|
||||||
aFunc.Value(aVec, aVal);
|
aFunc.Value(aVec, aVal);
|
||||||
|
|
||||||
if (Abs(aVal - aF) < Precision::Confusion())
|
if (Abs(aVal - aF) < Precision::Confusion())
|
||||||
{
|
{
|
||||||
// It seems the parallel segment is found.
|
// It seems the parallel segment is found.
|
||||||
|
@@ -715,114 +715,23 @@ void Extrema_GenExtPS::BuildGrid(const gp_Pnt &thePoint)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static Standard_Real LengthOfIso(const Adaptor3d_Surface& theS, const GeomAbs_IsoType theIso,
|
// Parametrization of the sample
|
||||||
const Standard_Real thePar1, const Standard_Real thePar2,
|
|
||||||
const Standard_Integer theNbPnts, const Standard_Real thePar)
|
|
||||||
{
|
|
||||||
Standard_Real aLen = 0.;
|
|
||||||
Standard_Integer i;
|
|
||||||
Standard_Real dPar = (thePar2 - thePar1) / (theNbPnts - 1);
|
|
||||||
gp_Pnt aP1, aP2;
|
|
||||||
Standard_Real aPar = thePar1 + dPar;
|
|
||||||
if(theIso == GeomAbs_IsoU)
|
|
||||||
{
|
|
||||||
aP1 = theS.Value(thePar, thePar1);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
aP1 = theS.Value(thePar1, thePar);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 2; i <= theNbPnts; ++i)
|
|
||||||
{
|
|
||||||
if (theIso == GeomAbs_IsoU)
|
|
||||||
{
|
|
||||||
aP2 = theS.Value(thePar, aPar);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
aP2 = theS.Value(aPar, thePar);
|
|
||||||
}
|
|
||||||
aLen += aP1.Distance(aP2);
|
|
||||||
aP1 = aP2;
|
|
||||||
aPar += dPar;
|
|
||||||
}
|
|
||||||
return aLen;
|
|
||||||
}
|
|
||||||
static void CorrectNbSamples(const Adaptor3d_Surface& theS,
|
|
||||||
const Standard_Real theU1, const Standard_Real theU2, Standard_Integer& theNbU,
|
|
||||||
const Standard_Real theV1, const Standard_Real theV2, Standard_Integer& theNbV)
|
|
||||||
{
|
|
||||||
Standard_Real aMinLen = 1.e-3;
|
|
||||||
Standard_Integer nbp = Min(23, theNbV);
|
|
||||||
Standard_Real aLenU1 = LengthOfIso(theS, GeomAbs_IsoU, theV1, theV2, nbp, theU1);
|
|
||||||
if (aLenU1 <= aMinLen)
|
|
||||||
{
|
|
||||||
Standard_Real aL = LengthOfIso(theS, GeomAbs_IsoU, theV1, theV2, nbp, .7*theU1 + 0.3*theU2);
|
|
||||||
aLenU1 = Max(aL, aLenU1);
|
|
||||||
}
|
|
||||||
Standard_Real aLenU2 = LengthOfIso(theS, GeomAbs_IsoU, theV1, theV2, nbp, theU2);
|
|
||||||
if (aLenU2 <= aMinLen)
|
|
||||||
{
|
|
||||||
Standard_Real aL = LengthOfIso(theS, GeomAbs_IsoU, theV1, theV2, nbp, .3*theU1 + 0.7*theU2);
|
|
||||||
aLenU2 = Max(aL, aLenU2);
|
|
||||||
}
|
|
||||||
nbp = Min(23, theNbV);
|
|
||||||
Standard_Real aLenV1 = LengthOfIso(theS, GeomAbs_IsoV, theU1, theU2, nbp, theV1);
|
|
||||||
if (aLenV1 <= aMinLen)
|
|
||||||
{
|
|
||||||
Standard_Real aL = LengthOfIso(theS, GeomAbs_IsoV, theU1, theU2, nbp, .7*theV1 + 0.3*theV2);
|
|
||||||
aLenV1 = Max(aL, aLenV1);
|
|
||||||
}
|
|
||||||
Standard_Real aLenV2 = LengthOfIso(theS, GeomAbs_IsoV, theU1, theU2, nbp, theV2);
|
|
||||||
if (aLenV2 <= aMinLen)
|
|
||||||
{
|
|
||||||
Standard_Real aL = LengthOfIso(theS, GeomAbs_IsoV, theU1, theU2, nbp, .3*theV1 + 0.7*theV2);
|
|
||||||
aLenV2 = Max(aL, aLenV2);
|
|
||||||
}
|
|
||||||
//
|
|
||||||
Standard_Real aStepV1 = aLenU1 / theNbV;
|
|
||||||
Standard_Real aStepV2 = aLenU2 / theNbV;
|
|
||||||
Standard_Real aStepU1 = aLenV1 / theNbU;
|
|
||||||
Standard_Real aStepU2 = aLenV2 / theNbU;
|
|
||||||
|
|
||||||
Standard_Real aMaxStepV = Max(aStepV1, aStepV2);
|
|
||||||
Standard_Real aMaxStepU = Max(aStepU1, aStepU2);
|
|
||||||
//
|
|
||||||
Standard_Real aRatio = aMaxStepV / aMaxStepU;
|
|
||||||
if (aRatio > 10.)
|
|
||||||
{
|
|
||||||
Standard_Integer aMult = RealToInt(Log(aRatio) );
|
|
||||||
if(aMult > 1)
|
|
||||||
theNbV *= aMult;
|
|
||||||
}
|
|
||||||
else if (aRatio < 0.1)
|
|
||||||
{
|
|
||||||
Standard_Integer aMult = RealToInt( - Log(aRatio));
|
|
||||||
if(aMult > 1)
|
|
||||||
theNbV *= aMult;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
void Extrema_GenExtPS::BuildTree()
|
void Extrema_GenExtPS::BuildTree()
|
||||||
{
|
{
|
||||||
// if tree already exists, assume it is already correctly filled
|
// if tree already exists, assume it is already correctly filled
|
||||||
if (!mySphereUBTree.IsNull())
|
if ( ! mySphereUBTree.IsNull() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (myS->GetType() == GeomAbs_BSplineSurface) {
|
if (myS->GetType() == GeomAbs_BSplineSurface) {
|
||||||
Handle(Geom_BSplineSurface) aBspl = myS->BSpline();
|
Handle(Geom_BSplineSurface) aBspl = myS->BSpline();
|
||||||
Standard_Integer aUValue = aBspl->UDegree() * aBspl->NbUKnots();
|
Standard_Integer aUValue = aBspl->UDegree() * aBspl->NbUKnots();
|
||||||
Standard_Integer aVValue = aBspl->VDegree() * aBspl->NbVKnots();
|
Standard_Integer aVValue = aBspl->VDegree() * aBspl->NbVKnots();
|
||||||
// 300 is value, which is used for singular points (see Extrema_ExtPS.cxx::Initialize(...))
|
if (aUValue > myusample)
|
||||||
if (aUValue > myusample)
|
myusample = aUValue;
|
||||||
myusample = Min(aUValue, 300);
|
if (aVValue > myvsample)
|
||||||
if (aVValue > myvsample)
|
myvsample = aVValue;
|
||||||
myvsample = Min(aVValue, 300);
|
}
|
||||||
}
|
|
||||||
//
|
|
||||||
CorrectNbSamples(*myS, myumin, myusup, myusample, myvmin, myvsup, myvsample);
|
|
||||||
//
|
|
||||||
Standard_Real PasU = myusup - myumin;
|
Standard_Real PasU = myusup - myumin;
|
||||||
Standard_Real PasV = myvsup - myvmin;
|
Standard_Real PasV = myvsup - myvmin;
|
||||||
Standard_Real U0 = PasU / myusample / 100.;
|
Standard_Real U0 = PasU / myusample / 100.;
|
||||||
|
@@ -43,7 +43,7 @@ static Standard_Boolean _Value(const Adaptor3d_Curve& C1,
|
|||||||
return Standard_False;
|
return Standard_False;
|
||||||
}
|
}
|
||||||
|
|
||||||
F = C2.Value(v).SquareDistance(C1.Value(u));
|
F = C2.Value(v).Distance(C1.Value(u));
|
||||||
return Standard_True;
|
return Standard_True;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -64,7 +64,7 @@ static Standard_Boolean _Value(const Adaptor2d_Curve2d& C1,
|
|||||||
return Standard_False;
|
return Standard_False;
|
||||||
}
|
}
|
||||||
|
|
||||||
F = C2.Value(v).SquareDistance(C1.Value(u));
|
F = C2.Value(v).Distance(C1.Value(u));
|
||||||
return Standard_True;
|
return Standard_True;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -89,14 +89,13 @@ static Standard_Boolean _Gradient(const Adaptor3d_Curve& C1,
|
|||||||
|
|
||||||
C1.D1(X(1), C1D0, C1D1);
|
C1.D1(X(1), C1D0, C1D1);
|
||||||
C2.D1(X(2), C2D0, C2D1);
|
C2.D1(X(2), C2D0, C2D1);
|
||||||
|
|
||||||
G(1) = - (C2D0.X() - C1D0.X()) * C1D1.X()
|
G(1) = - (C2D0.X() - C1D0.X()) * C1D1.X()
|
||||||
- (C2D0.Y() - C1D0.Y()) * C1D1.Y()
|
- (C2D0.Y() - C1D0.Y()) * C1D1.Y()
|
||||||
- (C2D0.Z() - C1D0.Z()) * C1D1.Z();
|
- (C2D0.Z() - C1D0.Z()) * C1D1.Z();
|
||||||
G(2) = (C2D0.X() - C1D0.X()) * C2D1.X()
|
G(2) = (C2D0.X() - C1D0.X()) * C2D1.X()
|
||||||
+ (C2D0.Y() - C1D0.Y()) * C2D1.Y()
|
+ (C2D0.Y() - C1D0.Y()) * C2D1.Y()
|
||||||
+ (C2D0.Z() - C1D0.Z()) * C2D1.Z();
|
+ (C2D0.Z() - C1D0.Z()) * C2D1.Z();
|
||||||
G *= 2.;
|
|
||||||
return Standard_True;
|
return Standard_True;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -122,11 +121,8 @@ static Standard_Boolean _Gradient(const Adaptor2d_Curve2d& C1,
|
|||||||
|
|
||||||
G(1) = - (C2D0.X() - C1D0.X()) * C1D1.X()
|
G(1) = - (C2D0.X() - C1D0.X()) * C1D1.X()
|
||||||
- (C2D0.Y() - C1D0.Y()) * C1D1.Y();
|
- (C2D0.Y() - C1D0.Y()) * C1D1.Y();
|
||||||
|
|
||||||
G(2) = (C2D0.X() - C1D0.X()) * C2D1.X()
|
G(2) = (C2D0.X() - C1D0.X()) * C2D1.X()
|
||||||
+ (C2D0.Y() - C1D0.Y()) * C2D1.Y();
|
+ (C2D0.Y() - C1D0.Y()) * C2D1.Y();
|
||||||
G *= 2.;
|
|
||||||
|
|
||||||
return Standard_True;
|
return Standard_True;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -170,7 +166,6 @@ static Standard_Boolean _Hessian (const Adaptor3d_Curve& C1,
|
|||||||
+ (C2D0.X() - C1D0.X()) * C2D2.X()
|
+ (C2D0.X() - C1D0.X()) * C2D2.X()
|
||||||
+ (C2D0.Y() - C1D0.Y()) * C2D2.Y()
|
+ (C2D0.Y() - C1D0.Y()) * C2D2.Y()
|
||||||
+ (C2D0.Z() - C1D0.Z()) * C2D2.Z();
|
+ (C2D0.Z() - C1D0.Z()) * C2D2.Z();
|
||||||
H *= 2.;
|
|
||||||
return Standard_True;
|
return Standard_True;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -209,11 +204,10 @@ static Standard_Boolean _Hessian (const Adaptor2d_Curve2d& C1,
|
|||||||
+ C2D1.Y() * C2D1.Y()
|
+ C2D1.Y() * C2D1.Y()
|
||||||
+ (C2D0.X() - C1D0.X()) * C2D2.X()
|
+ (C2D0.X() - C1D0.X()) * C2D2.X()
|
||||||
+ (C2D0.Y() - C1D0.Y()) * C2D2.Y();
|
+ (C2D0.Y() - C1D0.Y()) * C2D2.Y();
|
||||||
H *= 2.;
|
|
||||||
return Standard_True;
|
return Standard_True;
|
||||||
}
|
}
|
||||||
|
|
||||||
//C0
|
// C0
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : Extrema_GlobOptFuncCCC0
|
//function : Extrema_GlobOptFuncCCC0
|
||||||
@@ -421,5 +415,6 @@ Standard_Boolean Extrema_GlobOptFuncCCC2::Values(const math_Vector& X,Standard_R
|
|||||||
else
|
else
|
||||||
isHessianComputed = _Hessian(*myC1_2d, *myC2_2d, X, H);
|
isHessianComputed = _Hessian(*myC1_2d, *myC2_2d, X, H);
|
||||||
|
|
||||||
|
|
||||||
return (Value(X, F) && Gradient(X, G) && isHessianComputed);
|
return (Value(X, F) && Gradient(X, G) && isHessianComputed);
|
||||||
}
|
}
|
||||||
|
@@ -14,8 +14,11 @@
|
|||||||
|
|
||||||
#include <GProp.hxx>
|
#include <GProp.hxx>
|
||||||
|
|
||||||
|
#include <gp.hxx>
|
||||||
|
#include <gp_Mat.hxx>
|
||||||
#include <gp_Pnt.hxx>
|
#include <gp_Pnt.hxx>
|
||||||
#include <gp_XYZ.hxx>
|
#include <gp_XYZ.hxx>
|
||||||
|
#include <Standard_DimensionError.hxx>
|
||||||
|
|
||||||
void GProp::HOperator (
|
void GProp::HOperator (
|
||||||
|
|
||||||
|
@@ -14,9 +14,11 @@
|
|||||||
|
|
||||||
|
|
||||||
#include <ElCLib.hxx>
|
#include <ElCLib.hxx>
|
||||||
|
#include <gp.hxx>
|
||||||
#include <gp_Circ.hxx>
|
#include <gp_Circ.hxx>
|
||||||
#include <gp_Lin.hxx>
|
#include <gp_Lin.hxx>
|
||||||
#include <gp_Pnt.hxx>
|
#include <gp_Pnt.hxx>
|
||||||
|
#include <gp_Vec.hxx>
|
||||||
#include <GProp.hxx>
|
#include <GProp.hxx>
|
||||||
#include <GProp_CelGProps.hxx>
|
#include <GProp_CelGProps.hxx>
|
||||||
#include <math_Jacobi.hxx>
|
#include <math_Jacobi.hxx>
|
||||||
|
@@ -19,8 +19,10 @@
|
|||||||
|
|
||||||
#include <Standard.hxx>
|
#include <Standard.hxx>
|
||||||
#include <Standard_DefineAlloc.hxx>
|
#include <Standard_DefineAlloc.hxx>
|
||||||
|
#include <Standard_Handle.hxx>
|
||||||
|
|
||||||
#include <GProp_GProps.hxx>
|
#include <GProp_GProps.hxx>
|
||||||
|
#include <Standard_Real.hxx>
|
||||||
class gp_Circ;
|
class gp_Circ;
|
||||||
class gp_Pnt;
|
class gp_Pnt;
|
||||||
class gp_Lin;
|
class gp_Lin;
|
||||||
|
@@ -13,6 +13,7 @@
|
|||||||
// commercial license or contractual agreement.
|
// commercial license or contractual agreement.
|
||||||
|
|
||||||
|
|
||||||
|
#include <gp.hxx>
|
||||||
#include <gp_Ax1.hxx>
|
#include <gp_Ax1.hxx>
|
||||||
#include <gp_Mat.hxx>
|
#include <gp_Mat.hxx>
|
||||||
#include <gp_Pnt.hxx>
|
#include <gp_Pnt.hxx>
|
||||||
|
@@ -19,8 +19,10 @@
|
|||||||
|
|
||||||
#include <Standard.hxx>
|
#include <Standard.hxx>
|
||||||
#include <Standard_DefineAlloc.hxx>
|
#include <Standard_DefineAlloc.hxx>
|
||||||
|
#include <Standard_Handle.hxx>
|
||||||
|
|
||||||
#include <gp_Pnt.hxx>
|
#include <gp_Pnt.hxx>
|
||||||
|
#include <Standard_Real.hxx>
|
||||||
#include <gp_Mat.hxx>
|
#include <gp_Mat.hxx>
|
||||||
class gp_Ax1;
|
class gp_Ax1;
|
||||||
class GProp_PrincipalProps;
|
class GProp_PrincipalProps;
|
||||||
|
@@ -13,6 +13,7 @@
|
|||||||
// commercial license or contractual agreement.
|
// commercial license or contractual agreement.
|
||||||
|
|
||||||
|
|
||||||
|
#include <gp_Lin.hxx>
|
||||||
#include <gp_Pln.hxx>
|
#include <gp_Pln.hxx>
|
||||||
#include <gp_Pnt.hxx>
|
#include <gp_Pnt.hxx>
|
||||||
#include <gp_Vec.hxx>
|
#include <gp_Vec.hxx>
|
||||||
|
@@ -19,11 +19,14 @@
|
|||||||
|
|
||||||
#include <Standard.hxx>
|
#include <Standard.hxx>
|
||||||
#include <Standard_DefineAlloc.hxx>
|
#include <Standard_DefineAlloc.hxx>
|
||||||
|
#include <Standard_Handle.hxx>
|
||||||
|
|
||||||
#include <GProp_EquaType.hxx>
|
#include <GProp_EquaType.hxx>
|
||||||
#include <gp_Pnt.hxx>
|
#include <gp_Pnt.hxx>
|
||||||
#include <gp_Vec.hxx>
|
#include <gp_Vec.hxx>
|
||||||
#include <TColgp_Array1OfPnt.hxx>
|
#include <TColgp_Array1OfPnt.hxx>
|
||||||
|
#include <Standard_Real.hxx>
|
||||||
|
#include <Standard_Boolean.hxx>
|
||||||
class gp_Pln;
|
class gp_Pln;
|
||||||
class gp_Lin;
|
class gp_Lin;
|
||||||
|
|
||||||
|
@@ -13,6 +13,9 @@
|
|||||||
// commercial license or contractual agreement.
|
// commercial license or contractual agreement.
|
||||||
|
|
||||||
|
|
||||||
|
#include <gp.hxx>
|
||||||
|
#include <gp_Pnt.hxx>
|
||||||
|
#include <gp_XYZ.hxx>
|
||||||
#include <GProp_PGProps.hxx>
|
#include <GProp_PGProps.hxx>
|
||||||
#include <Standard_DimensionError.hxx>
|
#include <Standard_DimensionError.hxx>
|
||||||
#include <Standard_DomainError.hxx>
|
#include <Standard_DomainError.hxx>
|
||||||
|
@@ -22,6 +22,7 @@
|
|||||||
#include <Standard_Handle.hxx>
|
#include <Standard_Handle.hxx>
|
||||||
|
|
||||||
#include <GProp_GProps.hxx>
|
#include <GProp_GProps.hxx>
|
||||||
|
#include <Standard_Real.hxx>
|
||||||
#include <TColgp_Array1OfPnt.hxx>
|
#include <TColgp_Array1OfPnt.hxx>
|
||||||
#include <TColgp_Array2OfPnt.hxx>
|
#include <TColgp_Array2OfPnt.hxx>
|
||||||
#include <TColStd_Array1OfReal.hxx>
|
#include <TColStd_Array1OfReal.hxx>
|
||||||
|
@@ -13,7 +13,10 @@
|
|||||||
// commercial license or contractual agreement.
|
// commercial license or contractual agreement.
|
||||||
|
|
||||||
|
|
||||||
|
#include <gp_Pnt.hxx>
|
||||||
|
#include <gp_Vec.hxx>
|
||||||
#include <GProp_PrincipalProps.hxx>
|
#include <GProp_PrincipalProps.hxx>
|
||||||
|
#include <GProp_UndefinedAxis.hxx>
|
||||||
|
|
||||||
typedef gp_Vec Vec;
|
typedef gp_Vec Vec;
|
||||||
typedef gp_Pnt Pnt;
|
typedef gp_Pnt Pnt;
|
||||||
|
@@ -21,6 +21,7 @@
|
|||||||
#include <Standard_DefineAlloc.hxx>
|
#include <Standard_DefineAlloc.hxx>
|
||||||
#include <Standard_Handle.hxx>
|
#include <Standard_Handle.hxx>
|
||||||
|
|
||||||
|
#include <Standard_Real.hxx>
|
||||||
#include <gp_Vec.hxx>
|
#include <gp_Vec.hxx>
|
||||||
#include <gp_Pnt.hxx>
|
#include <gp_Pnt.hxx>
|
||||||
#include <GProp_GProps.hxx>
|
#include <GProp_GProps.hxx>
|
||||||
|
@@ -23,6 +23,7 @@
|
|||||||
#include <math_Jacobi.hxx>
|
#include <math_Jacobi.hxx>
|
||||||
#include <math_Matrix.hxx>
|
#include <math_Matrix.hxx>
|
||||||
#include <math_Vector.hxx>
|
#include <math_Vector.hxx>
|
||||||
|
#include <Standard_NotImplemented.hxx>
|
||||||
|
|
||||||
GProp_SelGProps::GProp_SelGProps(){}
|
GProp_SelGProps::GProp_SelGProps(){}
|
||||||
|
|
||||||
|
@@ -19,8 +19,10 @@
|
|||||||
|
|
||||||
#include <Standard.hxx>
|
#include <Standard.hxx>
|
||||||
#include <Standard_DefineAlloc.hxx>
|
#include <Standard_DefineAlloc.hxx>
|
||||||
|
#include <Standard_Handle.hxx>
|
||||||
|
|
||||||
#include <GProp_GProps.hxx>
|
#include <GProp_GProps.hxx>
|
||||||
|
#include <Standard_Real.hxx>
|
||||||
class gp_Cylinder;
|
class gp_Cylinder;
|
||||||
class gp_Pnt;
|
class gp_Pnt;
|
||||||
class gp_Cone;
|
class gp_Cone;
|
||||||
|
@@ -18,6 +18,7 @@
|
|||||||
#define _GProp_UndefinedAxis_HeaderFile
|
#define _GProp_UndefinedAxis_HeaderFile
|
||||||
|
|
||||||
#include <Standard_Type.hxx>
|
#include <Standard_Type.hxx>
|
||||||
|
#include <Standard_DefineException.hxx>
|
||||||
#include <Standard_SStream.hxx>
|
#include <Standard_SStream.hxx>
|
||||||
#include <Standard_DomainError.hxx>
|
#include <Standard_DomainError.hxx>
|
||||||
|
|
||||||
|
@@ -13,6 +13,7 @@
|
|||||||
// commercial license or contractual agreement.
|
// commercial license or contractual agreement.
|
||||||
|
|
||||||
|
|
||||||
|
#include <gp.hxx>
|
||||||
#include <gp_Cone.hxx>
|
#include <gp_Cone.hxx>
|
||||||
#include <gp_Cylinder.hxx>
|
#include <gp_Cylinder.hxx>
|
||||||
#include <gp_Pnt.hxx>
|
#include <gp_Pnt.hxx>
|
||||||
@@ -23,6 +24,7 @@
|
|||||||
#include <math_Jacobi.hxx>
|
#include <math_Jacobi.hxx>
|
||||||
#include <math_Matrix.hxx>
|
#include <math_Matrix.hxx>
|
||||||
#include <math_Vector.hxx>
|
#include <math_Vector.hxx>
|
||||||
|
#include <Standard_NotImplemented.hxx>
|
||||||
|
|
||||||
GProp_VelGProps::GProp_VelGProps(){}
|
GProp_VelGProps::GProp_VelGProps(){}
|
||||||
|
|
||||||
|
@@ -19,8 +19,10 @@
|
|||||||
|
|
||||||
#include <Standard.hxx>
|
#include <Standard.hxx>
|
||||||
#include <Standard_DefineAlloc.hxx>
|
#include <Standard_DefineAlloc.hxx>
|
||||||
|
#include <Standard_Handle.hxx>
|
||||||
|
|
||||||
#include <GProp_GProps.hxx>
|
#include <GProp_GProps.hxx>
|
||||||
|
#include <Standard_Real.hxx>
|
||||||
class gp_Cylinder;
|
class gp_Cylinder;
|
||||||
class gp_Pnt;
|
class gp_Pnt;
|
||||||
class gp_Cone;
|
class gp_Cone;
|
||||||
|
@@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
#include <GeomConvert.hxx>
|
#include <GeomConvert.hxx>
|
||||||
|
|
||||||
|
#include <BSplCLib.hxx>
|
||||||
#include <Convert_CircleToBSplineCurve.hxx>
|
#include <Convert_CircleToBSplineCurve.hxx>
|
||||||
#include <Convert_ConicToBSplineCurve.hxx>
|
#include <Convert_ConicToBSplineCurve.hxx>
|
||||||
#include <Convert_EllipseToBSplineCurve.hxx>
|
#include <Convert_EllipseToBSplineCurve.hxx>
|
||||||
@@ -23,6 +24,7 @@
|
|||||||
#include <Geom2d_BSplineCurve.hxx>
|
#include <Geom2d_BSplineCurve.hxx>
|
||||||
#include <Geom_BezierCurve.hxx>
|
#include <Geom_BezierCurve.hxx>
|
||||||
#include <Geom_BSplineCurve.hxx>
|
#include <Geom_BSplineCurve.hxx>
|
||||||
|
#include <Geom_BSplineSurface.hxx>
|
||||||
#include <Geom_Circle.hxx>
|
#include <Geom_Circle.hxx>
|
||||||
#include <Geom_Conic.hxx>
|
#include <Geom_Conic.hxx>
|
||||||
#include <Geom_Curve.hxx>
|
#include <Geom_Curve.hxx>
|
||||||
@@ -32,6 +34,7 @@
|
|||||||
#include <Geom_Line.hxx>
|
#include <Geom_Line.hxx>
|
||||||
#include <Geom_OffsetCurve.hxx>
|
#include <Geom_OffsetCurve.hxx>
|
||||||
#include <Geom_Parabola.hxx>
|
#include <Geom_Parabola.hxx>
|
||||||
|
#include <Geom_Surface.hxx>
|
||||||
#include <Geom_TrimmedCurve.hxx>
|
#include <Geom_TrimmedCurve.hxx>
|
||||||
#include <GeomConvert_ApproxCurve.hxx>
|
#include <GeomConvert_ApproxCurve.hxx>
|
||||||
#include <GeomConvert_CompCurveToBSplineCurve.hxx>
|
#include <GeomConvert_CompCurveToBSplineCurve.hxx>
|
||||||
@@ -41,6 +44,7 @@
|
|||||||
#include <gp_Circ2d.hxx>
|
#include <gp_Circ2d.hxx>
|
||||||
#include <gp_Elips2d.hxx>
|
#include <gp_Elips2d.hxx>
|
||||||
#include <gp_Hypr2d.hxx>
|
#include <gp_Hypr2d.hxx>
|
||||||
|
#include <gp_Lin.hxx>
|
||||||
#include <gp_Parab2d.hxx>
|
#include <gp_Parab2d.hxx>
|
||||||
#include <gp_Pnt.hxx>
|
#include <gp_Pnt.hxx>
|
||||||
#include <gp_Pnt2d.hxx>
|
#include <gp_Pnt2d.hxx>
|
||||||
|
@@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
#include <GeomConvert.hxx>
|
#include <GeomConvert.hxx>
|
||||||
|
|
||||||
|
#include <BSplCLib.hxx>
|
||||||
#include <Convert_ConeToBSplineSurface.hxx>
|
#include <Convert_ConeToBSplineSurface.hxx>
|
||||||
#include <Convert_CylinderToBSplineSurface.hxx>
|
#include <Convert_CylinderToBSplineSurface.hxx>
|
||||||
#include <Convert_ElementarySurfaceToBSplineSurface.hxx>
|
#include <Convert_ElementarySurfaceToBSplineSurface.hxx>
|
||||||
@@ -21,6 +22,7 @@
|
|||||||
#include <Convert_TorusToBSplineSurface.hxx>
|
#include <Convert_TorusToBSplineSurface.hxx>
|
||||||
#include <Geom_BezierSurface.hxx>
|
#include <Geom_BezierSurface.hxx>
|
||||||
#include <Geom_BSplineCurve.hxx>
|
#include <Geom_BSplineCurve.hxx>
|
||||||
|
#include <Geom_BSplineSurface.hxx>
|
||||||
#include <Geom_ConicalSurface.hxx>
|
#include <Geom_ConicalSurface.hxx>
|
||||||
#include <Geom_Curve.hxx>
|
#include <Geom_Curve.hxx>
|
||||||
#include <Geom_CylindricalSurface.hxx>
|
#include <Geom_CylindricalSurface.hxx>
|
||||||
@@ -39,18 +41,22 @@
|
|||||||
#include <gp_Cone.hxx>
|
#include <gp_Cone.hxx>
|
||||||
#include <gp_Cylinder.hxx>
|
#include <gp_Cylinder.hxx>
|
||||||
#include <gp_GTrsf.hxx>
|
#include <gp_GTrsf.hxx>
|
||||||
|
#include <gp_Pln.hxx>
|
||||||
#include <gp_Sphere.hxx>
|
#include <gp_Sphere.hxx>
|
||||||
#include <gp_Torus.hxx>
|
#include <gp_Torus.hxx>
|
||||||
#include <gp_Trsf.hxx>
|
#include <gp_Trsf.hxx>
|
||||||
#include <gp_Vec.hxx>
|
#include <gp_Vec.hxx>
|
||||||
#include <Precision.hxx>
|
#include <Precision.hxx>
|
||||||
#include <Standard_DomainError.hxx>
|
#include <Standard_DomainError.hxx>
|
||||||
|
#include <Standard_NotImplemented.hxx>
|
||||||
#include <TColgp_Array1OfPnt.hxx>
|
#include <TColgp_Array1OfPnt.hxx>
|
||||||
#include <TColgp_Array2OfPnt.hxx>
|
#include <TColgp_Array2OfPnt.hxx>
|
||||||
#include <TColStd_Array1OfInteger.hxx>
|
#include <TColStd_Array1OfInteger.hxx>
|
||||||
#include <TColStd_Array1OfReal.hxx>
|
#include <TColStd_Array1OfReal.hxx>
|
||||||
#include <TColStd_Array2OfInteger.hxx>
|
#include <TColStd_Array2OfInteger.hxx>
|
||||||
#include <TColStd_Array2OfReal.hxx>
|
#include <TColStd_Array2OfReal.hxx>
|
||||||
|
#include <TColStd_HArray1OfInteger.hxx>
|
||||||
|
#include <TColStd_HArray1OfReal.hxx>
|
||||||
|
|
||||||
typedef Geom_Surface Surface;
|
typedef Geom_Surface Surface;
|
||||||
typedef Geom_BSplineSurface BSplineSurface;
|
typedef Geom_BSplineSurface BSplineSurface;
|
||||||
@@ -471,13 +477,7 @@ Handle(Geom_BSplineSurface) GeomConvert::SurfaceToBSplineSurface
|
|||||||
Handle(Geom_ToroidalSurface)::DownCast(Surf);
|
Handle(Geom_ToroidalSurface)::DownCast(Surf);
|
||||||
|
|
||||||
gp_Torus Tr = TheElSurf->Torus();
|
gp_Torus Tr = TheElSurf->Torus();
|
||||||
//
|
if (isUClosed) {
|
||||||
// if isUClosed = true and U trim does not coinside with first period of torus,
|
|
||||||
// method CheckAndSegment shifts position of U seam boundary of surface.
|
|
||||||
// probably bug? So, for this case we must build not periodic surface.
|
|
||||||
Standard_Boolean isUFirstPeriod = !(UFirst < 0. || ULast > 2.*M_PI);
|
|
||||||
Standard_Boolean isVFirstPeriod = !(VFirst < 0. || VLast > 2.*M_PI);
|
|
||||||
if (isUClosed && isUFirstPeriod) {
|
|
||||||
Convert_TorusToBSplineSurface Convert (Tr, VFirst, VLast,
|
Convert_TorusToBSplineSurface Convert (Tr, VFirst, VLast,
|
||||||
Standard_False);
|
Standard_False);
|
||||||
TheSurface = BSplineSurfaceBuilder (Convert);
|
TheSurface = BSplineSurfaceBuilder (Convert);
|
||||||
@@ -487,7 +487,7 @@ Handle(Geom_BSplineSurface) GeomConvert::SurfaceToBSplineSurface
|
|||||||
TheSurface->CheckAndSegment(UFirst, ULast, VFirst, VLast);
|
TheSurface->CheckAndSegment(UFirst, ULast, VFirst, VLast);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (Strim->IsVClosed() && isVFirstPeriod) {
|
else if (Strim->IsVClosed()) {
|
||||||
Convert_TorusToBSplineSurface Convert (Tr, UFirst, ULast);
|
Convert_TorusToBSplineSurface Convert (Tr, UFirst, ULast);
|
||||||
TheSurface = BSplineSurfaceBuilder (Convert);
|
TheSurface = BSplineSurfaceBuilder (Convert);
|
||||||
Standard_Integer aNbK = TheSurface->NbVKnots();
|
Standard_Integer aNbK = TheSurface->NbVKnots();
|
||||||
|
@@ -25,6 +25,8 @@
|
|||||||
#include <gp_Pnt.hxx>
|
#include <gp_Pnt.hxx>
|
||||||
#include <gp_Vec.hxx>
|
#include <gp_Vec.hxx>
|
||||||
#include <Precision.hxx>
|
#include <Precision.hxx>
|
||||||
|
#include <Standard_ConstructionError.hxx>
|
||||||
|
#include <Standard_OutOfRange.hxx>
|
||||||
#include <TColgp_Array1OfPnt.hxx>
|
#include <TColgp_Array1OfPnt.hxx>
|
||||||
#include <TColStd_HArray1OfReal.hxx>
|
#include <TColStd_HArray1OfReal.hxx>
|
||||||
|
|
||||||
|
@@ -21,6 +21,7 @@
|
|||||||
#include <Geom_Surface.hxx>
|
#include <Geom_Surface.hxx>
|
||||||
#include <GeomAdaptor_Surface.hxx>
|
#include <GeomAdaptor_Surface.hxx>
|
||||||
#include <Precision.hxx>
|
#include <Precision.hxx>
|
||||||
|
#include <Standard_OutOfRange.hxx>
|
||||||
#include <Standard_Real.hxx>
|
#include <Standard_Real.hxx>
|
||||||
#include <TColStd_HArray1OfReal.hxx>
|
#include <TColStd_HArray1OfReal.hxx>
|
||||||
#include <TColStd_HArray2OfReal.hxx>
|
#include <TColStd_HArray2OfReal.hxx>
|
||||||
|
@@ -18,6 +18,7 @@
|
|||||||
#include <BSplCLib.hxx>
|
#include <BSplCLib.hxx>
|
||||||
#include <Geom_BSplineCurve.hxx>
|
#include <Geom_BSplineCurve.hxx>
|
||||||
#include <GeomConvert_BSplineCurveKnotSplitting.hxx>
|
#include <GeomConvert_BSplineCurveKnotSplitting.hxx>
|
||||||
|
#include <Standard_DimensionError.hxx>
|
||||||
#include <Standard_RangeError.hxx>
|
#include <Standard_RangeError.hxx>
|
||||||
|
|
||||||
typedef TColStd_Array1OfInteger Array1OfInteger;
|
typedef TColStd_Array1OfInteger Array1OfInteger;
|
||||||
|
@@ -18,6 +18,7 @@
|
|||||||
#include <Geom_BezierCurve.hxx>
|
#include <Geom_BezierCurve.hxx>
|
||||||
#include <Geom_BSplineCurve.hxx>
|
#include <Geom_BSplineCurve.hxx>
|
||||||
#include <GeomConvert_BSplineCurveToBezierCurve.hxx>
|
#include <GeomConvert_BSplineCurveToBezierCurve.hxx>
|
||||||
|
#include <Standard_DimensionError.hxx>
|
||||||
#include <Standard_DomainError.hxx>
|
#include <Standard_DomainError.hxx>
|
||||||
#include <Standard_OutOfRange.hxx>
|
#include <Standard_OutOfRange.hxx>
|
||||||
#include <TColgp_Array1OfPnt.hxx>
|
#include <TColgp_Array1OfPnt.hxx>
|
||||||
|
@@ -21,6 +21,7 @@
|
|||||||
#include <Standard_DefineAlloc.hxx>
|
#include <Standard_DefineAlloc.hxx>
|
||||||
#include <Standard_Handle.hxx>
|
#include <Standard_Handle.hxx>
|
||||||
|
|
||||||
|
#include <Standard_Real.hxx>
|
||||||
#include <Standard_Integer.hxx>
|
#include <Standard_Integer.hxx>
|
||||||
#include <TColGeom_Array1OfBezierCurve.hxx>
|
#include <TColGeom_Array1OfBezierCurve.hxx>
|
||||||
#include <TColStd_Array1OfReal.hxx>
|
#include <TColStd_Array1OfReal.hxx>
|
||||||
|
@@ -18,6 +18,7 @@
|
|||||||
#include <BSplCLib.hxx>
|
#include <BSplCLib.hxx>
|
||||||
#include <Geom_BSplineSurface.hxx>
|
#include <Geom_BSplineSurface.hxx>
|
||||||
#include <GeomConvert_BSplineSurfaceKnotSplitting.hxx>
|
#include <GeomConvert_BSplineSurfaceKnotSplitting.hxx>
|
||||||
|
#include <Standard_DimensionError.hxx>
|
||||||
#include <Standard_RangeError.hxx>
|
#include <Standard_RangeError.hxx>
|
||||||
|
|
||||||
typedef TColStd_Array1OfInteger Array1OfInteger;
|
typedef TColStd_Array1OfInteger Array1OfInteger;
|
||||||
|
@@ -18,6 +18,7 @@
|
|||||||
#include <Geom_BezierSurface.hxx>
|
#include <Geom_BezierSurface.hxx>
|
||||||
#include <Geom_BSplineSurface.hxx>
|
#include <Geom_BSplineSurface.hxx>
|
||||||
#include <GeomConvert_BSplineSurfaceToBezierSurface.hxx>
|
#include <GeomConvert_BSplineSurfaceToBezierSurface.hxx>
|
||||||
|
#include <Standard_DimensionError.hxx>
|
||||||
#include <Standard_DomainError.hxx>
|
#include <Standard_DomainError.hxx>
|
||||||
#include <Standard_OutOfRange.hxx>
|
#include <Standard_OutOfRange.hxx>
|
||||||
#include <TColgp_Array2OfPnt.hxx>
|
#include <TColgp_Array2OfPnt.hxx>
|
||||||
|
@@ -21,6 +21,7 @@
|
|||||||
#include <Standard_DefineAlloc.hxx>
|
#include <Standard_DefineAlloc.hxx>
|
||||||
#include <Standard_Handle.hxx>
|
#include <Standard_Handle.hxx>
|
||||||
|
|
||||||
|
#include <Standard_Real.hxx>
|
||||||
#include <Standard_Integer.hxx>
|
#include <Standard_Integer.hxx>
|
||||||
#include <TColGeom_Array2OfBezierSurface.hxx>
|
#include <TColGeom_Array2OfBezierSurface.hxx>
|
||||||
#include <TColStd_Array1OfReal.hxx>
|
#include <TColStd_Array1OfReal.hxx>
|
||||||
|
@@ -24,6 +24,7 @@
|
|||||||
#include <gp_XYZ.hxx>
|
#include <gp_XYZ.hxx>
|
||||||
#include <Precision.hxx>
|
#include <Precision.hxx>
|
||||||
#include <Standard_ConstructionError.hxx>
|
#include <Standard_ConstructionError.hxx>
|
||||||
|
#include <Standard_DimensionError.hxx>
|
||||||
#include <Standard_NotImplemented.hxx>
|
#include <Standard_NotImplemented.hxx>
|
||||||
#include <TColGeom_Array2OfBezierSurface.hxx>
|
#include <TColGeom_Array2OfBezierSurface.hxx>
|
||||||
#include <TColgp_HArray2OfPnt.hxx>
|
#include <TColgp_HArray2OfPnt.hxx>
|
||||||
|
@@ -25,7 +25,9 @@
|
|||||||
#include <TColStd_HArray1OfInteger.hxx>
|
#include <TColStd_HArray1OfInteger.hxx>
|
||||||
#include <TColStd_HArray1OfReal.hxx>
|
#include <TColStd_HArray1OfReal.hxx>
|
||||||
#include <TColgp_HArray2OfPnt.hxx>
|
#include <TColgp_HArray2OfPnt.hxx>
|
||||||
|
#include <Standard_Boolean.hxx>
|
||||||
#include <TColGeom_Array2OfBezierSurface.hxx>
|
#include <TColGeom_Array2OfBezierSurface.hxx>
|
||||||
|
#include <Standard_Real.hxx>
|
||||||
#include <TColStd_Array1OfReal.hxx>
|
#include <TColStd_Array1OfReal.hxx>
|
||||||
#include <GeomAbs_Shape.hxx>
|
#include <GeomAbs_Shape.hxx>
|
||||||
|
|
||||||
|
@@ -21,7 +21,9 @@
|
|||||||
#include <Standard_DefineAlloc.hxx>
|
#include <Standard_DefineAlloc.hxx>
|
||||||
#include <Standard_Handle.hxx>
|
#include <Standard_Handle.hxx>
|
||||||
|
|
||||||
|
#include <Standard_Real.hxx>
|
||||||
#include <Convert_ParameterisationType.hxx>
|
#include <Convert_ParameterisationType.hxx>
|
||||||
|
#include <Standard_Boolean.hxx>
|
||||||
#include <Standard_Integer.hxx>
|
#include <Standard_Integer.hxx>
|
||||||
class Geom_BSplineCurve;
|
class Geom_BSplineCurve;
|
||||||
class Geom_BoundedCurve;
|
class Geom_BoundedCurve;
|
||||||
|
@@ -12,6 +12,8 @@
|
|||||||
// commercial license or contractual agreement.
|
// commercial license or contractual agreement.
|
||||||
|
|
||||||
#include <GeomConvert_Units.hxx>
|
#include <GeomConvert_Units.hxx>
|
||||||
|
#include <Geom2d_BoundedCurve.hxx>
|
||||||
|
#include <Geom2d_BSplineCurve.hxx>
|
||||||
#include <Geom2d_Circle.hxx>
|
#include <Geom2d_Circle.hxx>
|
||||||
#include <Geom2d_Conic.hxx>
|
#include <Geom2d_Conic.hxx>
|
||||||
#include <Geom2d_Curve.hxx>
|
#include <Geom2d_Curve.hxx>
|
||||||
|
@@ -14,6 +14,7 @@
|
|||||||
#ifndef _GeomConvert_Units_HeaderFile
|
#ifndef _GeomConvert_Units_HeaderFile
|
||||||
#define _GeomConvert_Units_HeaderFile
|
#define _GeomConvert_Units_HeaderFile
|
||||||
|
|
||||||
|
#include <Standard_DefineAlloc.hxx>
|
||||||
#include <Standard_Handle.hxx>
|
#include <Standard_Handle.hxx>
|
||||||
class Geom2d_Curve;
|
class Geom2d_Curve;
|
||||||
class Geom_Surface;
|
class Geom_Surface;
|
||||||
|
@@ -15,6 +15,7 @@
|
|||||||
#ifndef _GeomEvaluator_OffsetCurve_HeaderFile
|
#ifndef _GeomEvaluator_OffsetCurve_HeaderFile
|
||||||
#define _GeomEvaluator_OffsetCurve_HeaderFile
|
#define _GeomEvaluator_OffsetCurve_HeaderFile
|
||||||
|
|
||||||
|
#include <Geom_Curve.hxx>
|
||||||
#include <GeomAdaptor_Curve.hxx>
|
#include <GeomAdaptor_Curve.hxx>
|
||||||
#include <GeomEvaluator_Curve.hxx>
|
#include <GeomEvaluator_Curve.hxx>
|
||||||
#include <gp_Dir.hxx>
|
#include <gp_Dir.hxx>
|
||||||
|
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
#include <GeomFill.hxx>
|
#include <GeomFill.hxx>
|
||||||
|
|
||||||
|
#include <Geom_BSplineCurve.hxx>
|
||||||
#include <Geom_Circle.hxx>
|
#include <Geom_Circle.hxx>
|
||||||
#include <Geom_ConicalSurface.hxx>
|
#include <Geom_ConicalSurface.hxx>
|
||||||
#include <Geom_Curve.hxx>
|
#include <Geom_Curve.hxx>
|
||||||
|
@@ -21,7 +21,9 @@
|
|||||||
#include <Standard_DefineAlloc.hxx>
|
#include <Standard_DefineAlloc.hxx>
|
||||||
#include <Standard_Handle.hxx>
|
#include <Standard_Handle.hxx>
|
||||||
|
|
||||||
|
#include <Standard_Boolean.hxx>
|
||||||
#include <Standard_Integer.hxx>
|
#include <Standard_Integer.hxx>
|
||||||
|
#include <Standard_Real.hxx>
|
||||||
#include <TColgp_HArray2OfPnt.hxx>
|
#include <TColgp_HArray2OfPnt.hxx>
|
||||||
#include <TColStd_HArray2OfReal.hxx>
|
#include <TColStd_HArray2OfReal.hxx>
|
||||||
#include <TColStd_HArray1OfReal.hxx>
|
#include <TColStd_HArray1OfReal.hxx>
|
||||||
|
@@ -21,7 +21,9 @@
|
|||||||
#include <Standard_DefineAlloc.hxx>
|
#include <Standard_DefineAlloc.hxx>
|
||||||
#include <Standard_Handle.hxx>
|
#include <Standard_Handle.hxx>
|
||||||
|
|
||||||
|
#include <Standard_Boolean.hxx>
|
||||||
#include <Standard_Integer.hxx>
|
#include <Standard_Integer.hxx>
|
||||||
|
#include <Standard_Real.hxx>
|
||||||
#include <TColgp_HArray2OfPnt.hxx>
|
#include <TColgp_HArray2OfPnt.hxx>
|
||||||
#include <TColStd_HArray2OfReal.hxx>
|
#include <TColStd_HArray2OfReal.hxx>
|
||||||
#include <TColStd_HArray1OfReal.hxx>
|
#include <TColStd_HArray1OfReal.hxx>
|
||||||
|
@@ -18,10 +18,12 @@
|
|||||||
#define _GeomFill_BoundWithSurf_HeaderFile
|
#define _GeomFill_BoundWithSurf_HeaderFile
|
||||||
|
|
||||||
#include <Standard.hxx>
|
#include <Standard.hxx>
|
||||||
|
#include <Standard_Type.hxx>
|
||||||
|
|
||||||
#include <Adaptor3d_CurveOnSurface.hxx>
|
#include <Adaptor3d_CurveOnSurface.hxx>
|
||||||
#include <GeomFill_Boundary.hxx>
|
#include <GeomFill_Boundary.hxx>
|
||||||
#include <Standard_Real.hxx>
|
#include <Standard_Real.hxx>
|
||||||
|
#include <Standard_Boolean.hxx>
|
||||||
class Law_Function;
|
class Law_Function;
|
||||||
class gp_Pnt;
|
class gp_Pnt;
|
||||||
class gp_Vec;
|
class gp_Vec;
|
||||||
|
@@ -22,6 +22,7 @@
|
|||||||
|
|
||||||
#include <Standard_Real.hxx>
|
#include <Standard_Real.hxx>
|
||||||
#include <Standard_Transient.hxx>
|
#include <Standard_Transient.hxx>
|
||||||
|
#include <Standard_Boolean.hxx>
|
||||||
class gp_Pnt;
|
class gp_Pnt;
|
||||||
class gp_Vec;
|
class gp_Vec;
|
||||||
|
|
||||||
|
@@ -21,6 +21,7 @@
|
|||||||
#include <GeomFill_CircularBlendFunc.hxx>
|
#include <GeomFill_CircularBlendFunc.hxx>
|
||||||
#include <gp_Pnt.hxx>
|
#include <gp_Pnt.hxx>
|
||||||
#include <Precision.hxx>
|
#include <Precision.hxx>
|
||||||
|
#include <Standard_OutOfRange.hxx>
|
||||||
#include <Standard_Type.hxx>
|
#include <Standard_Type.hxx>
|
||||||
#include <TColStd_Array1OfReal.hxx>
|
#include <TColStd_Array1OfReal.hxx>
|
||||||
#include <TColStd_SequenceOfReal.hxx>
|
#include <TColStd_SequenceOfReal.hxx>
|
||||||
|
@@ -21,8 +21,10 @@
|
|||||||
#include <Standard_Type.hxx>
|
#include <Standard_Type.hxx>
|
||||||
|
|
||||||
#include <gp_Pnt.hxx>
|
#include <gp_Pnt.hxx>
|
||||||
|
#include <Standard_Real.hxx>
|
||||||
#include <Standard_Integer.hxx>
|
#include <Standard_Integer.hxx>
|
||||||
#include <Convert_ParameterisationType.hxx>
|
#include <Convert_ParameterisationType.hxx>
|
||||||
|
#include <Standard_Boolean.hxx>
|
||||||
#include <Approx_SweepFunction.hxx>
|
#include <Approx_SweepFunction.hxx>
|
||||||
#include <TColgp_Array1OfPnt.hxx>
|
#include <TColgp_Array1OfPnt.hxx>
|
||||||
#include <TColgp_Array1OfPnt2d.hxx>
|
#include <TColgp_Array1OfPnt2d.hxx>
|
||||||
|
@@ -24,6 +24,8 @@
|
|||||||
#include <gp_Lin.hxx>
|
#include <gp_Lin.hxx>
|
||||||
#include <gp_Vec.hxx>
|
#include <gp_Vec.hxx>
|
||||||
#include <Precision.hxx>
|
#include <Precision.hxx>
|
||||||
|
#include <Standard_ConstructionError.hxx>
|
||||||
|
#include <Standard_OutOfRange.hxx>
|
||||||
#include <Standard_Type.hxx>
|
#include <Standard_Type.hxx>
|
||||||
|
|
||||||
IMPLEMENT_STANDARD_RTTIEXT(GeomFill_ConstantBiNormal,GeomFill_TrihedronLaw)
|
IMPLEMENT_STANDARD_RTTIEXT(GeomFill_ConstantBiNormal,GeomFill_TrihedronLaw)
|
||||||
@@ -64,14 +66,12 @@ GeomFill_ConstantBiNormal::GeomFill_ConstantBiNormal(const gp_Dir& BiNormal) : B
|
|||||||
return copy;
|
return copy;
|
||||||
}
|
}
|
||||||
|
|
||||||
Standard_Boolean GeomFill_ConstantBiNormal::SetCurve(const Handle(Adaptor3d_Curve)& C)
|
void GeomFill_ConstantBiNormal::SetCurve(const Handle(Adaptor3d_Curve)& C)
|
||||||
{
|
{
|
||||||
Standard_Boolean isOK = Standard_False;
|
|
||||||
GeomFill_TrihedronLaw::SetCurve(C);
|
GeomFill_TrihedronLaw::SetCurve(C);
|
||||||
if (! C.IsNull()) {
|
if (! C.IsNull()) {
|
||||||
isOK = frenet->SetCurve(C);
|
frenet->SetCurve(C);
|
||||||
}
|
}
|
||||||
return isOK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Standard_Boolean GeomFill_ConstantBiNormal::D0(const Standard_Real Param,gp_Vec& Tangent,gp_Vec& Normal,gp_Vec& BiNormal)
|
Standard_Boolean GeomFill_ConstantBiNormal::D0(const Standard_Real Param,gp_Vec& Tangent,gp_Vec& Normal,gp_Vec& BiNormal)
|
||||||
|
@@ -22,6 +22,8 @@
|
|||||||
|
|
||||||
#include <gp_Vec.hxx>
|
#include <gp_Vec.hxx>
|
||||||
#include <GeomFill_TrihedronLaw.hxx>
|
#include <GeomFill_TrihedronLaw.hxx>
|
||||||
|
#include <Standard_Boolean.hxx>
|
||||||
|
#include <Standard_Real.hxx>
|
||||||
#include <Standard_Integer.hxx>
|
#include <Standard_Integer.hxx>
|
||||||
#include <GeomAbs_Shape.hxx>
|
#include <GeomAbs_Shape.hxx>
|
||||||
#include <TColStd_Array1OfReal.hxx>
|
#include <TColStd_Array1OfReal.hxx>
|
||||||
@@ -43,9 +45,7 @@ public:
|
|||||||
|
|
||||||
Standard_EXPORT virtual Handle(GeomFill_TrihedronLaw) Copy() const Standard_OVERRIDE;
|
Standard_EXPORT virtual Handle(GeomFill_TrihedronLaw) Copy() const Standard_OVERRIDE;
|
||||||
|
|
||||||
//! initialize curve of trihedron law
|
Standard_EXPORT virtual void SetCurve (const Handle(Adaptor3d_Curve)& C) Standard_OVERRIDE;
|
||||||
//! @return Standard_True in case if execution end correctly
|
|
||||||
Standard_EXPORT virtual Standard_Boolean SetCurve (const Handle(Adaptor3d_Curve)& C) Standard_OVERRIDE;
|
|
||||||
|
|
||||||
//! Computes Triedrhon on curve at parameter <Param>
|
//! Computes Triedrhon on curve at parameter <Param>
|
||||||
Standard_EXPORT virtual Standard_Boolean D0 (const Standard_Real Param, gp_Vec& Tangent, gp_Vec& Normal, gp_Vec& BiNormal) Standard_OVERRIDE;
|
Standard_EXPORT virtual Standard_Boolean D0 (const Standard_Real Param, gp_Vec& Tangent, gp_Vec& Normal, gp_Vec& BiNormal) Standard_OVERRIDE;
|
||||||
|
@@ -19,16 +19,19 @@
|
|||||||
#include <AdvApprox_ApproxAFunction.hxx>
|
#include <AdvApprox_ApproxAFunction.hxx>
|
||||||
#include <BSplCLib.hxx>
|
#include <BSplCLib.hxx>
|
||||||
#include <Geom_BSplineSurface.hxx>
|
#include <Geom_BSplineSurface.hxx>
|
||||||
|
#include <GeomFill_Boundary.hxx>
|
||||||
#include <GeomFill_BoundWithSurf.hxx>
|
#include <GeomFill_BoundWithSurf.hxx>
|
||||||
#include <GeomFill_ConstrainedFilling.hxx>
|
#include <GeomFill_ConstrainedFilling.hxx>
|
||||||
#include <GeomFill_CoonsAlgPatch.hxx>
|
#include <GeomFill_CoonsAlgPatch.hxx>
|
||||||
#include <GeomFill_DegeneratedBound.hxx>
|
#include <GeomFill_DegeneratedBound.hxx>
|
||||||
|
#include <GeomFill_TgtField.hxx>
|
||||||
#include <GeomFill_TgtOnCoons.hxx>
|
#include <GeomFill_TgtOnCoons.hxx>
|
||||||
#include <gp_XYZ.hxx>
|
#include <gp_XYZ.hxx>
|
||||||
#include <Law.hxx>
|
#include <Law.hxx>
|
||||||
#include <Law_BSpFunc.hxx>
|
#include <Law_BSpFunc.hxx>
|
||||||
#include <Law_BSpline.hxx>
|
#include <Law_BSpline.hxx>
|
||||||
#include <Law_Linear.hxx>
|
#include <Law_Linear.hxx>
|
||||||
|
#include <PLib.hxx>
|
||||||
#include <Standard_Failure.hxx>
|
#include <Standard_Failure.hxx>
|
||||||
#include <Standard_NotImplemented.hxx>
|
#include <Standard_NotImplemented.hxx>
|
||||||
#include <TColgp_Array1OfPnt.hxx>
|
#include <TColgp_Array1OfPnt.hxx>
|
||||||
|
@@ -22,8 +22,10 @@
|
|||||||
#include <Standard_Handle.hxx>
|
#include <Standard_Handle.hxx>
|
||||||
|
|
||||||
#include <Standard_Integer.hxx>
|
#include <Standard_Integer.hxx>
|
||||||
|
#include <Standard_Real.hxx>
|
||||||
#include <GeomFill_CornerState.hxx>
|
#include <GeomFill_CornerState.hxx>
|
||||||
#include <gp_Vec.hxx>
|
#include <gp_Vec.hxx>
|
||||||
|
#include <Standard_Boolean.hxx>
|
||||||
#include <TColgp_HArray1OfPnt.hxx>
|
#include <TColgp_HArray1OfPnt.hxx>
|
||||||
#include <TColStd_HArray1OfInteger.hxx>
|
#include <TColStd_HArray1OfInteger.hxx>
|
||||||
#include <TColStd_HArray1OfReal.hxx>
|
#include <TColStd_HArray1OfReal.hxx>
|
||||||
|
@@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
#include <Standard.hxx>
|
#include <Standard.hxx>
|
||||||
#include <Standard_DefineAlloc.hxx>
|
#include <Standard_DefineAlloc.hxx>
|
||||||
|
#include <Standard_Handle.hxx>
|
||||||
|
|
||||||
#include <GeomFill_Filling.hxx>
|
#include <GeomFill_Filling.hxx>
|
||||||
#include <TColgp_Array1OfPnt.hxx>
|
#include <TColgp_Array1OfPnt.hxx>
|
||||||
|
@@ -20,6 +20,7 @@
|
|||||||
#include <gp_Pnt.hxx>
|
#include <gp_Pnt.hxx>
|
||||||
#include <gp_Vec.hxx>
|
#include <gp_Vec.hxx>
|
||||||
#include <gp_XYZ.hxx>
|
#include <gp_XYZ.hxx>
|
||||||
|
#include <Law_Function.hxx>
|
||||||
#include <Law_Linear.hxx>
|
#include <Law_Linear.hxx>
|
||||||
#include <Standard_Type.hxx>
|
#include <Standard_Type.hxx>
|
||||||
|
|
||||||
|
@@ -22,6 +22,7 @@
|
|||||||
|
|
||||||
#include <gp_Pnt.hxx>
|
#include <gp_Pnt.hxx>
|
||||||
#include <Standard_Transient.hxx>
|
#include <Standard_Transient.hxx>
|
||||||
|
#include <Standard_Real.hxx>
|
||||||
#include <Standard_Integer.hxx>
|
#include <Standard_Integer.hxx>
|
||||||
class GeomFill_Boundary;
|
class GeomFill_Boundary;
|
||||||
class Law_Function;
|
class Law_Function;
|
||||||
|
@@ -27,6 +27,7 @@
|
|||||||
#include <GeomFill_SnglrFunc.hxx>
|
#include <GeomFill_SnglrFunc.hxx>
|
||||||
#include <GeomFill_TrihedronLaw.hxx>
|
#include <GeomFill_TrihedronLaw.hxx>
|
||||||
#include <GeomLib.hxx>
|
#include <GeomLib.hxx>
|
||||||
|
#include <gp_Trsf.hxx>
|
||||||
#include <gp_Vec.hxx>
|
#include <gp_Vec.hxx>
|
||||||
#include <gp_Vec2d.hxx>
|
#include <gp_Vec2d.hxx>
|
||||||
#include <Law_BSpFunc.hxx>
|
#include <Law_BSpFunc.hxx>
|
||||||
@@ -36,6 +37,8 @@
|
|||||||
#include <Law_Function.hxx>
|
#include <Law_Function.hxx>
|
||||||
#include <Law_Interpolate.hxx>
|
#include <Law_Interpolate.hxx>
|
||||||
#include <Precision.hxx>
|
#include <Precision.hxx>
|
||||||
|
#include <Standard_ConstructionError.hxx>
|
||||||
|
#include <Standard_OutOfRange.hxx>
|
||||||
#include <Standard_Type.hxx>
|
#include <Standard_Type.hxx>
|
||||||
#include <TColgp_HArray1OfPnt.hxx>
|
#include <TColgp_HArray1OfPnt.hxx>
|
||||||
#include <TColStd_HArray1OfReal.hxx>
|
#include <TColStd_HArray1OfReal.hxx>
|
||||||
@@ -334,36 +337,34 @@ Handle(GeomFill_TrihedronLaw) GeomFill_CorrectedFrenet::Copy() const
|
|||||||
return copy;
|
return copy;
|
||||||
}
|
}
|
||||||
|
|
||||||
Standard_Boolean GeomFill_CorrectedFrenet::SetCurve(const Handle(Adaptor3d_Curve)& C)
|
void GeomFill_CorrectedFrenet::SetCurve(const Handle(Adaptor3d_Curve)& C)
|
||||||
{
|
{
|
||||||
|
|
||||||
GeomFill_TrihedronLaw::SetCurve(C);
|
GeomFill_TrihedronLaw::SetCurve(C);
|
||||||
if (! C.IsNull())
|
if (! C.IsNull()) {
|
||||||
{
|
|
||||||
frenet->SetCurve(C);
|
frenet->SetCurve(C);
|
||||||
|
|
||||||
GeomAbs_CurveType type;
|
GeomAbs_CurveType type;
|
||||||
type = C->GetType();
|
type = C->GetType();
|
||||||
switch (type)
|
switch (type) {
|
||||||
{
|
|
||||||
case GeomAbs_Circle:
|
case GeomAbs_Circle:
|
||||||
case GeomAbs_Ellipse:
|
case GeomAbs_Ellipse:
|
||||||
case GeomAbs_Hyperbola:
|
case GeomAbs_Hyperbola:
|
||||||
case GeomAbs_Parabola:
|
case GeomAbs_Parabola:
|
||||||
case GeomAbs_Line:
|
case GeomAbs_Line:
|
||||||
{
|
{
|
||||||
// No probleme isFrenet
|
// No probleme isFrenet
|
||||||
isFrenet = Standard_True;
|
isFrenet = Standard_True;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default :
|
default :
|
||||||
{
|
{
|
||||||
// We have to search singularities
|
// We have to search singularities
|
||||||
isFrenet = Standard_True;
|
isFrenet = Standard_True;
|
||||||
Init();
|
Init();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return isFrenet;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -437,20 +438,16 @@ Standard_Boolean GeomFill_CorrectedFrenet::SetCurve(const Handle(Adaptor3d_Curve
|
|||||||
TLaw = EvolAroundT;
|
TLaw = EvolAroundT;
|
||||||
//OCC78
|
//OCC78
|
||||||
Standard_Integer iEnd = SeqPoles.Length();
|
Standard_Integer iEnd = SeqPoles.Length();
|
||||||
if (iEnd != 0)
|
HArrPoles = new TColStd_HArray1OfReal(1, iEnd);
|
||||||
{
|
HArrAngle = new TColStd_HArray1OfReal(1, iEnd);
|
||||||
HArrPoles = new TColStd_HArray1OfReal(1, iEnd);
|
HArrTangent = new TColgp_HArray1OfVec(1, iEnd);
|
||||||
HArrAngle = new TColStd_HArray1OfReal(1, iEnd);
|
HArrNormal = new TColgp_HArray1OfVec(1, iEnd);
|
||||||
HArrTangent = new TColgp_HArray1OfVec(1, iEnd);
|
for(i = 1; i <= iEnd; i++){
|
||||||
HArrNormal = new TColgp_HArray1OfVec(1, iEnd);
|
HArrPoles->ChangeValue(i) = SeqPoles(i);
|
||||||
for (i = 1; i <= iEnd; i++) {
|
HArrAngle->ChangeValue(i) = SeqAngle(i);
|
||||||
HArrPoles->ChangeValue(i) = SeqPoles(i);
|
HArrTangent->ChangeValue(i) = SeqTangent(i);
|
||||||
HArrAngle->ChangeValue(i) = SeqAngle(i);
|
HArrNormal->ChangeValue(i) = SeqNormal(i);
|
||||||
HArrTangent->ChangeValue(i) = SeqTangent(i);
|
};
|
||||||
HArrNormal->ChangeValue(i) = SeqNormal(i);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef DRAW
|
#ifdef DRAW
|
||||||
if (Affich) {
|
if (Affich) {
|
||||||
@@ -615,7 +612,7 @@ Standard_Real GeomFill_CorrectedFrenet::CalcAngleAT(const gp_Vec& Tangent, const
|
|||||||
Standard_Real angle;
|
Standard_Real angle;
|
||||||
gp_Vec Normal_rot, cross;
|
gp_Vec Normal_rot, cross;
|
||||||
angle = Tangent.Angle(prevTangent);
|
angle = Tangent.Angle(prevTangent);
|
||||||
if (Abs(angle) > Precision::Angular() && Abs(angle) < M_PI - Precision::Angular()) {
|
if (Abs(angle) > Precision::Angular()) {
|
||||||
cross = Tangent.Crossed(prevTangent).Normalized();
|
cross = Tangent.Crossed(prevTangent).Normalized();
|
||||||
Normal_rot = Normal + sin(angle)*cross.Crossed(Normal) +
|
Normal_rot = Normal + sin(angle)*cross.Crossed(Normal) +
|
||||||
(1 - cos(angle))*cross.Crossed(cross.Crossed(Normal));
|
(1 - cos(angle))*cross.Crossed(cross.Crossed(Normal));
|
||||||
|
@@ -18,7 +18,10 @@
|
|||||||
#define _GeomFill_CorrectedFrenet_HeaderFile
|
#define _GeomFill_CorrectedFrenet_HeaderFile
|
||||||
|
|
||||||
#include <Standard.hxx>
|
#include <Standard.hxx>
|
||||||
|
#include <Standard_Type.hxx>
|
||||||
|
|
||||||
|
#include <gp_Vec.hxx>
|
||||||
|
#include <Standard_Boolean.hxx>
|
||||||
#include <TColStd_HArray1OfReal.hxx>
|
#include <TColStd_HArray1OfReal.hxx>
|
||||||
#include <TColgp_HArray1OfVec.hxx>
|
#include <TColgp_HArray1OfVec.hxx>
|
||||||
#include <GeomFill_TrihedronLaw.hxx>
|
#include <GeomFill_TrihedronLaw.hxx>
|
||||||
@@ -49,9 +52,7 @@ public:
|
|||||||
|
|
||||||
Standard_EXPORT virtual Handle(GeomFill_TrihedronLaw) Copy() const Standard_OVERRIDE;
|
Standard_EXPORT virtual Handle(GeomFill_TrihedronLaw) Copy() const Standard_OVERRIDE;
|
||||||
|
|
||||||
//! initialize curve of frenet law
|
Standard_EXPORT virtual void SetCurve (const Handle(Adaptor3d_Curve)& C) Standard_OVERRIDE;
|
||||||
//! @return Standard_True in case if execution end correctly
|
|
||||||
Standard_EXPORT virtual Standard_Boolean SetCurve (const Handle(Adaptor3d_Curve)& C) Standard_OVERRIDE;
|
|
||||||
|
|
||||||
Standard_EXPORT virtual void SetInterval (const Standard_Real First, const Standard_Real Last) Standard_OVERRIDE;
|
Standard_EXPORT virtual void SetInterval (const Standard_Real First, const Standard_Real Last) Standard_OVERRIDE;
|
||||||
|
|
||||||
|
@@ -25,6 +25,7 @@
|
|||||||
#include <gp_Pnt.hxx>
|
#include <gp_Pnt.hxx>
|
||||||
#include <gp_Vec.hxx>
|
#include <gp_Vec.hxx>
|
||||||
#include <Precision.hxx>
|
#include <Precision.hxx>
|
||||||
|
#include <Standard_OutOfRange.hxx>
|
||||||
#include <Standard_Type.hxx>
|
#include <Standard_Type.hxx>
|
||||||
#include <TColStd_SequenceOfReal.hxx>
|
#include <TColStd_SequenceOfReal.hxx>
|
||||||
|
|
||||||
@@ -62,11 +63,11 @@ Handle(GeomFill_LocationLaw) GeomFill_CurveAndTrihedron::Copy() const
|
|||||||
//Function: SetCurve
|
//Function: SetCurve
|
||||||
//Purpose :
|
//Purpose :
|
||||||
//==================================================================
|
//==================================================================
|
||||||
Standard_Boolean GeomFill_CurveAndTrihedron::SetCurve(const Handle(Adaptor3d_Curve)& C)
|
void GeomFill_CurveAndTrihedron::SetCurve(const Handle(Adaptor3d_Curve)& C)
|
||||||
{
|
{
|
||||||
myCurve = C;
|
myCurve = C;
|
||||||
myTrimmed = C;
|
myTrimmed = C;
|
||||||
return myLaw->SetCurve(C);
|
myLaw->SetCurve(C);
|
||||||
}
|
}
|
||||||
|
|
||||||
const Handle(Adaptor3d_Curve)& GeomFill_CurveAndTrihedron::GetCurve() const
|
const Handle(Adaptor3d_Curve)& GeomFill_CurveAndTrihedron::GetCurve() const
|
||||||
|
@@ -18,7 +18,11 @@
|
|||||||
#define _GeomFill_CurveAndTrihedron_HeaderFile
|
#define _GeomFill_CurveAndTrihedron_HeaderFile
|
||||||
|
|
||||||
#include <Standard.hxx>
|
#include <Standard.hxx>
|
||||||
|
#include <Standard_Type.hxx>
|
||||||
|
|
||||||
|
#include <Standard_Boolean.hxx>
|
||||||
|
#include <gp_Pnt.hxx>
|
||||||
|
#include <gp_Vec.hxx>
|
||||||
#include <gp_Mat.hxx>
|
#include <gp_Mat.hxx>
|
||||||
#include <GeomFill_LocationLaw.hxx>
|
#include <GeomFill_LocationLaw.hxx>
|
||||||
#include <Standard_Real.hxx>
|
#include <Standard_Real.hxx>
|
||||||
@@ -48,9 +52,7 @@ public:
|
|||||||
|
|
||||||
Standard_EXPORT GeomFill_CurveAndTrihedron(const Handle(GeomFill_TrihedronLaw)& Trihedron);
|
Standard_EXPORT GeomFill_CurveAndTrihedron(const Handle(GeomFill_TrihedronLaw)& Trihedron);
|
||||||
|
|
||||||
//! initialize curve of trihedron law
|
Standard_EXPORT virtual void SetCurve (const Handle(Adaptor3d_Curve)& C) Standard_OVERRIDE;
|
||||||
//! @return Standard_True in case if execution end correctly
|
|
||||||
Standard_EXPORT virtual Standard_Boolean SetCurve (const Handle(Adaptor3d_Curve)& C) Standard_OVERRIDE;
|
|
||||||
|
|
||||||
Standard_EXPORT virtual const Handle(Adaptor3d_Curve)& GetCurve() const Standard_OVERRIDE;
|
Standard_EXPORT virtual const Handle(Adaptor3d_Curve)& GetCurve() const Standard_OVERRIDE;
|
||||||
|
|
||||||
|
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
#include <GeomFill_Darboux.hxx>
|
#include <GeomFill_Darboux.hxx>
|
||||||
|
|
||||||
|
#include <Adaptor2d_Curve2d.hxx>
|
||||||
#include <Adaptor3d_CurveOnSurface.hxx>
|
#include <Adaptor3d_CurveOnSurface.hxx>
|
||||||
#include <Adaptor3d_Curve.hxx>
|
#include <Adaptor3d_Curve.hxx>
|
||||||
#include <Adaptor3d_Surface.hxx>
|
#include <Adaptor3d_Surface.hxx>
|
||||||
@@ -26,6 +27,8 @@
|
|||||||
#include <gp_Pnt2d.hxx>
|
#include <gp_Pnt2d.hxx>
|
||||||
#include <gp_Vec.hxx>
|
#include <gp_Vec.hxx>
|
||||||
#include <gp_Vec2d.hxx>
|
#include <gp_Vec2d.hxx>
|
||||||
|
#include <Standard_ConstructionError.hxx>
|
||||||
|
#include <Standard_OutOfRange.hxx>
|
||||||
#include <Standard_Type.hxx>
|
#include <Standard_Type.hxx>
|
||||||
#include <TColgp_Array2OfVec.hxx>
|
#include <TColgp_Array2OfVec.hxx>
|
||||||
|
|
||||||
|
@@ -18,8 +18,10 @@
|
|||||||
#define _GeomFill_Darboux_HeaderFile
|
#define _GeomFill_Darboux_HeaderFile
|
||||||
|
|
||||||
#include <Standard.hxx>
|
#include <Standard.hxx>
|
||||||
|
#include <Standard_Type.hxx>
|
||||||
|
|
||||||
#include <GeomFill_TrihedronLaw.hxx>
|
#include <GeomFill_TrihedronLaw.hxx>
|
||||||
|
#include <Standard_Boolean.hxx>
|
||||||
#include <Standard_Real.hxx>
|
#include <Standard_Real.hxx>
|
||||||
#include <Standard_Integer.hxx>
|
#include <Standard_Integer.hxx>
|
||||||
#include <GeomAbs_Shape.hxx>
|
#include <GeomAbs_Shape.hxx>
|
||||||
|
@@ -18,10 +18,12 @@
|
|||||||
#define _GeomFill_DegeneratedBound_HeaderFile
|
#define _GeomFill_DegeneratedBound_HeaderFile
|
||||||
|
|
||||||
#include <Standard.hxx>
|
#include <Standard.hxx>
|
||||||
|
#include <Standard_Type.hxx>
|
||||||
|
|
||||||
#include <gp_Pnt.hxx>
|
#include <gp_Pnt.hxx>
|
||||||
#include <Standard_Real.hxx>
|
#include <Standard_Real.hxx>
|
||||||
#include <GeomFill_Boundary.hxx>
|
#include <GeomFill_Boundary.hxx>
|
||||||
|
#include <Standard_Boolean.hxx>
|
||||||
class gp_Vec;
|
class gp_Vec;
|
||||||
|
|
||||||
|
|
||||||
|
@@ -22,6 +22,7 @@
|
|||||||
#include <GeomFill_TrihedronLaw.hxx>
|
#include <GeomFill_TrihedronLaw.hxx>
|
||||||
#include <gp_Vec.hxx>
|
#include <gp_Vec.hxx>
|
||||||
#include <Standard_ConstructionError.hxx>
|
#include <Standard_ConstructionError.hxx>
|
||||||
|
#include <Standard_OutOfRange.hxx>
|
||||||
#include <Standard_Type.hxx>
|
#include <Standard_Type.hxx>
|
||||||
#include <TColStd_Array1OfReal.hxx>
|
#include <TColStd_Array1OfReal.hxx>
|
||||||
#include <TColStd_HSequenceOfReal.hxx>
|
#include <TColStd_HSequenceOfReal.hxx>
|
||||||
@@ -60,36 +61,33 @@ Handle(GeomFill_TrihedronLaw) GeomFill_DiscreteTrihedron::Copy() const
|
|||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
Standard_Boolean GeomFill_DiscreteTrihedron::SetCurve(const Handle(Adaptor3d_Curve)& C)
|
void GeomFill_DiscreteTrihedron::SetCurve(const Handle(Adaptor3d_Curve)& C)
|
||||||
{
|
{
|
||||||
GeomFill_TrihedronLaw::SetCurve(C);
|
GeomFill_TrihedronLaw::SetCurve(C);
|
||||||
if (! C.IsNull())
|
if (! C.IsNull()) {
|
||||||
{
|
|
||||||
GeomAbs_CurveType type;
|
GeomAbs_CurveType type;
|
||||||
type = C->GetType();
|
type = C->GetType();
|
||||||
switch (type)
|
switch (type) {
|
||||||
{
|
|
||||||
case GeomAbs_Circle:
|
case GeomAbs_Circle:
|
||||||
case GeomAbs_Ellipse:
|
case GeomAbs_Ellipse:
|
||||||
case GeomAbs_Hyperbola:
|
case GeomAbs_Hyperbola:
|
||||||
case GeomAbs_Parabola:
|
case GeomAbs_Parabola:
|
||||||
case GeomAbs_Line:
|
case GeomAbs_Line:
|
||||||
{
|
{
|
||||||
// No problem
|
// No problem
|
||||||
myUseFrenet = Standard_True;
|
myUseFrenet = Standard_True;
|
||||||
myFrenet->SetCurve(C);
|
myFrenet->SetCurve(C);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default :
|
default :
|
||||||
{
|
{
|
||||||
myUseFrenet = Standard_False;
|
myUseFrenet = Standard_False;
|
||||||
// We have to fill <myKnots> and <myTrihedrons>
|
// We have to fill <myKnots> and <myTrihedrons>
|
||||||
Init();
|
Init();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return myUseFrenet;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
@@ -17,9 +17,12 @@
|
|||||||
#define _GeomFill_DiscreteTrihedron_HeaderFile
|
#define _GeomFill_DiscreteTrihedron_HeaderFile
|
||||||
|
|
||||||
#include <Standard.hxx>
|
#include <Standard.hxx>
|
||||||
|
#include <Standard_Type.hxx>
|
||||||
|
|
||||||
|
#include <gp_Pnt.hxx>
|
||||||
#include <GeomFill_HSequenceOfAx2.hxx>
|
#include <GeomFill_HSequenceOfAx2.hxx>
|
||||||
#include <TColStd_HSequenceOfReal.hxx>
|
#include <TColStd_HSequenceOfReal.hxx>
|
||||||
|
#include <Standard_Boolean.hxx>
|
||||||
#include <GeomFill_TrihedronLaw.hxx>
|
#include <GeomFill_TrihedronLaw.hxx>
|
||||||
#include <Standard_Real.hxx>
|
#include <Standard_Real.hxx>
|
||||||
#include <Standard_Integer.hxx>
|
#include <Standard_Integer.hxx>
|
||||||
@@ -48,9 +51,7 @@ public:
|
|||||||
|
|
||||||
Standard_EXPORT void Init();
|
Standard_EXPORT void Init();
|
||||||
|
|
||||||
//! initialize curve of trihedron law
|
Standard_EXPORT virtual void SetCurve (const Handle(Adaptor3d_Curve)& C) Standard_OVERRIDE;
|
||||||
//! @return Standard_True in case if execution end correctly
|
|
||||||
Standard_EXPORT virtual Standard_Boolean SetCurve (const Handle(Adaptor3d_Curve)& C) Standard_OVERRIDE;
|
|
||||||
|
|
||||||
//! compute Trihedron on curve at parameter <Param>
|
//! compute Trihedron on curve at parameter <Param>
|
||||||
Standard_EXPORT virtual Standard_Boolean D0 (const Standard_Real Param, gp_Vec& Tangent, gp_Vec& Normal, gp_Vec& BiNormal) Standard_OVERRIDE;
|
Standard_EXPORT virtual Standard_Boolean D0 (const Standard_Real Param, gp_Vec& Tangent, gp_Vec& Normal, gp_Vec& BiNormal) Standard_OVERRIDE;
|
||||||
|
@@ -21,6 +21,7 @@
|
|||||||
#include <GeomFill_TrihedronLaw.hxx>
|
#include <GeomFill_TrihedronLaw.hxx>
|
||||||
#include <gp_Vec.hxx>
|
#include <gp_Vec.hxx>
|
||||||
#include <Precision.hxx>
|
#include <Precision.hxx>
|
||||||
|
#include <Standard_ConstructionError.hxx>
|
||||||
#include <Standard_OutOfRange.hxx>
|
#include <Standard_OutOfRange.hxx>
|
||||||
#include <Standard_Type.hxx>
|
#include <Standard_Type.hxx>
|
||||||
|
|
||||||
|
@@ -18,9 +18,12 @@
|
|||||||
#define _GeomFill_DraftTrihedron_HeaderFile
|
#define _GeomFill_DraftTrihedron_HeaderFile
|
||||||
|
|
||||||
#include <Standard.hxx>
|
#include <Standard.hxx>
|
||||||
|
#include <Standard_Type.hxx>
|
||||||
|
|
||||||
|
#include <gp_Vec.hxx>
|
||||||
#include <Standard_Real.hxx>
|
#include <Standard_Real.hxx>
|
||||||
#include <GeomFill_TrihedronLaw.hxx>
|
#include <GeomFill_TrihedronLaw.hxx>
|
||||||
|
#include <Standard_Boolean.hxx>
|
||||||
#include <Standard_Integer.hxx>
|
#include <Standard_Integer.hxx>
|
||||||
#include <GeomAbs_Shape.hxx>
|
#include <GeomAbs_Shape.hxx>
|
||||||
#include <TColStd_Array1OfReal.hxx>
|
#include <TColStd_Array1OfReal.hxx>
|
||||||
|
@@ -15,17 +15,22 @@
|
|||||||
// commercial license or contractual agreement.
|
// commercial license or contractual agreement.
|
||||||
|
|
||||||
|
|
||||||
|
#include <Convert_ParameterisationType.hxx>
|
||||||
#include <GCPnts_AbscissaPoint.hxx>
|
#include <GCPnts_AbscissaPoint.hxx>
|
||||||
|
#include <Geom_BSplineCurve.hxx>
|
||||||
#include <Geom_BSplineSurface.hxx>
|
#include <Geom_BSplineSurface.hxx>
|
||||||
#include <Geom_Curve.hxx>
|
#include <Geom_Curve.hxx>
|
||||||
#include <Geom_Geometry.hxx>
|
#include <Geom_Geometry.hxx>
|
||||||
|
#include <Geom_Surface.hxx>
|
||||||
#include <GeomAdaptor_Curve.hxx>
|
#include <GeomAdaptor_Curve.hxx>
|
||||||
#include <GeomConvert.hxx>
|
#include <GeomConvert.hxx>
|
||||||
#include <GeomFill_EvolvedSection.hxx>
|
#include <GeomFill_EvolvedSection.hxx>
|
||||||
#include <gp_Pnt.hxx>
|
#include <gp_Pnt.hxx>
|
||||||
#include <Law_Function.hxx>
|
#include <Law_Function.hxx>
|
||||||
#include <Precision.hxx>
|
#include <Precision.hxx>
|
||||||
|
#include <Standard_OutOfRange.hxx>
|
||||||
#include <Standard_Type.hxx>
|
#include <Standard_Type.hxx>
|
||||||
|
#include <TColgp_Array2OfPnt.hxx>
|
||||||
#include <TColStd_Array1OfInteger.hxx>
|
#include <TColStd_Array1OfInteger.hxx>
|
||||||
#include <TColStd_Array1OfReal.hxx>
|
#include <TColStd_Array1OfReal.hxx>
|
||||||
|
|
||||||
|
@@ -20,7 +20,9 @@
|
|||||||
#include <Standard.hxx>
|
#include <Standard.hxx>
|
||||||
#include <Standard_Type.hxx>
|
#include <Standard_Type.hxx>
|
||||||
|
|
||||||
|
#include <Standard_Real.hxx>
|
||||||
#include <GeomFill_SectionLaw.hxx>
|
#include <GeomFill_SectionLaw.hxx>
|
||||||
|
#include <Standard_Boolean.hxx>
|
||||||
#include <TColgp_Array1OfPnt.hxx>
|
#include <TColgp_Array1OfPnt.hxx>
|
||||||
#include <TColStd_Array1OfReal.hxx>
|
#include <TColStd_Array1OfReal.hxx>
|
||||||
#include <TColgp_Array1OfVec.hxx>
|
#include <TColgp_Array1OfVec.hxx>
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user