Skip to content

Commit

Permalink
theo confirmed it works, and added name property to materials
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremy Tammik committed Sep 4, 2014
1 parent 75a2344 commit 102f982
Show file tree
Hide file tree
Showing 5 changed files with 452 additions and 204 deletions.
5 changes: 3 additions & 2 deletions RvtVa3c/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
// 2014-09-02 2015.0.0.19 minor cleanup before removing scene definition
// 2014-09-03 2015.0.0.20 fixed bug in SelectFile, need to determine full output path
// 2014-09-03 2015.0.0.21 replace top level json container Scene for Object3D
// 2014-09-04 2015.0.0.22 theo confirmed it works. added name property to materials
//
[assembly: AssemblyVersion( "2015.0.0.21" )]
[assembly: AssemblyFileVersion( "2015.0.0.21" )]
[assembly: AssemblyVersion( "2015.0.0.22" )]
[assembly: AssemblyFileVersion( "2015.0.0.22" )]
1 change: 1 addition & 0 deletions RvtVa3c/Va3cExportContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ Va3cContainer.Va3cMaterial m
//m.metadata.generator = "RvtVa3c 2015.0.0.0";

m.uuid = uidMaterial;
m.name = material.Name;
m.type = "MeshPhongMaterial";
m.color = Util.ColorToInt( material.Color );
m.ambient = m.color;
Expand Down
10 changes: 2 additions & 8 deletions RvtVa3c/Va3cObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ public class Va3cMaterial
[DataMember]
public string uuid { get; set; }
[DataMember]
public string name { get; set; }
[DataMember]
public string type { get; set; } // MeshPhongMaterial
[DataMember]
public int color { get; set; } // 16777215
Expand Down Expand Up @@ -143,14 +145,6 @@ public class Metadata
public double version { get; set; } // 4.3
[DataMember]
public string generator { get; set; } // "RvtVa3c Revit vA3C exporter"

//[DataMember] public int vertices { get; set; } // 770
//[DataMember] public int faces { get; set; } // 768
//[DataMember] public int normals { get; set; } // 770
//[DataMember] public int colors { get; set; } // 0
//[DataMember] public int uvs { get; set; } // 0
//[DataMember] public int materials { get; set; } // 1
//[DataMember] public int morphTargets { get; set; } // 0
}

[DataMember]
Expand Down
320 changes: 223 additions & 97 deletions models/wall_2015.rvt.js
Original file line number Diff line number Diff line change
@@ -1,97 +1,223 @@
{
"geometries": [
{
"uuid": "79910fa3-1a37-4cb0-9e6f-9941ac1df153-0004ec4a-cb74be9d-0c49-4127-96a8-1de4e3dd00ba-00004aa0",
"type": "Geometry",
"data": {
"vertices": [-175.0,4000.0,156.0,-175.0,0.0,156.0,-4175.0,0.0,156.0,-4175.0,4000.0,156.0,-4175.0,4000.0,356.0,-4175.0,0.0,356.0,-175.0,0.0,356.0,-175.0,4000.0,356.0],
"normals": [],
"uvs": [],
"faces": [0,0,1,2,0,2,3,0,0,4,5,6,0,6,7,4,0,2,1,6,0,6,5,2,0,3,2,5,0,5,4,3,0,0,3,7,0,4,7,3,0,1,0,7,0,7,6,1],
"scale": 1.0,
"visible": true,
"castShadow": true,
"receiveShadow": false,
"doubleSided": true
}
}
],
"materials": [
{
"uuid": "cb74be9d-0c49-4127-96a8-1de4e3dd00ba-00004aa0",
"type": "MeshPhongMaterial",
"color": 8421504,
"ambient": 8421504,
"emissive": 0,
"specular": 8421504,
"shininess": 10,
"opacity": 1.0,
"transparent": false,
"wireframe": false
}
],
"metadata": {
"type": "Object",
"version": 4.3,
"generator": "RvtVa3c Revit vA3C exporter"
},
"object": {
"uuid": "a8918851-e15b-4935-bed9-e6df4950fa3a-0004ec65",
"name": "BIM wall_2015.rvt",
"type": "Object3D",
"matrix": [0.01,0.0,0.0,0.0,0.0,0.01,0.0,0.0,0.0,0.0,0.01,0.0,0.0,0.0,0.0,0.01],
"children": [
{
"uuid": "79910fa3-1a37-4cb0-9e6f-9941ac1df153-0004ec4a",
"name": "Wall Walls <322634 Generic - 200mm>",
"type": "RevitElement",
"matrix": [1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0],
"children": [
{
"uuid": "79910fa3-1a37-4cb0-9e6f-9941ac1df153-0004ec4a-cb74be9d-0c49-4127-96a8-1de4e3dd00ba-00004aa0",
"name": "Wall Walls <322634 Generic - 200mm>",
"type": "Mesh",
"matrix": [1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0],
"geometry": "79910fa3-1a37-4cb0-9e6f-9941ac1df153-0004ec4a-cb74be9d-0c49-4127-96a8-1de4e3dd00ba-00004aa0",
"material": "cb74be9d-0c49-4127-96a8-1de4e3dd00ba-00004aa0"
}
],
"userData": {
"Structural": "No",
"Enable Analytical Model": "No",
"Structural Usage": "Non-bearing",
"Location Line": "Wall Centerline",
"Image": "<None>",
"Phase Created": "New Construction",
"Phase Demolished": "None",
"Base Constraint": "Level 1",
"Base Offset": "0",
"Base is Attached": "No",
"Base Extension Distance": "0",
"Top Constraint": "Up to level: Level 2",
"Unconnected Height": "4000",
"Top Offset": "0",
"Top is Attached": "No",
"Top Extension Distance": "0",
"Room Bounding": "Yes",
"Length": "4000",
"Area": "16 m²",
"Volume": "3.20 m³",
"Related to Mass": "No",
"Type Wrapping at Inserts": "Do not wrap",
"Type Wrapping at Ends": "None",
"Type Width": "200",
"Type Type Image": "<None>",
"Type Structural Material": "<By Category>",
"Type Cost": "0.00",
"Type Function": "Exterior",
"Type Heat Transfer Coefficient (U)": "0.0000 W/(m²·K)",
"Type Thermal Resistance (R)": "0.0000 (m²·K)/W",
"Type Thermal mass": "0.00 kJ/K",
"Type Absorptance": "0.7",
"Type Roughness": "3"
}
}
]
}
}
{
"geometries": [
{
"uuid": "79910fa3-1a37-4cb0-9e6f-9941ac1df153-0004ec4a-cb74be9d-0c49-4127-96a8-1de4e3dd00ba-00004aa0",
"type": "Geometry",
"data": {
"vertices": [
-175.0,
4000.0,
156.0,
-175.0,
0.0,
156.0,
-4175.0,
0.0,
156.0,
-4175.0,
4000.0,
156.0,
-4175.0,
4000.0,
356.0,
-4175.0,
0.0,
356.0,
-175.0,
0.0,
356.0,
-175.0,
4000.0,
356.0
],
"normals": [],
"uvs": [],
"faces": [
0,
0,
1,
2,
0,
2,
3,
0,
0,
4,
5,
6,
0,
6,
7,
4,
0,
2,
1,
6,
0,
6,
5,
2,
0,
3,
2,
5,
0,
5,
4,
3,
0,
0,
3,
7,
0,
4,
7,
3,
0,
1,
0,
7,
0,
7,
6,
1
],
"scale": 1.0,
"visible": true,
"castShadow": true,
"receiveShadow": false,
"doubleSided": true
}
}
],
"materials": [
{
"uuid": "cb74be9d-0c49-4127-96a8-1de4e3dd00ba-00004aa0",
"name": "Default Wall",
"type": "MeshPhongMaterial",
"color": 8421504,
"ambient": 8421504,
"emissive": 0,
"specular": 8421504,
"shininess": 10,
"opacity": 1.0,
"transparent": false,
"wireframe": false
}
],
"metadata": {
"type": "Object",
"version": 4.3,
"generator": "RvtVa3c Revit vA3C exporter"
},
"object": {
"uuid": "a8918851-e15b-4935-bed9-e6df4950fa3a-0004ec65",
"name": "BIM wall_2015.rvt",
"type": "Object3D",
"matrix": [
0.01,
0.0,
0.0,
0.0,
0.0,
0.01,
0.0,
0.0,
0.0,
0.0,
0.01,
0.0,
0.0,
0.0,
0.0,
0.01
],
"children": [
{
"uuid": "79910fa3-1a37-4cb0-9e6f-9941ac1df153-0004ec4a",
"name": "Wall Walls <322634 Generic - 200mm>",
"type": "RevitElement",
"matrix": [
1.0,
0.0,
0.0,
0.0,
0.0,
1.0,
0.0,
0.0,
0.0,
0.0,
1.0,
0.0,
0.0,
0.0,
0.0,
1.0
],
"children": [
{
"uuid": "79910fa3-1a37-4cb0-9e6f-9941ac1df153-0004ec4a-cb74be9d-0c49-4127-96a8-1de4e3dd00ba-00004aa0",
"name": "Wall Walls <322634 Generic - 200mm>",
"type": "Mesh",
"matrix": [
1.0,
0.0,
0.0,
0.0,
0.0,
1.0,
0.0,
0.0,
0.0,
0.0,
1.0,
0.0,
0.0,
0.0,
0.0,
1.0
],
"geometry": "79910fa3-1a37-4cb0-9e6f-9941ac1df153-0004ec4a-cb74be9d-0c49-4127-96a8-1de4e3dd00ba-00004aa0",
"material": "cb74be9d-0c49-4127-96a8-1de4e3dd00ba-00004aa0"
}
],
"userData": {
"Structural": "No",
"Enable Analytical Model": "No",
"Structural Usage": "Non-bearing",
"Location Line": "Wall Centerline",
"Image": "<None>",
"Phase Created": "New Construction",
"Phase Demolished": "None",
"Base Constraint": "Level 1",
"Base Offset": "0",
"Base is Attached": "No",
"Base Extension Distance": "0",
"Top Constraint": "Up to level: Level 2",
"Unconnected Height": "4000",
"Top Offset": "0",
"Top is Attached": "No",
"Top Extension Distance": "0",
"Room Bounding": "Yes",
"Length": "4000",
"Area": "16 m²",
"Volume": "3.20 m³",
"Related to Mass": "No",
"Type Wrapping at Inserts": "Do not wrap",
"Type Wrapping at Ends": "None",
"Type Width": "200",
"Type Type Image": "<None>",
"Type Structural Material": "<By Category>",
"Type Cost": "0.00",
"Type Function": "Exterior",
"Type Heat Transfer Coefficient (U)": "0.0000 W/(m²·K)",
"Type Thermal Resistance (R)": "0.0000 (m²·K)/W",
"Type Thermal mass": "0.00 kJ/K",
"Type Absorptance": "0.7",
"Type Roughness": "3"
}
}
]
}
}
Loading

0 comments on commit 102f982

Please sign in to comment.