Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v2.4.0 #258

Merged
merged 47 commits into from
Jun 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
2c0717c
Update readme
hrntsm Oct 15, 2022
4de18b6
Bump minimatch, recursive-readdir and serve-handler in /website
dependabot[bot] Nov 11, 2022
3dfaf42
Bump loader-utils from 1.4.0 to 1.4.2 in /website
dependabot[bot] Nov 16, 2022
d973f41
Bump json5 from 1.0.1 to 1.0.2 in /website
dependabot[bot] Jan 7, 2023
10140af
Bump ua-parser-js from 0.7.31 to 0.7.33 in /website
dependabot[bot] Jan 27, 2023
373e458
Bump http-cache-semantics from 4.1.0 to 4.1.1 in /website
dependabot[bot] Feb 3, 2023
85b342a
Bump @sideway/formula from 3.0.0 to 3.0.1 in /website
dependabot[bot] Feb 8, 2023
ba86aa5
Bump webpack from 5.70.0 to 5.76.1 in /website
dependabot[bot] Mar 14, 2023
195beb2
Merge pull request #252 from hrntsm/dependabot/npm_and_yarn/website/w…
hrntsm Apr 17, 2023
968feb5
Merge pull request #251 from hrntsm/dependabot/npm_and_yarn/website/s…
hrntsm Apr 17, 2023
5e3ab7b
Merge pull request #250 from hrntsm/dependabot/npm_and_yarn/website/h…
hrntsm Apr 17, 2023
b15a9ee
Merge pull request #249 from hrntsm/dependabot/npm_and_yarn/website/u…
hrntsm Apr 17, 2023
a10c605
Merge pull request #248 from hrntsm/dependabot/npm_and_yarn/website/j…
hrntsm Apr 17, 2023
a5157de
Merge pull request #246 from hrntsm/dependabot/npm_and_yarn/website/l…
hrntsm Apr 17, 2023
a3833d9
Merge pull request #245 from hrntsm/dependabot/npm_and_yarn/website/m…
hrntsm Apr 17, 2023
0331593
Add Brep display in the outer S section of the CFT
hrntsm May 18, 2023
3cea44e
Update CFT sec to support infill concrete to brep
hrntsm May 18, 2023
288126d
Merge pull request #253 from hrntsm/Feature/Support-CFT-section
hrntsm May 18, 2023
7e95f4f
Add Icon display
hrntsm May 18, 2023
6a076dc
Merge pull request #254 from hrntsm/Feature/add-hoaryfox-icon
hrntsm May 18, 2023
7d24e4b
Add Rhino8 launch.jso file
hrntsm May 27, 2023
2ee6f84
Update S2L to support Pile
hrntsm May 27, 2023
a8d1850
Fix apply pile top node offset
hrntsm May 27, 2023
715e81b
Update S2B to support Pile
hrntsm May 27, 2023
843a500
Fix 0 length haunch beam bake error
hrntsm May 27, 2023
000ed9e
Fix even input radius, input in diameter.
hrntsm May 27, 2023
f433894
Add support S2B Footing
hrntsm May 27, 2023
e6f0c39
Fix same d extended pile bake error
hrntsm May 28, 2023
d104e22
Add support stb PC pile to line
hrntsm May 29, 2023
343e25a
Change stb2brep exception to show guid
hrntsm Jun 3, 2023
a4dcc07
Add support PC Pile in S2B
hrntsm Jun 3, 2023
a42996f
Fix to 0 thickness column pc pile error
hrntsm Jun 3, 2023
c28bcdf
Apply formatter
hrntsm Jun 3, 2023
8f1a965
Merge pull request #255 from hrntsm/Feature/pile-and-foundation
hrntsm Jun 5, 2023
be8a8ce
Add support c section
hrntsm Jun 9, 2023
a626838
Clean SteelSections code
hrntsm Jun 9, 2023
fec2ab1
Fix line pile length
hrntsm Jun 9, 2023
aa16585
Support T shape section
hrntsm Jun 9, 2023
2607b4d
Fix error if wall open brep is null
hrntsm Jun 9, 2023
3f32f02
Merge pull request #256 from hrntsm/feature/support-C-section
hrntsm Jun 10, 2023
6a459ed
Add s2b convert logger
hrntsm Jun 10, 2023
9d66b00
Update convert log
hrntsm Jun 11, 2023
480d7a7
Add log output to s2b component
hrntsm Jun 11, 2023
2047b68
Update website
hrntsm Jun 11, 2023
9983999
Update packagejson
hrntsm Jun 11, 2023
4a6bdc0
Merge pull request #257 from hrntsm/feature/support-convert-log
hrntsm Jun 11, 2023
3eae2fb
Update version info
hrntsm Jun 11, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,26 @@
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Launch (console)",
"name": "Run Rhino8 WIP",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "C:/Program Files/Rhino 6/System/Rhino.exe",
"args": [],
"program": "C:/Program Files/Rhino 8 WIP/System/Rhino.exe",
"args": ["/nosplash"],
"cwd": "${workspaceFolder}",
"console": "internalConsole",
"stopAtEntry": true
},
{
"name": ".NET Core Attach",
"name": "Run Rhino7",
"type": "coreclr",
"request": "attach",
"processId": "${command:pickProcess}"
}
"request": "launch",
"preLaunchTask": "build",
"program": "C:/Program Files/Rhino 7/System/Rhino.exe",
"args": ["/nosplash"],
"cwd": "${workspaceFolder}",
"console": "internalConsole",
"stopAtEntry": true
},
]
}
27 changes: 1 addition & 26 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,11 @@
"type": "process",
"args": [
"build",
"${workspaceFolder}/HoaryFox/HoaryFox.csproj",
"${workspaceFolder}/HoaryFox/RH7/HoaryFoxRH7.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "publish",
"command": "dotnet",
"type": "process",
"args": [
"publish",
"${workspaceFolder}/HoaryFox/HoaryFox.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "watch",
"command": "dotnet",
"type": "process",
"args": [
"watch",
"run",
"${workspaceFolder}/HoaryFox/HoaryFox.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
}
]
}
2 changes: 1 addition & 1 deletion HoaryFox/RH6/HoaryFoxRH6.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net48</TargetFramework>
<Version>2.3.0</Version>
<Version>2.4.0</Version>
<Title>HoaryFox</Title>
<Description>This Component read ST-Bridge file(.stb) and display its model data.</Description>
<TargetExt>.gha</TargetExt>
Expand Down
14 changes: 9 additions & 5 deletions HoaryFox/RH6/HoaryFoxRH6Info.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,19 @@ namespace HoaryFox
public class HoaryFoxRH6Info : GH_AssemblyInfo
{
public override string Name => "HoaryFox";

public override Bitmap Icon => HoaryFoxCommon.Properties.Resource.InfoIcon;

public override string Description => "This Component read ST-Bridge file(.stb) and display its model data.";

public override Guid Id => new Guid("093de648-746b-4b0b-85ef-495c6fb4514f");

public override string AuthorName => "hrntsm";

public override string AuthorContact => "contact@hrntsm.com";
}

public class HoaryFoxCategoryIcon : GH_AssemblyPriority
{
public override GH_LoadingInstruction PriorityLoad()
{
Grasshopper.Instances.ComponentServer.AddCategoryIcon("HoaryFox", HoaryFoxCommon.Properties.Resource.InfoIcon);
return GH_LoadingInstruction.Proceed;
}
}
}
26 changes: 18 additions & 8 deletions HoaryFox/RH7/Component/Geometry/Stb2Brep.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;

using Grasshopper.Kernel;
Expand All @@ -22,7 +23,7 @@ namespace HoaryFox.Component.Geometry
public class Stb2Brep : GH_Component
{
private ST_BRIDGE _stBridge;
private readonly GH_Structure<GH_Brep>[] _brepList = new GH_Structure<GH_Brep>[7];
private readonly GH_Structure<GH_Brep>[] _brepList = new GH_Structure<GH_Brep>[9];

public override GH_Exposure Exposure => GH_Exposure.primary;

Expand All @@ -41,13 +42,16 @@ protected override void RegisterInputParams(GH_InputParamManager pManager)

protected override void RegisterOutputParams(GH_OutputParamManager pManager)
{
pManager.AddTextParameter("Log", "Log", "Log", GH_ParamAccess.item);
pManager.AddBrepParameter("Columns", "Col", "output StbColumns to Brep", GH_ParamAccess.tree);
pManager.AddBrepParameter("Girders", "Gird", "output StbGirders to Brep", GH_ParamAccess.tree);
pManager.AddBrepParameter("Posts", "Pst", "output StbPosts to Brep", GH_ParamAccess.tree);
pManager.AddBrepParameter("Beams", "Bm", "output StbBeams to Brep", GH_ParamAccess.tree);
pManager.AddBrepParameter("Braces", "Brc", "output StbBraces to Brep", GH_ParamAccess.tree);
pManager.AddBrepParameter("Slabs", "Slb", "output StbSlabs to Brep", GH_ParamAccess.tree);
pManager.AddBrepParameter("Walls", "Wl", "output StbWalls to Brep", GH_ParamAccess.tree);
pManager.AddBrepParameter("Piles", "Pil", "output StbPiles to Brep", GH_ParamAccess.tree);
pManager.AddBrepParameter("Footings", "Ftg", "output StbFootings to Brep", GH_ParamAccess.tree);
}

protected override void SolveInstance(IGH_DataAccess dataAccess)
Expand All @@ -56,39 +60,45 @@ protected override void SolveInstance(IGH_DataAccess dataAccess)
if (!dataAccess.GetData("Data", ref _stBridge)) { return; }
if (!dataAccess.GetData("Bake", ref isBake)) { return; }

CreateBrep();
var log = CreateBrep();
if (isBake)
{
BakeBrep();
}

for (var i = 0; i < 7; i++)
dataAccess.SetData(0, log);
for (var i = 1; i < 10; i++)
{
dataAccess.SetDataTree(i, _brepList[i]);
dataAccess.SetDataTree(i, _brepList[i - 1]);
}
}

protected override Bitmap Icon => Resource.Brep;
public override Guid ComponentGuid => new Guid("B2D5EA7F-E75F-406B-8D22-C267B43C5E72");

private void CreateBrep()
private string CreateBrep()
{
var path = Path.GetDirectoryName(Grasshopper.Instances.ComponentServer.FindAssemblyByObject(this).Location);
StbMembers member = _stBridge.StbModel.StbMembers;
var brepFromStb = new CreateMemberBrepListFromStb(_stBridge.StbModel.StbSections, _stBridge.StbModel.StbNodes, new[] { DocumentTolerance(), DocumentAngleTolerance() });
var brepFromStb = new CreateMemberBrepListFromStb(_stBridge.StbModel.StbSections, _stBridge.StbModel.StbNodes, new[] { DocumentTolerance(), DocumentAngleTolerance() }, path);
_brepList[0] = brepFromStb.Column(member.StbColumns);
_brepList[1] = brepFromStb.Girder(member.StbGirders);
_brepList[2] = brepFromStb.Post(member.StbPosts);
_brepList[3] = brepFromStb.Beam(member.StbBeams);
_brepList[4] = brepFromStb.Brace(member.StbBraces);
_brepList[5] = brepFromStb.Slab(member.StbSlabs);
_brepList[6] = brepFromStb.Wall(member.StbWalls, member.StbOpens);
_brepList[7] = brepFromStb.Pile(member.StbPiles);
_brepList[8] = brepFromStb.Footing(member.StbFootings);
brepFromStb.SerializeLog();
return brepFromStb.Logger.ToString();
}

private void BakeBrep()
{
RhinoDoc activeDoc = RhinoDoc.ActiveDoc;
var parentLayerNames = new[] { "Column", "Girder", "Post", "Beam", "Brace", "Slab", "Wall" };
Color[] layerColors = { Color.Red, Color.Green, Color.Aquamarine, Color.LightCoral, Color.MediumPurple, Color.DarkGray, Color.CornflowerBlue };
var parentLayerNames = new[] { "Column", "Girder", "Post", "Beam", "Brace", "Slab", "Wall", "Pile", "Footing" };
Color[] layerColors = new[] { Color.Red, Color.Green, Color.Aquamarine, Color.LightCoral, Color.MediumPurple, Color.DarkGray, Color.CornflowerBlue, Color.DarkOrange, Color.DarkKhaki };
GeometryBaker.MakeParentLayers(activeDoc, parentLayerNames, layerColors);

Dictionary<string, string>[][] infoArray = Utils.TagUtils.GetAllSectionInfoArray(_stBridge.StbModel.StbMembers, _stBridge.StbModel.StbSections);
Expand Down
65 changes: 39 additions & 26 deletions HoaryFox/RH7/Component/Geometry/Stb2Line.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class Stb2Line : GH_Component
{
private ST_BRIDGE _stBridge;
private List<Point3d> _nodes = new List<Point3d>();
private readonly GH_Structure<GH_Line>[] _lineList = new GH_Structure<GH_Line>[5];
private readonly GH_Structure<GH_Line>[] _lineList = new GH_Structure<GH_Line>[8];

public override GH_Exposure Exposure => GH_Exposure.primary;

Expand All @@ -37,6 +37,7 @@ public Stb2Line()
protected override void RegisterInputParams(GH_InputParamManager pManager)
{
pManager.AddGenericParameter("Data", "D", "input ST-Bridge Data", GH_ParamAccess.item);
pManager.AddBooleanParameter("OffsetNode", "OfNd", "If it true, offset geometry.", GH_ParamAccess.item, false);
pManager.AddBooleanParameter("Bake", "Bake", "If it true, bake geometry.", GH_ParamAccess.item, false);
}

Expand All @@ -48,15 +49,18 @@ protected override void RegisterOutputParams(GH_OutputParamManager pManager)
pManager.AddLineParameter("Posts", "Pst", "output StbPosts to Line", GH_ParamAccess.tree);
pManager.AddLineParameter("Beams", "Beam", "output StbBeams to Line", GH_ParamAccess.tree);
pManager.AddLineParameter("Braces", "Brc", "output StbBraces to Line", GH_ParamAccess.tree);
pManager.AddLineParameter("Piles", "Pil", "output StbPiles to Line", GH_ParamAccess.tree);
}

protected override void SolveInstance(IGH_DataAccess dataAccess)
{
var isBake = false;
var isOffset = false;
if (!dataAccess.GetData("Data", ref _stBridge)) { return; }
if (!dataAccess.GetData("OffsetNode", ref isOffset)) { return; }
if (!dataAccess.GetData("Bake", ref isBake)) { return; }

CreateLine();
CreateLine(isOffset);
if (isBake)
{
BakeLine();
Expand All @@ -65,66 +69,75 @@ protected override void SolveInstance(IGH_DataAccess dataAccess)
dataAccess.SetDataList(0, _nodes);
foreach ((GH_Structure<GH_Line> geometry, int i) in _lineList.Select((geo, index) => (geo, index + 1)))
{
dataAccess.SetDataTree(i, geometry);
if (i == 8)
{
dataAccess.SetDataTree(6, geometry);
}
else if (i == 6 || i == 7)
{
continue;
}
else
{
dataAccess.SetDataTree(i, geometry);
}
}
}

private void BakeLine()
{
RhinoDoc activeDoc = RhinoDoc.ActiveDoc;
var parentLayerNames = new[] { "Column", "Girder", "Post", "Beam", "Brace", "Slab", "Wall" };
Color[] layerColors = { Color.Red, Color.Green, Color.Aquamarine, Color.LightCoral, Color.MediumPurple, Color.DarkGray, Color.CornflowerBlue };
var parentLayerNames = new[] { "Column", "Girder", "Post", "Beam", "Brace", "Slab", "Wall", "Pile" };
Color[] layerColors = { Color.Red, Color.Green, Color.Aquamarine, Color.LightCoral, Color.MediumPurple, Color.DarkGray, Color.CornflowerBlue, Color.DarkOrange };
GeometryBaker.MakeParentLayers(activeDoc, parentLayerNames, layerColors);

Dictionary<string, string>[][] infoArray = Utils.TagUtils.GetAllSectionInfoArray(_stBridge.StbModel.StbMembers, _stBridge.StbModel.StbSections);

foreach ((GH_Structure<GH_Line> lines, int i) in _lineList.Select((frameBrep, index) => (frameBrep, index)))
{
if (lines == null)
{
continue;
}
Layer parentLayer = activeDoc.Layers.FindName(parentLayerNames[i]);
int parentIndex = parentLayer.Index;
Guid parentId = parentLayer.Id;
foreach ((Line line, int bIndex) in lines.Select((geometry, bIndex) => (geometry.Value, bIndex)))
{
var objAttr = new ObjectAttributes();

if (i < 5)
Dictionary<string, string>[] infos = infoArray[i];
Dictionary<string, string> info = infos[bIndex];

foreach (KeyValuePair<string, string> pair in info)
{
Dictionary<string, string>[] infos = infoArray[i];
Dictionary<string, string> info = infos[bIndex];

foreach (KeyValuePair<string, string> pair in info)
{
objAttr.SetUserString(pair.Key, pair.Value);
}

var layer = new Layer { Name = info["name"], ParentLayerId = parentId, Color = layerColors[i] };
int layerIndex = activeDoc.Layers.Add(layer);
if (layerIndex == -1)
{
layer = activeDoc.Layers.FindName(info["name"]);
layerIndex = layer.Index;
}
objAttr.LayerIndex = layerIndex;
objAttr.SetUserString(pair.Key, pair.Value);
}
else

var layer = new Layer { Name = info["name"], ParentLayerId = parentId, Color = layerColors[i] };
int layerIndex = activeDoc.Layers.Add(layer);
if (layerIndex == -1)
{
objAttr.LayerIndex = parentIndex;
layer = activeDoc.Layers.FindName(info["name"]);
layerIndex = layer.Index;
}
objAttr.LayerIndex = layerIndex;

activeDoc.Objects.AddLine(line, objAttr);
}
}
}

private void CreateLine()
private void CreateLine(bool isOffset)
{
var createLines = new CreateLineFromStb(_stBridge);
var createLines = new CreateLineFromStb(_stBridge, isOffset);
_nodes = createLines.Nodes();
_lineList[0] = createLines.Columns();
_lineList[1] = createLines.Girders();
_lineList[2] = createLines.Posts();
_lineList[3] = createLines.Beams();
_lineList[4] = createLines.Braces();
_lineList[7] = createLines.Piles();
}

protected override Bitmap Icon => Resource.Line;
Expand Down
Loading