he "return" is comment out as shown below?
After restarting Rhino and Grasshopper, I opened the outdoors_airflow demo file, and the first step of creating the case file is ok:
Then the blockMesh component gives the following error: seems I have to manually start OF first..
so, as the error message suggested, I open OF by Start_OF.bat:
Then come back to the blockMesh component, now it can be executed while the OF command line window is also openning:
... and the blockMesh finished successfully:
... so I proceeded to run snappyHexMesh, checkMesh and update fvScheme:
... up to the simpleFoam component, I got the error again:
The warning message is:
1. Solution exception: --> OpenFOAM command Failed!#0 Foam::error::printStack(Foam::Ostream&) in "/opt/OpenFOAM/OpenFOAM-v1606+/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so" #1 Foam::sigFpe::sigHandler(int) in "/opt/OpenFOAM/OpenFOAM-v1606+/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so" #2 ? in "/lib64/libc.so.6" #3 double Foam::sumProd<double>(Foam::UList<double> const&, Foam::UList<double> const&) in "/opt/OpenFOAM/OpenFOAM-v1606+/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so" #4 Foam::PCG::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const in "/opt/OpenFOAM/OpenFOAM-v1606+/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so" #5 Foam::GAMGSolver::solveCoarsestLevel(Foam::Field<double>&, Foam::Field<double> const&) const in "/opt/OpenFOAM/OpenFOAM-v1606+/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so" #6 Foam::GAMGSolver::Vcycle(Foam::PtrList<Foam::lduMatrix::smoother> const&, Foam::Field<double>&, Foam::Field<double> const&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::PtrList<Foam::Field<double> >&, Foam::PtrList<Foam::Field<double> >&, unsigned char) const in "/opt/OpenFOAM/OpenFOAM-v1606+/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so" #7 Foam::GAMGSolver::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const in "/opt/OpenFOAM/OpenFOAM-v1606+/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so" #8 Foam::fvMatrix<double>::solveSegregated(Foam::dictionary const&) in "/opt/OpenFOAM/OpenFOAM-v1606+/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so" #9 Foam::fvMatrix<double>::solve(Foam::dictionary const&) in "/opt/OpenFOAM/OpenFOAM-v1606+/platforms/linux64GccDPInt32Opt/bin/simpleFoam" #10 Foam::fvMatrix<double>::solve() in "/opt/OpenFOAM/OpenFOAM-v1606+/platforms/linux64GccDPInt32Opt/bin/simpleFoam" #11 ? in "/opt/OpenFOAM/OpenFOAM-v1606+/platforms/linux64GccDPInt32Opt/bin/simpleFoam" #12 __libc_start_main in "/lib64/libc.so.6" #13 ? in "/opt/OpenFOAM/OpenFOAM-v1606+/platforms/linux64GccDPInt32Opt/bin/simpleFoam"
... and the command lines in the readMe! output are pretty long and it is saved in the text file attached here.
So, my questions are:
1. why I have to manually start OF first before I can use the blockMesh component? Should butterfly automatically start OF?
2. what might be the cause of the unsuccessful run of simpleFoam in the end?
Hope you can kindly advise! Thank you!
- Ji
…
A repository of generic or complex examples.
Example 01: Attractor Values
ND_001_AttractorValues.gh
Example 02: Curve Values
ND_002_CurveValues.gh
Example 03: Point Attractor
ND_003_PointAttract
teraction for its Correlations cycle, AA Athens Visiting School scales up its design intentions in order to investigate links among discrete individual architectural systems in its 2013 version, Recharged.
Recharged with interconnectivity on different levels, the theme of investigation will revolve around the design of semi-independent design prototypes acting together to form elaborate unified results. The driving force in Cipher City: Recharged is the synergistic effect behind complex form-making systems where interactive design patterns arise out of a multiplicity of relatively simple rules.
In collaboration with the National Technical University of Athens, Cipher City: Recharged will explore participatory design and active engagement modeling and will continue building novel prototypes upon horizontal planes.
As in 2012, the design agendas of AA Athens and AA Istanbul Visiting Schools will directly create feedback on one another, allowing participation in either one or both Programmes.
Discounts
The AA offers several discount options for participants wishing to apply as a group or participants wishing to apply for both AA Istanbul and AA Athens Visiting Schools:
1. Standard application
The AA Visiting School requires a fee of £695 per participant, which includes a £60 Visiting Membership. If you are already a member, the total fee will be reduced automatically by £60 by the online payment system. Fees are non refundable.
2. Group registration
For group applications, there will be a range of discounts depending on the number of people in the group. The discounted fee will be applied to each individual in the group.
Type A. 3-6 people group: £60 (AA Membership fee) + 635*0.75 = £536.25 (25 %) Type B. 6-15 people group: £60 + 635*0.70 = £504.5 (30%) Type C. more than 15 people group: £60 + 635*0.65 = £472.75 (35%)
3. Participants attending both AA Istanbul and AA Athens | 40% discount
For people wishing to attend both AA Istanbul 2013 and AA Athens 2013, a discount of 40% will be made for each participant. (The participant will pay the £60 membership fee only once.)
£60 (AA Membership fee) + (635*0.60)*2 = £822
For more information in discounts, please visit:
http://ai.aaschool.ac.uk/athens/portfolio/discounts-2013/
Applications
The deadline for applications is 11 March 2013. A portfolio or CV is not required, only the online application form and payment. The online application can be reached from:
http://www.aaschool.ac.uk/STUDY/VISITING/athens…
Added by elif erdine at 12:33pm on December 13, 2012
t file** - ply file with just x,y,z locations. I got it from a 3d scanner. Here is how first few lines of file looks like - ply format ascii 1.0 comment VCGLIB generated element vertex 6183 property float x property float y property float z end_header -32.3271 -43.9859 11.5124 -32.0631 -43.983 11.4945 12.9266 -44.4913 28.2031 13.1701 -44.4918 28.2568 13.4138 -44.4892 28.2531 13.6581 -44.4834 28.1941 13.9012 -44.4851 28.2684 ... ... ... In case you need the data - please email me on **nisha.m234@gmail.com**. **Algorithm:** I am trying to find principal curvatures for extracting the ridges and valleys. The steps I am following is: 1. Take a point x 2. Find its k nearest neighbors. I used k from 3 to 20. 3. average the k nearest neighbors => gives (_x, _y, _z) 4. compute covariance matrix 5. Now I take eigen values and eigen vectors of this covariance matrix 6. I get u, v and n here from eigen vectors. u is a vector corresponding to largest eigen value v corresponding to 2nd largest n is 3rd smallest vector corresponding to smallest eigen value 7. Then for transforming the point(x,y,z) I compute matrix T T = [ui ] [u ] [x - _x] [vi ] = [v ] x [y - _y] [ni ] [n ] [z - _z] 8. for each i of the k nearest neighbors:<br> [ n1 ] [u1*u1 u1*v1 v1*v1] [ a ]<br> [ n2 ] = [u2*u2 u2*v2 v2*v2] [ b ] <br> [... ] [ ... ... ... ] [ c ] <br> [ nk ] [uk*uk uk*vk vk*vk]<br> Solve this for a, b and c with least squares 9. this equations will give me a,b,c 10. now I compute eigen values of matrix [a b b a ] 11. This will give me 2 eigen values. one is Kmin and another Kmax. **My Problem:** The output is no where close to finding the correct Ridges and Valleys. I am totally Stuck and frustrated. I am not sure where exactly I am getting it wrong. I think the normal's are not computed correctly. But I am not sure. I am very new to graphics programming and so this maths, normals, shaders go way above my head. Any help will be appreciated. **PLEASE PLEASE HELP!!** **Resources:** I am using Visual Studio 2010 + Eigen Library + ANN Library. **Other Options used** I tried using MeshLab. I used ball pivoting triangles remeshing in MeshLab and then applied the polkadot3d shader. If correctly identifies the ridges and valleys. But I am not able to code it. **My Function:** //the function outputs to ply file void getEigen() { int nPts; // actual number of data points ANNpointArray dataPts; // data points ANNpoint queryPt; // query point ANNidxArray nnIdx;// near neighbor indices ANNdistArray dists; // near neighbor distances ANNkd_tree* kdTree; // search structure //for k = 25 and esp = 2, seems to got few ridges queryPt = annAllocPt(dim); // allocate query point dataPts = annAllocPts(maxPts, dim); // allocate data points nnIdx = new ANNidx[k]; // allocate near neigh indices dists = new ANNdist[k]; // allocate near neighbor dists nPts = 0; // read data points ifstream dataStream; dataStream.open(inputFile, ios::in);// open data file dataIn = &dataStream; ifstream queryStream; queryStream.open("input/query.
pts", ios::in);// open data file queryIn = &queryStream; while (nPts < maxPts && readPt(*dataIn, dataPts[nPts])) nPts++; kdTree = new ANNkd_tree( // build search structure dataPts, // the data points nPts, // number of points dim); // dimension of space while (readPt(*queryIn, queryPt)) // read query points { kdTree->annkSearch( // search queryPt, // query point k, // number of near neighbors nnIdx, // nearest neighbors (returned) dists, // distance (returned) eps); // error bound double x = queryPt[0]; double y = queryPt[1]; double z = queryPt[2]; double _x = 0.0; double _y = 0.0; double _z = 0.0; #pragma region Compute covariance matrix for (int i = 0; i < k; i++) { _x += dataPts[nnIdx[i]][0]; _y += dataPts[nnIdx[i]][1]; _z += dataPts[nnIdx[i]][2]; } _x = _x/k; _y = _y/k; _z = _z/k; double A[3][3] = {0,0,0,0,0,0,0,0,0}; for (int i = 0; i < k; i++) { double X = dataPts[nnIdx[i]][0]; double Y = dataPts[nnIdx[i]][1]; double Z = dataPts[nnIdx[i]][2]; A[0][0] += (X-_x) * (X-_x); A[0][1] += (X-_x) * (Y-_y); A[0][2] += (X-_x) * (Z-_z); A[1][0] += (Y-_y) * (X-_x); A[1][1] += (Y-_y) * (Y-_y); A[1][2] += (Y-_y) * (Z-_z); A[2][0] += (Z-_z) * (X-_x); A[2][1] += (Z-_z) * (Y-_y); A[2][2] += (Z-_z) * (Z-_z); } MatrixXd C(3,3); C <<A[0][0]/k, A[0][1]/k, A[0][2]/k, A[1][0]/k, A[1][1]/k, A[1][2]/k, A[2][0]/k, A[2][1]/k, A[2][2]/k; #pragma endregion EigenSolver<MatrixXd> es(C); MatrixXd Eval = es.eigenvalues().real().asDiagonal(); MatrixXd Evec = es.eigenvectors().real(); MatrixXd u,v,n; double a = Eval.row(0).col(0).value(); double b = Eval.row(1).col(1).value(); double c = Eval.row(2).col(2).value(); #pragma region SET U V N if(a>b && a>c) { u = Evec.row(0); if(b>c) { v = Eval.row(1); n = Eval.row(2);} else { v = Eval.row(2); n = Eval.row(1);} } else if(b>a && b>c) { u = Evec.row(1); if(a>c) { v = Eval.row(0); n = Eval.row(2);} else { v = Eval.row(2); n = Eval.row(0);} } else { u = Eval.row(2); if(a>b) { v = Eval.row(0); n = Eval.row(1);} else { v = Eval.row(1); n = Eval.row(0);} } #pragma endregion MatrixXd O(3,3); O <<u, v, n; MatrixXd UV(k,3); VectorXd N(k,1); for( int i=0; i<k; i++) { double x = dataPts[nnIdx[i]][0];; double y = dataPts[nnIdx[i]][1];; double z = dataPts[nnIdx[i]][2];; MatrixXd X(3,1); X << x-_x, y-_y, z-_z; MatrixXd T = O * X; double ui = T.row(0).col(0).value(); double vi = T.row(1).col(0).value(); double ni = T.row(2).col(0).value(); UV.row(i) << ui * ui, ui * vi, vi * vi; N.row(i) << ni; } Vector3d S = UV.colPivHouseholderQr().solve(N); MatrixXd II(2,2); II << S.row(0).value(), S.row(1).value(), S.row(1).value(), S.row(2).value(); EigenSolver<MatrixXd> es2(II); MatrixXd Eval2 = es2.eigenvalues().real().asDiagonal(); MatrixXd Evec2 = es2.eigenvectors().real(); double kmin, kmax; if(Eval2.row(0).col(0).value() < Eval2.row(1).col(1).value()) { kmin = Eval2.row(0).col(0).value(); kmax = Eval2.row(1).col(1).value(); } else { kmax = Eval2.row(0).col(0).value(); kmin = Eval2.row(1).col(1).value(); } double thresh = 0.0020078; if (kmin < thresh && kmax > thresh ) cout << x << " " << y << " " << z << " " << 255 << " " << 0 << " " << 0 << endl; else cout << x << " " << y << " " << z << " " << 255 << " " << 255 << " " << 255 << endl; } delete [] nnIdx; delete [] dists; delete kdTree; annClose(); } Thanks, NISHA…
1 JUN to 31 DECBetween hours 1:00 to 24:00Current document units is in MetersConversion to Meters will be applied = 1.000[1 of 7] Writing simulation parameters...Ground temperature data contains monthly average temperatures at 3 different depths .5 meters (1st)2 meters (2nd)4meters (3rd)respectively[2 of 6] No context surfaces...[3 of 6] Writing geometry...[4 of 6] Writing materials and constructions...[5 of 7] Writing schedules...[6 of 7] Writing loads and ideal air system...[7 of 7] Writing outputs......... idf file is successfully written to : c:\ladybug\unnamed\EnergyPlus\unnamed.idf
Analysis is running!...c:\ladybug\unnamed\EnergyPlus\eplusout.csv......
Done! Read below for errors and warnings:
Program Version,EnergyPlus, Version 8.3.0-6d97d074ea, YMD=2015.05.24 11:32,IDD_Version 8.3.0
** Warning ** IP: Note -- Some missing fields have been filled with defaults. See the audit output file for details.
** Warning ** Version: in IDF="'8.1.0'" not the same as expected="8.3"
************* Beginning Zone Sizing Calculations
** Severe ** GetSurfaceData: Some Outward Facing angles of subsurfaces differ significantly from base surface.
** ~~~ ** ...use Output:Diagnostics,DisplayExtraWarnings; to show more details on individual surfaces.
** Severe ** Problem in interior solar distribution calculation (CHKBKS)
** ~~~ ** Solar Distribution = FullInteriorExterior will not work in Zone="APRATMENT1"
** ~~~ ** because vertex 1 of back surface=AW0 is in front of receiving surface=EW0
** ~~~ ** (Dot Product indicator=17.0963)
** ~~~ ** Check surface geometry; if OK, use Solar Distribution = FullExterior instead.
** Severe ** Problem in interior solar distribution calculation (CHKBKS)
** ~~~ ** Solar Distribution = FullInteriorExterior will not work in Zone="APRATMENT1"
** ~~~ ** because vertex 2 of back surface=AW0 is in front of receiving surface=EW0
** ~~~ ** (Dot Product indicator=17.0963)
** ~~~ ** Check surface geometry; if OK, use Solar Distribution = FullExterior instead.
** Severe ** Problem in interior solar distribution calculation (CHKBKS)
** ~~~ ** Solar Distribution = FullInteriorExterior will not work in Zone="APRATMENT1"
** ~~~ ** because vertex 3 of back surface=AW0 is in front of receiving surface=EW0
** ~~~ ** (Dot Product indicator=17.1101)
** ~~~ ** Check surface geometry; if OK, use Solar Distribution = FullExterior instead.
** Severe ** Problem in interior solar distribution calculation (CHKBKS)
** ~~~ ** Solar Distribution = FullInteriorExterior will not work in Zone="APRATMENT1"
** ~~~ ** because vertex 4 of back surface=AW0 is in front of receiving surface=EW0
** ~~~ ** (Dot Product indicator=17.1101)
** ~~~ ** Check surface geometry; if OK, use Solar Distribution = FullExterior instead.
** Severe ** Problem in interior solar distribution calculation (CHKBKS)
** ~~~ ** Solar Distribution = FullInteriorExterior will not work in Zone="APRATMENT1"
** ~~~ ** because vertex 1 of back surface=AW1 is in front of receiving surface=EW0
** ~~~ ** (Dot Product indicator=17.1101)
** ~~~ ** Check surface geometry; if OK, use Solar Distribution = FullExterior instead.
** Severe ** Problem in interior solar distribution calculation (CHKBKS)
** ~~~ ** Solar Distribution = FullInteriorExterior will not work in Zone="APRATMENT1"
** ~~~ ** because vertex 2 of back surface=AW1 is in front of receiving surface=EW0
** ~~~ ** (Dot Product indicator=30.0900)
** ~~~ ** Check surface geometry; if OK, use Solar Distribution = FullExterior instead.
** Severe ** Problem in interior solar distribution calculation (CHKBKS)
** ~~~ ** Solar Distribution = FullInteriorExterior will not work in Zone="APRATMENT1"
** ~~~ ** because vertex 3 of back surface=AW1 is in front of receiving surface=EW0
** ~~~ ** (Dot Product indicator=30.0900)
** ~~~ ** Check surface geometry; if OK, use Solar Distribution = FullExterior instead.
** Severe ** Problem in interior solar distribution calculation (CHKBKS)
** ~~~ ** Solar Distribution = FullInteriorExterior will not work in Zone="APRATMENT1"
** ~~~ ** because vertex 4 of back surface=AW1 is in front of receiving surface=EW0
** ~~~ ** (Dot Product indicator=17.1101)
** ~~~ ** Check surface geometry; if OK, use Solar Distribution = FullExterior instead.
** Severe ** Problem in interior solar distribution calculation (CHKBKS)
** ~~~ ** Solar Distribution = FullInteriorExterior will not work in Zone="APRATMENT1"
** ~~~ ** because vertex 1 of back surface=AW2 is in front of receiving surface=EW0
** ~~~ ** (Dot Product indicator=30.0900)
** ~~~ ** Check surface geometry; if OK, use Solar Distribution = FullExterior instead.
** Severe ** Problem in interior solar distribution calculation (CHKBKS)
** ~~~ ** Solar Distribution = FullInteriorExterior will not work in Zone="APRATMENT1"
** ~~~ ** because vertex 2 of back surface=AW2 is in front of receiving surface=EW0
** ~~~ ** (Dot Product indicator=30.0900)
** ~~~ ** Check surface geometry; if OK, use Solar Distribution = FullExterior instead.
** Severe ** Problem in interior solar distribution calculation (CHKBKS)
** ~~~ ** Solar Distribution = FullInteriorExterior will not work in Zone="APRATMENT1"
** ~~~ ** because vertex 3 of back surface=AW2 is in front of receiving surface=EW0
** ~~~ ** (Dot Product indicator=30.0900)
** ~~~ ** Check surface geometry; if OK, use Solar Distribution = FullExterior instead.
** Severe ** Problem in interior solar distribution calculation (CHKBKS)
** ~~~ ** Solar Distribution = FullInteriorExterior will not work in Zone="APRATMENT1"
** ~~~ ** because vertex 4 of back surface=AW2 is in front of receiving surface=EW0
** ~~~ ** (Dot Product indicator=30.0900)
** ~~~ ** Check surface geometry; if OK, use Solar Distribution = FullExterior instead.
** Severe ** Problem in interior solar distribution calculation (CHKBKS)
** ~~~ ** Solar Distribution = FullInteriorExterior will not work in Zone="APRATMENT1"
** ~~~ ** because vertex 1 of back surface=AW3 is in front of receiving surface=EW0
** ~~~ ** (Dot Product indicator=30.0900)
** ~~~ ** Check surface geometry; if OK, use Solar Distribution = FullExterior instead.
** Severe ** Problem in interior solar distribution calculation (CHKBKS)
** ~~~ ** Solar Distribution = FullInteriorExterior will not work in Zone="APRATMENT1"
** ~~~ ** because vertex 2 of back surface=AW3 is in front of receiving surface=EW0
** ~~~ ** (Dot Product indicator=30.0900)
** ~~~ ** Check surface geometry; if OK, use Solar Distribution = FullExterior instead.
** Severe ** Problem in interior solar distribution calculation (CHKBKS)
** ~~~ ** Solar Distribution = FullInteriorExterior will not work in Zone="APRATMENT1"
** ~~~ ** because vertex 3 of back surface=EW1 is in front of receiving surface=EW0
** ~~~ ** (Dot Product indicator=17.0963)
** ~~~ ** Check surface geometry; if OK, use Solar Distribution = FullExterior instead.
** Severe ** Problem in interior solar distribution calculation (CHKBKS)
** ~~~ ** Solar Distribution = FullInteriorExterior will not work in Zone="APRATMENT1"
** ~~~ ** because vertex 4 of back surface=EW1 is in front of receiving surface=EW0
** ~~~ ** (Dot Product indicator=17.0963)
** ~~~ ** Check surface geometry; if OK, use Solar Distribution = FullExterior instead.
** Severe ** Problem in interior solar distribution calculation (CHKBKS)
** ~~~ ** Solar Distribution = FullInteriorExterior will not work in Zone="APRATMENT1"
** ~~~ ** because vertex 1 of back surface=GLZ_0_EW1_1F6383543B434F648813 is in front of receiving surface=EW0
** ~~~ ** (Dot Product indicator=0.9038)
** ~~~ ** Check surface geometry; if OK, use Solar Distribution = FullExterior instead.
** Severe ** Problem in interior solar distribution calculation (CHKBKS)
** ~~~ ** Solar Distribution = FullInteriorExterior will not work in Zone="APRATMENT1"
** ~~~ ** because vertex 2 of back surface=GLZ_0_EW1_1F6383543B434F648813 is in front of receiving surface=EW0
** ~~~ ** (Dot Product indicator=0.9038)
** ~~~ ** Check surface geometry; if OK, use Solar Distribution = FullExterior instead.
** Severe ** Problem in interior solar distribution calculation (CHKBKS)
** ~~~ ** Solar Distribution = FullInteriorExterior will not work in Zone="APRATMENT1"
** ~~~ ** because vertex 3 of back surface=GLZ_0_EW1_1F6383543B434F648813 is in front of receiving surface=EW0
** ~~~ ** (Dot Product indicator=16.0967)
** ~~~ ** Check surface geometry; if OK, use Solar Distribution = FullExterior instead.
** Severe ** Problem in interior solar distribution calculation (CHKBKS)
** ~~~ ** Solar Distribution = FullInteriorExterior will not work in Zone="APRATMENT1"
** ~~~ ** because vertex 4 of back surface=GLZ_0_EW1_1F6383543B434F648813 is in front of receiving surface=EW0
** ~~~ ** (Dot Product indicator=16.0967)
** ~~~ ** Check surface geometry; if OK, use Solar Distribution = FullExterior instead.
** Severe ** Problem in interior solar distribution calculation (CHKBKS)
** ~~~ ** Solar Distribution = FullInteriorExterior will not work in Zone="APRATMENT1"
** ~~~ ** because vertex 6 of back surface=FLOOR is in front of receiving surface=EW0
** ~~~ ** (Dot Product indicator=30.0900)
** ~~~ ** Check surface geometry; if OK, use Solar Distribution = FullExterior instead.
** Severe ** Problem in interior solar distribution calculation (CHKBKS)
** ~~~ ** Solar Distribution = FullInteriorExterior will not work in Zone="APRATMENT1"
** ~~~ ** because vertex 7 of back surface=FLOOR is in front of receiving surface=EW0
** ~~~ ** (Dot Product indicator=30.0900)
** ~~~ ** Check surface geometry; if OK, use Solar Distribution = FullExterior instead.
** Severe ** Problem in interior solar distribution calculation (CHKBKS)
** ~~~ ** Solar Distribution = FullInteriorExterior will not work in Zone="APRATMENT1"
** ~~~ ** because vertex 8 of back surface=FLOOR is in front of receiving surface=EW0
** ~~~ ** (Dot Product indicator=17.1101)
** ~~~ ** Check surface geometry; if OK, use Solar Distribution = FullExterior instead.
** Severe ** Problem in interior solar distribution calculation (CHKBKS)
** ~~~ ** Solar Distribution = FullInteriorExterior will not work in Zone="APRATMENT1"
** ~~~ ** because vertex 9 of back surface=FLOOR is in front of receiving surface=EW0
** ~~~ ** (Dot Product indicator=17.0963)
** ~~~ ** Check surface geometry; if OK, use Solar Distribution = FullExterior instead.
** Severe ** Problem in interior solar distribution calculation (CHKBKS)
** ~~~ ** Solar Distribution = FullInteriorExterior will not work in Zone="APRATMENT1"
** ~~~ ** because vertex 5 of back surface=CIELING is in front of receiving surface=EW0
** ~~~ ** (Dot Product indicator=17.0963)
** ~~~ ** Check surface geometry; if OK, use Solar Distribution = FullExterior instead.
** Severe ** Problem in interior solar distribution calculation (CHKBKS)
** ~~~ ** Solar Distribution = FullInteriorExterior will not work in Zone="APRATMENT1"
** ~~~ ** because vertex 6 of back surface=CIELING is in front of receiving surface=EW0
** ~~~ ** (Dot Product indicator=17.1101)
** ~~~ ** Check surface geometry; if OK, use Solar Distribution = FullExterior instead.
** Severe ** Problem in interior solar distribution calculation (CHKBKS)
** ~~~ ** Solar Distribution = FullInteriorExterior will not work in Zone="APRATMENT1"
** ~~~ ** because vertex 7 of back surface=CIELING is in front of receiving surface=EW0
** ~~~ ** (Dot Product indicator=30.0900)
** ~~~ ** Check surface geometry; if OK, use Solar Distribution = FullExterior instead.
** Severe ** Problem in interior solar distribution calculation (CHKBKS)
** ~~~ ** Solar Distribution = FullInteriorExterior will not work in Zone="APRATMENT1"
** ~~~ ** because vertex 8 of back surface=CIELING is in front of receiving surface=EW0
** ~~~ ** (Dot Product indicator=30.0900)
** ~~~ ** Check surface geometry; if OK, use Solar Distribution = FullExterior instead.
** Severe ** Problem in interior solar distribution calculation (CHKBKS)
** ~~~ ** Solar Distribution = FullInteriorExterior will not work in Zone="APRATMENT1"
** ~~~ ** because vertex 3 of back surface=AW6 is in front of receiving surface=EW1
** ~~~ ** (Dot Product indicator=17.0963)
** ~~~ ** Check surface geometry; if OK, use Solar Distribution = FullExterior instead.
** Severe ** Problem in interior solar distribution calculation (CHKBKS)
** ~~~ ** Solar Distribution = FullInteriorExterior will not work in Zone="APRATMENT1"
** ~~~ ** because vertex 4 of back surface=AW6 is in front of receiving surface=EW1
** ~~~ ** (Dot Product indicator=17.0963)
** ~~~ ** Check surface geometry; if OK, use Solar Distribution = FullExterior instead.
** Severe ** Problem in interior solar distribution calculation (CHKBKS)
** ~~~ ** Solar Distribution = FullInteriorExterior will not work in Zone="APRATMENT1"
** ~~~ ** because vertex 1 of back surface=WALLW1 is in front of receiving surface=EW1
** ~~~ ** (Dot Product indicator=17.0963)
** ~~~ ** Check surface geometry; if OK, use Solar Distribution = FullExterior instead.
** Severe ** Problem in interior solar distribution calculation (CHKBKS)
** ~~~ ** Solar Distribution = FullInteriorExterior will not work in Zone="APRATMENT1"
** ~~~ ** because vertex 2 of back surface=WALLW1 is in front of receiving surface=EW1
** ~~~ ** (Dot Product indicator=17.0963)
** ~~~ ** Check surface geometry; if OK, use Solar Distribution = FullExterior instead.
** Severe ** Problem in interior solar distribution calculation (CHKBKS)
** ~~~ ** Solar Distribution = FullInteriorExterior will not work in Zone="APRATMENT1"
** ~~~ ** because vertex 3 of back surface=WALLW1 is in front of receiving surface=EW1
** ~~~ ** (Dot Product indicator=17.0963)
** ~~~ ** Check surface geometry; if OK, use Solar Distribution = FullExterior instead.
** Severe ** Problem in interior solar distribution calculation (CHKBKS)
** ~~~ ** Solar Distribution = FullInteriorExterior will not work in Zone="APRATMENT1"
** ~~~ ** because vertex 4 of back surface=WALLW1 is in front of receiving surface=EW1
** ~~~ ** (Dot Product indicator=17.0963)
** ~~~ ** Check surface geometry; if OK, use Solar Distribution = FullExterior instead.
** Severe ** Problem in interior solar distribution calculation (CHKBKS)
** ~~~ ** Solar Distribution = FullInteriorExterior will not work in Zone="APRATMENT1"
** ~~~ ** because vertex 1 of back surface=GLZ_0_WALLW1_103854D39BEF453D8A4E is in front of receiving surface=EW1
** ~~~ ** (Dot Product indicator=17.0963)
** ~~~ ** Check surface geometry; if OK, use Solar Distribution = FullExterior instead.
** Severe ** Problem in interior solar distribution calculation (CHKBKS)
** ~~~ ** Solar Distribution = FullInteriorExterior will not work in Zone="APRATMENT1"
** ~~~ ** because vertex 2 of back surface=GLZ_0_WALLW1_103854D39BEF453D8A4E is in front of receiving surface=EW1
** ~~~ ** (Dot Product indicator=17.0963)
** ~~~ ** Check surface geometry; if OK, use Solar Distribution = FullExterior instead.
** Severe ** Problem in interior solar distribution calculation (CHKBKS)
** ~~~ ** Solar Distribution = FullInteriorExterior will not work in Zone="APRATMENT1"
** ~~~ ** because vertex 3 of back surface=GLZ_0_WALLW1_103854D39BEF453D8A4E is in front of receiving surface=EW1
** ~~~ ** (Dot Product indicator=17.0963)
** ~~~ ** Check surface geometry; if OK, use Solar Distribution = FullExterior instead.
** Severe ** Problem in interior solar distribution calculation (CHKBKS)
** ~~~ ** Solar Distribution = FullInteriorExterior will not work in Zone="APRATMENT1"
** ~~~ ** because vertex 4 of back surface=GLZ_0_WALLW1_103854D39BEF453D8A4E is in front of receiving surface=EW1
** ~~~ ** (Dot Product indicator=17.0963)
** ~~~ ** Check surface geometry; if OK, use Solar Distribution = FullExterior instead.
** Severe ** Problem in interior solar distribution calculation (CHKBKS)
** ~~~ ** Solar Distribution = FullInteriorExterior will not work in Zone="APRATMENT1"
** ~~~ ** because vertex 1 of back surface=EW0 is in front of receiving surface=EW1
** ~~~ ** (Dot Product indicator=17.0963)
** ~~~ ** Check surface geometry; if OK, use Solar Distribution = FullExterior instead.
** Severe ** Problem in interior solar distribution calculation (CHKBKS)
** ~~~ ** Solar Distribution = FullInteriorExterior will not work in Zone="APRATMENT1"
** ~~~ ** because vertex 4 of back surface=EW0 is in front of receiving surface=EW1
** ~~~ ** (Dot Product indicator=17.0963)
** ~~~ ** Check surface geometry; if OK, use Solar Distribution = FullExterior instead.
** Severe ** Problem in interior solar distribution calculation (CHKBKS)
** ~~~ ** Solar Distribution = FullInteriorExterior will not work in Zone="APRATMENT1"
** ~~~ ** because vertex 1 of back surface=GLZ_0_EW0_6AEDE94222384E5B8950 is in front of receiving surface=EW1
** ~~~ ** (Dot Product indicator=1.4709)
** ~~~ ** Check surface geometry; if OK, use Solar Distribution = FullExterior instead.
** Severe ** Problem in interior solar distribution calculation (CHKBKS)
** ~~~ ** Solar Distribution = FullInteriorExterior will not work in Zone="APRATMENT1"
** ~~~ ** because vertex 2 of back surface=GLZ_0_EW0_6AEDE94222384E5B8950 is in front of receiving surface=EW1
** ~~~ ** (Dot Product indicator=1.4709)
** ~~~ ** Check surface geometry; if OK, use Solar Distribution = FullExterior instead.
** Severe ** Problem in interior solar distribution calculation (CHKBKS)
** ~~~ ** Solar Distribution = FullInteriorExterior will not work in Zone="APRATMENT1"
** ~~~ ** because vertex 3 of back surface=GLZ_0_EW0_6AEDE94222384E5B8950 is in front of receiving surface=EW1
** ~~~ ** (Dot Product indicator=15.6696)
** ~~~ ** Check surface geometry; if OK, use Solar Distribution = FullExterior instead.
** Severe ** Problem in interior solar distribution calculation (CHKBKS)
** ~~~ ** Solar Distribution = FullInteriorExterior will not work in Zone="APRATMENT1"
** ~~~ ** because vertex 4 of back surface=GLZ_0_EW0_6AEDE94222384E5B8950 is in front of receiving surface=EW1
** ~~~ ** (Dot Product indicator=15.6696)
** ~~~ ** Check surface geometry; if OK, use Solar Distribution = FullExterior instead.
** Severe ** Problem in interior solar distribution calculation (CHKBKS)
** ~~~ ** Solar Distribution = FullInteriorExterior will not work in Zone="APRATMENT1"
** ~~~ ** because vertex 1 of back surface=FLOOR is in front of receiving surface=EW1
** ~~~ ** (Dot Product indicator=17.0963)
** ~~~ ** Check surface geometry; if OK, use Solar Distribution = FullExterior instead.
** Severe ** Problem in interior solar distribution calculation (CHKBKS)
** ~~~ ** Solar Distribution = FullInteriorExterior will not work in Zone="APRATMENT1"
** ~~~ ** because vertex 2 of back surface=FLOOR is in front of receiving surface=EW1
** ~~~ ** (Dot Product indicator=17.0963)
** ~~~ ** Check surface geometry; if OK, use Solar Distribution = FullExterior instead.
** Severe ** Problem in interior solar distribution calculation (CHKBKS)
** ~~~ ** Solar Distribution = FullInteriorExterior will not work in Zone="APRATMENT1"
** ~~~ ** because vertex 2 of back surface=CIELING is in front of receiving surface=EW1
** ~~~ ** (Dot Product indicator=17.0963)
** ~~~ ** Check surface geometry; if OK, use Solar Distribution = FullExterior instead.
** Severe ** Problem in interior solar distribution calculation (CHKBKS)
** ~~~ ** Solar Distribution = FullInteriorExterior will not work in Zone="APRATMENT1"
** ~~~ ** because vertex 3 of back surface=CIELING is in front of receiving surface=EW1
** ~~~ ** (Dot Product indicator=17.0963)
** ~~~ ** Check surface geometry; if OK, use Solar Distribution = FullExterior instead.
** Warning ** ManageSizing: For a plant sizing run, there must be at least 1 Sizing:Plant object input. SimulationControl Plant Sizing option ignored.
************* Testing Individual Branch Integrity
************* All Branches passed integrity testing
************* Testing Individual Supply Air Path Integrity
************* All Supply Air Paths passed integrity testing
************* Testing Individual Return Air Path Integrity
************* All Return Air Paths passed integrity testing
************* No node connection errors were found.
************* Beginning Simulation
************* Simulation Error Summary *************
** Warning ** The following Report Variables were requested but not generated
** ~~~ ** because IDF did not contain these elements or misspelled variable name -- check .rdd file
************* Key=*, VarName=ZONE PACKAGED TERMINAL HEAT PUMP TOTAL COOLING ENERGY, Frequency=Hourly
************* Key=*, VarName=ZONE PACKAGED TERMINAL HEAT PUMP TOTAL HEATING ENERGY, Frequency=Hourly
************* Key=*, VarName=CHILLER ELECTRIC ENERGY, Frequency=Hourly
************* Key=*, VarName=BOILER HEATING ENERGY, Frequency=Hourly
************* Key=*, VarName=FAN ELECTRIC ENERGY, Frequency=Hourly
************* Key=*, VarName=ZONE VENTILATION FAN ELECTRIC ENERGY, Frequency=Hourly
************* Key=*, VarName=ZONE VENTILATION TOTAL HEAT LOSS ENERGY, Frequency=Hourly
************* Key=*, VarName=ZONE VENTILATION TOTAL HEAT GAIN ENERGY, Frequency=Hourly
************* There are 1 unused schedules in input.
************* There are 1 unused week schedules in input.
************* There are 3 unused day schedules in input.
************* Use Output:Diagnostics,DisplayUnusedSchedules; to see them.
************* EnergyPlus Warmup Error Summary. During Warmup: 0 Warning; 0 Severe Errors.
************* EnergyPlus Sizing Error Summary. During Sizing: 1 Warning; 49 Severe Errors.
************* EnergyPlus Completed Successfully-- 4 Warning; 49 Severe Errors; Elapsed Time=00hr 00min 4.59sec
Thanks Abraham.I really appreciate it.
Another thing ' I posted a discussion few days ago and got no replies.And this forum is the only 'Hope' for me..Can you quickly check it?thanks.
N
http://www.grasshopper3d.com/group/ladybug/forum/topics/free-form-external-wall-with-glazing-workflow?xg_source=activity
…
mers considering extreme sports reject mainstream retailers and like to check out small stores rather of at chains plus malls. Several smaller retailers discuss trends in sports shoe sales. http://skateszone.com/
Though athletic shoes and sports stores and from doorways retailers have reported somewhat uptick in footwear sales due to the increase in extreme sports, the particular beneficiaries inside the trend are independent surf and skate niche stores.
Some West Coast surf and skate shops stated teenagers and even more youthful Generation Xers are not only rejecting traditional sports, but they're also shunning mainstream retailers and malls meant for smaller niche shops transporting hard-to-come-by brands.
Eddie Miyoshi, district manager at Atomic Garage, a 3-store chain situated in Gardena, Calif., stated the soaring recognition of skateboard footwear has boosted the retailer's total footwear business 20-thirty percent this year, rather of '95.
Skate footwear presently represent 80-90 % of Atomic Garage's shoe sales, while couple of years back, Dr. Martens and Timberland drove the retailer's footwear business.
Like many retailers, Miyoshi pointed to Airwalk since the trend's catalyst.
However, if Airwalk broadened its distribution to larger chains, which are frequently located in malls, only a few skate shoe customers adopted. Rather, many youthful males have switched for your skate shops for additional elusive brands like Etnies, Duffs, and Electricity Footwear by Circus. By refusing to market bigger retailers or sports stores, these brands are increasing their cachet among youthful consumers.
"Kids don't want stuff which have been within the shops,In . Miyoshi added.
Searching ahead, Miyoshi forecasted skate shoe sales will remain strong through spring '97 provided "the [hot] vendors don't auction other [non-particularly shop] retailers."
"Skaters and non-skaters are rebelling against mainstream retailers so on to surf and skate shops for many looks," echoed Mark Richards, co-online sources Val Surf, a 3-store chain situated in North Hollywood, Calif. Soaring sales of skate footwear have driven total footwear receipts up 25 percent this year rather of '95.
"The quantity of that increase might be connected while using exposure of maximum games? I am unsure. [Skate footwear] may also be actually the think about the moment,In . Richards acknowledged. And in relation to getting this right look, youthful customers can be very picky.
"Skateboard footwear is a huge category for people, but we're not able to own the brands, Etnies, Duffs, Electricity and Nice, simply because they won't sell us," stated Mark Anderson, buyer at Chick's Sports, a six-store chain in Covina, Calif. "We have people coming every single day requesting them." Consequently, skate footwear have consistently ongoing to obtain about 5 % of Chick's overall footwear business. http://skateszone.com/the-top-8-best-skateboards-for-beginners-reviews-2017/
Nonetheless, some outdoors, niche sports and sports retailers are noting the growing recognition and coverage of maximum sports will receive a modest impact on footwear sales. Trailrunning footwear and approach/outdoors crosstrainers will be the two groups benefiting the very best inside the recognition. Like the skate shoe business, some retailers realize that styling instead of function frequently drives sales of individuals footwear.
"At this time the merchandise is a lot more visual than function," stated Chet James, gm of Super Jock 'N Jill, Dallas, speaking about trailrunning footwear. Still, James noted the current hype over adventure sports helps draw more customer traffic. "The marketing campaigns and media help bring growing figures of people in, nonetheless they frequently occasions day an issue that increases results on their own account,Inch he conceded.
John Wilkinson, executive vp inside the 85-store chain Track 'N Trail, Eldorado Hillsides, Calif., stated the shop has "seen some activity in approach footwear," but he requested the amount of consumers depend in it commercially sport. And, instead of accelerating total footwear business, Wilkinson speculated elevated sales of approach footwear and trailrunners are gnawing away at traditional hiking shoe and boot volume.
But Dan Bazinet, president of Overland Exchanging, a 34-store chain situated in Westford, Mass., believes the company-new looks have breathed existence for the wilting hiking boot category. "[Approach-type footwear] don't represent the lion's participate the hiking market, nonetheless they have elevated the hiking business and provided us extra sales," Bazinet stated.
He designated Timberland's Treeline Series and Rockport's Leadville line as strong performers. Unsurprisingly, he noted the company-new looks are attractive to youthful consumer base than traditional hikers.
For that month of June, sales of men's hikers were up 49 percent at Overland, rather of June '95, while sales of women's hikers were up 17 % for that month. Bazinet also attributed elevated sales that shops walked inside the hiking business, departing that business for that specialists.
Some retailers draw a good example concerning the hiking boom of two yrs ago combined with the current extreme sport phenomenon. "Plenty of bigger chains will get a specific percent in the industry while [extreme] sports remain a fad because they are selling cost-point type gear," described Steven Carre, assistant hard goods buyer at Adventure 16, a six-store chain situated in Hillcrest.
"However individuals [true enthusiasts] will say `we need real gear' and may shown up at us. That will help us after a while. What Size Skateboard good for an 3 4 5 6 7 8 9 10 11 12 13 14 year old
…
giornata inaugurale sarà dedicata alla free-lecture introduttiva finalizzata alla realizzazione di un modello d'architettura complesso attraverso l'utilizzo di comandi e tecniche avanzate di rappresentazione con Grasshopper (plug-in parametrica di Rhinoceros) e 3dsMax. Sarà illustrato inoltre il potenziale di V-ray per 3dsMax realizzando un rendering concettuale. Durante il mini-corso dell' openDAY verranno mostrate le caratteristiche e le potenzialità degli strumenti per far luce sui nuovi valori assunti dalla modellazione 3D. La modellazione 3D sta interessando un pubblico sempre più vasto inserendosi in una nuova fase di ampia disponibilità per conoscenze, software, hardware di prototipazione e modelli. Pur mantenendo tutti i suoi valori già noti la questione si è talmente ampliata fino ad interessare norme giuridiche (diritti sui modelli ,concorrenza con offerte di servizi apparentemente simili, informazioni deformate e onfusione nei media) Makers University[http://www.makersuniversity.com], in collaborazione con parametricart, vi propone un punto di vista ampio e sintetico su queste tematiche.
Al termine della free-lecture, sarà illustrata l'offerta formativa [CLICCA QUI] di parametricart riferita ai corsi che si terranno nei mesi di Gennaio e Febbraio 2013 inseriti all'interno della più ampia programmazione della Makers University. SONO PREVISTE TARIFFE PROMOZIONALI PER COLORO CHE SI ISCRIVERANNO AI CORSI durante l'OpenDAY.
La lezione e la presentazione si terranno nel nuovo spazio co-working il PEDONE.
PROGRAMMAZIONE
- I temi della Makers University [Leo Sorge];
- Modellazione della parametricTower (concept di architettura complessa) utilizzando Grasshopper, applicativo per la modellazione parametrica [VIDEO] [Michele Calvano];
- Modellazione di una copertura reticolare 3D a completamento della parametricTower con 3dsMax utilizzando tecniche di modellazione mesh complesse [Wissam Wahbeh];
- Rendering con V-ray per 3dsMax illustrando la nuova interfaccia nodale [Wissam Wahbeh].
- Question Time per chiarimenti sugli argomenti illustrati.
COME
L'openDAY sarà aperto a tutti gli interessati,completamente gratuito e sarà replicato in tre sessioni di uguali contenuti organizzate nei seguenti orari:
Sessione [1] 11,30 - 13,30
Sessione [2] 15,30 - 17,30
Sessione [3] 17,30 - 19,30
Per necessità di organizzazione è importante la prenotazione all'evento utilizzando il form in fondo alla pagina specificando nella stringa apposita, il nome dell'evento e la sessione (es. open day sessione 1) oltre agli altri dati richiesti.…
nts for Ladybug too. They are based on PVWatts v1 online calculator, supporting crystalline silicon fixed tilt photovoltaics.
You can download them from here, or use the Update Ladbybug component instead. If you take the first option, after downloading check if .ghuser files are blocked (right click -> "Properties" and select "Unblock").
You can download the example files from here.
Video tutorials will follow in the coming period.
In the very essence these components help you answer the question: "How much energy can my roof, building facade, solar parking... generate if I would populate them with PV panels"?
They allow definition of different types of losses (snow, age, shading...) which may affect your PV system:
And can find its optimal tilt and orientation:
Or analyse its performance, energy value, consumption, emissions...
By Djordje Spasic and Jason Sensibaugh, with invaluable support of Dr. Frank Vignola, Dr. Jason M. Keith, Paul Gilman, Chris Mackey, Mostapha Sadeghipour Roudsari, Niraj Palsule, Joseph Cunningham and Christopher Weiss.
Thank you for reading, and hope you will enjoy using the components!
EDIT: From march 27 2017, Ladybug Photovoltaics components support thin-film modules as well.
References:
1) System losses:
PVWatts v5 Manual, Dobos, NREL, 2014
2) Sun postion equations by Michalsky (1988):
SAM Photovoltaic Model Technical Reference, Gilman, NREL, 2014
edited by Jason Sensibaugh
3) Angle of incidence for fixed arrays:
PVWatts Version 1 Technical Reference, Dobos, NREL, 2013
4) Plane-of-Array diffuse irradiance by Perez 1990 algorithm:
PVPMC Sandia National Laboratories
SAM Photovoltaic Model Technical Reference, Gilman, NREL, 2014
5) Sandia PV Array Performance Module Cover:
PVWatts Version 1 Technical Reference, Dobos, NREL, 2013
6) Sandia Thermal Model, Module Temperature and Cell Temperature Models:
Photovoltaic Array Performance Model, King, Boys, Kratochvill, Sandia National Laboratories, 2004
7) CEC Module Model: Maximum power voltage and Maximum power current from:
Exact analytical solutions of the parameters of real solar cells using Lambert W-function, Jain, Kapoor, Solar Energy Materials and Solar Cells, V81 2004, P269–277
8) PVFORM version 3.3 adapted Module and Inverter Models:
PVWatts Version 1 Technical Reference, Dobos, NREL, 2013
9) Sunpath diagram shading:
Using sun path charts to estimate the effects of shading on PV arrays, Frank Vignola, University of Oregon, 2004
Instruction manual for the Solar Pathfinder, Solar Pathfinder TM, 2008
10) Tilt and orientation factor:
Application for Purchased Systems Oregon Department of Energy
solmetric.com
11) Photovoltaics performance metrics:
Solar PV system performance assessment guideline, Honda, Lechner, Raju, Tolich, Mokri, San Jose state university, 2012
CACHE Modules on Energy in the Curriculum Solar Energy, Keith, Palsule, Mississippi State University
Inventory of Carbon & Energy (ICE) Version 2.0, Hammond, Jones, SERT University of Bath, 2011
The Energy Return on Energy Investment (EROI) of Photovoltaics: Methodology and Comparisons with Fossil Fuel Life Cycles, Raugei, Fullana-i-Palmer, Fthenakis, Elsevier Vol 45, Jun 2012
12) Calculating albedo: Metenorm 6 Handbook part II: Theory, Meteotest 2007
13) Magnetic declination:
Geomag 0.9.2015, Christopher Weiss…
.
Things have been working swimmingly in many areas of the plugin, but one particular problem has been tough to solve. I have two components that are trying to read/write to the same memory at the same time, causing Rhino exceptions and crashes.
The conflicts appear to be happening between two components -- one is a "Layer Events Listener" that reports essentially what type of layer event just happened. The other is a "Set Layer Visibility" component that toggles the visibility of a list of layers.
The code:
public class LayerTools_LayerEventsListener : GH_Component { /// <summary> /// Initializes a new instance of the LayerTools_LayerListener class. /// </summary> public LayerTools_LayerEventsListener() : base("Layer Events Listener", "Layer Listener", "Get granular information about the layer events happening in the Rhino document.", "Squirrel", "Layer Tools") { }
/// <summary> /// Registers all the input parameters for this component. /// </summary> protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager) { pManager.AddBooleanParameter("Active", "A", "Set to true to listen to layer events in the Rhino document.", GH_ParamAccess.item, false); pManager.AddTextParameter("Exclusions", "E", "Provide a list of exclusions to stop reading specific events (Added, Deleted, Moved, Renamed, Locked, Visibility, Color, Active).", GH_ParamAccess.list); pManager[1].Optional = true; }
/// <summary> /// Registers all the output parameters for this component. /// </summary> protected override void RegisterOutputParams(GH_Component.GH_OutputParamManager pManager) { pManager.AddBooleanParameter("Initialized", "I", "Whether the listener changed from passive to active.", GH_ParamAccess.item); pManager.AddTextParameter("Document Name", "doc", "Name of the Rhino document that is changing.", GH_ParamAccess.item); pManager.AddTextParameter("Layer Path", "path", "Path of the modifed layer.", GH_ParamAccess.item); pManager.AddIntegerParameter("Layer Index", "ID", "Index of the modified layer.", GH_ParamAccess.item); pManager.AddIntegerParameter("Sort Index", "SID", "Sort index of the modified layer.", GH_ParamAccess.item); pManager.AddTextParameter("Event Type", "T", "Type of the modification.", GH_ParamAccess.item); pManager.AddBooleanParameter("Added", "A", "If the layer has been added.", GH_ParamAccess.item); pManager.AddBooleanParameter("Deleted", "D", "If the layer has been deleted.", GH_ParamAccess.item); pManager.AddBooleanParameter("Moved", "M", "If the layer has been moved.", GH_ParamAccess.item); pManager.AddBooleanParameter("Renamed", "R", "If the layer has been renamed.", GH_ParamAccess.item); pManager.AddBooleanParameter("Locked", "L", "If the layer locked setting has changed.", GH_ParamAccess.item); pManager.AddBooleanParameter("Visibility", "V", "If the layer's visibility has changed.", GH_ParamAccess.item); pManager.AddBooleanParameter("Color", "C", "If the layer's color has changed.", GH_ParamAccess.item); pManager.AddBooleanParameter("Active", "Act", "If the active layer has changed.", GH_ParamAccess.item); }
/// <summary> /// This is the method that actually does the work. /// </summary> /// <param name="DA">The DA object is used to retrieve from inputs and store in outputs.</param> protected override void SolveInstance(IGH_DataAccess DA) { bool active = false; List<string> exclusions = new List<string>();
DA.GetData(0, ref active); DA.GetDataList(1, exclusions);
RhinoDoc thisDoc = null;
bool initialize = false;
string dName = null; string activePath = null; int layerIndex = -1; int sortIndex = -1; string eventType = null; bool added = false; bool deleted = false; bool moved = false; bool renamed = false; bool locked = false; bool visibility = false; bool color = false; bool current = false;
if (active) { thisDoc = RhinoDoc.ActiveDoc;
initialize = (!previouslyActive) ? true : false;
RhinoDoc.LayerTableEvent -= RhinoDoc_LayerTableEvent; RhinoDoc.LayerTableEvent += RhinoDoc_LayerTableEvent; previouslyActive = true;
} else {
RhinoDoc.LayerTableEvent -= RhinoDoc_LayerTableEvent; previouslyActive = false; }
if (ev != null) { dName = ev.Document.Name; layerIndex = ev.LayerIndex; eventType = ev.EventType.ToString();
if (!exclusions.Contains("Active")) { if (ev.EventType.ToString() == "Current") { // active layer has just been changed current = true; }
}
if (!exclusions.Contains("Moved")) { if (ev.EventType.ToString() == "Sorted") { // active layer has just been changed moved = true; }
}
if (!exclusions.Contains("Added")) { if (ev.EventType.ToString() == "Added") { // layer has just been added activePath = ev.NewState.FullPath; added = true; }
}
if (!exclusions.Contains("Active")) { if (ev.EventType.ToString() == "Deleted") { // layer has just been added
deleted = true; } }
if (ev.EventType.ToString() == "Modified") { // layer has been modified activePath = ev.NewState.FullPath;
//skip sortindex eventType = ev.EventType.ToString();
if (ev.OldState != null && ev.NewState != null) { if (!exclusions.Contains("Locked")) { if (ev.OldState.IsLocked != ev.NewState.IsLocked) locked = true;
} if (!exclusions.Contains("Visibility")) { if (ev.OldState.IsVisible != ev.NewState.IsVisible) visibility = true; }
if (!exclusions.Contains("Moved")) { if (ev.OldState.ParentLayerId != ev.NewState.ParentLayerId) moved = true; }
//if (ev.OldState.SortIndex != ev.NewState.SortIndex) moved = true; if (!exclusions.Contains("Renamed")) { if (ev.OldState.Name != ev.NewState.Name) renamed = true; }
if (!exclusions.Contains("Color")) { if (ev.OldState.Color != ev.NewState.Color) color = true; } }
} }
DA.SetData(0, initialize); DA.SetData(1, dName); DA.SetData(2, activePath); DA.SetData(3, layerIndex); DA.SetData(4, sortIndex); DA.SetData(5, eventType); DA.SetData(6, added); DA.SetData(7, deleted); DA.SetData(8, moved); DA.SetData(9, renamed); DA.SetData(10, locked); DA.SetData(11, visibility); DA.SetData(12, color); DA.SetData(13, current);
}
static bool previouslyActive = false; Rhino.DocObjects.Tables.LayerTableEventArgs ev = null;
void RhinoDoc_LayerTableEvent(object sender, Rhino.DocObjects.Tables.LayerTableEventArgs e) { ev = e;this.ExpireSolution(true); }
And for the layer visibility component:
public LayerTools_SetActiveLayer() : base("Set Active Layer", "SetActiveLayer", "Set the active layer in the Rhino document.", "Squirrel", "Layer Tools") { }
/// <summary> /// Registers all the input parameters for this component. /// </summary> protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager) { pManager.AddBooleanParameter("Active", "A", "Set to true to change the active layer in Rhino.", GH_ParamAccess.item, false); pManager.AddTextParameter("Path", "P", "Full path of the layer to be activated.", GH_ParamAccess.item); }
/// <summary> /// Registers all the output parameters for this component. /// </summary> protected override void RegisterOutputParams(GH_Component.GH_OutputParamManager pManager) { pManager.AddIntegerParameter("Layer ID", "ID", "Index of layer that has been activated.", GH_ParamAccess.item); pManager.AddBooleanParameter("Status", "St", "True when the layer has been activated.", GH_ParamAccess.item); }
/// <summary> /// This is the method that actually does the work. /// </summary> /// <param name="DA">The DA object is used to retrieve from inputs and store in outputs.</param> protected override void SolveInstance(IGH_DataAccess DA) { bool active = false; string path = "";
if (!DA.GetData(0, ref active)) return; if (!DA.GetData(1, ref path)) return;
int layer_index = -1; bool status = false;
if (path != null) {
Rhino.RhinoDoc doc = Rhino.RhinoDoc.ActiveDoc; Rhino.DocObjects.Tables.LayerTable layertable = doc.Layers;
layer_index = layertable.FindByFullPath(path, true);
if (layer_index > 0) { // if exists RhinoDoc.ActiveDoc.Layers.SetCurrentLayerIndex(layer_index, true); status = true; } }
DA.SetData(0, layer_index); DA.SetData(1, status); }
Now originally I was getting exceptions when changing multiple layers' visibility properties, which would cause the Event Listener to fire and try to read the Visibility property before the memory has been released by the Set Layer Visibility component. That led me to add an "Exceptions" input, that would allow me to disable the reading of Visibility events at the source in the Layer Events listener. That helped me manage about 95% of the crashes I was getting, but I still get strange crashes in other event properties, even when that property shouldn't be affected. For instance, I am getting a crash here on the Name property in the event from the delegate function, even though I am only changing Visibility at any one time:
I have a few ideas but they all seem pretty hacky. One is to try to set a flag that is readable by any component in the plugin -- so that the event listener can see if a "set" component is currently running and abort before causing an exception. The other is creating a delay in the event listener, somthing like 200ms, to allow any set components to finish what they are doing before reading the event. Neither seems super ideal.
Any ideas?
Thanks,
Marc
…