occt-gltf-addon-linux-x64 0.1.0 → 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,94 @@
|
|
|
1
|
+
# Script demonstrating PBR metallic-roughness material properties
|
|
2
|
+
#Category: Visualization
|
|
3
|
+
#Title: PBR metallic-rougness spheres
|
|
4
|
+
|
|
5
|
+
pload XDE OCAF MODELING VISUALIZATION
|
|
6
|
+
psphere s 0.35
|
|
7
|
+
|
|
8
|
+
catch { Close D }
|
|
9
|
+
XNewDoc D
|
|
10
|
+
|
|
11
|
+
# grid of spheres
|
|
12
|
+
set THE_UPPER 6
|
|
13
|
+
foreach i [list 0 3] {
|
|
14
|
+
set aPrefix ""
|
|
15
|
+
set aColor "GRAY80"
|
|
16
|
+
if { $i != 0 } {
|
|
17
|
+
set aPrefix "g_";
|
|
18
|
+
set aColor "CCB11D"
|
|
19
|
+
}
|
|
20
|
+
set aColShapes {}
|
|
21
|
+
for { set m 0 } { $m <= $THE_UPPER } { incr m } {
|
|
22
|
+
set aRowShapes {}
|
|
23
|
+
for { set r 0 } { $r <= $THE_UPPER } { incr r } {
|
|
24
|
+
set aName ${aPrefix}m${m}r${r}
|
|
25
|
+
copy s $aName
|
|
26
|
+
lappend aRowShapes $aName
|
|
27
|
+
ttranslate $aName ${r} ${i} ${m}
|
|
28
|
+
}
|
|
29
|
+
set aName ${aPrefix}m${m}
|
|
30
|
+
compound {*}$aRowShapes $aName
|
|
31
|
+
lappend aColShapes $aName
|
|
32
|
+
}
|
|
33
|
+
set aName ${aPrefix}spheres
|
|
34
|
+
compound {*}$aColShapes $aName
|
|
35
|
+
set aLabName "Gray Spheres"
|
|
36
|
+
if { $i != 0 } { set aLabName "Golden Spheres" }
|
|
37
|
+
set aLabComp [XAddShape D $aName 0]
|
|
38
|
+
SetName D $aLabComp $aLabName
|
|
39
|
+
|
|
40
|
+
for { set m 0 } { $m <= $THE_UPPER } { incr m } {
|
|
41
|
+
set aMet [expr 100 * ${m}/$THE_UPPER]
|
|
42
|
+
set aName ${aPrefix}m${m}
|
|
43
|
+
XAddComponent D $aLabComp $aName
|
|
44
|
+
set aLabCompCol [XFindShape D $aName]
|
|
45
|
+
SetName D $aLabCompCol "${aPrefix}m${aMet}%"
|
|
46
|
+
SetName D {*}[XFindComponent D $aName] "${aPrefix}m${aMet}%"
|
|
47
|
+
for { set r 0 } { $r <= $THE_UPPER } { incr r } {
|
|
48
|
+
set aRoug [expr 100 * ${r}/$THE_UPPER]
|
|
49
|
+
set aName ${aPrefix}m${m}r${r}
|
|
50
|
+
XAddComponent D $aLabCompCol $aName
|
|
51
|
+
set aLab [XFindComponent D $aName]
|
|
52
|
+
SetName D {*}$aLab "${aPrefix}m${aMet}%_r${aRoug}%"
|
|
53
|
+
XAddVisMaterial D $aName -baseColor $aColor -metallic ${m}/$THE_UPPER -roughness ${r}/$THE_UPPER
|
|
54
|
+
XSetVisMaterial D {*}$aLab $aName
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
set aLab [XFindShape D s]
|
|
59
|
+
SetName D {*}$aLab "Sphere"
|
|
60
|
+
|
|
61
|
+
XGetAllVisMaterials D
|
|
62
|
+
|
|
63
|
+
# labels
|
|
64
|
+
text2brep tm "Metal" -plane 0 -1 0 0 0 -1 -height 0.5 -pos -0.5 0 6.5 -halign left -valign top -font monospace
|
|
65
|
+
text2brep tnm "Non-metal" -plane 0 -1 0 0 0 -1 -height 0.5 -pos -0.5 0 -0.5 -halign right -valign top -font monospace
|
|
66
|
+
text2brep ts "Smooth" -plane 0 -1 0 1 0 0 -height 0.5 -pos -0.5 0 -0.5 -halign left -valign top -font monospace
|
|
67
|
+
text2brep tr "Rough" -plane 0 -1 0 1 0 0 -height 0.5 -pos 6.5 0 -0.5 -halign right -valign top -font monospace
|
|
68
|
+
compound tm tnm ts tr labs
|
|
69
|
+
set aLab [XAddShape D labs 0]
|
|
70
|
+
SetName D $aLab "Labels"
|
|
71
|
+
XAddComponent D $aLab tm
|
|
72
|
+
XAddComponent D $aLab tnm
|
|
73
|
+
XAddComponent D $aLab ts
|
|
74
|
+
XAddComponent D $aLab tr
|
|
75
|
+
SetName D {*}[XFindComponent D tm] "Metal"
|
|
76
|
+
SetName D [XFindShape D tm] "Metal"
|
|
77
|
+
SetName D {*}[XFindComponent D tnm] "Non-metal"
|
|
78
|
+
SetName D [XFindShape D tnm] "Non-metal"
|
|
79
|
+
SetName D {*}[XFindComponent D ts] "Smooth"
|
|
80
|
+
SetName D [XFindShape D ts] "Smooth"
|
|
81
|
+
SetName D {*}[XFindComponent D tr] "Rough"
|
|
82
|
+
SetName D [XFindShape D tr] "Rough"
|
|
83
|
+
|
|
84
|
+
# Ray-Tracing doesn't work with Compatible Profile on macOS
|
|
85
|
+
if { $::tcl_platform(os) == "Darwin" } { vcaps -core }
|
|
86
|
+
|
|
87
|
+
vclear
|
|
88
|
+
vinit View1 -width 768 -height 768
|
|
89
|
+
vfront
|
|
90
|
+
vrenderparams -shadingModel PBR
|
|
91
|
+
vlight -change 0 -intensity 2.5
|
|
92
|
+
XDisplay -dispMode 1 D
|
|
93
|
+
vcamera -ortho
|
|
94
|
+
vfit
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Simple sample demonstrating work with assemblies in XDE, and assignment of
|
|
2
|
+
# names and colors to components vs. instances
|
|
3
|
+
|
|
4
|
+
#Category: XDE
|
|
5
|
+
#Title: Work with assemblies, colors etc. in XDE
|
|
6
|
+
|
|
7
|
+
pload MODELING
|
|
8
|
+
pload OCAF
|
|
9
|
+
pload XDE
|
|
10
|
+
|
|
11
|
+
puts "Make a link as assembly made of a pin and two instances of the same nut"
|
|
12
|
+
pcylinder pin 1 10
|
|
13
|
+
pcylinder nut 2 2
|
|
14
|
+
compound nut nut nuts
|
|
15
|
+
explode nuts
|
|
16
|
+
ttranslate nuts_1 0 0 7
|
|
17
|
+
ttranslate nuts_2 0 0 1
|
|
18
|
+
compound pin nuts_1 nuts_2 link
|
|
19
|
+
|
|
20
|
+
puts "Add link assembly in XCAF document, and add names and colors:"
|
|
21
|
+
NewDocument D XCAF
|
|
22
|
+
XAddShape D link
|
|
23
|
+
SetName D [XFindShape D pin] "Pin"
|
|
24
|
+
SetName D [XFindShape D nut] "Nut"
|
|
25
|
+
SetName D [XFindShape D link] "Link"
|
|
26
|
+
SetName D [XFindShape D link]:1 "Pin instance"
|
|
27
|
+
SetName D [XFindShape D link]:2 "Nut instance 1"
|
|
28
|
+
SetName D [XFindShape D link]:3 "Nut instance 2"
|
|
29
|
+
|
|
30
|
+
puts "- Pin will be white"
|
|
31
|
+
XSetColor D [XFindShape D pin] WHITE
|
|
32
|
+
puts "- Nut itself will be dark gray"
|
|
33
|
+
XSetColor D [XFindShape D nut] GRAY10
|
|
34
|
+
puts "- Nut instance #1 will be red"
|
|
35
|
+
XSetColor D [XFindShape D link]:2 RED
|
|
36
|
+
puts "- Nut instance #2 will be green"
|
|
37
|
+
XSetColor D [XFindShape D link]:3 GREEN
|
|
38
|
+
|
|
39
|
+
puts "Starting DF browser..."
|
|
40
|
+
DFBrowse D
|
|
41
|
+
puts "Expand the document tree to see its structure and assigned names"
|
|
42
|
+
|
|
43
|
+
puts "Showing assembly in 3d view..."
|
|
44
|
+
vclear
|
|
45
|
+
vinit View1
|
|
46
|
+
XDisplay -dispMode 1 D -explore
|
|
47
|
+
vfit
|