occt-gltf-addon-linux-x64 0.1.1 → 0.1.3

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.
Files changed (214) hide show
  1. package/LICENSE_LGPL_21.txt +502 -0
  2. package/OCCT_LGPL_EXCEPTION.txt +10 -0
  3. package/README.md +2 -2
  4. package/index.js +63 -1
  5. package/lib/libTKBO.so.8.0.0 +0 -0
  6. package/lib/libTKBRep.so.8.0.0 +0 -0
  7. package/lib/libTKBin.so.8.0.0 +0 -0
  8. package/lib/libTKBinL.so.8.0.0 +0 -0
  9. package/lib/libTKBinTObj.so.8.0.0 +0 -0
  10. package/lib/libTKBinXCAF.so.8.0.0 +0 -0
  11. package/lib/libTKBool.so.8.0.0 +0 -0
  12. package/lib/libTKCAF.so.8.0.0 +0 -0
  13. package/lib/libTKCDF.so.8.0.0 +0 -0
  14. package/lib/libTKDE.so.8.0.0 +0 -0
  15. package/lib/libTKDECascade.so.8.0.0 +0 -0
  16. package/lib/libTKDEIGES.so.8.0.0 +0 -0
  17. package/lib/libTKDEOBJ.so.8.0.0 +0 -0
  18. package/lib/libTKDEPLY.so.8.0.0 +0 -0
  19. package/lib/libTKDESTEP.so.8.0.0 +0 -0
  20. package/lib/libTKDESTL.so.8.0.0 +0 -0
  21. package/lib/libTKDEVRML.so.8.0.0 +0 -0
  22. package/lib/libTKExpress.so.8.0.0 +0 -0
  23. package/lib/libTKFeat.so.8.0.0 +0 -0
  24. package/lib/libTKFillet.so.8.0.0 +0 -0
  25. package/lib/libTKG2d.so.8.0.0 +0 -0
  26. package/lib/libTKG3d.so.8.0.0 +0 -0
  27. package/lib/libTKGeomAlgo.so.8.0.0 +0 -0
  28. package/lib/libTKGeomBase.so.8.0.0 +0 -0
  29. package/lib/libTKHLR.so.8.0.0 +0 -0
  30. package/lib/libTKHelix.so.8.0.0 +0 -0
  31. package/lib/libTKLCAF.so.8.0.0 +0 -0
  32. package/lib/libTKMath.so.8.0.0 +0 -0
  33. package/lib/libTKMesh.so.8.0.0 +0 -0
  34. package/lib/libTKOffset.so.8.0.0 +0 -0
  35. package/lib/libTKPrim.so.8.0.0 +0 -0
  36. package/lib/libTKRWMesh.so.8.0.0 +0 -0
  37. package/lib/libTKService.so.8.0.0 +0 -0
  38. package/lib/libTKShHealing.so.8.0.0 +0 -0
  39. package/lib/libTKStd.so.8.0.0 +0 -0
  40. package/lib/libTKStdL.so.8.0.0 +0 -0
  41. package/lib/libTKTObj.so.8.0.0 +0 -0
  42. package/lib/libTKTopAlgo.so.8.0.0 +0 -0
  43. package/lib/libTKV3d.so.8.0.0 +0 -0
  44. package/lib/libTKVCAF.so.8.0.0 +0 -0
  45. package/lib/libTKXCAF.so.8.0.0 +0 -0
  46. package/lib/libTKXMesh.so.8.0.0 +0 -0
  47. package/lib/libTKXSBase.so.8.0.0 +0 -0
  48. package/lib/libTKXml.so.8.0.0 +0 -0
  49. package/lib/libTKXmlL.so.8.0.0 +0 -0
  50. package/lib/libTKXmlTObj.so.8.0.0 +0 -0
  51. package/lib/libTKXmlXCAF.so.8.0.0 +0 -0
  52. package/lib/libTKernel.so.8.0.0 +0 -0
  53. package/lib/libdraco.so.1 +0 -0
  54. package/lib/libtbb.so.2 +0 -0
  55. package/lib/libtbbmalloc.so.2 +0 -0
  56. package/lib/libtbbmalloc_proxy.so.2 +0 -0
  57. package/occt_gltf_addon.node +0 -0
  58. package/package.json +6 -2
  59. package/resources/BOPAlgo/BOPAlgo.msg +129 -0
  60. package/resources/BOPAlgo/FILES +1 -0
  61. package/resources/DrawResources/CURVES.tcl +38 -0
  62. package/resources/DrawResources/CheckCommands.tcl +1206 -0
  63. package/resources/DrawResources/DrawDefault +130 -0
  64. package/resources/DrawResources/DrawPlugin +64 -0
  65. package/resources/DrawResources/DrawTK.tcl +623 -0
  66. package/resources/DrawResources/FILES +16 -0
  67. package/resources/DrawResources/Geometry.tcl +96 -0
  68. package/resources/DrawResources/InitEnvironment.tcl +50 -0
  69. package/resources/DrawResources/Move.tcl +85 -0
  70. package/resources/DrawResources/OCC_logo.png +0 -0
  71. package/resources/DrawResources/PROFIL.tcl +726 -0
  72. package/resources/DrawResources/SCAN.tcl +192 -0
  73. package/resources/DrawResources/SURFACES.tcl +35 -0
  74. package/resources/DrawResources/StandardCommands.tcl +451 -0
  75. package/resources/DrawResources/StandardViews.tcl +284 -0
  76. package/resources/DrawResources/TKTopTest.tcl +27 -0
  77. package/resources/DrawResources/TestCommands.tcl +2969 -0
  78. package/resources/DrawResources/Vector.tcl +402 -0
  79. package/resources/DrawResources/dfb_attribns.gif +0 -0
  80. package/resources/DrawResources/dfb_attribute.gif +0 -0
  81. package/resources/DrawResources/dfb_folder.gif +0 -0
  82. package/resources/DrawResources/dftree.tcl +381 -0
  83. package/resources/DrawResources/lamp.ico +0 -0
  84. package/resources/SHMessage/FILES +2 -0
  85. package/resources/SHMessage/SHAPE.fr +267 -0
  86. package/resources/SHMessage/SHAPE.us +267 -0
  87. package/resources/Shaders/Declarations.glsl +276 -0
  88. package/resources/Shaders/DeclarationsImpl.glsl +121 -0
  89. package/resources/Shaders/Display.fs +157 -0
  90. package/resources/Shaders/FILES +27 -0
  91. package/resources/Shaders/LightShadow.glsl +48 -0
  92. package/resources/Shaders/PBRCookTorrance.glsl +20 -0
  93. package/resources/Shaders/PBRDirectionalLight.glsl +20 -0
  94. package/resources/Shaders/PBRDistribution.glsl +9 -0
  95. package/resources/Shaders/PBREnvBaking.fs +226 -0
  96. package/resources/Shaders/PBREnvBaking.vs +55 -0
  97. package/resources/Shaders/PBRFresnel.glsl +36 -0
  98. package/resources/Shaders/PBRGeometry.glsl +13 -0
  99. package/resources/Shaders/PBRIllumination.glsl +28 -0
  100. package/resources/Shaders/PBRPointLight.glsl +27 -0
  101. package/resources/Shaders/PBRSpotLight.glsl +45 -0
  102. package/resources/Shaders/PathtraceBase.fs +993 -0
  103. package/resources/Shaders/PhongDirectionalLight.glsl +29 -0
  104. package/resources/Shaders/PhongPointLight.glsl +36 -0
  105. package/resources/Shaders/PhongShading.fs +191 -0
  106. package/resources/Shaders/PhongShading.vs +43 -0
  107. package/resources/Shaders/PhongSpotLight.glsl +52 -0
  108. package/resources/Shaders/PointLightAttenuation.glsl +35 -0
  109. package/resources/Shaders/RaytraceBase.fs +1236 -0
  110. package/resources/Shaders/RaytraceBase.vs +12 -0
  111. package/resources/Shaders/RaytraceRender.fs +134 -0
  112. package/resources/Shaders/RaytraceSmooth.fs +80 -0
  113. package/resources/Shaders/SkydomBackground.fs +300 -0
  114. package/resources/Shaders/TangentSpaceNormal.glsl +17 -0
  115. package/resources/StdResource/FILES +6 -0
  116. package/resources/StdResource/MigrationSheet.txt +21 -0
  117. package/resources/StdResource/Plugin +52 -0
  118. package/resources/StdResource/Standard +25 -0
  119. package/resources/StdResource/StandardLite +22 -0
  120. package/resources/StdResource/TObj +17 -0
  121. package/resources/StdResource/XCAF +50 -0
  122. package/resources/TObj/FILES +1 -0
  123. package/resources/TObj/TObj.msg +85 -0
  124. package/resources/Textures/1d_elevation.rgb +0 -0
  125. package/resources/Textures/2d_MatraDatavision.rgb +0 -0
  126. package/resources/Textures/2d_alienskin.rgb +0 -0
  127. package/resources/Textures/2d_aluminum.rgb +0 -0
  128. package/resources/Textures/2d_blue_rock.rgb +0 -0
  129. package/resources/Textures/2d_bluewhite_paper.rgb +0 -0
  130. package/resources/Textures/2d_brushed.rgb +0 -0
  131. package/resources/Textures/2d_bubbles.rgb +0 -0
  132. package/resources/Textures/2d_bumps.rgb +0 -0
  133. package/resources/Textures/2d_cast.rgb +0 -0
  134. package/resources/Textures/2d_chess.rgba +0 -0
  135. package/resources/Textures/2d_chipbd.rgb +0 -0
  136. package/resources/Textures/2d_clouds.rgb +0 -0
  137. package/resources/Textures/2d_flesh.rgb +0 -0
  138. package/resources/Textures/2d_floor.rgb +0 -0
  139. package/resources/Textures/2d_galvnisd.rgb +0 -0
  140. package/resources/Textures/2d_grass.rgb +0 -0
  141. package/resources/Textures/2d_knurl.rgb +0 -0
  142. package/resources/Textures/2d_maple.rgb +0 -0
  143. package/resources/Textures/2d_marble.rgb +0 -0
  144. package/resources/Textures/2d_mottled.rgb +0 -0
  145. package/resources/Textures/2d_rain.rgb +0 -0
  146. package/resources/Textures/2d_rock.rgb +0 -0
  147. package/resources/Textures/FILES +31 -0
  148. package/resources/Textures/env_clouds.rgb +0 -0
  149. package/resources/Textures/env_cv.rgb +0 -0
  150. package/resources/Textures/env_lines.rgb +0 -0
  151. package/resources/Textures/env_medit.rgb +0 -0
  152. package/resources/Textures/env_pearl.rgb +0 -0
  153. package/resources/Textures/env_road.rgb +0 -0
  154. package/resources/Textures/env_sky1.rgb +0 -0
  155. package/resources/Textures/env_sky2.rgb +0 -0
  156. package/resources/UnitsAPI/CurrentUnits +74 -0
  157. package/resources/UnitsAPI/FILES +4 -0
  158. package/resources/UnitsAPI/MDTVBaseUnits +70 -0
  159. package/resources/UnitsAPI/MDTVCurrentUnits +74 -0
  160. package/resources/UnitsAPI/Units.dat +481 -0
  161. package/resources/XRResources/FILES +10 -0
  162. package/resources/XRResources/occtvr_actions.json +225 -0
  163. package/resources/XRResources/occtvr_bindings_generic.json +87 -0
  164. package/resources/XRResources/occtvr_bindings_holographic_hmd.json +18 -0
  165. package/resources/XRResources/occtvr_bindings_index_hmd.json +18 -0
  166. package/resources/XRResources/occtvr_bindings_rift.json +18 -0
  167. package/resources/XRResources/occtvr_bindings_touch.json +160 -0
  168. package/resources/XRResources/occtvr_bindings_vive.json +18 -0
  169. package/resources/XRResources/occtvr_bindings_vive_controller.json +139 -0
  170. package/resources/XRResources/occtvr_bindings_vive_cosmos.json +18 -0
  171. package/resources/XRResources/occtvr_bindings_vive_pro.json +18 -0
  172. package/resources/XSMessage/FILES +2 -0
  173. package/resources/XSMessage/XSTEP.fr +1026 -0
  174. package/resources/XSMessage/XSTEP.us +1023 -0
  175. package/resources/XSTEPResource/FILES +2 -0
  176. package/resources/XSTEPResource/IGES +65 -0
  177. package/resources/XSTEPResource/STEP +68 -0
  178. package/resources/XmlOcafResource/FILES +11 -0
  179. package/resources/XmlOcafResource/XmlOcaf.xsd +131 -0
  180. package/resources/XmlOcafResource/XmlOcaf_SmallTypes.xsd +217 -0
  181. package/resources/XmlOcafResource/XmlOcaf_TDF.xsd +33 -0
  182. package/resources/XmlOcafResource/XmlOcaf_TDataStd.xsd +230 -0
  183. package/resources/XmlOcafResource/XmlOcaf_TDataStd_Name.xsd +37 -0
  184. package/resources/XmlOcafResource/XmlOcaf_TDocStd.xsd +37 -0
  185. package/resources/XmlOcafResource/XmlOcaf_TFunction.xsd +38 -0
  186. package/resources/XmlOcafResource/XmlOcaf_TNaming.xsd +128 -0
  187. package/resources/XmlOcafResource/XmlOcaf_TNaming_NamedShape.xsd +97 -0
  188. package/resources/XmlOcafResource/XmlOcaf_TPrsStd.xsd +42 -0
  189. package/resources/XmlOcafResource/XmlXcaf.xsd +109 -0
  190. package/resources/samples/tcl/ANC101.tcl +282 -0
  191. package/resources/samples/tcl/DataExchangeDemo.tcl +85 -0
  192. package/resources/samples/tcl/MBBGehauseRohteil.tcl +268 -0
  193. package/resources/samples/tcl/ModelingDemo.tcl +120 -0
  194. package/resources/samples/tcl/Penrose.tcl +87 -0
  195. package/resources/samples/tcl/Readme.txt +4 -0
  196. package/resources/samples/tcl/VisualizationDemo.tcl +162 -0
  197. package/resources/samples/tcl/bottle.tcl +115 -0
  198. package/resources/samples/tcl/cad.tcl +63 -0
  199. package/resources/samples/tcl/cpu.tcl +327 -0
  200. package/resources/samples/tcl/cutter.tcl +91 -0
  201. package/resources/samples/tcl/dimensions.tcl +83 -0
  202. package/resources/samples/tcl/drill.tcl +147 -0
  203. package/resources/samples/tcl/logo2019.tcl +89 -0
  204. package/resources/samples/tcl/markers.tcl +76 -0
  205. package/resources/samples/tcl/materials.tcl +75 -0
  206. package/resources/samples/tcl/pathtrace_ball.tcl +79 -0
  207. package/resources/samples/tcl/pathtrace_cube.tcl +85 -0
  208. package/resources/samples/tcl/pathtrace_materials.tcl +229 -0
  209. package/resources/samples/tcl/pencil.tcl +64 -0
  210. package/resources/samples/tcl/raytrace.tcl +44 -0
  211. package/resources/samples/tcl/snowflake.tcl +161 -0
  212. package/resources/samples/tcl/spheres.tcl +148 -0
  213. package/resources/samples/tcl/vis_pbr_spheres.tcl +94 -0
  214. package/resources/samples/tcl/xde.tcl +47 -0
@@ -0,0 +1,109 @@
1
+ <schema targetNamespace="http://www.opencascade.org/OCAF/XML/XCAF"
2
+ xmlns="http://www.w3.org/2001/XMLSchema"
3
+ xmlns:ocaf="http://www.opencascade.org/OCAF/XML"
4
+ elementFormDefault="qualified">
5
+ <import namespace="http://www.opencascade.org/OCAF/XML"
6
+ schemaLocation="XmlOcaf.xsd"/>
7
+
8
+ <annotation>
9
+ <documentation xml:lang="en">
10
+ Copyright (c) 2001-2014 OPEN CASCADE SAS
11
+
12
+ This file is part of Open CASCADE Technology software library.
13
+
14
+ This library is free software; you can redistribute it and/or modify it under
15
+ the terms of the GNU Lesser General Public License version 2.1 as published
16
+ by the Free Software Foundation, with special exception defined in the file
17
+ OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
18
+ distribution for complete text of the license and disclaimer of any warranty.
19
+
20
+ Alternatively, this file may be used under the terms of Open CASCADE
21
+ commercial license or contractual agreement.
22
+
23
+ Open Cascade Application Framework: Definition of attributes from XCAFDoc
24
+ This file is included in XmlOcaf.xsd
25
+ URL: $(CASROOT)/src/XmlOcafResource/XmlOcaf_XCAFDoc.xsd
26
+ </documentation>
27
+ </annotation>
28
+
29
+ <element name="Area" type="ocaf:AbsRealAttributeType"
30
+ substitutionGroup="ocaf:AbstractRealAtt"/>
31
+
32
+ <element name="Volume" type="ocaf:AbsRealAttributeType"
33
+ substitutionGroup="ocaf:AbstractRealAtt"/>
34
+
35
+ <element name="Color" type="ocaf:AbsIntegerAttributeType"
36
+ substitutionGroup="ocaf:AbstractIntegerAtt"/>
37
+
38
+ <element name="Centroid" type="ocaf:AbsList3RealAttributeType"
39
+ substitutionGroup="ocaf:AbstractList3RealAtt"/>
40
+
41
+ <element name="GraphNode" substitutionGroup="ocaf:AbstractAttribute">
42
+ <complexType>
43
+ <complexContent>
44
+ <extension base="ocaf:AbstractAttributeType">
45
+ <attribute name="treeid" type="ocaf:GuidType" use="required"/>
46
+ <attribute name="children" type="ocaf:ListOfInteger"/>
47
+ <attribute name="fathers" type="ocaf:ListOfInteger"/>
48
+ </extension>
49
+ </complexContent>
50
+ </complexType>
51
+ </element>
52
+
53
+ <element name="Location" substitutionGroup="ocaf:AbstractAttribute">
54
+ <complexType>
55
+ <complexContent>
56
+ <extension base="ocaf:AbstractAttributeType">
57
+ <sequence>
58
+ <element ref="ocaf:location" minOccurs="0" maxOccurs="1"/>
59
+ </sequence>
60
+ </extension>
61
+ </complexContent>
62
+ </complexType>
63
+ </element>
64
+
65
+ <element name="DocumentTool" substitutionGroup="ocaf:AbstractAttribute">
66
+ <complexType>
67
+ <complexContent>
68
+ <extension base="ocaf:AbstractAttributeType">
69
+ <sequence>
70
+ </sequence>
71
+ </extension>
72
+ </complexContent>
73
+ </complexType>
74
+ </element>
75
+
76
+ <element name="ColorTool" substitutionGroup="ocaf:AbstractAttribute">
77
+ <complexType>
78
+ <complexContent>
79
+ <extension base="ocaf:AbstractAttributeType">
80
+ <sequence>
81
+ </sequence>
82
+ </extension>
83
+ </complexContent>
84
+ </complexType>
85
+ </element>
86
+
87
+ <element name="ShapeTool" substitutionGroup="ocaf:AbstractAttribute">
88
+ <complexType>
89
+ <complexContent>
90
+ <extension base="ocaf:AbstractAttributeType">
91
+ <sequence>
92
+ </sequence>
93
+ </extension>
94
+ </complexContent>
95
+ </complexType>
96
+ </element>
97
+
98
+ <element name="LayerTool" substitutionGroup="ocaf:AbstractAttribute">
99
+ <complexType>
100
+ <complexContent>
101
+ <extension base="ocaf:AbstractAttributeType">
102
+ <sequence>
103
+ </sequence>
104
+ </extension>
105
+ </complexContent>
106
+ </complexType>
107
+ </element>
108
+
109
+ </schema>
@@ -0,0 +1,282 @@
1
+ # The following example constructs ANC-101 object of CAM-I.
2
+ #
3
+ # This model was used as a test part for comparing modeling systems in 1979 and
4
+ # again in 1983. The tests were organized by Computer Aided Manufacturing
5
+ # International (CAM-I).
6
+ #
7
+ #Category: Modeling
8
+ #Title: ANC101 (classic test for CAD modeling from CAM-I)
9
+
10
+ pload MODELING
11
+
12
+ set my_pi 3.1415926535897931
13
+ set aModelHeight 178.25
14
+ set aPlatformLength 426.25
15
+ set aPlatformWidth 201.5
16
+ set aPlatformHeight 58.9
17
+ set aPrismLength 279
18
+ set aPrismWidth 155
19
+ set aPrismHeight [expr $aModelHeight - $aPlatformHeight]
20
+ set aPrismXOffset [expr $aPlatformLength - $aPrismLength - 69.75]
21
+ set aPrismYOffset [expr ($aPlatformWidth - $aPrismWidth)/2]
22
+
23
+ #================================================================================
24
+ # A base of the model
25
+ box _platform $aPlatformLength $aPlatformWidth $aPlatformHeight
26
+
27
+ # Make screw holes on the platform
28
+ set aScrewHoleRadius [expr 26.2/2]
29
+ set aScrewHoleOffset 31
30
+ pcylinder _screwhole $aScrewHoleRadius $aPlatformHeight
31
+ ttranslate _screwhole $aScrewHoleOffset $aScrewHoleOffset 0
32
+ bcut _platform _platform _screwhole
33
+ reset _screwhole
34
+ ttranslate _screwhole [expr $aPlatformLength - $aScrewHoleOffset] $aScrewHoleOffset 0
35
+ bcut _platform _platform _screwhole
36
+ reset _screwhole
37
+ ttranslate _screwhole [expr $aPlatformLength - $aScrewHoleOffset] [expr $aPlatformWidth - $aScrewHoleOffset] 0
38
+ bcut _platform _platform _screwhole
39
+ reset _screwhole
40
+ ttranslate _screwhole $aScrewHoleOffset [expr $aPlatformWidth - $aScrewHoleOffset] 0
41
+ bcut _platform _platform _screwhole
42
+ reset _screwhole
43
+
44
+ # Back side cave
45
+ set aCaveLength 81.38
46
+ set aCaveDepth 10
47
+ set aCaveWidth 19.38
48
+ set aBottomLevel [expr $aPlatformHeight/2 - $aCaveWidth/2]
49
+ set aTopLevel [expr $aPlatformHeight/2 + $aCaveWidth/2]
50
+ beziercurve t_bcurve 4 0 $aCaveLength $aBottomLevel 3 0 [expr $aCaveLength + $aCaveWidth/2] $aBottomLevel 6 0 [expr $aCaveLength + $aCaveWidth/2] $aTopLevel 6 0 $aCaveLength $aTopLevel 3
51
+ vertex t_v1 0 $aCaveLength $aBottomLevel
52
+ vertex t_v2 0 $aCaveLength $aTopLevel
53
+ mkedge t_e1 t_bcurve
54
+ edge t_e2 t_v1 t_v2
55
+ wire t_w t_e1 t_e2
56
+ mkplane t_f1 t_w
57
+ prism t_s1 t_f1 $aCaveDepth 0 0
58
+ box t_s2 0 0 $aBottomLevel $aCaveDepth $aCaveLength $aCaveWidth
59
+ bfuse _backcave t_s1 t_s2
60
+ bcut _platform _platform _backcave
61
+
62
+ # Right side cave
63
+ set aRCaveRadius 26.2
64
+ set aRCaveDistToSection 15.5
65
+ set aCurveParam [expr ($my_pi - acos($aRCaveDistToSection/$aRCaveRadius))]
66
+ set aRCaveCenterX [expr $aPlatformLength - 162.75]
67
+ set aRCaveCenterZ [expr $aPlatformHeight/2]
68
+ circle t_circle $aRCaveCenterX 0 $aRCaveCenterZ 0 1 0 1 0 0 $aRCaveRadius
69
+ trim t_curve t_circle -$aCurveParam $aCurveParam
70
+ mkedge t_e1 t_curve
71
+ cvalue t_curve -$aCurveParam t_x t_y t_z
72
+ vertex t_v1 t_x t_y t_z
73
+ cvalue t_curve $aCurveParam t_x t_y t_z
74
+ vertex t_v2 t_x t_y t_z
75
+ edge t_e2 t_v1 t_v2
76
+ wire t_w t_e1 t_e2
77
+ mkplane t_f t_w
78
+ prism t_s t_f 0 $aCaveDepth 0
79
+ bcut _platform _platform t_s
80
+
81
+ # Caves on front side
82
+ set aFCaveCirclesRadius 4.65
83
+ set aFCaveBottomWidth 37.8
84
+ set aFCaveHeight 38.75
85
+ set aFCaveTopWidth 27
86
+ set aFCaveSmallCircleRadius 9.3
87
+ circle t_circle1 [expr $aFCaveTopWidth/2] [expr $aFCaveHeight/2] $aFCaveCirclesRadius
88
+ circle t_circle2 [expr -$aFCaveTopWidth/2] [expr $aFCaveHeight/2] $aFCaveCirclesRadius
89
+ circle t_circle3 [expr -$aFCaveBottomWidth/2] [expr -$aFCaveHeight/2] $aFCaveCirclesRadius
90
+ circle t_circle4 [expr $aFCaveBottomWidth/2] [expr -$aFCaveHeight/2] $aFCaveCirclesRadius
91
+
92
+ lintan t_l t_circle1 t_circle2
93
+ trim t_side1 t_l_1 0 $aFCaveTopWidth
94
+
95
+ lintan t_l t_circle2 t_circle3
96
+ trim t_side2 t_l_1 0 39.058577803089555
97
+
98
+ lintan t_l t_circle3 t_circle4
99
+ trim t_side3 t_l_1 0 $aFCaveBottomWidth
100
+
101
+ lintan t_l t_circle4 t_circle1
102
+ trim t_side4 t_l_1 0 39.196587861700415
103
+
104
+ trim t_circle1 t_circle1 0.15109758878146562 1.5707963267948966
105
+ trim t_circle2 t_circle2 1.5707963267948966 3.0158086349284448
106
+ trim t_circle3 t_circle3 3.0158086349284448 4.7123889803846897
107
+ trim t_circle4 t_circle4 4.7123889803846897 0.15109758878146562
108
+
109
+ plane t_plane 0 0 0 1 0 0 0 1 0
110
+
111
+ to3d t_circle1 t_circle1 t_plane
112
+ to3d t_circle2 t_circle2 t_plane
113
+ to3d t_circle3 t_circle3 t_plane
114
+ to3d t_circle4 t_circle4 t_plane
115
+ to3d t_side1 t_side1 t_plane
116
+ to3d t_side2 t_side2 t_plane
117
+ to3d t_side3 t_side3 t_plane
118
+ to3d t_side4 t_side4 t_plane
119
+
120
+ mkedge t_e1 t_circle1
121
+ mkedge t_e2 t_side1
122
+ mkedge t_e3 t_circle2
123
+ mkedge t_e4 t_side2
124
+ mkedge t_e5 t_circle3
125
+ mkedge t_e6 t_side3
126
+ mkedge t_e7 t_circle4
127
+ mkedge t_e8 t_side4
128
+
129
+ wire t_w t_e1 t_e2 t_e3 t_e4 t_e5 t_e6 t_e7 t_e8
130
+ mkplane t_f t_w
131
+ prism t_s1 t_f -$aCaveDepth 0 0
132
+
133
+ circle t_circle 0 [expr $aFCaveTopWidth/2 + $aFCaveBottomWidth/2] 0 1 0 0 $aFCaveSmallCircleRadius
134
+ mkedge t_e t_circle
135
+ wire t_w t_e
136
+ mkplane t_f t_w
137
+ prism t_s2 t_f [expr -$aCaveDepth/2] 0 0
138
+
139
+ box t_s3 0 0 -$aFCaveSmallCircleRadius [expr -$aCaveDepth/2] [expr $aFCaveTopWidth/2 + $aFCaveBottomWidth/2] [expr $aFCaveSmallCircleRadius*2]
140
+
141
+ # Compile elements
142
+ bfuse t_s2 t_s2 t_s3
143
+ bfuse _frontcave t_s1 t_s2
144
+ unifysamedom _frontcave _frontcave
145
+
146
+ # Cut this cave from the platform
147
+ ttranslate _frontcave $aPlatformLength [expr $aPlatformWidth*2/3] [expr $aPlatformHeight/2]
148
+ bcut _platform _platform _frontcave
149
+
150
+ tmirror _frontcave $aPlatformLength [expr $aPlatformWidth/2] [expr $aPlatformHeight/2] 0 1 0
151
+ bcut _platform _platform _frontcave
152
+
153
+ #================================================================================
154
+ # A wedge on the platform
155
+ box t_box $aPrismXOffset $aPrismYOffset $aPlatformHeight $aPrismLength $aPrismWidth $aPrismHeight
156
+
157
+ set aCutwedgeLength [expr $aPrismHeight/0.57735]
158
+ wedge _cutwedge $aPlatformLength [expr $aPrismYOffset + $aPrismWidth] $aModelHeight 0 -1 0 -1 0 0 $aCutwedgeLength $aPrismHeight $aPrismWidth 0
159
+
160
+ bcut _prism t_box _cutwedge
161
+
162
+ # Make 9 small holes on a top side
163
+ set aWedgeSmallHolesRadius 7.68
164
+ set aWedgeSmallHolesOrbit 67.81
165
+ set aWedgeHoleXPos [expr $aPrismXOffset + 77.5]
166
+ set aWedgeHoleYPos [expr $aPrismYOffset + 77.5]
167
+
168
+ plane t_plane $aWedgeHoleXPos $aWedgeHoleYPos [expr $aPlatformHeight + $aPrismHeight/2] 0 0 1 1 0 0
169
+ pcylinder t_cyl t_plane $aWedgeSmallHolesRadius [expr $aPrismHeight/2]
170
+
171
+ set i 2
172
+ while {$i <= 10} {ttranslate t_cyl [expr $aWedgeSmallHolesOrbit*cos($i*$my_pi/6)] [expr $aWedgeSmallHolesOrbit*sin($i*$my_pi/6)] 0; bcut _prism _prism t_cyl; reset t_cyl; incr i}
173
+
174
+ # Make a cylinder on a canted side
175
+ set aWedgeCylinderRadius 38.75
176
+ set aWedgeCylinderHeight 38.75
177
+ set aWedgeCantedHeight [expr tan($my_pi/6)*($aCutwedgeLength - 69.75)]
178
+ set aWedgeCylinderZPos [expr $aModelHeight - $aWedgeCantedHeight/2]
179
+ plane t_plane [expr $aPrismXOffset + $aPrismLength*3/4] [expr $aPrismYOffset + $aPrismWidth/2] $aWedgeCylinderZPos cos($my_pi/3) 0 sin($my_pi/3) 0 1 0
180
+ pcylinder t_cyl t_plane $aWedgeCylinderRadius $aWedgeCylinderHeight
181
+ explode t_cyl e
182
+ blend t_cyl t_cyl 3 t_cyl_1
183
+ bfuse _prism _prism t_cyl
184
+ unifysamedom _prism _prism
185
+
186
+ # Make a hole in the cylinder on the wedge
187
+ pcylinder t_cyl t_plane [expr $aWedgeCylinderRadius/2] 100
188
+ ttranslate t_cyl [expr -60*cos($my_pi/3)] 0 [expr -60*sin($my_pi/3)]
189
+ bcut _prism _prism t_cyl
190
+
191
+ # Make a hole on a right side of the wedge
192
+ plane t_plane [expr $aPlatformLength - 162.75] $aPrismYOffset [expr $aModelHeight - $aWedgeCantedHeight] 0 1 0 1 0 0
193
+ pcylinder t_cyl t_plane 13.1 [expr $aPrismWidth/2]
194
+ bcut _prism _prism t_cyl
195
+
196
+ # Fuse the platform and the prism
197
+ bfuse _model _platform _prism
198
+
199
+ # Make a pass-through hole
200
+ set aWedgeHoleInnerRadius 38.77
201
+ set aWedgeHoleOuterRadius 58.13
202
+ set aWedgeHoleBottomInnerRadius 50.38
203
+
204
+ # Cylinders from bottom to top
205
+ plane t_plane $aWedgeHoleXPos $aWedgeHoleYPos 0
206
+ pcylinder t_cyl1 t_plane $aWedgeHoleOuterRadius 10
207
+ pcylinder t_cyl2 t_plane $aWedgeHoleBottomInnerRadius 10
208
+ pcylinder t_cyl3 t_plane $aWedgeHoleInnerRadius [expr $aModelHeight - 30]
209
+ pcylinder t_cyl4 t_plane $aWedgeHoleOuterRadius 10
210
+
211
+ ttranslate t_cyl2 0 0 10
212
+ ttranslate t_cyl3 0 0 20
213
+ ttranslate t_cyl4 0 0 [expr $aModelHeight - 10]
214
+
215
+ bfuse _cutCylindricShape t_cyl1 t_cyl2
216
+ bfuse _cutCylindricShape _cutCylindricShape t_cyl3
217
+ bfuse _cutCylindricShape _cutCylindricShape t_cyl4
218
+
219
+ bcut _model _model _cutCylindricShape
220
+
221
+ # Add a block on left side
222
+ circle t_circle1 0 0 38.75
223
+ circle t_circle2 [expr 38.75 + 9.3] [expr -57.35 + 9.3] 9.3
224
+ circle t_circle3 [expr -38.75 - 9.3] [expr -57.35 + 9.3] 9.3
225
+
226
+ lintan t_l t_circle1 t_circle2
227
+ trim t_line12 t_l_2 0 48.05
228
+
229
+ lintan t_l t_circle2 t_circle3
230
+ trim t_line23 t_l_3 0 96.1
231
+
232
+ lintan t_l t_circle3 t_circle1
233
+ trim t_line31 t_l_4 0 48.05
234
+
235
+ trim t_circle1 t_circle1 0 $my_pi
236
+ trim t_circle2 t_circle2 $my_pi 4.7123889803846897
237
+ trim t_circle3 t_circle3 4.7123889803846897 6.2831853071795862
238
+
239
+ reverse t_circle1
240
+
241
+ plane t_plane [expr $aPrismXOffset + 77.5] [expr $aPrismYOffset + $aPrismWidth] [expr $aPlatformHeight + 57.35] 0 1 0 -1 0 0
242
+
243
+ to3d t_circle1 t_circle1 t_plane
244
+ to3d t_circle2 t_circle2 t_plane
245
+ to3d t_circle3 t_circle3 t_plane
246
+ to3d t_line12 t_line12 t_plane
247
+ to3d t_line23 t_line23 t_plane
248
+ to3d t_line31 t_line31 t_plane
249
+
250
+ mkedge t_e1 t_circle1
251
+ mkedge t_e2 t_line31
252
+ mkedge t_e3 t_circle3
253
+ mkedge t_e4 t_line23
254
+ mkedge t_e5 t_circle2
255
+ mkedge t_e6 t_line12
256
+
257
+ wire t_w t_e1 t_e2 t_e3 t_e4 t_e5 t_e6
258
+ mkplane t_f t_w
259
+ prism t_s t_f 0 $aCaveDepth 0
260
+
261
+ bfuse _model _model t_s
262
+
263
+ # Make fillets
264
+ explode _model e
265
+
266
+ # Make a weld at joint edges of platform and wedge
267
+ blend _model _model 2 _model_27
268
+ blend _model _model 2 _model_28
269
+ blend _model _model 2 _model_29
270
+ blend _model _model 2 _model_30
271
+ blend _model _model 2 _model_32
272
+
273
+ # Cylinder on wedge
274
+ blend result _model 2 _model_161
275
+
276
+ # Show result
277
+ pload VISUALIZATION
278
+ vinit Driver1/Viewer1/View1
279
+ vbackground -color C8C8FF
280
+ vdisplay -dispMode 1 result
281
+ vfit
282
+ vaspects result -setFaceBoundaryDraw 1 -mostContinuity c2
@@ -0,0 +1,85 @@
1
+ # Copyright (c) 1999-2014 OPEN CASCADE SAS
2
+ #
3
+ #Category: Demos
4
+ #Title: Import and export
5
+ #
6
+ # This file is part of Open CASCADE Technology software library.
7
+ #
8
+ # This library is free software; you can redistribute it and / or modify it
9
+ # under the terms of the GNU Lesser General Public version 2.1 as published
10
+ # by the Free Software Foundation, with special exception defined in the file
11
+ # OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12
+ # distribution for complete text of the license and disclaimer of any warranty.
13
+ #
14
+ # Alternatively, this file may be used under the terms of Open CASCADE
15
+ # commercial license or contractual agreement.
16
+
17
+ # Command to log a message to both command-line and dialog window
18
+ proc sage { a} {
19
+ if { ![winfo exists .h ] } {
20
+ toplevel .h -bg azure3
21
+ wm title .h "INFO TEST HARNESS"
22
+ wm geometry .h +320+20
23
+ }
24
+ if { [winfo exists .h.m ] } {
25
+ set astring [.h.m cget -text]
26
+ set newstring "${astring} \n $a"
27
+ .h.m configure -text $newstring
28
+ puts $a
29
+ } else {
30
+ message .h.m -justify left -bg azure2 -width 13c -relief ridge -bd 4 -text $a
31
+ puts $a
32
+ }
33
+ pack .h.m
34
+ update
35
+ }
36
+
37
+ pload DATAEXCHANGE
38
+
39
+ smallview
40
+ if { [winfo exists .h ] } {
41
+ destroy .h
42
+ }
43
+
44
+ set ddir .
45
+ if { [info exists env(CSF_OCCTDataPath)] } {
46
+ set ddir [file join $env(CSF_OCCTDataPath) occ]
47
+ } elseif { [info exists env(CASROOT)] } {
48
+ set ddir [file join $env(CASROOT) data occ]
49
+ }
50
+
51
+ set tdir .
52
+ if { [info exist env(TEMP)] } {
53
+ set tdir $env(TEMP)
54
+ }
55
+
56
+ sage " First, we retrieve a BREP File "
57
+ sage " restore $ddir/wing.brep wing"
58
+ sage " "
59
+ datadir .
60
+ restore $ddir/wing.brep wing
61
+ disp wing
62
+ fit
63
+
64
+ sage "Generate the IGES File of this BREP"
65
+ sage " brepiges wing $tdir/wing.igs"
66
+ sage " "
67
+ brepiges wing $tdir/wing.igs
68
+ wait 3
69
+
70
+ sage "we delete all DRAW data"
71
+ sage ""
72
+ dall
73
+ fit
74
+ wait 3
75
+
76
+ sage "Restore this IGES File we have created "
77
+ sage " igesbrep $tdir/wing.igs new *"
78
+ sage ""
79
+ igesbrep $tdir/wing.igs new *
80
+ disp new
81
+ fit
82
+
83
+ puts "End IGES Elementary Test "
84
+ sage " "
85
+ file delete $tdir/wing.igs