Compare commits
22 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
6d61efef1e | ||
|
cba287d62a | ||
|
fe6c26dc50 | ||
|
9294c8f774 | ||
|
905b0e3175 | ||
|
a743814be9 | ||
|
efe9d99730 | ||
|
471a2ca0bf | ||
|
f97095fada | ||
|
22e7073865 | ||
|
d21ddc4f17 | ||
|
51004f1cf9 | ||
|
0ef598d064 | ||
|
fbd0023f75 | ||
|
2783b13ce6 | ||
|
cee2b5567d | ||
|
d7a28edad2 | ||
|
7337535943 | ||
|
359cdde7ed | ||
|
2bc6f71528 | ||
|
a2456ed88a | ||
|
98f5d739e3 |
@@ -26,7 +26,7 @@ set path [file normalize .]
|
||||
set THE_CASROOT ""
|
||||
set fBranch ""
|
||||
if { [info exists ::env(CASROOT)] } {
|
||||
set THE_CASROOT "$::env(CASROOT)"
|
||||
set THE_CASROOT [file normalize "$::env(CASROOT)"]
|
||||
}
|
||||
|
||||
proc _get_options { platform type branch } {
|
||||
@@ -344,6 +344,22 @@ proc genproj {theFormat args} {
|
||||
genAllResources
|
||||
}
|
||||
|
||||
# copy file providing warning if the target file exists and has
|
||||
# different date or size; if it is newer than source, save it as .bak
|
||||
proc copy_with_warning {from to} {
|
||||
if { [file exists "$to"] &&
|
||||
([file size "$to"] != [file size "$from"] ||
|
||||
[file mtime "$to"] != [file mtime "$from"]) } {
|
||||
puts "Warning: file $to is updated (copied from $from)!"
|
||||
if { [file mtime $to] > [file mtime $from] } {
|
||||
puts "Info: old content of file $to is saved in ${to}.bak"
|
||||
file copy -force -- "$to" "${to}.bak"
|
||||
}
|
||||
}
|
||||
|
||||
file copy -force -- "$from" "$to"
|
||||
}
|
||||
|
||||
proc genprojbat {theFormat thePlatform} {
|
||||
set aTargetPlatformExt sh
|
||||
if { $thePlatform == "wnt" || $thePlatform == "uwp" } {
|
||||
@@ -369,11 +385,11 @@ proc genprojbat {theFormat thePlatform} {
|
||||
close $anEnvFile
|
||||
}
|
||||
|
||||
file copy -force -- "$::THE_CASROOT/adm/templates/draw.${aTargetPlatformExt}" "$::path/draw.${aTargetPlatformExt}"
|
||||
copy_with_warning "$::THE_CASROOT/adm/templates/draw.${aTargetPlatformExt}" "$::path/draw.${aTargetPlatformExt}"
|
||||
}
|
||||
|
||||
if { [regexp {^vc} $theFormat] } {
|
||||
file copy -force -- "$::THE_CASROOT/adm/templates/msvc.bat" "$::path/msvc.bat"
|
||||
copy_with_warning "$::THE_CASROOT/adm/templates/msvc.bat" "$::path/msvc.bat"
|
||||
} else {
|
||||
switch -exact -- "$theFormat" {
|
||||
"cbp" {
|
||||
|
31
adm/svgdiff.bat
Normal file
@@ -0,0 +1,31 @@
|
||||
@echo off
|
||||
rem Script to diff SVG images visually (as PNG) in TortoiseGit client
|
||||
rem
|
||||
rem It assumes that Inkscape and TortoiseGitIDiff executables are either
|
||||
rem installed in default locations in Program Files, or are accessible by PATH
|
||||
rem
|
||||
rem To use this script for diffing SVG images, open TortoiseGit settings
|
||||
rem (Start -> Programs -> TortoiseGit -> Settings), select "Diff Viewer",
|
||||
rem click button "Advanced..." on the right tab and then add new record:
|
||||
rem - Extension: .svg
|
||||
rem - External program: <path to OCCT>\adm\svgdiff.bat %base %mine %bname %yname
|
||||
|
||||
rem Remove double quotes around arguments
|
||||
set "f1=%1"
|
||||
set "f2=%2"
|
||||
set "f1=%f1:~1,-1%.png"
|
||||
set "f2=%f2:~1,-1%.png"
|
||||
|
||||
rem Check if Inkscape and TortoiseGit are installed in default locations in
|
||||
rem ProgramFiles; if not, assume they still may be accessible by PATH
|
||||
set "inkscape=%ProgramFiles%\Inkscape\inkscape.exe"
|
||||
if not exist "%inkscape%" set inkscape=inkscape.exe
|
||||
set "tgitidiff=%ProgramFiles%\TortoiseGit\bin\TortoiseGitIDiff.exe"
|
||||
if not exist "%tgitidiff%" set tgitidiff=TortoiseGitIDiff.exe
|
||||
|
||||
rem Convert SVG to PNG using Inkscape
|
||||
"%inkscape%" -e "%f1%" %1
|
||||
"%inkscape%" -e "%f2%" %2
|
||||
|
||||
rem Call Tortoise differ
|
||||
"%tgitidiff%" /left:"%f1%" /right:"%f2%" /lefttitle:%3 /righttitle:%4
|
@@ -56,6 +56,6 @@ To build all toolkits, click **Build->Build workspace** in the menu bar.
|
||||
|
||||
To start *DRAWEXE*, which has been built with **Code::Blocks** on Mac OS X, run the script
|
||||
~~~~~
|
||||
./draw_cbp.sh cbp [d]
|
||||
./draw.sh cbp [d]
|
||||
~~~~~
|
||||
Option *d* is used if OCCT has been built in **Debug** mode.
|
||||
|
@@ -82,7 +82,7 @@ The official repository contains:
|
||||
|
||||
@subsection occt_gitguide_1_5 Version of Git
|
||||
|
||||
The repository is tested to work with Git 1.7.6 to 1.7.9.
|
||||
The repository is tested to work with Git 1.7.6 and above.
|
||||
Please do not use versions below 1.7.1 as they are known to cause troubles.
|
||||
|
||||
@section occt_gitguide_2 Installing Tools for Work with Git
|
||||
@@ -139,6 +139,13 @@ The official repository contains:
|
||||
|
||||
@figure{OCCT_GitGuide_V2_image006.png,"",320}
|
||||
|
||||
Optionally, you can set up TortoiseGit to use visual diff utility for SVG images used in OCCT documentation.
|
||||
For that, click on item "Diff Viewer" in the Settings dialog, then click button "Advanced..." on the right tab add new record with the following parameters:
|
||||
- Extension: <code>.svg</code>
|
||||
- External program: <code><path_to_OCCT>\\adm\\svgdiff.bat %%base %%mine %%bname %%yname</code>
|
||||
|
||||
@figure{OCCT_GitGuide_V2_svgdiff.png,"",709}
|
||||
|
||||
@subsection occt_gitguide_2_2 Linux platform
|
||||
|
||||
We assume that Linux users have Git already installed and available in the *PATH*.
|
||||
|
BIN
dox/dev_guides/git_guide/images/OCCT_GitGuide_V2_svgdiff.png
Normal file
After Width: | Height: | Size: 54 KiB |
@@ -324,6 +324,15 @@ The methods *V3d_View::Convert* and *V3d_View::ConvertWithProj()* have ceased to
|
||||
|
||||
Porting of user applications from an earlier OCCT version to version 7.0.0 requires taking into account the following major changes.
|
||||
|
||||
Building OCCT now requires compiler supporting some C++11 features.
|
||||
The supported compilers are:
|
||||
- MSVC: version 10 (Visual Studio 2010) or later
|
||||
- GCC: version 4.3 or later
|
||||
- CLang: version 3.6 or later
|
||||
- ICC: version XE 2013 SP 1 or later
|
||||
|
||||
When compiling code that uses OCCT with GCC and CLang compilers, it is necessary to use compiler option -std=c++0x (or its siblings) to enable C++11 features.
|
||||
|
||||
@subsection upgrade_700_persist Removal of legacy persistence
|
||||
|
||||
Legacy persistence for shapes and OCAF data based on *Storage_Schema* (toolkits *TKPShape*, *TKPLCAF*, *TKPCAF*, *TKShapeShcema, TLStdLSchema, TKStdSchema*, and *TKXCAFSchema*) has been removed in OCCT 7.0.0.
|
||||
@@ -1195,6 +1204,9 @@ Management of highlight attributes has been revised and might require modificati
|
||||
it is now possible to customize default highlight attributes like *Display Mode* and *ZLayer*, which previously could be defined only on Object level.
|
||||
* Properties *Prs3d_Drawer::HighlightStyle()* and *Prs3d_Drawer::SelectionStyle()* have been removed.
|
||||
Instead, *AIS_InteractiveObject* now defines *DynamicHilightAttributes()* for dynamic highlighting in addition to *HilightAttributes()* used for highlighting in selected state.
|
||||
Note that *AIS_InteractiveObject::HilightAttributes()* and *AIS_InteractiveObject::DynamicHilightAttributes()* override highlighting properties for both - entire object and for part coming from decomposition.
|
||||
This includes Z-layer settings, which will be the same when overriding properties through AIS_InteractiveObject, while *AIS_InteractiveContext::HighlightStyle()* allows customizing properties for local and global selection independently
|
||||
(with Graphic3d_ZLayerId_Top used for dynamic highlighting of entire object and Graphic3d_ZLayerId_Topmost for dynamic highlighting of object part by default).
|
||||
* The following protected fields have been removed from class *AIS_InteractiveObject*:
|
||||
- *myOwnColor*, replaced by *myDrawer->Color()*
|
||||
- *myTransparency*, replaced by *myDrawer->Transparency()*
|
||||
@@ -1410,3 +1422,10 @@ The history of the changing of the initial shape was corrected:
|
||||
@subsection upgrade_720_Change_In_RWStl Changes in STL Reader / Writer
|
||||
|
||||
Class RWStl now uses class Poly_Triangulation for storing triangular mesh instead of StlMesh data classes; the latter have been removed.
|
||||
|
||||
@subsection upgrade_720_New_Error_Warning_system_in_BOA Refactoring of the Error/Warning reporting system in Boolean Component
|
||||
|
||||
The Error/Warning reporting system of the algorithms in Boolean Component (in all BOPAlgo_* and BRepAlgoAPI_* algorithms) has been refactored.
|
||||
The methods returning the status of errors and warnings of the algorithms (ErrorStatus() and WarningStatus()) have been removed.
|
||||
Instead use methods HasErrors() and HasWarnings() to check for presence of errors and warnings, respectively.
|
||||
The full list of errors and warnings, with associated data such as problematic sub-shapes, can be obtained by method GetReport().
|
||||
|
@@ -540,6 +540,23 @@ The structure *BOPDS_FaceInfo* has the following contents.
|
||||
|
||||
The objects of type *BOPDS_FaceInfo* are stored in one container of array type. The array allows getting the access to the information by index. This index (if exists) is stored in the field *myReference*.
|
||||
|
||||
@section occt_algorithms_root_classes Root Classes
|
||||
|
||||
@subsection occt_algorithms_root_classes_1 Class BOPAlgo_Options
|
||||
The class *BOPAlgo_Options* provides the following options for the algorithms:
|
||||
* Set the appropriate memory allocator;
|
||||
* Check the presence of the Errors and Warnings;
|
||||
* Turn on/off the parallel processing;
|
||||
* Set the additional tolerance for the operation;
|
||||
* Break the operations by user request.
|
||||
|
||||
@subsection occt_algorithms_root_classes_2 Class BOPAlgo_Algo
|
||||
|
||||
The class *BOPAlgo_Algo* provides the base interface for all algorithms:
|
||||
* Perform the operation;
|
||||
* Check the input data;
|
||||
* Check the result.
|
||||
|
||||
@section occt_algorithms_5 Intersection Part
|
||||
|
||||
Intersection Part (IP) is used to
|
||||
@@ -553,17 +570,7 @@ Intersection Part (IP) is used to
|
||||
|
||||
IP is implemented in the class *BOPAlgo_PaveFiller*.
|
||||
|
||||
@figure{/user_guides/boolean_operations/images/operations_image064.svg,"Diagram for Class BOPAlgo_PaveFiller",230}
|
||||
|
||||
@subsection occt_algorithms_5_1a Class BOPAlgo_Algo
|
||||
The class *BOPAlgo_Algo* provides the base interface for all algorithms to provide the possibility to:
|
||||
* Get Error status;
|
||||
* Get Warning status;
|
||||
* Turn on/off the parallel processing
|
||||
* Break the operations by user request
|
||||
* Check data;
|
||||
* Check the result;
|
||||
* Set the appropriate memory allocator.
|
||||
@figure{/user_guides/boolean_operations/images/operations_image064.png,"Diagram for Class BOPAlgo_PaveFiller",230}
|
||||
|
||||
The description provided in the next paragraphs is coherent with the implementation of the method *BOPAlgo_PaveFiller::Perform()*.
|
||||
|
||||
@@ -745,8 +752,11 @@ BP is implemented in the following classes:
|
||||
* *BOPAlgo_Builder* -- for the General Fuse operator (GFA).
|
||||
* *BOPAlgo_BOP* -- for the Boolean Operation operator (BOA).
|
||||
* *BOPAlgo_Section* -- for the Section operator (SA).
|
||||
* *BOPAlgo_MakerVolume* -- for the Volume Maker operator.
|
||||
* *BOPAlgo_Splitter* -- for the Splitter operator.
|
||||
* *BOPAlgo_CellsBuilder* -- for the Cells Builder operator.
|
||||
|
||||
@figure{/user_guides/boolean_operations/images/operations_image020.svg,"Diagram for BP classes",300}
|
||||
@figure{/user_guides/boolean_operations/images/operations_image020.png,"Diagram for BP classes",300}
|
||||
|
||||
The class *BOPAlgo_BuilderShape* provides the interface for algorithms that have:
|
||||
* A Shape as the result;
|
||||
@@ -1088,7 +1098,7 @@ aSplitter.SetNonDestructive(bSafeMode);
|
||||
aSplitter.SetGlue(aGlue);
|
||||
//
|
||||
aSplitter.Perform(); //perform the operation
|
||||
if (aSplitter.ErrorStatus()) { //check error status
|
||||
if (aSplitter.HasErrors()) { //check error status
|
||||
return;
|
||||
}
|
||||
//
|
||||
@@ -2061,7 +2071,7 @@ aMV.SetGlue(aGlue);
|
||||
aMV.SetAvoidInternalShapes(bAvoidInternalShapes);
|
||||
//
|
||||
aMV.Perform(); //perform the operation
|
||||
if (aMV.ErrorStatus()) { //check error status
|
||||
if (aMV.HasErrors()) { //check error status
|
||||
return;
|
||||
}
|
||||
//
|
||||
@@ -2151,7 +2161,7 @@ aCBuilder.SetNonDestructive(bSafeMode);
|
||||
aCBuilder.SetGlue(aGlue);
|
||||
//
|
||||
aCBuilder.Perform(); // build splits of all arguments (GF)
|
||||
if (aCBuilder.ErrorStatus()) { // check error status
|
||||
if (aCBuilder.HasErrors()) { // check error status
|
||||
return;
|
||||
}
|
||||
//
|
||||
@@ -2804,7 +2814,6 @@ The following example illustrates how to use General Fuse operator:
|
||||
#include <BRepAlgoAPI_BuilderAlgo.hxx>
|
||||
{…
|
||||
Standard_Boolean bRunParallel;
|
||||
Standard_Integer iErr;
|
||||
Standard_Real aFuzzyValue;
|
||||
BRepAlgoAPI_BuilderAlgo aBuilder;
|
||||
//
|
||||
@@ -2841,8 +2850,7 @@ The following example illustrates how to use General Fuse operator:
|
||||
//
|
||||
// run the algorithm
|
||||
aBuilder.Build();
|
||||
iErr=aBuilder.ErrorStatus();
|
||||
if (iErr) {
|
||||
if (aBuilder.HasErrors()) {
|
||||
// an error treatment
|
||||
return;
|
||||
}
|
||||
@@ -2945,7 +2953,7 @@ aSplitter.SetGlue(aGlueOpt);
|
||||
// run the algorithm
|
||||
aSplitter.Build();
|
||||
// check error status
|
||||
if (aSplitter.ErrorStatus()) {
|
||||
if (aSplitter.HasErrors()) {
|
||||
return;
|
||||
}
|
||||
//
|
||||
@@ -3012,7 +3020,6 @@ The following example illustrates how to use Common operation:
|
||||
#include < BRepAlgoAPI_Common.hxx>
|
||||
{…
|
||||
Standard_Boolean bRunParallel;
|
||||
Standard_Integer iErr;
|
||||
Standard_Real aFuzzyValue;
|
||||
BRepAlgoAPI_Common aBuilder;
|
||||
|
||||
@@ -3052,8 +3059,7 @@ The following example illustrates how to use Common operation:
|
||||
//
|
||||
// run the algorithm
|
||||
aBuilder.Build();
|
||||
iErr=aBuilder.ErrorStatus();
|
||||
if (iErr) {
|
||||
if (aBuilder.HasErrors()) {
|
||||
// an error treatment
|
||||
return;
|
||||
}
|
||||
@@ -3119,7 +3125,6 @@ The following example illustrates how to use Fuse operation:
|
||||
#include < BRepAlgoAPI_Fuse.hxx>
|
||||
{…
|
||||
Standard_Boolean bRunParallel;
|
||||
Standard_Integer iErr;
|
||||
Standard_Real aFuzzyValue;
|
||||
BRepAlgoAPI_Fuse aBuilder;
|
||||
|
||||
@@ -3159,8 +3164,7 @@ The following example illustrates how to use Fuse operation:
|
||||
//
|
||||
// run the algorithm
|
||||
aBuilder.Build();
|
||||
iErr=aBuilder.ErrorStatus();
|
||||
if (iErr) {
|
||||
if (aBuilder.HasErrors()) {
|
||||
// an error treatment
|
||||
return;
|
||||
}
|
||||
@@ -3226,7 +3230,6 @@ The following example illustrates how to use Cut operation:
|
||||
#include < BRepAlgoAPI_Cut.hxx>
|
||||
{…
|
||||
Standard_Boolean bRunParallel;
|
||||
Standard_Integer iErr;
|
||||
Standard_Real aFuzzyValue;
|
||||
BRepAlgoAPI_Cut aBuilder;
|
||||
|
||||
@@ -3266,8 +3269,7 @@ The following example illustrates how to use Cut operation:
|
||||
//
|
||||
// run the algorithm
|
||||
aBuilder.Build();
|
||||
iErr=aBuilder.ErrorStatus();
|
||||
if (iErr) {
|
||||
if (aBuilder.HasErrors()) {
|
||||
// an error treatment
|
||||
return;
|
||||
}
|
||||
@@ -3334,7 +3336,6 @@ The following example illustrates how to use Section operation:
|
||||
#include < BRepAlgoAPI_Section.hxx>
|
||||
{…
|
||||
Standard_Boolean bRunParallel;
|
||||
Standard_Integer iErr;
|
||||
Standard_Real aFuzzyValue;
|
||||
BRepAlgoAPI_Section aBuilder;
|
||||
|
||||
@@ -3374,8 +3375,7 @@ The following example illustrates how to use Section operation:
|
||||
//
|
||||
// run the algorithm
|
||||
aBuilder.Build();
|
||||
iErr=aBuilder.ErrorStatus();
|
||||
if (iErr) {
|
||||
if (aBuilder.HasErrors()) {
|
||||
// an error treatment
|
||||
return;
|
||||
}
|
||||
|
After Width: | Height: | Size: 11 KiB |
@@ -1,296 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="488.59842"
|
||||
height="239.24245"
|
||||
id="svg2"
|
||||
version="1.1"
|
||||
inkscape:version="0.48.4 r9939"
|
||||
sodipodi:docname="operations_image020.svg">
|
||||
<defs
|
||||
id="defs4">
|
||||
<marker
|
||||
inkscape:stockid="Arrow2Lstart"
|
||||
orient="auto"
|
||||
refY="0.0"
|
||||
refX="0.0"
|
||||
id="Arrow2Lstart"
|
||||
style="overflow:visible">
|
||||
<path
|
||||
id="path7116"
|
||||
style="fill-rule:evenodd;stroke-width:0.62500000;stroke-linejoin:round"
|
||||
d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
|
||||
transform="scale(1.1) translate(1,0)" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="Arrow2Mend"
|
||||
orient="auto"
|
||||
refY="0.0"
|
||||
refX="0.0"
|
||||
id="Arrow2Mend"
|
||||
style="overflow:visible;">
|
||||
<path
|
||||
id="path7125"
|
||||
style="fill-rule:evenodd;stroke-width:0.62500000;stroke-linejoin:round;"
|
||||
d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
|
||||
transform="scale(0.6) rotate(180) translate(0,0)" />
|
||||
</marker>
|
||||
<clipPath
|
||||
id="clipEmfPath1"
|
||||
clipPathUnits="userSpaceOnUse">
|
||||
<rect
|
||||
id="rect2990"
|
||||
height="19.040462"
|
||||
width="177.28004"
|
||||
y="73.463196"
|
||||
x="191.21669" />
|
||||
</clipPath>
|
||||
<clipPath
|
||||
id="clipEmfPath2"
|
||||
clipPathUnits="userSpaceOnUse">
|
||||
<rect
|
||||
id="rect2993"
|
||||
height="19.040462"
|
||||
width="176.83047"
|
||||
y="12.743616"
|
||||
x="192.41554" />
|
||||
</clipPath>
|
||||
<clipPath
|
||||
id="clipEmfPath3"
|
||||
clipPathUnits="userSpaceOnUse">
|
||||
<rect
|
||||
id="rect2996"
|
||||
height="18.890537"
|
||||
width="177.28004"
|
||||
y="133.13332"
|
||||
x="191.21669" />
|
||||
</clipPath>
|
||||
<clipPath
|
||||
id="clipEmfPath4"
|
||||
clipPathUnits="userSpaceOnUse">
|
||||
<rect
|
||||
id="rect2999"
|
||||
height="18.890537"
|
||||
width="149.10706"
|
||||
y="204.34763"
|
||||
x="130.52487" />
|
||||
</clipPath>
|
||||
<clipPath
|
||||
id="clipEmfPath5"
|
||||
clipPathUnits="userSpaceOnUse">
|
||||
<rect
|
||||
id="rect3002"
|
||||
height="18.890537"
|
||||
width="148.9572"
|
||||
y="204.34763"
|
||||
x="292.81927" />
|
||||
</clipPath>
|
||||
<marker
|
||||
inkscape:stockid="Arrow2Lstart"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="Arrow2Lstart-3"
|
||||
style="overflow:visible">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path7116-4"
|
||||
style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
|
||||
d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
|
||||
transform="matrix(1.1,0,0,1.1,1.1,0)" />
|
||||
</marker>
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="2.1979709"
|
||||
inkscape:cx="318.63273"
|
||||
inkscape:cy="137.81983"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="g3004"
|
||||
showgrid="false"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0"
|
||||
inkscape:window-width="1670"
|
||||
inkscape:window-height="723"
|
||||
inkscape:window-x="42"
|
||||
inkscape:window-y="158"
|
||||
inkscape:window-maximized="0" />
|
||||
<metadata
|
||||
id="metadata7">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(-153.88697,-412.74096)">
|
||||
<g
|
||||
id="g3004"
|
||||
transform="translate(153.4374,405.50687)">
|
||||
<text
|
||||
id="text3006"
|
||||
style="font-size:13.78678322px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Calibri"
|
||||
y="246.47653"
|
||||
x="0.44956902"
|
||||
xml:space="preserve"> </text>
|
||||
<path
|
||||
id="path3008"
|
||||
d="m 279.61319,66.547912 -0.0468,-23.360172 c -0.009,-0.346702 0.27162,-0.627811 0.61816,-0.627811 0.34654,0 0.62752,0.281109 0.62752,0.61844 l 0.0468,23.369543 c 0,0.337331 -0.28098,0.61844 -0.61815,0.61844 -0.34655,0.0094 -0.62753,-0.271738 -0.62753,-0.61844 z m -3.17508,-22.104551 3.73704,-7.505615 3.75578,7.486874 z"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.14985634px;stroke-linecap:butt;stroke-linejoin:bevel;stroke-opacity:1;stroke-dasharray:none"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
id="path3010"
|
||||
d="m 281.04619,126.53661 -0.59005,-22.61992 c 0,-0.3467 0.27161,-0.62781 0.60879,-0.63718 0.34654,-0.009 0.63689,0.26237 0.64625,0.60907 l 0.5807,22.61055 c 0.009,0.3467 -0.26225,0.62781 -0.59943,0.63718 -0.34654,0.009 -0.63689,-0.26237 -0.64626,-0.5997 z m -3.67148,-21.28933 3.54973,-7.589952 3.93373,7.393172 z"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.14985634px;stroke-linecap:butt;stroke-linejoin:bevel;stroke-opacity:1;stroke-dasharray:none"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
id="path3016"
|
||||
d="m 190.63599,68.421973 0,28.916764 178.32904,0 0,-28.916764 -178.32904,0 z"
|
||||
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
id="path3018"
|
||||
d="m 190.647,68.432978 0,28.894754 186.95136,0 0,-28.894754 z"
|
||||
style="fill:none;stroke:#000000;stroke-width:0.95861244px;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
inkscape:connector-curvature="0" />
|
||||
<text
|
||||
id="text3020"
|
||||
style="font-size:13.68622589px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New"
|
||||
y="84.089729"
|
||||
x="203.04033"
|
||||
xml:space="preserve"
|
||||
transform="scale(0.99270628,1.0073473)">BOPAlgo_BuilderShape</text>
|
||||
<text
|
||||
id="text3024"
|
||||
style="font-size:13.78678322px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New"
|
||||
y="102.69855"
|
||||
x="283.97775"
|
||||
xml:space="preserve"> </text>
|
||||
<path
|
||||
id="path3026"
|
||||
d="m 191.75992,7.7023914 0,28.9167636 177.9544,0 0,-28.9167636 -177.9544,0 z"
|
||||
clip-path="url(#clipEmfPath1)"
|
||||
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
id="path3028"
|
||||
d="m 191.7698,7.7122711 0,28.8970039 185.66905,0 0,-28.8970039 z"
|
||||
style="fill:none;stroke:#000000;stroke-width:0.95636153px;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
inkscape:connector-curvature="0" />
|
||||
<text
|
||||
id="text3030"
|
||||
style="font-size:13.78678322px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New"
|
||||
y="23.987984"
|
||||
x="231.37817"
|
||||
xml:space="preserve">BOPAlgo_Algo</text>
|
||||
<text
|
||||
id="text3032"
|
||||
style="font-size:13.78678322px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New"
|
||||
y="23.987984"
|
||||
x="330.28336"
|
||||
xml:space="preserve"> </text>
|
||||
<path
|
||||
id="path3034"
|
||||
d="m 190.63599,128.01712 0,28.91676 178.32904,0 0,-28.91676 -178.32904,0 z"
|
||||
clip-path="url(#clipEmfPath2)"
|
||||
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
id="path3036"
|
||||
d="m 190.64871,128.02984 0,28.89132 188.31283,0 0,-28.89132 z"
|
||||
style="fill:none;stroke:#000000;stroke-width:0.96203959px;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
inkscape:connector-curvature="0" />
|
||||
<text
|
||||
id="text3038"
|
||||
style="font-size:13.78678322px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New"
|
||||
y="144.37767"
|
||||
x="218.04097"
|
||||
xml:space="preserve">BOPAlgo_Builder</text>
|
||||
<text
|
||||
id="text3040"
|
||||
style="font-size:13.78678322px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New"
|
||||
y="144.37767"
|
||||
x="341.67245"
|
||||
xml:space="preserve"> </text>
|
||||
<path
|
||||
id="path3042"
|
||||
d="m 129.94418,199.23144 0,28.91677 150.04365,0 0,-28.91677 -150.04365,0 z"
|
||||
clip-path="url(#clipEmfPath3)"
|
||||
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
|
||||
inkscape:connector-curvature="0" />
|
||||
<text
|
||||
id="text3050"
|
||||
style="font-size:13.78678322px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New"
|
||||
y="233.43306"
|
||||
x="213.24557"
|
||||
xml:space="preserve"> </text>
|
||||
<path
|
||||
id="path3052"
|
||||
d="m 292.16366,199.23144 0,28.91677 150.04366,0 0,-28.91677 -150.04366,0 z"
|
||||
clip-path="url(#clipEmfPath4)"
|
||||
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
id="path3054"
|
||||
d="m 67.466014,185.63759 0,28.80655 188.150506,0 0,-28.80655 z"
|
||||
style="fill:none;stroke:#000000;stroke-width:1.04681468px;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
inkscape:connector-curvature="0" />
|
||||
<text
|
||||
id="text3056"
|
||||
style="font-size:13.78678322px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New"
|
||||
y="204.21788"
|
||||
x="124.58641"
|
||||
xml:space="preserve">BOPAlgo_BOP</text>
|
||||
<text
|
||||
id="text3058"
|
||||
style="font-size:13.78678322px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New"
|
||||
y="215.592"
|
||||
x="412.70435"
|
||||
xml:space="preserve"> </text>
|
||||
<path
|
||||
id="path3054-8"
|
||||
d="m 300.37408,185.70141 0,28.80655 188.1505,0 0,-28.80655 z"
|
||||
style="fill:none;stroke:#000000;stroke-width:1.04681468px;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
inkscape:connector-curvature="0" />
|
||||
<text
|
||||
id="text3056-9"
|
||||
style="font-size:13.78678322px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New"
|
||||
y="203.31017"
|
||||
x="336.76245"
|
||||
xml:space="preserve">BOPAlgo_Section</text>
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:0.95747238px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#Arrow2Lstart);marker-end:none"
|
||||
d="m 267.10914,158.63892 -77.87032,26.89356"
|
||||
id="path13459"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:0.88220716px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#Arrow2Lstart);marker-end:none"
|
||||
d="m 316.41379,158.50756 65.91804,26.97147"
|
||||
id="path13459-4"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 2.9 KiB |
@@ -1,238 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="500.70731"
|
||||
height="102.98"
|
||||
id="svg3731"
|
||||
version="1.1"
|
||||
inkscape:version="0.48.4 r9939"
|
||||
sodipodi:docname="operations_image064.svg">
|
||||
<defs
|
||||
id="defs3733">
|
||||
<marker
|
||||
inkscape:stockid="Arrow2Mstart"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="Arrow2Mstart"
|
||||
style="overflow:visible">
|
||||
<path
|
||||
id="path4673"
|
||||
style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
|
||||
d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
|
||||
transform="scale(0.6,0.6)"
|
||||
inkscape:connector-curvature="0" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="Arrow1Lstart"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="Arrow1Lstart"
|
||||
style="overflow:visible">
|
||||
<path
|
||||
id="path4649"
|
||||
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
|
||||
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
|
||||
transform="matrix(0.8,0,0,0.8,10,0)"
|
||||
inkscape:connector-curvature="0" />
|
||||
</marker>
|
||||
<clipPath
|
||||
id="clipEmfPath1"
|
||||
clipPathUnits="userSpaceOnUse">
|
||||
<rect
|
||||
id="rect3744"
|
||||
height="157.5"
|
||||
width="566.85828"
|
||||
y="0"
|
||||
x="0" />
|
||||
</clipPath>
|
||||
<clipPath
|
||||
id="clipEmfPath2"
|
||||
clipPathUnits="userSpaceOnUse">
|
||||
<rect
|
||||
id="rect3747"
|
||||
height="15"
|
||||
width="134.10196"
|
||||
y="14.7"
|
||||
x="215.55315" />
|
||||
</clipPath>
|
||||
<clipPath
|
||||
id="clipEmfPath3"
|
||||
clipPathUnits="userSpaceOnUse">
|
||||
<rect
|
||||
id="rect3750"
|
||||
height="13.95"
|
||||
width="158.85233"
|
||||
y="118.5"
|
||||
x="53.850784" />
|
||||
</clipPath>
|
||||
<clipPath
|
||||
id="clipEmfPath4"
|
||||
clipPathUnits="userSpaceOnUse">
|
||||
<rect
|
||||
id="rect3753"
|
||||
height="15"
|
||||
width="189.90277"
|
||||
y="68.849998"
|
||||
x="185.10271" />
|
||||
</clipPath>
|
||||
<clipPath
|
||||
id="clipEmfPath5"
|
||||
clipPathUnits="userSpaceOnUse">
|
||||
<rect
|
||||
id="rect3756"
|
||||
height="13.95"
|
||||
width="180.15263"
|
||||
y="118.2"
|
||||
x="315.3046" />
|
||||
</clipPath>
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="1.7435336"
|
||||
inkscape:cx="250.35365"
|
||||
inkscape:cy="74.48907"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="g3758"
|
||||
showgrid="false"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0"
|
||||
inkscape:window-width="1037"
|
||||
inkscape:window-height="615"
|
||||
inkscape:window-x="38"
|
||||
inkscape:window-y="209"
|
||||
inkscape:window-maximized="0" />
|
||||
<metadata
|
||||
id="metadata3736">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(204.63937,-395.29983)">
|
||||
<g
|
||||
id="g3758"
|
||||
transform="translate(-262.09021,339.42982)">
|
||||
<text
|
||||
id="text3760"
|
||||
style="font-size:12.45018196px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial"
|
||||
y="142.64999"
|
||||
x="558.15814"
|
||||
xml:space="preserve"> </text>
|
||||
<path
|
||||
id="path3762"
|
||||
d="m 214.87814,10.5 0,23.4375 135.43322,0 0,-23.4375 z"
|
||||
clip-path="url(#clipEmfPath1)"
|
||||
style="fill:none;stroke:#000000;stroke-width:1.25626838px;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="translate(-1.4412873,56.78124)" />
|
||||
<text
|
||||
id="text3764"
|
||||
style="font-size:12.45018196px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New"
|
||||
y="80.110596"
|
||||
x="236.44154"
|
||||
xml:space="preserve">BOPAlgo_Algo</text>
|
||||
<text
|
||||
id="text3766"
|
||||
style="font-size:12.45018196px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New"
|
||||
y="25.049999"
|
||||
x="327.60477"
|
||||
xml:space="preserve"> </text>
|
||||
<path
|
||||
id="path3768"
|
||||
d="m 53.175776,114.3 0,22.37812 160.127334,0 0,-22.37812 z"
|
||||
clip-path="url(#clipEmfPath2)"
|
||||
style="fill:none;stroke:#000000;stroke-width:1.24689317px;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
inkscape:connector-curvature="0" />
|
||||
<text
|
||||
id="text3772"
|
||||
style="font-size:12.45018196px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New"
|
||||
y="128.85001"
|
||||
x="204.603"
|
||||
xml:space="preserve"> </text>
|
||||
<text
|
||||
id="text3774"
|
||||
style="font-size:12.45018196px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial"
|
||||
y="158.85001"
|
||||
x="57.45084"
|
||||
xml:space="preserve"> </text>
|
||||
<path
|
||||
id="path3776"
|
||||
d="m 280.56035,62.94375 -0.59064,-22.621875 c -0.009,-0.346875 0.26251,-0.6375 0.60939,-0.646875 0.34688,-0.0094 0.62813,0.2625 0.63751,0.609375 l 0.59063,22.63125 c 0.009,0.346875 -0.2625,0.628125 -0.60938,0.6375 -0.34688,0.0094 -0.62814,-0.2625 -0.63751,-0.609375 z m -3.68443,-21.290625 3.55317,-7.603125 3.94694,7.40625 z"
|
||||
clip-path="url(#clipEmfPath3)"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.1500022px;stroke-linecap:butt;stroke-linejoin:bevel;stroke-opacity:1;stroke-dasharray:none"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
id="path3778"
|
||||
d="m 185.00124,121.96729 0,23.4375 191.2528,0 0,-23.4375 z"
|
||||
style="fill:none;stroke:#000000;stroke-width:1.25626838px;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
inkscape:connector-curvature="0" />
|
||||
<text
|
||||
id="text3780"
|
||||
style="font-size:12.45018196px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New"
|
||||
y="135.98123"
|
||||
x="213.3766"
|
||||
xml:space="preserve">BOPAlgo_PaveFiller</text>
|
||||
<text
|
||||
id="text3782"
|
||||
style="font-size:12.45018196px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New"
|
||||
y="79.199997"
|
||||
x="351.30511"
|
||||
xml:space="preserve"> </text>
|
||||
<text
|
||||
id="text3784"
|
||||
style="font-size:12.45018196px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New"
|
||||
y="108.3"
|
||||
x="188.70276"
|
||||
xml:space="preserve"> </text>
|
||||
<path
|
||||
id="path3786"
|
||||
d="m 198.98728,113.10938 20.70968,-20.700005 c 0.24375,-0.24375 0.63751,-0.24375 0.88126,0 0.24375,0.24375 0.24375,0.6375 0,0.88125 L 199.87792,114 c -0.24376,0.24375 -0.64689,0.24375 -0.89064,0 -0.24375,-0.24375 -0.24375,-0.64688 0,-0.89062 z m 17.61588,-22.031255 7.95012,-2.653125 -2.64379,7.959375 z"
|
||||
clip-path="url(#clipEmfPath4)"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.1500022px;stroke-linecap:butt;stroke-linejoin:bevel;stroke-opacity:1;stroke-dasharray:none"
|
||||
inkscape:connector-curvature="0" />
|
||||
<text
|
||||
id="text3794"
|
||||
style="font-size:12.45018196px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New"
|
||||
y="128.55"
|
||||
x="480.30701"
|
||||
xml:space="preserve"> </text>
|
||||
<text
|
||||
id="text3796"
|
||||
style="font-size:12.45018196px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial"
|
||||
y="158.39999"
|
||||
x="318.75464"
|
||||
xml:space="preserve"> </text>
|
||||
<path
|
||||
style="fill:#916f6f;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#Arrow2Mstart)"
|
||||
d="m 281.70806,91.744904 0,30.398036"
|
||||
id="path3875"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 8.9 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 13 KiB |
@@ -15,7 +15,7 @@
|
||||
#ifndef _GeoAlgo_Sol_HeaderFile
|
||||
#define _GeoAlgo_Sol_HeaderFile
|
||||
|
||||
#ifndef _Handle_Geom_BSplineSurface_HeaderFile
|
||||
#ifndef _Geom_BSplineSurface_HeaderFile
|
||||
#include <Geom_BSplineSurface.hxx>
|
||||
#endif
|
||||
#ifndef _Standard_Boolean_HeaderFile
|
||||
|
@@ -462,10 +462,10 @@
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\src\Handle_TOcaf_Application.hxx" />
|
||||
<ClInclude Include="..\..\..\src\Handle_TOcafFunction_BoxDriver.hxx" />
|
||||
<ClInclude Include="..\..\..\src\Handle_TOcafFunction_CutDriver.hxx" />
|
||||
<ClInclude Include="..\..\..\src\Handle_TOcafFunction_CylDriver.hxx" />
|
||||
<ClInclude Include="..\..\..\src\TOcaf_Application.hxx" />
|
||||
<ClInclude Include="..\..\..\src\TOcafFunction_BoxDriver.hxx" />
|
||||
<ClInclude Include="..\..\..\src\TOcafFunction_CutDriver.hxx" />
|
||||
<ClInclude Include="..\..\..\src\TOcafFunction_CylDriver.hxx" />
|
||||
<ClInclude Include="..\..\..\src\NewBoxDlg.h" />
|
||||
<ClInclude Include="..\..\..\src\NewCylDlg.h" />
|
||||
<ClInclude Include="..\..\..\src\OcafApp.h" />
|
||||
|
@@ -58,16 +58,16 @@
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\src\Handle_TOcaf_Application.hxx">
|
||||
<ClInclude Include="..\..\..\src\TOcaf_Application.hxx">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\Handle_TOcafFunction_BoxDriver.hxx">
|
||||
<ClInclude Include="..\..\..\src\TOcafFunction_BoxDriver.hxx">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\Handle_TOcafFunction_CutDriver.hxx">
|
||||
<ClInclude Include="..\..\..\src\TOcafFunction_CutDriver.hxx">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\Handle_TOcafFunction_CylDriver.hxx">
|
||||
<ClInclude Include="..\..\..\src\TOcafFunction_CylDriver.hxx">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\NewBoxDlg.h">
|
||||
|
@@ -34,6 +34,9 @@
|
||||
#define OPERATION_NOT_DONE 8
|
||||
#define NULL_OPERATION 9
|
||||
|
||||
// OCCT RTTI
|
||||
IMPLEMENT_STANDARD_RTTIEXT (OCAFSample_CommonDriver, OCAFSample_Driver)
|
||||
|
||||
//=======================================================================
|
||||
//function : Constructor
|
||||
//purpose :
|
||||
|
@@ -16,84 +16,22 @@
|
||||
#ifndef _OCAFSample_CommonDriver_HeaderFile
|
||||
#define _OCAFSample_CommonDriver_HeaderFile
|
||||
|
||||
#ifndef _Standard_HeaderFile
|
||||
#include <Standard.hxx>
|
||||
#endif
|
||||
#ifndef _Handle_OCAFSample_CommonDriver_HeaderFile
|
||||
#endif
|
||||
|
||||
#ifndef _OCAFSample_Driver_HeaderFile
|
||||
#include <Standard_Type.hxx>
|
||||
#include <OCAFSample_Driver.hxx>
|
||||
#endif
|
||||
#ifndef _Standard_Integer_HeaderFile
|
||||
#include <Standard_Integer.hxx>
|
||||
#endif
|
||||
|
||||
class TFunction_Logbook;
|
||||
|
||||
|
||||
class OCAFSample_CommonDriver : public OCAFSample_Driver {
|
||||
|
||||
class OCAFSample_CommonDriver : public OCAFSample_Driver
|
||||
{
|
||||
public:
|
||||
|
||||
inline void* operator new(size_t,void* anAddress)
|
||||
{
|
||||
return anAddress;
|
||||
}
|
||||
inline void* operator new(size_t size)
|
||||
{
|
||||
return Standard::Allocate(size);
|
||||
}
|
||||
inline void operator delete(void *anAddress)
|
||||
{
|
||||
if (anAddress) Standard::Free((Standard_Address&)anAddress);
|
||||
}
|
||||
// inline void operator delete(void *anAddress, size_t size)
|
||||
// {
|
||||
// if (anAddress) Standard::Free((Standard_Address&)anAddress,size);
|
||||
// }
|
||||
// Methods PUBLIC
|
||||
//
|
||||
Standard_EXPORT OCAFSample_CommonDriver();
|
||||
Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& theLogbook) const;
|
||||
Standard_EXPORT ~OCAFSample_CommonDriver();
|
||||
|
||||
|
||||
|
||||
|
||||
// Type management
|
||||
//
|
||||
Standard_EXPORT friend Handle(Standard_Type)& OCAFSample_CommonDriver_Type_();
|
||||
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
|
||||
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
|
||||
|
||||
protected:
|
||||
|
||||
// Methods PROTECTED
|
||||
//
|
||||
|
||||
|
||||
// Fields PROTECTED
|
||||
//
|
||||
|
||||
|
||||
private:
|
||||
|
||||
// Methods PRIVATE
|
||||
//
|
||||
|
||||
|
||||
// Fields PRIVATE
|
||||
//
|
||||
|
||||
Standard_EXPORT OCAFSample_CommonDriver ();
|
||||
Standard_EXPORT virtual Standard_Integer Execute (Handle (TFunction_Logbook)& theLogbook) const;
|
||||
Standard_EXPORT ~OCAFSample_CommonDriver ();
|
||||
|
||||
// OCCT RTTI
|
||||
DEFINE_STANDARD_RTTIEXT (OCAFSample_CommonDriver, OCAFSample_Driver)
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// other inline functions and methods (like "C++: function call" methods)
|
||||
//
|
||||
|
||||
|
||||
#endif
|
||||
|
@@ -16,92 +16,29 @@
|
||||
#ifndef _OCAFSample_Driver_HeaderFile
|
||||
#define _OCAFSample_Driver_HeaderFile
|
||||
|
||||
#ifndef _Standard_HeaderFile
|
||||
#include <Standard.hxx>
|
||||
#endif
|
||||
#ifndef _Handle_OCAFSample_Driver_HeaderFile
|
||||
#endif
|
||||
|
||||
#ifndef _TFunction_Driver_HeaderFile
|
||||
#include <TFunction_Driver.hxx>
|
||||
#endif
|
||||
#ifndef _Standard_Boolean_HeaderFile
|
||||
#include <Standard_Boolean.hxx>
|
||||
#endif
|
||||
#ifndef _Standard_Integer_HeaderFile
|
||||
#include <Standard_Integer.hxx>
|
||||
#endif
|
||||
class TFunction_Logbook;
|
||||
#include <TDF_LabelMap.hxx>
|
||||
|
||||
class TFunction_Logbook;
|
||||
|
||||
class OCAFSample_Driver : public TFunction_Driver {
|
||||
|
||||
class OCAFSample_Driver : public TFunction_Driver
|
||||
{
|
||||
public:
|
||||
|
||||
inline void* operator new(size_t,void* anAddress)
|
||||
{
|
||||
return anAddress;
|
||||
}
|
||||
inline void* operator new(size_t size)
|
||||
{
|
||||
return Standard::Allocate(size);
|
||||
}
|
||||
inline void operator delete(void *anAddress)
|
||||
{
|
||||
if (anAddress) Standard::Free((Standard_Address&)anAddress);
|
||||
}
|
||||
// inline void operator delete(void *anAddress, size_t size)
|
||||
// {
|
||||
// if (anAddress) Standard::Free((Standard_Address&)anAddress,size);
|
||||
// }
|
||||
// Methods PUBLIC
|
||||
//
|
||||
Standard_EXPORT void Validate(TFunction_Logbook& log) const;
|
||||
Standard_EXPORT virtual Standard_Boolean MustExecute(const Handle(TFunction_Logbook)& log) const;
|
||||
Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
|
||||
Standard_EXPORT virtual Standard_Boolean Arguments(TDF_LabelMap& theArgs) const;
|
||||
Standard_EXPORT virtual Standard_Boolean Results(TDF_LabelMap& theRes) const;
|
||||
Standard_EXPORT ~OCAFSample_Driver();
|
||||
Standard_EXPORT void Validate (TFunction_Logbook& log) const;
|
||||
Standard_EXPORT virtual Standard_Boolean MustExecute (const Handle (TFunction_Logbook)& log) const;
|
||||
Standard_EXPORT virtual Standard_Integer Execute (Handle (TFunction_Logbook)& log) const;
|
||||
Standard_EXPORT virtual Standard_Boolean Arguments (TDF_LabelMap& theArgs) const;
|
||||
Standard_EXPORT virtual Standard_Boolean Results (TDF_LabelMap& theRes) const;
|
||||
Standard_EXPORT ~OCAFSample_Driver ();
|
||||
|
||||
|
||||
|
||||
|
||||
// Type management
|
||||
//
|
||||
Standard_EXPORT friend Handle(Standard_Type)& OCAFSample_Driver_Type_();
|
||||
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
|
||||
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
|
||||
// OCCT RTTI
|
||||
DEFINE_STANDARD_RTTIEXT(OCAFSample_Driver,TFunction_Driver)
|
||||
|
||||
protected:
|
||||
|
||||
// Methods PROTECTED
|
||||
//
|
||||
Standard_EXPORT OCAFSample_Driver();
|
||||
|
||||
|
||||
// Fields PROTECTED
|
||||
//
|
||||
|
||||
|
||||
private:
|
||||
|
||||
// Methods PRIVATE
|
||||
//
|
||||
|
||||
|
||||
// Fields PRIVATE
|
||||
//
|
||||
|
||||
|
||||
Standard_EXPORT OCAFSample_Driver ();
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// other inline functions and methods (like "C++: function call" methods)
|
||||
//
|
||||
|
||||
|
||||
#endif
|
||||
|
@@ -1,68 +0,0 @@
|
||||
// File generated by CPPExt (Transient)
|
||||
// Copyright (C) 1991,1995 by
|
||||
//
|
||||
// MATRA DATAVISION, FRANCE
|
||||
//
|
||||
// This software is furnished in accordance with the terms and conditions
|
||||
// of the contract and with the inclusion of the above copyright notice.
|
||||
// This software or any other copy thereof may not be provided or otherwise
|
||||
// be made available to any other person. No title to an ownership of the
|
||||
// software is hereby transferred.
|
||||
//
|
||||
// At the termination of the contract, the software and all copies of this
|
||||
// software must be deleted.
|
||||
//
|
||||
#include <OCAFSample_Driver.jxx>
|
||||
|
||||
#ifndef _Standard_TypeMismatch_HeaderFile
|
||||
#include <Standard_TypeMismatch.hxx>
|
||||
#endif
|
||||
|
||||
OCAFSample_Driver::~OCAFSample_Driver() {}
|
||||
|
||||
|
||||
|
||||
Standard_EXPORT Handle_Standard_Type& OCAFSample_Driver_Type_()
|
||||
{
|
||||
|
||||
static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver);
|
||||
if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver);
|
||||
static Handle_Standard_Type aType2 = STANDARD_TYPE(Standard_Transient);
|
||||
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(Standard_Transient);
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("OCAFSample_Driver",
|
||||
sizeof(OCAFSample_Driver),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
|
||||
return _aType;
|
||||
}
|
||||
|
||||
|
||||
// DownCast method
|
||||
// allow safe downcasting
|
||||
//
|
||||
const Handle(OCAFSample_Driver) Handle(OCAFSample_Driver)::DownCast(const Handle(Standard_Transient)& AnObject)
|
||||
{
|
||||
Handle(OCAFSample_Driver) _anOtherObject;
|
||||
|
||||
if (!AnObject.IsNull()) {
|
||||
if (AnObject->IsKind(STANDARD_TYPE(OCAFSample_Driver))) {
|
||||
_anOtherObject = Handle(OCAFSample_Driver)((Handle(OCAFSample_Driver)&)AnObject);
|
||||
}
|
||||
}
|
||||
|
||||
return _anOtherObject ;
|
||||
}
|
||||
const Handle(Standard_Type)& OCAFSample_Driver::DynamicType() const
|
||||
{
|
||||
return STANDARD_TYPE(OCAFSample_Driver) ;
|
||||
}
|
||||
Standard_Boolean OCAFSample_Driver::IsKind(const Handle(Standard_Type)& AType) const
|
||||
{
|
||||
return (STANDARD_TYPE(OCAFSample_Driver) == AType || TFunction_Driver::IsKind(AType));
|
||||
}
|
||||
Handle_OCAFSample_Driver::~Handle_OCAFSample_Driver() {}
|
||||
|
@@ -1,9 +0,0 @@
|
||||
#ifndef _TFunction_Logbook_HeaderFile
|
||||
#include <TFunction_Logbook.hxx>
|
||||
#endif
|
||||
#ifndef _TDF_LabelMap_HeaderFile
|
||||
#include <TDF_LabelMap.hxx>
|
||||
#endif
|
||||
#ifndef _OCAFSample_Driver_HeaderFile
|
||||
#include <OCAFSample_Driver.hxx>
|
||||
#endif
|
@@ -10,7 +10,6 @@
|
||||
|
||||
#include <OCC_App.h>
|
||||
#include "OcafDoc.h"
|
||||
#include "TOCAF_Application.hxx"
|
||||
#include <TOcaf_Application.hxx>
|
||||
|
||||
|
||||
|
@@ -12,6 +12,8 @@
|
||||
#include "BRepPrimAPI_MakeBox.hxx"
|
||||
#include "TNaming_Builder.hxx"
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT (TOcafFunction_BoxDriver, TFunction_Driver)
|
||||
|
||||
//=======================================================================
|
||||
//function : GetID
|
||||
//purpose :
|
||||
@@ -118,32 +120,3 @@ Standard_Integer TOcafFunction_BoxDriver::Execute(Handle(TFunction_Logbook)& /*l
|
||||
// If there are no any mistakes we return 0:
|
||||
return 0;
|
||||
}
|
||||
|
||||
TOcafFunction_BoxDriver::~TOcafFunction_BoxDriver() {}
|
||||
|
||||
// DownCast method
|
||||
// allow safe downcasting
|
||||
//
|
||||
const Handle(TOcafFunction_BoxDriver) TOcafFunction_BoxDriver::DownCast(const Handle(Standard_Transient)& AnObject)
|
||||
{
|
||||
Handle(TOcafFunction_BoxDriver) _anOtherObject;
|
||||
|
||||
if (!AnObject.IsNull()) {
|
||||
if (AnObject->IsKind(STANDARD_TYPE(TOcafFunction_BoxDriver))) {
|
||||
_anOtherObject = Handle(TOcafFunction_BoxDriver)::DownCast (AnObject);
|
||||
}
|
||||
}
|
||||
|
||||
return _anOtherObject ;
|
||||
}
|
||||
const Handle(Standard_Type)& TOcafFunction_BoxDriver::DynamicType() const
|
||||
{
|
||||
return STANDARD_TYPE(TOcafFunction_BoxDriver) ;
|
||||
}
|
||||
Standard_Boolean TOcafFunction_BoxDriver::IsKind(const Handle(Standard_Type)& AType) const
|
||||
{
|
||||
return (STANDARD_TYPE(TOcafFunction_BoxDriver) == AType || TFunction_Driver::IsKind(AType));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@@ -31,74 +31,19 @@
|
||||
#endif
|
||||
class TFunction_Logbook;
|
||||
|
||||
|
||||
class TOcafFunction_BoxDriver : public TFunction_Driver {
|
||||
|
||||
class TOcafFunction_BoxDriver : public TFunction_Driver
|
||||
{
|
||||
public:
|
||||
|
||||
inline void* operator new(size_t,void* anAddress)
|
||||
{
|
||||
return anAddress;
|
||||
}
|
||||
inline void* operator new(size_t size)
|
||||
{
|
||||
return Standard::Allocate(size);
|
||||
}
|
||||
inline void operator delete(void *anAddress)
|
||||
{
|
||||
if (anAddress) Standard::Free((Standard_Address&)anAddress);
|
||||
}
|
||||
// inline void operator delete(void *anAddress, size_t size)
|
||||
// {
|
||||
// if (anAddress) Standard::Free((Standard_Address&)anAddress,size);
|
||||
// }
|
||||
// Methods PUBLIC
|
||||
//
|
||||
Standard_EXPORT static const Standard_GUID& GetID() ;
|
||||
Standard_EXPORT TOcafFunction_BoxDriver();
|
||||
Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)& log) const;
|
||||
Standard_EXPORT virtual Standard_Boolean MustExecute(const Handle(TFunction_Logbook)& log) const;
|
||||
Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
|
||||
Standard_EXPORT ~TOcafFunction_BoxDriver();
|
||||
|
||||
|
||||
|
||||
|
||||
// Type management
|
||||
//
|
||||
//Standard_EXPORT friend Handle(Standard_Type)& TOcafFunction_BoxDriver_Type_();
|
||||
Standard_EXPORT const Handle(TOcafFunction_BoxDriver) DownCast(const Handle(Standard_Transient)& AnObject);
|
||||
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
|
||||
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
|
||||
|
||||
protected:
|
||||
|
||||
// Methods PROTECTED
|
||||
//
|
||||
|
||||
|
||||
// Fields PROTECTED
|
||||
//
|
||||
|
||||
|
||||
private:
|
||||
|
||||
// Methods PRIVATE
|
||||
//
|
||||
|
||||
|
||||
// Fields PRIVATE
|
||||
//
|
||||
|
||||
Standard_EXPORT static const Standard_GUID& GetID ();
|
||||
Standard_EXPORT TOcafFunction_BoxDriver ();
|
||||
Standard_EXPORT virtual void Validate (Handle (TFunction_Logbook)& log) const;
|
||||
Standard_EXPORT virtual Standard_Boolean MustExecute (const Handle (TFunction_Logbook)& log) const;
|
||||
Standard_EXPORT virtual Standard_Integer Execute (Handle (TFunction_Logbook)& log) const;
|
||||
|
||||
// OCCT RTTI
|
||||
DEFINE_STANDARD_RTTIEXT(TOcafFunction_BoxDriver,TFunction_Driver)
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// other inline functions and methods (like "C++: function call" methods)
|
||||
//
|
||||
|
||||
|
||||
#endif
|
||||
|
@@ -17,6 +17,8 @@
|
||||
#include "TFunction_Logbook.hxx"
|
||||
#include "TDF_Reference.hxx"
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT (TOcafFunction_CutDriver, TFunction_Driver)
|
||||
|
||||
//=======================================================================
|
||||
//function : GetID
|
||||
//purpose :
|
||||
@@ -139,32 +141,3 @@ Standard_Integer TOcafFunction_CutDriver::Execute(Handle(TFunction_Logbook)& /*l
|
||||
// If there are no any mistakes we return 0:
|
||||
return 0;
|
||||
}
|
||||
|
||||
TOcafFunction_CutDriver::~TOcafFunction_CutDriver() {}
|
||||
|
||||
// DownCast method
|
||||
// allow safe downcasting
|
||||
//
|
||||
const Handle(TOcafFunction_CutDriver) TOcafFunction_CutDriver::DownCast(const Handle(Standard_Transient)& AnObject)
|
||||
{
|
||||
Handle(TOcafFunction_CutDriver) _anOtherObject;
|
||||
|
||||
if (!AnObject.IsNull()) {
|
||||
if (AnObject->IsKind(STANDARD_TYPE(TOcafFunction_CutDriver))) {
|
||||
_anOtherObject = Handle(TOcafFunction_CutDriver)::DownCast (AnObject);
|
||||
}
|
||||
}
|
||||
|
||||
return _anOtherObject ;
|
||||
}
|
||||
const Handle(Standard_Type)& TOcafFunction_CutDriver::DynamicType() const
|
||||
{
|
||||
return STANDARD_TYPE(TOcafFunction_CutDriver) ;
|
||||
}
|
||||
Standard_Boolean TOcafFunction_CutDriver::IsKind(const Handle(Standard_Type)& AType) const
|
||||
{
|
||||
return (STANDARD_TYPE(TOcafFunction_CutDriver) == AType || TFunction_Driver::IsKind(AType));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@@ -32,73 +32,18 @@
|
||||
class TFunction_Logbook;
|
||||
|
||||
|
||||
class TOcafFunction_CutDriver : public TFunction_Driver {
|
||||
|
||||
class TOcafFunction_CutDriver : public TFunction_Driver
|
||||
{
|
||||
public:
|
||||
|
||||
inline void* operator new(size_t,void* anAddress)
|
||||
{
|
||||
return anAddress;
|
||||
}
|
||||
inline void* operator new(size_t size)
|
||||
{
|
||||
return Standard::Allocate(size);
|
||||
}
|
||||
inline void operator delete(void *anAddress)
|
||||
{
|
||||
if (anAddress) Standard::Free((Standard_Address&)anAddress);
|
||||
}
|
||||
// inline void operator delete(void *anAddress, size_t size)
|
||||
// {
|
||||
// if (anAddress) Standard::Free((Standard_Address&)anAddress,size);
|
||||
// }
|
||||
// Methods PUBLIC
|
||||
//
|
||||
Standard_EXPORT static const Standard_GUID& GetID() ;
|
||||
Standard_EXPORT TOcafFunction_CutDriver();
|
||||
Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)& log) const;
|
||||
Standard_EXPORT virtual Standard_Boolean MustExecute(const Handle(TFunction_Logbook)& log) const;
|
||||
Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
|
||||
Standard_EXPORT ~TOcafFunction_CutDriver();
|
||||
|
||||
|
||||
|
||||
|
||||
// Type management
|
||||
//
|
||||
//Standard_EXPORT friend Handle(Standard_Type)& TOcafFunction_CutDriver_Type_();
|
||||
Standard_EXPORT const Handle(TOcafFunction_CutDriver) DownCast(const Handle(Standard_Transient)& AnObject);
|
||||
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
|
||||
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
|
||||
|
||||
protected:
|
||||
|
||||
// Methods PROTECTED
|
||||
//
|
||||
|
||||
|
||||
// Fields PROTECTED
|
||||
//
|
||||
|
||||
|
||||
private:
|
||||
|
||||
// Methods PRIVATE
|
||||
//
|
||||
|
||||
|
||||
// Fields PRIVATE
|
||||
//
|
||||
|
||||
Standard_EXPORT static const Standard_GUID& GetID() ;
|
||||
Standard_EXPORT TOcafFunction_CutDriver ();
|
||||
Standard_EXPORT virtual void Validate (Handle (TFunction_Logbook)& log) const;
|
||||
Standard_EXPORT virtual Standard_Boolean MustExecute (const Handle (TFunction_Logbook)& log) const;
|
||||
Standard_EXPORT virtual Standard_Integer Execute (Handle (TFunction_Logbook)& log) const;
|
||||
|
||||
// OCCT RTTI
|
||||
DEFINE_STANDARD_RTTIEXT(TOcafFunction_CutDriver,TFunction_Driver)
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// other inline functions and methods (like "C++: function call" methods)
|
||||
//
|
||||
|
||||
|
||||
#endif
|
||||
|
@@ -13,6 +13,7 @@
|
||||
#include "TDataStd_Real.hxx"
|
||||
#include "TNaming_Builder.hxx"
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT (TOcafFunction_CylDriver, TFunction_Driver)
|
||||
|
||||
//=======================================================================
|
||||
//function : GetID
|
||||
@@ -113,32 +114,3 @@ Standard_Integer TOcafFunction_CylDriver::Execute(Handle(TFunction_Logbook)& /*l
|
||||
// If there are no any mistakes we return 0:
|
||||
return 0;
|
||||
}
|
||||
|
||||
TOcafFunction_CylDriver::~TOcafFunction_CylDriver() {}
|
||||
|
||||
// DownCast method
|
||||
// allow safe downcasting
|
||||
//
|
||||
const Handle(TOcafFunction_CylDriver) TOcafFunction_CylDriver::DownCast(const Handle(Standard_Transient)& AnObject)
|
||||
{
|
||||
Handle(TOcafFunction_CylDriver) _anOtherObject;
|
||||
|
||||
if (!AnObject.IsNull()) {
|
||||
if (AnObject->IsKind(STANDARD_TYPE(TOcafFunction_CylDriver))) {
|
||||
_anOtherObject = Handle(TOcafFunction_CylDriver)::DownCast (AnObject);
|
||||
}
|
||||
}
|
||||
|
||||
return _anOtherObject ;
|
||||
}
|
||||
const Handle(Standard_Type)& TOcafFunction_CylDriver::DynamicType() const
|
||||
{
|
||||
return STANDARD_TYPE(TOcafFunction_CylDriver) ;
|
||||
}
|
||||
Standard_Boolean TOcafFunction_CylDriver::IsKind(const Handle(Standard_Type)& AType) const
|
||||
{
|
||||
return (STANDARD_TYPE(TOcafFunction_CylDriver) == AType || TFunction_Driver::IsKind(AType));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@@ -32,73 +32,18 @@
|
||||
class TFunction_Logbook;
|
||||
|
||||
|
||||
class TOcafFunction_CylDriver : public TFunction_Driver {
|
||||
|
||||
class TOcafFunction_CylDriver : public TFunction_Driver
|
||||
{
|
||||
public:
|
||||
|
||||
inline void* operator new(size_t,void* anAddress)
|
||||
{
|
||||
return anAddress;
|
||||
}
|
||||
inline void* operator new(size_t size)
|
||||
{
|
||||
return Standard::Allocate(size);
|
||||
}
|
||||
inline void operator delete(void *anAddress)
|
||||
{
|
||||
if (anAddress) Standard::Free((Standard_Address&)anAddress);
|
||||
}
|
||||
// inline void operator delete(void *anAddress, size_t size)
|
||||
// {
|
||||
// if (anAddress) Standard::Free((Standard_Address&)anAddress,size);
|
||||
// }
|
||||
// Methods PUBLIC
|
||||
//
|
||||
Standard_EXPORT static const Standard_GUID& GetID() ;
|
||||
Standard_EXPORT TOcafFunction_CylDriver();
|
||||
Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)& log) const;
|
||||
Standard_EXPORT virtual Standard_Boolean MustExecute(const Handle(TFunction_Logbook)& log) const;
|
||||
Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
|
||||
Standard_EXPORT ~TOcafFunction_CylDriver();
|
||||
|
||||
|
||||
|
||||
|
||||
// Type management
|
||||
//
|
||||
//Standard_EXPORT friend Handle(Standard_Type)& TOcafFunction_CylDriver_Type_();
|
||||
Standard_EXPORT const Handle(TOcafFunction_CylDriver) DownCast(const Handle(Standard_Transient)& AnObject);
|
||||
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
|
||||
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
|
||||
|
||||
protected:
|
||||
|
||||
// Methods PROTECTED
|
||||
//
|
||||
|
||||
|
||||
// Fields PROTECTED
|
||||
//
|
||||
|
||||
|
||||
private:
|
||||
|
||||
// Methods PRIVATE
|
||||
//
|
||||
|
||||
|
||||
// Fields PRIVATE
|
||||
//
|
||||
|
||||
Standard_EXPORT static const Standard_GUID& GetID ();
|
||||
Standard_EXPORT TOcafFunction_CylDriver ();
|
||||
Standard_EXPORT virtual void Validate (Handle (TFunction_Logbook)& log) const;
|
||||
Standard_EXPORT virtual Standard_Boolean MustExecute (const Handle (TFunction_Logbook)& log) const;
|
||||
Standard_EXPORT virtual Standard_Integer Execute (Handle (TFunction_Logbook)& log) const;
|
||||
|
||||
// OCCT RTTI
|
||||
DEFINE_STANDARD_RTTIEXT(TOcafFunction_CylDriver,TFunction_Driver)
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// other inline functions and methods (like "C++: function call" methods)
|
||||
//
|
||||
|
||||
|
||||
#endif
|
||||
|
@@ -5,7 +5,7 @@
|
||||
//Modified by Sergey RUIN (An instanciation of the drivers)
|
||||
|
||||
#include <stdafx.h>
|
||||
#include <TOcaf_Application.ixx>
|
||||
#include <TOcaf_Application.hxx>
|
||||
#include <TDF_Label.hxx>
|
||||
#include <TPrsStd_AISPresentation.hxx>
|
||||
#include <TPrsStd_AISViewer.hxx>
|
||||
@@ -15,6 +15,8 @@
|
||||
#include "TOcafFunction_CylDriver.hxx"
|
||||
#include "TOcafFunction_CutDriver.hxx"
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT (TOcaf_Application, TDocStd_Application)
|
||||
|
||||
//=======================================================================
|
||||
//function : TOcaf_Application
|
||||
//purpose :
|
||||
|
@@ -26,49 +26,13 @@
|
||||
class TDocStd_Document;
|
||||
|
||||
|
||||
class TOcaf_Application : public TDocStd_Application {
|
||||
|
||||
class TOcaf_Application : public TDocStd_Application
|
||||
{
|
||||
public:
|
||||
Standard_EXPORT TOcaf_Application ();
|
||||
|
||||
// Methods PUBLIC
|
||||
//
|
||||
Standard_EXPORT TOcaf_Application();
|
||||
|
||||
// Type management
|
||||
//
|
||||
//Standard_EXPORT friend Handle(Standard_Type)& TOcaf_Application_Type_();
|
||||
Standard_EXPORT const Handle(TOcaf_Application) DownCast(const Handle(Standard_Transient)& AnObject);
|
||||
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
|
||||
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
|
||||
|
||||
protected:
|
||||
|
||||
// Methods PROTECTED
|
||||
//
|
||||
|
||||
|
||||
// Fields PROTECTED
|
||||
//
|
||||
|
||||
|
||||
private:
|
||||
|
||||
// Methods PRIVATE
|
||||
//
|
||||
|
||||
|
||||
// Fields PRIVATE
|
||||
//
|
||||
|
||||
|
||||
// OCCT RTTI
|
||||
DEFINE_STANDARD_RTTIEXT (TOcaf_Application, TDocStd_Application)
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// other inline functions and methods (like "C++: function call" methods)
|
||||
//
|
||||
|
||||
|
||||
#endif
|
||||
|
@@ -1,45 +0,0 @@
|
||||
// File generated by CPPExt (Transient)
|
||||
// Copyright (C) 1991,1995 by
|
||||
//
|
||||
// MATRA DATAVISION, FRANCE
|
||||
//
|
||||
// This software is furnished in accordance with the terms and conditions
|
||||
// of the contract and with the inclusion of the above copyright notice.
|
||||
// This software or any other copy thereof may not be provided or otherwise
|
||||
// be made available to any other person. No title to an ownership of the
|
||||
// software is hereby transferred.
|
||||
//
|
||||
// At the termination of the contract, the software and all copies of this
|
||||
// software must be deleted.
|
||||
//
|
||||
#include <TOcaf_Application.jxx>
|
||||
|
||||
#ifndef _Standard_TypeMismatch_HeaderFile
|
||||
#include <Standard_TypeMismatch.hxx>
|
||||
#endif
|
||||
|
||||
// DownCast method
|
||||
// allow safe downcasting
|
||||
//
|
||||
const Handle(TOcaf_Application) TOcaf_Application::DownCast(const Handle(Standard_Transient)& AnObject)
|
||||
{
|
||||
Handle(TOcaf_Application) _anOtherObject;
|
||||
|
||||
if (!AnObject.IsNull()) {
|
||||
if (AnObject->IsKind(STANDARD_TYPE(TOcaf_Application))) {
|
||||
_anOtherObject = Handle(TOcaf_Application)((Handle(TOcaf_Application)&)AnObject);
|
||||
}
|
||||
}
|
||||
|
||||
return _anOtherObject ;
|
||||
}
|
||||
const Handle(Standard_Type)& TOcaf_Application::DynamicType() const
|
||||
{
|
||||
return STANDARD_TYPE(TOcaf_Application) ;
|
||||
}
|
||||
Standard_Boolean TOcaf_Application::IsKind(const Handle(Standard_Type)& AType) const
|
||||
{
|
||||
return (STANDARD_TYPE(TOcaf_Application) == AType || TDocStd_Application::IsKind(AType));
|
||||
}
|
||||
|
||||
|
@@ -1,9 +0,0 @@
|
||||
#ifndef _TColStd_SequenceOfExtendedString_HeaderFile
|
||||
#include <TColStd_SequenceOfExtendedString.hxx>
|
||||
#endif
|
||||
#ifndef _TDocStd_Document_HeaderFile
|
||||
#include <TDocStd_Document.hxx>
|
||||
#endif
|
||||
#ifndef _TOcaf_Application_HeaderFile
|
||||
#include <TOcaf_Application.hxx>
|
||||
#endif
|
@@ -1,8 +1,8 @@
|
||||
@echo off
|
||||
|
||||
call "custom.bat" %1 %2 %3
|
||||
|
||||
call "%~dp0..\..\..\env.bat" %1 %2 %3
|
||||
|
||||
call "custom.bat" %1 %2 %3
|
||||
|
||||
set "PATH=%QTDIR%/bin;%PATH%"
|
||||
set "QT_QPA_PLATFORM_PLUGIN_PATH=%QTDIR%\plugins\platforms"
|
@@ -1,9 +1,9 @@
|
||||
@echo off
|
||||
|
||||
call "custom.bat" %1 %2 %3
|
||||
|
||||
call "%~dp0..\..\..\env.bat" %1 %2 %3
|
||||
|
||||
call "custom.bat" %1 %2 %3
|
||||
|
||||
set "RES_DIR=%~dp0win%ARCH%\%VCVER%\res"
|
||||
set "CSF_ResourcesDefaults=%RES_DIR%"
|
||||
set "CSF_IEResourcesDefaults=%RES_DIR%"
|
||||
|
@@ -1,9 +1,9 @@
|
||||
@echo off
|
||||
|
||||
call "custom.bat" %1 %2 %3
|
||||
|
||||
call "%~dp0..\..\..\env.bat" %1 %2 %3
|
||||
|
||||
call "custom.bat" %1 %2 %3
|
||||
|
||||
set "RES_DIR=%~dp0win%ARCH%\%VCVER%\res"
|
||||
set "CSF_ResourcesDefaults=%RES_DIR%"
|
||||
set "CSF_TutorialResourcesDefaults=%RES_DIR%"
|
||||
|
@@ -2336,6 +2336,9 @@ void AIS_InteractiveContext::EraseGlobal (const Handle(AIS_InteractiveObject)& t
|
||||
clearDynamicHighlight();
|
||||
}
|
||||
|
||||
// make sure highlighting presentations are properly erased
|
||||
theIObj->ErasePresentations (false);
|
||||
|
||||
if (IsSelected (theIObj)
|
||||
&& aStatus->DisplayMode() != aDispMode)
|
||||
{
|
||||
@@ -2396,6 +2399,7 @@ void AIS_InteractiveContext::ClearGlobal (const Handle(AIS_InteractiveObject)& t
|
||||
unhighlightOwners (theIObj);
|
||||
|
||||
myMainPM->Erase (theIObj, -1);
|
||||
theIObj->ErasePresentations (true); // make sure highlighting presentations are properly erased
|
||||
|
||||
// Object removes from Detected sequence
|
||||
Standard_DISABLE_DEPRECATION_WARNINGS
|
||||
@@ -2611,11 +2615,9 @@ Standard_Boolean AIS_InteractiveContext::IsoOnTriangulation() const
|
||||
return myDefaultDrawer->IsoOnTriangulation();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetPixelTolerance
|
||||
//purpose : Disables the mechanism of adaptive tolerance calculation in
|
||||
// SelectMgr_ViewerSelector and sets the given tolerance for ALL
|
||||
// sensitive entities activated. For more information, see
|
||||
// SelectMgr_ViewerSelector.hxx
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void AIS_InteractiveContext::SetPixelTolerance (const Standard_Integer thePrecision)
|
||||
{
|
||||
@@ -2781,24 +2783,6 @@ Standard_Boolean AIS_InteractiveContext::PlaneSize (Standard_Real& theX,
|
||||
return (Abs (theX - theY) <= Precision::Confusion());
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetAutoActivateSelection
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void AIS_InteractiveContext::SetAutoActivateSelection (const Standard_Boolean theIsAuto)
|
||||
{
|
||||
myIsAutoActivateSelMode = theIsAuto;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : GetAutoActivateSelection
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_Boolean AIS_InteractiveContext::GetAutoActivateSelection() const
|
||||
{
|
||||
return myIsAutoActivateSelMode;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetZLayer
|
||||
//purpose :
|
||||
|
@@ -1661,6 +1661,22 @@ void AIS_InteractiveContext::NextDetected()
|
||||
myCurDetected++;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : DetectedCurrentOwner
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Handle(SelectMgr_EntityOwner) AIS_InteractiveContext::DetectedCurrentOwner() const
|
||||
{
|
||||
if (HasOpenedContext())
|
||||
{
|
||||
return myLocalContexts (myCurLocalIndex)->DetectedCurrentOwner();
|
||||
}
|
||||
|
||||
return MoreDetected()
|
||||
? myMainSel->Picked (myDetectedSeq (myCurDetected))
|
||||
: Handle(SelectMgr_EntityOwner)();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : DetectedCurrentShape
|
||||
//purpose :
|
||||
|
@@ -237,12 +237,13 @@ public:
|
||||
//! Gets next current object during iteration through mouse-detected
|
||||
//! interactive objects.
|
||||
Standard_EXPORT void NextDetected();
|
||||
|
||||
|
||||
//! @return current mouse-detected Owner or null object if there is no current detected.
|
||||
Standard_EXPORT Handle(SelectMgr_EntityOwner) DetectedCurrentOwner() const;
|
||||
|
||||
//! @return current mouse-detected shape or empty (null) shape, if current interactive object
|
||||
//! is not a shape (AIS_Shape) or there is no current mouse-detected interactive object at all.
|
||||
Standard_EXPORT const TopoDS_Shape& DetectedCurrentShape() const;
|
||||
|
||||
|
||||
//! @return current mouse-detected interactive object or null object if there is no current detected.
|
||||
Standard_EXPORT Handle(AIS_InteractiveObject) DetectedCurrentObject() const;
|
||||
@@ -424,7 +425,6 @@ private:
|
||||
Standard_Integer myCurrentOwner;
|
||||
TColStd_SequenceOfInteger myDetectedSeq;
|
||||
Standard_Integer myCurDetected;
|
||||
AIS_SequenceOfInteractive myAISDetectedSeq;
|
||||
Standard_Integer myAISCurDetected;
|
||||
Handle(Prs3d_Drawer) mySubintStyle;
|
||||
|
||||
|
@@ -73,7 +73,6 @@ AIS_StatusOfDetection AIS_LocalContext::MoveTo (const Standard_Integer theXpix,
|
||||
}
|
||||
|
||||
myAISCurDetected = 0;
|
||||
myAISDetectedSeq.Clear();
|
||||
|
||||
myCurDetected = 0;
|
||||
myDetectedSeq.Clear();
|
||||
@@ -84,17 +83,10 @@ AIS_StatusOfDetection AIS_LocalContext::MoveTo (const Standard_Integer theXpix,
|
||||
for (Standard_Integer aDetIter = 1; aDetIter <= aDetectedNb; ++aDetIter)
|
||||
{
|
||||
Handle(SelectMgr_EntityOwner) anOwner = myMainVS->Picked (aDetIter);
|
||||
if (anOwner.IsNull()
|
||||
|| !myFilters->IsOk (anOwner))
|
||||
if (!anOwner.IsNull()
|
||||
&& myFilters->IsOk (anOwner))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
myDetectedSeq.Append (aDetIter); // normally they are already arranged in correct order...
|
||||
Handle(AIS_InteractiveObject) anObj = Handle(AIS_InteractiveObject)::DownCast (anOwner->Selectable());
|
||||
if (!anObj.IsNull())
|
||||
{
|
||||
myAISDetectedSeq.Append (anObj);
|
||||
myDetectedSeq.Append (aDetIter); // normally they are already arranged in correct order...
|
||||
}
|
||||
}
|
||||
|
||||
@@ -868,15 +860,17 @@ void AIS_LocalContext::ClearOutdatedSelection (const Handle(AIS_InteractiveObjec
|
||||
}
|
||||
|
||||
myDetectedSeq.Remove (anIdx--);
|
||||
|
||||
if (anIdx < myCurDetected)
|
||||
if (myCurDetected > anIdx)
|
||||
{
|
||||
myCurDetected--;
|
||||
--myCurDetected;
|
||||
}
|
||||
if (myAISCurDetected > anIdx)
|
||||
{
|
||||
--myAISCurDetected;
|
||||
}
|
||||
}
|
||||
myCurDetected = Max (myCurDetected, 1);
|
||||
|
||||
Standard_Boolean isAISRemainsDetected = Standard_False;
|
||||
myCurDetected = Max (myCurDetected, 1);
|
||||
myAISCurDetected = Max (myAISCurDetected, 1);
|
||||
|
||||
// 3. AIS_Selection : remove entity owners from AIS_Selection
|
||||
const Handle(V3d_Viewer)& aViewer = myCTX->CurrentViewer();
|
||||
@@ -889,11 +883,7 @@ void AIS_LocalContext::ClearOutdatedSelection (const Handle(AIS_InteractiveObjec
|
||||
continue;
|
||||
}
|
||||
|
||||
if (aValidOwners.Contains (anOwner))
|
||||
{
|
||||
isAISRemainsDetected = Standard_True;
|
||||
}
|
||||
else
|
||||
if (!aValidOwners.Contains (anOwner))
|
||||
{
|
||||
aRemoveEntites.Append (anOwner);
|
||||
anOwner->SetSelected (Standard_False);
|
||||
@@ -968,28 +958,6 @@ void AIS_LocalContext::ClearOutdatedSelection (const Handle(AIS_InteractiveObjec
|
||||
Standard_False);
|
||||
}
|
||||
}
|
||||
|
||||
// Renew iterator of ::DetectedCurrentObject()
|
||||
if (!isAISRemainsDetected)
|
||||
{
|
||||
// Remove the interactive object from detected sequences
|
||||
for (Standard_Integer anIdx = 1; anIdx <= myAISDetectedSeq.Length(); ++anIdx)
|
||||
{
|
||||
Handle(AIS_InteractiveObject) aDetectedIO = myAISDetectedSeq.Value (anIdx);
|
||||
if (aDetectedIO.IsNull() || aDetectedIO != theIO)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
myAISDetectedSeq.Remove (anIdx--);
|
||||
|
||||
if (anIdx < myAISCurDetected)
|
||||
{
|
||||
myAISCurDetected--;
|
||||
}
|
||||
}
|
||||
myAISCurDetected = Max (myAISCurDetected, 1);
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@@ -1454,7 +1422,7 @@ Handle(SelectMgr_EntityOwner) AIS_LocalContext::FindSelectedOwnerFromShape(const
|
||||
//=======================================================================
|
||||
void AIS_LocalContext::InitDetected()
|
||||
{
|
||||
myAISCurDetected = myAISDetectedSeq.Length()? 1 : 0;
|
||||
myAISCurDetected = !myDetectedSeq.IsEmpty() ? myDetectedSeq.Lower() : 0;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@@ -1463,7 +1431,8 @@ void AIS_LocalContext::InitDetected()
|
||||
//=======================================================================
|
||||
Standard_Boolean AIS_LocalContext::MoreDetected() const
|
||||
{
|
||||
return (myAISCurDetected > 0 && myAISCurDetected <= myAISDetectedSeq.Length());
|
||||
return myAISCurDetected >= myDetectedSeq.Lower()
|
||||
&& myAISCurDetected <= myDetectedSeq.Upper();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@@ -1490,13 +1459,29 @@ const TopoDS_Shape& AIS_LocalContext::DetectedCurrentShape() const
|
||||
|
||||
return aCurrentShape->Shape();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : DetectedCurrentOwner
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Handle(SelectMgr_EntityOwner) AIS_LocalContext::DetectedCurrentOwner() const
|
||||
{
|
||||
return MoreDetected()
|
||||
? myMainVS->Picked (myDetectedSeq (myAISCurDetected))
|
||||
: Handle(SelectMgr_EntityOwner)();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : DetectedCurrentObject
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Handle(AIS_InteractiveObject) AIS_LocalContext::DetectedCurrentObject() const
|
||||
{
|
||||
return MoreDetected() ? myAISDetectedSeq(myAISCurDetected) : NULL;
|
||||
if (!MoreDetected())
|
||||
{
|
||||
return Handle(AIS_InteractiveObject)();
|
||||
}
|
||||
return Handle(AIS_InteractiveObject)::DownCast (myMainVS->Picked (myDetectedSeq (myAISCurDetected))->Selectable());
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
|
@@ -102,8 +102,8 @@ class BOPAlgo_PaveFiller;
|
||||
//! aMV.SetIntersect(bIntersect); //intersect or not the shapes from <aLS>
|
||||
//! //
|
||||
//! aMV.Perform(); //perform the operation
|
||||
//! if (aMV.ErrorStatus()) { //check error status
|
||||
//! return;
|
||||
//! if (aMV.HasErrors()) { //check error status
|
||||
//! return;
|
||||
//! }
|
||||
//! //
|
||||
//! const TopoDS_Shape& aResult = aMV.Shape(); //result of the operation
|
||||
|
@@ -2602,21 +2602,27 @@ void BOPAlgo_PaveFiller::UpdatePaveBlocks
|
||||
}
|
||||
//
|
||||
if (bRebuild) {
|
||||
Standard_Boolean isDegEdge = myDS->ShapeInfo(aPB->Edge()).HasFlag();
|
||||
Standard_Integer nE = aPB->Edge();
|
||||
// Check if the Pave Block has the edge set
|
||||
if (nE < 0) {
|
||||
// untouched edge
|
||||
nE = aPB->OriginalEdge();
|
||||
}
|
||||
Standard_Boolean isDegEdge = myDS->ShapeInfo(nE).HasFlag();
|
||||
if (wasRegularEdge && !isDegEdge && nV[0] == nV[1]) {
|
||||
// now edge has the same vertex on both ends;
|
||||
// check if it is not a regular closed curve.
|
||||
const TopoDS_Edge& aE = TopoDS::Edge(myDS->Shape(aPB->Edge()));
|
||||
const TopoDS_Edge& aE = TopoDS::Edge(myDS->Shape(nE));
|
||||
const TopoDS_Vertex& aV = TopoDS::Vertex(myDS->Shape(nV[0]));
|
||||
Standard_Real aLength = IntTools::Length(aE);
|
||||
Standard_Real aTolV = BRep_Tool::Tolerance(aV);
|
||||
if (aLength <= aTolV * 2.) {
|
||||
// micro edge, so mark it for removal
|
||||
aMicroEdges.Add(aPB->Edge());
|
||||
aMicroEdges.Add(nE);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
nSp = SplitEdge(aPB->Edge(), nV[0], aT[0], nV[1], aT[1]);
|
||||
nSp = SplitEdge(nE, nV[0], aT[0], nV[1], aT[1]);
|
||||
if (bCB)
|
||||
aCB->SetEdge(nSp);
|
||||
else
|
||||
|
@@ -3248,8 +3248,7 @@ Standard_Boolean BRepOffset_Tool::EnLargeFace
|
||||
const Standard_Boolean UpdatePCurve,
|
||||
const Standard_Boolean enlargeU,
|
||||
const Standard_Boolean enlargeVfirst,
|
||||
const Standard_Boolean enlargeVlast,
|
||||
const Standard_Boolean UseInfini)
|
||||
const Standard_Boolean enlargeVlast)
|
||||
{
|
||||
//---------------------------
|
||||
// extension de la geometrie.
|
||||
@@ -3271,20 +3270,8 @@ Standard_Boolean BRepOffset_Tool::EnLargeFace
|
||||
}
|
||||
|
||||
S->Bounds (US1,US2,VS1,VS2);
|
||||
if (UseInfini)
|
||||
{
|
||||
UU1 = VV1 = - TheInfini;
|
||||
UU2 = VV2 = TheInfini;
|
||||
}
|
||||
else
|
||||
{
|
||||
Standard_Real FaceDU = UF2 - UF1;
|
||||
Standard_Real FaceDV = VF2 - VF1;
|
||||
UU1 = UF1 - FaceDU;
|
||||
UU2 = UF2 + FaceDU;
|
||||
VV1 = VF1 - FaceDV;
|
||||
VV2 = VF2 + FaceDV;
|
||||
}
|
||||
UU1 = VV1 = - TheInfini;
|
||||
UU2 = VV2 = TheInfini;
|
||||
|
||||
if (CanExtentSurface) {
|
||||
SurfaceChange = EnlargeGeometry( S, UU1, UU2, VV1, VV2, isVV1degen, isVV2degen, UF1, UF2, VF1, VF2,
|
||||
@@ -4161,4 +4148,4 @@ void PerformPlanes(const TopoDS_Face& theFace1,
|
||||
Standard_Boolean IsInf(const Standard_Real theVal)
|
||||
{
|
||||
return (theVal > TheInfini*0.9);
|
||||
}
|
||||
}
|
@@ -104,14 +104,7 @@ public:
|
||||
//! if <UpdatePCurve> is TRUE, update the pcurves of the
|
||||
//! edges of <F> on the new surface.if the surface has been changed,
|
||||
//! Returns True if The Surface of <NF> has changed.
|
||||
Standard_EXPORT static Standard_Boolean EnLargeFace (const TopoDS_Face& F,
|
||||
TopoDS_Face& NF,
|
||||
const Standard_Boolean ChangeGeom,
|
||||
const Standard_Boolean UpDatePCurve = Standard_False,
|
||||
const Standard_Boolean enlargeU = Standard_True,
|
||||
const Standard_Boolean enlargeVfirst = Standard_True,
|
||||
const Standard_Boolean enlargeVlast = Standard_True,
|
||||
const Standard_Boolean UseInfini = Standard_True);
|
||||
Standard_EXPORT static Standard_Boolean EnLargeFace (const TopoDS_Face& F, TopoDS_Face& NF, const Standard_Boolean ChangeGeom, const Standard_Boolean UpDatePCurve = Standard_False, const Standard_Boolean enlargeU = Standard_True, const Standard_Boolean enlargeVfirst = Standard_True, const Standard_Boolean enlargeVlast = Standard_True);
|
||||
|
||||
Standard_EXPORT static void ExtentFace (const TopoDS_Face& F, TopTools_DataMapOfShapeShape& ConstShapes, TopTools_DataMapOfShapeShape& ToBuild, const TopAbs_State Side, const Standard_Real TolConf, TopoDS_Face& NF);
|
||||
|
||||
|
@@ -1,780 +0,0 @@
|
||||
// Created on: 2012-08-06
|
||||
// Created by: jgv@ROLEX
|
||||
// Copyright (c) 2012-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.
|
||||
|
||||
|
||||
#include <BRepOffsetAPI_PatchFaces.hxx>
|
||||
#include <BRep_Builder.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <BRepAdaptor_Curve.hxx>
|
||||
#include <BRepAdaptor_Surface.hxx>
|
||||
#include <BRepAdaptor_HSurface.hxx>
|
||||
#include <BRepTopAdaptor_TopolTool.hxx>
|
||||
#include <LocalAnalysis_SurfaceContinuity.hxx>
|
||||
#include <TopOpeBRepTool_TOOL.hxx>
|
||||
#include <BRepLib.hxx>
|
||||
#include <BRepLib_MakeVertex.hxx>
|
||||
#include <BRepLib_MakeEdge.hxx>
|
||||
#include <BRepTools_WireExplorer.hxx>
|
||||
#include <TopExp.hxx>
|
||||
#include <TopExp_Explorer.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
#include <TopoDS_Iterator.hxx>
|
||||
#include <IntTools_Context.hxx>
|
||||
#include <BOPTools_AlgoTools.hxx>
|
||||
#include <BRepOffset_Tool.hxx>
|
||||
#include <ShapeAnalysis_Surface.hxx>
|
||||
#include <ShapeConstruct_ProjectCurveOnSurface.hxx>
|
||||
#include <BRepAlgoAPI_Section.hxx>
|
||||
#include <Extrema_ExtPC.hxx>
|
||||
#include <BRepExtrema_ExtCC.hxx>
|
||||
#include <ShapeFix_Shape.hxx>
|
||||
|
||||
|
||||
static TopoDS_Edge MakeNewEdgeWithOldPcurvesOnNewSurfaces(const TopoDS_Edge& theEdge,
|
||||
const TopoDS_Face& theOldFace1,
|
||||
const TopoDS_Face& theNewFace1,
|
||||
const TopoDS_Face& theOldFace2,
|
||||
const TopoDS_Face& theNewFace2)
|
||||
{
|
||||
TopoDS_Edge aNewEdge;
|
||||
Standard_Real fpar, lpar;
|
||||
BRep_Builder BB;
|
||||
|
||||
Handle(Geom_Curve) aCurve = BRep_Tool::Curve(theEdge, fpar, lpar);
|
||||
aNewEdge = BRepLib_MakeEdge(aCurve, aCurve->FirstParameter(), aCurve->LastParameter()); //???
|
||||
TopoDS_Vertex V1, V2;
|
||||
TopExp::Vertices(aNewEdge, V1, V2);
|
||||
aNewEdge.Free(Standard_True);
|
||||
BB.Remove(aNewEdge, V1);
|
||||
BB.Remove(aNewEdge, V2);
|
||||
|
||||
Standard_Real Etol = BRep_Tool::Tolerance(theEdge);
|
||||
Handle(Geom2d_Curve) aPCurve1 = BRep_Tool::CurveOnSurface(theEdge, theOldFace1, fpar, lpar);
|
||||
BB.UpdateEdge(aNewEdge, aPCurve1, theNewFace1, Etol);
|
||||
Handle(Geom2d_Curve) aPCurve2 = BRep_Tool::CurveOnSurface(theEdge, theOldFace2, fpar, lpar);
|
||||
BB.UpdateEdge(aNewEdge, aPCurve2, theNewFace2, Etol);
|
||||
|
||||
return aNewEdge;
|
||||
}
|
||||
|
||||
static void UpdateEdgeByProjectionOfPCurve(TopoDS_Edge& anEdge,
|
||||
const TopoDS_Face& aNewFace,
|
||||
const TopoDS_Face& aBoundedNewFace)
|
||||
{
|
||||
BRep_Builder BB;
|
||||
Standard_Real fpar, lpar;
|
||||
|
||||
Handle(Geom_Curve) aCurve = BRep_Tool::Curve(anEdge,fpar,lpar);
|
||||
|
||||
Handle(Geom_Surface) NewSurf = BRep_Tool::Surface(aNewFace);
|
||||
Handle(ShapeAnalysis_Surface) SAS = new ShapeAnalysis_Surface(NewSurf);
|
||||
ShapeConstruct_ProjectCurveOnSurface aToolProj;
|
||||
aToolProj.Init(SAS, Precision::Confusion());
|
||||
Handle(Geom2d_Curve) NewPCurve;
|
||||
aToolProj.Perform(aCurve,fpar,lpar,NewPCurve);
|
||||
Standard_Real TolReached = SAS->Gap();
|
||||
//BB.UpdateEdge(anEdge, NullPCurve, aFace, 0.);
|
||||
BB.UpdateEdge(anEdge, NewPCurve, aBoundedNewFace, TolReached);
|
||||
TopoDS_Vertex V1, V2;
|
||||
TopExp::Vertices(anEdge, V1, V2);
|
||||
BB.UpdateVertex(V1, TolReached);
|
||||
BB.UpdateVertex(V2, TolReached);
|
||||
}
|
||||
|
||||
static void ProjectVertexOnNewEdge(const TopoDS_Vertex& theVertex,
|
||||
const TopoDS_Edge& theEdge,
|
||||
const TopoDS_Edge& theNewEdge,
|
||||
Standard_Real& theParam,
|
||||
gp_Pnt& thePnt,
|
||||
Standard_Real& theTolReached)
|
||||
{
|
||||
Standard_Real ParamOnEdge = BRep_Tool::Parameter(theVertex, theEdge);
|
||||
BRepAdaptor_Curve BAcurve(theEdge);
|
||||
BRepAdaptor_Curve BAnewcurve(theNewEdge);
|
||||
gp_Pnt PointOnEdge = BAcurve.Value(ParamOnEdge);
|
||||
Extrema_ExtPC Projector(PointOnEdge, BAnewcurve);
|
||||
Standard_Real Param[4], dist[4];
|
||||
gp_Pnt Pnt[4];
|
||||
Param[1] = BAnewcurve.FirstParameter();
|
||||
Param[2] = BAnewcurve.LastParameter();
|
||||
Projector.TrimmedSquareDistances(dist[1], dist[2], Pnt[1], Pnt[2]);
|
||||
dist[3] = RealLast();
|
||||
if (Projector.IsDone() && Projector.NbExt() > 0)
|
||||
{
|
||||
Standard_Integer imin = 1;
|
||||
for (Standard_Integer i = 2; i <= Projector.NbExt(); i++)
|
||||
if (Projector.SquareDistance(i) < Projector.SquareDistance(imin))
|
||||
imin = i;
|
||||
Param[3] = Projector.Point(imin).Parameter();
|
||||
dist[3] = Projector.SquareDistance(imin);
|
||||
Pnt[3] = Projector.Point(imin).Value();
|
||||
}
|
||||
|
||||
Standard_Integer imin = 1;
|
||||
for (Standard_Integer i = 2; i <= 3; i++)
|
||||
if (dist[i] < dist[imin])
|
||||
imin = i;
|
||||
|
||||
theParam = Param[imin];
|
||||
thePnt = Pnt[imin];
|
||||
theTolReached = sqrt(dist[imin]);
|
||||
}
|
||||
|
||||
static TopoDS_Edge GetGeneratedEdge(const TopoDS_Edge& anEdge,
|
||||
const TopoDS_Face& aFace,
|
||||
const TopoDS_Face& aNewFace)
|
||||
{
|
||||
TopoDS_Edge aNewEdge;
|
||||
|
||||
TopExp_Explorer Explo(aFace, TopAbs_EDGE);
|
||||
TopExp_Explorer ExploNew(aNewFace, TopAbs_EDGE);
|
||||
for (; Explo.More(); Explo.Next(),ExploNew.Next())
|
||||
{
|
||||
const TopoDS_Shape& EdgeInFace = Explo.Current();
|
||||
//const TopoDS_Shape& EdgeInNewFace = ExploNew.Current();
|
||||
if (anEdge == EdgeInFace)
|
||||
{
|
||||
aNewEdge = TopoDS::Edge(ExploNew.Current());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
TopoDS_Vertex V1, V2;
|
||||
TopExp::Vertices(aNewEdge, V1, V2);
|
||||
BRep_Builder BB;
|
||||
aNewEdge.Free(Standard_True);
|
||||
BB.Remove(aNewEdge, V1);
|
||||
BB.Remove(aNewEdge, V2);
|
||||
return aNewEdge;
|
||||
}
|
||||
|
||||
static TopAbs_Orientation OrientationInEdge(const TopoDS_Vertex& theVertex,
|
||||
const TopoDS_Edge& theEdge)
|
||||
{
|
||||
TopoDS_Vertex V1, V2;
|
||||
TopExp::Vertices(theEdge, V1, V2);
|
||||
if (theVertex.IsSame(V1))
|
||||
return TopAbs_FORWARD;
|
||||
|
||||
return TopAbs_REVERSED;
|
||||
}
|
||||
|
||||
static Standard_Boolean EdgeContains(const TopoDS_Edge& theEdge,
|
||||
const TopoDS_Vertex& theVertex)
|
||||
{
|
||||
TopoDS_Iterator ite(theEdge);
|
||||
for (; ite.More(); ite.Next())
|
||||
if (theVertex.IsSame(ite.Value()))
|
||||
return Standard_True;
|
||||
|
||||
return Standard_False;
|
||||
}
|
||||
|
||||
|
||||
static Standard_Boolean IsTangentFaces(const TopoDS_Edge& theEdge,
|
||||
const TopoDS_Face& theFace1,
|
||||
const TopoDS_Face& theFace2,
|
||||
const GeomAbs_Shape Order)
|
||||
{
|
||||
if (Order == GeomAbs_G1 &&
|
||||
BRep_Tool::Continuity( theEdge, theFace1, theFace2 ) != GeomAbs_C0)
|
||||
return Standard_True;
|
||||
|
||||
Standard_Real TolC0 = Max(0.001, 1.5*BRep_Tool::Tolerance(theEdge));
|
||||
|
||||
Standard_Real aFirst;
|
||||
Standard_Real aLast;
|
||||
|
||||
// Obtaining of pcurves of edge on two faces.
|
||||
const Handle(Geom2d_Curve) aC2d1 = BRep_Tool::CurveOnSurface
|
||||
(theEdge, theFace1, aFirst, aLast);
|
||||
const Handle(Geom2d_Curve) aC2d2 = BRep_Tool::CurveOnSurface
|
||||
(theEdge, theFace2, aFirst, aLast);
|
||||
if (aC2d1.IsNull() || aC2d2.IsNull())
|
||||
return Standard_False;
|
||||
|
||||
// Obtaining of two surfaces from adjacent faces.
|
||||
Handle(Geom_Surface) aSurf1 = BRep_Tool::Surface(theFace1);
|
||||
Handle(Geom_Surface) aSurf2 = BRep_Tool::Surface(theFace2);
|
||||
|
||||
if (aSurf1.IsNull() || aSurf2.IsNull())
|
||||
return Standard_False;
|
||||
|
||||
// Computation of the number of samples on the edge.
|
||||
BRepAdaptor_Surface aBAS1(theFace1);
|
||||
BRepAdaptor_Surface aBAS2(theFace2);
|
||||
Handle(BRepAdaptor_HSurface) aBAHS1 = new BRepAdaptor_HSurface(aBAS1);
|
||||
Handle(BRepAdaptor_HSurface) aBAHS2 = new BRepAdaptor_HSurface(aBAS2);
|
||||
Handle(BRepTopAdaptor_TopolTool) aTool1 = new BRepTopAdaptor_TopolTool(aBAHS1);
|
||||
Handle(BRepTopAdaptor_TopolTool) aTool2 = new BRepTopAdaptor_TopolTool(aBAHS2);
|
||||
Standard_Integer aNbSamples1 = aTool1->NbSamples();
|
||||
Standard_Integer aNbSamples2 = aTool2->NbSamples();
|
||||
const Standard_Integer aNbSamplesMax = 23;
|
||||
Standard_Integer aNbSamples = Min(aNbSamplesMax, Max(aNbSamples1, aNbSamples2));
|
||||
const Standard_Real aTolAngle = M_PI/18;
|
||||
|
||||
|
||||
// Computation of the continuity.
|
||||
Standard_Real aPar;
|
||||
Standard_Real aDelta = (aLast - aFirst)/(aNbSamples - 1);
|
||||
Standard_Integer i, nbNotDone = 0;
|
||||
|
||||
for (i = 1, aPar = aFirst; i <= aNbSamples; i++, aPar += aDelta) {
|
||||
if (i == aNbSamples) aPar = aLast;
|
||||
|
||||
LocalAnalysis_SurfaceContinuity aCont(aC2d1, aC2d2, aPar,
|
||||
aSurf1, aSurf2, Order,
|
||||
0.001, TolC0, aTolAngle, 0.1, 0.1);
|
||||
if (!aCont.IsDone())
|
||||
{
|
||||
nbNotDone++;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (Order == GeomAbs_G1)
|
||||
{
|
||||
if (!aCont.IsG1())
|
||||
return Standard_False;
|
||||
}
|
||||
else if (!aCont.IsG2())
|
||||
return Standard_False;
|
||||
}
|
||||
|
||||
if (nbNotDone == aNbSamples)
|
||||
return Standard_False;
|
||||
|
||||
return Standard_True;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : BRepOffsetAPI_PatchFaces
|
||||
//purpose : Constructor
|
||||
//=======================================================================
|
||||
|
||||
BRepOffsetAPI_PatchFaces::BRepOffsetAPI_PatchFaces(const TopoDS_Shape& theShape)
|
||||
{
|
||||
myInitialShape = theShape;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetOffsetFace
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void BRepOffsetAPI_PatchFaces::AddPatchFace(const TopoDS_Face& theFace,
|
||||
const TopoDS_Face& thePatchFace)
|
||||
{
|
||||
// Check the orientation of the patch face and make
|
||||
// it oriented the same way as original
|
||||
TopoDS_Face aFace = TopoDS::Face(theFace.Oriented(TopAbs_FORWARD));
|
||||
TopoDS_Face aPatchFace = TopoDS::Face(thePatchFace.Oriented(TopAbs_FORWARD));
|
||||
|
||||
Handle(IntTools_Context) aCtx = new IntTools_Context;
|
||||
Standard_Boolean bToReverse = BOPTools_AlgoTools::IsSplitToReverse(aFace, aPatchFace, aCtx);
|
||||
TopoDS_Face anOrientedPatchFace = bToReverse ? TopoDS::Face(aPatchFace.Reversed()) : aPatchFace;
|
||||
myFacePatchFace.Add(aFace, anOrientedPatchFace);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Build
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void BRepOffsetAPI_PatchFaces::Build()
|
||||
{
|
||||
TopExp::MapShapesAndUniqueAncestors(myInitialShape, TopAbs_EDGE, TopAbs_FACE, myEFmap);
|
||||
|
||||
//Draft filling of <myFaceNewFace>
|
||||
for (Standard_Integer i = 1; i <= myFacePatchFace.Extent(); i++)
|
||||
{
|
||||
const TopoDS_Face& aFace = TopoDS::Face(myFacePatchFace.FindKey(i));
|
||||
const TopoDS_Shape& aPatchFace = myFacePatchFace(i);
|
||||
myFaceNewFace.Add(aFace, aPatchFace);
|
||||
TopExp_Explorer Explo(aFace, TopAbs_EDGE);
|
||||
for (; Explo.More(); Explo.Next())
|
||||
{
|
||||
const TopoDS_Edge& anEdge = TopoDS::Edge(Explo.Current());
|
||||
const TopTools_ListOfShape& Lfaces = myEFmap.FindFromKey(anEdge);
|
||||
TopoDS_Face aNeighborFace = (aFace.IsSame(Lfaces.First()))?
|
||||
TopoDS::Face(Lfaces.Last()) : TopoDS::Face(Lfaces.First());
|
||||
if (myFacePatchFace.Contains(aNeighborFace))
|
||||
continue;
|
||||
if (myFaceNewFace.Contains(aNeighborFace))
|
||||
continue;
|
||||
Standard_Boolean IsTangentEdge = IsTangentFaces(anEdge, aFace, aNeighborFace, GeomAbs_G1);
|
||||
if (IsTangentEdge)
|
||||
{
|
||||
myTangentEdges.Add(anEdge);
|
||||
continue;
|
||||
}
|
||||
|
||||
aNeighborFace.Orientation(TopAbs_FORWARD);
|
||||
TopoDS_Face aNewFace;
|
||||
BRepOffset_Tool::EnLargeFace(aNeighborFace, aNewFace,
|
||||
Standard_True,Standard_True,Standard_True,Standard_True,Standard_True,
|
||||
Standard_False); //not too big
|
||||
myFaceNewFace.Add(aNeighborFace, aNewFace);
|
||||
}
|
||||
}
|
||||
|
||||
//Make draft intersection edges: draft filling of <myEdgeNewEdge>
|
||||
BRep_Builder BB;
|
||||
TopTools_MapOfShape UpdatedConstEdges;
|
||||
for (Standard_Integer i = 1; i <= myFaceNewFace.Extent(); i++)
|
||||
{
|
||||
TopoDS_Face aFace = TopoDS::Face(myFaceNewFace.FindKey(i));
|
||||
TopoDS_Face aNewFace = TopoDS::Face(myFaceNewFace(i));
|
||||
TopoDS_Face aBoundedNewFace;
|
||||
if (myNewFaceBoundedFace.IsBound(aNewFace))
|
||||
aBoundedNewFace = TopoDS::Face(myNewFaceBoundedFace(aNewFace));
|
||||
else
|
||||
{
|
||||
aBoundedNewFace = TopoDS::Face(aNewFace.EmptyCopied());
|
||||
myNewFaceBoundedFace.Bind(aNewFace, aBoundedNewFace);
|
||||
}
|
||||
|
||||
TopoDS_Iterator itf(aFace);
|
||||
for (; itf.More(); itf.Next())
|
||||
{
|
||||
const TopoDS_Wire& aWire = TopoDS::Wire(itf.Value());
|
||||
TopoDS_Wire F_Wire = TopoDS::Wire(aWire.Oriented(TopAbs_FORWARD));
|
||||
BRepTools_WireExplorer wexp(F_Wire, aFace);
|
||||
for (; wexp.More(); wexp.Next())
|
||||
{
|
||||
TopoDS_Edge anEdge = wexp.Current();
|
||||
Standard_Boolean ToReverse = Standard_False;
|
||||
TopoDS_Edge aNewEdge;
|
||||
if (myEdgeNewEdge.IsBound(anEdge))
|
||||
//aNewEdge = TopoDS::Edge(myEdgeNewEdge(anEdge));
|
||||
continue;
|
||||
|
||||
Handle(Geom2d_Curve) NullPCurve;
|
||||
Standard_Real fpar, lpar;
|
||||
|
||||
const TopTools_ListOfShape& Lfaces = myEFmap.FindFromKey(anEdge);
|
||||
if (Lfaces.Extent() == 1) //seam edge
|
||||
{
|
||||
cout<<endl<<"Seam edge or degenerated edge !!!"<<endl;
|
||||
TopoDS_Edge GeneratedEdge = GetGeneratedEdge(anEdge, aFace, aNewFace);
|
||||
myOrientedEdgeNewEdge.Bind(anEdge, GeneratedEdge);
|
||||
continue;
|
||||
}
|
||||
|
||||
TopoDS_Face aNeighborFace = (aFace.IsSame(Lfaces.First()))?
|
||||
TopoDS::Face(Lfaces.Last()) : TopoDS::Face(Lfaces.First());
|
||||
|
||||
if (myTangentEdges.Contains(anEdge)&&
|
||||
!UpdatedConstEdges.Contains(anEdge)) //project onto patch
|
||||
{
|
||||
UpdateEdgeByProjectionOfPCurve(anEdge, aNewFace, aBoundedNewFace);
|
||||
|
||||
//aNewEdge = anEdge;
|
||||
UpdatedConstEdges.Add(anEdge);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (myFaceNewFace.Contains(aNeighborFace))//intersect
|
||||
{
|
||||
TopoDS_Face aNewNeighborFace = TopoDS::Face(myFaceNewFace.FindFromKey(aNeighborFace));
|
||||
TopoDS_Face aBoundedNewNeighborFace;
|
||||
if (myNewFaceBoundedFace.IsBound(aNewNeighborFace))
|
||||
aBoundedNewNeighborFace = TopoDS::Face(myNewFaceBoundedFace(aNewNeighborFace));
|
||||
else
|
||||
{
|
||||
aBoundedNewNeighborFace = TopoDS::Face(aNewNeighborFace.EmptyCopied());
|
||||
myNewFaceBoundedFace.Bind(aNewNeighborFace, aBoundedNewNeighborFace);
|
||||
}
|
||||
|
||||
if (!myFacePatchFace.Contains(aFace) &&
|
||||
!myFacePatchFace.Contains(aNeighborFace) &&
|
||||
IsTangentFaces(anEdge, aFace, aNeighborFace, GeomAbs_G1)) //smooth edge
|
||||
{
|
||||
//make new edge with pcurves on new surfaces
|
||||
aNewEdge = MakeNewEdgeWithOldPcurvesOnNewSurfaces(anEdge,
|
||||
aFace, aBoundedNewFace,
|
||||
aNeighborFace, aBoundedNewNeighborFace);
|
||||
|
||||
myEdgeNewEdge.Bind(anEdge.Oriented(TopAbs_FORWARD), aNewEdge);
|
||||
continue;
|
||||
}
|
||||
|
||||
BRepLib::BuildCurves3d(aNewFace);
|
||||
BRepLib::BuildCurves3d(aNewNeighborFace);
|
||||
|
||||
BRepAlgoAPI_Section SecBuilder(aNewFace, aNewNeighborFace, Standard_False);
|
||||
SecBuilder.Approximation(Standard_True);
|
||||
SecBuilder.ComputePCurveOn1(Standard_True);
|
||||
SecBuilder.ComputePCurveOn2(Standard_True);
|
||||
SecBuilder.Build();
|
||||
TopoDS_Shape aSection = SecBuilder.Shape();
|
||||
Standard_Boolean Success = Standard_True;
|
||||
TopExp_Explorer ExpSec(aSection, TopAbs_EDGE);
|
||||
if (ExpSec.More())
|
||||
aNewEdge = TopoDS::Edge(ExpSec.Current());
|
||||
else //no intersection
|
||||
{
|
||||
cout<<endl<<"No intersecion => smooth edge"<<endl;
|
||||
Success = Standard_False;
|
||||
}
|
||||
ExpSec.Next();
|
||||
if (ExpSec.More())
|
||||
{
|
||||
cout<<endl<<"More than one intersecion => smooth edge"<<endl;
|
||||
Success = Standard_False;
|
||||
}
|
||||
if (!Success) //a smooth edge with bigger angle
|
||||
{
|
||||
if (myFacePatchFace.Contains(aFace)) //project onto patch
|
||||
{
|
||||
UpdateEdgeByProjectionOfPCurve(anEdge, aNewFace, aBoundedNewFace);
|
||||
|
||||
//Remove neighbor face from <myFaceNewFace>
|
||||
myFaceNewFace.RemoveKey(aNeighborFace);
|
||||
|
||||
myTangentEdges.Add(anEdge);
|
||||
UpdatedConstEdges.Add(anEdge);
|
||||
}
|
||||
else
|
||||
{
|
||||
aNewEdge = MakeNewEdgeWithOldPcurvesOnNewSurfaces(anEdge,
|
||||
aFace, aBoundedNewFace,
|
||||
aNeighborFace, aBoundedNewNeighborFace);
|
||||
myEdgeNewEdge.Bind(anEdge.Oriented(TopAbs_FORWARD), aNewEdge);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
TopoDS_Vertex V1, V2;
|
||||
TopExp::Vertices(aNewEdge, V1, V2);
|
||||
aNewEdge.Free(Standard_True);
|
||||
BB.Remove(aNewEdge, V1);
|
||||
BB.Remove(aNewEdge, V2);
|
||||
aNewEdge.Orientation(TopAbs_FORWARD);
|
||||
|
||||
//Make pcurves on new surfaces
|
||||
Handle(Geom2d_Curve) PCurve1 = BRep_Tool::CurveOnSurface(aNewEdge, aNewFace, fpar, lpar);
|
||||
BB.UpdateEdge(aNewEdge, NullPCurve, aNewFace, 0.);
|
||||
BB.UpdateEdge(aNewEdge, PCurve1, aBoundedNewFace, 0.);
|
||||
Handle(Geom2d_Curve) PCurve2 = BRep_Tool::CurveOnSurface(aNewEdge, aNewNeighborFace, fpar, lpar);
|
||||
BB.UpdateEdge(aNewEdge, NullPCurve, aNewNeighborFace, 0.);
|
||||
BB.UpdateEdge(aNewEdge, PCurve2, aBoundedNewNeighborFace, 0.);
|
||||
|
||||
//Check orientation of new edge
|
||||
BRepAdaptor_Curve BAcurve(anEdge);
|
||||
BRepAdaptor_Curve BAnewcurve(aNewEdge);
|
||||
gp_Pnt FirstPnt, FirstNewPnt;
|
||||
gp_Vec DirOnCurve, DirOnNewCurve;
|
||||
BAcurve.D1(BAcurve.FirstParameter(), FirstPnt, DirOnCurve);
|
||||
Standard_Real ParamOnNewEdge = BAnewcurve.FirstParameter();
|
||||
Extrema_ExtPC Projector(FirstPnt, BAnewcurve);
|
||||
if (!Projector.IsDone() || Projector.NbExt() == 0)
|
||||
{
|
||||
cout<<endl<<"Define orientation of new edge: extrema point-curve is not done"<<endl;
|
||||
}
|
||||
if (Projector.IsDone() && Projector.NbExt() > 0)
|
||||
{
|
||||
Standard_Integer indmin = 1;
|
||||
for (Standard_Integer ind = 2; ind <= Projector.NbExt(); ind++)
|
||||
if (Projector.SquareDistance(ind) < Projector.SquareDistance(indmin))
|
||||
indmin = ind;
|
||||
ParamOnNewEdge = Projector.Point(indmin).Parameter();
|
||||
}
|
||||
BAnewcurve.D1(ParamOnNewEdge, FirstNewPnt, DirOnNewCurve);
|
||||
Standard_Real ScalProd = DirOnCurve * DirOnNewCurve;
|
||||
if (ScalProd < 0.)
|
||||
ToReverse = Standard_True;
|
||||
|
||||
myEdgeNewEdge.Bind(anEdge.Oriented(TopAbs_FORWARD),
|
||||
(ToReverse)? aNewEdge.Oriented(TopAbs_REVERSED) : aNewEdge);
|
||||
} //intersect
|
||||
else //borders on constant face: change surface of pcurve on existing edge
|
||||
{
|
||||
Handle(Geom2d_Curve) aPCurve = BRep_Tool::CurveOnSurface(anEdge, aFace, fpar, lpar);
|
||||
//BB.UpdateEdge(anEdge, NullPCurve, aFace, 0.);
|
||||
BB.UpdateEdge(anEdge, aPCurve, aBoundedNewFace, 0.);
|
||||
|
||||
aNewEdge = anEdge;
|
||||
}
|
||||
} //for (; wexp.More(); wexp.Next())
|
||||
} //for (; itf.More(); itf.Next())
|
||||
} //for (Standard_Integer i = 1; i <= myFaceNewFace.Extent(); i++)
|
||||
|
||||
//Intersect edges and make new wires
|
||||
for (Standard_Integer i = 1; i <= myFaceNewFace.Extent(); i++)
|
||||
{
|
||||
TopoDS_Face aFace = TopoDS::Face(myFaceNewFace.FindKey(i));
|
||||
TopoDS_Shape aNewFace = myFaceNewFace(i);
|
||||
TopoDS_Face aBoundedNewFace = TopoDS::Face(myNewFaceBoundedFace(aNewFace));
|
||||
|
||||
TopoDS_Iterator itf(aFace);
|
||||
for (; itf.More(); itf.Next())
|
||||
{
|
||||
const TopoDS_Wire& aWire = TopoDS::Wire(itf.Value());
|
||||
TopAbs_Orientation aWireOr = aWire.Orientation();
|
||||
|
||||
TopoDS_Wire aNewWire;
|
||||
BB.MakeWire(aNewWire);
|
||||
|
||||
TopoDS_Wire F_Wire = TopoDS::Wire(aWire.Oriented(TopAbs_FORWARD));
|
||||
BRepTools_WireExplorer wexp(F_Wire, aFace);
|
||||
TopoDS_Vertex CurVertex = wexp.CurrentVertex();
|
||||
TopoDS_Edge FirstEdge = wexp.Current();
|
||||
TopoDS_Edge FirstNewEdge = FirstEdge;
|
||||
if (myOrientedEdgeNewEdge.IsBound(FirstEdge))
|
||||
FirstNewEdge = TopoDS::Edge(myOrientedEdgeNewEdge(FirstEdge));
|
||||
else if (myEdgeNewEdge.IsBound(FirstEdge))
|
||||
FirstNewEdge = TopoDS::Edge(myEdgeNewEdge(FirstEdge));
|
||||
TopoDS_Edge CurEdge, PrevEdge = FirstEdge;
|
||||
TopoDS_Edge CurNewEdge, PrevNewEdge = FirstNewEdge;
|
||||
wexp.Next();
|
||||
if (!wexp.More() && //only one edge in wire
|
||||
!myVertexNewVertex.IsBound(CurVertex))
|
||||
{
|
||||
TopoDS_Vertex CurNewVertex;
|
||||
if (myVertexNewVertex.IsBound(CurVertex))
|
||||
CurNewVertex = TopoDS::Vertex(myVertexNewVertex(CurVertex));
|
||||
|
||||
if (myEdgeNewEdge.IsBound(FirstEdge))//new edge: update
|
||||
{
|
||||
Standard_Real fpar, lpar;
|
||||
BRep_Tool::Range(FirstEdge, fpar, lpar);
|
||||
BB.Range(FirstNewEdge, fpar, lpar);
|
||||
BRepAdaptor_Curve BAcurve(FirstNewEdge);
|
||||
gp_Pnt FirstPnt = BAcurve.Value(BAcurve.FirstParameter());
|
||||
if (CurNewVertex.IsNull())
|
||||
CurNewVertex = BRepLib_MakeVertex(FirstPnt);
|
||||
BB.Add(FirstNewEdge, CurNewVertex);
|
||||
BB.Add(FirstNewEdge, CurNewVertex.Oriented(TopAbs_REVERSED));
|
||||
myVertexNewVertex.Bind(CurVertex, CurNewVertex);
|
||||
}
|
||||
}
|
||||
for (; wexp.More(); wexp.Next())
|
||||
{
|
||||
CurEdge = wexp.Current();
|
||||
if (myOrientedEdgeNewEdge.IsBound(CurEdge))
|
||||
CurNewEdge = TopoDS::Edge(myOrientedEdgeNewEdge(CurEdge));
|
||||
else if (myEdgeNewEdge.IsBound(CurEdge))
|
||||
CurNewEdge = TopoDS::Edge(myEdgeNewEdge(CurEdge));
|
||||
else
|
||||
CurNewEdge = CurEdge;
|
||||
CurVertex = wexp.CurrentVertex();
|
||||
UpdateEdgesAndVertex(PrevEdge, PrevNewEdge,
|
||||
CurEdge, CurNewEdge,
|
||||
CurVertex);
|
||||
if (!PrevEdge.IsSame(PrevNewEdge) &&
|
||||
PrevEdge.Orientation() == TopAbs_REVERSED)
|
||||
PrevNewEdge.Reverse();
|
||||
BB.Add(aNewWire, PrevNewEdge);
|
||||
|
||||
PrevEdge = CurEdge;
|
||||
PrevNewEdge = CurNewEdge;
|
||||
}
|
||||
CurEdge = FirstEdge;
|
||||
CurNewEdge = FirstNewEdge;
|
||||
CurVertex = wexp.CurrentVertex();
|
||||
UpdateEdgesAndVertex(PrevEdge, PrevNewEdge,
|
||||
CurEdge, CurNewEdge,
|
||||
CurVertex);
|
||||
if (!PrevEdge.IsSame(PrevNewEdge) &&
|
||||
PrevEdge.Orientation() == TopAbs_REVERSED)
|
||||
PrevNewEdge.Reverse();
|
||||
BB.Add(aNewWire, PrevNewEdge);
|
||||
|
||||
aNewWire.Orientation(aWireOr);
|
||||
BB.Add(aBoundedNewFace, aNewWire);
|
||||
} //for (; itf.More(); itf.Next()) (iterator on face)
|
||||
}
|
||||
|
||||
//Assemble resulting shape
|
||||
TopoDS_Solid aSolid;
|
||||
BB.MakeSolid(aSolid);
|
||||
TopoDS_Shell aShell;
|
||||
BB.MakeShell(aShell);
|
||||
TopExp_Explorer Explo(myInitialShape, TopAbs_FACE);
|
||||
for (; Explo.More(); Explo.Next())
|
||||
{
|
||||
const TopoDS_Shape& aFace = Explo.Current();
|
||||
TopoDS_Shape aBoundedNewFace;
|
||||
if (myFaceNewFace.Contains(aFace))
|
||||
{
|
||||
const TopoDS_Shape& aNewFace = myFaceNewFace.FindFromKey(aFace);
|
||||
aBoundedNewFace = myNewFaceBoundedFace(aNewFace);
|
||||
if (aFace.Orientation() == TopAbs_REVERSED)
|
||||
aBoundedNewFace.Reverse();
|
||||
}
|
||||
else
|
||||
aBoundedNewFace = aFace;
|
||||
BB.Add(aShell, aBoundedNewFace);
|
||||
}
|
||||
BB.Add(aSolid, aShell);
|
||||
|
||||
ShapeFix_Shape Fixer(aSolid);
|
||||
Fixer.Perform();
|
||||
|
||||
myShape = Fixer.Shape();
|
||||
//myShape = aSolid;
|
||||
|
||||
Done();
|
||||
}
|
||||
|
||||
void BRepOffsetAPI_PatchFaces::UpdateEdgesAndVertex(const TopoDS_Edge& thePrevEdge,
|
||||
TopoDS_Edge& thePrevNewEdge,
|
||||
const TopoDS_Edge& theCurEdge,
|
||||
TopoDS_Edge& theCurNewEdge,
|
||||
TopoDS_Vertex& theCurVertex)
|
||||
{
|
||||
BRep_Builder BB;
|
||||
|
||||
TopoDS_Vertex CurNewVertex;
|
||||
if (myVertexNewVertex.IsBound(theCurVertex))
|
||||
CurNewVertex = TopoDS::Vertex(myVertexNewVertex(theCurVertex));
|
||||
else
|
||||
{
|
||||
Standard_Boolean IsConstVertex = (!(myEdgeNewEdge.IsBound(thePrevEdge) || myOrientedEdgeNewEdge.IsBound(thePrevEdge)) ||
|
||||
!(myEdgeNewEdge.IsBound(theCurEdge) || myOrientedEdgeNewEdge.IsBound(theCurEdge)));
|
||||
if (IsConstVertex)
|
||||
CurNewVertex = theCurVertex;
|
||||
}
|
||||
|
||||
Standard_Boolean IsSeamPrev = (myOrientedEdgeNewEdge.IsBound(thePrevEdge));
|
||||
Standard_Boolean IsSeamCur = (myOrientedEdgeNewEdge.IsBound(theCurEdge));
|
||||
|
||||
if ((myEdgeNewEdge.IsBound(thePrevEdge) || myOrientedEdgeNewEdge.IsBound(thePrevEdge)) &&
|
||||
(myEdgeNewEdge.IsBound(theCurEdge) || myOrientedEdgeNewEdge.IsBound(theCurEdge))) //two new edges: intersect
|
||||
{
|
||||
Standard_Real ParamOnPrev, ParamOnCur, TolProj;
|
||||
gp_Pnt PntOnPrev, PntOnCur;
|
||||
ProjectVertexOnNewEdge(theCurVertex, thePrevEdge, thePrevNewEdge,
|
||||
ParamOnPrev, PntOnPrev, TolProj);
|
||||
ProjectVertexOnNewEdge(theCurVertex, theCurEdge, theCurNewEdge,
|
||||
ParamOnCur, PntOnCur, TolProj);
|
||||
|
||||
Standard_Real TolReached;
|
||||
gp_Pnt PntVtx = (CurNewVertex.IsNull())?
|
||||
BRep_Tool::Pnt(theCurVertex) : BRep_Tool::Pnt(CurNewVertex);
|
||||
TolReached = PntOnPrev.Distance(PntOnCur);
|
||||
Standard_Real DistVtoPrev = PntVtx.Distance(PntOnPrev);
|
||||
Standard_Real DistVtoCur = PntVtx.Distance(PntOnCur);
|
||||
TolReached = Max(TolReached, DistVtoPrev);
|
||||
TolReached = Max(TolReached, DistVtoCur);
|
||||
|
||||
BRepExtrema_ExtCC ExtrEE(thePrevNewEdge, theCurNewEdge);
|
||||
if (!ExtrEE.IsDone() || ExtrEE.NbExt() == 0)
|
||||
{
|
||||
cout<<endl<<"Extrema EE is not done"<<endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
Standard_Integer imin = 1;
|
||||
for (Standard_Integer iext = 2; iext <= ExtrEE.NbExt(); iext++)
|
||||
if (ExtrEE.SquareDistance(iext) < ExtrEE.SquareDistance(imin))
|
||||
imin = iext;
|
||||
Standard_Real TolEE = sqrt(ExtrEE.SquareDistance(imin));
|
||||
gp_Pnt PntOnE1 = ExtrEE.PointOnE1(imin);
|
||||
gp_Pnt PntOnE2 = ExtrEE.PointOnE2(imin);
|
||||
Standard_Real DistVtoE1 = PntVtx.Distance(PntOnE1);
|
||||
Standard_Real DistVtoE2 = PntVtx.Distance(PntOnE2);
|
||||
TolEE = Max(TolEE, DistVtoE1);
|
||||
TolEE = Max(TolEE, DistVtoE2);
|
||||
if (TolEE < TolReached)
|
||||
{
|
||||
TolReached = TolEE;
|
||||
PntOnPrev = PntOnE1;
|
||||
PntOnCur = PntOnE2;
|
||||
ParamOnPrev = ExtrEE.ParameterOnE1(imin);
|
||||
ParamOnCur = ExtrEE.ParameterOnE2(imin);
|
||||
}
|
||||
}
|
||||
if (CurNewVertex.IsNull())
|
||||
{
|
||||
gp_Pnt NewPnt((PntOnPrev.XYZ() + PntOnCur.XYZ())/2);
|
||||
CurNewVertex = BRepLib_MakeVertex(NewPnt);
|
||||
myVertexNewVertex.Bind(theCurVertex, CurNewVertex);
|
||||
}
|
||||
BB.UpdateVertex(CurNewVertex, TolReached);
|
||||
if (!EdgeContains(thePrevNewEdge, CurNewVertex))
|
||||
{
|
||||
if (IsSeamCur)
|
||||
ParamOnPrev = RealLast();
|
||||
PutVertexToEdge(CurNewVertex, theCurVertex, thePrevNewEdge, thePrevEdge, ParamOnPrev);
|
||||
}
|
||||
|
||||
if (!EdgeContains(theCurNewEdge, CurNewVertex))
|
||||
{
|
||||
if (IsSeamPrev)
|
||||
ParamOnCur = RealLast();
|
||||
PutVertexToEdge(CurNewVertex, theCurVertex, theCurNewEdge, theCurEdge, ParamOnCur);
|
||||
}
|
||||
} //two new edges: intersect
|
||||
else if ((myEdgeNewEdge.IsBound(thePrevEdge) || myOrientedEdgeNewEdge.IsBound(thePrevEdge)) ||
|
||||
(myEdgeNewEdge.IsBound(theCurEdge) || myOrientedEdgeNewEdge.IsBound(theCurEdge))) //one constant edge: project point onto curve
|
||||
{
|
||||
TopoDS_Edge ConstantEdge, ModifiedEdge, NewEdge;
|
||||
Standard_Boolean IsAdjacentSeam;
|
||||
if (myEdgeNewEdge.IsBound(thePrevEdge) || myOrientedEdgeNewEdge.IsBound(thePrevEdge))
|
||||
{
|
||||
ConstantEdge = theCurEdge;
|
||||
ModifiedEdge = thePrevEdge;
|
||||
NewEdge = thePrevNewEdge;
|
||||
IsAdjacentSeam = IsSeamCur;
|
||||
}
|
||||
else
|
||||
{
|
||||
ConstantEdge = thePrevEdge;
|
||||
ModifiedEdge = theCurEdge;
|
||||
NewEdge = theCurNewEdge;
|
||||
IsAdjacentSeam = IsSeamPrev;
|
||||
}
|
||||
|
||||
Standard_Real ParamOnNewEdge, TolReached;
|
||||
gp_Pnt PntOnNewEdge;
|
||||
ProjectVertexOnNewEdge(theCurVertex, ModifiedEdge, NewEdge,
|
||||
ParamOnNewEdge, PntOnNewEdge, TolReached);
|
||||
BB.UpdateVertex(theCurVertex, TolReached);
|
||||
|
||||
if (!EdgeContains(NewEdge, theCurVertex))
|
||||
PutVertexToEdge(theCurVertex, theCurVertex, NewEdge, ModifiedEdge, ParamOnNewEdge);
|
||||
} //else (one constant edge: project point onto curve)
|
||||
else //two constant edges
|
||||
{
|
||||
//nothing ?
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void BRepOffsetAPI_PatchFaces::PutVertexToEdge(const TopoDS_Vertex& theVertex,
|
||||
const TopoDS_Vertex& theProVertex,
|
||||
TopoDS_Edge& theEdge,
|
||||
const TopoDS_Edge& theProEdge,
|
||||
const Standard_Real theParamOnEdge)
|
||||
{
|
||||
BRep_Builder BB;
|
||||
|
||||
TopAbs_Orientation anOr = OrientationInEdge(theProVertex, theProEdge);
|
||||
if (myEdgeNewEdge.IsBound(theProEdge) &&
|
||||
myEdgeNewEdge(theProEdge).Orientation() == TopAbs_REVERSED)
|
||||
anOr = TopAbs::Reverse(anOr);
|
||||
|
||||
TopoDS_Shape F_Edge = theEdge.Oriented(TopAbs_FORWARD);
|
||||
F_Edge.Free(Standard_True);
|
||||
BB.Add(F_Edge, theVertex.Oriented(anOr));
|
||||
if (!Precision::IsInfinite(theParamOnEdge))
|
||||
{
|
||||
Standard_Real fpar, lpar;
|
||||
BRep_Tool::Range(theEdge, fpar, lpar);
|
||||
if (anOr == TopAbs_FORWARD)
|
||||
BB.Range(theEdge, theParamOnEdge, lpar);
|
||||
else
|
||||
BB.Range(theEdge, fpar, theParamOnEdge);
|
||||
}
|
||||
}
|
@@ -1,99 +0,0 @@
|
||||
// Created on: 2012-08-06
|
||||
// Created by: jgv@ROLEX
|
||||
// Copyright (c) 2012-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 _BRepOffsetAPI_PatchFaces_HeaderFile
|
||||
#define _BRepOffsetAPI_PatchFaces_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <TopoDS_Face.hxx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <TopoDS_Vertex.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <TopTools_IndexedDataMapOfShapeShape.hxx>
|
||||
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
|
||||
#include <TopTools_DataMapOfShapeShape.hxx>
|
||||
#include <TopTools_DataMapOfOrientedShapeShape.hxx>
|
||||
#include <TopTools_MapOfShape.hxx>
|
||||
#include <BRepBuilderAPI_MakeShape.hxx>
|
||||
class TopoDS_Shape;
|
||||
|
||||
|
||||
//! Describes functions to replace some faces in a shape
|
||||
//! by patches
|
||||
class BRepOffsetAPI_PatchFaces : public BRepBuilderAPI_MakeShape
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! General constructor.
|
||||
Standard_EXPORT BRepOffsetAPI_PatchFaces(const TopoDS_Shape& aShape);
|
||||
|
||||
//! Adds the patch face for the face in the shape.
|
||||
Standard_EXPORT void AddPatchFace (const TopoDS_Face& theFace, const TopoDS_Face& thePatchFace);
|
||||
|
||||
Standard_EXPORT virtual void Build() Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Standard_EXPORT void UpdateEdgesAndVertex(const TopoDS_Edge& thePrevEdge,
|
||||
TopoDS_Edge& thePrevNewEdge,
|
||||
const TopoDS_Edge& theCurEdge,
|
||||
TopoDS_Edge& theCurNewEdge,
|
||||
TopoDS_Vertex& theCurVertex);
|
||||
|
||||
Standard_EXPORT void PutVertexToEdge(const TopoDS_Vertex& theVertex,
|
||||
const TopoDS_Vertex& theProVertex,
|
||||
TopoDS_Edge& theEdge,
|
||||
const TopoDS_Edge& theProEdge,
|
||||
const Standard_Real theParamOnEdge);
|
||||
|
||||
|
||||
TopoDS_Shape myInitialShape;
|
||||
|
||||
TopTools_IndexedDataMapOfShapeShape myFacePatchFace;
|
||||
TopTools_IndexedDataMapOfShapeShape myFaceNewFace;
|
||||
TopTools_DataMapOfShapeShape myNewFaceBoundedFace;
|
||||
TopTools_DataMapOfShapeShape myEdgeNewEdge;
|
||||
TopTools_DataMapOfOrientedShapeShape myOrientedEdgeNewEdge;
|
||||
TopTools_DataMapOfShapeShape myVertexNewVertex;
|
||||
TopTools_MapOfShape myTangentEdges;
|
||||
|
||||
TopTools_IndexedDataMapOfShapeListOfShape myEFmap;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _BRepOffsetAPI_PatchFaces_HeaderFile
|
@@ -62,8 +62,6 @@
|
||||
#include <DBRep_DrawableShape.hxx>
|
||||
#include <BRepTest.hxx>
|
||||
|
||||
#include <BRepOffsetAPI_PatchFaces.hxx>
|
||||
|
||||
#include <BRepFilletAPI_MakeFillet.hxx>
|
||||
#include <ChFi3d_FilletShape.hxx>
|
||||
|
||||
@@ -2288,36 +2286,6 @@ static Standard_Integer ComputeSimpleOffset(Draw_Interpretor& theCommands,
|
||||
return 0;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : patchfaces
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
static Standard_Integer patchfaces(Draw_Interpretor& /*di*/,
|
||||
Standard_Integer n, const char** a)
|
||||
{
|
||||
if (n < 5) return 1;
|
||||
|
||||
TopoDS_Shape aShape = DBRep::Get(a[2]);
|
||||
if (aShape.IsNull()) return 1;
|
||||
|
||||
TopoDS_Shape aLocalFace = DBRep::Get(a[3], TopAbs_FACE);
|
||||
if (aLocalFace.IsNull()) return 1;
|
||||
TopoDS_Face aFace = TopoDS::Face(aLocalFace);
|
||||
|
||||
TopoDS_Shape aLocalNewFace = DBRep::Get(a[4], TopAbs_FACE);
|
||||
if (aLocalNewFace.IsNull()) return 1;
|
||||
TopoDS_Face aNewFace = TopoDS::Face(aLocalNewFace);
|
||||
|
||||
BRepOffsetAPI_PatchFaces Builder(aShape);
|
||||
Builder.AddPatchFace(aFace, aNewFace);
|
||||
Builder.Build();
|
||||
|
||||
TopoDS_Shape Result = Builder.Shape();
|
||||
DBRep::Set(a[1], Result);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : FeatureCommands
|
||||
//purpose :
|
||||
@@ -2466,7 +2434,4 @@ void BRepTest::FeatureCommands (Draw_Interpretor& theCommands)
|
||||
theCommands.Add("offsetshapesimple",
|
||||
"offsetshapesimple result shape offsetvalue [solid]",
|
||||
__FILE__, ComputeSimpleOffset);
|
||||
|
||||
theCommands.Add("patchfaces", "patchfaces res shape face newface",
|
||||
__FILE__,patchfaces,g);
|
||||
}
|
||||
|
@@ -331,6 +331,34 @@ Standard_Boolean Draw_Interpretor::Remove(Standard_CString const n)
|
||||
return result == 0;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : GetHelp
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Standard_CString Draw_Interpretor::GetHelp (Standard_CString theCommandName) const
|
||||
{
|
||||
return Tcl_GetVar2 (myInterp, "Draw_Helps", theCommandName, TCL_GLOBAL_ONLY);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : ErrorOnWrongArgs
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Standard_Integer Draw_Interpretor::ErrorOnWrongArgs (Standard_CString theCommandName) const
|
||||
{
|
||||
std::cerr << "Error: wrong number of arguments" << std::endl;
|
||||
|
||||
Standard_CString aHelp = GetHelp (theCommandName);
|
||||
if (aHelp)
|
||||
{
|
||||
std::cerr << "Use: " << theCommandName << " " << aHelp << std::endl;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Result
|
||||
//purpose :
|
||||
|
@@ -164,6 +164,16 @@ public:
|
||||
//! Removes <theCommandName>, returns true if success (the command existed).
|
||||
Standard_EXPORT Standard_Boolean Remove (const Standard_CString theCommandName);
|
||||
|
||||
//! Returns text of the help recorded for command theCommandName
|
||||
//! (previously added by method Add() or by command "help" in Tcl interpretor).
|
||||
//! Returns Null if no help string is defined for theCommandName.
|
||||
Standard_EXPORT Standard_CString GetHelp (Standard_CString theCommandName) const;
|
||||
|
||||
//! Prints (to std::cerr) standard error message for theCommandName called with
|
||||
//! wrong number of arguments. The message includes help for this command.
|
||||
//! Returns 1 indicating error status for Tcl command.
|
||||
Standard_EXPORT Standard_Integer ErrorOnWrongArgs (Standard_CString theCommandName) const;
|
||||
|
||||
public:
|
||||
|
||||
Standard_EXPORT Standard_CString Result() const;
|
||||
|
@@ -294,6 +294,8 @@ GccAna_Circ2d3Tan::
|
||||
else {
|
||||
TheSame1(NbrSol) = 0;
|
||||
gp_Dir2d dc(center1.XY()-Center.XY());
|
||||
if (qualifier1(NbrSol) == GccEnt_enclosed)
|
||||
dc.Reverse(); // if tangent circle is inside the source circle, moving to edge of source circle
|
||||
pnttg1sol(NbrSol)=gp_Pnt2d(Center.XY()+Radius(k1)*dc.XY());
|
||||
par1sol(NbrSol)=ElCLib::Parameter(cirsol(NbrSol),
|
||||
pnttg1sol(NbrSol));
|
||||
|
@@ -185,9 +185,10 @@ GccAna_Circ2d3Tan::
|
||||
else {
|
||||
TheSame1(NbrSol) = 0;
|
||||
gp_Dir2d dc(center1.XY()-Center.XY());
|
||||
if (qualifier1(NbrSol) == GccEnt_enclosed)
|
||||
dc.Reverse(); // if tangent circle is inside the source circle, moving to edge of source circle
|
||||
pnttg1sol(NbrSol)=gp_Pnt2d(Center.XY()+Radius(nbsol3)*dc.XY());
|
||||
par1sol(NbrSol)=ElCLib::Parameter(cirsol(NbrSol),
|
||||
pnttg1sol(NbrSol));
|
||||
par1sol(NbrSol)=ElCLib::Parameter(cirsol(NbrSol), pnttg1sol(NbrSol));
|
||||
pararg1(NbrSol)=ElCLib::Parameter(C1,pnttg1sol(NbrSol));
|
||||
}
|
||||
|
||||
|
@@ -22,6 +22,45 @@
|
||||
#include <GccEnt_QualifiedLin.hxx>
|
||||
#include <gp_Circ2d.hxx>
|
||||
#include <gp_Lin2d.hxx>
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
|
||||
namespace
|
||||
{
|
||||
static Standard_CString GccEnt_Table_PrintPosition[5] =
|
||||
{
|
||||
"UNQUALIFIED", "ENCLOSING", "ENCLOSED", "OUTSIDE", "NOQUALIFIER"
|
||||
};
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : PositionToString
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_CString GccEnt::PositionToString (GccEnt_Position thePosition)
|
||||
{
|
||||
return GccEnt_Table_PrintPosition[thePosition];
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : PositionFromString
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_Boolean GccEnt::PositionFromString (Standard_CString thePositionString,
|
||||
GccEnt_Position& thePosition)
|
||||
{
|
||||
TCollection_AsciiString aName (thePositionString);
|
||||
aName.UpperCase();
|
||||
for (Standard_Integer aTypeIter = 0; aTypeIter <= GccEnt_noqualifier; ++aTypeIter)
|
||||
{
|
||||
Standard_CString aTypeName = GccEnt_Table_PrintPosition[aTypeIter];
|
||||
if (aName == aTypeName)
|
||||
{
|
||||
thePosition = GccEnt_Position(aTypeIter);
|
||||
return Standard_True;
|
||||
}
|
||||
}
|
||||
return Standard_False;
|
||||
}
|
||||
|
||||
GccEnt_QualifiedLin
|
||||
GccEnt::Unqualified(const gp_Lin2d& Line) {
|
||||
|
@@ -17,6 +17,7 @@
|
||||
#ifndef _GccEnt_HeaderFile
|
||||
#define _GccEnt_HeaderFile
|
||||
|
||||
#include <GccEnt_Position.hxx>
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
@@ -53,6 +54,34 @@ public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Prints the name of Position type as a String on the Stream.
|
||||
static Standard_OStream& Print (const GccEnt_Position thePosition, Standard_OStream& theStream)
|
||||
{
|
||||
return (theStream << PositionToString (thePosition));
|
||||
}
|
||||
|
||||
//! Returns the string name for a given position.
|
||||
//! @param thePosition position type
|
||||
//! @return string identifier from the list UNQUALIFIED ENCLOSING ENCLOSED OUTSIDE NOQUALIFIER
|
||||
Standard_EXPORT static Standard_CString PositionToString (GccEnt_Position thePosition);
|
||||
|
||||
//! Returns the position from the given string identifier (using case-insensitive comparison).
|
||||
//! @param thePositionString string identifier
|
||||
//! @return position or GccEnt_unqualified if string identifier is invalid
|
||||
static GccEnt_Position PositionFromString (Standard_CString thePositionString)
|
||||
{
|
||||
GccEnt_Position aPosition = GccEnt_unqualified;
|
||||
PositionFromString (thePositionString, aPosition);
|
||||
return aPosition;
|
||||
}
|
||||
|
||||
//! Determines the position from the given string identifier (using case-insensitive comparison).
|
||||
//! @param thePositionString string identifier
|
||||
//! @param thePosition detected shape type
|
||||
//! @return TRUE if string identifier is known
|
||||
Standard_EXPORT static Standard_Boolean PositionFromString (Standard_CString thePositionString,
|
||||
GccEnt_Position& thePosition);
|
||||
|
||||
//! Constructs a qualified line,
|
||||
//! so that the relative position to the circle or line of the
|
||||
|
@@ -5,6 +5,9 @@ GeometryTest_APICommands.cxx
|
||||
GeometryTest_ConstraintCommands.cxx
|
||||
GeometryTest_ContinuityCommands.cxx
|
||||
GeometryTest_CurveCommands.cxx
|
||||
GeometryTest_CurveTanCommands.cxx
|
||||
GeometryTest_DrawableQualifiedCurve2d.cxx
|
||||
GeometryTest_DrawableQualifiedCurve2d.hxx
|
||||
GeometryTest_FairCurveCommands.cxx
|
||||
GeometryTest_PolyCommands.cxx
|
||||
GeometryTest_SurfaceCommands.cxx
|
||||
|
@@ -30,6 +30,7 @@ void GeometryTest::AllCommands(Draw_Interpretor& theCommands)
|
||||
|
||||
GeomliteTest::AllCommands(theCommands);
|
||||
GeometryTest::CurveCommands(theCommands);
|
||||
GeometryTest::CurveTanCommands(theCommands);
|
||||
GeometryTest::FairCurveCommands(theCommands);
|
||||
GeometryTest::SurfaceCommands(theCommands);
|
||||
GeometryTest::ConstraintCommands(theCommands);
|
||||
|
@@ -39,6 +39,9 @@ public:
|
||||
//! defines curve commands.
|
||||
Standard_EXPORT static void CurveCommands (Draw_Interpretor& I);
|
||||
|
||||
//! defines tangent curve commands.
|
||||
Standard_EXPORT static void CurveTanCommands (Draw_Interpretor& I);
|
||||
|
||||
//! defines fair curve commands.
|
||||
Standard_EXPORT static void FairCurveCommands (Draw_Interpretor& I);
|
||||
|
||||
|
340
src/GeometryTest/GeometryTest_CurveTanCommands.cxx
Normal file
@@ -0,0 +1,340 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 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.
|
||||
|
||||
#include <Draw.hxx>
|
||||
#include <DrawTrSurf.hxx>
|
||||
#include <Draw_Interpretor.hxx>
|
||||
#include <GccAna_Circ2d3Tan.hxx>
|
||||
#include <GccEnt.hxx>
|
||||
#include <GccEnt_QualifiedLin.hxx>
|
||||
#include <GccEnt_QualifiedCirc.hxx>
|
||||
#include <Geom2d_Line.hxx>
|
||||
#include <Geom2d_Circle.hxx>
|
||||
#include <Geom2dAdaptor_Curve.hxx>
|
||||
#include <GeometryTest.hxx>
|
||||
#include <GeometryTest_DrawableQualifiedCurve2d.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
#include <stdio.h>
|
||||
|
||||
//=======================================================================
|
||||
//function : qcircle
|
||||
//purpose : Parses command: "qcircle name x y radius [-unqualified|-enclosing|-enclosed|-outside|-noqualifier]"
|
||||
//=======================================================================
|
||||
static Standard_Integer qcurve (Draw_Interpretor&, Standard_Integer theArgsNb, const char** theArgVec)
|
||||
{
|
||||
if (theArgsNb < 5)
|
||||
{
|
||||
cout << "Error: wrong number of arguments.\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
Handle(Geom2d_Curve) aResult2d;
|
||||
TCollection_AsciiString aPositionType;
|
||||
if (!strcmp (theArgVec[0], "qcircle"))
|
||||
{
|
||||
if (theArgsNb == 5 || theArgsNb == 6)
|
||||
aResult2d = new Geom2d_Circle (gp_Ax22d (gp_Pnt2d (Draw::Atof (theArgVec[2]), Draw::Atof (theArgVec[3])),
|
||||
gp_Dir2d (1,0)), Draw::Atof (theArgVec[4]));
|
||||
else if (theArgsNb == 7 || theArgsNb == 8)
|
||||
aResult2d = new Geom2d_Circle (gp_Ax22d (gp_Pnt2d (Draw::Atof (theArgVec[2]), Draw::Atof (theArgVec[3])),
|
||||
gp_Dir2d (Draw::Atof (theArgVec[4]), Draw::Atof (theArgVec[5]))), Draw::Atof (theArgVec[6]));
|
||||
|
||||
if (theArgsNb == 6)
|
||||
aPositionType = theArgVec[5];
|
||||
else if (theArgsNb == 8)
|
||||
aPositionType = theArgVec[7];
|
||||
}
|
||||
else if(!strcmp (theArgVec[0], "qline"))
|
||||
{
|
||||
if (theArgsNb < 6)
|
||||
{
|
||||
cout << "Error: wrong number of arguments.\n";
|
||||
return 1;
|
||||
}
|
||||
aResult2d = new Geom2d_Line (gp_Pnt2d (Draw::Atof (theArgVec[2]), Draw::Atof (theArgVec[3])),
|
||||
gp_Dir2d (Draw::Atof (theArgVec[4]), Draw::Atof (theArgVec[5])));
|
||||
if (theArgsNb == 7)
|
||||
aPositionType = theArgVec[6];
|
||||
}
|
||||
else
|
||||
{
|
||||
cout << "Error: wrong command name.\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
GccEnt_Position aKindOfPosition = GccEnt_unqualified;
|
||||
if (!aPositionType.IsEmpty())
|
||||
{
|
||||
GccEnt_Position aParameterPosition;
|
||||
if (GccEnt::PositionFromString (aPositionType.ToCString(), aParameterPosition))
|
||||
aKindOfPosition = aParameterPosition;
|
||||
}
|
||||
|
||||
Draw::Set (theArgVec[1], new GeometryTest_DrawableQualifiedCurve2d (aResult2d, aKindOfPosition));
|
||||
return 0;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : solutions
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
static Standard_Integer solutions (Draw_Interpretor& theDI, GccAna_Circ2d3Tan& theCirTan3, const char* theName)
|
||||
{
|
||||
if (!theCirTan3.IsDone())
|
||||
{
|
||||
cout << "GccAna_Circ2d3Tan is not done";
|
||||
return 1;
|
||||
}
|
||||
|
||||
TCollection_AsciiString aName = TCollection_AsciiString (theName) + "_";
|
||||
GccEnt_Position aQualifier1, aQualifier2, aQualifier3;
|
||||
Standard_Real aParSol, aParArg;
|
||||
gp_Pnt2d aPntSol;
|
||||
for (Standard_Integer aSolId = 1; aSolId <= theCirTan3.NbSolutions(); aSolId++)
|
||||
{
|
||||
Handle(Geom2d_Circle) aCircle = new Geom2d_Circle (theCirTan3.ThisSolution (aSolId));
|
||||
TCollection_AsciiString aSolIdName = aName;
|
||||
aSolIdName += TCollection_AsciiString (aSolId);
|
||||
DrawTrSurf::Set (aSolIdName.ToCString(), aCircle);
|
||||
theCirTan3.WhichQualifier (aSolId, aQualifier1, aQualifier2, aQualifier3);
|
||||
theDI << "circle: " << aSolIdName.ToCString() << ", " << "qualifiers: " << GccEnt::PositionToString (aQualifier1)
|
||||
<< ", " << GccEnt::PositionToString (aQualifier2) << ", " << GccEnt::PositionToString (aQualifier3) << "\n";
|
||||
|
||||
theDI << " tangent points: point (parameter on solution, parameter on argument)\n";
|
||||
// the first tangent point
|
||||
if (theCirTan3.IsTheSame1 (aSolId))
|
||||
theDI << " " << "= the solution number " << aSolId << " is equal to the first argument\n";
|
||||
else
|
||||
{
|
||||
theCirTan3.Tangency1 (aSolId, aParSol, aParArg, aPntSol);
|
||||
TCollection_AsciiString aTanPntIdName = aSolIdName + "_tp_1";
|
||||
DrawTrSurf::Set (aTanPntIdName.ToCString(), aPntSol);
|
||||
theDI << " " << aTanPntIdName.ToCString() << " (" << aParSol << ", " << aParArg << ")\n";
|
||||
}
|
||||
// the second tangent point
|
||||
if (theCirTan3.IsTheSame2 (aSolId))
|
||||
theDI << " " << "= the solution number " << aSolId << " is equal to the second argument\n";
|
||||
else
|
||||
{
|
||||
theCirTan3.Tangency2 (aSolId, aParSol, aParArg, aPntSol);
|
||||
TCollection_AsciiString aTanPntIdName = aSolIdName + "_tp_2";
|
||||
DrawTrSurf::Set (aTanPntIdName.ToCString(), aPntSol);
|
||||
theDI << " " << aTanPntIdName.ToCString() << " (" << aParSol << ", " << aParArg << ")\n";
|
||||
}
|
||||
// the third tangent point
|
||||
if (theCirTan3.IsTheSame3 (aSolId))
|
||||
theDI << " " << "= the solution number " << aSolId << " is equal to the third argument\n";
|
||||
else
|
||||
{
|
||||
theCirTan3.Tangency3 (aSolId, aParSol, aParArg, aPntSol);
|
||||
TCollection_AsciiString aTanPntIdName = aSolIdName + "_tp_3";
|
||||
DrawTrSurf::Set (aTanPntIdName.ToCString(), aPntSol);
|
||||
theDI << " " << aTanPntIdName.ToCString() << " (" << aParSol << ", " << aParArg << ")";
|
||||
}
|
||||
if (aSolId != theCirTan3.NbSolutions())
|
||||
theDI << "\n";
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : circ2d3Tan
|
||||
//purpose : Parses command: [circ2d3Tan cname qcicrle1/qlin1/point1 qcicrle2/qlin2/point2 qcicrle3/qlin3/point3
|
||||
// tolerance]
|
||||
//=======================================================================
|
||||
static Standard_Integer circ2d3Tan (Draw_Interpretor& theDI, Standard_Integer theArgsNb, const char** theArgVec)
|
||||
{
|
||||
if (theArgsNb < 5)
|
||||
{
|
||||
cout << "Error: wrong number of arguments.\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
Handle(GeometryTest_DrawableQualifiedCurve2d) aQCurve1 =
|
||||
Handle(GeometryTest_DrawableQualifiedCurve2d)::DownCast (Draw::Get (theArgVec[2]));
|
||||
Handle(GeometryTest_DrawableQualifiedCurve2d) aQCurve2 =
|
||||
Handle(GeometryTest_DrawableQualifiedCurve2d)::DownCast (Draw::Get (theArgVec[3]));
|
||||
Handle(GeometryTest_DrawableQualifiedCurve2d) aQCurve3 =
|
||||
Handle(GeometryTest_DrawableQualifiedCurve2d)::DownCast (Draw::Get (theArgVec[4]));
|
||||
|
||||
gp_Pnt2d aPoint1, aPoint2, aPoint3;
|
||||
Standard_Boolean anIsPoint1 = DrawTrSurf::GetPoint2d (theArgVec[2], aPoint1);
|
||||
Standard_Boolean anIsPoint2 = DrawTrSurf::GetPoint2d (theArgVec[3], aPoint2);
|
||||
Standard_Boolean anIsPoint3 = DrawTrSurf::GetPoint2d (theArgVec[4], aPoint3);
|
||||
|
||||
Standard_Real aTolerance = Precision::Confusion();
|
||||
if (theArgsNb > 5)
|
||||
aTolerance = Draw::Atof (theArgVec[5]);
|
||||
|
||||
if (aQCurve1.IsNull()) // <point, point, point>
|
||||
{
|
||||
if (!anIsPoint1 || !anIsPoint2 || !anIsPoint3)
|
||||
{
|
||||
cout << "Error: wrong points definition.\n";
|
||||
return 1;
|
||||
}
|
||||
GccAna_Circ2d3Tan aCircBuilder (aPoint1, aPoint2, aPoint3, aTolerance);
|
||||
return solutions (theDI, aCircBuilder, theArgVec[1]);
|
||||
}
|
||||
|
||||
// the first curve is not NULL
|
||||
if (aQCurve2.IsNull()) // <qcircle, point, point> or <qlin, point, point>
|
||||
{
|
||||
if (!anIsPoint2 || !anIsPoint3)
|
||||
{
|
||||
cout << "Error: wrong points definition.\n";
|
||||
return 1;
|
||||
}
|
||||
Geom2dAdaptor_Curve anAdaptorCurve1 (aQCurve1->GetCurve());
|
||||
if (anAdaptorCurve1.GetType() == GeomAbs_Circle)
|
||||
{
|
||||
GccEnt_QualifiedCirc aQualifiedCircle1 (anAdaptorCurve1.Circle(), aQCurve1->GetPosition());
|
||||
GccAna_Circ2d3Tan aCircBuilder (aQualifiedCircle1, aPoint2, aPoint3, aTolerance);
|
||||
return solutions (theDI, aCircBuilder, theArgVec[1]);
|
||||
}
|
||||
else if (anAdaptorCurve1.GetType() == GeomAbs_Line)
|
||||
{
|
||||
GccEnt_QualifiedLin aQualifiedLin1 (anAdaptorCurve1.Line(), aQCurve1->GetPosition());
|
||||
GccAna_Circ2d3Tan aCircBuilder (aQualifiedLin1, aPoint2, aPoint3, aTolerance);
|
||||
return solutions (theDI, aCircBuilder, theArgVec[1]);
|
||||
}
|
||||
cout << "Error: wrong curve type.\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
// the first and the second curves are not NULL
|
||||
if (aQCurve3.IsNull()) // <qcircle, qcircle, point> or <qcircle, qlin, point> or <qlin, qlin, point>
|
||||
{
|
||||
if (!anIsPoint3)
|
||||
{
|
||||
cout << "Error: wrong point definition.\n";
|
||||
return 1;
|
||||
}
|
||||
Geom2dAdaptor_Curve anAdaptorCurve1 (aQCurve1->GetCurve());
|
||||
Geom2dAdaptor_Curve anAdaptorCurve2 (aQCurve2->GetCurve());
|
||||
if (anAdaptorCurve1.GetType() == GeomAbs_Circle && anAdaptorCurve2.GetType() == GeomAbs_Circle)
|
||||
{
|
||||
GccEnt_QualifiedCirc aQualifiedCircle1 (anAdaptorCurve1.Circle(), aQCurve1->GetPosition());
|
||||
GccEnt_QualifiedCirc aQualifiedCircle2 (anAdaptorCurve2.Circle(), aQCurve2->GetPosition());
|
||||
GccAna_Circ2d3Tan aCircBuilder (aQualifiedCircle1, aQualifiedCircle2, aPoint3, aTolerance);
|
||||
return solutions (theDI, aCircBuilder, theArgVec[1]);
|
||||
}
|
||||
else if (anAdaptorCurve1.GetType() == GeomAbs_Circle && anAdaptorCurve2.GetType() == GeomAbs_Line)
|
||||
{
|
||||
GccEnt_QualifiedCirc aQualifiedCircle1 (anAdaptorCurve1.Circle(), aQCurve1->GetPosition());
|
||||
GccEnt_QualifiedLin aQualifiedLin2 (anAdaptorCurve2.Line(), aQCurve2->GetPosition());
|
||||
GccAna_Circ2d3Tan aCircBuilder (aQualifiedCircle1, aQualifiedLin2, aPoint3, aTolerance);
|
||||
return solutions (theDI, aCircBuilder, theArgVec[1]);
|
||||
}
|
||||
else if (anAdaptorCurve1.GetType() == GeomAbs_Line && anAdaptorCurve2.GetType() == GeomAbs_Line)
|
||||
{
|
||||
GccEnt_QualifiedLin aQualifiedLin1 (anAdaptorCurve1.Line(), aQCurve1->GetPosition());
|
||||
GccEnt_QualifiedLin aQualifiedLin2 (anAdaptorCurve2.Line(), aQCurve2->GetPosition());
|
||||
GccAna_Circ2d3Tan aCircBuilder (aQualifiedLin1, aQualifiedLin2, aPoint3, aTolerance);
|
||||
return solutions (theDI, aCircBuilder, theArgVec[1]);
|
||||
}
|
||||
cout << "Error: wrong curve type.\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
// the first, the second and the third curves are not NULL
|
||||
// <qcircle, qcircle, qcircle> or <qcircle, qcircle, qlin>, <qcircle, qlin, qlin>, <qlin, qlin, qlin>
|
||||
Geom2dAdaptor_Curve anAdaptorCurve1 (aQCurve1->GetCurve());
|
||||
Geom2dAdaptor_Curve anAdaptorCurve2 (aQCurve2->GetCurve());
|
||||
Geom2dAdaptor_Curve anAdaptorCurve3 (aQCurve3->GetCurve());
|
||||
if (anAdaptorCurve1.GetType() == GeomAbs_Circle && anAdaptorCurve2.GetType() == GeomAbs_Circle &&
|
||||
anAdaptorCurve3.GetType() == GeomAbs_Circle)
|
||||
{
|
||||
GccEnt_QualifiedCirc aQualifiedCircle1 (anAdaptorCurve1.Circle(), aQCurve1->GetPosition());
|
||||
GccEnt_QualifiedCirc aQualifiedCircle2 (anAdaptorCurve2.Circle(), aQCurve2->GetPosition());
|
||||
GccEnt_QualifiedCirc aQualifiedCircle3 (anAdaptorCurve3.Circle(), aQCurve3->GetPosition());
|
||||
GccAna_Circ2d3Tan aCircBuilder (aQualifiedCircle1, aQualifiedCircle2, aQualifiedCircle3, aTolerance);
|
||||
return solutions (theDI, aCircBuilder, theArgVec[1]);
|
||||
}
|
||||
if (anAdaptorCurve1.GetType() == GeomAbs_Circle && anAdaptorCurve2.GetType() == GeomAbs_Circle &&
|
||||
anAdaptorCurve3.GetType() == GeomAbs_Line)
|
||||
{
|
||||
GccEnt_QualifiedCirc aQualifiedCircle1 (anAdaptorCurve1.Circle(), aQCurve1->GetPosition());
|
||||
GccEnt_QualifiedCirc aQualifiedCircle2 (anAdaptorCurve2.Circle(), aQCurve2->GetPosition());
|
||||
GccEnt_QualifiedLin aQualifiedLin3 (anAdaptorCurve3.Line(), aQCurve3->GetPosition());
|
||||
GccAna_Circ2d3Tan aCircBuilder (aQualifiedCircle1, aQualifiedCircle2, aQualifiedLin3, aTolerance);
|
||||
return solutions (theDI, aCircBuilder, theArgVec[1]);
|
||||
}
|
||||
if (anAdaptorCurve1.GetType() == GeomAbs_Circle && anAdaptorCurve2.GetType() == GeomAbs_Line &&
|
||||
anAdaptorCurve3.GetType() == GeomAbs_Line)
|
||||
{
|
||||
GccEnt_QualifiedCirc aQualifiedCircle1 (anAdaptorCurve1.Circle(), aQCurve1->GetPosition());
|
||||
GccEnt_QualifiedLin aQualifiedLin2 (anAdaptorCurve2.Line(), aQCurve2->GetPosition());
|
||||
GccEnt_QualifiedLin aQualifiedLin3 (anAdaptorCurve3.Line(), aQCurve3->GetPosition());
|
||||
GccAna_Circ2d3Tan aCircBuilder (aQualifiedCircle1, aQualifiedLin2, aQualifiedLin3, aTolerance);
|
||||
return solutions (theDI, aCircBuilder, theArgVec[1]);
|
||||
}
|
||||
if (anAdaptorCurve1.GetType() == GeomAbs_Line && anAdaptorCurve2.GetType() == GeomAbs_Line &&
|
||||
anAdaptorCurve3.GetType() == GeomAbs_Line)
|
||||
{
|
||||
GccEnt_QualifiedLin aQualifiedLin1 (anAdaptorCurve1.Line(), aQCurve1->GetPosition());
|
||||
GccEnt_QualifiedLin aQualifiedLin2 (anAdaptorCurve2.Line(), aQCurve2->GetPosition());
|
||||
GccEnt_QualifiedLin aQualifiedLin3 (anAdaptorCurve3.Line(), aQCurve3->GetPosition());
|
||||
GccAna_Circ2d3Tan aCircBuilder (aQualifiedLin1, aQualifiedLin2, aQualifiedLin3, aTolerance);
|
||||
return solutions (theDI, aCircBuilder, theArgVec[1]);
|
||||
}
|
||||
|
||||
cout << "Error: wrong curve type.\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : CurveTanCommands
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void GeometryTest::CurveTanCommands (Draw_Interpretor& theCommands)
|
||||
{
|
||||
static Standard_Boolean aLoaded = Standard_False;
|
||||
if (aLoaded) return;
|
||||
aLoaded = Standard_True;
|
||||
|
||||
DrawTrSurf::BasicCommands (theCommands);
|
||||
|
||||
const char* aGroup;
|
||||
aGroup = "GEOMETRY tangent curves creation";
|
||||
|
||||
theCommands.Add ("qcircle",
|
||||
"qcircle name {x y [ux uy] radius} [-unqualified|-enclosing|-enclosed|-outside|-noqualifier]"
|
||||
"\n\t\t: Creates qualified circle.",
|
||||
__FILE__, qcurve, aGroup);
|
||||
|
||||
theCommands.Add ("qline",
|
||||
"qline name x y dx dy [-unqualified|-enclosing|-enclosed|-outside|-noqualifier]"
|
||||
"\n\t\t: Creates qualified line.",
|
||||
__FILE__, qcurve, aGroup);
|
||||
|
||||
theCommands.Add ("circ2d3Tan",
|
||||
"circ2d3Tan cname {qcicrle1|qlin1|point1} {qcicrle2|qlin2|point2} {qcicrle3|qlin3|point3} [tolerance]"
|
||||
"\n\t\t: Creates 2d circles tangent to 3 arguments. The arguments are points, lines or circles."
|
||||
"\n\t\t: Possible arguments combinations:"
|
||||
"\n\t\t: <qcircle, qcircle, qcircle>,"
|
||||
"\n\t\t: <qcircle, qcircle, qlin>,"
|
||||
"\n\t\t: <qcircle, qcircle, point>,"
|
||||
"\n\t\t: <qcircle, qlin, qlin>,"
|
||||
"\n\t\t: <qcircle, qlin, point>,"
|
||||
"\n\t\t: <qcircle, qlin, qlin>,"
|
||||
"\n\t\t: <qcircle, point, point>,"
|
||||
"\n\t\t: <qlin, qlin, qlin>,"
|
||||
"\n\t\t: <qlin, qlin, point>,"
|
||||
"\n\t\t: <qlin, point, point>,"
|
||||
"\n\t\t: <point, point, point>.",
|
||||
__FILE__, circ2d3Tan, aGroup);
|
||||
}
|
96
src/GeometryTest/GeometryTest_DrawableQualifiedCurve2d.cxx
Normal file
@@ -0,0 +1,96 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 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.
|
||||
|
||||
#include <GeometryTest_DrawableQualifiedCurve2d.hxx>
|
||||
|
||||
#include <GccEnt.hxx>
|
||||
#include <Geom2d_Circle.hxx>
|
||||
#include <Geom2d_Curve.hxx>
|
||||
#include <Geom2d_Line.hxx>
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT(GeometryTest_DrawableQualifiedCurve2d, DrawTrSurf_Curve2d)
|
||||
|
||||
//=======================================================================
|
||||
//function : GeometryTest_DrawableQualifiedCurve2d
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
GeometryTest_DrawableQualifiedCurve2d::GeometryTest_DrawableQualifiedCurve2d (const Handle(Geom2d_Curve)& theCurve,
|
||||
const GccEnt_Position thePosition,
|
||||
const Standard_Boolean theDispOrigin)
|
||||
: DrawTrSurf_Curve2d (theCurve, theDispOrigin), myPosition (thePosition)
|
||||
{
|
||||
look = Draw_orange;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : GeometryTest_DrawableQualifiedCurve2d
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
GeometryTest_DrawableQualifiedCurve2d::GeometryTest_DrawableQualifiedCurve2d (const Handle(Geom2d_Curve)& theCurve,
|
||||
const Draw_Color& theColor,
|
||||
const Standard_Integer theDiscret,
|
||||
const GccEnt_Position thePosition,
|
||||
const Standard_Boolean theDispOrigin,
|
||||
const Standard_Boolean theDispCurvRadius,
|
||||
const Standard_Real theRadiusMax,
|
||||
const Standard_Real theRatioOfRadius)
|
||||
: DrawTrSurf_Curve2d (theCurve, theColor, theDiscret, theDispOrigin, theDispCurvRadius, theRadiusMax, theRatioOfRadius),
|
||||
myPosition (thePosition)
|
||||
{
|
||||
look = Draw_orange;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : DrawOn
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void GeometryTest_DrawableQualifiedCurve2d::DrawOn (Draw_Display& theDisplay) const
|
||||
{
|
||||
DrawTrSurf_Curve2d::DrawOn (theDisplay);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Dump
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void GeometryTest_DrawableQualifiedCurve2d::Dump (Standard_OStream& theStream) const
|
||||
{
|
||||
theStream << "Qualified curve 2D: \n";
|
||||
theStream << "Position :" << GccEnt::PositionToString (myPosition) << "\n";
|
||||
DrawTrSurf_Curve2d::Dump (theStream);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Whatis
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void GeometryTest_DrawableQualifiedCurve2d::Whatis (Draw_Interpretor& theDI)const
|
||||
{
|
||||
Handle(Standard_Type) aType = GetCurve()->DynamicType();
|
||||
|
||||
if (aType == STANDARD_TYPE (Geom2d_Circle))
|
||||
{
|
||||
theDI << "qualified 2d Circle";
|
||||
}
|
||||
else if (aType == STANDARD_TYPE (Geom2d_Line))
|
||||
{
|
||||
theDI << "qualified 2d Line";
|
||||
}
|
||||
}
|
88
src/GeometryTest/GeometryTest_DrawableQualifiedCurve2d.hxx
Normal file
@@ -0,0 +1,88 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 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 _GeometryTest_DrawableQualifiedCirc_HeaderFile
|
||||
#define _GeometryTest_DrawableQualifiedCirc_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <DrawTrSurf_Curve2d.hxx>
|
||||
#include <GccEnt_Position.hxx>
|
||||
|
||||
class Geom2d_Curve;
|
||||
|
||||
class GeometryTest_DrawableQualifiedCurve2d;
|
||||
DEFINE_STANDARD_HANDLE(GeometryTest_DrawableQualifiedCurve2d, DrawTrSurf_Curve)
|
||||
|
||||
//! Create geom curve drawable presentation with the position of a solution of a construction algorithm.
|
||||
class GeometryTest_DrawableQualifiedCurve2d : public DrawTrSurf_Curve2d
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Creates a drawable curve from a curve of package Geom.
|
||||
Standard_EXPORT GeometryTest_DrawableQualifiedCurve2d (const Handle(Geom2d_Curve)& theCurve,
|
||||
const GccEnt_Position thePosition,
|
||||
const Standard_Boolean theDispOrigin = Standard_True);
|
||||
|
||||
//! Creates a drawable curve from a curve of package Geom.
|
||||
Standard_EXPORT GeometryTest_DrawableQualifiedCurve2d (const Handle(Geom2d_Curve)& theCurve,
|
||||
const Draw_Color& theColor,
|
||||
const Standard_Integer theDiscret,
|
||||
const GccEnt_Position thePosition,
|
||||
const Standard_Boolean theDispOrigin = Standard_True,
|
||||
const Standard_Boolean theDispCurvRadius = Standard_False,
|
||||
const Standard_Real theRadiusMax = 1.0e3,
|
||||
const Standard_Real theRatioOfRadius = 0.1);
|
||||
|
||||
//! \returns position of a solution
|
||||
Standard_EXPORT GccEnt_Position GetPosition() const { return myPosition; }
|
||||
|
||||
//! Sets position of a solution
|
||||
//! \param thePosition the value
|
||||
void SetPosition (const GccEnt_Position thePosition) { myPosition = thePosition; }
|
||||
|
||||
//! Paints the drawable presentation in given display
|
||||
//! \param theDisplay
|
||||
Standard_EXPORT void DrawOn (Draw_Display& theDisplay) const Standard_OVERRIDE;
|
||||
|
||||
//! For variable dump.
|
||||
Standard_EXPORT virtual void Dump (Standard_OStream& S) const Standard_OVERRIDE;
|
||||
|
||||
//! For variable whatis command. Set as a result the
|
||||
//! type of the variable.
|
||||
Standard_EXPORT virtual void Whatis (Draw_Interpretor& I) const Standard_OVERRIDE;
|
||||
|
||||
DEFINE_STANDARD_RTTIEXT(GeometryTest_DrawableQualifiedCurve2d, DrawTrSurf_Curve2d)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
GccEnt_Position myPosition;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _GeometryTest_DrawableQualifiedCirc_HeaderFile
|
@@ -174,16 +174,26 @@ IntCurvesFace_Intersector::IntCurvesFace_Intersector(const TopoDS_Face& Face,
|
||||
if (nbsu > aMaxSamples) nbsu = aMaxSamples;
|
||||
if (nbsv > aMaxSamples) nbsv = aMaxSamples;
|
||||
|
||||
if (Max(dU, dV) > Min(dU, dV) * aTresh)
|
||||
{
|
||||
aMinSamples = 10;
|
||||
nbsu = (Standard_Integer)(Sqrt(dU / dV) * aMaxSamples);
|
||||
if (nbsu < aMinSamples) nbsu = aMinSamples;
|
||||
nbsv = aMaxSamples2 / nbsu;
|
||||
if (nbsv < aMinSamples)
|
||||
if (dU > gp::Resolution() && dV > gp::Resolution()) {
|
||||
if (Max(dU, dV) > Min(dU, dV) * aTresh)
|
||||
{
|
||||
nbsv = aMinSamples;
|
||||
nbsu = aMaxSamples2 / aMinSamples;
|
||||
aMinSamples = 10;
|
||||
nbsu = (Standard_Integer)(Sqrt(dU / dV) * aMaxSamples);
|
||||
if (nbsu < aMinSamples) nbsu = aMinSamples;
|
||||
nbsv = aMaxSamples2 / nbsu;
|
||||
if (nbsv < aMinSamples)
|
||||
{
|
||||
nbsv = aMinSamples;
|
||||
nbsu = aMaxSamples2 / aMinSamples;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (dU < gp::Resolution()) {
|
||||
nbsu = 1;
|
||||
}
|
||||
if (dV < gp::Resolution()) {
|
||||
nbsv = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -223,12 +223,14 @@ public:
|
||||
Standard_EXPORT virtual void UnsetAttributes();
|
||||
|
||||
//! Returns the hilight attributes settings.
|
||||
//! When not NULL, overrides both Prs3d_TypeOfHighlight_LocalSelected and Prs3d_TypeOfHighlight_Selected defined within AIS_InteractiveContext.
|
||||
const Handle(Prs3d_Drawer)& HilightAttributes() const { return myHilightDrawer; }
|
||||
|
||||
//! Initializes the hilight drawing tool theDrawer.
|
||||
virtual void SetHilightAttributes(const Handle(Prs3d_Drawer)& theDrawer) { myHilightDrawer = theDrawer; }
|
||||
|
||||
//! Returns the hilight attributes settings.
|
||||
//! When not NULL, overrides both Prs3d_TypeOfHighlight_LocalDynamic and Prs3d_TypeOfHighlight_Dynamic defined within AIS_InteractiveContext.
|
||||
const Handle(Prs3d_Drawer)& DynamicHilightAttributes() const { return myDynHilightDrawer; }
|
||||
|
||||
//! Initializes the dynamic hilight drawing tool.
|
||||
|
@@ -80,6 +80,9 @@ namespace
|
||||
//! Creates Poly_Triangulation from collected data
|
||||
Handle(Poly_Triangulation) GetTriangulation()
|
||||
{
|
||||
if (myTriangles.IsEmpty())
|
||||
return Handle(Poly_Triangulation)();
|
||||
|
||||
Handle(Poly_Triangulation) aPoly = new Poly_Triangulation (myNodes.Length(), myTriangles.Length(), Standard_False);
|
||||
for (Standard_Integer aNodeIter = 0; aNodeIter < myNodes.Size(); ++aNodeIter)
|
||||
{
|
||||
@@ -109,10 +112,9 @@ Handle(Poly_Triangulation) RWStl::ReadFile (const Standard_CString theFile,
|
||||
const Handle(Message_ProgressIndicator)& theProgress)
|
||||
{
|
||||
Reader aReader;
|
||||
if (!aReader.Read (theFile, theProgress))
|
||||
{
|
||||
return Handle(Poly_Triangulation)();
|
||||
}
|
||||
aReader.Read (theFile, theProgress);
|
||||
// note that returned bool value is ignored intentionally -- even if something went wrong,
|
||||
// but some data have been read, we at least will return these data
|
||||
return aReader.GetTriangulation();
|
||||
}
|
||||
|
||||
@@ -209,10 +211,15 @@ Handle(Poly_Triangulation) RWStl::ReadAscii (const OSD_Path& theFile,
|
||||
//function : Write
|
||||
//purpose :
|
||||
//=============================================================================
|
||||
Standard_Boolean RWStl::WriteBinary (const Handle(Poly_Triangulation)& aMesh,
|
||||
Standard_Boolean RWStl::WriteBinary (const Handle(Poly_Triangulation)& theMesh,
|
||||
const OSD_Path& thePath,
|
||||
const Handle(Message_ProgressIndicator)& theProgInd)
|
||||
{
|
||||
if (theMesh.IsNull() || theMesh->NbTriangles() <= 0)
|
||||
{
|
||||
return Standard_False;
|
||||
}
|
||||
|
||||
TCollection_AsciiString aPath;
|
||||
thePath.SystemName (aPath);
|
||||
|
||||
@@ -222,7 +229,7 @@ Standard_Boolean RWStl::WriteBinary (const Handle(Poly_Triangulation)& aMesh,
|
||||
return Standard_False;
|
||||
}
|
||||
|
||||
Standard_Boolean isOK = writeBinary (aMesh, aFile, theProgInd);
|
||||
Standard_Boolean isOK = writeBinary (theMesh, aFile, theProgInd);
|
||||
|
||||
fclose (aFile);
|
||||
return isOK;
|
||||
@@ -236,6 +243,11 @@ Standard_Boolean RWStl::WriteAscii (const Handle(Poly_Triangulation)& theMesh,
|
||||
const OSD_Path& thePath,
|
||||
const Handle(Message_ProgressIndicator)& theProgInd)
|
||||
{
|
||||
if (theMesh.IsNull() || theMesh->NbTriangles() <= 0)
|
||||
{
|
||||
return Standard_False;
|
||||
}
|
||||
|
||||
TCollection_AsciiString aPath;
|
||||
thePath.SystemName (aPath);
|
||||
|
||||
|
@@ -138,9 +138,15 @@ Standard_Boolean RWStl_Reader::Read (const char* theFile,
|
||||
std::streampos theEnd = aStream.tellg();
|
||||
aStream.seekg (0, aStream.beg);
|
||||
|
||||
while (!aStream.eof() && !aStream.bad())
|
||||
// binary STL files cannot be shorter than 134 bytes
|
||||
// (80 bytes header + 4 bytes facet count + 50 bytes for one facet);
|
||||
// thus assume files shorter than 134 as Ascii without probing
|
||||
// (probing may bring stream to fail state if EOF is reached)
|
||||
bool isAscii = ((size_t)theEnd < THE_STL_MIN_FILE_SIZE || IsAscii (aStream));
|
||||
|
||||
while (aStream.good())
|
||||
{
|
||||
if (IsAscii (aStream))
|
||||
if (isAscii)
|
||||
{
|
||||
if (!ReadAscii (aStream, theEnd, theProgress))
|
||||
{
|
||||
@@ -156,7 +162,7 @@ Standard_Boolean RWStl_Reader::Read (const char* theFile,
|
||||
}
|
||||
aStream >> std::ws; // skip any white spaces
|
||||
}
|
||||
return !aStream.bad();
|
||||
return ! aStream.fail();
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
@@ -169,10 +175,10 @@ Standard_Boolean RWStl_Reader::IsAscii (Standard_IStream& theStream)
|
||||
// read first 134 bytes to detect file format
|
||||
char aBuffer[THE_STL_MIN_FILE_SIZE];
|
||||
std::streamsize aNbRead = theStream.read (aBuffer, THE_STL_MIN_FILE_SIZE).gcount();
|
||||
if (!theStream)
|
||||
if (! theStream)
|
||||
{
|
||||
Message::DefaultMessenger()->Send ("Error: Cannot read file", Message_Fail);
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
// put back the read symbols
|
||||
@@ -240,7 +246,8 @@ Standard_Boolean RWStl_Reader::ReadAscii (Standard_IStream& theStream,
|
||||
// use method seekpos() to get true 64-bit offset to enable
|
||||
// handling of large files (VS 2010 64-bit)
|
||||
const int64_t aStartPos = GETPOS(theStream.tellg());
|
||||
const int64_t aEndPos = (theUntilPos > 0 ? GETPOS(theUntilPos) : std::numeric_limits<int64_t>::max());
|
||||
// Note: 1 is added to theUntilPos to be sure to read the last symbol (relevant for files without EOL at the end)
|
||||
const int64_t aEndPos = (theUntilPos > 0 ? 1 + GETPOS(theUntilPos) : std::numeric_limits<int64_t>::max());
|
||||
|
||||
// skip header "solid ..."
|
||||
theStream.ignore (aEndPos - aStartPos, '\n');
|
||||
|
@@ -47,6 +47,7 @@
|
||||
#include <StepDimTol_GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol.hxx>
|
||||
#include <StepGeom_Axis2Placement3d.hxx>
|
||||
#include <StepGeom_CartesianTransformationOperator3d.hxx>
|
||||
#include <StepGeom_Direction.hxx>
|
||||
#include <StepGeom_GeometricRepresentationContextAndGlobalUnitAssignedContext.hxx>
|
||||
#include <StepGeom_GeometricRepresentationItem.hxx>
|
||||
#include <StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx.hxx>
|
||||
@@ -823,18 +824,30 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity(const Han
|
||||
nsh ++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// [BEGIN] Proceed with non-manifold topology (ssv; 12.11.2010)
|
||||
if (!isManifold) {
|
||||
|
||||
Handle(Standard_Transient) info;
|
||||
// IMPORTANT: any fixing on non-manifold topology must be done after the shape is transferred from STEP
|
||||
TopoDS_Shape fixedResult =
|
||||
XSAlgo::AlgoContainer()->ProcessShape( comp, myPrecision, myMaxTol,
|
||||
"read.step.resource.name",
|
||||
"read.step.sequence", info,
|
||||
TP->GetProgress() );
|
||||
TP->GetProgress(), Standard_True);
|
||||
XSAlgo::AlgoContainer()->MergeTransferInfo(TP, info, nbTPitems);
|
||||
|
||||
if (fixedResult.ShapeType() == TopAbs_COMPOUND)
|
||||
{
|
||||
comp = TopoDS::Compound(fixedResult);
|
||||
}
|
||||
else
|
||||
{
|
||||
comp.Nullify();
|
||||
B.MakeCompound(comp);
|
||||
B.Add(comp, fixedResult);
|
||||
}
|
||||
|
||||
BRep_Builder brepBuilder;
|
||||
|
||||
// [BEGIN] Try to close OPEN Shells in I-DEAS case (ssv; 17.11.2010)
|
||||
@@ -874,20 +887,19 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity(const Han
|
||||
// [BEGIN] Reconstruct Solids from Closed Shells (ssv; 15.11.2010)
|
||||
TopoDS_Compound reconstComp;
|
||||
brepBuilder.MakeCompound(reconstComp);
|
||||
|
||||
TopoDS_Iterator it(comp);
|
||||
for ( ; it.More(); it.Next() ) {
|
||||
TopoDS_Shape aSubShape = it.Value();
|
||||
if ( aSubShape.ShapeType() == TopAbs_SHELL && aSubShape.Closed() ) {
|
||||
TopoDS_Solid nextSolid;
|
||||
brepBuilder.MakeSolid(nextSolid);
|
||||
brepBuilder.Add(nextSolid, aSubShape);
|
||||
brepBuilder.Add(reconstComp, nextSolid);
|
||||
}
|
||||
else if (aSubShape.ShapeType() == TopAbs_SHELL)
|
||||
brepBuilder.Add(reconstComp, aSubShape);
|
||||
TopExp_Explorer exp(comp, TopAbs_SHELL);
|
||||
for (; exp.More(); exp.Next())
|
||||
{
|
||||
TopoDS_Shape aSubShape = exp.Current();
|
||||
if (aSubShape.ShapeType() == TopAbs_SHELL && aSubShape.Closed()) {
|
||||
TopoDS_Solid nextSolid;
|
||||
brepBuilder.MakeSolid(nextSolid);
|
||||
brepBuilder.Add(nextSolid, aSubShape);
|
||||
brepBuilder.Add(reconstComp, nextSolid);
|
||||
}
|
||||
else if (aSubShape.ShapeType() == TopAbs_SHELL)
|
||||
brepBuilder.Add(reconstComp, aSubShape);
|
||||
}
|
||||
|
||||
comp = reconstComp;
|
||||
// [END] Reconstruct Solids from Closed Shells (ssv; 15.11.2010)
|
||||
}
|
||||
@@ -896,6 +908,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity(const Han
|
||||
if (nsh == 0) shbinder.Nullify();
|
||||
else if (nsh == 1) shbinder = new TransferBRep_ShapeBinder (OneResult);
|
||||
else shbinder = new TransferBRep_ShapeBinder (comp);
|
||||
|
||||
PrepareUnits ( oldSRContext, TP ); //:S4136
|
||||
TP->Bind(sr, shbinder);
|
||||
|
||||
|
@@ -378,6 +378,32 @@ Handle(Prs3d_Presentation) SelectMgr_SelectableObject::GetSelectPresentation (co
|
||||
return mySelectionPrs;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : ErasePresentations
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void SelectMgr_SelectableObject::ErasePresentations (Standard_Boolean theToRemove)
|
||||
{
|
||||
if (!mySelectionPrs.IsNull())
|
||||
{
|
||||
mySelectionPrs->Erase();
|
||||
if (theToRemove)
|
||||
{
|
||||
mySelectionPrs->Clear();
|
||||
mySelectionPrs.Nullify();
|
||||
}
|
||||
}
|
||||
if (!myHilightPrs.IsNull())
|
||||
{
|
||||
myHilightPrs->Erase();
|
||||
if (theToRemove)
|
||||
{
|
||||
myHilightPrs->Clear();
|
||||
myHilightPrs.Nullify();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetZLayer
|
||||
//purpose :
|
||||
|
@@ -168,7 +168,10 @@ public:
|
||||
Standard_EXPORT Handle(Prs3d_Presentation) GetHilightPresentation (const Handle(PrsMgr_PresentationManager3d)& TheMgr);
|
||||
|
||||
Standard_EXPORT Handle(Prs3d_Presentation) GetSelectPresentation (const Handle(PrsMgr_PresentationManager3d)& TheMgr);
|
||||
|
||||
|
||||
//! Removes presentations returned by GetHilightPresentation() and GetSelectPresentation().
|
||||
Standard_EXPORT virtual void ErasePresentations (Standard_Boolean theToRemove);
|
||||
|
||||
//! Set Z layer ID and update all presentations of the selectable object.
|
||||
//! The layers mechanism allows drawing objects in higher layers in overlay of objects in lower layers.
|
||||
Standard_EXPORT virtual void SetZLayer (const Graphic3d_ZLayerId theLayerId) Standard_OVERRIDE;
|
||||
@@ -219,14 +222,15 @@ protected:
|
||||
|
||||
SelectMgr_SequenceOfSelection myselections;
|
||||
Handle(SelectMgr_EntityOwner) myAssemblyOwner;
|
||||
Handle(Prs3d_Presentation) mySelectionPrs;
|
||||
Handle(Prs3d_Presentation) myHilightPrs;
|
||||
Standard_Boolean myAutoHilight;
|
||||
|
||||
private:
|
||||
|
||||
Standard_Integer mycurrent;
|
||||
Handle(Prs3d_Presentation) mySelectionPrs;
|
||||
Handle(Prs3d_Presentation) myHilightPrs;
|
||||
Standard_Integer myGlobalSelMode;
|
||||
|
||||
};
|
||||
|
||||
#endif // _SelectMgr_SelectableObject_HeaderFile
|
||||
|
@@ -18,9 +18,10 @@
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
SelectMgr_ToleranceMap::SelectMgr_ToleranceMap()
|
||||
: myLargestKey (-1),
|
||||
myCustomTolerance (-1)
|
||||
{
|
||||
myLargestKey = -1;
|
||||
myCustomTolerance = -1;
|
||||
//
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@@ -38,24 +39,23 @@ SelectMgr_ToleranceMap::~SelectMgr_ToleranceMap()
|
||||
//=======================================================================
|
||||
void SelectMgr_ToleranceMap::Add (const Standard_Integer& theTolerance)
|
||||
{
|
||||
if (myTolerances.IsBound (theTolerance))
|
||||
if (Standard_Integer* aFreq = myTolerances.ChangeSeek (theTolerance))
|
||||
{
|
||||
Standard_Integer& aFreq = myTolerances.ChangeFind (theTolerance);
|
||||
aFreq++;
|
||||
|
||||
if (aFreq == 1 && theTolerance != myLargestKey)
|
||||
++(*aFreq);
|
||||
if (*aFreq == 1 && theTolerance != myLargestKey)
|
||||
{
|
||||
myLargestKey = Max (theTolerance, myLargestKey);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
myTolerances.Bind (theTolerance, 1);
|
||||
if (myTolerances.Extent() == 1)
|
||||
{
|
||||
myLargestKey = theTolerance;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (myTolerances.IsEmpty())
|
||||
{
|
||||
myTolerances.Bind (theTolerance, 1);
|
||||
myLargestKey = theTolerance;
|
||||
return;
|
||||
}
|
||||
|
||||
myTolerances.Bind (theTolerance, 1);
|
||||
myLargestKey = Max (theTolerance, myLargestKey);
|
||||
}
|
||||
}
|
||||
@@ -66,18 +66,22 @@ void SelectMgr_ToleranceMap::Add (const Standard_Integer& theTolerance)
|
||||
//=======================================================================
|
||||
void SelectMgr_ToleranceMap::Decrement (const Standard_Integer& theTolerance)
|
||||
{
|
||||
if (myTolerances.IsBound (theTolerance))
|
||||
Standard_Integer* aFreq = myTolerances.ChangeSeek (theTolerance);
|
||||
if (aFreq == NULL)
|
||||
{
|
||||
Standard_Integer& aFreq = myTolerances.ChangeFind (theTolerance);
|
||||
aFreq--;
|
||||
return;
|
||||
}
|
||||
|
||||
if (Abs (theTolerance - myLargestKey) < Precision::Confusion() && aFreq == 0)
|
||||
--(*aFreq);
|
||||
if (theTolerance == myLargestKey
|
||||
&& *aFreq == 0)
|
||||
{
|
||||
myLargestKey = 0;
|
||||
for (NCollection_DataMap<Standard_Integer, Standard_Integer>::Iterator anIter (myTolerances); anIter.More(); anIter.Next())
|
||||
{
|
||||
myLargestKey = 0;
|
||||
for (NCollection_DataMap<Standard_Integer, Standard_Integer>::Iterator anIter (myTolerances); anIter.More(); anIter.Next())
|
||||
if (anIter.Value() != 0)
|
||||
{
|
||||
if (anIter.Value() != 0)
|
||||
myLargestKey = Max (myLargestKey, anIter.Key());
|
||||
myLargestKey = Max (myLargestKey, anIter.Key());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1070,9 +1070,8 @@ Standard_Boolean ShapeAnalysis_Curve::GetSamplePoints (const Handle(Geom_Curve)&
|
||||
|
||||
GeomAdaptor_Curve GAC(curve);
|
||||
Standard_Real step = ( last - first ) / (Standard_Real)( nbp - 1 );
|
||||
Standard_Real par = first, stop = last - 0.5 * step;
|
||||
for ( ; par < stop; par += step )
|
||||
seq.Append(GAC.Value(par));
|
||||
for (Standard_Integer i = 0; i < nbp - 1; ++i)
|
||||
seq.Append(GAC.Value(first + step * i));
|
||||
seq.Append(GAC.Value(last));
|
||||
return Standard_True;
|
||||
}
|
||||
@@ -1093,9 +1092,8 @@ Standard_Boolean ShapeAnalysis_Curve::GetSamplePoints (const Handle(Geom2d_Curve
|
||||
//-- Attention aux bsplines rationnelles de degree 3. (bouts de cercles entre autres)
|
||||
if (nbs > 2) nbs*=4;
|
||||
Standard_Real step = ( last - first ) / (Standard_Real)( nbs - 1 );
|
||||
Standard_Real par = first, stop = last - 0.5 * step;
|
||||
for ( ; par < stop; par += step )
|
||||
seq.Append(C.Value(par));
|
||||
for (Standard_Integer i = 0; i < nbs - 1; ++i)
|
||||
seq.Append(C.Value(first + step * i));
|
||||
seq.Append(C.Value(last));
|
||||
return Standard_True;
|
||||
/*
|
||||
|
@@ -243,6 +243,7 @@ Standard_Boolean ShapeFix_Shape::Perform(const Handle(Message_ProgressIndicator)
|
||||
aPSentry.Next();
|
||||
|
||||
myResult = Context()->Apply(S);
|
||||
|
||||
if ( NeedFix(myFixSameParameterMode) )
|
||||
{
|
||||
SameParameter(myResult, Standard_False, theProgress);
|
||||
@@ -269,6 +270,7 @@ Standard_Boolean ShapeFix_Shape::Perform(const Handle(Message_ProgressIndicator)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
myResult = Context()->Apply(myResult);
|
||||
|
||||
if ( !fft.IsNull() )
|
||||
|
@@ -70,6 +70,7 @@ ShapeFix_Shell::ShapeFix_Shell()
|
||||
myFixOrientationMode = -1;
|
||||
myFixFace = new ShapeFix_Face;
|
||||
myNbShells =0;
|
||||
myNonManifold = Standard_False;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@@ -84,6 +85,7 @@ ShapeFix_Shell::ShapeFix_Shell(const TopoDS_Shell& shape)
|
||||
myFixOrientationMode = -1;
|
||||
myFixFace = new ShapeFix_Face;
|
||||
Init(shape);
|
||||
myNonManifold = Standard_False;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@@ -138,9 +140,10 @@ Standard_Boolean ShapeFix_Shell::Perform(const Handle(Message_ProgressIndicator)
|
||||
if ( !aPSentry.More() )
|
||||
return Standard_False;
|
||||
}
|
||||
|
||||
TopoDS_Shape newsh = Context()->Apply(myShell);
|
||||
if ( NeedFix ( myFixOrientationMode) )
|
||||
FixFaceOrientation(TopoDS::Shell(newsh));
|
||||
FixFaceOrientation(TopoDS::Shell(newsh), Standard_True, myNonManifold);
|
||||
|
||||
TopoDS_Shape aNewsh = Context()->Apply (newsh);
|
||||
ShapeAnalysis_Shell aSas;
|
||||
@@ -853,7 +856,10 @@ static void CreateClosedShell(TopTools_SequenceOfShape& OpenShells,
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
|
||||
Standard_Boolean ShapeFix_Shell::FixFaceOrientation(const TopoDS_Shell& shell,const Standard_Boolean isAccountMultiConex,const Standard_Boolean NonManifold)
|
||||
Standard_Boolean ShapeFix_Shell::FixFaceOrientation(
|
||||
const TopoDS_Shell& shell,
|
||||
const Standard_Boolean isAccountMultiConex,
|
||||
const Standard_Boolean NonManifold)
|
||||
{
|
||||
//myStatus = ShapeExtend::EncodeStatus (ShapeExtend_OK);
|
||||
Standard_Boolean done = Standard_False;
|
||||
@@ -1101,6 +1107,7 @@ void ShapeFix_Shell::SetMaxTolerance (const Standard_Real maxtol)
|
||||
ShapeFix_Root::SetMaxTolerance ( maxtol );
|
||||
myFixFace->SetMaxTolerance ( maxtol );
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : NbShells
|
||||
//purpose :
|
||||
@@ -1110,3 +1117,13 @@ Standard_Integer ShapeFix_Shell::NbShells() const
|
||||
{
|
||||
return myNbShells;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetNonManifoldFlag
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void ShapeFix_Shell::SetNonManifoldFlag(const Standard_Boolean isNonManifold)
|
||||
{
|
||||
myNonManifold = isNonManifold;
|
||||
}
|
||||
|
@@ -73,7 +73,10 @@ public:
|
||||
//! If this mode is equal to Standard_True one non-manifold will be created from shell
|
||||
//! contains multishared edges. Else if this mode is equal to Standard_False only
|
||||
//! manifold shells will be created. By default - Standard_False.
|
||||
Standard_EXPORT Standard_Boolean FixFaceOrientation (const TopoDS_Shell& shell, const Standard_Boolean isAccountMultiConex = Standard_True, const Standard_Boolean NonManifold = Standard_False);
|
||||
Standard_EXPORT Standard_Boolean FixFaceOrientation (
|
||||
const TopoDS_Shell& shell,
|
||||
const Standard_Boolean isAccountMultiConex = Standard_True,
|
||||
const Standard_Boolean NonManifold = Standard_False);
|
||||
|
||||
//! Returns fixed shell (or subset of oriented faces).
|
||||
Standard_EXPORT TopoDS_Shell Shell();
|
||||
@@ -114,7 +117,8 @@ public:
|
||||
//! FixFaceOrientation, by default True.
|
||||
Standard_Integer& FixOrientationMode();
|
||||
|
||||
|
||||
//! Sets NonManifold flag
|
||||
Standard_EXPORT virtual void SetNonManifoldFlag(const Standard_Boolean isNonManifold);
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTIEXT(ShapeFix_Shell,ShapeFix_Root)
|
||||
@@ -129,7 +133,7 @@ protected:
|
||||
Standard_Integer myFixFaceMode;
|
||||
Standard_Integer myFixOrientationMode;
|
||||
Standard_Integer myNbShells;
|
||||
|
||||
Standard_Boolean myNonManifold;
|
||||
|
||||
private:
|
||||
|
||||
|
@@ -716,7 +716,8 @@ static Standard_Boolean fixshape (const Handle(ShapeProcess_Context)& context)
|
||||
sfs->FixSolidTool()->CreateOpenSolidMode() = ctx->BooleanVal ( "CreateOpenSolidMode", Standard_True );
|
||||
|
||||
sfs->FixShellTool()->FixFaceMode() = ctx->IntegerVal ( "FixFaceMode", -1 );
|
||||
sfs->FixShellTool()->FixOrientationMode() = ctx->IntegerVal ( "FixFaceOrientationMode", -1 );
|
||||
sfs->FixShellTool()->SetNonManifoldFlag(ctx->IsNonManifold());
|
||||
sfs->FixShellTool()->FixOrientationMode() = ctx->IntegerVal("FixFaceOrientationMode", -1);
|
||||
|
||||
//parameters for ShapeFix_Face
|
||||
sff->FixWireMode() = ctx->IntegerVal ( "FixWireMode", -1 );
|
||||
|
@@ -38,7 +38,8 @@ IMPLEMENT_STANDARD_RTTIEXT(ShapeProcess_ShapeContext,ShapeProcess_Context)
|
||||
//=======================================================================
|
||||
ShapeProcess_ShapeContext::ShapeProcess_ShapeContext (const Standard_CString file,
|
||||
const Standard_CString seq)
|
||||
: ShapeProcess_Context ( file, seq ), myUntil(TopAbs_FACE)
|
||||
: ShapeProcess_Context ( file, seq ), myUntil(TopAbs_FACE),
|
||||
myNonManifold(Standard_False)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -50,7 +51,8 @@ ShapeProcess_ShapeContext::ShapeProcess_ShapeContext (const Standard_CString fil
|
||||
ShapeProcess_ShapeContext::ShapeProcess_ShapeContext (const TopoDS_Shape &S,
|
||||
const Standard_CString file,
|
||||
const Standard_CString seq)
|
||||
: ShapeProcess_Context ( file, seq ), myUntil(TopAbs_FACE)
|
||||
: ShapeProcess_Context ( file, seq ), myUntil(TopAbs_FACE),
|
||||
myNonManifold(Standard_False)
|
||||
{
|
||||
Init ( S );
|
||||
}
|
||||
|
@@ -126,7 +126,17 @@ public:
|
||||
//! Prints statistics on Shape Processing onto the current Messenger.
|
||||
Standard_EXPORT void PrintStatistics() const;
|
||||
|
||||
//! Set NonManifold flag
|
||||
Standard_EXPORT void SetNonManifold(Standard_Boolean theNonManifold)
|
||||
{
|
||||
myNonManifold = theNonManifold;
|
||||
}
|
||||
|
||||
//! Get NonManifold flag
|
||||
Standard_EXPORT Standard_Boolean IsNonManifold()
|
||||
{
|
||||
return myNonManifold;
|
||||
}
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTIEXT(ShapeProcess_ShapeContext,ShapeProcess_Context)
|
||||
@@ -144,7 +154,7 @@ private:
|
||||
TopTools_DataMapOfShapeShape myMap;
|
||||
Handle(ShapeExtend_MsgRegistrator) myMsg;
|
||||
TopAbs_ShapeEnum myUntil;
|
||||
|
||||
Standard_Boolean myNonManifold;
|
||||
|
||||
};
|
||||
|
||||
|
@@ -26,4 +26,3 @@ StdSelect_TypeOfResult.hxx
|
||||
StdSelect_TypeOfSelectionImage.hxx
|
||||
StdSelect_ViewerSelector3d.cxx
|
||||
StdSelect_ViewerSelector3d.hxx
|
||||
StdSelect_ViewerSelector3d.lxx
|
||||
|
@@ -50,7 +50,7 @@ public:
|
||||
Standard_EXPORT void SetPixelTolerance (const Standard_Integer theTolerance);
|
||||
|
||||
//! Returns the pixel tolerance.
|
||||
inline Standard_Integer PixelTolerance() const;
|
||||
Standard_Integer PixelTolerance() const { return myTolerances.Tolerance(); }
|
||||
|
||||
//! Picks the sensitive entity at the pixel coordinates of
|
||||
//! the mouse <theXPix> and <theYPix>. The selector looks for touched areas and owners.
|
||||
@@ -114,6 +114,4 @@ protected:
|
||||
|
||||
DEFINE_STANDARD_HANDLE(StdSelect_ViewerSelector3d, SelectMgr_ViewerSelector)
|
||||
|
||||
#include <StdSelect_ViewerSelector3d.lxx>
|
||||
|
||||
#endif
|
||||
|
@@ -1,18 +0,0 @@
|
||||
// Copyright (c) 1997-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.
|
||||
|
||||
inline Standard_Integer StdSelect_ViewerSelector3d::PixelTolerance() const
|
||||
{
|
||||
return myTolerances.Tolerance();
|
||||
}
|
@@ -49,8 +49,11 @@ Standard_Boolean StlAPI_Writer::Write (const TopoDS_Shape& theShape,
|
||||
{
|
||||
TopLoc_Location aLoc;
|
||||
Handle(Poly_Triangulation) aTriangulation = BRep_Tool::Triangulation (TopoDS::Face (anExpSF.Current()), aLoc);
|
||||
aNbNodes += aTriangulation->NbNodes();
|
||||
aNbTriangles += aTriangulation->NbTriangles();
|
||||
if (! aTriangulation.IsNull())
|
||||
{
|
||||
aNbNodes += aTriangulation->NbNodes ();
|
||||
aNbTriangles += aTriangulation->NbTriangles ();
|
||||
}
|
||||
}
|
||||
|
||||
// create temporary triangulation
|
||||
|
@@ -161,13 +161,7 @@ void TDF_CopyLabel::Perform()
|
||||
myIsDone = Standard_False;
|
||||
if(mySL.Data()->Root().IsDifferent(myTL.Data()->Root()) && //TDF_Data is not the same
|
||||
!TDF_Tool::IsSelfContained(mySL, myFilter)) return; //source label isn't self-contained
|
||||
else {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "THE SAME Data" <<endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
//TDF_Data of the source and target labels are the same
|
||||
Standard_Boolean extReferers =
|
||||
ExternalReferences(mySL, myMapOfExt, myFilter);
|
||||
|
||||
|
@@ -97,7 +97,8 @@ TopoDS_Shape XSAlgo_AlgoContainer::ProcessShape (const TopoDS_Shape& shape,
|
||||
const Standard_CString prscfile,
|
||||
const Standard_CString pseq,
|
||||
Handle(Standard_Transient)& info,
|
||||
const Handle(Message_ProgressIndicator)& progress) const
|
||||
const Handle(Message_ProgressIndicator)& progress,
|
||||
const Standard_Boolean NonManifold) const
|
||||
{
|
||||
if ( shape.IsNull() ) return shape;
|
||||
|
||||
@@ -112,6 +113,7 @@ TopoDS_Shape XSAlgo_AlgoContainer::ProcessShape (const TopoDS_Shape& shape,
|
||||
if ( !progress.IsNull() )
|
||||
context->SetProgress(progress);
|
||||
}
|
||||
context->SetNonManifold(NonManifold);
|
||||
info = context;
|
||||
|
||||
Standard_CString seq = Interface_Static::CVal ( pseq );
|
||||
|
@@ -63,7 +63,11 @@ public:
|
||||
//! This information should be later transmitted to
|
||||
//! MergeTransferInfo in order to be recorded in the
|
||||
//! translation map
|
||||
Standard_EXPORT virtual TopoDS_Shape ProcessShape (const TopoDS_Shape& shape, const Standard_Real Prec, const Standard_Real MaxTol, const Standard_CString rscfile, const Standard_CString seq, Handle(Standard_Transient)& info, const Handle(Message_ProgressIndicator)& progress = 0) const;
|
||||
Standard_EXPORT virtual TopoDS_Shape ProcessShape (
|
||||
const TopoDS_Shape& shape, const Standard_Real Prec, const Standard_Real MaxTol,
|
||||
const Standard_CString rscfile, const Standard_CString seq, Handle(Standard_Transient)& info,
|
||||
const Handle(Message_ProgressIndicator)& progress = 0,
|
||||
const Standard_Boolean NonManifold = Standard_False) const;
|
||||
|
||||
//! Checks quality of pcurve of the edge on the given face,
|
||||
//! and corrects it if necessary.
|
||||
|
12
tests/bugs/heal/bug26280
Normal file
@@ -0,0 +1,12 @@
|
||||
puts "TODO OCC26280 ALL: Faulty shapes in variables faulty_1 to faulty_"
|
||||
|
||||
puts "========"
|
||||
puts "OCC26280"
|
||||
puts "========"
|
||||
puts ""
|
||||
##################################################
|
||||
# Mechanism 'ShapeFix' is unable to heal a shape
|
||||
##################################################
|
||||
|
||||
stepread [locate_data_file bug26280_1kento13-mld-b-cv-qubit.stp] r *
|
||||
checkshape r_1
|
17
tests/bugs/heal/bug26282
Normal file
@@ -0,0 +1,17 @@
|
||||
puts "TODO OCC26282 ALL: Faulty shapes in variables faulty_1 to faulty_"
|
||||
|
||||
puts "========"
|
||||
puts "OCC26282"
|
||||
puts "========"
|
||||
puts ""
|
||||
####################################################################
|
||||
# Mechanism 'ShapeFix' has errors revealed by wire tool 'FixTails'
|
||||
####################################################################
|
||||
|
||||
|
||||
restore [locate_data_file bug26282_mld-m-cv-qubit-th.brep] s
|
||||
|
||||
checkshape s
|
||||
fixshape result s 1e-4 1 -maxtaila 6 -maxtailw 1e-4
|
||||
|
||||
checkshape result
|
21
tests/bugs/heal/bug26716
Executable file
@@ -0,0 +1,21 @@
|
||||
puts "TODO OCC26716 ALL: Error: Number of triangles is equal to 0"
|
||||
|
||||
puts "============"
|
||||
puts "OCC26716"
|
||||
puts "============"
|
||||
puts ""
|
||||
################################################################################
|
||||
## Mesher cannot create a mesh of brep model due to ShapeFix_Wire::FixShifted()
|
||||
################################################################################
|
||||
|
||||
restore [locate_data_file bug26716_rev.brep] result
|
||||
|
||||
checkshape result
|
||||
|
||||
vinit
|
||||
vsetdispmode 1
|
||||
vdisplay result
|
||||
vfit
|
||||
checkview -screenshot -3d -path ${imagedir}/${test_image}.png
|
||||
|
||||
checktrinfo result -tri
|
26
tests/bugs/heal/bug26735
Executable file
@@ -0,0 +1,26 @@
|
||||
puts "TODO OCC26735 ALL: Error : Adjacent perpendicular edges are detected as overlapped"
|
||||
|
||||
puts "============"
|
||||
puts "OCC26735"
|
||||
puts "============"
|
||||
puts ""
|
||||
###########################################################################################
|
||||
## Adjacent perpendicular edges are detected as overlapped by DRAW command "checkoverlap".
|
||||
###########################################################################################
|
||||
|
||||
restore [locate_data_file bug26735_PartialOverlap_OCOverlapValidatorWire.brep] w1
|
||||
|
||||
explode w1 e
|
||||
|
||||
set Log [checkoverlapedges w1_1 w1_2 0.01 0.01]
|
||||
set Message "Edges is overlaped"
|
||||
|
||||
if { [regexp ${Message} ${Log} ] == 1 } {
|
||||
puts "Error : Adjacent perpendicular edges are detected as overlapped"
|
||||
} else {
|
||||
puts "OK : Adjacent perpendicular edges are not detected as overlapped"
|
||||
}
|
||||
|
||||
smallview
|
||||
fit
|
||||
checkview -screenshot -2d -path ${imagedir}/${test_image}.png
|
17
tests/bugs/heal/bug26943
Executable file
@@ -0,0 +1,17 @@
|
||||
puts "TODO OCC26943 All: Faulty shapes in variables faulty_1 to faulty_"
|
||||
|
||||
puts "================"
|
||||
puts "OCC26943"
|
||||
puts "================"
|
||||
puts ""
|
||||
################################################################################
|
||||
# Wrong projection of helix on cylinder by ShapeConstruct_ProjectCurveOnSurface
|
||||
################################################################################
|
||||
|
||||
restore [locate_data_file bug26943_face_helix.brep] ff
|
||||
|
||||
fixshape result ff
|
||||
|
||||
checkshape result
|
||||
|
||||
checkview -display result -2d -path ${imagedir}/${test_image}.png
|
25
tests/bugs/heal/bug26957
Executable file
@@ -0,0 +1,25 @@
|
||||
puts "============"
|
||||
puts "OCC26957"
|
||||
puts "============"
|
||||
puts ""
|
||||
###########################################################
|
||||
## Unify same domain operation is slow for multiple shells
|
||||
###########################################################
|
||||
|
||||
restore [locate_data_file bug26957-w-700.brep] a1
|
||||
|
||||
nbshapes a1
|
||||
regexp {([-0-9.+eE]+)} [time {unifysamedom r1 a1}] full t1
|
||||
puts "t1=$t1"
|
||||
|
||||
sewing a2 0.0 a1
|
||||
|
||||
puts ""
|
||||
nbshapes a2
|
||||
regexp {([-0-9.+eE]+)} [time {unifysamedom r2 a2}] full t2
|
||||
puts "t2=$t2"
|
||||
|
||||
set tol_rel 0.1
|
||||
if { [expr (${t1}*1. - ${t2}) / ${t2}] > ${tol_rel}} {
|
||||
puts "Error: Unify same domain operation is slow for multiple shells"
|
||||
}
|
14
tests/bugs/mesh/bug26291
Normal file
@@ -0,0 +1,14 @@
|
||||
puts "TODO OCC26291 ALL: Not connected mesh"
|
||||
|
||||
puts "========"
|
||||
puts "OCC26291"
|
||||
puts "========"
|
||||
puts ""
|
||||
#########################################################
|
||||
# BRepMesh produces mesh with gap on the attached shape
|
||||
#########################################################
|
||||
|
||||
restore [locate_data_file bug26291_mesh_gap.brep] a
|
||||
incmesh a 1
|
||||
|
||||
tricheck a
|
27
tests/bugs/mesh/bug26382
Normal file
@@ -0,0 +1,27 @@
|
||||
puts "========"
|
||||
puts "OCC22886"
|
||||
puts "========"
|
||||
puts ""
|
||||
###############################################################
|
||||
# BRepMesh produces internal nodes outside the face interior
|
||||
###############################################################
|
||||
|
||||
restore [locate_data_file bug26382_test.brep] result
|
||||
|
||||
vinit
|
||||
vsetdispmode 1
|
||||
vdisplay result
|
||||
|
||||
set scale 455.627
|
||||
set proj_x 0.521827
|
||||
set proj_y -0.641161
|
||||
set proj_z 0.56268
|
||||
set up_x -0.400279
|
||||
set up_y 0.398446
|
||||
set up_z 0.825238
|
||||
set at_x 146.11
|
||||
set at_y -109.936
|
||||
set at_z 60.2014"
|
||||
vviewparams -scale ${scale} -proj ${proj_x} ${proj_y} ${proj_z} -up ${up_x} ${up_y} ${up_z} -at ${at_x} ${at_y} ${at_z}
|
||||
|
||||
checkview -screenshot -3d -path ${imagedir}/${test_image}.png
|
38
tests/bugs/mesh/bug26889
Normal file
@@ -0,0 +1,38 @@
|
||||
puts "TODO CR26889 ALL: Error: the mesh takes too long to be built"
|
||||
|
||||
puts "========="
|
||||
puts "CR26889"
|
||||
puts "========="
|
||||
puts ""
|
||||
###############################################
|
||||
# Very poor mesh result from shape
|
||||
###############################################
|
||||
|
||||
pload XDE
|
||||
|
||||
stepread [locate_data_file bug26889_export.step] a *
|
||||
|
||||
dlog reset
|
||||
dlog on
|
||||
|
||||
dchrono t restart
|
||||
incmesh a_1 0.1 1
|
||||
dchrono t stop counter incmesh
|
||||
|
||||
set info [dlog get]
|
||||
dlog reset
|
||||
dlog off
|
||||
|
||||
regexp {COUNTER incmesh: +([-0-9.+eE]+)} ${info} full Time
|
||||
|
||||
if { ${Time} > 30. } {
|
||||
puts "Error: the mesh takes too long to be built"
|
||||
}
|
||||
|
||||
checktrinfo a_1 -tri -nod
|
||||
|
||||
vinit
|
||||
vsetdispmode 1
|
||||
vdisplay a_1
|
||||
vfit
|
||||
checkview -screenshot -3d -path ${imagedir}/${test_image}.png
|
96
tests/bugs/mesh/bug26928
Normal file
@@ -0,0 +1,96 @@
|
||||
puts "TODO CR26928 All: Error: Edges are meshed too coarsly"
|
||||
puts "REQUIRED CR26928 All: Error : Colors are not equal in default coordinate and in the near coordinates too"
|
||||
|
||||
puts "========="
|
||||
puts "CR26928"
|
||||
puts "========="
|
||||
puts ""
|
||||
###############################
|
||||
# Edges are meshed too coarsly
|
||||
###############################
|
||||
|
||||
restore [locate_data_file bug27356_comp.brep] c
|
||||
|
||||
set x 168
|
||||
set y 298
|
||||
|
||||
vinit
|
||||
vdisplay c
|
||||
vviewparams -scale 17.2151 -proj 0.68553 -0.268225 -0.676834 -up -0.664339 0.149845 -0.732257 -at 33.3169 24.0699 29.5546
|
||||
vsetdispmode c 1
|
||||
checkview -screenshot -3d -path ${imagedir}/${test_image}-vdisplay.png
|
||||
if { [checkcolor $x $y 1 0 0] == 1 } {
|
||||
puts ""
|
||||
puts "vdisplay.png"
|
||||
puts "Error: Edges are meshed too coarsly"
|
||||
puts ""
|
||||
} else {
|
||||
puts ""
|
||||
puts "vdisplay.png"
|
||||
puts "OK: Edges are meshed good"
|
||||
puts ""
|
||||
}
|
||||
|
||||
incmesh c 0.715 -a 11.459
|
||||
vdisplay -redisplay c
|
||||
vviewparams -scale 17.2151 -proj 0.68553 -0.268225 -0.676834 -up -0.664339 0.149845 -0.732257 -at 33.3169 24.0699 29.5546
|
||||
checkview -screenshot -3d -path ${imagedir}/${test_image}-0715.png
|
||||
if { [checkcolor $x $y 1 0 0] == 1 } {
|
||||
puts ""
|
||||
puts "0715.png"
|
||||
puts "Error: Edges are meshed too coarsly"
|
||||
puts ""
|
||||
} else {
|
||||
puts ""
|
||||
puts "0715.png"
|
||||
puts "OK: Edges are meshed good"
|
||||
puts ""
|
||||
}
|
||||
|
||||
incmesh c 0.5 -a 11.459
|
||||
vdisplay -redisplay c
|
||||
vviewparams -scale 17.2151 -proj 0.68553 -0.268225 -0.676834 -up -0.664339 0.149845 -0.732257 -at 33.3169 24.0699 29.5546
|
||||
checkview -screenshot -3d -path ${imagedir}/${test_image}-05.png
|
||||
if { [checkcolor $x $y 1 0 0] == 1 } {
|
||||
puts ""
|
||||
puts "05.png"
|
||||
puts "Error: Edges are meshed too coarsly"
|
||||
puts ""
|
||||
} else {
|
||||
puts ""
|
||||
puts "05.png"
|
||||
puts "OK: Edges are meshed good"
|
||||
puts ""
|
||||
}
|
||||
|
||||
incmesh c 0.3 -a 11.459
|
||||
vdisplay -redisplay c
|
||||
vviewparams -scale 17.2151 -proj 0.68553 -0.268225 -0.676834 -up -0.664339 0.149845 -0.732257 -at 33.3169 24.0699 29.5546
|
||||
checkview -screenshot -3d -path ${imagedir}/${test_image}-03.png
|
||||
if { [checkcolor $x $y 1 0 0] == 1 } {
|
||||
puts ""
|
||||
puts "03.png"
|
||||
puts "Error: Edges are meshed too coarsly"
|
||||
puts ""
|
||||
} else {
|
||||
puts ""
|
||||
puts "03.png"
|
||||
puts "OK: Edges are meshed good"
|
||||
puts ""
|
||||
}
|
||||
|
||||
incmesh c 0.1 -a 11.459
|
||||
vdisplay -redisplay c
|
||||
vviewparams -scale 17.2151 -proj 0.68553 -0.268225 -0.676834 -up -0.664339 0.149845 -0.732257 -at 33.3169 24.0699 29.5546
|
||||
checkview -screenshot -3d -path ${imagedir}/${test_image}-01.png
|
||||
if { [checkcolor $x $y 1 0 0] == 1 } {
|
||||
puts ""
|
||||
puts "01.png"
|
||||
puts "Error: Edges are meshed too coarsly"
|
||||
puts ""
|
||||
} else {
|
||||
puts ""
|
||||
puts "01.png"
|
||||
puts "OK: Edges are meshed good"
|
||||
puts ""
|
||||
}
|
20
tests/bugs/mesh/bug27453
Normal file
@@ -0,0 +1,20 @@
|
||||
puts "TODO OCC27453 ALL: Not connected mesh"
|
||||
|
||||
puts "========"
|
||||
puts "OCC27453"
|
||||
puts "========"
|
||||
puts ""
|
||||
##########################
|
||||
# Wrongly meshed surface
|
||||
##########################
|
||||
|
||||
pload XDE
|
||||
|
||||
stepread [locate_data_file bug27453_165-174_piattello.stp] a *
|
||||
|
||||
explode a_1 F
|
||||
renamevar a_1_13 result
|
||||
checkshape result
|
||||
incmesh result 0.01 -a 0.5
|
||||
|
||||
tricheck result
|
24
tests/bugs/modalg_6/bug27524
Normal file
@@ -0,0 +1,24 @@
|
||||
puts "TODO 0027524 ALL: Error: pcurve deviation is greater than shape tolerance"
|
||||
puts "========="
|
||||
puts "CR27524"
|
||||
puts "========="
|
||||
puts ""
|
||||
###############################
|
||||
## Incorrect result of "checkshape" command
|
||||
###############################
|
||||
|
||||
set aTol 1.0e-7
|
||||
set aShapeToler 0.0069791772900578497
|
||||
|
||||
restore [locate_data_file bug27524.brep] aS
|
||||
|
||||
checkshape aS
|
||||
|
||||
explode aS E
|
||||
explode aS F
|
||||
set log [xdistef aS_3 aS_1]
|
||||
regexp {Max Distance = +([-0-9.+eE]+);} ${log} full aDist
|
||||
|
||||
if { $aDist > $aShapeToler + $aTol } {
|
||||
puts "Error: pcurve deviation is greater than shape tolerance"
|
||||
}
|
@@ -1,4 +1,4 @@
|
||||
puts "TODO OCC25104 ALL: ERROR: OCC25104 is reproduced."
|
||||
puts "TODO OCC25104 Windows: ERROR: OCC25104 is reproduced."
|
||||
|
||||
puts "========"
|
||||
puts "OCC25104"
|
||||
|
@@ -1,4 +1,4 @@
|
||||
puts "TODO OCC25879 ALL: Error : result of blend fails the bopcheck"
|
||||
puts "TODO OCC25879 Windows: Error : result of blend fails the bopcheck"
|
||||
|
||||
puts "============"
|
||||
puts "OCC25879"
|
||||
|
20
tests/bugs/modalg_7/bug25930
Executable file
@@ -0,0 +1,20 @@
|
||||
puts "TODO OCC25930 ALL: Faulty shapes in variables faulty_1 to faulty_"
|
||||
|
||||
puts "============"
|
||||
puts "OCC25930"
|
||||
puts "============"
|
||||
puts ""
|
||||
######################################################
|
||||
# thickness of spherical cap is invalid
|
||||
######################################################
|
||||
|
||||
psphere Sphere 5 -90 40 360
|
||||
explode Sphere F
|
||||
|
||||
offsetparameter 1e-7 p a
|
||||
offsetload Sphere -1 Sphere_2
|
||||
offsetperform Thickness
|
||||
|
||||
checkshape Thickness
|
||||
|
||||
checkview -display Thickness -2d -path ${imagedir}/${test_image}.png
|
22
tests/bugs/modalg_7/bug25939
Executable file
@@ -0,0 +1,22 @@
|
||||
puts "TODO OCC25939 ALL: An exception was caught"
|
||||
puts "TODO OCC25939 ALL: \\*\\* Exception \\*\\*.*"
|
||||
|
||||
puts "============"
|
||||
puts "OCC25939"
|
||||
puts "============"
|
||||
puts ""
|
||||
######################################################
|
||||
# SIGSEGV in MakeThickSolid
|
||||
######################################################
|
||||
|
||||
psphere Sphere 5
|
||||
pcylinder Cylinder 83 100
|
||||
ttranslate Cylinder -83 0 -50
|
||||
bcut Cut Sphere Cylinder
|
||||
explode Cut F
|
||||
|
||||
offsetparameter 1e-7 p a
|
||||
offsetload Cut -2 Cut_4
|
||||
catch {offsetperform Thickness}
|
||||
|
||||
checkview -display Thickness -2d -path ${imagedir}/${test_image}.png
|
28
tests/bugs/modalg_7/bug26225_1
Normal file
@@ -0,0 +1,28 @@
|
||||
puts "TODO OCC26225 ALL: Tcl Exception: compute of chamfer failed"
|
||||
puts "TODO OCC26225 ALL: TEST INCOMPLETE"
|
||||
|
||||
|
||||
puts "========"
|
||||
puts "OCC26225"
|
||||
puts "========"
|
||||
puts ""
|
||||
#################################################################################################
|
||||
# Wrong result of chamfer in case of coinciding bound of chamfer's surface with bound of a face
|
||||
#################################################################################################
|
||||
|
||||
restore [locate_data_file bug26225_chamferror_1.brep] b1
|
||||
|
||||
smallview
|
||||
|
||||
explode b1 f
|
||||
copy b1_9 f1
|
||||
copy b1_1 f2
|
||||
explode b1 e
|
||||
copy b1_10 e
|
||||
|
||||
donly b1 f1 e
|
||||
fit
|
||||
|
||||
chamf r b1 e f1 0.1 0.1
|
||||
|
||||
checkview -screenshot -2d -path ${imagedir}/${test_image}.png
|
25
tests/bugs/modalg_7/bug26225_2
Normal file
@@ -0,0 +1,25 @@
|
||||
puts "TODO OCC26225 ALL: Tcl Exception: compute of chamfer failed"
|
||||
puts "TODO OCC26225 ALL: TEST INCOMPLETE"
|
||||
|
||||
|
||||
puts "========"
|
||||
puts "OCC26225"
|
||||
puts "========"
|
||||
puts ""
|
||||
#################################################################################################
|
||||
# Wrong result of chamfer in case of coinciding bound of chamfer's surface with bound of a face
|
||||
#################################################################################################
|
||||
|
||||
restore [locate_data_file bug26225_chamferror_1.brep] b1
|
||||
|
||||
smallview
|
||||
|
||||
explode b1 f
|
||||
explode b1_13 e
|
||||
|
||||
donly b1 b1_13 b1_13_1
|
||||
fit
|
||||
|
||||
chamf r b1 b1_13_1 b1_13 0.1 0.1
|
||||
|
||||
checkview -screenshot -2d -path ${imagedir}/${test_image}.png
|
23
tests/bugs/modalg_7/bug26295
Normal file
@@ -0,0 +1,23 @@
|
||||
puts "TODO OCC26295 ALL: An exception was caught"
|
||||
puts "TODO OCC26295 ALL: \\*\\* Exception \\*\\*.*"
|
||||
puts "TODO OCC26295 ALL: TEST INCOMPLETE"
|
||||
|
||||
puts "========"
|
||||
puts "OCC26295"
|
||||
puts "========"
|
||||
puts ""
|
||||
#############################################
|
||||
# Sweep fails with BRepFill_ContactOnBorder
|
||||
#############################################
|
||||
|
||||
restore [locate_data_file bug26295_section.brep] section
|
||||
restore [locate_data_file bug26295_profile1.brep] profile1
|
||||
restore [locate_data_file bug26295_profile3.brep] profile3
|
||||
|
||||
explode section
|
||||
explode profile1
|
||||
explode profile3
|
||||
mksweep profile1_1
|
||||
addsweep section_1 -T -R
|
||||
setsweep -G profile3_1 0 2
|
||||
buildsweep sw -S
|
18
tests/bugs/modalg_7/bug26374
Normal file
@@ -0,0 +1,18 @@
|
||||
puts "TODO OCC26374 ALL: ERROR: OCC26374 is reproduced."
|
||||
|
||||
puts "========"
|
||||
puts "OCC26374"
|
||||
puts "========"
|
||||
puts ""
|
||||
######################################################################################
|
||||
# GeomFill_Profiler fails to unify BSplines if one has knot distance less than PConf
|
||||
######################################################################################
|
||||
|
||||
restore [locate_data_file bug26374_w1.brep] w1
|
||||
restore [locate_data_file bug26374_w2.brep] w2
|
||||
|
||||
thrusections result 0 1 w1 w2
|
||||
|
||||
if {[llength [whatis r]] < 4} {
|
||||
puts "ERROR: OCC26374 is reproduced. Operation thrusections fails."
|
||||
}
|