Compare commits
11 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
80ffc5f84d | ||
|
d1069cad4b | ||
|
0c4931e873 | ||
|
3ea347e562 | ||
|
510d099d15 | ||
|
5bd54bef32 | ||
|
4f7ad5fb76 | ||
|
f706c128c2 | ||
|
209ae313a5 | ||
|
81f57d1135 | ||
|
9923f08703 |
@@ -236,9 +236,11 @@ proc gendoc {args} {
|
||||
return -1
|
||||
}
|
||||
} elseif {$arg_n == "s"} {
|
||||
if { [ lsearch $args_names "pdf" ] == -1 } {
|
||||
if { [ lsearch $args_names "pdf" ] != -1 } {
|
||||
puts "Warning: search is not used with PDF and will be ignored."
|
||||
continue
|
||||
}
|
||||
|
||||
if {$args_values(s) != "NULL"} {
|
||||
set SEARCH_MODE $args_values(s)
|
||||
} else {
|
||||
@@ -247,16 +249,16 @@ proc gendoc {args} {
|
||||
}
|
||||
} elseif {$arg_n == "mathjax"} {
|
||||
if { [ lsearch $args_names "pdf" ] != -1 } {
|
||||
set possible_mathjax_loc $args_values(mathjax)
|
||||
if {[file exist [file join $possible_mathjax_loc $mathjax_js_name]]} {
|
||||
set MATHJAX_LOCATION $args_values(mathjax)
|
||||
puts "$MATHJAX_LOCATION"
|
||||
} else {
|
||||
puts "Warning: $mathjax_js_name is not found in $possible_mathjax_loc."
|
||||
puts " MathJax will be used from $MATHJAX_LOCATION"
|
||||
}
|
||||
puts "Warning: MathJax is not used with PDF and will be ignored."
|
||||
}
|
||||
|
||||
set possible_mathjax_loc $args_values(mathjax)
|
||||
if {[file exist [file join $possible_mathjax_loc $mathjax_js_name]]} {
|
||||
set MATHJAX_LOCATION $args_values(mathjax)
|
||||
puts "$MATHJAX_LOCATION"
|
||||
} else {
|
||||
puts "Warning: MathJax is not used with pdf and will be ignored."
|
||||
puts "Warning: $mathjax_js_name is not found in $possible_mathjax_loc."
|
||||
puts " MathJax will be used from $MATHJAX_LOCATION"
|
||||
}
|
||||
} else {
|
||||
puts "\nWrong argument: $arg_n"
|
||||
|
@@ -12,7 +12,9 @@ samples/samples.md
|
||||
../samples/CSharp/ReadMe.md
|
||||
../samples/CSharp/ReadMe_D3D.md
|
||||
../samples/qt/AndroidQt/ReadMe.md
|
||||
../samples/qt/IESample/ReadMe.md
|
||||
../samples/qt/OCCTOverview/ReadMe.md
|
||||
../samples/qt/Tutorial/ReadMe.md
|
||||
../samples/java/jniviewer/ReadMe.md
|
||||
../samples/ios/UIKitSample/ReadMe.md
|
||||
../samples/webgl/ReadMe.md
|
||||
@@ -20,6 +22,7 @@ samples/ocaf.md
|
||||
samples/ocaf_func.md
|
||||
samples/draw_scripts.md
|
||||
|
||||
samples/novice_guide.md
|
||||
tutorial/tutorial.md
|
||||
|
||||
build/build_upgrade.md
|
||||
|
@@ -6,6 +6,8 @@
|
||||
|
||||
tutorial/tutorial.md
|
||||
|
||||
samples/novice_guide.md
|
||||
|
||||
upgrade/upgrade.md
|
||||
|
||||
user_guides/foundation_classes/foundation_classes.md
|
||||
|
@@ -1,4 +1,4 @@
|
||||
Draw Demo Scripts {#samples__draw_scripts}
|
||||
Draw: Demo Scripts {#samples__draw_scripts}
|
||||
================
|
||||
|
||||
All demo scripts are provided with OCCT sources and locate in <i>CASROOT/samples/tcl</i>. To play around them please
|
||||
|
BIN
dox/samples/images/sample_overview_qt_geometry.png
Normal file
After Width: | Height: | Size: 48 KiB |
BIN
dox/samples/images/sample_overview_qt_ocaf.png
Normal file
After Width: | Height: | Size: 44 KiB |
BIN
dox/samples/images/sample_overview_qt_topology.png
Normal file
After Width: | Height: | Size: 41 KiB |
BIN
dox/samples/images/sample_overview_qt_triangulation.png
Normal file
After Width: | Height: | Size: 41 KiB |
BIN
dox/samples/images/sample_overview_qt_viewers.png
Normal file
After Width: | Height: | Size: 36 KiB |
BIN
dox/samples/images/sample_overview_qt_xde.png
Normal file
After Width: | Height: | Size: 28 KiB |
115
dox/samples/novice_guide.md
Normal file
@@ -0,0 +1,115 @@
|
||||
Novice Guide {#samples__novice_guide}
|
||||
=======
|
||||
|
||||
@tableofcontents
|
||||
|
||||
@section diffs Modeling with OCCT: Key differences
|
||||
|
||||
Open CASCADE Technology (OCCT) is an object-oriented C++ framework designed for rapid production of sophisticated CAD/CAM/CAE applications.
|
||||
In other words, it provides endless possibilities for raw 2D and 3D modeling in C++ environment.
|
||||
Unlike end-user software, it is used by the application developers and therefore strongly differs from the most popular CAD/CAM/CAE software packages.
|
||||
OCCT provides building blocks enough for modeling, editing, visualization, and data interoperability of 2D and 3D objects.
|
||||
|
||||
By using OCCT, users can create the objects of their desire (or edit already existing ones) using raw code commands.
|
||||
It is a more complicated process than using GUI-based software, but it provides much more flexibility than even script-based manipulations that are available within existing CAD/CAM/CAE applications.
|
||||
However, to fully grasp the possibilities of OCCT it is best for the user to have previous experience in C++ at least at a basic level.
|
||||
|
||||
@section basics Understanding the principles
|
||||
|
||||
If you don't have any programming skills, grasping the full magnitude of OCCT workflow is still an option.
|
||||
The documentation for OCCT contains several entry points for new users.
|
||||
It will not explain all OCCT classes but will help to comprehend the workflow and help start thinking in terms of Open CASCADE Technology.
|
||||
|
||||
The most basic workflow is described in the @ref occt__tutorial "OCCT Tutorial" - this is an excellent starting point for new users.
|
||||
In this tutorial you will create a solid model step-by-step using different classes and methods.
|
||||
Each step of the tutorial contains code snippets and images.
|
||||
|
||||
The basics involved in the modeling process are explained.
|
||||
When the basics of OCCT are clear, the next logical step is to check out @ref samples "sample applications" and examine those that suit your needs.
|
||||
For these, the best starting point is **OCCTOverview** located in /samples/qt subfolder of OCCT installation.
|
||||
|
||||
This sample provides code examples for several actions as well as visualization of these code snippets output.
|
||||
The Overview interface is dynamically changing based on selected **Category** at the menu.
|
||||
Additional menu buttons will appear, providing users with subcategories and relevant commands to select one of the actions.
|
||||
The result will appear in the viewer window, the code will appear at the top right, and in several cases the output will be produced at the bottom right window.
|
||||
|
||||
@figure{sample_overview_qt_viewers.png,"Comparison of 3D and 2D viewer windows",240} height=420px
|
||||
|
||||
The 3D viewer window has a row of preset interface buttons to customize the visual output.
|
||||
|
||||
Those buttons can be grouped into three types, left to right:
|
||||
|
||||
- View controls: **Fit all** and **Isometric**, will center the view and reset the camera angles respectively;
|
||||
- Display mode customization: **HLR,** e.g. "Hidden line removal" (works only when shading is disabled) can be turned on and off;
|
||||
solid models may be displayed either in **Shading** or **Wireframe** modes. **Transparency** level may be set for models in shading mode;
|
||||
- The last four buttons in a row are beautifiers enabling Ray-tracing engine and configuring it's parameters.
|
||||
|
||||
At the bottom left of the screen the orientation cube (trihedron) is located.
|
||||
The trihedron interactively shows the position of the camera in relation to the XYZ axis of the displayed data.
|
||||
The sides of the trihedron are labeled to help with orientation.
|
||||
Click on a side of the box to orient the camera view along the preferred axis.
|
||||
|
||||
The 2D viewer window lacks most of these elements and only have **Fit all** button.
|
||||
|
||||
The **Geometry** category of the Overview focuses on primitive objects like dots, lines (including vectors) or planes.
|
||||
These objects will appear in the viewer after the subcategory is selected.
|
||||
This section will demonstrate these entities both in 2D and 3D view mode and provide basic examples of parametric creation and data analysis.
|
||||
|
||||
@figure{sample_overview_qt_geometry.png,"",240} height=440px
|
||||
|
||||
The usage of the functions shown in the Overview is described more thoroughly at the @ref occt_user_guides__modeling_data "Modeling data" section of the documentation.
|
||||
Additionally, @ref occt_user_guides__modeling_algos "Modeling Algorithms" are used in more complex cases.
|
||||
|
||||
The **Topology** section of the Overview demonstrates the functions used in 3D operations.
|
||||
Multiple use cases are provided, including different object intersections, modifying and calculations.
|
||||
Some of these use cases are described in the documentation, such as @ref occt_user_guides__inspector "Inspector" usage.
|
||||
|
||||
@figure{sample_overview_qt_topology.png,"",240} height=440px
|
||||
|
||||
The subsections are grouped as shown on the screenshot before.
|
||||
Most shapes and primitive objects are introduced and then followed by a set of operations and interactions.
|
||||
|
||||
The **Triangulation** segment allows computing the number of triangles on a shape.
|
||||
|
||||
This may be inspected via [Poly_Triangulation Class Reference](https://dev.opencascade.org/doc/refman/html/class_poly___triangulation.html) -
|
||||
a part of the [Reference manual](https://dev.opencascade.org/doc/refman/html/index.html),
|
||||
an overall Open CASCADE code guide that may be used to inspect the key points in classes and their connections.
|
||||
|
||||
@figure{sample_overview_qt_triangulation.png,"",240} height=440px
|
||||
|
||||
The triangulation uses some of Mesh-related classes - see full description at @ref occt_user_guides__mesh "Mesh" documentation section.
|
||||
|
||||
The **Data exchange** section provides examples of how to export and import files of several different formats.
|
||||
|
||||
@figure{sample_overview_qt_xde.png,"",240} height=440px
|
||||
|
||||
The **OCAF** section gives an introduction for the @ref intro_overview_ocaf "Open CASCADE Application Framework" functionality.
|
||||
To test these functions, create an object first (box or cylinder).
|
||||
After that, the object may be modified and saved. Actions are recorded and may be undone or redone.
|
||||
|
||||
@figure{sample_overview_qt_ocaf.png,"",240} height=440px
|
||||
|
||||
**Viewers** section demonstrates examples of the 2D and 3D visualization outputs.
|
||||
Check @ref occt_user_guides__visualization "Visualization" section of the documentation for a detailed description.
|
||||
In addition to these two samples, there are much more that might be of use to a new user based on their particular use case.
|
||||
|
||||
Check Readme files in the sample directories to learn more about samples compilation.
|
||||
|
||||
**Note:** source code for OCCTOverview is stored at 'samples/qt/OCCTOverview/src' folder in your OCCT root,
|
||||
and the source code files for examples presented in subsections are stored at 'samples/OCCTOverview/code folder'.
|
||||
Several utility classes that are not presented in the example window may be found in example source code files.
|
||||
|
||||
The overall classes introduction may be found in the @ref occt_user_guides__foundation_classes "Foundation Classes" section of the documentation.
|
||||
The "Introduction" section contains short descriptions of the most massive entries in the documentation.
|
||||
|
||||
@section helps Additional assistance
|
||||
|
||||
There are several places that may be of use for new users.
|
||||
The first one is [Training & E-learning](https://dev.opencascade.org/resources/trainings) page that lists available trainings and describes their specifics.
|
||||
|
||||
The second one is the Overview documentation (this document is a part of it) - here you can find information that suits most of the use cases.
|
||||
This may seem overwhelming at first, but if you have the clear understanding of what do you seek, you will most likely find the required information.
|
||||
|
||||
Aside from the Overview documentation itself, the [Reference manual](https://dev.opencascade.org/doc/refman/html/index.html) is present.
|
||||
Use it to check classes descriptions, dependencies and examples.
|
||||
Additionally, there is a [Forum](https://dev.opencascade.org/forums) where you can contact the OCCT community and developers.
|
@@ -1,4 +1,4 @@
|
||||
OCAF Usage {#samples__ocaf}
|
||||
OCAF: Usage Tutorial {#samples__ocaf}
|
||||
========
|
||||
|
||||
## Getting Started
|
||||
|
@@ -1,4 +1,4 @@
|
||||
Function Mechanism Usage {#samples__ocaf_func}
|
||||
OCAF: Function Mechanism {#samples__ocaf_func}
|
||||
========================
|
||||
|
||||
Let us describe the usage of the "Function Mechanism" of Open CASCADE Application Framework on a simple example.
|
||||
|
@@ -1,176 +1,56 @@
|
||||
Tutorials and Samples {#samples}
|
||||
=====================
|
||||
|
||||
Tutorial: Modelling a Bottle
|
||||
----------------------------
|
||||
The Qt programming tutorial teaches how to use Open CASCADE Technology services to model a 3D object.
|
||||
The purpose of the tutorial is not to explain all OCCT classes but
|
||||
to help start thinking in terms of the Open CASCADE Technology.
|
||||
- @subpage samples__tutorials
|
||||
* @ref samples__novice_guide
|
||||
<br>A document providing an introductory information to newcomers.
|
||||
* @ref samples__draw_scripts
|
||||
<br>A set of demo scripts demonstrating OCCT functionality from DRAW.
|
||||
These scripts can be also considered as a tutorials on **Tcl** usage within @ref occt_user_guides__test_harness "Draw Harness".
|
||||
* @ref occt__tutorial
|
||||
<br>A programming tutorial teaching how to use OCCT services to model a 3D object.
|
||||
See also @ref samples_qt_tutorial
|
||||
* @ref samples__ocaf
|
||||
<br>A set of code snippets performing typical actions with @ref occt_user_guides__ocaf "OCAF" services for newcomers.
|
||||
* @ref samples__ocaf_func
|
||||
<br>A simple example dedicated to the usage of "Function Mechanism" of @ref occt_user_guides__ocaf "OCCT Application Framework".
|
||||
- @subpage samples__projects
|
||||
* @ref samples_qt_iesample
|
||||
<br>A cross-platform multi-document 3D Viewer sample with CAD import / export functionality based on **Qt Widgets** framework.
|
||||
* @ref samples_qml_android_occt
|
||||
<br>A cross-platform 3D Viewer sample with CAD import based on **QtQuick** framework.
|
||||
* @ref samples_qt_tutorial
|
||||
<br>A cross-platform sample application based on **Qt Widgets** framework and implementing @ref occt__tutorial.
|
||||
* @ref samples_qt_overview
|
||||
<br>A sample application interactively demonstrating OCCT C++ usage with code snippets for newcomers.
|
||||
* @ref samples_mfc_standard
|
||||
<br>A set of projects for Windows platform demonstrating OCCT usage based on **Microsoft Foundation Class** (**MFC**) library.
|
||||
* @ref samples_csharp_occt
|
||||
<br>A Multi-document 3D Viewer sample with CAD import / export functionality based on .NET and **Windows Forms** or **WPF**.
|
||||
* @ref samples_csharp_direct3d
|
||||
<br>3D Viewer sample wrapped into Direct3D context based on .NET and **Windows Presentation Foundation** (**WPF**).
|
||||
* @ref occt_samples_webgl
|
||||
<br>3D Viewer sample based on **Emscripten SDK** representing a static HTML page to be opened in Web Browser.
|
||||
* @ref samples_java_android_occt
|
||||
<br>3D Viewer sample with CAD import for Android mobile platform based on Android SDK and JNI layer.
|
||||
* @ref occt_samples_ios_uikit
|
||||
<br>3D Viewer sample for iOS platform based on Apple **UIKit** framework.
|
||||
|
||||
This tutorial assumes that the user has experience in using and setting up C++.
|
||||
From the viewpoint of programming, Open CASCADE Technology is designed
|
||||
to enhance user's C++ tools with high performance modeling classes, methods and functions.
|
||||
The combination of these resources allows creating substantial applications.
|
||||
@page samples__tutorials Tutorials and Demos
|
||||
- @subpage samples__novice_guide
|
||||
- @subpage samples__draw_scripts
|
||||
- @subpage occt__tutorial
|
||||
- @subpage samples__ocaf
|
||||
- @subpage samples__ocaf_func
|
||||
|
||||
Read more about @subpage occt__tutorial
|
||||
|
||||
MFC
|
||||
---------
|
||||
|
||||
Visual C++ programming samples containing 10 Visual C++ projects
|
||||
illustrating how to use a particular module or functionality.
|
||||
|
||||
The list of MFC samples:
|
||||
|
||||
* Geometry
|
||||
* Modeling
|
||||
* Viewer2d
|
||||
* Viewer3d
|
||||
* ImportExport
|
||||
* Ocaf
|
||||
* Triangulation
|
||||
* HLR
|
||||
* Animation
|
||||
* Convert
|
||||
|
||||
@figure{/samples/images/samples_mvc.png}
|
||||
|
||||
**Remarks:**
|
||||
|
||||
* MFC samples are available only on Windows platform;
|
||||
* To start a sample use Open CASCADE Technology\\Samples\\Mfc\\ item of the Start\\Programs menu;
|
||||
* Read carefully readme.txt to learn about launching and compilation options.
|
||||
|
||||
See @subpage samples_mfc_standard "Readme" for details.
|
||||
|
||||
Qt
|
||||
---
|
||||
|
||||
OCCT includes several samples based on Qt application framework.
|
||||
These samples are available on all supported desktop platforms.
|
||||
|
||||
To start a sample on Windows use Open CASCADE Technology\\Samples\\Qt\\ item of the Start\\Programs menu.
|
||||
|
||||
Import Export
|
||||
-------------
|
||||
|
||||
Import Export programming sample contains 3D Viewer and Import / Export functionality.
|
||||
|
||||
@figure{/samples/images/samples_qt.png}
|
||||
|
||||
Tutorial
|
||||
---------
|
||||
|
||||
The Qt programming tutorial teaches how to use Open CASCADE Technology services to model a 3D object.
|
||||
The purpose of the tutorial is not to explain all OCCT classes but
|
||||
to help start thinking in terms of the Open CASCADE Technology.
|
||||
|
||||
This tutorial assumes that the user has experience in using and setting up C++.
|
||||
From the viewpoint of programming, Open CASCADE Technology is designed
|
||||
to enhance user's C++ tools with high performance modeling classes, methods and functions.
|
||||
The combination of these resources allows creating substantial applications.
|
||||
|
||||
**See also:** @ref occt__tutorial "OCCT Tutorial"
|
||||
|
||||
Overview
|
||||
---------
|
||||
|
||||
The Qt application providing samples for basic usage of C++ API of various OCCT functionality.
|
||||
|
||||
The samples are organized in several categories according to relevant module of OCCT:
|
||||
|
||||
* Geometry
|
||||
* Topology,
|
||||
* Triangulation
|
||||
* DataExchange
|
||||
* OCAF
|
||||
* Viewer 2d
|
||||
* Viewer 3d
|
||||
|
||||
Each sample presents geometry view, C++ code fragment and sample output window.
|
||||
|
||||
@figure{/samples/images/sample_overview_qt.png}
|
||||
|
||||
See \subpage samples_qt_overview "Readme" for details.
|
||||
|
||||
C#
|
||||
---
|
||||
|
||||
C# sample demonstrates integration of OCCT 3D Viewer and Import / Export functionality into .NET applications (using Windows Forms and WPF front ends).
|
||||
|
||||
@figure{/samples/images/samples_c__ie.png}
|
||||
|
||||
Import:
|
||||
|
||||
* BRep
|
||||
* Iges
|
||||
* Step
|
||||
|
||||
Export:
|
||||
|
||||
* Brep
|
||||
* Iges
|
||||
* Step
|
||||
* Stl
|
||||
* Vrml
|
||||
|
||||
See @subpage samples_csharp_occt "C# sample Readme" for details.
|
||||
|
||||
There is also another C# example with the same functionality, which demonstrates the integration of Direct3D Viewer into .NET applications using WPF front end.
|
||||
|
||||
See @subpage samples_csharp_direct3d "Direct3D C# sample Readme" for details.
|
||||
|
||||
Android
|
||||
---------
|
||||
|
||||
There are two samples are representing usage OCCT framework on Android mobile platform. They represent an OCCT-based 3D-viewer with CAD import support in formats BREP, STEP and IGES: jniviewer (java) and AndroidQt (qt+qml)
|
||||
|
||||
jniviewer
|
||||
@figure{/samples/images/samples_java_android_occt.jpg}
|
||||
Java -- See @subpage samples_java_android_occt "Android Java sample Readme" for details.
|
||||
|
||||
AndroidQt
|
||||
@figure{/samples/images/samples_qml_android_occt.jpg}
|
||||
Qt -- See \subpage samples_qml_android_occt "Android Qt sample Readme" for details.
|
||||
|
||||
iOS
|
||||
---
|
||||
|
||||
There is a sample demonstrating usage of OCCT on iOS with Apple UIKit framework.
|
||||
|
||||
@figure{/samples/images/sample_ios_uikit.png}
|
||||
|
||||
See @subpage occt_samples_ios_uikit "iOS sample Readme" for details.
|
||||
|
||||
Web
|
||||
---------
|
||||
|
||||
WebGL Viewer sample demonstrating usage of OCCT 3D Viewer in Web browser with Emscripten SDK can be found in `samples/webgl`.
|
||||
|
||||
@figure{/samples/images/sample_webgl.png}
|
||||
|
||||
See @subpage occt_samples_webgl "WebGL sample Readme" for details.
|
||||
|
||||
OCAF Usage Sample
|
||||
------------------
|
||||
|
||||
The provided set of samples dedicates to get initial knowledge about typical actions with OCAF services. It may be
|
||||
useful for newcomers.
|
||||
|
||||
Read more about @subpage samples__ocaf
|
||||
|
||||
OCAF Function Mechanism Usage
|
||||
-----------------------------
|
||||
|
||||
This simple example dedicates to the usage of "Function Mechanism" of OCCT Application Framework. It represents a "nail"
|
||||
composed by a cone and two cylinders of different radius and height.
|
||||
|
||||
Read more about @subpage samples__ocaf_func
|
||||
|
||||
Draw Demo Scripts
|
||||
------------------
|
||||
|
||||
A set of demo scripts demonsrates using OCCT functionality from DRAW. These scripts can be also considered as a
|
||||
tutorials on tcl usage within Draw.
|
||||
|
||||
Read more about @subpage samples__draw_scripts
|
||||
@page samples__projects Sample Projects
|
||||
- @subpage samples_qt_iesample
|
||||
- @subpage samples_qml_android_occt
|
||||
- @subpage samples_qt_tutorial
|
||||
- @subpage samples_qt_overview
|
||||
- @subpage samples_mfc_standard
|
||||
- @subpage samples_csharp_occt
|
||||
- @subpage samples_csharp_direct3d
|
||||
- @subpage occt_samples_webgl
|
||||
- @subpage samples_java_android_occt
|
||||
- @subpage occt_samples_ios_uikit
|
||||
|
@@ -1,4 +1,4 @@
|
||||
Tutorial {#occt__tutorial}
|
||||
Modeling: Bottle Tutorial {#occt__tutorial}
|
||||
=======
|
||||
|
||||
@tableofcontents
|
||||
|
@@ -1,8 +1,9 @@
|
||||
OCCT CSharp sample {#samples_csharp_occt}
|
||||
.NET: Import/Export (C#|C++/CLI|WinForms|WPF) {#samples_csharp_occt}
|
||||
==================
|
||||
|
||||
This sample demonstrates how to use OCCT libraries in <b>.Net</b> application
|
||||
written using **CSharp** and **Windows Forms** or **Windows Presentation Foundation** (WPF).
|
||||
The sample could be found within OCCT repository in folder `/samples/CSharp/`.
|
||||
|
||||
The connection between .Net and OCCT (C++) level is provided by proxy library
|
||||
**OCCProxy**, written in C++/CLI. The proxy library contains a single *ref* class
|
||||
@@ -14,6 +15,8 @@ Both applications provide the same functionality as the standard OCCT Import/Exp
|
||||
The first project is called *IE_WinForms* and uses Windows Forms for GUI.
|
||||
The second application is called *IE_WPF_WinForms* and uses Windows Presentation Foundation.
|
||||
|
||||
@figure{samples_c__ie.png}
|
||||
|
||||
Note a few important details:
|
||||
|
||||
- OCCT template class *NCollection_Haft* is used to encapsulate C++ class into a field of *ref* class;
|
||||
|
@@ -1,8 +1,9 @@
|
||||
Direct3D CSharp sample {#samples_csharp_direct3d}
|
||||
==================
|
||||
.NET: D3D/OpenGL Viewer (C#|C++/CLI|WPF) {#samples_csharp_direct3d}
|
||||
==================
|
||||
|
||||
This sample demonstrates how to use OCCT and DirectX libraries in <b>.Net</b> application
|
||||
written using **CSharp** and **Windows Presentation Foundation** (WPF).
|
||||
The sample could be found within OCCT repository in folder `/samples/CSharp/`.
|
||||
|
||||
The connection between .Net, OCCT (C++) and DirectX level is provided by proxy libraries,
|
||||
**OCCProxy** and **D3DProxy**, written in C++/CLI. The proxy library **OCCProxy** contains a single
|
||||
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
@@ -311,7 +311,7 @@ void OcafSamples::ModifyBoxOcafSample()
|
||||
Handle(TFunction_Function) aFunction;
|
||||
if (!aLabel.FindAttribute(TFunction_Function::GetID(), aFunction))
|
||||
{
|
||||
myResult << "Object cannot be modify.";
|
||||
myResult << "Object cannot be modified.";
|
||||
return;
|
||||
}
|
||||
// Get the Standard_GUID of the TFunction_FunctionDriver of the selected object TFunction_Function attribute
|
||||
@@ -413,7 +413,7 @@ void OcafSamples::ModifyCylinderOcafSample()
|
||||
Handle(TFunction_Function) aFunction;
|
||||
if (!aLabel.FindAttribute(TFunction_Function::GetID(), aFunction))
|
||||
{
|
||||
myResult << "Object cannot be modify.";
|
||||
myResult << "Object cannot be modified.";
|
||||
return;
|
||||
}
|
||||
// Get the Standard_GUID of the TFunction_FunctionDriver of the selected object TFunction_Function attribute
|
||||
|
@@ -1,12 +1,15 @@
|
||||
OCCT sample for iOS {#occt_samples_ios_uikit}
|
||||
iOS: 3D Viewer (Objective-C++|UIKit) {#occt_samples_ios_uikit}
|
||||
==================
|
||||
|
||||
UIKitSample consists of the Open CASCADE 3D Viewer which provides import of STEP files and toolbar with three buttons.
|
||||
The sample could be found within OCCT repository in folder `/samples/ios/UIKitSample/`.
|
||||
|
||||
The first and second buttons serve for import hardcoded STEP files. The third button displays "About" dialog.
|
||||
|
||||
The viewer supports zoom, pan and rotate actions. The viewer supports selection of solids as well.
|
||||
|
||||
@figure{sample_ios_uikit.png}
|
||||
|
||||
Installation and configuration:
|
||||
1. Make sure you are running Mac OS version 10.12.1 or above and properly installed XCode version 8.1 or above.
|
||||
2. Install Open CASCADE Technology (OCCT) and build static libraries for desired device or/and simulator on your workstation.
|
||||
|
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 48 KiB |
@@ -1,7 +1,8 @@
|
||||
OCCT JniViewer sample for Android {#samples_java_android_occt}
|
||||
Android: 3D Viewer (Java|C++|Android SDK|JNI) {#samples_java_android_occt}
|
||||
==================
|
||||
|
||||
This sample demonstrates simple way of using OCCT libraries in Android application written using Java.
|
||||
The sample could be found within OCCT repository in folder `/samples/java/jniviewer/`.
|
||||
|
||||
The connection between Java and OCCT (C++) level is provided by proxy library, libTKJniSample.so, written in C++ with exported JNI methods of Java class OcctJniRenderer.
|
||||
The proxy library contains single C++ class OcctJni_Viewer encapsulating OCCT viewer and providing functionality to manipulate this viewer
|
||||
@@ -13,6 +14,8 @@ and the code can be programmed on Java level similarly to C++ one.
|
||||
See description of OCCT Java Wrapper in Advanced Samples and Tools on OCCT web site at
|
||||
https://www.opencascade.com/content/advanced-samples-and-tools
|
||||
|
||||
@figure{samples_java_android_occt.jpg}
|
||||
|
||||
Install Android Studio 4.0+ and install building tools (check Tools -> SDK Manager):
|
||||
- Android SDK (API level 21 or higher).
|
||||
- Android SDK build tools.
|
||||
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
@@ -27,7 +27,7 @@ CSelectionDialog::CSelectionDialog (CHLRDoc* aDoc,CWnd* pParent /*=NULL*/)
|
||||
myDoc = aDoc;
|
||||
myIsDisplayed = false;
|
||||
//{{AFX_DATA_INIT(CSelectionDialog)
|
||||
m_Algo = 0;
|
||||
m_Algo = 1;
|
||||
m_DisplayMode = 0;
|
||||
m_NbIsos = 2;
|
||||
m_DrawHiddenLine = TRUE;
|
||||
|
@@ -1,6 +1,21 @@
|
||||
MFC samples {#samples_mfc_standard}
|
||||
MFC: OCCT Samples (C++|MFC) {#samples_mfc_standard}
|
||||
==========
|
||||
|
||||
Visual C++ programming samples for Windows platform containing illustrating how to use a particular module or functionality, including the following MFC samples:
|
||||
|
||||
* Geometry
|
||||
* Modeling
|
||||
* Viewer2d
|
||||
* Viewer3d
|
||||
* ImportExport
|
||||
* Ocaf
|
||||
* Triangulation
|
||||
* HLR
|
||||
* Animation
|
||||
* Convert
|
||||
|
||||
@figure{samples_mvc.png}
|
||||
|
||||
1. Contents
|
||||
-----------------------
|
||||
|
||||
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
@@ -1,12 +1,15 @@
|
||||
OCCT AndroidQt sample for Android {#samples_qml_android_occt}
|
||||
Qt: 3D Viewer (C++|QtQuick|QML) {#samples_qml_android_occt}
|
||||
==================
|
||||
|
||||
This sample demonstrates a simple way of using OCCT libraries in Android application written using Qt/Qml.
|
||||
The sample could be found within OCCT repository in folder `/samples/qt/AndroidQt/`.
|
||||
|
||||
The connection between Qt/Qml and OCCT (C++) level is provided by proxy library, libAndroidQt.so, written in C++.
|
||||
The proxy library contains single C++ class AndroidQt encapsulating OCCT viewer and providing functionality to manipulate this viewer
|
||||
and to import OCCT shapes from supported format of CAD file (BREP).
|
||||
|
||||
@figure{samples_qml_android_occt.jpg}
|
||||
|
||||
Requirements for building sample:
|
||||
* Java Development Kit 1.7 or higher
|
||||
* Qt 5.3 or higher
|
||||
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
10
samples/qt/IESample/ReadMe.md
Normal file
@@ -0,0 +1,10 @@
|
||||
Qt: Import/Export (C++|Qt Widgets) {#samples_qt_iesample}
|
||||
==========
|
||||
|
||||
OCCT includes several samples based on Qt application framework.
|
||||
These samples are available on all supported desktop platforms.
|
||||
|
||||
This Import Export programming sample contains 3D Viewer and Import / Export functionality.
|
||||
The sample could be found within OCCT repository in folder `/samples/qt/IESample/`.
|
||||
|
||||
@figure{samples_qt.png}
|
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 63 KiB |
@@ -1,6 +1,22 @@
|
||||
Qt OCCT Overview samples {#samples_qt_overview}
|
||||
Qt: OCCT Overview (C++|Qt Widgets) {#samples_qt_overview}
|
||||
==========
|
||||
|
||||
The Overview Qt application provides code snippets for basic usage of C++ API of various OCCT functionality.
|
||||
The samples are organized in several categories according to relevant module of OCCT:
|
||||
|
||||
* Geometry
|
||||
* Topology
|
||||
* Triangulation
|
||||
* DataExchange
|
||||
* OCAF
|
||||
* Viewer 2d
|
||||
* Viewer 3d
|
||||
|
||||
Each sample presents geometry view, C++ code fragment and sample output window.
|
||||
This sample is described in the @ref samples__novice_guide "Novice guide" for new users.
|
||||
|
||||
@figure{sample_overview_qt.png}
|
||||
|
||||
1. Contents
|
||||
-----------------------
|
||||
|
||||
|
Before Width: | Height: | Size: 110 KiB After Width: | Height: | Size: 110 KiB |
11
samples/qt/Tutorial/ReadMe.md
Normal file
@@ -0,0 +1,11 @@
|
||||
Qt: Bottle Tutorial (C++|Qt Widgets) {#samples_qt_tutorial}
|
||||
==========
|
||||
|
||||
The Qt programming tutorial teaches how to use Open CASCADE Technology services to model a 3D object.
|
||||
The purpose of the tutorial is not to explain all OCCT classes but to help start thinking in terms of the Open CASCADE Technology.
|
||||
|
||||
This tutorial assumes that the user has experience in using and setting up C++.
|
||||
From the viewpoint of programming, Open CASCADE Technology is designed to enhance user's C++ tools with high performance modeling classes, methods and functions.
|
||||
The combination of these resources allows creating substantial applications.
|
||||
|
||||
**See also:** @ref occt__tutorial "OCCT Tutorial"
|
@@ -1,4 +1,4 @@
|
||||
OCCT WebGL Viewer sample {#occt_samples_webgl}
|
||||
WebGL: 3D Viewer (JavaScript|C++|WebAssembly) {#occt_samples_webgl}
|
||||
==================
|
||||
|
||||
This sample demonstrates simple way of using OCCT libraries in Web application written in C++ and translated into WebAssembly module using Emscripten SDK (emsdk):
|
||||
@@ -6,6 +6,9 @@ https://emscripten.org/
|
||||
|
||||
Sample consists of the Open CASCADE 3D Viewer with a button for opening a model in BREP format.
|
||||
The sample requires a WebGL 2.0 capable browser supporting WebAssembly 1.0 (Wasm).
|
||||
The sample could be found within OCCT repository in folder `/samples/webgl/`.
|
||||
|
||||
@figure{sample_webgl.png,"",240} height=408px
|
||||
|
||||
Installation and configuration:
|
||||
1. Install Emscripten SDK and activate minimal configuration (Python, Java and CLang) following *emsdk* documentation. Activate also MinGW when building sample on Windows host.
|
||||
|
Before Width: | Height: | Size: 74 KiB After Width: | Height: | Size: 74 KiB |
@@ -17,8 +17,8 @@
|
||||
| de l'approximation a deux variables
|
||||
| a utiliser dans AdvApp2Var
|
||||
|--------------------------------------------------------------*/
|
||||
#ifndef ApproxF2var_HeaderFile
|
||||
#define ApproxF2var_HeaderFile
|
||||
#ifndef AdvApp2Var_ApproxF2var_HeaderFile
|
||||
#define AdvApp2Var_ApproxF2var_HeaderFile
|
||||
|
||||
#include <Standard_Macro.hxx>
|
||||
#include <AdvApp2Var_Data_f2c.hxx>
|
||||
|
@@ -12,8 +12,8 @@
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
// AdvApp2Var_Data_f2c.hxx
|
||||
#ifndef Data_f2c_HeaderFile
|
||||
#define Data_f2c_HeaderFile
|
||||
#ifndef AdvApp2Var_Data_f2c_HeaderFile
|
||||
#define AdvApp2Var_Data_f2c_HeaderFile
|
||||
|
||||
#ifndef F2CTYPE_DEFINED
|
||||
typedef int integer;
|
||||
|
@@ -12,8 +12,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef math_ContMatrices_HeaderFile
|
||||
#define math_ContMatrices_HeaderFile
|
||||
#ifndef AppCont_ContMatrices_HeaderFile
|
||||
#define AppCont_ContMatrices_HeaderFile
|
||||
#include <math_Vector.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
|
||||
|
@@ -11,8 +11,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _Aspect_DisplayConnection_H__
|
||||
#define _Aspect_DisplayConnection_H__
|
||||
#ifndef Aspect_DisplayConnection_HeaderFile
|
||||
#define Aspect_DisplayConnection_HeaderFile
|
||||
|
||||
#include <Standard_Transient.hxx>
|
||||
#include <Aspect_XAtom.hxx>
|
||||
|
@@ -13,8 +13,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef ASPECT_POLYGONOFFSETMODE_HEADER
|
||||
#define ASPECT_POLYGONOFFSETMODE_HEADER
|
||||
#ifndef Aspect_PolygonOffsetMode_HeaderFile
|
||||
#define Aspect_PolygonOffsetMode_HeaderFile
|
||||
|
||||
// Enumeration for polygon offset modes
|
||||
|
||||
|
@@ -12,8 +12,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef BOPDS_VectorOfPnt_HeaderFile
|
||||
#define BOPDS_VectorOfPnt_HeaderFile
|
||||
#ifndef BOPDS_VectorOfPoint_HeaderFile
|
||||
#define BOPDS_VectorOfPoint_HeaderFile
|
||||
|
||||
#include <NCollection_Vector.hxx>
|
||||
#include <BOPDS_Point.hxx>
|
||||
|
@@ -12,8 +12,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef BOPTest_MapOfShapeSet_HeaderFile
|
||||
#define BOPTest_MapOfShapeSet_HeaderFile
|
||||
#ifndef BOPTools_MapOfSet_HeaderFile
|
||||
#define BOPTools_MapOfSet_HeaderFile
|
||||
|
||||
#include <BOPTools_Set.hxx>
|
||||
#include <BOPTools_SetMapHasher.hxx>
|
||||
|
@@ -355,6 +355,10 @@ void BRepAlgo_NormalProjection::SetDefaultParams()
|
||||
#endif
|
||||
Approx_CurveOnSurface appr(HPCur, hsur, Udeb, Ufin, myTol3d);
|
||||
appr.Perform(myMaxSeg, myMaxDegree, myContinuity, Only3d, Only2d);
|
||||
|
||||
if (appr.MaxError3d() > 1.e3 * myTol3d)
|
||||
continue;
|
||||
|
||||
#ifdef OCCT_DEBUG_CHRONO
|
||||
ResultChron(chr_approx,t_approx);
|
||||
approx_count++;
|
||||
|
@@ -13,8 +13,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _BRepBuilderAPI_BndBoxTreeSelector_Header
|
||||
#define _BRepBuilderAPI_BndBoxTreeSelector_Header
|
||||
#ifndef BRepBuilderAPI_BndBoxTreeSelector_HeaderFile
|
||||
#define BRepBuilderAPI_BndBoxTreeSelector_HeaderFile
|
||||
|
||||
#include <TColStd_ListOfInteger.hxx>
|
||||
#include <Bnd_Box.hxx>
|
||||
|
@@ -13,8 +13,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _BRepBuilderAPI_VertexInspector_Header
|
||||
#define _BRepBuilderAPI_VertexInspector_Header
|
||||
#ifndef BRepBuilderAPI_VertexInspector_HeaderFile
|
||||
#define BRepBuilderAPI_VertexInspector_HeaderFile
|
||||
|
||||
#include <TColStd_ListOfInteger.hxx>
|
||||
#include <NCollection_Vector.hxx>
|
||||
|
@@ -890,6 +890,11 @@ Standard_Boolean BRepFill_TrimShellCorner::ChooseSection(const TopoDS_Shape& Com
|
||||
if (LastEdge.IsNull())
|
||||
return Standard_False;
|
||||
|
||||
if (FirstEdge.IsNull() || LastEdge.IsNull())
|
||||
{
|
||||
return Standard_False;
|
||||
}
|
||||
|
||||
BB.Add(NewWire, FirstEdge);
|
||||
|
||||
if (!FirstEdge.IsSame(LastEdge))
|
||||
|
@@ -13,8 +13,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef BRepMesh_CircleInspector_Header
|
||||
#define BRepMesh_CircleInspector_Header
|
||||
#ifndef BRepMesh_CircleInspector_HeaderFile
|
||||
#define BRepMesh_CircleInspector_HeaderFile
|
||||
|
||||
#include <IMeshData_Types.hxx>
|
||||
#include <BRepMesh_Circle.hxx>
|
||||
|
@@ -504,10 +504,9 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewCurve2d
|
||||
}
|
||||
aMinDist *= aMinDist;
|
||||
//Old domain
|
||||
Standard_Real t = 0.5 * (f2d + l2d);
|
||||
gp_Pnt2d aPf = C2d->Value(t);
|
||||
gp_Pnt2d aPf = C2d->Value(f2d);
|
||||
//New domain
|
||||
gp_Pnt2d aNewPf = Curve2d->Value(t);
|
||||
gp_Pnt2d aNewPf = Curve2d->Value(f2d);
|
||||
gp_Vec2d aT(aNewPf, aPf);
|
||||
if (aT.SquareMagnitude() > aMinDist)
|
||||
{
|
||||
|
@@ -13,8 +13,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _BVH_BinnedBuilder_Header
|
||||
#define _BVH_BinnedBuilder_Header
|
||||
#ifndef BVH_BinnedBuilder_HeaderFile
|
||||
#define BVH_BinnedBuilder_HeaderFile
|
||||
|
||||
#include <BVH_QueueBuilder.hxx>
|
||||
|
||||
|
@@ -13,8 +13,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _BVH_Box_Header
|
||||
#define _BVH_Box_Header
|
||||
#ifndef BVH_Box_HeaderFile
|
||||
#define BVH_Box_HeaderFile
|
||||
|
||||
#include <BVH_Constants.hxx>
|
||||
#include <BVH_Types.hxx>
|
||||
|
@@ -13,8 +13,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _BVH_Builder_Header
|
||||
#define _BVH_Builder_Header
|
||||
#ifndef BVH_Builder_HeaderFile
|
||||
#define BVH_Builder_HeaderFile
|
||||
|
||||
#include <BVH_Set.hxx>
|
||||
#include <BVH_BinaryTree.hxx>
|
||||
|
@@ -13,8 +13,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _BVH_Geometry_Header
|
||||
#define _BVH_Geometry_Header
|
||||
#ifndef BVH_Geometry_HeaderFile
|
||||
#define BVH_Geometry_HeaderFile
|
||||
|
||||
#include <BVH_ObjectSet.hxx>
|
||||
#include <BVH_Builder.hxx>
|
||||
|
@@ -13,8 +13,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _BVH_Object_Header
|
||||
#define _BVH_Object_Header
|
||||
#ifndef BVH_Object_HeaderFile
|
||||
#define BVH_Object_HeaderFile
|
||||
|
||||
#include <BVH_Box.hxx>
|
||||
#include <BVH_Properties.hxx>
|
||||
|
@@ -13,8 +13,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _BVH_ObjectSet_Header
|
||||
#define _BVH_ObjectSet_Header
|
||||
#ifndef BVH_ObjectSet_HeaderFile
|
||||
#define BVH_ObjectSet_HeaderFile
|
||||
|
||||
#include <BVH_Set.hxx>
|
||||
#include <BVH_Object.hxx>
|
||||
|
@@ -13,8 +13,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _BVH_PrimitiveSet_Header
|
||||
#define _BVH_PrimitiveSet_Header
|
||||
#ifndef BVH_PrimitiveSet_HeaderFile
|
||||
#define BVH_PrimitiveSet_HeaderFile
|
||||
|
||||
#include <BVH_Object.hxx>
|
||||
#include <BVH_Builder.hxx>
|
||||
|
@@ -13,8 +13,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _BVH_Properties_Header
|
||||
#define _BVH_Properties_Header
|
||||
#ifndef BVH_Properties_HeaderFile
|
||||
#define BVH_Properties_HeaderFile
|
||||
|
||||
#include <BVH_Box.hxx>
|
||||
|
||||
|
@@ -13,8 +13,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _BVH_Set_Header
|
||||
#define _BVH_Set_Header
|
||||
#ifndef BVH_Set_HeaderFile
|
||||
#define BVH_Set_HeaderFile
|
||||
|
||||
#include <BVH_Box.hxx>
|
||||
|
||||
|
@@ -13,8 +13,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _BVH_Sorter_Header
|
||||
#define _BVH_Sorter_Header
|
||||
#ifndef BVH_Sorter_HeaderFile
|
||||
#define BVH_Sorter_HeaderFile
|
||||
|
||||
#include <BVH_Set.hxx>
|
||||
|
||||
|
@@ -13,8 +13,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _BVH_SpatialMedianBuilder_Header
|
||||
#define _BVH_SpatialMedianBuilder_Header
|
||||
#ifndef BVH_SpatialMedianBuilder_HeaderFile
|
||||
#define BVH_SpatialMedianBuilder_HeaderFile
|
||||
|
||||
#include <BVH_BinnedBuilder.hxx>
|
||||
#include <BVH_Box.hxx>
|
||||
|
@@ -13,8 +13,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _BVH_SweepPlaneBuilder_Header
|
||||
#define _BVH_SweepPlaneBuilder_Header
|
||||
#ifndef BVH_SweepPlaneBuilder_HeaderFile
|
||||
#define BVH_SweepPlaneBuilder_HeaderFile
|
||||
|
||||
#include <BVH_QueueBuilder.hxx>
|
||||
#include <BVH_QuickSorter.hxx>
|
||||
|
@@ -13,8 +13,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _BVH_Triangulation_Header
|
||||
#define _BVH_Triangulation_Header
|
||||
#ifndef BVH_Triangulation_HeaderFile
|
||||
#define BVH_Triangulation_HeaderFile
|
||||
|
||||
#include <BVH_PrimitiveSet.hxx>
|
||||
|
||||
|
@@ -13,8 +13,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _BVH_Types_Header
|
||||
#define _BVH_Types_Header
|
||||
#ifndef BVH_Types_HeaderFile
|
||||
#define BVH_Types_HeaderFile
|
||||
|
||||
// Use this macro to switch between STL and OCCT vector types
|
||||
#define _BVH_USE_STD_VECTOR_
|
||||
|
@@ -13,8 +13,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef BinLDrivers_VectorOfDocumentSection_H
|
||||
#define BinLDrivers_VectorOfDocumentSection_H
|
||||
#ifndef BinLDrivers_VectorOfDocumentSection_HeaderFile
|
||||
#define BinLDrivers_VectorOfDocumentSection_HeaderFile
|
||||
|
||||
#include <NCollection_Vector.hxx>
|
||||
#include <BinLDrivers_DocumentSection.hxx>
|
||||
|
@@ -13,8 +13,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _ANAFILLETALGO_H_
|
||||
#define _ANAFILLETALGO_H_
|
||||
#ifndef ChFi2d_AnaFilletAlgo_HeaderFile
|
||||
#define ChFi2d_AnaFilletAlgo_HeaderFile
|
||||
|
||||
#include <TopoDS_Wire.hxx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
|
@@ -13,8 +13,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _CHAMFERAPI_H_
|
||||
#define _CHAMFERAPI_H_
|
||||
#ifndef ChFi2d_ChamferAPI_HeaderFile
|
||||
#define ChFi2d_ChamferAPI_HeaderFile
|
||||
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <TopoDS_Wire.hxx>
|
||||
|
@@ -13,8 +13,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _CHFI2D_FILLETAPI_H_
|
||||
#define _CHFI2D_FILLETAPI_H_
|
||||
#ifndef ChFi2d_FilletAPI_HeaderFile
|
||||
#define ChFi2d_FilletAPI_HeaderFile
|
||||
|
||||
#include <ChFi2d_FilletAlgo.hxx>
|
||||
#include <ChFi2d_AnaFilletAlgo.hxx>
|
||||
|
@@ -13,8 +13,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _FILLETALGO_H_
|
||||
#define _FILLETALGO_H_
|
||||
#ifndef ChFi2d_FilletAlgo_HeaderFile
|
||||
#define ChFi2d_FilletAlgo_HeaderFile
|
||||
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <TopoDS_Wire.hxx>
|
||||
|
@@ -14,15 +14,14 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef ChFiKPart_ComputeData_CS_HeaderFile
|
||||
#define ChFiKPart_ComputeData_CS_HeaderFile
|
||||
|
||||
#include <Adaptor3d_Surface.hxx>
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <gp_Cylinder.hxx>
|
||||
#include <gp_Circ.hxx>
|
||||
|
||||
#ifndef ChFiKPart_ComputeData_CS_HeaderFile
|
||||
#define ChFiKPart_ComputeData_CS_HeaderFile
|
||||
|
||||
|
||||
void ChFiKPart_CornerSpine(const Handle(Adaptor3d_Surface)& S1,
|
||||
const Handle(Adaptor3d_Surface)& S2,
|
||||
const gp_Pnt2d& P1S1,
|
||||
|
@@ -14,8 +14,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef ChFiKPart_ComputeData_PlnCon_HeaderFile
|
||||
#define ChFiKPart_ComputeData_PlnCon_HeaderFile
|
||||
#ifndef ChFiKPart_ComputeData_FilPlnCon_HeaderFile
|
||||
#define ChFiKPart_ComputeData_FilPlnCon_HeaderFile
|
||||
|
||||
Standard_Boolean ChFiKPart_MakeFillet(TopOpeBRepDS_DataStructure& DStr,
|
||||
const Handle(ChFiDS_SurfData)& Data,
|
||||
|
@@ -14,8 +14,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef ChFiKPart_ComputeData_PlnCyl_HeaderFile
|
||||
#define ChFiKPart_ComputeData_PlnCyl_HeaderFile
|
||||
#ifndef ChFiKPart_ComputeData_FilPlnCyl_HeaderFile
|
||||
#define ChFiKPart_ComputeData_FilPlnCyl_HeaderFile
|
||||
|
||||
Standard_Boolean ChFiKPart_MakeFillet(TopOpeBRepDS_DataStructure& DStr,
|
||||
const Handle(ChFiDS_SurfData)& Data,
|
||||
|
@@ -14,8 +14,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef ChFiKPart_ComputeData_PlnPln_HeaderFile
|
||||
#define ChFiKPart_ComputeData_PlnPln_HeaderFile
|
||||
#ifndef ChFiKPart_ComputeData_FilPlnPln_HeaderFile
|
||||
#define ChFiKPart_ComputeData_FilPlnPln_HeaderFile
|
||||
|
||||
Standard_Boolean ChFiKPart_MakeFillet(TopOpeBRepDS_DataStructure& DStr,
|
||||
const Handle(ChFiDS_SurfData)& Data,
|
||||
|
@@ -11,8 +11,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef __Cocoa_LocalPool_h_
|
||||
#define __Cocoa_LocalPool_h_
|
||||
#ifndef Cocoa_LocalPool_HeaderFile
|
||||
#define Cocoa_LocalPool_HeaderFile
|
||||
|
||||
#if defined(__clang__) && (__clang_major__ >= 4)
|
||||
#if __has_feature(objc_arc)
|
||||
|
@@ -13,8 +13,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _Cocoa_Window_H__
|
||||
#define _Cocoa_Window_H__
|
||||
#ifndef Cocoa_Window_HeaderFile
|
||||
#define Cocoa_Window_HeaderFile
|
||||
|
||||
#if defined(__APPLE__)
|
||||
#import <TargetConditionals.h>
|
||||
|
@@ -14,13 +14,13 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef Convert_CosAndSinEvalFunction_HeaderFile
|
||||
#define Convert_CosAndSinEvalFunction_HeaderFile
|
||||
|
||||
#include <TColgp_Array1OfPnt2d.hxx>
|
||||
#include <TColStd_Array1OfReal.hxx>
|
||||
#include <TColStd_Array1OfInteger.hxx>
|
||||
|
||||
#ifndef _Convert_CosAnSinEvalFunction_HeaderFile
|
||||
#define _Convert_CosAnSinEvalFunction_HeaderFile
|
||||
|
||||
typedef void Convert_CosAndSinEvalFunction(Standard_Real,
|
||||
const Standard_Integer,
|
||||
const TColgp_Array1OfPnt2d&,
|
||||
|
@@ -14,12 +14,12 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef Convert_PolynomialCosAndSin_HeaderFile
|
||||
#define Convert_PolynomialCosAndSin_HeaderFile
|
||||
|
||||
#include <TColStd_HArray1OfReal.hxx>
|
||||
#include <TColStd_HArray1OfInteger.hxx>
|
||||
|
||||
#ifndef _Convert_PolynomialCosAnSin_HeaderFile
|
||||
#define _Convert_PolynomialCosAnSin_HeaderFile
|
||||
|
||||
void BuildPolynomialCosAndSin
|
||||
(const Standard_Real,
|
||||
const Standard_Real,
|
||||
|
@@ -11,8 +11,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _DsgPrs_DatumPrs_H__
|
||||
#define _DsgPrs_DatumPrs_H__
|
||||
#ifndef DsgPrs_DatumPrs_HeaderFile
|
||||
#define DsgPrs_DatumPrs_HeaderFile
|
||||
|
||||
#include <gp_Ax2.hxx>
|
||||
#include <Prs3d_Drawer.hxx>
|
||||
|
@@ -12,8 +12,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _Font_BRepFont_H__
|
||||
#define _Font_BRepFont_H__
|
||||
#ifndef Font_BRepFont_HeaderFile
|
||||
#define Font_BRepFont_HeaderFile
|
||||
|
||||
#include <StdPrs_BRepFont.hxx>
|
||||
|
||||
|
@@ -13,8 +13,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _Font_FTFont_H__
|
||||
#define _Font_FTFont_H__
|
||||
#ifndef Font_FTFont_HeaderFile
|
||||
#define Font_FTFont_HeaderFile
|
||||
|
||||
#include <Font_FontAspect.hxx>
|
||||
#include <Font_Hinting.hxx>
|
||||
|
@@ -13,8 +13,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _Font_FTLibrary_H__
|
||||
#define _Font_FTLibrary_H__
|
||||
#ifndef Font_FTLibrary_HeaderFile
|
||||
#define Font_FTLibrary_HeaderFile
|
||||
|
||||
#include <Standard_Type.hxx>
|
||||
#include <Standard_Transient.hxx>
|
||||
|
@@ -383,6 +383,7 @@ Handle(Geom_BSplineSurface) GeomConvert::SurfaceToBSplineSurface
|
||||
//
|
||||
//For cylinders, cones, spheres, toruses
|
||||
const Standard_Boolean isUClosed = Abs((ULast - UFirst) - 2. * M_PI) <= Precision::PConfusion();
|
||||
const Standard_Real eps = 100. * Epsilon(2. * M_PI);
|
||||
//
|
||||
if (Surf->IsKind(STANDARD_TYPE(Geom_Plane))) {
|
||||
TColgp_Array2OfPnt Poles (1, 2, 1, 2);
|
||||
@@ -415,6 +416,11 @@ Handle(Geom_BSplineSurface) GeomConvert::SurfaceToBSplineSurface
|
||||
if (isUClosed) {
|
||||
Convert_CylinderToBSplineSurface Convert (Cyl, VFirst, VLast);
|
||||
TheSurface = BSplineSurfaceBuilder (Convert);
|
||||
Standard_Integer aNbK = TheSurface->NbUKnots();
|
||||
if (Abs(TheSurface->UKnot(1) - UFirst) > eps || Abs(TheSurface->UKnot(aNbK) - ULast) > eps)
|
||||
{
|
||||
TheSurface->CheckAndSegment(UFirst, ULast, VFirst, VLast);
|
||||
}
|
||||
}
|
||||
else {
|
||||
Convert_CylinderToBSplineSurface
|
||||
@@ -431,6 +437,11 @@ Handle(Geom_BSplineSurface) GeomConvert::SurfaceToBSplineSurface
|
||||
if (isUClosed) {
|
||||
Convert_ConeToBSplineSurface Convert (Co, VFirst, VLast);
|
||||
TheSurface = BSplineSurfaceBuilder (Convert);
|
||||
Standard_Integer aNbK = TheSurface->NbUKnots();
|
||||
if (Abs(TheSurface->UKnot(1) - UFirst) > eps || Abs(TheSurface->UKnot(aNbK) - ULast) > eps)
|
||||
{
|
||||
TheSurface->CheckAndSegment(UFirst, ULast, VFirst, VLast);
|
||||
}
|
||||
}
|
||||
else {
|
||||
Convert_ConeToBSplineSurface
|
||||
@@ -450,6 +461,11 @@ Handle(Geom_BSplineSurface) GeomConvert::SurfaceToBSplineSurface
|
||||
//Convert_SphereToBSplineSurface Convert (Sph, UFirst, ULast);
|
||||
Convert_SphereToBSplineSurface Convert (Sph, VFirst, VLast, Standard_False);
|
||||
TheSurface = BSplineSurfaceBuilder (Convert);
|
||||
Standard_Integer aNbK = TheSurface->NbUKnots();
|
||||
if (Abs(TheSurface->UKnot(1) - UFirst) > eps || Abs(TheSurface->UKnot(aNbK) - ULast) > eps)
|
||||
{
|
||||
TheSurface->CheckAndSegment(UFirst, ULast, VFirst, VLast);
|
||||
}
|
||||
}
|
||||
else {
|
||||
Convert_SphereToBSplineSurface
|
||||
@@ -468,10 +484,20 @@ Handle(Geom_BSplineSurface) GeomConvert::SurfaceToBSplineSurface
|
||||
Convert_TorusToBSplineSurface Convert (Tr, VFirst, VLast,
|
||||
Standard_False);
|
||||
TheSurface = BSplineSurfaceBuilder (Convert);
|
||||
Standard_Integer aNbK = TheSurface->NbUKnots();
|
||||
if (Abs(TheSurface->UKnot(1) - UFirst) > eps || Abs(TheSurface->UKnot(aNbK) - ULast) > eps)
|
||||
{
|
||||
TheSurface->CheckAndSegment(UFirst, ULast, VFirst, VLast);
|
||||
}
|
||||
}
|
||||
else if (Strim->IsVClosed()) {
|
||||
Convert_TorusToBSplineSurface Convert (Tr, UFirst, ULast);
|
||||
TheSurface = BSplineSurfaceBuilder (Convert);
|
||||
Standard_Integer aNbK = TheSurface->NbVKnots();
|
||||
if (Abs(TheSurface->VKnot(1) - VFirst) > eps || Abs(TheSurface->VKnot(aNbK) - VLast) > eps)
|
||||
{
|
||||
TheSurface->CheckAndSegment(UFirst, ULast, VFirst, VLast);
|
||||
}
|
||||
}
|
||||
else {
|
||||
Convert_TorusToBSplineSurface
|
||||
@@ -575,7 +601,6 @@ Handle(Geom_BSplineSurface) GeomConvert::SurfaceToBSplineSurface
|
||||
2 , C->Degree(),
|
||||
periodic, C->IsPeriodic());
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@@ -261,134 +261,135 @@ static Standard_Integer to3d (Draw_Interpretor& , Standard_Integer n, const char
|
||||
|
||||
static Standard_Integer gproject(Draw_Interpretor& di, Standard_Integer n, const char** a)
|
||||
{
|
||||
|
||||
char newname[1024];
|
||||
char* temp = newname;
|
||||
char newname1[10];
|
||||
char* temp1 = newname1;
|
||||
char name[100];
|
||||
Standard_Integer ONE = 1;
|
||||
TCollection_AsciiString newname;
|
||||
TCollection_AsciiString newname1;
|
||||
|
||||
if (n == 3)
|
||||
Sprintf(name,"p");
|
||||
else if (n == 4) {
|
||||
Sprintf(name,"%s",a[1]);
|
||||
ONE = 2;
|
||||
if (n < 4)
|
||||
{
|
||||
di << "gproject waits 3 or more arguments\n";
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
di << "gproject wait 2 or 3 arguments\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
Handle(Geom_Curve) Cur = DrawTrSurf::GetCurve(a[ONE]);
|
||||
Handle(Geom_Surface) Sur = DrawTrSurf::GetSurface(a[ONE+1]);
|
||||
TCollection_AsciiString name = a[1];
|
||||
|
||||
Handle(Geom_Curve) Cur = DrawTrSurf::GetCurve(a[2]);
|
||||
Handle(Geom_Surface) Sur = DrawTrSurf::GetSurface(a[3]);
|
||||
if (Cur.IsNull() || Sur.IsNull()) return 1;
|
||||
|
||||
Handle(GeomAdaptor_Curve) hcur = new GeomAdaptor_Curve(Cur);
|
||||
Handle(GeomAdaptor_Surface) hsur = new GeomAdaptor_Surface(Sur);
|
||||
|
||||
Standard_Integer index = 4;
|
||||
Standard_Real aTol3d = 1.e-6;
|
||||
Standard_Real aMaxDist = -1.0;
|
||||
|
||||
Standard_Real myTol3d = 1.e-6;
|
||||
GeomAbs_Shape myContinuity = GeomAbs_C2;
|
||||
Standard_Integer myMaxDegree = 14, myMaxSeg = 16;
|
||||
if (n > 4 && a[4][0] != '-')
|
||||
{
|
||||
aTol3d = Draw::Atof(a[4]);
|
||||
index = 5;
|
||||
|
||||
if (n > 5 && a[5][0] != '-')
|
||||
{
|
||||
aMaxDist = Draw::Atof(a[5]);
|
||||
index = 6;
|
||||
}
|
||||
}
|
||||
|
||||
Handle(ProjLib_HCompProjectedCurve) HProjector = new ProjLib_HCompProjectedCurve (hsur, hcur, myTol3d/10, myTol3d/10);
|
||||
Handle(ProjLib_HCompProjectedCurve) HProjector = new ProjLib_HCompProjectedCurve(aTol3d, hsur, hcur, aMaxDist);
|
||||
ProjLib_CompProjectedCurve& Projector = *HProjector;
|
||||
|
||||
Standard_Integer k;
|
||||
Standard_Real Udeb, Ufin, UIso, VIso;
|
||||
Standard_Boolean Only2d, Only3d;
|
||||
gp_Pnt2d P2d, Pdeb, Pfin;
|
||||
gp_Pnt P;
|
||||
Handle(Adaptor2d_Curve2d) HPCur;
|
||||
Handle(Geom2d_Curve) PCur2d; // Only for isoparametric projection
|
||||
GeomAbs_Shape aContinuity = GeomAbs_C2;
|
||||
Standard_Integer aMaxDegree, aMaxSeg;
|
||||
Standard_Boolean aProj2d;
|
||||
Standard_Boolean aProj3d;
|
||||
|
||||
for(k = 1; k <= Projector.NbCurves(); k++){
|
||||
Sprintf(newname,"%s_%d",name,k);
|
||||
Sprintf(newname1,"%s2d_%d",name,k);
|
||||
if(Projector.IsSinglePnt(k, P2d)){
|
||||
// std::cout<<"Part "<<k<<" of the projection is punctual"<<std::endl;
|
||||
Projector.GetSurface()->D0(P2d.X(), P2d.Y(), P);
|
||||
DrawTrSurf::Set(temp, P);
|
||||
DrawTrSurf::Set(temp1, P2d);
|
||||
di<<temp<<" is 3d projected curve\n";
|
||||
di<<temp1<<" is pcurve\n";
|
||||
while (index + 1 < n)
|
||||
{
|
||||
if (a[index][0] != '-') return 1;
|
||||
|
||||
if (a[index][1] == 'c')
|
||||
{
|
||||
Standard_CString aContinuityName = a[index + 1];
|
||||
if (!strcmp(aContinuityName, "C0"))
|
||||
{
|
||||
aContinuity = GeomAbs_C0;
|
||||
}
|
||||
else if (!strcmp(aContinuityName, "C1"))
|
||||
{
|
||||
aContinuity = GeomAbs_C1;
|
||||
}
|
||||
else if (!strcmp(aContinuityName, "C2"))
|
||||
{
|
||||
aContinuity = GeomAbs_C2;
|
||||
}
|
||||
|
||||
Projector.SetContinuity(aContinuity);
|
||||
}
|
||||
else if (a[index][1] == 'd')
|
||||
{
|
||||
aMaxDegree = Draw::Atoi(a[index + 1]);
|
||||
aMaxDegree = aMaxDegree > 25 ? 25 : aMaxDegree;
|
||||
Projector.SetMaxDegree(aMaxDegree);
|
||||
}
|
||||
else if (a[index][1] == 's')
|
||||
{
|
||||
aMaxSeg = Draw::Atoi(a[index + 1]);
|
||||
Projector.SetMaxSeg(aMaxSeg);
|
||||
}
|
||||
else if (!strcmp(a[index], "-2d"))
|
||||
{
|
||||
aProj2d = Draw::Atoi(a[index + 1]) > 0 ? Standard_True : Standard_False;
|
||||
Projector.SetProj2d(aProj2d);
|
||||
}
|
||||
else if (!strcmp(a[index], "-3d"))
|
||||
{
|
||||
aProj3d = Draw::Atoi(a[index + 1]) > 0 ? Standard_True : Standard_False;
|
||||
Projector.SetProj3d(aProj3d);
|
||||
}
|
||||
|
||||
index += 2;
|
||||
}
|
||||
|
||||
Projector.Perform();
|
||||
|
||||
for (Standard_Integer k = 1; k <= Projector.NbCurves(); k++) {
|
||||
newname = name + "_" + TCollection_AsciiString(k);
|
||||
newname1 = name + "2d_" + TCollection_AsciiString(k);
|
||||
|
||||
if (Projector.ResultIsPoint(k))
|
||||
{
|
||||
if (Projector.GetProj2d())
|
||||
{
|
||||
DrawTrSurf::Set(newname1.ToCString(), Projector.GetResult2dP(k));
|
||||
di << newname1 << " is pcurve\n";
|
||||
}
|
||||
if (Projector.GetProj3d())
|
||||
{
|
||||
DrawTrSurf::Set(newname.ToCString(), Projector.GetResult3dP(k));
|
||||
di << newname << " is 3d projected curve\n";
|
||||
}
|
||||
}
|
||||
else {
|
||||
Only2d = Only3d = Standard_False;
|
||||
Projector.Bounds(k, Udeb, Ufin);
|
||||
gp_Dir2d Dir; // Only for isoparametric projection
|
||||
|
||||
if (Projector.IsUIso(k, UIso)) {
|
||||
// std::cout<<"Part "<<k<<" of the projection is U-isoparametric curve"<<std::endl;
|
||||
Projector.D0(Udeb, Pdeb);
|
||||
Projector.D0(Ufin, Pfin);
|
||||
Udeb = Pdeb.Y();
|
||||
Ufin = Pfin.Y();
|
||||
if (Udeb > Ufin) {
|
||||
Dir = gp_Dir2d(0, -1);
|
||||
Udeb = - Udeb;
|
||||
Ufin = - Ufin;
|
||||
}
|
||||
else Dir = gp_Dir2d(0, 1);
|
||||
PCur2d = new Geom2d_TrimmedCurve(new Geom2d_Line(gp_Pnt2d(UIso, 0), Dir), Udeb, Ufin);
|
||||
HPCur = new Geom2dAdaptor_Curve(PCur2d);
|
||||
Only3d = Standard_True;
|
||||
if (Projector.GetProj2d())
|
||||
{
|
||||
DrawTrSurf::Set(newname1.ToCString(), Projector.GetResult2dC(k));
|
||||
|
||||
di << newname1 << " is pcurve\n";
|
||||
di << " Tolerance reached in 2d is " << Projector.GetResult2dUApproxError(k)
|
||||
<< "; " << Projector.GetResult2dVApproxError(k) << "\n";
|
||||
}
|
||||
else if(Projector.IsVIso(k, VIso)) {
|
||||
// std::cout<<"Part "<<k<<" of the projection is V-isoparametric curve"<<std::endl;
|
||||
Projector.D0(Udeb, Pdeb);
|
||||
Projector.D0(Ufin, Pfin);
|
||||
Udeb = Pdeb.X();
|
||||
Ufin = Pfin.X();
|
||||
if (Udeb > Ufin) {
|
||||
Dir = gp_Dir2d(-1, 0);
|
||||
Udeb = - Udeb;
|
||||
Ufin = - Ufin;
|
||||
}
|
||||
else Dir = gp_Dir2d(1, 0);
|
||||
PCur2d = new Geom2d_TrimmedCurve(new Geom2d_Line(gp_Pnt2d(0, VIso), Dir), Udeb, Ufin);
|
||||
HPCur = new Geom2dAdaptor_Curve(PCur2d);
|
||||
Only3d = Standard_True;
|
||||
}
|
||||
else HPCur = HProjector;
|
||||
|
||||
if(Projector.MaxDistance(k) <= myTol3d)
|
||||
Only2d = Standard_True;
|
||||
|
||||
if(Only2d && Only3d) {
|
||||
Handle(Geom_Curve) OutCur = new Geom_TrimmedCurve (GeomAdaptor::MakeCurve (*hcur), Ufin, Udeb);
|
||||
DrawTrSurf::Set(temp, OutCur);
|
||||
DrawTrSurf::Set(temp1, PCur2d);
|
||||
di<<temp<<" is 3d projected curve\n";
|
||||
di<<temp1<<" is pcurve\n";
|
||||
return 0;
|
||||
}
|
||||
else {
|
||||
Approx_CurveOnSurface appr(HPCur, hsur, Udeb, Ufin, myTol3d);
|
||||
appr.Perform(myMaxSeg, myMaxDegree, myContinuity, Only3d, Only2d);
|
||||
if(!Only3d) {
|
||||
PCur2d = appr.Curve2d();
|
||||
di << " Error in 2d is " << appr.MaxError2dU()
|
||||
<< "; " << appr.MaxError2dV() << "\n";
|
||||
}
|
||||
if(Only2d) {
|
||||
Handle(Geom_Curve) OutCur = new Geom_TrimmedCurve (GeomAdaptor::MakeCurve (*hcur), Ufin, Udeb);
|
||||
DrawTrSurf::Set(temp, OutCur);
|
||||
}
|
||||
else {
|
||||
di << " Error in 3d is " << appr.MaxError3d() << "\n";
|
||||
DrawTrSurf::Set(temp, appr.Curve3d());
|
||||
}
|
||||
DrawTrSurf::Set(temp1, PCur2d);
|
||||
di<<temp<<" is 3d projected curve\n";
|
||||
di<<temp1<<" is pcurve\n";
|
||||
if (Projector.GetProj3d())
|
||||
{
|
||||
DrawTrSurf::Set(newname.ToCString(), Projector.GetResult3dC(k));
|
||||
|
||||
di << newname << " is 3d projected curve\n";
|
||||
di << " Tolerance reached in 3d is " << Projector.GetResult3dApproxError(k) << "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : project
|
||||
//purpose :
|
||||
@@ -1801,9 +1802,15 @@ void GeometryTest::CurveCommands(Draw_Interpretor& theCommands)
|
||||
to3d,g);
|
||||
|
||||
theCommands.Add("gproject",
|
||||
"gproject : [projectname] curve surface",
|
||||
__FILE__,
|
||||
gproject,g);
|
||||
"gproject projectname curve surface [tolerance [maxdist]]\n"
|
||||
"\t\t[-c continuity][-d maxdegree][-s maxsegments][-2d proj2d][-3d proj3d]\n"
|
||||
"\t\t-c continuity : set curve continuity (C0, C1, C2) for approximation\n"
|
||||
"\t\t-d maxdegree : set max possible degree of result for approximation\n"
|
||||
"\t\t-s maxsegments : set max value of parametric intervals the projected curve for approximation\n"
|
||||
"\t\t-2d proj2d : set necessity of 2d results (0 or 1)\n"
|
||||
"\t\t-3d proj3d : set necessity of 3d results (0 or 1)",
|
||||
__FILE__,
|
||||
gproject,g);
|
||||
|
||||
theCommands.Add("project",
|
||||
"project : no args to have help",
|
||||
|
@@ -46,6 +46,7 @@
|
||||
#include <IntRes2d_IntersectionPoint.hxx>
|
||||
#include <Geom2dAdaptor_Curve.hxx>
|
||||
#include <Message.hxx>
|
||||
#include <NCollection_Shared.hxx>
|
||||
|
||||
#include <memory>
|
||||
#include <stdio.h>
|
||||
@@ -60,38 +61,38 @@ Standard_IMPORT Draw_Viewer dout;
|
||||
|
||||
static Standard_Integer proj (Draw_Interpretor& di, Standard_Integer n, const char** a)
|
||||
{
|
||||
if ( n < 4) return 1;
|
||||
|
||||
gp_Pnt2d P(Draw::Atof(a[2]),Draw::Atof(a[3]));
|
||||
|
||||
char name[100];
|
||||
if (n != 4)
|
||||
{
|
||||
di << "Syntax error: wrong number of arguments";
|
||||
return 1;
|
||||
}
|
||||
|
||||
Handle(Geom2d_Curve) GC = DrawTrSurf::GetCurve2d(a[1]);
|
||||
|
||||
if (GC.IsNull())
|
||||
{
|
||||
di << "Syntax error: '" << a[1] << "' is NULL";
|
||||
return 1;
|
||||
}
|
||||
|
||||
Geom2dAPI_ProjectPointOnCurve proj(P,GC,GC->FirstParameter(),
|
||||
GC->LastParameter());
|
||||
|
||||
const gp_Pnt2d P (Draw::Atof (a[2]), Draw::Atof (a[3]));
|
||||
Geom2dAPI_ProjectPointOnCurve proj(P,GC,GC->FirstParameter(), GC->LastParameter());
|
||||
for (Standard_Integer i = 1; i <= proj.NbPoints(); i++)
|
||||
{
|
||||
gp_Pnt2d aP1 = proj.Point(i);
|
||||
const Standard_Real aDist = P.Distance(aP1);
|
||||
Sprintf(name, "%s%d", "ext_", i);
|
||||
|
||||
const TCollection_AsciiString aName = TCollection_AsciiString ("ext_") + i;
|
||||
if (aDist > Precision::PConfusion())
|
||||
{
|
||||
Handle(Geom2d_Line) L = new Geom2d_Line(P, gp_Dir2d(aP1.XY() - P.XY()));
|
||||
Handle(Geom2d_TrimmedCurve) CT = new Geom2d_TrimmedCurve(L, 0., aDist);
|
||||
DrawTrSurf::Set(name, CT);
|
||||
DrawTrSurf::Set (aName.ToCString(), CT);
|
||||
}
|
||||
else
|
||||
{
|
||||
DrawTrSurf::Set(name, aP1);
|
||||
DrawTrSurf::Set (aName.ToCString(), aP1);
|
||||
}
|
||||
|
||||
di << name << " ";
|
||||
di << aName << " ";
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -119,18 +120,18 @@ static Standard_Integer appro(Draw_Interpretor& di, Standard_Integer n, const ch
|
||||
// 2dappro result nbpoint x1 dx y1 y2 ..
|
||||
// - tableau de points (x1,y1) (x1+dx,y2) ... avec x = t
|
||||
|
||||
|
||||
static Standard_Real Tol2d = 1.e-6;
|
||||
|
||||
if (n < 3) {
|
||||
if (n == 2)
|
||||
if (n < 3)
|
||||
{
|
||||
if (n == 2)
|
||||
{
|
||||
Tol2d = Draw::Atof(a[1]);
|
||||
|
||||
}
|
||||
|
||||
di << "Tolerance for 2d approx : "<< Tol2d << "\n";
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Standard_Integer i, Nb = Draw::Atoi(a[2]);
|
||||
|
||||
Standard_Boolean hasPoints = Standard_True;
|
||||
@@ -257,9 +258,7 @@ static Standard_Integer appro(Draw_Interpretor& di, Standard_Integer n, const ch
|
||||
|
||||
DrawTrSurf::Set(a[1], TheCurve);
|
||||
di << a[1];
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@@ -269,25 +268,29 @@ static Standard_Integer appro(Draw_Interpretor& di, Standard_Integer n, const ch
|
||||
|
||||
static Standard_Integer extrema(Draw_Interpretor& di, Standard_Integer n, const char** a)
|
||||
{
|
||||
if ( n<3) return 1;
|
||||
|
||||
Handle(Geom2d_Curve) GC1, GC2;
|
||||
|
||||
Standard_Real U1f,U1l,U2f,U2l;
|
||||
|
||||
GC1 = DrawTrSurf::GetCurve2d(a[1]);
|
||||
if ( GC1.IsNull())
|
||||
if (n != 3)
|
||||
{
|
||||
di << "Syntax error: wrong number of arguments";
|
||||
return 1;
|
||||
U1f = GC1->FirstParameter();
|
||||
U1l = GC1->LastParameter();
|
||||
}
|
||||
|
||||
GC2 = DrawTrSurf::GetCurve2d(a[2]);
|
||||
if ( GC2.IsNull())
|
||||
Handle(Geom2d_Curve) GC1 = DrawTrSurf::GetCurve2d (a[1]);
|
||||
Handle(Geom2d_Curve) GC2 = DrawTrSurf::GetCurve2d (a[2]);
|
||||
if (GC1.IsNull())
|
||||
{
|
||||
di << "Syntax error: '" << a[1] << "' is NULL";
|
||||
return 1;
|
||||
U2f = GC2->FirstParameter();
|
||||
U2l = GC2->LastParameter();
|
||||
}
|
||||
if (GC2.IsNull())
|
||||
{
|
||||
di << "Syntax error: '" << a[2] << "' is NULL";
|
||||
return 1;
|
||||
}
|
||||
|
||||
char name[100];
|
||||
const Standard_Real U1f = GC1->FirstParameter();
|
||||
const Standard_Real U1l = GC1->LastParameter();
|
||||
const Standard_Real U2f = GC2->FirstParameter();
|
||||
const Standard_Real U2l = GC2->LastParameter();
|
||||
|
||||
Geom2dAPI_ExtremaCurveCurve Ex(GC1,GC2,U1f,U1l,U2f,U2l);
|
||||
Standard_Boolean isInfinitySolutions = Ex.Extrema().IsParallel();
|
||||
@@ -308,25 +311,23 @@ static Standard_Integer extrema(Draw_Interpretor& di, Standard_Integer n, const
|
||||
gp_Pnt2d P1,P2;
|
||||
Ex.Points(i,P1,P2);
|
||||
di << "dist " << i << ": " << Ex.Distance(i) << " ";
|
||||
const TCollection_AsciiString aName = TCollection_AsciiString("ext_") + i;
|
||||
if (Ex.Distance(i) <= Precision::PConfusion())
|
||||
{
|
||||
Handle(Draw_Marker2D) mark = new Draw_Marker2D( P1, Draw_X, Draw_vert);
|
||||
dout << mark;
|
||||
dout.Flush();
|
||||
Sprintf(name,"%s%d","ext_",i);
|
||||
char* temp = name;
|
||||
const char* temp = aName.ToCString();
|
||||
DrawTrSurf::Set(temp, P1);
|
||||
di << name << "\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
Handle(Geom2d_Line) L = new Geom2d_Line(P1,gp_Vec2d(P1,P2));
|
||||
Handle(Geom2d_TrimmedCurve) CT = new Geom2d_TrimmedCurve(L, 0., P1.Distance(P2));
|
||||
Sprintf(name,"%s%d","ext_",i);
|
||||
char* temp = name; // portage WNT
|
||||
const char* temp = aName.ToCString();
|
||||
DrawTrSurf::Set(temp, CT);
|
||||
di << name << "\n";
|
||||
}
|
||||
di << aName << "\n";
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -338,25 +339,12 @@ static Standard_Integer extrema(Draw_Interpretor& di, Standard_Integer n, const
|
||||
//=======================================================================
|
||||
static Standard_Integer intersect(Draw_Interpretor& di, Standard_Integer n, const char** a)
|
||||
{
|
||||
if (n < 2)
|
||||
{
|
||||
di.PrintHelp(a[0]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
Handle(Geom2d_Curve) C1 = DrawTrSurf::GetCurve2d(a[1]);
|
||||
if (C1.IsNull())
|
||||
{
|
||||
di << "Curve " << a[1] << " is null\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
Handle(Geom2d_Curve) C2;
|
||||
Handle(Geom2d_Curve) C1, C2;
|
||||
Standard_Real Tol = 0.001;
|
||||
Standard_Boolean bPrintState = Standard_False;
|
||||
|
||||
// Retrieve other parameters if any
|
||||
for (Standard_Integer i = 2; i < n; ++i)
|
||||
for (Standard_Integer i = 1; i < n; ++i)
|
||||
{
|
||||
if (!strcmp(a[i], "-tol"))
|
||||
{
|
||||
@@ -366,25 +354,47 @@ static Standard_Integer intersect(Draw_Interpretor& di, Standard_Integer n, cons
|
||||
{
|
||||
bPrintState = Standard_True;
|
||||
}
|
||||
else
|
||||
else if (C1.IsNull())
|
||||
{
|
||||
C1 = DrawTrSurf::GetCurve2d (a[i]);
|
||||
if (C1.IsNull())
|
||||
{
|
||||
di << "Syntax error: curve '" << a[i] << "' is null";
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
else if (C2.IsNull())
|
||||
{
|
||||
C2 = DrawTrSurf::GetCurve2d(a[i]);
|
||||
if (C2.IsNull())
|
||||
{
|
||||
di << "Curve " << a[i] << " is null\n";
|
||||
di << "Syntax error: curve '" << a[i] << "' is null";
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
di << "Syntax error at '" << a[i] << "'";
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
if (C1.IsNull())
|
||||
{
|
||||
di << "Syntax error: wrong number of arguments";
|
||||
return 1;
|
||||
}
|
||||
|
||||
Geom2dAPI_InterCurveCurve Intersector;
|
||||
|
||||
if (!C2.IsNull())
|
||||
{
|
||||
// Curves intersection
|
||||
Intersector.Init(C1, C2, Tol);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Self-intersection of the curve
|
||||
Intersector.Init(C1, Tol);
|
||||
}
|
||||
|
||||
const Geom2dInt_GInter& anIntTool = Intersector.Intersector();
|
||||
if (!anIntTool.IsDone())
|
||||
@@ -394,7 +404,9 @@ static Standard_Integer intersect(Draw_Interpretor& di, Standard_Integer n, cons
|
||||
}
|
||||
|
||||
if (anIntTool.IsEmpty())
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
Standard_Integer aNbPoints = Intersector.NbPoints();
|
||||
for (Standard_Integer i = 1; i <= aNbPoints; i++)
|
||||
@@ -428,9 +440,8 @@ static Standard_Integer intersect(Draw_Interpretor& di, Standard_Integer n, cons
|
||||
CD = new DrawTrSurf_Curve2d(S2, Draw_violet, 30);
|
||||
dout << CD;
|
||||
}
|
||||
|
||||
dout.Flush();
|
||||
|
||||
dout.Flush();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -441,28 +452,25 @@ static Standard_Integer intersect(Draw_Interpretor& di, Standard_Integer n, cons
|
||||
|
||||
static Standard_Integer intersect_ana(Draw_Interpretor& di, Standard_Integer n, const char** a)
|
||||
{
|
||||
if (n < 2)
|
||||
if (n != 3)
|
||||
{
|
||||
Message::SendFail() << "2dintana circle circle";
|
||||
di << "Syntax error: wrong number of arguments";
|
||||
return 1;
|
||||
}
|
||||
|
||||
Handle(Geom2d_Curve) C1 = DrawTrSurf::GetCurve2d(a[1]);
|
||||
if (C1.IsNull() && !C1->IsKind(STANDARD_TYPE(Geom2d_Circle)))
|
||||
return 1;
|
||||
|
||||
Handle(Geom2d_Curve) C2 = DrawTrSurf::GetCurve2d(a[2]);
|
||||
if (C2.IsNull() && !C2->IsKind(STANDARD_TYPE(Geom2d_Circle)))
|
||||
return 1;
|
||||
|
||||
Handle(Geom2d_Circle) aCir1 = Handle(Geom2d_Circle)::DownCast(C1);
|
||||
Handle(Geom2d_Circle) aCir2 = Handle(Geom2d_Circle)::DownCast(C2);
|
||||
if (aCir1.IsNull() || aCir2.IsNull())
|
||||
{
|
||||
di << "Syntax error: '" << a[aCir1.IsNull() ? 1 : 2] << "' is not a circle";
|
||||
return 1;
|
||||
}
|
||||
|
||||
IntAna2d_AnaIntersection Intersector(aCir1->Circ2d(), aCir2->Circ2d());
|
||||
|
||||
Standard_Integer i;
|
||||
|
||||
for (i = 1; i <= Intersector.NbPoints(); i++) {
|
||||
for (Standard_Integer i = 1; i <= Intersector.NbPoints(); i++)
|
||||
{
|
||||
gp_Pnt2d P = Intersector.Point(i).Value();
|
||||
di << "Intersection point " << i << " : " << P.X() << " " << P.Y() << "\n";
|
||||
di << "parameter on the fist: " << Intersector.Point(i).ParamOnFirst();
|
||||
@@ -471,7 +479,6 @@ static Standard_Integer intersect_ana(Draw_Interpretor& di, Standard_Integer n,
|
||||
dout << mark;
|
||||
}
|
||||
dout.Flush();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -482,90 +489,88 @@ static Standard_Integer intersect_ana(Draw_Interpretor& di, Standard_Integer n,
|
||||
|
||||
static Standard_Integer intconcon(Draw_Interpretor& di, Standard_Integer n, const char** a)
|
||||
{
|
||||
if( n < 2)
|
||||
if (n != 3)
|
||||
{
|
||||
Message::SendFail() << "intconcon con1 con2";
|
||||
di << "Syntax error: wrong number of arguments";
|
||||
return 1;
|
||||
}
|
||||
|
||||
Handle(Geom2d_Curve) C1 = DrawTrSurf::GetCurve2d(a[1]);
|
||||
if (C1.IsNull())
|
||||
{
|
||||
Message::SendFail() << a[1] << " is Null";
|
||||
di << "Syntax error: '" << a[1] << "' is Null";
|
||||
return 1;
|
||||
}
|
||||
|
||||
Handle(Geom2d_Curve) C2 = DrawTrSurf::GetCurve2d(a[2]);
|
||||
if (C2.IsNull())
|
||||
{
|
||||
Message::SendFail() << a[2] << " is Null";
|
||||
di << "Syntax error: '" << a[2] << "' is Null";
|
||||
return 1;
|
||||
}
|
||||
|
||||
Geom2dAdaptor_Curve AC1(C1), AC2(C2);
|
||||
GeomAbs_CurveType T1 = AC1.GetType(), T2 = AC2.GetType();
|
||||
#if (defined(_MSC_VER) && (_MSC_VER < 1600))
|
||||
std::auto_ptr<IntAna2d_Conic> pCon;
|
||||
#else
|
||||
std::unique_ptr<IntAna2d_Conic> pCon;
|
||||
#endif
|
||||
Handle(NCollection_Shared<IntAna2d_Conic>) pCon;
|
||||
switch (T2)
|
||||
{
|
||||
case GeomAbs_Line:
|
||||
{
|
||||
pCon.reset(new IntAna2d_Conic(AC2.Line()));
|
||||
break;
|
||||
}
|
||||
case GeomAbs_Circle:
|
||||
{
|
||||
pCon.reset(new IntAna2d_Conic(AC2.Circle()));
|
||||
break;
|
||||
}
|
||||
case GeomAbs_Ellipse:
|
||||
{
|
||||
pCon.reset(new IntAna2d_Conic(AC2.Ellipse()));
|
||||
break;
|
||||
}
|
||||
case GeomAbs_Hyperbola:
|
||||
{
|
||||
pCon.reset(new IntAna2d_Conic(AC2.Hyperbola()));
|
||||
break;
|
||||
}
|
||||
case GeomAbs_Parabola:
|
||||
{
|
||||
pCon.reset(new IntAna2d_Conic(AC2.Parabola()));
|
||||
break;
|
||||
}
|
||||
default:
|
||||
Message::SendFail() << a[2] << " is not conic";
|
||||
return 1;
|
||||
case GeomAbs_Line:
|
||||
{
|
||||
pCon.reset (new NCollection_Shared<IntAna2d_Conic>(AC2.Line()));
|
||||
break;
|
||||
}
|
||||
case GeomAbs_Circle:
|
||||
{
|
||||
pCon.reset (new NCollection_Shared<IntAna2d_Conic>(AC2.Circle()));
|
||||
break;
|
||||
}
|
||||
case GeomAbs_Ellipse:
|
||||
{
|
||||
pCon.reset (new NCollection_Shared<IntAna2d_Conic>(AC2.Ellipse()));
|
||||
break;
|
||||
}
|
||||
case GeomAbs_Hyperbola:
|
||||
{
|
||||
pCon.reset (new NCollection_Shared<IntAna2d_Conic>(AC2.Hyperbola()));
|
||||
break;
|
||||
}
|
||||
case GeomAbs_Parabola:
|
||||
{
|
||||
pCon.reset (new NCollection_Shared<IntAna2d_Conic>(AC2.Parabola()));
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
di << "Syntax error: '" << a[2] << "' is not conic";
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
IntAna2d_AnaIntersection Intersector;
|
||||
switch (T1)
|
||||
{
|
||||
case GeomAbs_Line:
|
||||
Intersector.Perform(AC1.Line(), *pCon);
|
||||
break;
|
||||
case GeomAbs_Circle:
|
||||
Intersector.Perform(AC1.Circle(), *pCon);
|
||||
break;
|
||||
case GeomAbs_Ellipse:
|
||||
Intersector.Perform(AC1.Ellipse(), *pCon);
|
||||
break;
|
||||
case GeomAbs_Hyperbola:
|
||||
Intersector.Perform(AC1.Hyperbola(), *pCon);
|
||||
break;
|
||||
case GeomAbs_Parabola:
|
||||
Intersector.Perform(AC1.Parabola(), *pCon);
|
||||
break;
|
||||
default:
|
||||
Message::SendFail() << a[1] << " is not conic";
|
||||
return 1;
|
||||
case GeomAbs_Line:
|
||||
Intersector.Perform(AC1.Line(), *pCon);
|
||||
break;
|
||||
case GeomAbs_Circle:
|
||||
Intersector.Perform(AC1.Circle(), *pCon);
|
||||
break;
|
||||
case GeomAbs_Ellipse:
|
||||
Intersector.Perform(AC1.Ellipse(), *pCon);
|
||||
break;
|
||||
case GeomAbs_Hyperbola:
|
||||
Intersector.Perform(AC1.Hyperbola(), *pCon);
|
||||
break;
|
||||
case GeomAbs_Parabola:
|
||||
Intersector.Perform(AC1.Parabola(), *pCon);
|
||||
break;
|
||||
default:
|
||||
di << "Syntax error: '" << a[1] << "' is not conic";
|
||||
return 1;
|
||||
}
|
||||
|
||||
Standard_Integer i;
|
||||
for ( i = 1; i <= Intersector.NbPoints(); i++) {
|
||||
for (Standard_Integer i = 1; i <= Intersector.NbPoints(); i++)
|
||||
{
|
||||
gp_Pnt2d P = Intersector.Point(i).Value();
|
||||
di<<"Intersection point "<<i<<" : "<<P.X()<<" "<<P.Y()<<"\n";
|
||||
di << "parameter on the fist: " << Intersector.Point(i).ParamOnFirst();
|
||||
@@ -581,12 +586,9 @@ static Standard_Integer intconcon(Draw_Interpretor& di, Standard_Integer n, cons
|
||||
dout << mark;
|
||||
}
|
||||
dout.Flush();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void GeomliteTest::API2dCommands(Draw_Interpretor& theCommands)
|
||||
{
|
||||
static Standard_Boolean done = Standard_False;
|
||||
@@ -621,8 +623,12 @@ void GeomliteTest::API2dCommands(Draw_Interpretor& theCommands)
|
||||
" -state - allows printing the intersection state for each point.",
|
||||
__FILE__, intersect, g);
|
||||
|
||||
theCommands.Add("2dintanalytical", "intersect circle1 and circle2 using IntAna",__FILE__,
|
||||
intersect_ana,g);
|
||||
theCommands.Add("intconcon", "intersect conic curve1 and conic curve2 using IntAna", __FILE__,
|
||||
intconcon, g);
|
||||
theCommands.Add("2dintanalytical",
|
||||
"2dintanalytical circle1 circle2"
|
||||
"Intersect circle1 and circle2 using IntAna2d_AnaIntersection.",
|
||||
__FILE__, intersect_ana, g);
|
||||
theCommands.Add("intconcon",
|
||||
"intconcon curve1 curve2"
|
||||
"Intersect conic curve1 and conic curve2 using IntAna2d_AnaIntersection",
|
||||
__FILE__, intconcon, g);
|
||||
}
|
||||
|
@@ -11,8 +11,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _Graphic3d_BufferType_H__
|
||||
#define _Graphic3d_BufferType_H__
|
||||
#ifndef Graphic3d_BufferType_HeaderFile
|
||||
#define Graphic3d_BufferType_HeaderFile
|
||||
|
||||
//! Define buffers available for dump
|
||||
enum Graphic3d_BufferType
|
||||
|
@@ -13,8 +13,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _Graphic3d_MarkerImage_H__
|
||||
#define _Graphic3d_MarkerImage_H__
|
||||
#ifndef Graphic3d_MarkerImage_HeaderFile
|
||||
#define Graphic3d_MarkerImage_HeaderFile
|
||||
|
||||
#include <Aspect_TypeOfMarker.hxx>
|
||||
#include <Graphic3d_Vec4.hxx>
|
||||
|
@@ -13,8 +13,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef Graphic3d_TRANS_MODE_FLAGS_HXX
|
||||
#define Graphic3d_TRANS_MODE_FLAGS_HXX
|
||||
#ifndef Graphic3d_TransModeFlags_HeaderFile
|
||||
#define Graphic3d_TransModeFlags_HeaderFile
|
||||
|
||||
//! Transform Persistence Mode defining whether to lock in object position, rotation and / or zooming relative to camera position.
|
||||
enum Graphic3d_TransModeFlags
|
||||
|
@@ -13,8 +13,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _Graphic3d_Vec_H__
|
||||
#define _Graphic3d_Vec_H__
|
||||
#ifndef Graphic3d_Vec_HeaderFile
|
||||
#define Graphic3d_Vec_HeaderFile
|
||||
|
||||
#include <Graphic3d_Vec2.hxx>
|
||||
#include <Graphic3d_Vec3.hxx>
|
||||
|
@@ -22,48 +22,6 @@
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
class IGESAppli_Protocol;
|
||||
class IGESAppli_Node;
|
||||
class IGESAppli_FiniteElement;
|
||||
class IGESAppli_NodalDisplAndRot;
|
||||
class IGESAppli_NodalResults;
|
||||
class IGESAppli_ElementResults;
|
||||
class IGESAppli_Flow;
|
||||
class IGESAppli_PipingFlow;
|
||||
class IGESAppli_RegionRestriction;
|
||||
class IGESAppli_LevelFunction;
|
||||
class IGESAppli_LineWidening;
|
||||
class IGESAppli_DrilledHole;
|
||||
class IGESAppli_ReferenceDesignator;
|
||||
class IGESAppli_PinNumber;
|
||||
class IGESAppli_PartNumber;
|
||||
class IGESAppli_FlowLineSpec;
|
||||
class IGESAppli_LevelToPWBLayerMap;
|
||||
class IGESAppli_PWBArtworkStackup;
|
||||
class IGESAppli_PWBDrilledHole;
|
||||
class IGESAppli_NodalConstraint;
|
||||
class IGESAppli_ToolNode;
|
||||
class IGESAppli_ToolFiniteElement;
|
||||
class IGESAppli_ToolNodalDisplAndRot;
|
||||
class IGESAppli_ToolNodalResults;
|
||||
class IGESAppli_ToolElementResults;
|
||||
class IGESAppli_ToolFlow;
|
||||
class IGESAppli_ToolPipingFlow;
|
||||
class IGESAppli_ToolRegionRestriction;
|
||||
class IGESAppli_ToolLevelFunction;
|
||||
class IGESAppli_ToolLineWidening;
|
||||
class IGESAppli_ToolDrilledHole;
|
||||
class IGESAppli_ToolReferenceDesignator;
|
||||
class IGESAppli_ToolPinNumber;
|
||||
class IGESAppli_ToolPartNumber;
|
||||
class IGESAppli_ToolFlowLineSpec;
|
||||
class IGESAppli_ToolLevelToPWBLayerMap;
|
||||
class IGESAppli_ToolPWBArtworkStackup;
|
||||
class IGESAppli_ToolPWBDrilledHole;
|
||||
class IGESAppli_ToolNodalConstraint;
|
||||
class IGESAppli_Protocol;
|
||||
class IGESAppli_ReadWriteModule;
|
||||
class IGESAppli_GeneralModule;
|
||||
class IGESAppli_SpecificModule;
|
||||
|
||||
|
||||
//! This package represents collection of miscellaneous
|
||||
|
@@ -29,8 +29,6 @@
|
||||
class IGESDimen_GeneralNote;
|
||||
class IGESBasic_HArray1OfHArray1OfInteger;
|
||||
class IGESBasic_HArray1OfHArray1OfReal;
|
||||
class Standard_DimensionMismatch;
|
||||
class Standard_OutOfRange;
|
||||
class IGESAppli_FiniteElement;
|
||||
|
||||
|
||||
|
@@ -24,7 +24,6 @@
|
||||
#include <IGESAppli_HArray1OfNode.hxx>
|
||||
#include <IGESData_IGESEntity.hxx>
|
||||
class TCollection_HAsciiString;
|
||||
class Standard_OutOfRange;
|
||||
class IGESAppli_Node;
|
||||
|
||||
|
||||
|
@@ -27,8 +27,6 @@
|
||||
#include <IGESGraph_HArray1OfTextDisplayTemplate.hxx>
|
||||
#include <IGESData_IGESEntity.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class Standard_OutOfRange;
|
||||
class IGESData_IGESEntity;
|
||||
class IGESDraw_ConnectPoint;
|
||||
class TCollection_HAsciiString;
|
||||
class IGESGraph_TextDisplayTemplate;
|
||||
|
@@ -23,7 +23,6 @@
|
||||
#include <Interface_HArray1OfHAsciiString.hxx>
|
||||
#include <IGESData_IGESEntity.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
class Standard_OutOfRange;
|
||||
class TCollection_HAsciiString;
|
||||
|
||||
|
||||
|
@@ -24,8 +24,6 @@
|
||||
#include <TColStd_HArray1OfInteger.hxx>
|
||||
#include <Interface_HArray1OfHAsciiString.hxx>
|
||||
#include <IGESData_IGESEntity.hxx>
|
||||
class Standard_DimensionMismatch;
|
||||
class Standard_OutOfRange;
|
||||
class TCollection_HAsciiString;
|
||||
|
||||
|
||||
|
@@ -24,7 +24,6 @@
|
||||
#include <IGESDefs_HArray1OfTabularData.hxx>
|
||||
#include <IGESData_IGESEntity.hxx>
|
||||
class IGESAppli_Node;
|
||||
class Standard_OutOfRange;
|
||||
class IGESDefs_TabularData;
|
||||
|
||||
|
||||
|
@@ -26,8 +26,6 @@
|
||||
#include <IGESData_IGESEntity.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
class IGESBasic_HArray1OfHArray1OfXYZ;
|
||||
class Standard_DimensionMismatch;
|
||||
class Standard_OutOfRange;
|
||||
class IGESDimen_GeneralNote;
|
||||
class IGESAppli_Node;
|
||||
class gp_XYZ;
|
||||
|
@@ -27,8 +27,6 @@
|
||||
#include <TColStd_HArray2OfReal.hxx>
|
||||
#include <IGESData_IGESEntity.hxx>
|
||||
class IGESDimen_GeneralNote;
|
||||
class Standard_DimensionMismatch;
|
||||
class Standard_OutOfRange;
|
||||
class IGESAppli_Node;
|
||||
|
||||
|
||||
|
@@ -24,7 +24,6 @@
|
||||
#include <IGESData_IGESEntity.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
class IGESGeom_TransformationMatrix;
|
||||
class gp_XYZ;
|
||||
class gp_Pnt;
|
||||
class IGESData_TransfEntity;
|
||||
|
||||
|
@@ -24,7 +24,6 @@
|
||||
#include <TColStd_HArray1OfInteger.hxx>
|
||||
#include <IGESData_IGESEntity.hxx>
|
||||
class TCollection_HAsciiString;
|
||||
class Standard_OutOfRange;
|
||||
|
||||
|
||||
class IGESAppli_PWBArtworkStackup;
|
||||
|
@@ -27,8 +27,6 @@
|
||||
#include <IGESGraph_HArray1OfTextDisplayTemplate.hxx>
|
||||
#include <IGESData_IGESEntity.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class Standard_OutOfRange;
|
||||
class IGESData_IGESEntity;
|
||||
class IGESDraw_ConnectPoint;
|
||||
class TCollection_HAsciiString;
|
||||
class IGESGraph_TextDisplayTemplate;
|
||||
|
@@ -22,7 +22,6 @@
|
||||
|
||||
#include <IGESData_ReadWriteModule.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
class Standard_DomainError;
|
||||
class IGESData_IGESEntity;
|
||||
class IGESData_IGESReaderData;
|
||||
class IGESData_ParamReader;
|
||||
|
@@ -23,7 +23,6 @@
|
||||
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
class Standard_DomainError;
|
||||
class IGESAppli_DrilledHole;
|
||||
class IGESData_IGESReaderData;
|
||||
class IGESData_ParamReader;
|
||||
|