mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-29 14:00:49 +03:00
Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
75afece22e |
@@ -38,17 +38,17 @@ If HTML documentation is not available in your package, you can:
|
||||
- **Generate together with sources:** You need to have CMake and 1.8.4 (or above) installed on your system. Enable `BUILD_DOC_Overview` CMake parameter and set the path to Doxygen `3RDPARTY_DOXYGEN_EXECUTABLE`. Then build ALL or only `Overview`.
|
||||
- **Read documentation in source plain text (Markdown) format** found in the subfolder `dox` or [GitHub Wiki](https://github.com/Open-Cascade-SAS/OCCT/wiki).
|
||||
|
||||
See [dox/build/build_documentation/building_documentation.md](dox/build/build_documentation/building_documentation.md) or [Building Documentation](https://dev.opencascade.org/doc/occt-7.8.0/overview/html/build_upgrade__building_documentation.html) for details.
|
||||
See `dox/dev_guides/documentation/documentation.md` or [Building Documentation](https://dev.opencascade.org/doc/occt-7.8.0/overview/html/build_upgrade__building_documentation.html) for details.
|
||||
|
||||
## Building
|
||||
|
||||
In most cases, you need to rebuild OCCT on your platform (OS, compiler) before using it in your project to ensure binary compatibility.
|
||||
|
||||
Consult the file [dox/build/build_occt/building_occt.md](dox/build/build_occt/building_occt.md) or [Building OCCT](https://dev.opencascade.org/doc/overview/html/build_upgrade__building_occt.html) or [Building OCCT Wiki](https://github.com/Open-Cascade-SAS/OCCT/wiki/build_upgrade) for instructions on building OCCT from sources on supported platforms.
|
||||
Consult the file `dox/dev_guides/building/building.md` or [Building OCCT](https://dev.opencascade.org/doc/overview/html/build_upgrade__building_occt.html) or [Building OCCT Wiki](https://github.com/Open-Cascade-SAS/OCCT/wiki/build_upgrade) for instructions on building OCCT from sources on supported platforms.
|
||||
|
||||
## Version
|
||||
|
||||
The current version of OCCT can be found in the file [`src/Standard/Standard_Version.hxx`](src/Standard/Standard_Version.hxx).
|
||||
The current version of OCCT can be found in the file `src/Standard/Standard_Version.hxx`.
|
||||
|
||||
## Development
|
||||
|
||||
|
@@ -331,15 +331,6 @@ void AIS_Manipulator::EnableMode(const AIS_ManipulatorMode theMode)
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
void AIS_Manipulator::attachToPoint(const gp_Pnt& thePoint)
|
||||
{
|
||||
gp_Ax2 aPosition = gp::XOY();
|
||||
aPosition.SetLocation(thePoint);
|
||||
SetPosition(aPosition);
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
void AIS_Manipulator::attachToBox(const Bnd_Box& theBox)
|
||||
{
|
||||
if (theBox.IsVoid())
|
||||
@@ -401,15 +392,7 @@ void AIS_Manipulator::Attach(const Handle(AIS_ManipulatorObjectSequence)& theObj
|
||||
|
||||
if (theOptions.AdjustPosition)
|
||||
{
|
||||
const Handle(Graphic3d_TransformPers)& aTransPers = aCurObject->TransformPersistence();
|
||||
if (!aTransPers.IsNull() && (aTransPers->IsZoomOrRotate() || aTransPers->IsAxial()))
|
||||
{
|
||||
attachToPoint(aTransPers->AnchorPoint());
|
||||
}
|
||||
else
|
||||
{
|
||||
attachToBox(aBox);
|
||||
}
|
||||
attachToBox(aBox);
|
||||
}
|
||||
|
||||
if (theOptions.AdjustSize)
|
||||
@@ -763,18 +746,9 @@ void AIS_Manipulator::Transform(const gp_Trsf& theTrsf)
|
||||
NCollection_Sequence<gp_Trsf>::Iterator aTrsfIter(myStartTrsfs);
|
||||
for (; anObjIter.More(); anObjIter.Next(), aTrsfIter.Next())
|
||||
{
|
||||
const Handle(AIS_InteractiveObject)& anObj = anObjIter.ChangeValue();
|
||||
const Handle(Graphic3d_TransformPers)& aTransPers = anObj->TransformPersistence();
|
||||
if (!aTransPers.IsNull() && (aTransPers->IsZoomOrRotate() || aTransPers->IsAxial()))
|
||||
{
|
||||
gp_XYZ aNewAnchorPoint = aTransPers->AnchorPoint().XYZ() - myPosition.Location().XYZ();
|
||||
aNewAnchorPoint += myStartPosition.Location().Transformed(theTrsf).XYZ();
|
||||
aTransPers->SetAnchorPoint(aNewAnchorPoint);
|
||||
continue;
|
||||
}
|
||||
|
||||
const gp_Trsf& anOldTrsf = aTrsfIter.Value();
|
||||
const Handle(TopLoc_Datum3D)& aParentTrsf = anObj->CombinedParentTransformation();
|
||||
const Handle(AIS_InteractiveObject)& anObj = anObjIter.ChangeValue();
|
||||
const gp_Trsf& anOldTrsf = aTrsfIter.Value();
|
||||
const Handle(TopLoc_Datum3D)& aParentTrsf = anObj->CombinedParentTransformation();
|
||||
if (!aParentTrsf.IsNull() && aParentTrsf->Form() != gp_Identity)
|
||||
{
|
||||
// recompute local transformation relative to parent transformation
|
||||
|
@@ -416,8 +416,6 @@ protected:
|
||||
Standard_EXPORT Handle(Graphic3d_Group) getGroup(const Standard_Integer theIndex,
|
||||
const AIS_ManipulatorMode theMode) const;
|
||||
|
||||
Standard_EXPORT void attachToPoint(const gp_Pnt& thePoint);
|
||||
|
||||
Standard_EXPORT void attachToBox(const Bnd_Box& theBox);
|
||||
|
||||
Standard_EXPORT void adjustSize(const Bnd_Box& theBox);
|
||||
|
@@ -119,12 +119,6 @@ static TopoDS_Wire WireFromList(TopTools_ListOfShape& Edges)
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!itl.More())
|
||||
{
|
||||
Message::SendWarning() << "Warning: WireFromList: can't find the next edge. The wire is not "
|
||||
"complete, some edges are lost.";
|
||||
break;
|
||||
}
|
||||
BB.Add(aWire, anEdge);
|
||||
Edges.Remove(itl);
|
||||
}
|
||||
@@ -563,13 +557,6 @@ void BRepFill_Filling::Build()
|
||||
myTolAng,
|
||||
myTolCurv,
|
||||
myAnisotropie));
|
||||
|
||||
if (myBoundary.IsEmpty())
|
||||
{
|
||||
myIsDone = Standard_False;
|
||||
return;
|
||||
}
|
||||
|
||||
TopoDS_Edge CurEdge;
|
||||
TopoDS_Face CurFace;
|
||||
Standard_Integer i, j;
|
||||
|
@@ -773,7 +773,6 @@ void BRepLib_MakeEdge::Init(const Handle(Geom_Curve)& CC,
|
||||
}
|
||||
B.Range(E, p1, p2);
|
||||
B.Degenerated(E, degenerated);
|
||||
E.Closed(closed);
|
||||
|
||||
myError = BRepLib_EdgeDone;
|
||||
Done();
|
||||
|
@@ -1899,9 +1899,9 @@ Standard_Boolean BRepOffset_Tool::TryProject(const TopoDS_Face& F1,
|
||||
{
|
||||
BRepLib::BuildCurve3d(CurE, BRep_Tool::Tolerance(CurE));
|
||||
C = BRep_Tool::Curve(CurE, L, f, l);
|
||||
if (C.IsNull()) // not 3d curve, can be degenerated, need to skip
|
||||
if (C.IsNull())
|
||||
{
|
||||
continue;
|
||||
return Standard_False;
|
||||
}
|
||||
}
|
||||
C = new Geom_TrimmedCurve(C, f, l);
|
||||
|
@@ -515,16 +515,15 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewPolygon(const TopoDS_Edg
|
||||
Standard_Real aFirst, aLast;
|
||||
Handle(Geom_Curve) aCurve = BRep_Tool::Curve(theEdge, aFirst, aLast);
|
||||
Handle(Geom_Curve) aNewCurve = newCurve(myMap, theEdge, aFirst, aLast);
|
||||
if (aCurve.IsNull() || aNewCurve.IsNull()) // skip processing degenerated edges
|
||||
if (!aCurve.IsNull() && !aNewCurve.IsNull()) // skip processing degenerated edges
|
||||
{
|
||||
return Standard_False;
|
||||
}
|
||||
TColStd_Array1OfReal& aParams = thePoly->ChangeParameters();
|
||||
for (Standard_Integer anInd = aParams.Lower(); anInd <= aParams.Upper(); ++anInd)
|
||||
{
|
||||
Standard_Real& aParam = aParams(anInd);
|
||||
gp_Pnt aPoint = aCurve->Value(aParam);
|
||||
newParameter(aPoint, aNewCurve, aFirst, aLast, aTol, aParam);
|
||||
TColStd_Array1OfReal& aParams = thePoly->ChangeParameters();
|
||||
for (Standard_Integer anInd = aParams.Lower(); anInd <= aParams.Upper(); ++anInd)
|
||||
{
|
||||
Standard_Real& aParam = aParams(anInd);
|
||||
gp_Pnt aPoint = aCurve->Value(aParam);
|
||||
newParameter(aPoint, aNewCurve, aFirst, aLast, aTol, aParam);
|
||||
}
|
||||
}
|
||||
}
|
||||
return Standard_True;
|
||||
|
@@ -439,7 +439,7 @@ void GeomPlate_BuildAveragePlane::BasePlan(const gp_Vec& OZ)
|
||||
|| ((Abs(n1) <= myTol) && (Abs(n3) <= myTol)))
|
||||
{
|
||||
myOX.SetCoord(V3(1), V3(2), V3(3));
|
||||
myOY = OZ ^ myOX;
|
||||
myOY.SetCoord(0, 0, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -195,11 +195,8 @@ void IntPatch_Intersection::Perform(const Handle(Adaptor3d_Surface)& S1,
|
||||
aProjectedCurve.FirstParameter(),
|
||||
aProjectedCurve.LastParameter());
|
||||
Geom2dInt_GInter Intersector(AC, Precision::Confusion(), Precision::Confusion());
|
||||
if (Intersector.IsDone()
|
||||
&& (Intersector.IsEmpty() || (AC.IsClosed() && Intersector.NbPoints() == 1)))
|
||||
{
|
||||
if (Intersector.IsDone() && Intersector.IsEmpty())
|
||||
break;
|
||||
}
|
||||
}
|
||||
Standard_FALLTHROUGH
|
||||
default: {
|
||||
|
@@ -40,10 +40,13 @@ IMPLEMENT_STANDARD_RTTIEXT(OpenGl_GraphicDriver, Graphic3d_GraphicDriver)
|
||||
#include <Aspect_NeutralWindow.hxx>
|
||||
#endif
|
||||
|
||||
#if !defined(_WIN32) && !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__) \
|
||||
#if !defined(_WIN32) && !defined(__ANDROID__) && !defined(__QNX__) \
|
||||
&& (!defined(__APPLE__) || defined(HAVE_XLIB))
|
||||
#include <X11/Xlib.h> // XOpenDisplay()
|
||||
#include <GL/glx.h>
|
||||
#include <X11/Xutil.h>
|
||||
#if !defined(__EMSCRIPTEN__)
|
||||
#include <GL/glx.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_EGL)
|
||||
|
@@ -12083,8 +12083,7 @@ static int VManipulator(Draw_Interpretor& theDi, Standard_Integer theArgsNb, con
|
||||
NCollection_Sequence<ManipAxisModeOnOff> aParts;
|
||||
gp_XYZ aLocation(RealLast(), RealLast(), RealLast()), aVDir, anXDir;
|
||||
//
|
||||
bool toDetach = false;
|
||||
bool toAddObject = false;
|
||||
bool toDetach = false;
|
||||
AIS_Manipulator::OptionsForAttach anAttachOptions;
|
||||
Handle(AIS_InteractiveObject) anAttachObject;
|
||||
Handle(V3d_View) aViewAffinity;
|
||||
@@ -12274,10 +12273,6 @@ static int VManipulator(Draw_Interpretor& theDi, Standard_Integer theArgsNb, con
|
||||
aTrsf.SetRotation(gp_Ax1(gp_Pnt(aRotPnt), gp_Dir(aRotAxis)), aTmpReal);
|
||||
}
|
||||
//
|
||||
else if (anArg == "-addobject")
|
||||
{
|
||||
toAddObject = true;
|
||||
}
|
||||
else if (anArg == "-detach")
|
||||
{
|
||||
toDetach = true;
|
||||
@@ -12435,16 +12430,7 @@ static int VManipulator(Draw_Interpretor& theDi, Standard_Integer theArgsNb, con
|
||||
|
||||
if (!anAttachObject.IsNull())
|
||||
{
|
||||
if (toAddObject && aManipulator->IsAttached())
|
||||
{
|
||||
Handle(AIS_ManipulatorObjectSequence) anAttachObjects = aManipulator->Objects();
|
||||
anAttachObjects->Append(anAttachObject);
|
||||
aManipulator->Attach(anAttachObjects, anAttachOptions);
|
||||
}
|
||||
else
|
||||
{
|
||||
aManipulator->Attach(anAttachObject, anAttachOptions);
|
||||
}
|
||||
aManipulator->Attach(anAttachObject, anAttachOptions);
|
||||
}
|
||||
if (!aViewAffinity.IsNull())
|
||||
{
|
||||
@@ -14504,7 +14490,6 @@ Options:
|
||||
'-enableModes {0|1}' enable modes when attaching
|
||||
'-view {active | [name of view]}' display manipulator only in defined view,
|
||||
by default it is displayed in all views of the current viewer
|
||||
'-addObject allows attach manipulator to multiple objects (replace by default)
|
||||
'-detach' detach manipulator
|
||||
'-startTransform mouse_x mouse_y' - invoke start of transformation
|
||||
'-transform mouse_x mouse_y' - invoke transformation
|
||||
|
@@ -1,41 +0,0 @@
|
||||
puts "============"
|
||||
puts "0032116: Visualization - AIS_Manipulator is unusable when attaching to objects with Graphic3d_TMF_ZoomPers"
|
||||
puts "============"
|
||||
puts ""
|
||||
|
||||
pload MODELING VISUALIZATION
|
||||
|
||||
box b1 10 10 10 10 20 30
|
||||
box b2 50 50 50 10 20 30
|
||||
|
||||
vinit View1
|
||||
vdisplay b1 -dispmode 1 -trsfPers zoom -trsfPersPos 0 0 0
|
||||
vdisplay b2 -dispmode 1 -trsfPers zoom -trsfPersPos 10 10 10
|
||||
vfit
|
||||
|
||||
vmanipulator m -attach b1 -addObject
|
||||
vmanipulator m -attach b2 -addObject
|
||||
|
||||
set mouse_pick {90 225}
|
||||
set mouse_drag {90 150}
|
||||
|
||||
vmoveto {*}$mouse_pick
|
||||
vselect {*}$mouse_pick
|
||||
vmanipulator m -startTransform {*}$mouse_pick
|
||||
vmanipulator m -transform {*}$mouse_drag
|
||||
vmanipulator m -stopTransform
|
||||
vmoveto {*}$mouse_drag
|
||||
|
||||
if { [vreadpixel {*}$mouse_drag -rgb -name] != "CYAN" } { puts "Error: wrong manipulator position" }
|
||||
if { [vreadpixel 115 170 -rgb -name] != "DARKGOLDENROD" } { puts "Error: wrong b1 tranformation" }
|
||||
if { [vreadpixel 400 10 -rgb -name] != "DARKGOLDENROD" } { puts "Error: wrong b2 tranformation" }
|
||||
|
||||
vdump ${imagedir}/${casename}_1.png
|
||||
|
||||
vmoveto 0 0
|
||||
vzoom 0.2
|
||||
|
||||
if { [vreadpixel 210 170 -rgb -name] != "DARKGOLDENROD" } { puts "Error: wrong b1 tranformation" }
|
||||
if { [vreadpixel 310 120 -rgb -name] != "DARKGOLDENROD" } { puts "Error: wrong b2 tranformation" }
|
||||
|
||||
vdump ${imagedir}/${casename}_2.png
|
Reference in New Issue
Block a user