The Global Archicad Community

Stay informed. Get help. Share your knowledge.

Everything about using Libraries and Library Parts - Doors/Windows/Objects/Stairs etc. (Example: How can I display a Transom above my Door?)

Moderators: ejrolon, Barry Kelly, Karl Ottenstein, LaszloNagy, gkmethy, Gergely Feher

User avatar
By Lingwisyer
Hi all,

This is probably an odd request, but is there someway to draw a Complex Profile in 2D?

Code: Select all
for _iComp = 1 to _nComponentsT

	if _bShowPart[_iComp] then
		dim _currSurfaces[]
		n = REQUEST{3} ("Profile_component_info", myProfileIdxT, _iComp, "gs_profile_comp_surfaces", _currSurfaces)

		_bmat = 1
		_surface = 1
		_pen = 1

		n = REQUEST{3} ("Profile_component_info", myProfileIdxT, _iComp, "gs_profile_bmat", _bmat)
		n = REQUEST{3} ("Profile_component_info", myProfileIdxT, _iComp, "gs_profile_surface", _surface)
		n = REQUEST{3} ("Profile_component_info", myProfileIdxT, _iComp, "gs_profile_outlinepen", _pen)

		building_material _bmat
		pen _pen

		_surfIdx = 1
		for _i = _contStartPointsT[_iComp] to _contEndPointsT[_iComp] step 5

		put _profileGeometryRawDataT[_i], 
			_profileGeometryRawDataT[_i + 1], 
			!0, 	! angle of sides from the perpendicular plane
			_profileGeometryRawDataT[_i + 2] * 15 + not(_profileGeometryRawDataT[_i + 3]) * 64 + _profileGeometryRawDataT[_i + 4], 
		_surfIdx = _surfIdx + 1
		next _i

		Poly2_b	NSP/3,	15,
				gs_fill_pen2, gs_back_pen2,

next _iComp

It basically comes down to an understanding of how to manipulate _profileGeometryRawData. From it's interaction with cprism_{2} we can see that it follows:
Code: Select all
x1, y1, alpha1, s1, mat1,
xn, yn, alphan, sn, matn

I had figured that I could just comment out the alpha and mat buffer adds and reflect that in the node count, but I get a missing parameters warning so I am assuming I have overlooked something...