occt-gltf-addon-linux-x64 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE_LGPL_21.txt +502 -0
- package/OCCT_LGPL_EXCEPTION.txt +10 -0
- package/README.md +2 -2
- package/index.js +63 -1
- package/lib/libTKBO.so.8.0.0 +0 -0
- package/lib/libTKBRep.so.8.0.0 +0 -0
- package/lib/libTKBin.so.8.0.0 +0 -0
- package/lib/libTKBinL.so.8.0.0 +0 -0
- package/lib/libTKBinTObj.so.8.0.0 +0 -0
- package/lib/libTKBinXCAF.so.8.0.0 +0 -0
- package/lib/libTKBool.so.8.0.0 +0 -0
- package/lib/libTKCAF.so.8.0.0 +0 -0
- package/lib/libTKCDF.so.8.0.0 +0 -0
- package/lib/libTKDE.so.8.0.0 +0 -0
- package/lib/libTKDECascade.so.8.0.0 +0 -0
- package/lib/libTKDEIGES.so.8.0.0 +0 -0
- package/lib/libTKDEOBJ.so.8.0.0 +0 -0
- package/lib/libTKDEPLY.so.8.0.0 +0 -0
- package/lib/libTKDESTEP.so.8.0.0 +0 -0
- package/lib/libTKDESTL.so.8.0.0 +0 -0
- package/lib/libTKDEVRML.so.8.0.0 +0 -0
- package/lib/libTKExpress.so.8.0.0 +0 -0
- package/lib/libTKFeat.so.8.0.0 +0 -0
- package/lib/libTKFillet.so.8.0.0 +0 -0
- package/lib/libTKG2d.so.8.0.0 +0 -0
- package/lib/libTKG3d.so.8.0.0 +0 -0
- package/lib/libTKGeomAlgo.so.8.0.0 +0 -0
- package/lib/libTKGeomBase.so.8.0.0 +0 -0
- package/lib/libTKHLR.so.8.0.0 +0 -0
- package/lib/libTKHelix.so.8.0.0 +0 -0
- package/lib/libTKLCAF.so.8.0.0 +0 -0
- package/lib/libTKMath.so.8.0.0 +0 -0
- package/lib/libTKMesh.so.8.0.0 +0 -0
- package/lib/libTKOffset.so.8.0.0 +0 -0
- package/lib/libTKPrim.so.8.0.0 +0 -0
- package/lib/libTKRWMesh.so.8.0.0 +0 -0
- package/lib/libTKService.so.8.0.0 +0 -0
- package/lib/libTKShHealing.so.8.0.0 +0 -0
- package/lib/libTKStd.so.8.0.0 +0 -0
- package/lib/libTKStdL.so.8.0.0 +0 -0
- package/lib/libTKTObj.so.8.0.0 +0 -0
- package/lib/libTKTopAlgo.so.8.0.0 +0 -0
- package/lib/libTKV3d.so.8.0.0 +0 -0
- package/lib/libTKVCAF.so.8.0.0 +0 -0
- package/lib/libTKXCAF.so.8.0.0 +0 -0
- package/lib/libTKXMesh.so.8.0.0 +0 -0
- package/lib/libTKXSBase.so.8.0.0 +0 -0
- package/lib/libTKXml.so.8.0.0 +0 -0
- package/lib/libTKXmlL.so.8.0.0 +0 -0
- package/lib/libTKXmlTObj.so.8.0.0 +0 -0
- package/lib/libTKXmlXCAF.so.8.0.0 +0 -0
- package/lib/libTKernel.so.8.0.0 +0 -0
- package/lib/libdraco.so.1 +0 -0
- package/lib/libtbb.so.2 +0 -0
- package/lib/libtbbmalloc.so.2 +0 -0
- package/lib/libtbbmalloc_proxy.so.2 +0 -0
- package/occt_gltf_addon.node +0 -0
- package/package.json +6 -2
- package/resources/BOPAlgo/BOPAlgo.msg +129 -0
- package/resources/BOPAlgo/FILES +1 -0
- package/resources/DrawResources/CURVES.tcl +38 -0
- package/resources/DrawResources/CheckCommands.tcl +1206 -0
- package/resources/DrawResources/DrawDefault +130 -0
- package/resources/DrawResources/DrawPlugin +64 -0
- package/resources/DrawResources/DrawTK.tcl +623 -0
- package/resources/DrawResources/FILES +16 -0
- package/resources/DrawResources/Geometry.tcl +96 -0
- package/resources/DrawResources/InitEnvironment.tcl +50 -0
- package/resources/DrawResources/Move.tcl +85 -0
- package/resources/DrawResources/OCC_logo.png +0 -0
- package/resources/DrawResources/PROFIL.tcl +726 -0
- package/resources/DrawResources/SCAN.tcl +192 -0
- package/resources/DrawResources/SURFACES.tcl +35 -0
- package/resources/DrawResources/StandardCommands.tcl +451 -0
- package/resources/DrawResources/StandardViews.tcl +284 -0
- package/resources/DrawResources/TKTopTest.tcl +27 -0
- package/resources/DrawResources/TestCommands.tcl +2969 -0
- package/resources/DrawResources/Vector.tcl +402 -0
- package/resources/DrawResources/dfb_attribns.gif +0 -0
- package/resources/DrawResources/dfb_attribute.gif +0 -0
- package/resources/DrawResources/dfb_folder.gif +0 -0
- package/resources/DrawResources/dftree.tcl +381 -0
- package/resources/DrawResources/lamp.ico +0 -0
- package/resources/SHMessage/FILES +2 -0
- package/resources/SHMessage/SHAPE.fr +267 -0
- package/resources/SHMessage/SHAPE.us +267 -0
- package/resources/Shaders/Declarations.glsl +276 -0
- package/resources/Shaders/DeclarationsImpl.glsl +121 -0
- package/resources/Shaders/Display.fs +157 -0
- package/resources/Shaders/FILES +27 -0
- package/resources/Shaders/LightShadow.glsl +48 -0
- package/resources/Shaders/PBRCookTorrance.glsl +20 -0
- package/resources/Shaders/PBRDirectionalLight.glsl +20 -0
- package/resources/Shaders/PBRDistribution.glsl +9 -0
- package/resources/Shaders/PBREnvBaking.fs +226 -0
- package/resources/Shaders/PBREnvBaking.vs +55 -0
- package/resources/Shaders/PBRFresnel.glsl +36 -0
- package/resources/Shaders/PBRGeometry.glsl +13 -0
- package/resources/Shaders/PBRIllumination.glsl +28 -0
- package/resources/Shaders/PBRPointLight.glsl +27 -0
- package/resources/Shaders/PBRSpotLight.glsl +45 -0
- package/resources/Shaders/PathtraceBase.fs +993 -0
- package/resources/Shaders/PhongDirectionalLight.glsl +29 -0
- package/resources/Shaders/PhongPointLight.glsl +36 -0
- package/resources/Shaders/PhongShading.fs +191 -0
- package/resources/Shaders/PhongShading.vs +43 -0
- package/resources/Shaders/PhongSpotLight.glsl +52 -0
- package/resources/Shaders/PointLightAttenuation.glsl +35 -0
- package/resources/Shaders/RaytraceBase.fs +1236 -0
- package/resources/Shaders/RaytraceBase.vs +12 -0
- package/resources/Shaders/RaytraceRender.fs +134 -0
- package/resources/Shaders/RaytraceSmooth.fs +80 -0
- package/resources/Shaders/SkydomBackground.fs +300 -0
- package/resources/Shaders/TangentSpaceNormal.glsl +17 -0
- package/resources/StdResource/FILES +6 -0
- package/resources/StdResource/MigrationSheet.txt +21 -0
- package/resources/StdResource/Plugin +52 -0
- package/resources/StdResource/Standard +25 -0
- package/resources/StdResource/StandardLite +22 -0
- package/resources/StdResource/TObj +17 -0
- package/resources/StdResource/XCAF +50 -0
- package/resources/TObj/FILES +1 -0
- package/resources/TObj/TObj.msg +85 -0
- package/resources/Textures/1d_elevation.rgb +0 -0
- package/resources/Textures/2d_MatraDatavision.rgb +0 -0
- package/resources/Textures/2d_alienskin.rgb +0 -0
- package/resources/Textures/2d_aluminum.rgb +0 -0
- package/resources/Textures/2d_blue_rock.rgb +0 -0
- package/resources/Textures/2d_bluewhite_paper.rgb +0 -0
- package/resources/Textures/2d_brushed.rgb +0 -0
- package/resources/Textures/2d_bubbles.rgb +0 -0
- package/resources/Textures/2d_bumps.rgb +0 -0
- package/resources/Textures/2d_cast.rgb +0 -0
- package/resources/Textures/2d_chess.rgba +0 -0
- package/resources/Textures/2d_chipbd.rgb +0 -0
- package/resources/Textures/2d_clouds.rgb +0 -0
- package/resources/Textures/2d_flesh.rgb +0 -0
- package/resources/Textures/2d_floor.rgb +0 -0
- package/resources/Textures/2d_galvnisd.rgb +0 -0
- package/resources/Textures/2d_grass.rgb +0 -0
- package/resources/Textures/2d_knurl.rgb +0 -0
- package/resources/Textures/2d_maple.rgb +0 -0
- package/resources/Textures/2d_marble.rgb +0 -0
- package/resources/Textures/2d_mottled.rgb +0 -0
- package/resources/Textures/2d_rain.rgb +0 -0
- package/resources/Textures/2d_rock.rgb +0 -0
- package/resources/Textures/FILES +31 -0
- package/resources/Textures/env_clouds.rgb +0 -0
- package/resources/Textures/env_cv.rgb +0 -0
- package/resources/Textures/env_lines.rgb +0 -0
- package/resources/Textures/env_medit.rgb +0 -0
- package/resources/Textures/env_pearl.rgb +0 -0
- package/resources/Textures/env_road.rgb +0 -0
- package/resources/Textures/env_sky1.rgb +0 -0
- package/resources/Textures/env_sky2.rgb +0 -0
- package/resources/UnitsAPI/CurrentUnits +74 -0
- package/resources/UnitsAPI/FILES +4 -0
- package/resources/UnitsAPI/MDTVBaseUnits +70 -0
- package/resources/UnitsAPI/MDTVCurrentUnits +74 -0
- package/resources/UnitsAPI/Units.dat +481 -0
- package/resources/XRResources/FILES +10 -0
- package/resources/XRResources/occtvr_actions.json +225 -0
- package/resources/XRResources/occtvr_bindings_generic.json +87 -0
- package/resources/XRResources/occtvr_bindings_holographic_hmd.json +18 -0
- package/resources/XRResources/occtvr_bindings_index_hmd.json +18 -0
- package/resources/XRResources/occtvr_bindings_rift.json +18 -0
- package/resources/XRResources/occtvr_bindings_touch.json +160 -0
- package/resources/XRResources/occtvr_bindings_vive.json +18 -0
- package/resources/XRResources/occtvr_bindings_vive_controller.json +139 -0
- package/resources/XRResources/occtvr_bindings_vive_cosmos.json +18 -0
- package/resources/XRResources/occtvr_bindings_vive_pro.json +18 -0
- package/resources/XSMessage/FILES +2 -0
- package/resources/XSMessage/XSTEP.fr +1026 -0
- package/resources/XSMessage/XSTEP.us +1023 -0
- package/resources/XSTEPResource/FILES +2 -0
- package/resources/XSTEPResource/IGES +65 -0
- package/resources/XSTEPResource/STEP +68 -0
- package/resources/XmlOcafResource/FILES +11 -0
- package/resources/XmlOcafResource/XmlOcaf.xsd +131 -0
- package/resources/XmlOcafResource/XmlOcaf_SmallTypes.xsd +217 -0
- package/resources/XmlOcafResource/XmlOcaf_TDF.xsd +33 -0
- package/resources/XmlOcafResource/XmlOcaf_TDataStd.xsd +230 -0
- package/resources/XmlOcafResource/XmlOcaf_TDataStd_Name.xsd +37 -0
- package/resources/XmlOcafResource/XmlOcaf_TDocStd.xsd +37 -0
- package/resources/XmlOcafResource/XmlOcaf_TFunction.xsd +38 -0
- package/resources/XmlOcafResource/XmlOcaf_TNaming.xsd +128 -0
- package/resources/XmlOcafResource/XmlOcaf_TNaming_NamedShape.xsd +97 -0
- package/resources/XmlOcafResource/XmlOcaf_TPrsStd.xsd +42 -0
- package/resources/XmlOcafResource/XmlXcaf.xsd +109 -0
- package/resources/samples/tcl/ANC101.tcl +282 -0
- package/resources/samples/tcl/DataExchangeDemo.tcl +85 -0
- package/resources/samples/tcl/MBBGehauseRohteil.tcl +268 -0
- package/resources/samples/tcl/ModelingDemo.tcl +120 -0
- package/resources/samples/tcl/Penrose.tcl +87 -0
- package/resources/samples/tcl/Readme.txt +4 -0
- package/resources/samples/tcl/VisualizationDemo.tcl +162 -0
- package/resources/samples/tcl/bottle.tcl +115 -0
- package/resources/samples/tcl/cad.tcl +63 -0
- package/resources/samples/tcl/cpu.tcl +327 -0
- package/resources/samples/tcl/cutter.tcl +91 -0
- package/resources/samples/tcl/dimensions.tcl +83 -0
- package/resources/samples/tcl/drill.tcl +147 -0
- package/resources/samples/tcl/logo2019.tcl +89 -0
- package/resources/samples/tcl/markers.tcl +76 -0
- package/resources/samples/tcl/materials.tcl +75 -0
- package/resources/samples/tcl/pathtrace_ball.tcl +79 -0
- package/resources/samples/tcl/pathtrace_cube.tcl +85 -0
- package/resources/samples/tcl/pathtrace_materials.tcl +229 -0
- package/resources/samples/tcl/pencil.tcl +64 -0
- package/resources/samples/tcl/raytrace.tcl +44 -0
- package/resources/samples/tcl/snowflake.tcl +161 -0
- package/resources/samples/tcl/spheres.tcl +148 -0
- package/resources/samples/tcl/vis_pbr_spheres.tcl +94 -0
- package/resources/samples/tcl/xde.tcl +47 -0
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
# Copyright (c) 1999-2014 OPEN CASCADE SAS
|
|
2
|
+
#
|
|
3
|
+
# This file is part of Open CASCADE Technology software library.
|
|
4
|
+
#
|
|
5
|
+
# This library is free software; you can redistribute it and/or modify it under
|
|
6
|
+
# the terms of the GNU Lesser General Public License version 2.1 as published
|
|
7
|
+
# by the Free Software Foundation, with special exception defined in the file
|
|
8
|
+
# OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
|
9
|
+
# distribution for complete text of the license and disclaimer of any warranty.
|
|
10
|
+
#
|
|
11
|
+
# Alternatively, this file may be used under the terms of Open CASCADE
|
|
12
|
+
# commercial license or contractual agreement.
|
|
13
|
+
|
|
14
|
+
proc 2dscan {} {
|
|
15
|
+
dtyp .
|
|
16
|
+
set name [lastrep id x y MOUSEbutton]
|
|
17
|
+
global $name
|
|
18
|
+
lastrep id x1 y1 z1 MOUSEbutton
|
|
19
|
+
dset x0 x1 y0 y1 z0 z1 MOUSEbutton 0
|
|
20
|
+
erase $name
|
|
21
|
+
draw id 6 $name
|
|
22
|
+
while {[dval MOUSEbutton] == 0} {
|
|
23
|
+
pick id x2 y2 z2 MOUSEbutton nowait
|
|
24
|
+
dset dx x2-x1 dy y2-y1 dz z2-z1 x1 x2 y1 y2 z1 z2
|
|
25
|
+
draw id 6 $name
|
|
26
|
+
2dtranslate $name dx dy
|
|
27
|
+
draw id 6 $name
|
|
28
|
+
}
|
|
29
|
+
draw id 6 $name
|
|
30
|
+
if {[dval MOUSEbutton] == 1} { display $name; return; }
|
|
31
|
+
dset dx x0-x2 dy y0-y2 dz z0-z2
|
|
32
|
+
2dtranslate $name dx dy
|
|
33
|
+
display $name
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
proc scan {} {
|
|
37
|
+
dtyp .
|
|
38
|
+
set name [lastrep id x y MOUSEbutton]
|
|
39
|
+
global $name
|
|
40
|
+
lastrep id x1 y1 z1 MOUSEbutton
|
|
41
|
+
dset x0 x1 y0 y1 z0 z1 MOUSEbutton 0
|
|
42
|
+
erase $name
|
|
43
|
+
draw id 6 $name
|
|
44
|
+
while {[dval MOUSEbutton] == 0} {
|
|
45
|
+
pick id x2 y2 z2 MOUSEbutton nowait
|
|
46
|
+
dset dx x2-x1 dy y2-y1 dz z2-z1 x1 x2 y1 y2 z1 z2
|
|
47
|
+
draw id 6 $name
|
|
48
|
+
translate $name dx dy dz
|
|
49
|
+
draw id 6 $name
|
|
50
|
+
}
|
|
51
|
+
draw id 6 $name
|
|
52
|
+
if {[dval MOUSEbutton] == 1} { display $name; return; }
|
|
53
|
+
dset dx x0-x2 dy y0-y2 dz z0-z2
|
|
54
|
+
translate $name dx dy dz
|
|
55
|
+
display $name
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
proc scanx {} {
|
|
59
|
+
dtyp .
|
|
60
|
+
set name [lastrep id x y MOUSEbutton]
|
|
61
|
+
global $name
|
|
62
|
+
lastrep id x1 y1 z1 MOUSEbutton
|
|
63
|
+
dset x0 x1 y0 y1 z0 z1 MOUSEbutton 0
|
|
64
|
+
erase $name
|
|
65
|
+
draw id 6 $name
|
|
66
|
+
while {[dval MOUSEbutton] == 0} {
|
|
67
|
+
pick id x2 y2 z2 MOUSEbutton nowait
|
|
68
|
+
dset dx x2-x1 x1 x2
|
|
69
|
+
draw id 6 $name
|
|
70
|
+
translate $name dx 0 0
|
|
71
|
+
draw id 6 $name
|
|
72
|
+
}
|
|
73
|
+
draw id 6 $name
|
|
74
|
+
if {[dval MOUSEbutton] == 1} {display $name; return;}
|
|
75
|
+
dset dx x0-x2
|
|
76
|
+
translate $name dx 0 0
|
|
77
|
+
display $name
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
proc scany {} {
|
|
81
|
+
dtyp .
|
|
82
|
+
set name [lastrep id x y MOUSEbutton]
|
|
83
|
+
global $name
|
|
84
|
+
lastrep id x1 y1 z1 MOUSEbutton
|
|
85
|
+
dset x0 x1 y0 y1 z0 z1 MOUSEbutton 0
|
|
86
|
+
erase $name
|
|
87
|
+
draw id 6 $name
|
|
88
|
+
while {[dval MOUSEbutton] == 0} {
|
|
89
|
+
pick id x2 y2 z2 MOUSEbutton nowait
|
|
90
|
+
dset dy y2-y1 y1 y2
|
|
91
|
+
draw id 6 $name
|
|
92
|
+
translate $name 0 dy 0
|
|
93
|
+
draw id 6 $name
|
|
94
|
+
}
|
|
95
|
+
draw id 6 $name
|
|
96
|
+
if {[dval MOUSEbutton] == 1} { display $name; return;}
|
|
97
|
+
dset dy y0-y2
|
|
98
|
+
translate $name 0 dy 0
|
|
99
|
+
display $name
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
proc scanz {} {
|
|
103
|
+
dtyp .
|
|
104
|
+
set name [lastrep id x y MOUSEbutton]
|
|
105
|
+
global $name
|
|
106
|
+
lastrep id x1 y1 z1 MOUSEbutton
|
|
107
|
+
dset x0 x1 y0 y1 z0 z1 MOUSEbutton 0
|
|
108
|
+
erase $name
|
|
109
|
+
draw id 6 $name
|
|
110
|
+
while {[dval MOUSEbutton] == 0} {
|
|
111
|
+
pick id x2 y2 z2 MOUSEbutton nowait
|
|
112
|
+
dset dz z2-z1 z1 z2
|
|
113
|
+
draw id 6 $name
|
|
114
|
+
translate $name 0 0 dz
|
|
115
|
+
draw id 6 $name
|
|
116
|
+
}
|
|
117
|
+
draw id 6 $name
|
|
118
|
+
if {[dval MOUSEbutton] == 1} { display $name; return;}
|
|
119
|
+
dset dz z0-z2
|
|
120
|
+
translate $name 0 0 dz
|
|
121
|
+
display $name
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
proc tscan {} {
|
|
125
|
+
dtyp .
|
|
126
|
+
set name [lastrep id x y MOUSEbutton]
|
|
127
|
+
global $name
|
|
128
|
+
lastrep id x1 y1 z1 MOUSEbutton
|
|
129
|
+
dset x0 x1 y0 y1 z0 z1 MOUSEbutton 0
|
|
130
|
+
while {[dval MOUSEbutton] == 0} {
|
|
131
|
+
pick id x2 y2 z2 MOUSEbutton nowait
|
|
132
|
+
dset dx x2-x0 dy y2-y0 dz z2-z0
|
|
133
|
+
eval ttranslate [explode $name e] dx dy dz
|
|
134
|
+
repaint
|
|
135
|
+
}
|
|
136
|
+
if {[dval MOUSEbutton] == 3} return;
|
|
137
|
+
dset dx x2-x0 dy y2-y0 dz z2-z0
|
|
138
|
+
ttranslate $name dx dy dz
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
proc tscanx {} {
|
|
142
|
+
dtyp .
|
|
143
|
+
set name [lastrep id x y MOUSEbutton]
|
|
144
|
+
global $name
|
|
145
|
+
lastrep id x1 y1 z1 MOUSEbutton
|
|
146
|
+
dset x0 x1 y0 y1 z0 z1 MOUSEbutton 0
|
|
147
|
+
while {[dval MOUSEbutton] == 0} {
|
|
148
|
+
pick id x2 y2 z2 MOUSEbutton nowait
|
|
149
|
+
dset dx x2-x0
|
|
150
|
+
eval ttranslate [explode $name e] dx 0 0
|
|
151
|
+
repaint
|
|
152
|
+
}
|
|
153
|
+
if {[dval MOUSEbutton] == 3} return;
|
|
154
|
+
dset dx x2-x0
|
|
155
|
+
ttranslate $name dx 0 0
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
proc tscany {} {
|
|
159
|
+
dtyp .
|
|
160
|
+
set name [lastrep id x y MOUSEbutton]
|
|
161
|
+
global $name
|
|
162
|
+
lastrep id x1 y1 z1 MOUSEbutton
|
|
163
|
+
dset x0 x1 y0 y1 z0 z1 MOUSEbutton 0
|
|
164
|
+
while {[dval MOUSEbutton] == 0} {
|
|
165
|
+
pick id x2 y2 z2 MOUSEbutton nowait
|
|
166
|
+
dset dy y2-y0
|
|
167
|
+
eval ttranslate [explode $name e] 0 dy 0
|
|
168
|
+
repaint
|
|
169
|
+
}
|
|
170
|
+
if {[dval MOUSEbutton] == 3} return;
|
|
171
|
+
dset dy y2-y0
|
|
172
|
+
ttranslate $name 0 dy 0
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
proc tscanz {} {
|
|
176
|
+
dtyp .
|
|
177
|
+
set name [lastrep id x y MOUSEbutton]
|
|
178
|
+
global $name
|
|
179
|
+
lastrep id x1 y1 z1 MOUSEbutton
|
|
180
|
+
dset x0 x1 y0 y1 z0 z1 MOUSEbutton 0
|
|
181
|
+
while {[dval MOUSEbutton] == 0} {
|
|
182
|
+
pick id x2 y2 z2 MOUSEbutton nowait
|
|
183
|
+
dset dz z2-z0
|
|
184
|
+
eval ttranslate [explode $name e] 0 0 dz
|
|
185
|
+
repaint
|
|
186
|
+
}
|
|
187
|
+
if {[dval MOUSEbutton] == 3} return;
|
|
188
|
+
dset dz z2-z0
|
|
189
|
+
ttranslate $name 0 0 dz
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Copyright (c) 1999-2014 OPEN CASCADE SAS
|
|
2
|
+
#
|
|
3
|
+
# This file is part of Open CASCADE Technology software library.
|
|
4
|
+
#
|
|
5
|
+
# This library is free software; you can redistribute it and/or modify it under
|
|
6
|
+
# the terms of the GNU Lesser General Public License version 2.1 as published
|
|
7
|
+
# by the Free Software Foundation, with special exception defined in the file
|
|
8
|
+
# OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
|
9
|
+
# distribution for complete text of the license and disclaimer of any warranty.
|
|
10
|
+
#
|
|
11
|
+
# Alternatively, this file may be used under the terms of Open CASCADE
|
|
12
|
+
# commercial license or contractual agreement.
|
|
13
|
+
|
|
14
|
+
if { [info commands addmenu] == "" } { return }
|
|
15
|
+
|
|
16
|
+
global theMenus
|
|
17
|
+
if [info exists theMenus(Surfaces)] {
|
|
18
|
+
destroy [string trimright $theMenus(Surfaces) ".menu"]
|
|
19
|
+
unset theMenus(Surfaces)
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
proc dialanasurf {command sname args} {
|
|
23
|
+
set com "dialbox $command name $sname origin {0 0 0} normal {0 0 1} xdir {1 0 0} "
|
|
24
|
+
foreach l $args {append com " $l"}
|
|
25
|
+
eval $com
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
addmenu Surfaces "Plane" {dialanasurf plane p {}}
|
|
29
|
+
addmenu Surfaces "Cylinder" {dialanasurf cylinder c {radius 1}}
|
|
30
|
+
addmenu Surfaces "Cone" {dialanasurf cone c {angle 30 radius 0}}
|
|
31
|
+
addmenu Surfaces "Sphere" {dialanasurf sphere s {radius 1}}
|
|
32
|
+
addmenu Surfaces "Torus" {dialanasurf torus t {radii {1 0.8}}}
|
|
33
|
+
addmenu Surfaces "Revolution" {dialbox revsur name r basis . origin {0 0 0} axis {0 0 1}}
|
|
34
|
+
addmenu Surfaces "Extrusion" {dialbox extsurf name e basis . direction {0 0 1}}
|
|
35
|
+
redrawhelp
|
|
@@ -0,0 +1,451 @@
|
|
|
1
|
+
# Copyright (c) 1999-2014 OPEN CASCADE SAS
|
|
2
|
+
#
|
|
3
|
+
# This file is part of Open CASCADE Technology software library.
|
|
4
|
+
#
|
|
5
|
+
# This library is free software; you can redistribute it and/or modify it under
|
|
6
|
+
# the terms of the GNU Lesser General Public License version 2.1 as published
|
|
7
|
+
# by the Free Software Foundation, with special exception defined in the file
|
|
8
|
+
# OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
|
9
|
+
# distribution for complete text of the license and disclaimer of any warranty.
|
|
10
|
+
#
|
|
11
|
+
# Alternatively, this file may be used under the terms of Open CASCADE
|
|
12
|
+
# commercial license or contractual agreement.
|
|
13
|
+
|
|
14
|
+
#
|
|
15
|
+
# Draw standard initialisation
|
|
16
|
+
#
|
|
17
|
+
|
|
18
|
+
#################################################
|
|
19
|
+
# prompts
|
|
20
|
+
#################################################
|
|
21
|
+
|
|
22
|
+
set Draw_CmdIndex 0
|
|
23
|
+
set tcl_prompt1 {
|
|
24
|
+
incr Draw_CmdIndex
|
|
25
|
+
puts -nonewline "Draw\[$Draw_CmdIndex\]> "
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
set tcl_prompt2 {puts -nonewline "> "}
|
|
29
|
+
|
|
30
|
+
#################################################
|
|
31
|
+
# the help command in TCL
|
|
32
|
+
#################################################
|
|
33
|
+
proc help {{theCommand ""} {theHelpString ""} {theGroup "Procedures"}} {
|
|
34
|
+
global Draw_Helps Draw_Groups
|
|
35
|
+
if {$theCommand == ""} {
|
|
36
|
+
# help general
|
|
37
|
+
set aCmdWidth 15
|
|
38
|
+
foreach aGrpIter [lsort [array names Draw_Groups]] {
|
|
39
|
+
dputs -intense "\n\n$aGrpIter"
|
|
40
|
+
set i 1
|
|
41
|
+
set aLine ""
|
|
42
|
+
foreach aCmdIter [lsort $Draw_Groups($aGrpIter)] {
|
|
43
|
+
if {$i == 1} {
|
|
44
|
+
puts -nonewline "$aLine\n"
|
|
45
|
+
set aLine " "
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
append aLine $aCmdIter
|
|
49
|
+
set aLineLen [string length $aLine]
|
|
50
|
+
for {set j [expr $aLineLen + 1]} {$j < [expr $aCmdWidth * $i + 2]} {incr j} {
|
|
51
|
+
append aLine " "
|
|
52
|
+
}
|
|
53
|
+
append aLine " "
|
|
54
|
+
incr i
|
|
55
|
+
if {$i == 5} {set i 1}
|
|
56
|
+
}
|
|
57
|
+
puts "$aLine"
|
|
58
|
+
}
|
|
59
|
+
} elseif {$theHelpString == ""} {
|
|
60
|
+
# help function
|
|
61
|
+
set isFound 0
|
|
62
|
+
foreach aCmdIter [lsort [array names Draw_Helps]] {
|
|
63
|
+
if {[string match $theCommand $aCmdIter]} {
|
|
64
|
+
dputs -nonewline -intense $aCmdIter
|
|
65
|
+
set aLines [split $Draw_Helps($aCmdIter) "\n"]
|
|
66
|
+
set aNbLines [llength $aLines]
|
|
67
|
+
set isFirstLine 0
|
|
68
|
+
for {set aLineIter 0} {$aLineIter < $aNbLines} {incr aLineIter} {
|
|
69
|
+
set aLine [lindex $aLines $aLineIter]
|
|
70
|
+
if { "$aLine" == "" && ($aLineIter == 0 || $aLineIter == [expr $aNbLines - 1]) } { continue }
|
|
71
|
+
if { $isFirstLine == 0 } {
|
|
72
|
+
set isFirstLine 1
|
|
73
|
+
for {set j [string length $aCmdIter]} {$j < 15} {incr j} {
|
|
74
|
+
puts -nonewline " "
|
|
75
|
+
}
|
|
76
|
+
puts -nonewline " : "
|
|
77
|
+
} else {
|
|
78
|
+
if { ![string match "\t\t:*" $aLine] } {
|
|
79
|
+
puts -nonewline " : "
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
puts -nonewline "${aLine}\n"
|
|
83
|
+
}
|
|
84
|
+
set isFound 1
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
if {!$isFound} {
|
|
88
|
+
if {[string first * $theCommand] != -1} {
|
|
89
|
+
puts "No matching commands found!"
|
|
90
|
+
} else {
|
|
91
|
+
puts "No help found for '$theCommand'! Please try 'help $theCommand*' to find matching commands."
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
} else {
|
|
95
|
+
# set help
|
|
96
|
+
lappend Draw_Groups($theGroup) $theCommand
|
|
97
|
+
set Draw_Helps($theCommand) $theHelpString
|
|
98
|
+
}
|
|
99
|
+
flush stdout
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
help help {help pattern, or help command string group, to set help} {DRAW General Commands}
|
|
103
|
+
#################################################
|
|
104
|
+
# the getsourcefile command in TCL
|
|
105
|
+
#################################################
|
|
106
|
+
|
|
107
|
+
help getsourcefile {getsourcefile, or getsourcefile command } {DRAW General Commands}
|
|
108
|
+
|
|
109
|
+
proc getsourcefile {{command ""}} {
|
|
110
|
+
|
|
111
|
+
global Draw_Helps Draw_Groups Draw_Files
|
|
112
|
+
|
|
113
|
+
set out {}
|
|
114
|
+
if {$command == ""} {
|
|
115
|
+
|
|
116
|
+
# help general
|
|
117
|
+
foreach h [lsort [array names Draw_Groups]] {
|
|
118
|
+
lappend out "" "" "$h"
|
|
119
|
+
set i 0
|
|
120
|
+
foreach f [lsort $Draw_Groups($h)] {
|
|
121
|
+
if {$i == 0} {
|
|
122
|
+
lappend out ""
|
|
123
|
+
}
|
|
124
|
+
incr i
|
|
125
|
+
#
|
|
126
|
+
# check that the command has its source file set
|
|
127
|
+
#
|
|
128
|
+
foreach command_that_has_file [array names Draw_Files] {
|
|
129
|
+
if {($command_that_has_file == $f)} {
|
|
130
|
+
lappend out [format {%-20s %s} $f $Draw_Files($f)]
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
} else {
|
|
136
|
+
|
|
137
|
+
# getsourcefile fonction
|
|
138
|
+
append command "*"
|
|
139
|
+
foreach f [lsort [array names Draw_Files]] {
|
|
140
|
+
if {[string match $command $f]} {
|
|
141
|
+
lappend out [format {%-20s %s} $f $Draw_Files($f)]
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
}
|
|
146
|
+
return [join $out "\n"]
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
#################################################
|
|
150
|
+
# whatis
|
|
151
|
+
#################################################
|
|
152
|
+
|
|
153
|
+
#proc gwhatis {aVarName} {
|
|
154
|
+
# global $aVarName
|
|
155
|
+
# puts -nonewline $aVarName; puts -nonewline " is a "; puts [dtyp ${aVarName}]
|
|
156
|
+
#}
|
|
157
|
+
|
|
158
|
+
help whatis "whatis object1 object2 ..."
|
|
159
|
+
|
|
160
|
+
proc whatis args {
|
|
161
|
+
set __out_string ""
|
|
162
|
+
foreach i $args {
|
|
163
|
+
if {$i == "."} {set i [dname $i]}
|
|
164
|
+
#gwhatis $i
|
|
165
|
+
global $i
|
|
166
|
+
set __tmp_string "$i is a [dtyp $i]\n"
|
|
167
|
+
set __out_string "${__out_string}${__tmp_string}"
|
|
168
|
+
}
|
|
169
|
+
return ${__out_string}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
#################################################
|
|
173
|
+
# library, lsource
|
|
174
|
+
#################################################
|
|
175
|
+
|
|
176
|
+
proc library lib {
|
|
177
|
+
global auto_path
|
|
178
|
+
set auto_path [linsert $auto_path 0 $lib]
|
|
179
|
+
if [file readable $lib/LibraryInit] {
|
|
180
|
+
puts "Loading $lib/LibraryInit"
|
|
181
|
+
uplevel "source $lib/LibraryInit"
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
proc lsource file {
|
|
186
|
+
if [file readable $file] {source $file} else {
|
|
187
|
+
global auto_path
|
|
188
|
+
foreach dir $auto_path {
|
|
189
|
+
if [file readable $dir/$file] {
|
|
190
|
+
uplevel #0 "source $dir/$file"
|
|
191
|
+
break
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
#################################################
|
|
198
|
+
# directory
|
|
199
|
+
#################################################
|
|
200
|
+
|
|
201
|
+
proc isgdraw {var} {
|
|
202
|
+
global $var
|
|
203
|
+
return [isdraw $var]
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
help directory {directory [pattern], list draw variables} {DRAW Variables management}
|
|
207
|
+
|
|
208
|
+
proc directory {{joker *}} {
|
|
209
|
+
set res ""
|
|
210
|
+
foreach var [info globals $joker] {
|
|
211
|
+
if [isgdraw $var] {lappend res $var}
|
|
212
|
+
}
|
|
213
|
+
return $res
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
proc lsd {} { exec ls [datadir] }
|
|
217
|
+
|
|
218
|
+
proc dall {} {
|
|
219
|
+
set schmurtz ""
|
|
220
|
+
foreach var [info globals] {
|
|
221
|
+
global $var
|
|
222
|
+
if [isdraw $var] {
|
|
223
|
+
if ![isprot $var] {
|
|
224
|
+
lappend schmurtz $var; unset $var
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
return $schmurtz
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
#################################################
|
|
232
|
+
# repeat, do
|
|
233
|
+
#################################################
|
|
234
|
+
|
|
235
|
+
proc repeat {val script} {
|
|
236
|
+
for {set i 1} {$i <= $val} {incr i} {uplevel $script}
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
proc do {var start end args} {
|
|
240
|
+
global errorInfo errorCode
|
|
241
|
+
if {[llength args] == 1} {
|
|
242
|
+
set incr 1
|
|
243
|
+
set body args
|
|
244
|
+
} else {
|
|
245
|
+
set incr [lindex 1 args]
|
|
246
|
+
set body [lindex 2 args]
|
|
247
|
+
}
|
|
248
|
+
upvar $var v
|
|
249
|
+
if {[dval $incr] < 0} {set rel >=} else {set rel <=}
|
|
250
|
+
for {dset v $start} {[dval v] $rel [dval end]} {dset v [dval v+($incr)]} {
|
|
251
|
+
set code [catch {uplevel $body} string]
|
|
252
|
+
if {$code == 1} {
|
|
253
|
+
return -code error -errorInfo $errorInfo -errorcode $errorCode $string
|
|
254
|
+
} elseif {$code == 2} {
|
|
255
|
+
return -code return $string
|
|
256
|
+
}elseif {$code == 3} {
|
|
257
|
+
return
|
|
258
|
+
} elseif {$code > 4} {
|
|
259
|
+
return -code $code $string
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
#################################################
|
|
265
|
+
# datadir, save, restore
|
|
266
|
+
#################################################
|
|
267
|
+
|
|
268
|
+
set Draw_DataDir "."
|
|
269
|
+
|
|
270
|
+
help datadir {datadir [directory]} "DRAW Variables management"
|
|
271
|
+
|
|
272
|
+
proc datadir {{dir ""}} {
|
|
273
|
+
global Draw_DataDir
|
|
274
|
+
if {$dir != ""} {
|
|
275
|
+
if {![file isdirectory $dir]} {
|
|
276
|
+
error "datadir : $dir is not a directory"
|
|
277
|
+
} else {
|
|
278
|
+
set Draw_DataDir $dir
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
return $Draw_DataDir
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
help save {save variable [filename]} "DRAW Variables management"
|
|
285
|
+
|
|
286
|
+
proc save {name {file ""}} {
|
|
287
|
+
if {$file == ""} {set file $name}
|
|
288
|
+
upvar $name n
|
|
289
|
+
if {![isdraw n]} {error "save : $name is not a Draw variable"}
|
|
290
|
+
global Draw_DataDir
|
|
291
|
+
bsave n [file join $Draw_DataDir $file]
|
|
292
|
+
return [file join $Draw_DataDir $file]
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
help restore {restore filename [variablename]} "DRAW Variables management"
|
|
296
|
+
|
|
297
|
+
proc restore {file {name ""}} {
|
|
298
|
+
if {$name == ""} {
|
|
299
|
+
# if name is not given explicitly, use name of the file w/o extension
|
|
300
|
+
set name [file rootname [file tail $file]]
|
|
301
|
+
}
|
|
302
|
+
global Draw_DataDir
|
|
303
|
+
upvar $name n
|
|
304
|
+
brestore [file join $Draw_DataDir $file ] n
|
|
305
|
+
return $name
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
#################################################
|
|
309
|
+
# misc...
|
|
310
|
+
#################################################
|
|
311
|
+
|
|
312
|
+
proc ppcurve {a} {
|
|
313
|
+
2dclear;
|
|
314
|
+
uplevel pcurve $a;
|
|
315
|
+
2dfit;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
#################################################
|
|
319
|
+
# display and donly with jokers
|
|
320
|
+
#################################################
|
|
321
|
+
|
|
322
|
+
help disp {display variables matched by glob pattern} "DRAW Variables management"
|
|
323
|
+
|
|
324
|
+
proc disp { args } {
|
|
325
|
+
set res ""
|
|
326
|
+
foreach joker $args {
|
|
327
|
+
if { $joker == "." } {
|
|
328
|
+
dtyp .
|
|
329
|
+
set joker [lastrep id x y b]
|
|
330
|
+
}
|
|
331
|
+
foreach var [info globals $joker] {
|
|
332
|
+
if { $var == "." } {
|
|
333
|
+
dtyp .
|
|
334
|
+
set var [lastrep id x y b]
|
|
335
|
+
}
|
|
336
|
+
if [isgdraw $var] {lappend res $var}
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
uplevel #0 eval display $res
|
|
340
|
+
return $res
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
help don {display only variables matched by glob pattern} "DRAW Variables management"
|
|
344
|
+
|
|
345
|
+
proc don { args } {
|
|
346
|
+
set res ""
|
|
347
|
+
foreach joker $args {
|
|
348
|
+
if { $joker == "." } {
|
|
349
|
+
dtyp .
|
|
350
|
+
set joker [lastrep id x y b]
|
|
351
|
+
}
|
|
352
|
+
foreach var [info globals $joker] {
|
|
353
|
+
if { $var == "." } {
|
|
354
|
+
dtyp .
|
|
355
|
+
set var [lastrep id x y b]
|
|
356
|
+
}
|
|
357
|
+
if [isgdraw $var] {lappend res $var}
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
uplevel #0 eval donly $res
|
|
361
|
+
return $res
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
help del {unset (remove) variables matched by glob pattern} "DRAW Variables management"
|
|
365
|
+
|
|
366
|
+
proc del args {
|
|
367
|
+
set res ""
|
|
368
|
+
foreach joker [eval concat $args] {
|
|
369
|
+
if { $joker == "." } {
|
|
370
|
+
dtyp .
|
|
371
|
+
set joker [lastrep id x y b]
|
|
372
|
+
}
|
|
373
|
+
foreach var [directory $joker] {
|
|
374
|
+
global $var
|
|
375
|
+
if ![isprot $var] {
|
|
376
|
+
lappend res $var; unset $var
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
return $res
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
help era {erase variables matched by glob pattern} "DRAW Variables management"
|
|
384
|
+
|
|
385
|
+
proc era args {
|
|
386
|
+
set res ""
|
|
387
|
+
foreach joker [eval concat $args] {
|
|
388
|
+
if { $joker == "." } {
|
|
389
|
+
dtyp .
|
|
390
|
+
set joker [lastrep id x y b]
|
|
391
|
+
}
|
|
392
|
+
eval lappend res [directory $joker]
|
|
393
|
+
}
|
|
394
|
+
if [llength $res] {
|
|
395
|
+
uplevel \#0 eval erase $res
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
# The following commands (definitions are surrounded by if) are
|
|
400
|
+
# available in extended Tcl (Tclx).
|
|
401
|
+
# These procedures are added just to make full-working simulations of them.
|
|
402
|
+
|
|
403
|
+
if {[info commands lvarpop] == ""} {
|
|
404
|
+
proc lvarpop args {
|
|
405
|
+
upvar [lindex $args 0] lvar
|
|
406
|
+
set index 0
|
|
407
|
+
set len [llength $lvar]
|
|
408
|
+
if {[llength $args] > 1} {
|
|
409
|
+
set ind [lindex $args 1]
|
|
410
|
+
if [regexp "^end" $ind] {
|
|
411
|
+
set index [expr $len-1]
|
|
412
|
+
} elseif [regexp "^len" $ind] {
|
|
413
|
+
set index $len
|
|
414
|
+
} else {set index $ind}
|
|
415
|
+
}
|
|
416
|
+
set el [lindex $lvar $index]
|
|
417
|
+
set newlvar {}
|
|
418
|
+
for {set i 0} {$i < $index} {incr i} {
|
|
419
|
+
lappend newlvar [lindex $lvar $i]
|
|
420
|
+
}
|
|
421
|
+
if {[llength $args] > 2} {
|
|
422
|
+
lappend newlvar [lindex $args 2]
|
|
423
|
+
}
|
|
424
|
+
for {set i [expr $index+1]} {$i < $len} {incr i} {
|
|
425
|
+
lappend newlvar [lindex $lvar $i]
|
|
426
|
+
}
|
|
427
|
+
set lvar $newlvar
|
|
428
|
+
return $el
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
if {[info commands lmatch] == ""} {
|
|
433
|
+
proc lmatch args {
|
|
434
|
+
set mode [switch -- [lindex $args 0] {
|
|
435
|
+
-exact {format 0}
|
|
436
|
+
-glob {format 1}
|
|
437
|
+
-regexp {format 2}}]
|
|
438
|
+
if {$mode == ""} {set mode 1} else {lvarpop args}
|
|
439
|
+
if {[llength $args] < 2} {puts "usage: lmatch ?mode? list pattern";return}
|
|
440
|
+
set list [lindex $args 0]
|
|
441
|
+
set pattern [lindex $args 1]
|
|
442
|
+
set res {}
|
|
443
|
+
foreach a $list {
|
|
444
|
+
if [switch $mode {
|
|
445
|
+
0 {expr [string compare $a $pattern] == 0}
|
|
446
|
+
1 {string match $pattern $a}
|
|
447
|
+
2 {regexp $pattern $a}}] {lappend res $a}
|
|
448
|
+
}
|
|
449
|
+
return $res
|
|
450
|
+
}
|
|
451
|
+
}
|