Skip to content
This repository has been archived by the owner on Jun 8, 2024. It is now read-only.

Commit

Permalink
Add nuget docs, add beam and rebar group inheritdoc (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
molostovvs authored Nov 30, 2023
1 parent 4fd458e commit b36eb47
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 1 deletion.
14 changes: 14 additions & 0 deletions src/Fluent.Structures.Model/Beam.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,71 +79,82 @@ public static ICompletedBeam Default()
return new BuildBeam(defBeam);
}

/// <inheritdoc />
public IBeamWithStartAndEndPoints StartAndEndPoint(TSG.Point startPoint, TSG.Point endPoint)
{
_beam.StartPoint = startPoint;
_beam.EndPoint = endPoint;
return this;
}

/// <inheritdoc />
public IBeamWithStartPoint StartPoint(TSG.Point startPoint)
{
_beam.StartPoint = startPoint;
return this;
}

/// <inheritdoc />
public IBeamWithProfile Profile(string profile)
{
_beam.Profile = profile;
return this;
}

/// <inheritdoc />
public ICompletedBeam Material(string material)
{
_beam.Material = material;
return this;
}

/// <inheritdoc />
public ICompletedBeam Name(string name)
{
_beam.Name = name;
return this;
}

/// <inheritdoc />
public ICompletedBeam Class(string @class)
{
_beam.Class = @class;
return this;
}

/// <inheritdoc />
public ICompletedBeam AssemblyNumbering(string assemblyPrefix, int assemblyStartNumber)
{
_beam.AssemblyPrefix = assemblyPrefix;
_beam.AssemblyStartNumber = assemblyStartNumber;
return this;
}

/// <inheritdoc />
public ICompletedBeam PartNumbering(string partPrefix, int partStartNumber)
{
_beam.PartPrefix = partPrefix;
_beam.PartStartNumber = partStartNumber;
return this;
}

/// <inheritdoc />
public ICompletedBeam PlanePosition(TSM.Position.PlaneEnum planeEnum, double planeOffset)
{
_beam.PlanePosition = planeEnum;
_beam.PlaneOffset = planeOffset;
return this;
}

/// <inheritdoc />
public ICompletedBeam DepthPosition(TSM.Position.DepthEnum depthEnum, double depthOffset)
{
_beam.DepthPosition = depthEnum;
_beam.DepthOffset = depthOffset;
return this;
}

/// <inheritdoc />
public ICompletedBeam RotationPosition(TSM.Position.RotationEnum rotationEnum,
double rotationOffset)
{
Expand All @@ -152,15 +163,18 @@ public ICompletedBeam RotationPosition(TSM.Position.RotationEnum rotationEnum,
return this;
}

/// <inheritdoc />
public ICompletedBeam CastUnitType(TSM.Part.CastUnitTypeEnum castUnitTypeEnum)
{
_beam.CastUnitTypeEnum = castUnitTypeEnum;
return this;
}

/// <inheritdoc />
public Beam Build()
=> _beam;

/// <inheritdoc />
public IBeamWithStartAndEndPoints EndPoint(TSG.Point endPoint)
{
_beam.EndPoint = endPoint;
Expand Down
3 changes: 2 additions & 1 deletion src/Fluent.Structures.Model/Fluent.Structures.Model.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@
<Nullable>enable</Nullable>
<LangVersion>latestmajor</LangVersion>
<PackageId>Fluent.Structures.Model</PackageId>
<Version>0.2.1</Version>
<Version>0.2.2</Version>
<Authors>ConcreteEcho</Authors>
<Product>Fluent.Structures.Model</Product>
<Title>Fluent.Structures.Model</Title>
<PackageTags>Tekla</PackageTags>
<Description>Interact effortlessly with the Tekla API using the Fluent Interface.</Description>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageProjectUrl>https://github.com/ConcreteEcho/FluentStructures</PackageProjectUrl>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
Expand Down
30 changes: 30 additions & 0 deletions src/Fluent.Structures.Model/RebarGroup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,107 +66,126 @@ private BuildRebarGroup(RebarGroup rebarGroup) {}
public static IEmptyRebarGroup With()
=> new BuildRebarGroup();

/// <inheritdoc />
public IRebarGroupWithFather Father(TSM.ModelObject father)
{
_rebarGroup.Father = father;
return this;
}

/// <inheritdoc />
public IRebarGroupWithPolygons Polygons(ArrayList polygons)
{
_rebarGroup.Polygons = polygons;
return this;
}

/// <inheritdoc />
public IRebarGroupWithPolygons Polygons(params TSM.Polygon[] polygons)
{
_rebarGroup.Polygons = new ArrayList(polygons);
return this;
}

/// <inheritdoc />
public IRebarGroupWithPolygons Polygons(params TSG.Point[] points)
{
var polygon = Polygon.BuildPolygon.With().Points(points).Build();
_rebarGroup.Polygons = new ArrayList { polygon.TeklaPolygon };
return this;
}

/// <inheritdoc />
public IRebarGroupWithStartPoint StartPoint(TSG.Point start)
{
_rebarGroup.StartPoint = start;
return this;
}

/// <inheritdoc />
public IRebarGroupWithStartAndEndPoints StartAndEndPoints(TSG.Point start, TSG.Point end)
{
_rebarGroup.StartPoint = start;
_rebarGroup.EndPoint = end;
return this;
}

/// <inheritdoc />
public IRebarGroupWithStartAndEndPoints EndPoint(TSG.Point end)
{
_rebarGroup.EndPoint = end;
return this;
}

/// <inheritdoc />
public IRebarGroupWithGrade Grade(string grade)
{
_rebarGroup.Grade = grade;
return this;
}

/// <inheritdoc />
public IRebarGroupWithSize Size(string size)
{
_rebarGroup.Size = size;
return this;
}

/// <inheritdoc />
public IRebarGroupWithRadiusValues RadiusValues(ArrayList radiusValues)
{
_rebarGroup.RadiusValues = new List<double>(radiusValues.Cast<double>());
return this;
}

/// <inheritdoc />
public IRebarGroupWithRadiusValues RadiusValues(params double[] radiusValues)
{
_rebarGroup.RadiusValues = radiusValues.ToList();
return this;
}

/// <inheritdoc />
public IRebarGroupWithRadiusValues RadiusValues(List<double> radiusValues)
{
_rebarGroup.RadiusValues = radiusValues;
return this;
}

/// <inheritdoc />
public IRebarGroupWithClass Class(int @class)
{
_rebarGroup.Class = @class;
return this;
}

/// <inheritdoc />
public IRebarGroupWithSpacings Spacings(ArrayList spacings)
{
_rebarGroup.Spacings = spacings;
return this;
}

/// <inheritdoc />
public IRebarGroupWithSpacings Spacings(params double[] spacings)
=> Spacings(new ArrayList(spacings));

/// <inheritdoc />
public IRebarGroupWithSpacings Spacings(List<double> spacings)
=> Spacings(new ArrayList(spacings));

/// <inheritdoc />
public IRebarGroupWithStartHook StartHook(TSM.RebarHookData startHook)
{
_rebarGroup.StartHook = startHook;
return this;
}

/// <inheritdoc />
public IRebarGroupWithStartHook StartHook(TSM.RebarHookData.RebarHookShapeEnum shapeEnum)
=> StartHook(new TSM.RebarHookData { Shape = shapeEnum });

/// <inheritdoc />
public ICompletedRebarGroup StartAndEndHooks(TSM.RebarHookData startHook,
TSM.RebarHookData endHook)
{
Expand All @@ -175,6 +194,7 @@ public ICompletedRebarGroup StartAndEndHooks(TSM.RebarHookData startHook,
return this;
}

/// <inheritdoc />
public ICompletedRebarGroup StartAndEndHooks(
TSM.RebarHookData.RebarHookShapeEnum startShapeEnum,
TSM.RebarHookData.RebarHookShapeEnum endShapeEnum)
Expand All @@ -186,58 +206,68 @@ public ICompletedRebarGroup StartAndEndHooks(
return this;
}

/// <inheritdoc />
public ICompletedRebarGroup EndHook(TSM.RebarHookData endHook)
{
_rebarGroup.EndHook = endHook;
return this;
}

/// <inheritdoc />
public ICompletedRebarGroup EndHook(TSM.RebarHookData.RebarHookShapeEnum endShapeEnum)
=> EndHook(new TSM.RebarHookData { Shape = endShapeEnum });

/// <inheritdoc />
public ICompletedRebarGroup Name(string name)
{
_rebarGroup.Name = name;
return this;
}

/// <inheritdoc />
public ICompletedRebarGroup SpacingType(
TSM.BaseRebarGroup.RebarGroupSpacingTypeEnum spacingType)
{
_rebarGroup.SpacingType = spacingType;
return this;
}

/// <inheritdoc />
public ICompletedRebarGroup StartFromPlaneOffset(double startFromPlaneOffset)
{
_rebarGroup.StartFromPlaneOffset = startFromPlaneOffset;
return this;
}

/// <inheritdoc />
public ICompletedRebarGroup EndFromPlaneOffset(double endFromPlaneOffset)
{
_rebarGroup.EndFromPlaneOffset = endFromPlaneOffset;
return this;
}

/// <inheritdoc />
public ICompletedRebarGroup NumberingSeries(string prefix, int startNumber)
{
_rebarGroup.NumberingSeries = new TSM.NumberingSeries(prefix, startNumber);
return this;
}

/// <inheritdoc />
public ICompletedRebarGroup StartPointOffsetValue(double startPointOffsetValue)
{
_rebarGroup.StartPointOffsetValue = startPointOffsetValue;
return this;
}

/// <inheritdoc />
public ICompletedRebarGroup EndPointOffsetValue(double endPointOffsetValue)
{
_rebarGroup.EndPointOffsetValue = endPointOffsetValue;
return this;
}

/// <inheritdoc />
public RebarGroup Build()
=> _rebarGroup;
}
Expand Down

0 comments on commit b36eb47

Please sign in to comment.