Cross Section Service


Bimplus DB

Team DB

Important: All the APIs described in the Bimplus DB section applies to the Team DB as well. Replace the keyword "content" with the "team_slug" for working with the cross section definition and cross sections in Team DB.

eg: Bimplus DB: https://api-stage.bimplus.net/v2/content//crosssectiondefinitions. Similar call in Team DB will be https://api-stage.bimplus.net/v2/<team_slug>/crosssectiondefinitions.


Create a new cross section definition in Bimplus DB
Resource: content/crosssectiondefinitions

URLhttps://api-stage.bimplus.net/v2/content/crosssectiondefinitions

Example: https://api-stage.bimplus.net/v2/content/crosssectiondefinitions

JSON Structure

Name

Mandatory / Optional

Type

Description

name

mandatory

string

Cross section definition name

description

optional

string

Short description of the cross section definition

freeAttributesId

optional

JSON Array

List of all free attribute Ids, where are defined all parameters for CSG-contour calculation

csgParameters
mandatoryJSON ArrayList of objects which define all rules for calculation contour’s vertex of CSG-geometry.
Structure of this objects is described below.


JSON Structure of the object in "csgParameters" attribute

Name

Mandatory / Optional

Type

Description

pointOrder

mandatory

int

Point order

command

mandatory

string

Command for creation CSG-Geometry contour e.g. "O", "L", "R", ....

xCoordinate

mandatory

string

Contains either direct numerical value of coordinate e.g. "0.0" or formula which can contain simple operation between numerical values and attribute values defined by attribute name e.g

"(B-B1)/2+B1".
yCoordinate
mandatorystringdescription see above in xCoordinate
zCoordinate
optionalstringdescription see above in xCoordinate 
 POST
 Creates a new cross section definition in bimplus database. Cross section definition is defined as contour of CSG-geometry.
Authorization: BimPlus 9c1874a62c974dcfa75e0132c423a088
Content-Type: application/json
{
	"name":"IPE",
	"description":"IPE-profil",
	"freeAttributesId":[
		"a51576ae-ecaa-43c0-b00c-1ae5efaae4f0",
		"46065318-8776-4f30-85ff-c7276b094097",
		"ec94c7ee-b810-4012-9e94-cc7ed2a9c4bd",
		"d5e91f99-ff75-4262-b21e-05dea7bff340",
		"df51e064-ee1b-4b5d-bdaa-5b053fd8b8a2"
	],
	"csgParameters":[
		{
			"pointOrder":1,
			"command":"O",
			"xCoordinate":"0.0",
			"yCoordinate":"0.0"
		},
		{
			"pointOrder":2,
			"command":"L",
			"xCoordinate":"0.0",
			"yCoordinate":"D"
		},
		...
	]
}
Status: 201 Created
{
	"name":"IPE",
	"description":"IPE-profil",
	"freeAttributesId":["a51576ae-ecaa-43c0-b00c-1ae5efaae4f0",
		"46065318-8776-4f30-85ff-c7276b094097",
		"ec94c7ee-b810-4012-9e94-cc7ed2a9c4bd",
		"d5e91f99-ff75-4262-b21e-05dea7bff340",
		"df51e064-ee1b-4b5d-bdaa-5b053fd8b8a2"
	],
	"csgParameters":[{
			"pointOrder":1,
			"command":"O",
			"xCoordinate":"0.0",
			"yCoordinate":"0.0"
		},
		{
			"pointOrder":2,
			"command":"L",
			"xCoordinate":"0.0",
			"yCoordinate":"D"
		},
		{
			"pointOrder":3,
			"command":"L",
			"xCoordinate":"(B-B1)/2",
			"yCoordinate":"D"
		},
		{
			"pointOrder":4,
			"command":"R",
			"xCoordinate":"R",
			"yCoordinate":"0.0"
		},
		{
			"pointOrder":5,
			"command":"L",
			"xCoordinate":"(B-B1)/2",
			"yCoordinate":"T-D"
		},
		{
			"pointOrder":6,
			"command":"R",
			"xCoordinate":"R",
			"yCoordinate":"0.0"
		},
		{
			"pointOrder":7,
			"command":"L",
			"xCoordinate":"0.0",
			"yCoordinate":"T-D"
		},
		{
			"pointOrder":8,
			"command":"L",
			"xCoordinate":"0.0",
			"yCoordinate":"T"
		},
		{
			"pointOrder":9,
			"command":"L",
			"xCoordinate":"B",
			"yCoordinate":"T"
		},
		{
			"pointOrder":10,
			"command":"L",
			"xCoordinate":"B",
			"yCoordinate":"T-D"
		},
		{
			"pointOrder":11,
			"command":"L",
			"xCoordinate":"(B-B1)/2+B1",
			"yCoordinate":"T-D"
		},
		{
			"pointOrder":12,
			"command":"R",
			"xCoordinate":"R",
			"yCoordinate":"0.0"
		},
		{
			"pointOrder":13,
			"command":"L",
			"xCoordinate":"(B-B1)/2+B1",
			"yCoordinate":"D"
		},
		{
			"pointOrder":14,
			"command":"R",
			"xCoordinate":"R",
			"yCoordinate":"0.0"
		},
		{
			"pointOrder":15,
			"command":"L",
			"xCoordinate":"B",
			"yCoordinate":"D"
		},
		{
			"pointOrder":16,
			"command":"L",
			"xCoordinate":"B",
			"yCoordinate":"0.0"
		},
		{
			"pointOrder":17,
			"command":"L",
			"xCoordinate":"0.0",
			"yCoordinate":"0.0"
		}
	]
}