mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0024002: Overall code and build procedure refactoring -- automatic
Automatic upgrade of OCCT code by command "occt_upgrade . -nocdl": - WOK-generated header files from inc and sources from drv are moved to src - CDL files removed - All packages are converted to nocdlpack
This commit is contained in:
@@ -1,4 +1,29 @@
|
||||
StdSelect_ViewerSelector3d.hxx
|
||||
StdSelect_ViewerSelector3d.cxx
|
||||
StdSelect_ViewerSelector3d.lxx
|
||||
StdSelect.cxx
|
||||
StdSelect.hxx
|
||||
StdSelect_BRepOwner.cxx
|
||||
StdSelect_BRepOwner.hxx
|
||||
StdSelect_BRepOwner.lxx
|
||||
StdSelect_BRepSelectionTool.cxx
|
||||
StdSelect_BRepSelectionTool.hxx
|
||||
StdSelect_DisplayMode.hxx
|
||||
StdSelect_EdgeFilter.cxx
|
||||
StdSelect_EdgeFilter.hxx
|
||||
StdSelect_FaceFilter.cxx
|
||||
StdSelect_FaceFilter.hxx
|
||||
StdSelect_IndexedDataMapOfOwnerPrs.hxx
|
||||
StdSelect_Prs.cxx
|
||||
StdSelect_Prs.hxx
|
||||
StdSelect_Prs.lxx
|
||||
StdSelect_SensitivityMode.hxx
|
||||
StdSelect_Shape.cxx
|
||||
StdSelect_Shape.hxx
|
||||
StdSelect_Shape.lxx
|
||||
StdSelect_ShapeTypeFilter.cxx
|
||||
StdSelect_ShapeTypeFilter.hxx
|
||||
StdSelect_ShapeTypeFilter.lxx
|
||||
StdSelect_TypeOfEdge.hxx
|
||||
StdSelect_TypeOfFace.hxx
|
||||
StdSelect_TypeOfResult.hxx
|
||||
StdSelect_ViewerSelector3d.cxx
|
||||
StdSelect_ViewerSelector3d.hxx
|
||||
StdSelect_ViewerSelector3d.lxx
|
||||
|
@@ -1,120 +0,0 @@
|
||||
-- Created on: 1995-03-08
|
||||
-- Created by: Mister rmi
|
||||
-- Copyright (c) 1995-1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
--Modified by ROB : Add ShapeFilters.
|
||||
-- GG : 5/10/99 BUC60576 Add Cone to TypeOfFace enum
|
||||
|
||||
|
||||
package StdSelect
|
||||
|
||||
---Purpose: The StdSelect package provides the following services
|
||||
-- - the definition of selection modes for topological shapes
|
||||
-- - the definition of several concrete filtertandard
|
||||
-- Selection2d.ap classes
|
||||
-- - 2D and 3D viewer selectors.
|
||||
-- Note that each new Interactive Object must have all
|
||||
-- its selection modes defined.
|
||||
-- Standard Classes is useful to build
|
||||
-- 3D Selectable Objects, and to process
|
||||
-- 3D Selections:
|
||||
--
|
||||
-- - Implementation of View Selector for dynamic selection
|
||||
-- in Views from V3d.
|
||||
--
|
||||
-- - Implementation of Tool class to decompose 3D BRep Objects
|
||||
-- into sensitive Primitives for every desired mode of selection
|
||||
-- (selection of vertex,edges,wires,faces,...)
|
||||
--
|
||||
-- - Implementation of dedicated Sensitives Entities:
|
||||
-- Text for 2D Views (linked to Specific 2D projectors.)
|
||||
uses
|
||||
MMgt,
|
||||
Standard,
|
||||
TCollection,
|
||||
TopLoc,
|
||||
TopoDS,
|
||||
SelectMgr,
|
||||
TopAbs,
|
||||
TColStd,
|
||||
gp,
|
||||
Select3D,
|
||||
Graphic3d,
|
||||
Visual3d,
|
||||
Quantity,
|
||||
Prs3d,
|
||||
V3d,
|
||||
PrsMgr,
|
||||
SelectBasics,
|
||||
TopTools,
|
||||
Bnd,
|
||||
Geom,
|
||||
TColgp
|
||||
|
||||
is
|
||||
|
||||
enumeration TypeOfResult is TOR_SIMPLE,TOR_MULTIPLE
|
||||
end TypeOfResult;
|
||||
---Purpose: Provides values for type of result.
|
||||
-- These are used to specify whether the result is to
|
||||
-- be simple or whether it may be multiple.
|
||||
|
||||
enumeration DisplayMode is DM_Wireframe,DM_Shading,DM_HLR
|
||||
end DisplayMode;
|
||||
|
||||
-- enumeration TypeOfFace is AnyFace,Plane,Cylinder,Sphere,Torus,Revol;
|
||||
enumeration TypeOfFace is AnyFace,Plane,Cylinder,Sphere,Torus,Revol,Cone;
|
||||
---Purpose: Provides values for different types of faces. These
|
||||
-- values are used to filter faces in frameworks inheriting
|
||||
-- StdSelect_FaceFilter.
|
||||
|
||||
enumeration TypeOfEdge is AnyEdge,Line,Circle;
|
||||
---Purpose: Provides values for different types of edges. These
|
||||
-- values are used to filter edges in frameworks
|
||||
-- inheriting StdSelect_EdgeFilter.
|
||||
|
||||
enumeration SensitivityMode is SM_WINDOW, SM_VIEW;
|
||||
---Purpose: Selection sensitivity mode. SM_WINDOW mode uses the
|
||||
-- specified pixel tolerance to compute the sensitivity value,
|
||||
-- SM_VIEW mode allows to define the sensitivity manually.
|
||||
|
||||
|
||||
class BRepSelectionTool;
|
||||
|
||||
class BRepOwner;
|
||||
|
||||
|
||||
---Category: Shape Filters
|
||||
|
||||
class EdgeFilter;
|
||||
class FaceFilter;
|
||||
class ShapeTypeFilter;
|
||||
|
||||
imported transient class ViewerSelector3d;
|
||||
|
||||
---Category: Private Classes
|
||||
|
||||
private class Prs;
|
||||
|
||||
private class Shape;
|
||||
|
||||
imported IndexedDataMapOfOwnerPrs;
|
||||
|
||||
SetDrawerForBRepOwner(aSelection: Selection from SelectMgr;
|
||||
aDrawer : Drawer from Prs3d);
|
||||
---Purpose: puts The same drawer in every BRepOwner Of SensitivePrimitive
|
||||
-- Used Only for hilight Of BRepOwner...
|
||||
|
||||
end StdSelect;
|
@@ -14,28 +14,28 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <StdSelect.ixx>
|
||||
#include <SelectMgr_Selection.hxx>
|
||||
#include <Graphic3d_StructureManager.hxx>
|
||||
|
||||
#include <Aspect_TypeOfLine.hxx>
|
||||
#include <gp_Ax3.hxx>
|
||||
#include <gp_Dir.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <Graphic3d_AspectLine3d.hxx>
|
||||
#include <Graphic3d_Group.hxx>
|
||||
#include <Select3D_SensitiveSegment.hxx>
|
||||
#include <Graphic3d_Structure.hxx>
|
||||
#include <Graphic3d_StructureManager.hxx>
|
||||
#include <Quantity_NameOfColor.hxx>
|
||||
#include <Select3D_SensitiveCurve.hxx>
|
||||
#include <Select3D_SensitiveFace.hxx>
|
||||
#include <Graphic3d_AspectLine3d.hxx>
|
||||
#include <Graphic3d_Structure.hxx>
|
||||
#include <Quantity_NameOfColor.hxx>
|
||||
#include <Aspect_TypeOfLine.hxx>
|
||||
#include <TColgp_HArray1OfPnt.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <gp_Dir.hxx>
|
||||
#include <gp_Ax3.hxx>
|
||||
#include <Select3D_SensitiveSegment.hxx>
|
||||
#include <SelectMgr_Selection.hxx>
|
||||
#include <StdSelect.hxx>
|
||||
#include <StdSelect_BRepOwner.hxx>
|
||||
#include <TColgp_HArray1OfPnt.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : SetDrawerForBRepOwner
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void StdSelect::SetDrawerForBRepOwner(const Handle(SelectMgr_Selection)& /*Sel*/,
|
||||
const Handle(Prs3d_Drawer)& /*Drwr*/)
|
||||
{
|
||||
|
96
src/StdSelect/StdSelect.hxx
Normal file
96
src/StdSelect/StdSelect.hxx
Normal file
@@ -0,0 +1,96 @@
|
||||
// Created on: 1995-03-08
|
||||
// Created by: Mister rmi
|
||||
// Copyright (c) 1995-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _StdSelect_HeaderFile
|
||||
#define _StdSelect_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <SelectMgr_Selection.hxx>
|
||||
#include <Prs3d_Drawer.hxx>
|
||||
class StdSelect_BRepSelectionTool;
|
||||
class StdSelect_BRepOwner;
|
||||
class StdSelect_EdgeFilter;
|
||||
class StdSelect_FaceFilter;
|
||||
class StdSelect_ShapeTypeFilter;
|
||||
class StdSelect_Prs;
|
||||
class StdSelect_Shape;
|
||||
|
||||
|
||||
//! The StdSelect package provides the following services
|
||||
//! - the definition of selection modes for topological shapes
|
||||
//! - the definition of several concrete filtertandard
|
||||
//! Selection2d.ap classes
|
||||
//! - 2D and 3D viewer selectors.
|
||||
//! Note that each new Interactive Object must have all
|
||||
//! its selection modes defined.
|
||||
//! Standard Classes is useful to build
|
||||
//! 3D Selectable Objects, and to process
|
||||
//! 3D Selections:
|
||||
//!
|
||||
//! - Implementation of View Selector for dynamic selection
|
||||
//! in Views from V3d.
|
||||
//!
|
||||
//! - Implementation of Tool class to decompose 3D BRep Objects
|
||||
//! into sensitive Primitives for every desired mode of selection
|
||||
//! (selection of vertex,edges,wires,faces,...)
|
||||
//!
|
||||
//! - Implementation of dedicated Sensitives Entities:
|
||||
//! Text for 2D Views (linked to Specific 2D projectors.)
|
||||
class StdSelect
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! puts The same drawer in every BRepOwner Of SensitivePrimitive
|
||||
//! Used Only for hilight Of BRepOwner...
|
||||
Standard_EXPORT static void SetDrawerForBRepOwner (const Handle(SelectMgr_Selection)& aSelection, const Handle(Prs3d_Drawer)& aDrawer);
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
friend class StdSelect_BRepSelectionTool;
|
||||
friend class StdSelect_BRepOwner;
|
||||
friend class StdSelect_EdgeFilter;
|
||||
friend class StdSelect_FaceFilter;
|
||||
friend class StdSelect_ShapeTypeFilter;
|
||||
friend class StdSelect_Prs;
|
||||
friend class StdSelect_Shape;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _StdSelect_HeaderFile
|
@@ -1,160 +0,0 @@
|
||||
-- Created on: 1995-03-08
|
||||
-- Created by: Mister rmi
|
||||
-- Copyright (c) 1995-1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
class BRepOwner from StdSelect inherits EntityOwner from SelectMgr
|
||||
|
||||
---Purpose: Defines Specific Owners for Sensitive Primitives
|
||||
-- (Sensitive Segments,Circles...).
|
||||
-- Used in Dynamic Selection Mechanism.
|
||||
-- A BRepOwner has an Owner (the shape it represents)
|
||||
-- and Users (One or More Transient entities).
|
||||
-- The highlight-unhighlight methods are empty and
|
||||
-- must be redefined by each User.
|
||||
|
||||
uses
|
||||
Location from TopLoc,
|
||||
Shape from TopoDS,
|
||||
SelectableObject from SelectMgr,
|
||||
EntityOwner from SelectMgr,
|
||||
Presentation from Prs3d,
|
||||
PresentationManager from PrsMgr,
|
||||
PresentationManager3d from PrsMgr,
|
||||
NameOfColor from Quantity,
|
||||
Drawer from Prs3d,
|
||||
Shape from StdSelect,
|
||||
ZLayerId from Graphic3d
|
||||
is
|
||||
|
||||
|
||||
Create(aPriority:Integer from Standard)
|
||||
returns BRepOwner from StdSelect;
|
||||
---Purpose: Constructs an owner specification framework defined
|
||||
-- by the priority aPriority.
|
||||
Create (aShape : Shape from TopoDS;
|
||||
aPriority : Integer = 0;
|
||||
ComesFromDecomposition:Boolean from Standard = Standard_False)
|
||||
returns BRepOwner;
|
||||
---Purpose: Constructs an owner specification framework defined
|
||||
-- by the shape aShape and the priority aPriority.
|
||||
-- aShape and aPriority are stored in this framework. If
|
||||
-- more than one owner are detected during dynamic
|
||||
-- selection, the one with the highest priority is the one stored.
|
||||
|
||||
Create (aShape : Shape from TopoDS;
|
||||
theOrigin : SelectableObject from SelectMgr;
|
||||
aPriority : Integer = 0;
|
||||
FromDecomposition:Boolean from Standard = Standard_False)
|
||||
returns BRepOwner;
|
||||
---Purpose: Constructs an owner specification framework defined
|
||||
-- by the shape aShape, the selectable object theOrigin
|
||||
-- and the priority aPriority.
|
||||
-- aShape, theOrigin and aPriority are stored in this
|
||||
-- framework. If more than one owner are detected
|
||||
-- during dynamic selection, the one with the highest
|
||||
-- priority is the one stored.
|
||||
|
||||
|
||||
HasShape(me) returns Boolean from Standard;
|
||||
---C++: inline
|
||||
---Purpose: returns False if no shape was set
|
||||
--
|
||||
|
||||
Set(me : mutable;
|
||||
aShape : Shape from TopoDS;
|
||||
FromDecomposition:Boolean from Standard=Standard_False);
|
||||
---Purpose: <FromDecomposition> indicates whether <aShape>
|
||||
-- comes from decomposition of a bigger shape.
|
||||
|
||||
ComesFromDecomposition(me) returns Boolean from Standard;
|
||||
---C++: inline
|
||||
|
||||
Shape(me) returns Shape from TopoDS ;
|
||||
---C++: inline
|
||||
---C++: return const&
|
||||
|
||||
|
||||
---Category: hilight of detected shapes...
|
||||
|
||||
HasHilightMode(me) returns Boolean from Standard;
|
||||
---Purpose:
|
||||
-- Returns true if this framework has a highlight mode defined for it.
|
||||
---C++: inline
|
||||
|
||||
SetHilightMode(me:mutable;aMode : Integer from Standard);
|
||||
---C++: inline
|
||||
---Purpose: Sets the highlight mode for this framework.
|
||||
-- This defines the type of display used to highlight the
|
||||
-- owner of the shape when it is detected by the selector.
|
||||
-- The default type of display is wireframe, defined by the index 0.
|
||||
|
||||
ResetHilightMode(me:mutable) ;
|
||||
---Purpose: Resets the higlight mode for this framework.
|
||||
-- This defines the type of display used to highlight the
|
||||
-- owner of the shape when it is detected by the selector.
|
||||
-- The default type of display is wireframe, defined by the index 0.
|
||||
---C++: inline
|
||||
HilightMode(me) returns Integer from Standard;
|
||||
---Purpose: Returns the highlight mode for this framework.
|
||||
-- This defines the type of display used to highlight the
|
||||
-- owner of the shape when it is detected by the selector.
|
||||
-- The default type of display is wireframe, defined by the index 0.
|
||||
---C++: inline
|
||||
|
||||
IsHilighted (me ;
|
||||
aPM : PresentationManager from PrsMgr;
|
||||
aMode : Integer from Standard =0)
|
||||
returns Boolean from Standard is redefined virtual;
|
||||
---Purpose: Returns true if an object with the selection mode
|
||||
-- aMode is highlighted in the presentation manager aPM.
|
||||
Hilight(me:mutable) is redefined virtual;
|
||||
|
||||
Hilight(me : mutable;
|
||||
aPM : PresentationManager from PrsMgr;
|
||||
aMode : Integer from Standard =0) is redefined virtual;
|
||||
--- Purpose: Returns the selection mode aMode defining the type
|
||||
-- of shape highlighted in the presentation manager aPM.
|
||||
HilightWithColor (me : mutable;
|
||||
aPM : PresentationManager3d from PrsMgr;
|
||||
aCol : NameOfColor from Quantity;
|
||||
aMode : Integer from Standard =0) is redefined virtual;
|
||||
|
||||
Unhilight(me : mutable;
|
||||
aPM : PresentationManager from PrsMgr;
|
||||
aMode : Integer from Standard =0) is redefined virtual;
|
||||
---Purpose: Removes highlighting from the type of shape
|
||||
-- identified the selection mode aMode in the presentation manager aPM.
|
||||
Clear(me: mutable;
|
||||
aPM : PresentationManager from PrsMgr;
|
||||
aMode : Integer from Standard =0) is redefined virtual;
|
||||
---Purpose: Clears the presentation manager object aPM of all
|
||||
-- shapes with the selection mode aMode.
|
||||
|
||||
SetLocation(me:mutable; aLoc : Location from TopLoc) is redefined;
|
||||
ResetLocation(me:mutable) is redefined;
|
||||
|
||||
SetZLayer ( me : mutable;
|
||||
theLayerId : ZLayerId from Graphic3d )
|
||||
is redefined virtual;
|
||||
---Purpose: Set Z layer ID and update all presentations.
|
||||
|
||||
fields
|
||||
myPrsSh : Shape from StdSelect;
|
||||
myCurMode : Integer from Standard;
|
||||
myFromDecomposition : Boolean from Standard is protected;
|
||||
myShape : Shape from TopoDS is protected;
|
||||
end BRepOwner;
|
||||
|
||||
|
@@ -14,11 +14,17 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <StdSelect_BRepOwner.ixx>
|
||||
|
||||
#include <Graphic3d_StructureManager.hxx>
|
||||
#include <Prs3d_Drawer.hxx>
|
||||
#include <PrsMgr_PresentationManager.hxx>
|
||||
#include <SelectBasics_EntityOwner.hxx>
|
||||
#include <SelectMgr_SelectableObject.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <StdSelect_BRepOwner.hxx>
|
||||
#include <StdSelect_Shape.hxx>
|
||||
#include <TopLoc_Location.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
|
||||
//==================================================
|
||||
// Function:
|
||||
|
161
src/StdSelect/StdSelect_BRepOwner.hxx
Normal file
161
src/StdSelect/StdSelect_BRepOwner.hxx
Normal file
@@ -0,0 +1,161 @@
|
||||
// Created on: 1995-03-08
|
||||
// Created by: Mister rmi
|
||||
// Copyright (c) 1995-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _StdSelect_BRepOwner_HeaderFile
|
||||
#define _StdSelect_BRepOwner_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <SelectMgr_EntityOwner.hxx>
|
||||
#include <PrsMgr_PresentationManager3d.hxx>
|
||||
#include <Quantity_NameOfColor.hxx>
|
||||
#include <Graphic3d_ZLayerId.hxx>
|
||||
class StdSelect_Shape;
|
||||
class TopoDS_Shape;
|
||||
class SelectMgr_SelectableObject;
|
||||
class PrsMgr_PresentationManager;
|
||||
class TopLoc_Location;
|
||||
|
||||
|
||||
class StdSelect_BRepOwner;
|
||||
DEFINE_STANDARD_HANDLE(StdSelect_BRepOwner, SelectMgr_EntityOwner)
|
||||
|
||||
//! Defines Specific Owners for Sensitive Primitives
|
||||
//! (Sensitive Segments,Circles...).
|
||||
//! Used in Dynamic Selection Mechanism.
|
||||
//! A BRepOwner has an Owner (the shape it represents)
|
||||
//! and Users (One or More Transient entities).
|
||||
//! The highlight-unhighlight methods are empty and
|
||||
//! must be redefined by each User.
|
||||
class StdSelect_BRepOwner : public SelectMgr_EntityOwner
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Constructs an owner specification framework defined
|
||||
//! by the priority aPriority.
|
||||
Standard_EXPORT StdSelect_BRepOwner(const Standard_Integer aPriority);
|
||||
|
||||
//! Constructs an owner specification framework defined
|
||||
//! by the shape aShape and the priority aPriority.
|
||||
//! aShape and aPriority are stored in this framework. If
|
||||
//! more than one owner are detected during dynamic
|
||||
//! selection, the one with the highest priority is the one stored.
|
||||
Standard_EXPORT StdSelect_BRepOwner(const TopoDS_Shape& aShape, const Standard_Integer aPriority = 0, const Standard_Boolean ComesFromDecomposition = Standard_False);
|
||||
|
||||
//! Constructs an owner specification framework defined
|
||||
//! by the shape aShape, the selectable object theOrigin
|
||||
//! and the priority aPriority.
|
||||
//! aShape, theOrigin and aPriority are stored in this
|
||||
//! framework. If more than one owner are detected
|
||||
//! during dynamic selection, the one with the highest
|
||||
//! priority is the one stored.
|
||||
Standard_EXPORT StdSelect_BRepOwner(const TopoDS_Shape& aShape, const Handle(SelectMgr_SelectableObject)& theOrigin, const Standard_Integer aPriority = 0, const Standard_Boolean FromDecomposition = Standard_False);
|
||||
|
||||
//! returns False if no shape was set
|
||||
Standard_Boolean HasShape() const;
|
||||
|
||||
//! <FromDecomposition> indicates whether <aShape>
|
||||
//! comes from decomposition of a bigger shape.
|
||||
Standard_EXPORT void Set (const TopoDS_Shape& aShape, const Standard_Boolean FromDecomposition = Standard_False);
|
||||
|
||||
Standard_Boolean ComesFromDecomposition() const;
|
||||
|
||||
const TopoDS_Shape& Shape() const;
|
||||
|
||||
|
||||
//! Returns true if this framework has a highlight mode defined for it.
|
||||
Standard_Boolean HasHilightMode() const;
|
||||
|
||||
//! Sets the highlight mode for this framework.
|
||||
//! This defines the type of display used to highlight the
|
||||
//! owner of the shape when it is detected by the selector.
|
||||
//! The default type of display is wireframe, defined by the index 0.
|
||||
void SetHilightMode (const Standard_Integer aMode);
|
||||
|
||||
//! Resets the higlight mode for this framework.
|
||||
//! This defines the type of display used to highlight the
|
||||
//! owner of the shape when it is detected by the selector.
|
||||
//! The default type of display is wireframe, defined by the index 0.
|
||||
void ResetHilightMode();
|
||||
|
||||
//! Returns the highlight mode for this framework.
|
||||
//! This defines the type of display used to highlight the
|
||||
//! owner of the shape when it is detected by the selector.
|
||||
//! The default type of display is wireframe, defined by the index 0.
|
||||
Standard_Integer HilightMode() const;
|
||||
|
||||
//! Returns true if an object with the selection mode
|
||||
//! aMode is highlighted in the presentation manager aPM.
|
||||
Standard_EXPORT virtual Standard_Boolean IsHilighted (const Handle(PrsMgr_PresentationManager)& aPM, const Standard_Integer aMode = 0) const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT virtual void Hilight() Standard_OVERRIDE;
|
||||
|
||||
//! Returns the selection mode aMode defining the type
|
||||
//! of shape highlighted in the presentation manager aPM.
|
||||
Standard_EXPORT virtual void Hilight (const Handle(PrsMgr_PresentationManager)& aPM, const Standard_Integer aMode = 0) Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT virtual void HilightWithColor (const Handle(PrsMgr_PresentationManager3d)& aPM, const Quantity_NameOfColor aCol, const Standard_Integer aMode = 0) Standard_OVERRIDE;
|
||||
|
||||
//! Removes highlighting from the type of shape
|
||||
//! identified the selection mode aMode in the presentation manager aPM.
|
||||
Standard_EXPORT virtual void Unhilight (const Handle(PrsMgr_PresentationManager)& aPM, const Standard_Integer aMode = 0) Standard_OVERRIDE;
|
||||
|
||||
//! Clears the presentation manager object aPM of all
|
||||
//! shapes with the selection mode aMode.
|
||||
Standard_EXPORT virtual void Clear (const Handle(PrsMgr_PresentationManager)& aPM, const Standard_Integer aMode = 0) Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT virtual void SetLocation (const TopLoc_Location& aLoc) Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT virtual void ResetLocation() Standard_OVERRIDE;
|
||||
|
||||
//! Set Z layer ID and update all presentations.
|
||||
Standard_EXPORT virtual void SetZLayer (const Graphic3d_ZLayerId theLayerId) Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(StdSelect_BRepOwner,SelectMgr_EntityOwner)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
Standard_Boolean myFromDecomposition;
|
||||
TopoDS_Shape myShape;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Handle(StdSelect_Shape) myPrsSh;
|
||||
Standard_Integer myCurMode;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#include <StdSelect_BRepOwner.lxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _StdSelect_BRepOwner_HeaderFile
|
@@ -1,196 +0,0 @@
|
||||
-- Created on: 1995-03-08
|
||||
-- Created by: Mister rmi
|
||||
-- Copyright (c) 1995-1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
-- Fri Apr 10 98 : rob : Add Boolean for automatic
|
||||
-- Triangulation on faces...
|
||||
|
||||
|
||||
|
||||
class BRepSelectionTool from StdSelect
|
||||
|
||||
---Purpose: Tool to create specific selections (sets of primitives)
|
||||
-- for Shapes from Topology.
|
||||
-- These Selections may be used in dynamic selection
|
||||
-- Mechanism
|
||||
-- Given a Shape and a mode of selection
|
||||
-- (selection of vertices,
|
||||
-- edges,faces ...) , This Tool Computes corresponding sensitive primitives,
|
||||
-- puts them in an entity called Selection (see package SelectMgr) and returns it.
|
||||
--
|
||||
--
|
||||
-- A Priority for the decomposed pickable objects can be given ;
|
||||
-- by default There is A Preset Hierachy:
|
||||
-- Vertex priority : 5
|
||||
-- Edge priority : 4
|
||||
-- Wire priority : 3
|
||||
-- Face priority : 2
|
||||
-- Shell,solid,shape priority : 1
|
||||
-- the default priority in the following methods has no sense - it's only taken in account
|
||||
-- when the user gives a value between 0 and 10.
|
||||
-- IMPORTANT : This decomposition creates BRepEntityOwner instances (from StdSelect).
|
||||
-- which are stored in the Sensitive Entities coming from The Decomposition.
|
||||
--
|
||||
-- the result of picking in a ViewerSelector return EntityOwner from SelectMgr;
|
||||
-- to know what kind of object was picked :
|
||||
--
|
||||
-- ENTITY_OWNER -> Selectable() gives the selectableobject which
|
||||
-- was decomposed into pickable elements.
|
||||
-- Handle(StdSelect_BRepOwner)::DownCast(ENTITY_OWNER) -> Shape()
|
||||
-- gives the real picked shape (edge,vertex,shape...)
|
||||
--
|
||||
|
||||
uses
|
||||
Selection from SelectMgr,
|
||||
Shape from TopoDS,
|
||||
Face from TopoDS,
|
||||
ShapeEnum from TopAbs,
|
||||
SelectableObject from SelectMgr,
|
||||
BRepOwner from StdSelect,
|
||||
SensitiveEntity from Select3D,
|
||||
EntitySequence from Select3D
|
||||
is
|
||||
|
||||
Load(myclass;
|
||||
aSelection : Selection from SelectMgr;
|
||||
aShape : Shape from TopoDS;
|
||||
aType : ShapeEnum from TopAbs;
|
||||
theDeflection : Real from Standard;
|
||||
theDeviationAngle : Real from Standard;
|
||||
AutoTriangulation : Boolean from Standard = Standard_True;
|
||||
aPriority : Integer =-1;
|
||||
NbPOnEdge : Integer = 9;
|
||||
MaximalParameter : Real from Standard = 500);
|
||||
---Level: Public
|
||||
---Purpose: Decomposition of <aShape> into sensitive entities following
|
||||
-- a mode of decomposition <aType>. These entities are stored in <aSelection>.
|
||||
-- BrepOwners are created to store the identity of the picked shapes
|
||||
-- during the selection process.
|
||||
-- In those BRepOwners is also stored the original shape.
|
||||
-- But One can't get the selectable object which was decomposed to give
|
||||
-- the sensitive entities.
|
||||
-- maximal parameter is used for infinite objects, to limit the sensitive Domain....
|
||||
-- If AutoTriangulation = True, a Triangulation will be
|
||||
-- computed for faces which have no existing one.
|
||||
-- if AutoTriangulation = False the old algorithm will be
|
||||
-- called to compute sensitive entities on faces.
|
||||
|
||||
|
||||
|
||||
Load(myclass;
|
||||
aSelection : Selection from SelectMgr;
|
||||
Origin : SelectableObject from SelectMgr;
|
||||
aShape : Shape from TopoDS;
|
||||
aType : ShapeEnum from TopAbs;
|
||||
theDeflection : Real from Standard;
|
||||
theDeviationAngle : Real from Standard;
|
||||
AutoTriangulation : Boolean from Standard = Standard_True;
|
||||
aPriority : Integer =-1;
|
||||
NbPOnEdge : Integer = 9;
|
||||
MaximalParameter : Real from Standard = 500);
|
||||
---Purpose: Same functionnalities ; the only
|
||||
-- difference is that the selectable object from which the
|
||||
-- selection comes is stored in each Sensitive EntityOwner;
|
||||
|
||||
|
||||
-- Load(myclass;
|
||||
-- aSelection : Selection from SelectMgr;
|
||||
-- Users : SequenceOfAddress from SelectBasics;
|
||||
-- aShape : Shape from TopoDS;
|
||||
-- aType : ShapeEnum from TopAbs;
|
||||
-- AutoTriangulation : Boolean from Standard = Standard_True;
|
||||
-- aPriority : Integer =-1;
|
||||
-- NbPOnEdge : Integer = 9;
|
||||
-- MaximalParameter : Real from Standard = 500);
|
||||
---Level: Public
|
||||
---Purpose:decomposition of <aShape> into sensitive entities following
|
||||
-- a mode of decomposition <aType>. These entities are stored in <aSelection>
|
||||
-- The Major difference is that the known users are first inserted in the
|
||||
-- BRepOwners. the original shape is the last user...
|
||||
-- (see EntityOwner from SelectBasics and BrepOwner)...
|
||||
|
||||
|
||||
GetStandardPriority(myclass;
|
||||
aShap: Shape from TopoDS;
|
||||
aType: ShapeEnum from TopAbs)
|
||||
returns Integer from Standard;
|
||||
---Purpose: Returns the standard priority of the shape aShap having the type aType.
|
||||
-- This priority is passed to a StdSelect_BRepOwner object.
|
||||
-- You can use the function Load to modify the
|
||||
-- selection priority of an owner to make one entity
|
||||
-- more selectable than another one.
|
||||
|
||||
ComputeSensitive(myclass;
|
||||
aShape : Shape from TopoDS;
|
||||
anOwner : BRepOwner from StdSelect;
|
||||
aSelection : Selection from SelectMgr;
|
||||
theDeflection : Real from Standard;
|
||||
theDeviationAngle : Real from Standard;
|
||||
NbPOnEdge : Integer;
|
||||
MaximalParameter : Real from Standard;
|
||||
AutoTriangulation : Boolean from Standard = Standard_True) ;
|
||||
---Purpose: Computes the sensitive primitives corresponding to
|
||||
-- the subshape aShape with the owner anOwner.
|
||||
-- Stores them in the SelectMgr_Selection object, and returns this object.
|
||||
-- The number NbPOnEdge is used to define edges and wires.
|
||||
-- In the case of infinite objects, the value
|
||||
-- MaximalParameter serves to limit computation time
|
||||
-- by limiting the sensitive area. The default value is 500.
|
||||
-- If AutoTriangulation is true, triangulation will be
|
||||
-- computed for the faces which have none. If it is false,
|
||||
-- sensitive entities on these faces will be calculated.
|
||||
|
||||
preBuildBVH (myclass;
|
||||
theSelection : Selection from SelectMgr)
|
||||
is private;
|
||||
---Level: Internal
|
||||
---Purpose: Traverses the selection given and pre-builds BVH trees for heavyweight
|
||||
-- sensitive entities containing more than BVH_PRIMITIVE_LIMIT (defined in .cxx file)
|
||||
-- sub-elements
|
||||
|
||||
GetEdgeSensitive(myclass;
|
||||
aShape : Shape from TopoDS;
|
||||
anOwner : BRepOwner from StdSelect;
|
||||
aSelection : Selection from SelectMgr;
|
||||
theDeflection : Real from Standard;
|
||||
theDeflectionAngle : Real from Standard;
|
||||
NbPOnEdge : Integer;
|
||||
MaximalParameter : Real from Standard;
|
||||
aSensitive : in out SensitiveEntity from Select3D)
|
||||
is private;
|
||||
---Level: Internal
|
||||
---Purpose:
|
||||
|
||||
|
||||
GetSensitiveForFace(myclass;
|
||||
aFace : Face from TopoDS;
|
||||
anOwner : BRepOwner from StdSelect;
|
||||
OutList : in out EntitySequence from Select3D;
|
||||
AutoTriangulation : Boolean from Standard = Standard_True;
|
||||
NbPOnEdge : Integer = 9;
|
||||
MaxiParam : Real from Standard =500;
|
||||
InteriorFlag : Boolean from Standard = Standard_True)
|
||||
returns Boolean from Standard;
|
||||
---Purpose: appends to <OutList> the 3D
|
||||
-- sensitive entities created for selection of <aFace>
|
||||
-- if<InteriorFlag> = False the face will be sensitive only on its boundary
|
||||
|
||||
|
||||
|
||||
end BRepSelectionTool;
|
||||
|
||||
|
||||
|
||||
|
@@ -14,52 +14,54 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <StdSelect_BRepSelectionTool.ixx>
|
||||
#include <GeomAdaptor_Curve.hxx>
|
||||
#include <BRepAdaptor_Curve.hxx>
|
||||
#include <TopTools_IndexedMapOfShape.hxx>
|
||||
#include <TopExp.hxx>
|
||||
#include <TopExp_Explorer.hxx>
|
||||
#include <BRepTools_WireExplorer.hxx>
|
||||
#include <Select3D_SensitivePoint.hxx>
|
||||
#include <StdSelect_BRepOwner.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
#include <BRepAdaptor_Curve.hxx>
|
||||
#include <BRepAdaptor_Surface.hxx>
|
||||
#include <GeomAbs_SurfaceType.hxx>
|
||||
#include <BRepBndLib.hxx>
|
||||
|
||||
#include <Bnd_Box.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <Geom_Circle.hxx>
|
||||
#include <Select3D_SensitiveEntity.hxx>
|
||||
#include <Select3D_SensitiveCircle.hxx>
|
||||
#include <Select3D_SensitiveCurve.hxx>
|
||||
#include <Select3D_SensitiveSegment.hxx>
|
||||
#include <Select3D_SensitiveWire.hxx>
|
||||
#include <Select3D_SensitiveFace.hxx>
|
||||
#include <Select3D_SensitiveBox.hxx>
|
||||
#include <Select3D_SensitiveTriangulation.hxx>
|
||||
#include <Select3D_SensitiveTriangle.hxx>
|
||||
#include <Select3D_SensitiveGroup.hxx>
|
||||
#include <SelectMgr_Selection.hxx>
|
||||
#include <TColgp_HArray1OfPnt.hxx>
|
||||
#include <TColgp_SequenceOfPnt.hxx>
|
||||
#include <TColStd_Array1OfReal.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <BRepAdaptor_Curve.hxx>
|
||||
#include <BRepAdaptor_Surface.hxx>
|
||||
#include <BRepBndLib.hxx>
|
||||
#include <BRepMesh_IncrementalMesh.hxx>
|
||||
#include <BRepTools.hxx>
|
||||
#include <Select3D_TypeOfSensitivity.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <gp_Circ.hxx>
|
||||
#include <BRepTools_WireExplorer.hxx>
|
||||
#include <GCPnts_TangentialDeflection.hxx>
|
||||
#include <TopoDS_Wire.hxx>
|
||||
#include <Geom_Circle.hxx>
|
||||
#include <GeomAbs_SurfaceType.hxx>
|
||||
#include <GeomAdaptor_Curve.hxx>
|
||||
#include <gp_Circ.hxx>
|
||||
#include <Poly_Array1OfTriangle.hxx>
|
||||
#include <Poly_Polygon3D.hxx>
|
||||
#include <Poly_PolygonOnTriangulation.hxx>
|
||||
#include <Poly_Triangulation.hxx>
|
||||
#include <BRepMesh_IncrementalMesh.hxx>
|
||||
#include <Standard_NullObject.hxx>
|
||||
#include <Standard_ErrorHandler.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <Select3D_SensitiveBox.hxx>
|
||||
#include <Select3D_SensitiveCircle.hxx>
|
||||
#include <Select3D_SensitiveCurve.hxx>
|
||||
#include <Select3D_SensitiveEntity.hxx>
|
||||
#include <Select3D_SensitiveFace.hxx>
|
||||
#include <Select3D_SensitiveGroup.hxx>
|
||||
#include <Select3D_SensitivePoint.hxx>
|
||||
#include <Select3D_SensitiveSegment.hxx>
|
||||
#include <Select3D_SensitiveTriangle.hxx>
|
||||
#include <Select3D_SensitiveTriangulation.hxx>
|
||||
#include <Select3D_SensitiveWire.hxx>
|
||||
#include <Select3D_TypeOfSensitivity.hxx>
|
||||
#include <SelectMgr_EntityOwner.hxx>
|
||||
#include <SelectMgr_SelectableObject.hxx>
|
||||
#include <SelectMgr_Selection.hxx>
|
||||
#include <Standard_ErrorHandler.hxx>
|
||||
#include <Standard_NullObject.hxx>
|
||||
#include <StdSelect_BRepOwner.hxx>
|
||||
#include <StdSelect_BRepSelectionTool.hxx>
|
||||
#include <TColgp_HArray1OfPnt.hxx>
|
||||
#include <TColgp_SequenceOfPnt.hxx>
|
||||
#include <TColStd_Array1OfReal.hxx>
|
||||
#include <TopExp.hxx>
|
||||
#include <TopExp_Explorer.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
#include <TopoDS_Face.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <TopoDS_Wire.hxx>
|
||||
#include <TopTools_IndexedMapOfShape.hxx>
|
||||
|
||||
#define BVH_PRIMITIVE_LIMIT 800000
|
||||
|
||||
|
150
src/StdSelect/StdSelect_BRepSelectionTool.hxx
Normal file
150
src/StdSelect/StdSelect_BRepSelectionTool.hxx
Normal file
@@ -0,0 +1,150 @@
|
||||
// Created on: 1995-03-08
|
||||
// Created by: Mister rmi
|
||||
// Copyright (c) 1995-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _StdSelect_BRepSelectionTool_HeaderFile
|
||||
#define _StdSelect_BRepSelectionTool_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <SelectMgr_Selection.hxx>
|
||||
#include <TopAbs_ShapeEnum.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Select3D_SensitiveEntity.hxx>
|
||||
#include <Select3D_EntitySequence.hxx>
|
||||
class TopoDS_Shape;
|
||||
class SelectMgr_SelectableObject;
|
||||
class StdSelect_BRepOwner;
|
||||
class TopoDS_Face;
|
||||
|
||||
|
||||
//! Tool to create specific selections (sets of primitives)
|
||||
//! for Shapes from Topology.
|
||||
//! These Selections may be used in dynamic selection
|
||||
//! Mechanism
|
||||
//! Given a Shape and a mode of selection
|
||||
//! (selection of vertices,
|
||||
//! edges,faces ...) , This Tool Computes corresponding sensitive primitives,
|
||||
//! puts them in an entity called Selection (see package SelectMgr) and returns it.
|
||||
//!
|
||||
//! A Priority for the decomposed pickable objects can be given ;
|
||||
//! by default There is A Preset Hierachy:
|
||||
//! Vertex priority : 5
|
||||
//! Edge priority : 4
|
||||
//! Wire priority : 3
|
||||
//! Face priority : 2
|
||||
//! Shell,solid,shape priority : 1
|
||||
//! the default priority in the following methods has no sense - it's only taken in account
|
||||
//! when the user gives a value between 0 and 10.
|
||||
//! IMPORTANT : This decomposition creates BRepEntityOwner instances (from StdSelect).
|
||||
//! which are stored in the Sensitive Entities coming from The Decomposition.
|
||||
//!
|
||||
//! the result of picking in a ViewerSelector return EntityOwner from SelectMgr;
|
||||
//! to know what kind of object was picked :
|
||||
//!
|
||||
//! ENTITY_OWNER -> Selectable() gives the selectableobject which
|
||||
//! was decomposed into pickable elements.
|
||||
//! Handle(StdSelect_BRepOwner)::DownCast(ENTITY_OWNER) -> Shape()
|
||||
//! gives the real picked shape (edge,vertex,shape...)
|
||||
class StdSelect_BRepSelectionTool
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Decomposition of <aShape> into sensitive entities following
|
||||
//! a mode of decomposition <aType>. These entities are stored in <aSelection>.
|
||||
//! BrepOwners are created to store the identity of the picked shapes
|
||||
//! during the selection process.
|
||||
//! In those BRepOwners is also stored the original shape.
|
||||
//! But One can't get the selectable object which was decomposed to give
|
||||
//! the sensitive entities.
|
||||
//! maximal parameter is used for infinite objects, to limit the sensitive Domain....
|
||||
//! If AutoTriangulation = True, a Triangulation will be
|
||||
//! computed for faces which have no existing one.
|
||||
//! if AutoTriangulation = False the old algorithm will be
|
||||
//! called to compute sensitive entities on faces.
|
||||
Standard_EXPORT static void Load (const Handle(SelectMgr_Selection)& aSelection, const TopoDS_Shape& aShape, const TopAbs_ShapeEnum aType, const Standard_Real theDeflection, const Standard_Real theDeviationAngle, const Standard_Boolean AutoTriangulation = Standard_True, const Standard_Integer aPriority = -1, const Standard_Integer NbPOnEdge = 9, const Standard_Real MaximalParameter = 500);
|
||||
|
||||
//! Same functionnalities ; the only
|
||||
//! difference is that the selectable object from which the
|
||||
//! selection comes is stored in each Sensitive EntityOwner;
|
||||
//! decomposition of <aShape> into sensitive entities following
|
||||
//! a mode of decomposition <aType>. These entities are stored in <aSelection>
|
||||
//! The Major difference is that the known users are first inserted in the
|
||||
//! BRepOwners. the original shape is the last user...
|
||||
//! (see EntityOwner from SelectBasics and BrepOwner)...
|
||||
Standard_EXPORT static void Load (const Handle(SelectMgr_Selection)& aSelection, const Handle(SelectMgr_SelectableObject)& Origin, const TopoDS_Shape& aShape, const TopAbs_ShapeEnum aType, const Standard_Real theDeflection, const Standard_Real theDeviationAngle, const Standard_Boolean AutoTriangulation = Standard_True, const Standard_Integer aPriority = -1, const Standard_Integer NbPOnEdge = 9, const Standard_Real MaximalParameter = 500);
|
||||
|
||||
//! Returns the standard priority of the shape aShap having the type aType.
|
||||
//! This priority is passed to a StdSelect_BRepOwner object.
|
||||
//! You can use the function Load to modify the
|
||||
//! selection priority of an owner to make one entity
|
||||
//! more selectable than another one.
|
||||
Standard_EXPORT static Standard_Integer GetStandardPriority (const TopoDS_Shape& aShap, const TopAbs_ShapeEnum aType);
|
||||
|
||||
//! Computes the sensitive primitives corresponding to
|
||||
//! the subshape aShape with the owner anOwner.
|
||||
//! Stores them in the SelectMgr_Selection object, and returns this object.
|
||||
//! The number NbPOnEdge is used to define edges and wires.
|
||||
//! In the case of infinite objects, the value
|
||||
//! MaximalParameter serves to limit computation time
|
||||
//! by limiting the sensitive area. The default value is 500.
|
||||
//! If AutoTriangulation is true, triangulation will be
|
||||
//! computed for the faces which have none. If it is false,
|
||||
//! sensitive entities on these faces will be calculated.
|
||||
Standard_EXPORT static void ComputeSensitive (const TopoDS_Shape& aShape, const Handle(StdSelect_BRepOwner)& anOwner, const Handle(SelectMgr_Selection)& aSelection, const Standard_Real theDeflection, const Standard_Real theDeviationAngle, const Standard_Integer NbPOnEdge, const Standard_Real MaximalParameter, const Standard_Boolean AutoTriangulation = Standard_True);
|
||||
|
||||
//! appends to <OutList> the 3D
|
||||
//! sensitive entities created for selection of <aFace>
|
||||
//! if<InteriorFlag> = False the face will be sensitive only on its boundary
|
||||
Standard_EXPORT static Standard_Boolean GetSensitiveForFace (const TopoDS_Face& aFace, const Handle(StdSelect_BRepOwner)& anOwner, Select3D_EntitySequence& OutList, const Standard_Boolean AutoTriangulation = Standard_True, const Standard_Integer NbPOnEdge = 9, const Standard_Real MaxiParam = 500, const Standard_Boolean InteriorFlag = Standard_True);
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
//! Traverses the selection given and pre-builds BVH trees for heavyweight
|
||||
//! sensitive entities containing more than BVH_PRIMITIVE_LIMIT (defined in .cxx file)
|
||||
//! sub-elements
|
||||
Standard_EXPORT static void preBuildBVH (const Handle(SelectMgr_Selection)& theSelection);
|
||||
|
||||
Standard_EXPORT static void GetEdgeSensitive (const TopoDS_Shape& aShape, const Handle(StdSelect_BRepOwner)& anOwner, const Handle(SelectMgr_Selection)& aSelection, const Standard_Real theDeflection, const Standard_Real theDeflectionAngle, const Standard_Integer NbPOnEdge, const Standard_Real MaximalParameter, Handle(Select3D_SensitiveEntity)& aSensitive);
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _StdSelect_BRepSelectionTool_HeaderFile
|
28
src/StdSelect/StdSelect_DisplayMode.hxx
Normal file
28
src/StdSelect/StdSelect_DisplayMode.hxx
Normal file
@@ -0,0 +1,28 @@
|
||||
// Created on: 1995-03-08
|
||||
// Created by: Mister rmi
|
||||
// Copyright (c) 1995-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _StdSelect_DisplayMode_HeaderFile
|
||||
#define _StdSelect_DisplayMode_HeaderFile
|
||||
|
||||
|
||||
enum StdSelect_DisplayMode
|
||||
{
|
||||
StdSelect_DM_Wireframe,
|
||||
StdSelect_DM_Shading,
|
||||
StdSelect_DM_HLR
|
||||
};
|
||||
|
||||
#endif // _StdSelect_DisplayMode_HeaderFile
|
@@ -1,49 +0,0 @@
|
||||
-- Created on: 1996-03-11
|
||||
-- Created by: Robert COUBLANC
|
||||
-- Copyright (c) 1996-1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
class EdgeFilter from StdSelect inherits Filter from SelectMgr
|
||||
|
||||
---Purpose: A framework to define a filter to select a specific type of edge.
|
||||
-- The types available include:
|
||||
-- - any edge
|
||||
-- - a linear edge
|
||||
-- - a circular edge.
|
||||
|
||||
uses
|
||||
TypeOfEdge from StdSelect,
|
||||
Shape from TopoDS,
|
||||
EntityOwner from SelectMgr,
|
||||
ShapeEnum from TopAbs
|
||||
is
|
||||
Create (Edge: TypeOfEdge from StdSelect)
|
||||
returns EdgeFilter from StdSelect;
|
||||
---Purpose: Constructs an edge filter object defined by the type of edge Edge.
|
||||
SetType(me:mutable;aNewType : TypeOfEdge from StdSelect);
|
||||
---Purpose: Sets the type of edge aNewType. aNewType is to be highlighted in selection.
|
||||
|
||||
Type(me) returns TypeOfEdge from StdSelect;
|
||||
---Purpose: Returns the type of edge to be highlighted in selection.
|
||||
IsOk (me;anobj : EntityOwner from SelectMgr)
|
||||
returns Boolean from Standard is redefined virtual;
|
||||
|
||||
ActsOn(me; aStandardMode : ShapeEnum from TopAbs)
|
||||
returns Boolean from Standard is redefined virtual;
|
||||
|
||||
fields
|
||||
mytype : TypeOfEdge from StdSelect;
|
||||
|
||||
|
||||
end EdgeFilter;
|
@@ -14,19 +14,22 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <StdSelect_EdgeFilter.ixx>
|
||||
|
||||
#include <BRepAdaptor_Curve.hxx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
#include <TopAbs.hxx>
|
||||
#include <SelectMgr_EntityOwner.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <StdSelect_BRepOwner.hxx>
|
||||
#include <StdSelect_EdgeFilter.hxx>
|
||||
#include <TopAbs.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
|
||||
/*#include <.hxx>
|
||||
#include <.hxx>
|
||||
#include <.hxx>
|
||||
#include <.hxx>
|
||||
#include <.hxx>
|
||||
*/
|
||||
|
||||
//==================================================
|
||||
// Function:
|
||||
// Purpose :
|
||||
|
81
src/StdSelect/StdSelect_EdgeFilter.hxx
Normal file
81
src/StdSelect/StdSelect_EdgeFilter.hxx
Normal file
@@ -0,0 +1,81 @@
|
||||
// Created on: 1996-03-11
|
||||
// Created by: Robert COUBLANC
|
||||
// Copyright (c) 1996-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _StdSelect_EdgeFilter_HeaderFile
|
||||
#define _StdSelect_EdgeFilter_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <StdSelect_TypeOfEdge.hxx>
|
||||
#include <SelectMgr_Filter.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <TopAbs_ShapeEnum.hxx>
|
||||
class SelectMgr_EntityOwner;
|
||||
|
||||
|
||||
class StdSelect_EdgeFilter;
|
||||
DEFINE_STANDARD_HANDLE(StdSelect_EdgeFilter, SelectMgr_Filter)
|
||||
|
||||
//! A framework to define a filter to select a specific type of edge.
|
||||
//! The types available include:
|
||||
//! - any edge
|
||||
//! - a linear edge
|
||||
//! - a circular edge.
|
||||
class StdSelect_EdgeFilter : public SelectMgr_Filter
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Constructs an edge filter object defined by the type of edge Edge.
|
||||
Standard_EXPORT StdSelect_EdgeFilter(const StdSelect_TypeOfEdge Edge);
|
||||
|
||||
//! Sets the type of edge aNewType. aNewType is to be highlighted in selection.
|
||||
Standard_EXPORT void SetType (const StdSelect_TypeOfEdge aNewType);
|
||||
|
||||
//! Returns the type of edge to be highlighted in selection.
|
||||
Standard_EXPORT StdSelect_TypeOfEdge Type() const;
|
||||
|
||||
Standard_EXPORT virtual Standard_Boolean IsOk (const Handle(SelectMgr_EntityOwner)& anobj) const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT virtual Standard_Boolean ActsOn (const TopAbs_ShapeEnum aStandardMode) const Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(StdSelect_EdgeFilter,SelectMgr_Filter)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
StdSelect_TypeOfEdge mytype;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _StdSelect_EdgeFilter_HeaderFile
|
@@ -1,52 +0,0 @@
|
||||
-- Created on: 1996-03-08
|
||||
-- Created by: Robert COUBLANC
|
||||
-- Copyright (c) 1996-1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
class FaceFilter from StdSelect inherits Filter from SelectMgr
|
||||
|
||||
---Purpose: A framework to define a filter to select a specific type of face.
|
||||
-- The types available include:
|
||||
-- - any face
|
||||
-- - a planar face
|
||||
-- - a cylindrical face
|
||||
-- - a spherical face
|
||||
-- - a toroidal face
|
||||
-- - a revol face.
|
||||
|
||||
uses
|
||||
TypeOfFace from StdSelect,
|
||||
Shape from TopoDS,
|
||||
EntityOwner from SelectMgr,
|
||||
ShapeEnum from TopAbs
|
||||
is
|
||||
|
||||
Create (aTypeOfFace: TypeOfFace from StdSelect)
|
||||
returns FaceFilter from StdSelect;
|
||||
---Purpose: Constructs a face filter object defined by the type of face aTypeOfFace.
|
||||
SetType(me:mutable;aNewType : TypeOfFace from StdSelect);
|
||||
--- Purpose: Sets the type of face aNewType. aNewType is to be highlighted in selection.
|
||||
Type(me) returns TypeOfFace from StdSelect;
|
||||
--- Purpose: Returns the type of face to be highlighted in selection.
|
||||
IsOk (me;anobj : EntityOwner from SelectMgr)
|
||||
returns Boolean from Standard is redefined virtual;
|
||||
|
||||
ActsOn(me; aStandardMode : ShapeEnum from TopAbs)
|
||||
returns Boolean from Standard is redefined virtual;
|
||||
|
||||
fields
|
||||
|
||||
mytype : TypeOfFace from StdSelect;
|
||||
|
||||
end FaceFilter;
|
@@ -14,13 +14,17 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <StdSelect_FaceFilter.ixx>
|
||||
|
||||
#include <BRepAdaptor_Surface.hxx>
|
||||
#include <SelectMgr_EntityOwner.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <StdSelect_BRepOwner.hxx>
|
||||
#include <StdSelect_FaceFilter.hxx>
|
||||
#include <TopAbs.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
#include <TopoDS_Face.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
#include <TopAbs.hxx>
|
||||
#include <StdSelect_BRepOwner.hxx>
|
||||
|
||||
/*#include <.hxx>
|
||||
#include <.hxx>
|
||||
#include <.hxx>
|
||||
@@ -28,7 +32,6 @@
|
||||
#include <.hxx>
|
||||
#include <.hxx>
|
||||
*/
|
||||
|
||||
StdSelect_FaceFilter::
|
||||
StdSelect_FaceFilter(const StdSelect_TypeOfFace aTypeOfFace):
|
||||
mytype(aTypeOfFace){}
|
||||
|
84
src/StdSelect/StdSelect_FaceFilter.hxx
Normal file
84
src/StdSelect/StdSelect_FaceFilter.hxx
Normal file
@@ -0,0 +1,84 @@
|
||||
// Created on: 1996-03-08
|
||||
// Created by: Robert COUBLANC
|
||||
// Copyright (c) 1996-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _StdSelect_FaceFilter_HeaderFile
|
||||
#define _StdSelect_FaceFilter_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <StdSelect_TypeOfFace.hxx>
|
||||
#include <SelectMgr_Filter.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <TopAbs_ShapeEnum.hxx>
|
||||
class SelectMgr_EntityOwner;
|
||||
|
||||
|
||||
class StdSelect_FaceFilter;
|
||||
DEFINE_STANDARD_HANDLE(StdSelect_FaceFilter, SelectMgr_Filter)
|
||||
|
||||
//! A framework to define a filter to select a specific type of face.
|
||||
//! The types available include:
|
||||
//! - any face
|
||||
//! - a planar face
|
||||
//! - a cylindrical face
|
||||
//! - a spherical face
|
||||
//! - a toroidal face
|
||||
//! - a revol face.
|
||||
class StdSelect_FaceFilter : public SelectMgr_Filter
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Constructs a face filter object defined by the type of face aTypeOfFace.
|
||||
Standard_EXPORT StdSelect_FaceFilter(const StdSelect_TypeOfFace aTypeOfFace);
|
||||
|
||||
//! Sets the type of face aNewType. aNewType is to be highlighted in selection.
|
||||
Standard_EXPORT void SetType (const StdSelect_TypeOfFace aNewType);
|
||||
|
||||
//! Returns the type of face to be highlighted in selection.
|
||||
Standard_EXPORT StdSelect_TypeOfFace Type() const;
|
||||
|
||||
Standard_EXPORT virtual Standard_Boolean IsOk (const Handle(SelectMgr_EntityOwner)& anobj) const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT virtual Standard_Boolean ActsOn (const TopAbs_ShapeEnum aStandardMode) const Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(StdSelect_FaceFilter,SelectMgr_Filter)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
StdSelect_TypeOfFace mytype;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _StdSelect_FaceFilter_HeaderFile
|
@@ -1,38 +0,0 @@
|
||||
-- Created on: 1995-03-17
|
||||
-- Created by: Robert COUBLANC
|
||||
-- Copyright (c) 1995-1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
private class Prs from StdSelect inherits Presentation from Prs3d
|
||||
|
||||
---Purpose: allows entities owners to be hilighted
|
||||
-- independantly from PresentableObjects
|
||||
|
||||
uses
|
||||
StructureManager from Graphic3d
|
||||
|
||||
is
|
||||
Create(aStructureManager: StructureManager from Graphic3d)
|
||||
returns Prs;
|
||||
|
||||
Manager(me) returns any StructureManager from Graphic3d;
|
||||
---C++: inline
|
||||
---C++: return const&
|
||||
|
||||
|
||||
fields
|
||||
|
||||
myManager : StructureManager from Graphic3d;
|
||||
|
||||
end Prs;
|
@@ -14,7 +14,10 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <StdSelect_Prs.ixx>
|
||||
|
||||
#include <Graphic3d_StructureManager.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <StdSelect_Prs.hxx>
|
||||
|
||||
StdSelect_Prs::
|
||||
StdSelect_Prs(const Handle(Graphic3d_StructureManager)& aStructureManager):
|
||||
|
67
src/StdSelect/StdSelect_Prs.hxx
Normal file
67
src/StdSelect/StdSelect_Prs.hxx
Normal file
@@ -0,0 +1,67 @@
|
||||
// Created on: 1995-03-17
|
||||
// Created by: Robert COUBLANC
|
||||
// Copyright (c) 1995-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _StdSelect_Prs_HeaderFile
|
||||
#define _StdSelect_Prs_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Prs3d_Presentation.hxx>
|
||||
class Graphic3d_StructureManager;
|
||||
|
||||
|
||||
class StdSelect_Prs;
|
||||
DEFINE_STANDARD_HANDLE(StdSelect_Prs, Prs3d_Presentation)
|
||||
|
||||
//! allows entities owners to be hilighted
|
||||
//! independantly from PresentableObjects
|
||||
class StdSelect_Prs : public Prs3d_Presentation
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Standard_EXPORT StdSelect_Prs(const Handle(Graphic3d_StructureManager)& aStructureManager);
|
||||
|
||||
const Handle(Graphic3d_StructureManager)& Manager() const;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(StdSelect_Prs,Prs3d_Presentation)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Handle(Graphic3d_StructureManager) myManager;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#include <StdSelect_Prs.lxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _StdSelect_Prs_HeaderFile
|
29
src/StdSelect/StdSelect_SensitivityMode.hxx
Normal file
29
src/StdSelect/StdSelect_SensitivityMode.hxx
Normal file
@@ -0,0 +1,29 @@
|
||||
// Created on: 1995-03-08
|
||||
// Created by: Mister rmi
|
||||
// Copyright (c) 1995-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _StdSelect_SensitivityMode_HeaderFile
|
||||
#define _StdSelect_SensitivityMode_HeaderFile
|
||||
|
||||
//! Selection sensitivity mode. SM_WINDOW mode uses the
|
||||
//! specified pixel tolerance to compute the sensitivity value,
|
||||
//! SM_VIEW mode allows to define the sensitivity manually.
|
||||
enum StdSelect_SensitivityMode
|
||||
{
|
||||
StdSelect_SM_WINDOW,
|
||||
StdSelect_SM_VIEW
|
||||
};
|
||||
|
||||
#endif // _StdSelect_SensitivityMode_HeaderFile
|
@@ -1,68 +0,0 @@
|
||||
-- Created on: 1998-03-27
|
||||
-- Created by: Robert COUBLANC
|
||||
-- Copyright (c) 1998-1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
private class Shape from StdSelect inherits PresentableObject from PrsMgr
|
||||
|
||||
---Purpose: Presentable shape only for purpose of display for BRepOwner...
|
||||
|
||||
uses
|
||||
Projector from Prs3d,
|
||||
Transformation from Geom,
|
||||
Shape from TopoDS,
|
||||
PresentationManager3d from PrsMgr,
|
||||
Drawer from Prs3d,
|
||||
Presentation from Prs3d
|
||||
|
||||
is
|
||||
Create(theShape : Shape from TopoDS;
|
||||
theDrawer : Drawer from Prs3d) returns Shape from StdSelect;
|
||||
|
||||
Compute(me:mutable;
|
||||
aPresentationManager: PresentationManager3d from PrsMgr;
|
||||
aPresentation: Presentation from Prs3d;
|
||||
aMode: Integer from Standard = 0)
|
||||
is redefined static;
|
||||
|
||||
Compute(me:mutable;
|
||||
aProjector: Projector from Prs3d;
|
||||
aPresentation: Presentation from Prs3d)
|
||||
is redefined static private;
|
||||
|
||||
|
||||
Compute(me : mutable;
|
||||
aProjector : Projector from Prs3d;
|
||||
aTrsf : Transformation from Geom;
|
||||
aPresentation : Presentation from Prs3d)
|
||||
is redefined;
|
||||
---Purpose: computes the presentation according to a point of view
|
||||
-- given by <aProjector>.
|
||||
-- To be Used when the associated degenerated Presentations
|
||||
-- have been transformed by <aTrsf> which is not a Pure
|
||||
-- Translation. The HLR Prs can't be deducted automatically
|
||||
-- WARNING :<aTrsf> must be applied
|
||||
-- to the object to display before computation !!!
|
||||
|
||||
Shape(me) returns Shape from TopoDS;
|
||||
---C++: inline
|
||||
---C++: return const&
|
||||
|
||||
Shape(me:mutable;sh : Shape from TopoDS);
|
||||
---C++: inline
|
||||
|
||||
fields
|
||||
mysh : Shape from TopoDS;
|
||||
myDrawer : Drawer from Prs3d;
|
||||
end Shape;
|
@@ -14,12 +14,17 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <StdSelect_Shape.ixx>
|
||||
|
||||
#include <Geom_Transformation.hxx>
|
||||
#include <Prs3d_Drawer.hxx>
|
||||
#include <Prs3d_Presentation.hxx>
|
||||
#include <Prs3d_Projector.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <StdPrs_ShadedShape.hxx>
|
||||
#include <StdPrs_WFDeflectionShape.hxx>
|
||||
#include <StdSelect_Shape.hxx>
|
||||
#include <TopAbs_ShapeEnum.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
|
||||
StdSelect_Shape::StdSelect_Shape (const TopoDS_Shape& theShape, const Handle(Prs3d_Drawer)& theDrawer):
|
||||
mysh (theShape),
|
||||
|
89
src/StdSelect/StdSelect_Shape.hxx
Normal file
89
src/StdSelect/StdSelect_Shape.hxx
Normal file
@@ -0,0 +1,89 @@
|
||||
// Created on: 1998-03-27
|
||||
// Created by: Robert COUBLANC
|
||||
// Copyright (c) 1998-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _StdSelect_Shape_HeaderFile
|
||||
#define _StdSelect_Shape_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <Prs3d_Drawer.hxx>
|
||||
#include <PrsMgr_PresentableObject.hxx>
|
||||
#include <PrsMgr_PresentationManager3d.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
class TopoDS_Shape;
|
||||
class Prs3d_Presentation;
|
||||
class Prs3d_Projector;
|
||||
class Geom_Transformation;
|
||||
|
||||
|
||||
class StdSelect_Shape;
|
||||
DEFINE_STANDARD_HANDLE(StdSelect_Shape, PrsMgr_PresentableObject)
|
||||
|
||||
//! Presentable shape only for purpose of display for BRepOwner...
|
||||
class StdSelect_Shape : public PrsMgr_PresentableObject
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Standard_EXPORT StdSelect_Shape(const TopoDS_Shape& theShape, const Handle(Prs3d_Drawer)& theDrawer);
|
||||
|
||||
Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE;
|
||||
|
||||
//! computes the presentation according to a point of view
|
||||
//! given by <aProjector>.
|
||||
//! To be Used when the associated degenerated Presentations
|
||||
//! have been transformed by <aTrsf> which is not a Pure
|
||||
//! Translation. The HLR Prs can't be deducted automatically
|
||||
//! WARNING :<aTrsf> must be applied
|
||||
//! to the object to display before computation !!!
|
||||
Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTrsf, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
|
||||
|
||||
const TopoDS_Shape& Shape() const;
|
||||
|
||||
void Shape (const TopoDS_Shape& sh);
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(StdSelect_Shape,PrsMgr_PresentableObject)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Standard_EXPORT void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
|
||||
|
||||
TopoDS_Shape mysh;
|
||||
Handle(Prs3d_Drawer) myDrawer;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#include <StdSelect_Shape.lxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _StdSelect_Shape_HeaderFile
|
@@ -1,54 +0,0 @@
|
||||
-- Created on: 1996-09-17
|
||||
-- Created by: Odile Olivier
|
||||
-- Copyright (c) 1996-1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
class ShapeTypeFilter from StdSelect inherits Filter from SelectMgr
|
||||
|
||||
--- Purpose: A filter framework which allows you to define a filter
|
||||
-- for a specific shape type. The types available include:
|
||||
-- - compound
|
||||
-- - compsolid
|
||||
-- - solid
|
||||
-- - shell
|
||||
-- - face
|
||||
-- - wire
|
||||
-- - edge
|
||||
-- - vertex.
|
||||
|
||||
uses
|
||||
Shape from TopoDS,
|
||||
EntityOwner from SelectMgr,
|
||||
ShapeEnum from TopAbs
|
||||
is
|
||||
|
||||
Create (aType: ShapeEnum from TopAbs)
|
||||
returns ShapeTypeFilter from StdSelect;
|
||||
---Purpose: Constructs a filter object defined by the shape type aType.
|
||||
|
||||
IsOk (me;anobj : EntityOwner from SelectMgr)
|
||||
returns Boolean from Standard is redefined virtual;
|
||||
|
||||
Type(me) returns ShapeEnum from TopAbs;
|
||||
---Purpose: Returns the type of shape selected by the filter.
|
||||
---C++: inline
|
||||
|
||||
ActsOn(me; aStandardMode : ShapeEnum from TopAbs)
|
||||
returns Boolean from Standard is redefined virtual;
|
||||
|
||||
fields
|
||||
|
||||
myType : ShapeEnum from TopAbs;
|
||||
|
||||
end ShapeTypeFilter;
|
@@ -14,15 +14,16 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <StdSelect_ShapeTypeFilter.ixx>
|
||||
#include <StdSelect_BRepOwner.hxx>
|
||||
|
||||
#include <SelectMgr_EntityOwner.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <StdSelect_BRepOwner.hxx>
|
||||
#include <StdSelect_ShapeTypeFilter.hxx>
|
||||
|
||||
//==================================================
|
||||
// Function: StdSelect_ShapeTypeFilter
|
||||
// Purpose : Constructeur
|
||||
//==================================================
|
||||
|
||||
StdSelect_ShapeTypeFilter::StdSelect_ShapeTypeFilter(const TopAbs_ShapeEnum aType):
|
||||
myType(aType){}
|
||||
|
||||
|
83
src/StdSelect/StdSelect_ShapeTypeFilter.hxx
Normal file
83
src/StdSelect/StdSelect_ShapeTypeFilter.hxx
Normal file
@@ -0,0 +1,83 @@
|
||||
// Created on: 1996-09-17
|
||||
// Created by: Odile Olivier
|
||||
// Copyright (c) 1996-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _StdSelect_ShapeTypeFilter_HeaderFile
|
||||
#define _StdSelect_ShapeTypeFilter_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <TopAbs_ShapeEnum.hxx>
|
||||
#include <SelectMgr_Filter.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class SelectMgr_EntityOwner;
|
||||
|
||||
|
||||
class StdSelect_ShapeTypeFilter;
|
||||
DEFINE_STANDARD_HANDLE(StdSelect_ShapeTypeFilter, SelectMgr_Filter)
|
||||
|
||||
//! A filter framework which allows you to define a filter
|
||||
//! for a specific shape type. The types available include:
|
||||
//! - compound
|
||||
//! - compsolid
|
||||
//! - solid
|
||||
//! - shell
|
||||
//! - face
|
||||
//! - wire
|
||||
//! - edge
|
||||
//! - vertex.
|
||||
class StdSelect_ShapeTypeFilter : public SelectMgr_Filter
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Constructs a filter object defined by the shape type aType.
|
||||
Standard_EXPORT StdSelect_ShapeTypeFilter(const TopAbs_ShapeEnum aType);
|
||||
|
||||
Standard_EXPORT virtual Standard_Boolean IsOk (const Handle(SelectMgr_EntityOwner)& anobj) const Standard_OVERRIDE;
|
||||
|
||||
//! Returns the type of shape selected by the filter.
|
||||
TopAbs_ShapeEnum Type() const;
|
||||
|
||||
Standard_EXPORT virtual Standard_Boolean ActsOn (const TopAbs_ShapeEnum aStandardMode) const Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(StdSelect_ShapeTypeFilter,SelectMgr_Filter)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
TopAbs_ShapeEnum myType;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#include <StdSelect_ShapeTypeFilter.lxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _StdSelect_ShapeTypeFilter_HeaderFile
|
30
src/StdSelect/StdSelect_TypeOfEdge.hxx
Normal file
30
src/StdSelect/StdSelect_TypeOfEdge.hxx
Normal file
@@ -0,0 +1,30 @@
|
||||
// Created on: 1995-03-08
|
||||
// Created by: Mister rmi
|
||||
// Copyright (c) 1995-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _StdSelect_TypeOfEdge_HeaderFile
|
||||
#define _StdSelect_TypeOfEdge_HeaderFile
|
||||
|
||||
//! Provides values for different types of edges. These
|
||||
//! values are used to filter edges in frameworks
|
||||
//! inheriting StdSelect_EdgeFilter.
|
||||
enum StdSelect_TypeOfEdge
|
||||
{
|
||||
StdSelect_AnyEdge,
|
||||
StdSelect_Line,
|
||||
StdSelect_Circle
|
||||
};
|
||||
|
||||
#endif // _StdSelect_TypeOfEdge_HeaderFile
|
34
src/StdSelect/StdSelect_TypeOfFace.hxx
Normal file
34
src/StdSelect/StdSelect_TypeOfFace.hxx
Normal file
@@ -0,0 +1,34 @@
|
||||
// Created on: 1995-03-08
|
||||
// Created by: Mister rmi
|
||||
// Copyright (c) 1995-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _StdSelect_TypeOfFace_HeaderFile
|
||||
#define _StdSelect_TypeOfFace_HeaderFile
|
||||
|
||||
//! Provides values for different types of faces. These
|
||||
//! values are used to filter faces in frameworks inheriting
|
||||
//! StdSelect_FaceFilter.
|
||||
enum StdSelect_TypeOfFace
|
||||
{
|
||||
StdSelect_AnyFace,
|
||||
StdSelect_Plane,
|
||||
StdSelect_Cylinder,
|
||||
StdSelect_Sphere,
|
||||
StdSelect_Torus,
|
||||
StdSelect_Revol,
|
||||
StdSelect_Cone
|
||||
};
|
||||
|
||||
#endif // _StdSelect_TypeOfFace_HeaderFile
|
29
src/StdSelect/StdSelect_TypeOfResult.hxx
Normal file
29
src/StdSelect/StdSelect_TypeOfResult.hxx
Normal file
@@ -0,0 +1,29 @@
|
||||
// Created on: 1995-03-08
|
||||
// Created by: Mister rmi
|
||||
// Copyright (c) 1995-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _StdSelect_TypeOfResult_HeaderFile
|
||||
#define _StdSelect_TypeOfResult_HeaderFile
|
||||
|
||||
//! Provides values for type of result.
|
||||
//! These are used to specify whether the result is to
|
||||
//! be simple or whether it may be multiple.
|
||||
enum StdSelect_TypeOfResult
|
||||
{
|
||||
StdSelect_TOR_SIMPLE,
|
||||
StdSelect_TOR_MULTIPLE
|
||||
};
|
||||
|
||||
#endif // _StdSelect_TypeOfResult_HeaderFile
|
Reference in New Issue
Block a user