在《C#开发BIMFACE系列21 服务端API之获取模型数据6:获取单模型的楼层信息》中介绍获取单个模型的所有楼层信息。某些场景下根据需要也可以一次性获取多个模型的楼层信息。

请求地址:GET https://api.bimface.com/data/v2/files/{fileIds}/fileIdfloorsMappings

说明:一次性查询多个模型的楼层信息

参数:

请求 path(示例):https://api.bimface.com/data/v2/files/1211223382064960,1211223382064961/fileIdfloorsMappings

多个模型之间,使用半角英文逗号分隔。

请求 header(示例):"Authorization: Bearer dc671840-bacc-4dc5-a134-97c1918d664b"

HTTP响应示例(200):

{
"code": "success",
"message": null,
"data": [
{
"fileId": "",
"floors": [
{
"archElev": ,
"areas": null,
"elevation": ,
"height": null,
"id": "",
"miniMap": "m.bimface.com/b5dee8260e202863066714ace1633ad9/resource/model/maps/1F.png",
"name": "1F",
"rooms": null,
"structElev":
},
{
"archElev": ,
"areas": null,
"elevation": ,
"height": null,
"id": "",
"miniMap": "m.bimface.com/b5dee8260e202863066714ace1633ad9/resource/model/maps/2F.png",
"name": "2F",
"rooms": null,
"structElev":
},
{
"archElev": -,
"areas": null,
"elevation": -,
"height": null,
"id": "",
"miniMap": null,
"name": "-2F",
"rooms": null,
"structElev": -
}
]
},
{
"fileId": "",
"floors": [
{
"archElev": ,
"areas": null,
"elevation": ,
"height": null,
"id": "",
"miniMap": null,
"name": "F1",
"rooms": null,
"structElev":
},
{
"archElev": ,
"areas": null,
"elevation": ,
"height": null,
"id": "",
"miniMap": null,
"name": "F2",
"rooms": null,
"structElev":
}
]
}
]
}

该返回结果的结构比较复杂,包含每个模型的ID,以及每个模型包含的所有楼层信息。封装成对应的 C# MultipleModelsFloors.cs 类 :

/// <summary>
/// 获取多个模型的楼层信息
/// </summary>
public class MultipleModelsFloors : GeneralResponse<List<MultipleModelsFloorsEntity>>
{ }
public class MultipleModelsFloorsEntity
{
[JsonProperty("fileId")]
public string FileId { get; set; } [JsonProperty("floors")]
public Floor[] Floors { get; set; } /// <summary>返回表示当前对象的字符串。</summary>
/// <returns>表示当前对象的字符串。</returns>
public override string ToString()
{
StringBuilder sb = new StringBuilder();
if (Floors != null && Floors.Length > )
{
foreach (var floor in Floors)
{
sb.AppendLine(floor.ToString());
}
} return String.Format("[fileId={0}, floors={1}]",
FileId, sb);
}
}

引用的 Floor 类,请参考《C#开发BIMFACE系列21 服务端API之获取模型数据6:获取单模型的楼层信息》。

C#实现方法:

 /// <summary>
/// 获取多个模型的楼层信息
/// </summary>
/// <param name="accessToken">【必填】令牌</param>
/// <param name="fileIds">【必填】代表多个模型的文件ID</param>
/// <param name="includeArea">【非必填】是否将楼层中的面积分区ID、名称一起返回</param>
/// <param name="includeRoom">【非必填】是否将楼层中的房间ID、名称一起返回</param>
/// <returns></returns>
public virtual MultipleModelsFloors GetMultipleModelFloors(string accessToken, string[] fileIds, bool? includeArea = null, bool? includeRoom = null)
{
if (fileIds == null && fileIds.Length == )
{
throw new ArgumentException("参数 fileIds 不能为 null,且必须包含元素!");
} // GET https://api.bimface.com/data/v2/files/{fileIds}/fileIdfloorsMappings
string url = string.Format(BimfaceConstants.API_HOST + "/data/v2/files/{0}/fileIdfloorsMappings", fileIds.ToStringWith(","));
if (includeArea != null && includeRoom == null)
{
url = url + "?includeArea=" + includeArea;
}
else if (includeArea == null && includeRoom != null)
{
url = url + "?includeRoom=" + includeRoom;
}
else if (includeArea != null && includeRoom != null)
{
url = url + "?includeArea=" + includeArea + "&includeRoom=" + includeRoom;
} BimFaceHttpHeaders headers = new BimFaceHttpHeaders();
headers.AddOAuth2Header(accessToken); try
{
MultipleModelsFloors response; HttpManager httpManager = new HttpManager(headers);
HttpResult httpResult = httpManager.Get(url);
if (httpResult.Status == HttpResult.STATUS_SUCCESS)
{
response = httpResult.Text.DeserializeJsonToObject<MultipleModelsFloors>();
}
else
{
response = new MultipleModelsFloors
{
Message = httpResult.RefText
};
} return response;
}
catch (Exception ex)
{
throw new Exception("[获取多个模型的楼层信息]发生异常!", ex);
}
}

其中调用到的 httpManager.Get() 方法,请参考《C# HTTP系列》

测试

在BIMFACE的控制台中可以看到我们上传的文件列表,模型状态均为转换成功。

以模型 “01_BIMFACE示例文件-Revit模型.rvt”、“GLD_结构B2.rvt” 为例测试上述的方法

完整的楼层信息为
success

[fileId=, floors=[archElev=, Areas=, elevation=, height=, id=, miniMap=m.bimface.com/f59e14129a8dd342eee5a606342dc862/resource/model/maps/.png, name=F1, rooms=, structElev=]
[archElev=, Areas=, elevation=, height=, id=, miniMap=m.bimface.com/f59e14129a8dd342eee5a606342dc862/resource/model/maps/.png, name=F2, rooms=, structElev=]
[archElev=, Areas=, elevation=, height=, id=, miniMap=m.bimface.com/f59e14129a8dd342eee5a606342dc862/resource/model/maps/.png, name=F3, rooms=, structElev=]
[archElev=, Areas=, elevation=, height=, id=, miniMap=m.bimface.com/f59e14129a8dd342eee5a606342dc862/resource/model/maps/.png, name=ROOF, rooms=, structElev=]
[archElev=-, Areas=, elevation=-, height=, id=, miniMap=m.bimface.com/f59e14129a8dd342eee5a606342dc862/resource/model/maps/.png, name=地坪, rooms=, structElev=-]
]
[fileId=, floors=[archElev=, Areas=, elevation=, height=, id=, miniMap=, name=0.000, rooms=, structElev=]
[archElev=-, Areas=, elevation=-, height=, id=, miniMap=m.bimface.com/b0106219d6df6da77b6493a0565d9e0e/resource/model/maps/.png, name=B1, rooms=, structElev=-]
[archElev=-, Areas=, elevation=-, height=, id=, miniMap=m.bimface.com/b0106219d6df6da77b6493a0565d9e0e/resource/model/maps/.png, name=B2, rooms=, structElev=-]
[archElev=-, Areas=, elevation=-, height=, id=, miniMap=, name=L1, rooms=, structElev=-]
[archElev=, Areas=, elevation=, height=, id=, miniMap=, name=L2, rooms=, structElev=]
[archElev=, Areas=, elevation=, height=, id=, miniMap=, name=L3, rooms=, structElev=]
[archElev=, Areas=, elevation=, height=, id=, miniMap=, name=L4, rooms=, structElev=]
[archElev=, Areas=, elevation=, height=, id=, miniMap=, name=L5, rooms=, structElev=]
[archElev=, Areas=, elevation=, height=, id=, miniMap=, name=L6, rooms=, structElev=]
[archElev=, Areas=, elevation=, height=, id=, miniMap=, name=屋顶层, rooms=, structElev=]
[archElev=, Areas=, elevation=, height=, id=, miniMap=, name=机房层, rooms=, structElev=]
]

如果选择【是否将楼层中的房间ID、名称一起返回】,则返回如下结果

success

[fileId=, floors=[archElev=-, Areas=, elevation=-, height=, id=, miniMap=m.bimface.com/f59e14129a8dd342eee5a606342dc862/resource/model/maps/.png, name=地坪, rooms=, structElev=-]
[archElev=, Areas=[boundary={"version":"2.0","loops":[[[{"z":0.0,"y":4312.7157614750367,"x":108.78299956026775},{"z":0.0,"y":6067.7157614750377,"x":108.7829995602706}],[{"z":0.0,"y":6067.7157614750367,"x":108.7829995602706},{"z":0.0,"y":6067.7157614750558,"x":-5571.2170004397294}],[{"z":0.0,"y":6067.7157614750558,"x":-5571.2170004397294},{"z":0.0,"y":1847.7157614750554,"x":-5571.2170004397367}],[{"z":0.0,"y":1847.7157614750554,"x":-5571.2170004397367},{"z":0.0,"y":1847.7157614750374,"x":108.78299956026481}],[{"z":0.0,"y":1847.7157614750374,"x":108.78299956026468},{"z":0.0,"y":4312.7157614750367,"x":108.78299956026864}]]]}
, id=, levelId=, maxPt=[x=108.782995203586, y=6067.7155184672, z=], minPt=[x=-5571.21677731631, y=1847.71568747529, z=], name=餐厅 ]
[boundary={"version":"2.0","loops":[[[{"z":0.0,"y":1157.715761475011,"x":8128.7829995602615},{"z":0.0,"y":1157.7157614750147,"x":7038.7829995602642}],[{"z":0.0,"y":1157.7157614750147,"x":7038.7829995602642},{"z":0.0,"y":4167.7157614750149,"x":7038.7829995602679}],[{"z":0.0,"y":4167.7157614750149,"x":7038.7829995602679},{"z":0.0,"y":4167.7157614750295,"x":2528.7829995602679}],[{"z":0.0,"y":4167.7157614750295,"x":2528.7829995602679},{"z":0.0,"y":1702.7157614750295,"x":2528.7829995602597}],[{"z":0.0,"y":1702.7157614750295,"x":2528.7829995602597},{"z":0.0,"y":-4274.2842385249705,"x":2528.782999560241}],[{"z":0.0,"y":-4274.2842385249705,"x":2528.782999560241},{"z":0.0,"y":-5404.2842385249705,"x":2528.7829995602369}],[{"z":0.0,"y":-5404.2842385249705,"x":2528.7829995602369},{"z":0.0,"y":-5404.284238524986,"x":7038.7829995602524}],[{"z":0.0,"y":-5404.284238524986,"x":7038.7829995602524},{"z":0.0,"y":-3984.2842385249846,"x":7038.7829995602542}],[{"z":0.0,"y":-3984.2842385249846,"x":7038.7829995602542},{"z":0.0,"y":-3984.2842385249887,"x":8128.7829995602533}],[{"z":0.0,"y":-3984.2842385249887,"x":8128.7829995602533},{"z":0.0,"y":1157.7157614750108,"x":8128.7829995602615}]]]}
, id=, levelId=, maxPt=[x=8128.78267400807, y=4167.71559456087, z=], minPt=[x=2528.78289828421, y=-5404.2840220871, z=], name=客厅 ]
[boundary={"version":"2.0","loops":[[[{"z":0.0,"y":-5104.2842385249442,"x":-5571.2170004397476},{"z":0.0,"y":-5104.284238524956,"x":-2261.2170004397494}],[{"z":0.0,"y":-5104.284238524956,"x":-2261.2170004397485},{"z":0.0,"y":-2678.2842385249555,"x":-2261.2170004397453}],[{"z":0.0,"y":-2678.2842385249555,"x":-2261.2170004397453},{"z":0.0,"y":-54.284238524955555,"x":-2261.2170004397408}],[{"z":0.0,"y":-54.28423852495537,"x":-2261.2170004397408},{"z":0.0,"y":-54.284238524944669,"x":-5571.2170004397394}],[{"z":0.0,"y":-54.284238524944669,"x":-5571.2170004397394},{"z":0.0,"y":-5104.2842385249442,"x":-5571.2170004397476}]]]}
, id=, levelId=, maxPt=[x=-2261.21690987955, y=-54.2842363508981, z=], minPt=[x=-5571.21677731632, y=-5104.28403410187, z=], name=厨房 ]
[boundary={"version":"2.0","loops":[[[{"z":0.0,"y":-5104.2842385249323,"x":-9181.2170004397485},{"z":0.0,"y":-5104.2842385249442,"x":-5861.2170004397467}],[{"z":0.0,"y":-5104.2842385249442,"x":-5861.2170004397467},{"z":0.0,"y":7.71576147505634,"x":-5861.2170004397385}],[{"z":0.0,"y":7.71576147505607,"x":-5861.2170004397385},{"z":0.0,"y":1557.7157614750565,"x":-5861.2170004397358}],[{"z":0.0,"y":1557.7157614750565,"x":-5861.2170004397358},{"z":0.0,"y":1557.715761475067,"x":-9181.2170004397376}],[{"z":0.0,"y":1557.715761475067,"x":-9181.2170004397376},{"z":0.0,"y":-5104.2842385249323,"x":-9181.2170004397485}]]]}
, id=, levelId=, maxPt=[x=-5861.21676570201, y=1557.71569908962, z=], minPt=[x=-9181.21663273829, y=-5104.28403410186, z=], name=车库 ]
[boundary={"version":"2.0","loops":[[[{"z":0.0,"y":69.7157614750437,"x":-1971.2170004397408},{"z":0.0,"y":-2616.2842385249569,"x":-1971.2170004397451}],[{"z":0.0,"y":-2616.2842385249569,"x":-1971.2170004397451},{"z":0.0,"y":-2616.284238524966,"x":728.78299956024591}],[{"z":0.0,"y":-2616.284238524966,"x":728.78299956024625},{"z":0.0,"y":-4274.2842385249651,"x":728.78299956024352}],[{"z":0.0,"y":-4274.2842385249651,"x":728.78299956024352},{"z":0.0,"y":-4274.28423852497,"x":2238.7829995602406}],[{"z":0.0,"y":-4274.28423852497,"x":2238.7829995602406},{"z":0.0,"y":1557.71576147503,"x":2238.7829995602597}],[{"z":0.0,"y":1557.7157614750304,"x":2238.7829995602597},{"z":0.0,"y":1557.7157614750367,"x":253.78299956026433}],[{"z":0.0,"y":1557.7157614750367,"x":253.78299956026433},{"z":0.0,"y":1557.7157614750554,"x":-5571.2170004397367}],[{"z":0.0,"y":1557.7157614750554,"x":-5571.2170004397367},{"z":0.0,"y":69.715761475055245,"x":-5571.2170004397394}],[{"z":0.0,"y":69.715761475055331,"x":-5571.2170004397394},{"z":0.0,"y":69.7157614750437,"x":-1971.217000439741}]]]}
, id=, levelId=, maxPt=[x=2238.78290989853, y=1557.71569908961, z=], minPt=[x=-5571.21677731631, y=-4274.28406734281, z=], name=过厅 ]
[boundary={"version":"2.0","loops":[[[{"z":0.0,"y":-2740.2842385249569,"x":-1971.2170004397451},{"z":0.0,"y":-3984.284238524956,"x":-1971.2170004397469}],[{"z":0.0,"y":-3984.284238524956,"x":-1971.2170004397469},{"z":0.0,"y":-3984.2842385249646,"x":604.78299956024352}],[{"z":0.0,"y":-3984.2842385249646,"x":604.782999560244},{"z":0.0,"y":-2740.2842385249655,"x":604.782999560246}],[{"z":0.0,"y":-2740.284238524966,"x":604.782999560246},{"z":0.0,"y":-2740.2842385249569,"x":-1971.2170004397451}]]]}
, id=, levelId=, maxPt=[x=604.782975339101, y=-2740.28412877845, z=], minPt=[x=-1971.21692149386, y=-3984.28407895711, z=], name=仓库 ]
[boundary={"version":"2.0","loops":[[[{"z":0.0,"y":4167.71576147503,"x":2238.7829995602679},{"z":0.0,"y":4167.7157614750367,"x":398.78299956026848}],[{"z":0.0,"y":4167.7157614750367,"x":398.78299956026837},{"z":0.0,"y":1847.7157614750361,"x":398.78299956026461}],[{"z":0.0,"y":1847.7157614750363,"x":398.78299956026467},{"z":0.0,"y":1847.7157614750306,"x":2238.7829995602606}],[{"z":0.0,"y":1847.7157614750306,"x":2238.7829995602606},{"z":0.0,"y":4167.71576147503,"x":2238.7829995602679}]]]}
, id=, levelId=, maxPt=[x=2238.78290989854, y=4167.71559456087, z=], minPt=[x=398.782983589279, y=1847.71568747528, z=], name=卫生间 ]
[boundary={"version":"2.0","loops":[[[{"z":0.0,"y":-4274.2842385249651,"x":666.78299956024114},{"z":0.0,"y":-4274.284238524956,"x":-1971.2170004397478}],[{"z":0.0,"y":-4274.284238524956,"x":-1971.2170004397474},{"z":0.0,"y":-6769.2842385249569,"x":-1971.2170004397515}],[{"z":0.0,"y":-6769.2842385249569,"x":-1971.2170004397515},{"z":0.0,"y":-6769.2842385249569,"x":-2116.2170004397517}],[{"z":0.0,"y":-6769.2842385249569,"x":-2116.2170004397517},{"z":0.0,"y":-7789.2842385249505,"x":-2116.2170004397535}],[{"z":0.0,"y":-7789.2842385249505,"x":-2116.2170004397535},{"z":0.0,"y":-7789.2842385249523,"x":-1371.2170004397533}],[{"z":0.0,"y":-7789.2842385249523,"x":-1371.2170004397533},{"z":0.0,"y":-7789.2842385249623,"x":1638.7829995602522}],[{"z":0.0,"y":-7789.2842385249623,"x":1638.7829995602522},{"z":0.0,"y":-7789.2842385249642,"x":2383.7829995602478}],[{"z":0.0,"y":-7789.2842385249642,"x":2383.7829995602483},{"z":0.0,"y":-6839.284238524976,"x":2383.7829995602497}],[{"z":0.0,"y":-6839.284238524976,"x":2383.7829995602497},{"z":0.0,"y":-6839.284238524976,"x":2238.7829995602342}],[{"z":0.0,"y":-6839.284238524976,"x":2238.7829995602342},{"z":0.0,"y":-5549.28423852497,"x":2238.7829995602365}],[{"z":0.0,"y":-5549.28423852497,"x":2238.7829995602365},{"z":0.0,"y":-4274.28423852497,"x":2238.7829995602406}],[{"z":0.0,"y":-4274.28423852497,"x":2238.7829995602406},{"z":0.0,"y":-4274.2842385249651,"x":666.78299956024352}]]]}
, id=, levelId=, maxPt=[x=2383.78290409137, y=-4274.2840673428, z=], minPt=[x=-2116.21691568671, y=-7789.28392656946, z=], name=门厅 ]
, elevation=, height=, id=, miniMap=m.bimface.com/f59e14129a8dd342eee5a606342dc862/resource/model/maps/.png, name=F1, rooms=, structElev=]
[archElev=, Areas=[boundary={"version":"2.0","loops":[[[{"z":3499.9999999999995,"y":6067.7157614750558,"x":-5571.2170004397294},{"z":3499.9999999999995,"y":1847.7157614750554,"x":-5571.2170004397367}],[{"z":3499.9999999999995,"y":1847.7157614750554,"x":-5571.2170004397367},{"z":3499.9999999999995,"y":1847.7157614750374,"x":108.78299956026373}],[{"z":3499.9999999999995,"y":1847.7157614750374,"x":108.78299956026378},{"z":3499.9999999999995,"y":4312.7157614750358,"x":108.78299956026775}],[{"z":3499.9999999999995,"y":4312.7157614750367,"x":108.78299956026775},{"z":3499.9999999999995,"y":4457.7157614750367,"x":108.782999560268}],[{"z":3499.9999999999995,"y":4457.7157614750367,"x":108.782999560268},{"z":3499.9999999999995,"y":6067.7157614750377,"x":108.7829995602706}],[{"z":3499.9999999999995,"y":6067.7157614750367,"x":108.7829995602706},{"z":3499.9999999999995,"y":6067.7157614750558,"x":-5571.2170004397294}]]]}
, id=, levelId=, maxPt=[x=108.782995203586, y=6067.7155184672, z=3499.9998598274], minPt=[x=-5571.21677731631, y=1847.71568747529, z=3499.9998598274], name=次卧 ]
[boundary={"version":"2.0","loops":[[[{"z":3499.9999999999995,"y":-6839.2842385249623,"x":-2116.2170004397522},{"z":3499.9999999999995,"y":-7644.2842385249514,"x":-2116.2170004397531}],[{"z":3499.9999999999995,"y":-7644.2842385249514,"x":-2116.2170004397531},{"z":3499.9999999999995,"y":-7644.2842385249542,"x":-1371.2170004397528}],[{"z":3499.9999999999995,"y":-7644.2842385249542,"x":-1371.2170004397528},{"z":3499.9999999999995,"y":-7644.2842385249642,"x":1638.7829995602526}],[{"z":3499.9999999999995,"y":-7644.2842385249642,"x":1638.7829995602526},{"z":3499.9999999999995,"y":-7644.284238524966,"x":2383.7829995602483}],[{"z":3499.9999999999995,"y":-7644.284238524966,"x":2383.7829995602483},{"z":3499.9999999999995,"y":-6839.2842385250142,"x":2383.7829995602497}],[{"z":3499.9999999999995,"y":-6839.284238524976,"x":2383.7829995602497},{"z":3499.9999999999995,"y":-6839.2842385249733,"x":1638.78299956025}],[{"z":3499.9999999999995,"y":-6839.2842385249733,"x":1638.78299956025},{"z":3499.9999999999995,"y":-6549.2842385249742,"x":1638.782999560251}],[{"z":3499.9999999999995,"y":-6549.2842385249742,"x":1638.782999560251},{"z":3499.9999999999995,"y":-6549.2842385249769,"x":2238.7829995602533}],[{"z":3499.9999999999995,"y":-6549.2842385249769,"x":2238.7829995602533},{"z":3499.9999999999995,"y":-5549.28423852497,"x":2238.7829995602547}],[{"z":3499.9999999999995,"y":-5549.28423852497,"x":2238.7829995602547},{"z":3499.9999999999995,"y":-4274.28423852497,"x":2238.7829995602569}],[{"z":3499.9999999999995,"y":-4274.28423852497,"x":2238.7829995602569},{"z":3499.9999999999995,"y":-4274.284238524956,"x":-1971.2170004397469}],[{"z":3499.9999999999995,"y":-4274.284238524956,"x":-1971.2170004397474},{"z":3499.9999999999995,"y":-5249.284238524956,"x":-1971.217000439749}],[{"z":3499.9999999999995,"y":-5249.284238524956,"x":-1971.217000439749},{"z":3499.9999999999995,"y":-6549.2842385249633,"x":-1971.2170004397512}],[{"z":3499.9999999999995,"y":-6549.2842385249633,"x":-1971.2170004397512},{"z":3499.9999999999995,"y":-6549.284238524966,"x":-1371.2170004397512}],[{"z":3499.9999999999995,"y":-6549.284238524966,"x":-1371.2170004397512},{"z":3499.9999999999995,"y":-6839.2842385249651,"x":-1371.2170004397524}],[{"z":3499.9999999999995,"y":-6839.2842385249651,"x":-1371.2170004397524},{"z":3499.9999999999995,"y":-6839.2842385249623,"x":-2116.2170004397522}]]]}
, id=, levelId=, maxPt=[x=2383.78290409137, y=-4274.2840673428, z=3499.9998598274], minPt=[x=-2116.21691568671, y=-7644.28393237662, z=3499.9998598274], name=健身房 ]
[boundary={"version":"2.0","loops":[[[{"z":3499.9999999999995,"y":4167.7157614750313,"x":2238.78299956027},{"z":3499.9999999999995,"y":4167.7157614750367,"x":398.7829995602674}],[{"z":3499.9999999999995,"y":4167.7157614750367,"x":398.78299956026757},{"z":3499.9999999999995,"y":1847.7157614750361,"x":398.7829995602637}],[{"z":3499.9999999999995,"y":1847.7157614750363,"x":398.7829995602637},{"z":3499.9999999999995,"y":1847.7157614750306,"x":2238.7829995602669}],[{"z":3499.9999999999995,"y":1847.7157614750306,"x":2238.7829995602669},{"z":3499.9999999999995,"y":4167.7157614750313,"x":2238.78299956027}]]]}
, id=, levelId=, maxPt=[x=2238.78290989854, y=4167.71559456087, z=3499.9998598274], minPt=[x=398.782983589278, y=1847.71568747528, z=3499.9998598274], name=卫生间 ]
[boundary={"version":"2.0","loops":[[[{"z":3499.9999999999995,"y":4167.7157614750149,"x":7038.7829995602679},{"z":3499.9999999999995,"y":4167.71576147503,"x":2528.7829995602706}],[{"z":3499.9999999999995,"y":4167.71576147503,"x":2528.7829995602706},{"z":3499.9999999999995,"y":1702.71576147503,"x":2528.7829995602665}],[{"z":3499.9999999999995,"y":1702.71576147503,"x":2528.7829995602665},{"z":3499.9999999999995,"y":-3984.28423852497,"x":2528.7829995602574}],[{"z":3499.9999999999995,"y":-3984.28423852497,"x":2528.7829995602574},{"z":3499.9999999999995,"y":-3984.2842385249869,"x":7183.7829995602533}],[{"z":3499.9999999999995,"y":-3984.2842385249869,"x":7183.7829995602533},{"z":3499.9999999999995,"y":-3984.28423852499,"x":8128.7829995602533}],[{"z":3499.9999999999995,"y":-3984.28423852499,"x":8128.7829995602533},{"z":3499.9999999999995,"y":1157.7157614750104,"x":8128.7829995602615}],[{"z":3499.9999999999995,"y":1157.715761475011,"x":8128.7829995602615},{"z":3499.9999999999995,"y":1157.7157614750147,"x":7038.7829995602624}],[{"z":3499.9999999999995,"y":1157.7157614750147,"x":7038.7829995602624},{"z":3499.9999999999995,"y":4167.7157614750149,"x":7038.7829995602679}]]]}
, id=, levelId=, maxPt=[x=8128.78267400807, y=4167.71559456087, z=3499.9998598274], minPt=[x=2528.78289828423, y=-3984.28407895714, z=3499.9998598274], name=活动室 ]
[boundary={"version":"2.0","loops":[[[{"z":3499.9999999999995,"y":1557.715761475067,"x":-9181.2170004397376},{"z":3499.9999999999995,"y":-3977.2842385249332,"x":-9181.2170004397449}],[{"z":3499.9999999999995,"y":-3977.2842385249337,"x":-9181.2170004397449},{"z":3499.9999999999995,"y":-3977.2842385249451,"x":-5778.2170004397476}],[{"z":3499.9999999999995,"y":-3977.2842385249451,"x":-5778.2170004397476},{"z":3499.9999999999995,"y":337.715761475056,"x":-5778.21700043974}],[{"z":3499.9999999999995,"y":337.71576147505613,"x":-5778.21700043974},{"z":3499.9999999999995,"y":1557.7157614750561,"x":-5778.2170004397385}],[{"z":3499.9999999999995,"y":1557.7157614750561,"x":-5778.2170004397385},{"z":3499.9999999999995,"y":1557.715761475067,"x":-9181.2170004397376}]]]}
, id=, levelId=, maxPt=[x=-5778.2167690261, y=1557.71569908962, z=3499.9998598274], minPt=[x=-9181.21663273829, y=-3977.28407923744, z=3499.9998598274], name=次卧 ]
[boundary={"version":"2.0","loops":[[[{"z":3499.9999999999995,"y":275.71576147504487,"x":-2261.2170004397403},{"z":3499.9999999999995,"y":275.71576147505584,"x":-5654.21700043974}],[{"z":3499.9999999999995,"y":275.71576147505584,"x":-5654.21700043974},{"z":3499.9999999999995,"y":-3977.2842385249451,"x":-5654.2170004397476}],[{"z":3499.9999999999995,"y":-3977.2842385249451,"x":-5654.2170004397476},{"z":3499.9999999999995,"y":-3977.284238524956,"x":-2261.2170004397476}],[{"z":3499.9999999999995,"y":-3977.284238524956,"x":-2261.2170004397472},{"z":3499.9999999999995,"y":275.7157614750447,"x":-2261.2170004397403}]]]}
, id=, levelId=, maxPt=[x=-2261.21690987955, y=275.715750432828, z=3499.9998598274], minPt=[x=-5654.21677399223, y=-3977.28407923745, z=3499.9998598274], name=次卧 ]
[boundary={"version":"2.0","loops":[[[{"z":3499.9999999999995,"y":-3984.2842385249696,"x":2238.7829995602574},{"z":3499.9999999999995,"y":1557.7157614750304,"x":2238.782999560266}],[{"z":3499.9999999999995,"y":1557.7157614750304,"x":2238.782999560266},{"z":3499.9999999999995,"y":1557.7157614750367,"x":253.78299956026325}],[{"z":3499.9999999999995,"y":1557.7157614750367,"x":253.78299956026325},{"z":3499.9999999999995,"y":1557.7157614750556,"x":-5654.2170004397385}],[{"z":3499.9999999999995,"y":1557.7157614750556,"x":-5654.2170004397385},{"z":3499.9999999999995,"y":399.71576147505573,"x":-5654.21700043974}],[{"z":3499.9999999999995,"y":399.71576147505584,"x":-5654.21700043974},{"z":3499.9999999999995,"y":399.71576147504391,"x":-1971.2170004397403}],[{"z":3499.9999999999995,"y":399.71576147504391,"x":-1971.2170004397403},{"z":3499.9999999999995,"y":-3984.284238524956,"x":-1971.2170004397472}],[{"z":3499.9999999999995,"y":-3984.284238524956,"x":-1971.2170004397472},{"z":3499.9999999999995,"y":-3984.2842385249696,"x":2238.7829995602569}]]]}
, id=, levelId=, maxPt=[x=2238.78290989854, y=1557.71569908961, z=3499.9998598274], minPt=[x=-5654.21677399222, y=-3984.28407895711, z=3499.9998598274], name=过厅 ]
, elevation=, height=, id=, miniMap=m.bimface.com/f59e14129a8dd342eee5a606342dc862/resource/model/maps/.png, name=F2, rooms=, structElev=]
[archElev=, Areas=[boundary={"version":"2.0","loops":[[[{"z":7000.0000000000009,"y":6067.7157614750558,"x":-5571.2170004397294},{"z":7000.0000000000009,"y":1847.7157614750554,"x":-5571.2170004397367}],[{"z":7000.0000000000009,"y":1847.7157614750554,"x":-5571.2170004397367},{"z":7000.0000000000009,"y":1847.7157614750445,"x":-2116.2170004397385}],[{"z":7000.0000000000009,"y":1847.7157614750445,"x":-2116.2170004397385},{"z":7000.0000000000009,"y":1847.7157614750374,"x":108.78299956026373}],[{"z":7000.0000000000009,"y":1847.7157614750374,"x":108.78299956026378},{"z":7000.0000000000009,"y":4312.7157614750367,"x":108.78299956026775}],[{"z":7000.0000000000009,"y":4312.7157614750367,"x":108.78299956026775},{"z":7000.0000000000009,"y":4457.7157614750367,"x":108.782999560268}],[{"z":7000.0000000000009,"y":4457.7157614750367,"x":108.782999560268},{"z":7000.0000000000009,"y":6067.7157614750377,"x":108.7829995602706}],[{"z":7000.0000000000009,"y":6067.7157614750367,"x":108.7829995602706},{"z":7000.0000000000009,"y":6067.7157614750558,"x":-5571.2170004397294}]]]}
, id=, levelId=, maxPt=[x=108.782995203586, y=6067.7155184672, z=6999.99971965479], minPt=[x=-5571.21677731631, y=1847.71568747529, z=6999.99971965479], name=露台 ]
[boundary={"version":"2.0","loops":[[[{"z":7000.0000000000009,"y":4167.7157614750313,"x":2238.78299956027},{"z":7000.0000000000009,"y":4167.7157614750367,"x":398.7829995602674}],[{"z":7000.0000000000009,"y":4167.7157614750367,"x":398.78299956026751},{"z":7000.0000000000009,"y":1847.7157614750361,"x":398.7829995602637}],[{"z":7000.0000000000009,"y":1847.7157614750363,"x":398.7829995602637},{"z":7000.0000000000009,"y":1847.7157614750306,"x":2238.7829995602669}],[{"z":7000.0000000000009,"y":1847.7157614750306,"x":2238.7829995602669},{"z":7000.0000000000009,"y":4167.7157614750313,"x":2238.78299956027}]]]}
, id=, levelId=, maxPt=[x=2238.78290989854, y=4167.71559456087, z=6999.99971965479], minPt=[x=398.782983589278, y=1847.71568747528, z=6999.99971965479], name=卫生间 ]
[boundary={"version":"2.0","loops":[[[{"z":7000.0000000000009,"y":4167.7157614750149,"x":7038.7829995602679},{"z":7000.0000000000009,"y":4167.71576147503,"x":2528.7829995602706}],[{"z":7000.0000000000009,"y":4167.71576147503,"x":2528.7829995602706},{"z":7000.0000000000009,"y":1847.7157614750295,"x":2528.7829995602665}],[{"z":7000.0000000000009,"y":1847.7157614750295,"x":2528.7829995602665},{"z":7000.0000000000009,"y":1847.7157614750151,"x":7038.7829995602642}],[{"z":7000.0000000000009,"y":1847.7157614750151,"x":7038.7829995602642},{"z":7000.0000000000009,"y":4167.7157614750149,"x":7038.7829995602679}]]]}
, id=, levelId=, maxPt=[x=7038.78271766183, y=4167.71559456087, z=6999.99971965479], minPt=[x=2528.78289828424, y=1847.71568747526, z=6999.99971965479], name=露台 ]
[boundary={"version":"2.0","loops":[[[{"z":7000.0000000000009,"y":1302.7157614750142,"x":7038.7829995602624},{"z":7000.0000000000009,"y":1557.7157614750149,"x":7038.7829995602642}],[{"z":7000.0000000000009,"y":1557.7157614750149,"x":7038.7829995602642},{"z":7000.0000000000009,"y":1557.7157614750295,"x":2528.7829995602665}],[{"z":7000.0000000000009,"y":1557.7157614750295,"x":2528.7829995602665},{"z":7000.0000000000009,"y":-3984.28423852497,"x":2528.7829995602574}],[{"z":7000.0000000000009,"y":-3984.28423852497,"x":2528.7829995602574},{"z":7000.0000000000009,"y":-3984.2842385249864,"x":7038.7829995602542}],[{"z":7000.0000000000009,"y":-3984.2842385249864,"x":7038.7829995602542},{"z":7000.0000000000009,"y":1302.7157614750142,"x":7038.7829995602624}]]]}
, id=, levelId=, maxPt=[x=7038.78271766182, y=1557.71569908958, z=6999.99971965479], minPt=[x=2528.78289828423, y=-3984.28407895713, z=6999.99971965479], name=书房 ]
[boundary={"version":"2.0","loops":[[[{"z":7000.0000000000009,"y":-6599.2842385249569,"x":-1971.2170004397512},{"z":7000.0000000000009,"y":-6599.2842385249542,"x":-2116.2170004397517}],[{"z":7000.0000000000009,"y":-6599.2842385249542,"x":-2116.2170004397517},{"z":7000.0000000000009,"y":-7644.2842385249514,"x":-2116.2170004397531}],[{"z":7000.0000000000009,"y":-7644.2842385249514,"x":-2116.2170004397531},{"z":7000.0000000000009,"y":-7644.2842385249542,"x":-1371.2170004397528}],[{"z":7000.0000000000009,"y":-7644.2842385249542,"x":-1371.2170004397528},{"z":7000.0000000000009,"y":-7644.2842385249642,"x":1638.7829995602526}],[{"z":7000.0000000000009,"y":-7644.2842385249642,"x":1638.7829995602526},{"z":7000.0000000000009,"y":-7644.284238524966,"x":2383.7829995602483}],[{"z":7000.0000000000009,"y":-7644.284238524966,"x":2383.7829995602483},{"z":7000.0000000000009,"y":-6839.2842385250142,"x":2383.7829995602497}],[{"z":7000.0000000000009,"y":-6839.2842385250142,"x":2383.7829995602497},{"z":7000.0000000000009,"y":-6694.284238524976,"x":2238.7829995602528}],[{"z":7000.0000000000009,"y":-6694.284238524976,"x":2238.7829995602528},{"z":7000.0000000000009,"y":-4274.28423852497,"x":2238.7829995602569}],[{"z":7000.0000000000009,"y":-4274.28423852497,"x":2238.7829995602569},{"z":7000.0000000000009,"y":-4274.284238524956,"x":-1971.2170004397469}],[{"z":7000.0000000000009,"y":-4274.284238524956,"x":-1971.2170004397474},{"z":7000.0000000000009,"y":-6599.2842385249569,"x":-1971.2170004397512}]]]}
, id=, levelId=, maxPt=[x=2383.78290409137, y=-4274.2840673428, z=6999.99971965479], minPt=[x=-2116.21691568671, y=-7644.28393237662, z=6999.99971965479], name=书房 ]
[boundary={"version":"2.0","loops":[[[{"z":7000.0000000000009,"y":1557.715761475067,"x":-9181.2170004397376},{"z":7000.0000000000009,"y":-3977.2842385249332,"x":-9181.2170004397449}],[{"z":7000.0000000000009,"y":-3977.2842385249337,"x":-9181.2170004397449},{"z":7000.0000000000009,"y":-3977.284238524956,"x":-2261.2170004397476}],[{"z":7000.0000000000009,"y":-3977.284238524956,"x":-2261.2170004397472},{"z":7000.0000000000009,"y":1557.7157614750445,"x":-2261.2170004397385}],[{"z":7000.0000000000009,"y":1557.7157614750447,"x":-2261.2170004397385},{"z":7000.0000000000009,"y":1557.7157614750558,"x":-5716.2170004397367}],[{"z":7000.0000000000009,"y":1557.7157614750558,"x":-5716.2170004397367},{"z":7000.0000000000009,"y":1557.715761475067,"x":-9181.2170004397376}]]]}
, id=, levelId=, maxPt=[x=-2261.21690987955, y=1557.71569908962, z=6999.99971965479], minPt=[x=-9181.21663273829, y=-3977.28407923745, z=6999.99971965479], name=主卧 ]
, elevation=, height=, id=, miniMap=m.bimface.com/f59e14129a8dd342eee5a606342dc862/resource/model/maps/.png, name=F3, rooms=, structElev=]
[archElev=, Areas=, elevation=, height=, id=, miniMap=m.bimface.com/f59e14129a8dd342eee5a606342dc862/resource/model/maps/.png, name=ROOF, rooms=, structElev=]
]
[fileId=, floors=[archElev=-, Areas=, elevation=-, height=, id=, miniMap=m.bimface.com/b0106219d6df6da77b6493a0565d9e0e/resource/model/maps/.png, name=B2, rooms=, structElev=-]
[archElev=-, Areas=, elevation=-, height=, id=, miniMap=m.bimface.com/b0106219d6df6da77b6493a0565d9e0e/resource/model/maps/.png, name=B1, rooms=, structElev=-]
[archElev=-, Areas=, elevation=-, height=, id=, miniMap=, name=L1, rooms=, structElev=-]
[archElev=, Areas=, elevation=, height=, id=, miniMap=, name=0.000, rooms=, structElev=]
[archElev=, Areas=, elevation=, height=, id=, miniMap=, name=L2, rooms=, structElev=]
[archElev=, Areas=, elevation=, height=, id=, miniMap=, name=L3, rooms=, structElev=]
[archElev=, Areas=, elevation=, height=, id=, miniMap=, name=L4, rooms=, structElev=]
[archElev=, Areas=, elevation=, height=, id=, miniMap=, name=L5, rooms=, structElev=]
[archElev=, Areas=, elevation=, height=, id=, miniMap=, name=L6, rooms=, structElev=]
[archElev=, Areas=, elevation=, height=, id=, miniMap=, name=屋顶层, rooms=, structElev=]
[archElev=, Areas=, elevation=, height=, id=, miniMap=, name=机房层, rooms=, structElev=]
]

测试代码如下:

 // 获取多模型的楼层信息
protected void btnGetMultipleModelFloors_Click(object sender, EventArgs e)
{
string[] fileIds = txtFileID.Text.Split(',');
FileConvertApi api = new FileConvertApi();
MultipleModelsFloors response = api.GetMultipleModelFloors(txtAccessToken.Text, fileIds, chkIncludeArea.Checked, chkIncludeRoom.Checked); StringBuilder sb = new StringBuilder();
List<MultipleModelsFloorsEntity> lstFloor = response.Data;
foreach (var floor in lstFloor)
{
sb.AppendLine(floor.ToString());
} txtResult.Text = response.Code.ToString2()
+ Environment.NewLine
+ response.Message.ToString2()
+ Environment.NewLine
+ sb;
}
 

C#开发BIMFACE系列22 服务端API之获取模型数据7:获取多个模型的楼层信息的更多相关文章

  1. C#开发BIMFACE系列45 服务端API之创建离线数据包

    BIMFACE二次开发系列目录     [已更新最新开发文章,点击查看详细] BIMFACE的常规应用方式有公有云与私有化部署两种方式,并且浏览模型或者图纸需要使用ViewToken,ViewToke ...

  2. C#开发BIMFACE系列25 服务端API之获取模型数据10:获取楼层对应面积分区列表

    系列目录     [已更新最新开发文章,点击查看详细] 在<C#开发BIMFACE系列22 服务端API之获取模型数据7:获取多个模型的楼层信息>中,返回的楼层信息结果中包含了楼层的具体信 ...

  3. C#开发BIMFACE系列46 服务端API之离线数据包下载及结构详解

    BIMFACE二次开发系列目录     [已更新最新开发文章,点击查看详细] 在前一篇博客<C#开发BIMFACE系列45 服务端API之创建离线数据包>中通过调用接口成功的创建一个离线数 ...

  4. C#开发BIMFACE系列30 服务端API之模型对比1:发起模型对比

    系列目录     [已更新最新开发文章,点击查看详细] 在实际项目中,由于需求变更经常需要对模型文件进行修改.为了便于用户了解模型在修改前后发生的变化,BIMFACE提供了模型在线对比功能,可以利用在 ...

  5. C#开发BIMFACE系列40 服务端API之模型集成

    BIMFACE二次开发系列目录     [已更新最新开发文章,点击查看详细] 随着建筑信息化模型技术的发展,越来越多的人选择在云端浏览建筑模型.现阶段的云端模型浏览大多是基于文件级别,一次只可以浏览一 ...

  6. C#开发BIMFACE系列41 服务端API之模型对比

    BIMFACE二次开发系列目录     [已更新最新开发文章,点击查看详细] 在建筑施工图审查系统中,设计单位提交设计完成的模型/图纸,审查专家审查模型/图纸.审查过程中如果发现不符合规范的地方,则流 ...

  7. C#开发BIMFACE系列42 服务端API之图纸对比

    BIMFACE二次开发系列目录     [已更新最新开发文章,点击查看详细] 在我的前一篇博客<C#开发BIMFACE系列42 服务端API之图纸对比>中详细介绍了BIMFACE服务端接口 ...

  8. C#开发BIMFACE系列43 服务端API之图纸拆分

    BIMFACE二次开发系列目录     [已更新最新开发文章,点击查看详细] 在上一篇博客<C#开发BIMFACE系列42 服务端API之图纸对比>的最后留了一个问题,在常规业务场景下,一 ...

  9. C#开发BIMFACE系列44 服务端API之计算图纸对比差异项来源自哪个图框

    BIMFACE二次开发系列目录     [已更新最新开发文章,点击查看详细] 在前两篇博客<C#开发BIMFACE系列42 服务端API之图纸对比>.<C#开发BIMFACE系列43 ...

随机推荐

  1. 探秘最小生成树&&洛谷P2126题解

    我在这里就讲两种方法 Prim 和 Kruscal Kruscal kruscal的本质其实是 排序+并查集 ,是生成树中避圈法的推广 算法原理如下 (1)将连通带权图G=<n,m>的各条 ...

  2. 解决跨域session 同步问题

    跨域来源:(前端站点和后端API布署到不同的站点) 解决方案 一.服务端设置 1.配置允许跨域请求 public class BaseAction { /** * 支持跨域请求 * @author f ...

  3. GooglePlay新版排行榜接入

    新版本的GMS的api和老版本的有很大的差异,刚接了一下,在这里留一个记号,以便查阅:判定是否已经登录 private static boolean isSignedIn(Cocos2dxActivi ...

  4. 《HTTP权威指南》--阅读笔记(一)

    HTTP: HyperText Transfer Protocol 测试站点:http://www.joes-hardware.com URI包括URL和URN URI: Uniform Resour ...

  5. java并发编程(十六)----(线程池)java线程池的使用

    上节我们简单介绍了线程池,这次我们就来使用一下.Executors提供四种线程池,分别是:newCachedThreadPool,newFixedThreadPool ,newScheduledThr ...

  6. Linux fuser工具使用方法介绍

    引言 fuser是linux中较常用的工具,"fuser"——从其名称我们可以看出该工具的用途:查询给定文件或目录的用户或进程信息. 除查询文件相关信息之外,使用fuser还能向进 ...

  7. 使用PIP键盘输入数字小数位--Smart LCD

    应用范例: 使用TOPWAY Smart LCD (HMT050CC-C) 使用PIP键盘输入数字小数位 第一步 建立工程 第二步 建立三个页面,导入图片 点击工作区域, 右面显示页面属性 属性中Ba ...

  8. 欢迎加入我的知识星球:C语言解惑课堂

    我在知识星球上开通了一个有关C语言基础答疑解惑的星球,它叫做:“C语言解惑课堂”.看这名字你就知道虽然有点俗,俗才贴近你的真正需求嘛!这是一个专门帮助C语言初学者答疑解惑的课堂.嗯~~~,关于这个星球 ...

  9. virtualenv使用和virtualenvwrapper使用笔记

    virtualenv使用笔记 1.安装 pip install virtualenv 2.创建虚拟环境 virtualenv env //对于python2.7,该虚拟环境env必须在英文目录路径下 ...

  10. [ZJOI2011]看电影(组合数学,高精度)

    [ZJOI2011]看电影 这题模型转化很巧妙.(神仙题) 对于这种题首先肯定知道答案就是合法方案除以总方案. 总方案显然是\(k^n\). 那么考虑怎么算合法方案. 当\(n>k\)的时候显然 ...