-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMyr-DeleteBeamsOutsideFloorplan.mcr
96 lines (87 loc) · 1.93 KB
/
Myr-DeleteBeamsOutsideFloorplan.mcr
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#Version 8
#BeginDescription
Last modified by: Anno Sportel ([email protected])
01.02.2018 - version 1.02
#End
#Type O
#NumBeamsReq 0
#NumPointsGrip 0
#DxaOut 1
#ImplInsert 1
#FileState 0
#MajorVersion 1
#MinorVersion 2
#KeyWords
#BeginContents
/*
* COPYRIGHT
* ---------------
* Copyright (C) 2008 by
* hsbSOFT N.V.
* THE NETHERLANDS
*
* The program may be used and/or copied only with the written
* permission from hsbSOFT N.V., or in accordance with
* the terms and conditions stipulated in the agreement/contract
* under which the program has been supplied.
*
* All rights reserved.
*
* REVISION HISTORY
* -------------------------
*
* Created by: Anno Sportel ([email protected])
* date: 23.01.2008
* version 1.0: First version
*
* Modify by: Anno Sportel ([email protected])
* date: 09.02.2009
* version 1.01: Use proof brutto instead of netto
*
* Modify by: Robert Pol ([email protected])
* date: 01.02.2018
* version 1.02: Change insert so it can be added to element generation
*
*/
if( _bOnInsert ){
if( insertCycleCount() > 1 ){
eraseInstance();
return;
}
PrEntity ssE(T("Select a set of floor elements"), ElementRoof());
if( ssE.go() ){
_Element.append(ssE.elementSet());
}
_Map.setInt("ManualInserted", true);
return;
}
if (_bOnElementConstructed || _Map.getInt("ManualInserted"))
{
PlaneProfile ppFloorPlan;
Beam arAllBm[0];
for ( int e = 0; e < _Element.length(); e++) {
Element el = _Element[e];
//only horizontal elements
if ( ! el.vecZ().isParallelTo(_ZW) ) {
continue;
}
PlaneProfile ppEl = el.profBrutto(0);
ppFloorPlan.unionWith(ppEl);
Beam arBm[] = el.beam();
arAllBm.append(arBm);
}
ppFloorPlan.shrink(U(-10));
ppFloorPlan.shrink(U(10));
for ( int i = 0; i < arAllBm.length(); i++) {
Beam bm = arAllBm[i];
Point3d ptBm = bm.ptCen();
if ( ppFloorPlan.pointInProfile(ptBm) == _kPointOutsideProfile ) {
bm.dbErase();
}
}
eraseInstance();
return;
}
#End
#BeginThumbnail
#End