Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion Analytical_Engine/Query/ExternalPolycurve.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@
/**** Public Methods ****/
/***************************************************/

[Description("Gets the polycurve that defines the outline of the panel and checks for a single continuous linear curve")]

Check warning on line 44 in Analytical_Engine/Query/ExternalPolycurve.cs

View check run for this annotation

BHoMBot-CI / documentation-compliance

Analytical_Engine/Query/ExternalPolycurve.cs#L44

Documentation attribute should end with grammatically correct punctuation (., !, or ?) - For more information see https://bhom.xyz/documentation/DevOps/Code%20Compliance%20and%20CI/Compliance%20Checks/AttributeHasEndingPunctuation
[Input("panel", "The IPanel to get the polycurve from")]

Check warning on line 45 in Analytical_Engine/Query/ExternalPolycurve.cs

View check run for this annotation

BHoMBot-CI / documentation-compliance

Analytical_Engine/Query/ExternalPolycurve.cs#L45

Documentation attribute should end with grammatically correct punctuation (., !, or ?) - For more information see https://bhom.xyz/documentation/DevOps/Code%20Compliance%20and%20CI/Compliance%20Checks/AttributeHasEndingPunctuation
[Output("polycurve", "The polycurve defining the outline of the panel")]

Check warning on line 46 in Analytical_Engine/Query/ExternalPolycurve.cs

View check run for this annotation

BHoMBot-CI / documentation-compliance

Analytical_Engine/Query/ExternalPolycurve.cs#L46

Documentation attribute should end with grammatically correct punctuation (., !, or ?) - For more information see https://bhom.xyz/documentation/DevOps/Code%20Compliance%20and%20CI/Compliance%20Checks/AttributeHasEndingPunctuation
public static PolyCurve ExternalPolyCurve<TEdge, TOpening>(this IPanel<TEdge, TOpening> panel)
public static PolyCurve ExternalPolycurve<TEdge, TOpening>(this IPanel<TEdge, TOpening> panel)
where TEdge : IEdge
where TOpening : IOpening<TEdge>
{
Expand Down
2 changes: 1 addition & 1 deletion Analytical_Engine/Query/IsAligned.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@
[Description("Checks if the Panel is planar and is aligned to the Plane provided.")]
[Input("panel", "The IPanel to check if it is aligned to the Plane provided.")]
[Input("plane", "The Plane that the IPanel alignment is checked against.")]
[Input("tolerance", "Angle tolerance between the IPanel and the Plane provided", typeof(Angle))]

Check warning on line 45 in Analytical_Engine/Query/IsAligned.cs

View check run for this annotation

BHoMBot-CI / documentation-compliance

Analytical_Engine/Query/IsAligned.cs#L45

Documentation attribute should end with grammatically correct punctuation (., !, or ?) - For more information see https://bhom.xyz/documentation/DevOps/Code%20Compliance%20and%20CI/Compliance%20Checks/AttributeHasEndingPunctuation
[Output("bool", "True if the IPanel is aligned withe the Plane provided")]

Check warning on line 46 in Analytical_Engine/Query/IsAligned.cs

View check run for this annotation

BHoMBot-CI / documentation-compliance

Analytical_Engine/Query/IsAligned.cs#L46

Documentation attribute should end with grammatically correct punctuation (., !, or ?) - For more information see https://bhom.xyz/documentation/DevOps/Code%20Compliance%20and%20CI/Compliance%20Checks/AttributeHasEndingPunctuation
public static bool IsAligned<TEdge, TOpening>(this IPanel<TEdge, TOpening> panel, Plane plane, double tolerance = Tolerance.Angle)
where TEdge : IEdge
where TOpening : IOpening<TEdge>
{
PolyCurve polycurve = ExternalPolyCurve(panel);
PolyCurve polycurve = ExternalPolycurve(panel);

if (!polycurve.IsPlanar())
return false;
Expand Down
2 changes: 1 addition & 1 deletion Analytical_Engine/Query/IsOutlineQuad.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public static bool IsOutlineQuad<TEdge, TOpening>(this IPanel<TEdge, TOpening> p
where TEdge : IEdge
where TOpening : IOpening<TEdge>
{
PolyCurve polycurve = ExternalPolyCurve(panel);
PolyCurve polycurve = ExternalPolycurve(panel);
if (polycurve == null)
return false;

Expand Down
2 changes: 1 addition & 1 deletion Analytical_Engine/Query/IsOutlineRectangular.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public static bool IsOutlineRectangular<TEdge, TOpening>(this IPanel<TEdge, TOpe
where TEdge : IEdge
where TOpening : IOpening<TEdge>
{
PolyCurve polycurve = ExternalPolyCurve(panel);
PolyCurve polycurve = ExternalPolycurve(panel);

return polycurve.IsRectangular();
}
Expand Down
2 changes: 1 addition & 1 deletion Analytical_Engine/Query/IsOutlineSquare.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public static bool IsOutlineSquare<TEdge, TOpening>(this IPanel<TEdge, TOpening>
where TEdge : IEdge
where TOpening : IOpening<TEdge>
{
PolyCurve polycurve = ExternalPolyCurve(panel);
PolyCurve polycurve = ExternalPolycurve(panel);

return polycurve.IsSquare();
}
Expand Down
2 changes: 1 addition & 1 deletion Analytical_Engine/Query/IsOutlineTriangular.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public static bool IsOutlineTriangular<TEdge, TOpening>(this IPanel<TEdge, TOpen
where TEdge : IEdge
where TOpening : IOpening<TEdge>
{
PolyCurve polycurve = ExternalPolyCurve(panel);
PolyCurve polycurve = ExternalPolycurve(panel);

return polycurve.IsTriangular();

Expand Down
2 changes: 1 addition & 1 deletion Analytical_Engine/Query/IsVertical.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@

[Description("Checks if the IPanel is aligned with any vertical plane.")]
[Input("panel", "The IPanel to check if it is aligned to any vertical plane.")]
[Input("tolerance", "Angle tolerance between the IPanel and any vertical plane", typeof(Angle))]

Check warning on line 44 in Analytical_Engine/Query/IsVertical.cs

View check run for this annotation

BHoMBot-CI / documentation-compliance

Analytical_Engine/Query/IsVertical.cs#L44

Documentation attribute should end with grammatically correct punctuation (., !, or ?) - For more information see https://bhom.xyz/documentation/DevOps/Code%20Compliance%20and%20CI/Compliance%20Checks/AttributeHasEndingPunctuation
[Output("bool", "True if the IPanel is aligned with any vertical plane.")]
public static bool IsVertical<TEdge, TOpening>(this IPanel<TEdge, TOpening> panel, double tolerance = Tolerance.Angle)
where TEdge : IEdge
where TOpening : IOpening<TEdge>
{
PolyCurve polycurve = ExternalPolyCurve(panel);
PolyCurve polycurve = ExternalPolycurve(panel);
if (!polycurve.IsPlanar())
return false;
Vector polycurveNormal = polycurve.Normal();
Expand Down
6 changes: 3 additions & 3 deletions BHoM_Engine/Compute/SuppressRecording.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ public static partial class Compute
[Input("suppressErrors", "Determine whether to suppress BHoM Events of type ERROR from the log. Set to true to suppress these events.")]
[Input("suppressWarnings", "Determine whether to suppress BHoM Events of type WARNING from the log. Set to true to suppress these events.")]
[Input("suppressNotes", "Determine whether to suppress BHoM Events of type NOTE from the log. Set to true to suppress these events.")]
public static void StartSuppressRecordingEvents(bool suppressErrors = false, bool suppressWarnings = false, bool suppressNotes = false)
public static void StartSuppressRecording(bool suppressErrors = false, bool suppressWarnings = false, bool suppressNotes = false)
{
//Only change the state of each suppresion flag if it is set to true - this will prevent the scenario where MethodA suppresses everything, then calls MethodB which suppresses only Warnings and the false flags would turn on errors/notes which MethodA wouldn't want - this will ensure that the suppresions are set until the StopSuppressRecordingEvents is called
//Only change the state of each suppresion flag if it is set to true - this will prevent the scenario where MethodA suppresses everything, then calls MethodB which suppresses only Warnings and the false flags would turn on errors/notes which MethodA wouldn't want - this will ensure that the suppresions are set until the StopSuppressRecording is called
if(suppressErrors)
m_SuppressError = suppressErrors;

Expand All @@ -54,7 +54,7 @@ public static void StartSuppressRecordingEvents(bool suppressErrors = false, boo
/***************************************************/

[Description("Switch on the entire logging system used within BHoM. By default all recording systems are switched on when BHoM is initialised. Events of all types will be logged after this component has been used regardless of which ones were previously suppressed.")]
public static void StopSuppressRecordingEvents()
public static void StopSuppressRecording()
{
m_SuppressError = false;
m_SuppressWarning = false;
Expand Down
2 changes: 1 addition & 1 deletion BHoM_Engine/Modify/SplitAndRemoveAtIndexes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public static partial class Modify
[Input("items", "A list of items to split at one or more indexes.")]
[Input("indexes", "Indexes of items to remove.")]
[Output("lists", "Sublists of consecutive items that remain after items at input indexes have been removed.")]
public static List<List<T>> RemoveAndSplitAtIndexes<T>(this List<T> items, List<int> indexes)
public static List<List<T>> SplitAndRemoveAtIndexes<T>(this List<T> items, List<int> indexes)
{
int startIndex = 0;
indexes.Add(items.Count);
Expand Down
7 changes: 6 additions & 1 deletion Data_Engine/Query/ClosestData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ public static partial class Query
/**** Point Matrix ****/
/***********************************************/

[Description("Finds the closest data to a reference point within a PointMatrix, up to a maximum search distance.")]
[Input("matrix", "PointMatrix to query for the closest data.")]
[Input("refPt", "Reference point to find the closest data to.")]
[Input("maxDist", "Maximum distance to search for data. Data beyond this distance will not be returned.", typeof(Length))]
[Output("data", "The closest LocalData item to the reference point within the search distance, or null if none found.")]
public static LocalData<T> ClosestData<T>(this PointMatrix<T> matrix, Point refPt, double maxDist)
{
List<LocalData<T>> closePts = matrix.CloseToPoint(refPt, maxDist);
Expand Down Expand Up @@ -70,7 +75,7 @@ public static IEnumerable<T> ClosestData<T>(this DomainTree<T> tree,

Func<DomainTree<T>, double> worstCaseMethod;
if (tightBox)
worstCaseMethod = (x) => x.DomainBox?.FurthestTightSquareDistance(searchBox) ?? double.PositiveInfinity;
worstCaseMethod = (x) => x.DomainBox?.FurthestSquareDistanceTight(searchBox) ?? double.PositiveInfinity;
else
worstCaseMethod = (x) => x.DomainBox?.FurthestSquareDistance(searchBox) ?? double.PositiveInfinity;

Expand Down
2 changes: 1 addition & 1 deletion Data_Engine/Query/FurthestSquareDistance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public static double FurthestSquareDistance(this DomainBox box1, DomainBox box2)
[Input("box1", "Box to evaluate furthest possible square distance from.")]
[Input("box2", "Box to evaluate furthest possible square distance from.")]
[Output("sqDist", "The furthest possible square distance between two vectors confined in the respective tight DomainBoxes.")]
public static double FurthestTightSquareDistance(this DomainBox box1, DomainBox box2)
public static double FurthestSquareDistanceTight(this DomainBox box1, DomainBox box2)
{
if (box1 == null || box2 == null)
{
Expand Down
2 changes: 1 addition & 1 deletion Environment_Engine/Compute/MapToLevel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
[Input("decimals", "Provide decimal location to define the degree of tolerance for data matching.")]
[MultiOutput(0, "regionsByLevel", "A collection of BHoM Regions grouped by levels.")]
[MultiOutput(1, "levelsInUse", "A sublist of the BHoM Levels that have Room.")]
[MultiOutput(2, "regionsNotMapped", "A collection of BHoM Regions which did not sit neatly on any of the provided levels")]

Check warning on line 51 in Environment_Engine/Compute/MapToLevel.cs

View check run for this annotation

BHoMBot-CI / documentation-compliance

Environment_Engine/Compute/MapToLevel.cs#L51

Documentation attribute should end with grammatically correct punctuation (., !, or ?) - For more information see https://bhom.xyz/documentation/DevOps/Code%20Compliance%20and%20CI/Compliance%20Checks/AttributeHasEndingPunctuation
[PreviousInputNames("regions", "spaces, rooms")]
public static Output<List<List<IRegion>>, List<oM.Spatial.SettingOut.Level>, List<IRegion>> MapToLevel(List<IRegion> regions, List<oM.Spatial.SettingOut.Level> levels, int decimals = 6)
{
Expand Down Expand Up @@ -111,13 +111,13 @@
return output;
}

[Description("Organise the BHoM Region objects into a data structure based on the level of each region")]

Check warning on line 114 in Environment_Engine/Compute/MapToLevel.cs

View check run for this annotation

BHoMBot-CI / documentation-compliance

Environment_Engine/Compute/MapToLevel.cs#L114

Documentation attribute should end with grammatically correct punctuation (., !, or ?) - For more information see https://bhom.xyz/documentation/DevOps/Code%20Compliance%20and%20CI/Compliance%20Checks/AttributeHasEndingPunctuation
[Input("regions", "A collection of BHoM Regions to be organised.")]
[Input("decimals", "Provide decimal location to define the degree of tolerance for data matching.")]
[MultiOutput(0, "regionsByLevel", "A collection of BHoM Regions grouped by levels.")]
[MultiOutput(1, "levelsInUse", "A sublist of the BHoM Levels that have Room.")]
[MultiOutput(2, "regionsNotMapped", "A collection of BHoM Regions which did not sit neatly on any of the provided levels")]

Check warning on line 119 in Environment_Engine/Compute/MapToLevel.cs

View check run for this annotation

BHoMBot-CI / documentation-compliance

Environment_Engine/Compute/MapToLevel.cs#L119

Documentation attribute should end with grammatically correct punctuation (., !, or ?) - For more information see https://bhom.xyz/documentation/DevOps/Code%20Compliance%20and%20CI/Compliance%20Checks/AttributeHasEndingPunctuation
public static Output<List<List<IRegion>>, List<oM.Spatial.SettingOut.Level>, List<IRegion>> MaptoLevel(List<IRegion> regions, int decimals = 6)
public static Output<List<List<IRegion>>, List<oM.Spatial.SettingOut.Level>, List<IRegion>> MapToLevel(List<IRegion> regions, int decimals = 6)
{
List<oM.Spatial.SettingOut.Level> levels = Create.Levels(regions);
Output<List<List<IRegion>>, List<oM.Spatial.SettingOut.Level>, List<IRegion>> output = MapToLevel(regions, levels, decimals);
Expand Down
6 changes: 3 additions & 3 deletions Environment_Engine/Modify/ReplaceSpaceName.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ public static partial class Modify
[Input("oldSpaceNames", "The old space names to replace for the panel.")]
[Input("newSpaceNames", "The replacement space names for the panel.")]
[Output("panel", "The panel with updated space names if the panel contained the old space name.")]
public static List<Panel> ReplaceConnectedSpaceName(this List<Panel> panels, List<string> oldSpaceNames, List<string> newSpaceNames)
public static List<Panel> ReplaceSpaceName(this IEnumerable<Panel> panels, List<string> oldSpaceNames, List<string> newSpaceNames)
{
if (panels == null)
return panels;
return null;

if(oldSpaceNames.Count != newSpaceNames.Count)
{
BH.Engine.Base.Compute.RecordError("Length of the list of the old space names must be equal to the length of the list of new space names to ensure appropriate mapping between the old and new. The index of each old space name is matched to the index of the new space name to become the replacement. No changes have been made.");
return panels;
return panels.ToList();
}

List<Panel> rtnPanels = new List<Panel>();
Expand Down
2 changes: 1 addition & 1 deletion Graphics_Engine/Modify/RepresentationFragments/Boxes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public static partial class Modify
[Input("component", "The configuration properties for the box representation.")]
[Input("dataset", "Dataset of a BH.oM.Analytical.Elements.Graph where Graph.Entities are one element of type BHoMGroup in Dataset.Data.")]
[Input("viewConfig", "The configuration properties for the view.")]
public static void RepresentationFragment(this Boxes component, Dataset dataset, ViewConfig viewConfig)
private static void RepresentationFragment(this Boxes component, Dataset dataset, ViewConfig viewConfig)
{
if(component == null || dataset == null || viewConfig == null)
{
Expand Down
2 changes: 1 addition & 1 deletion Graphics_Engine/Modify/View/DependencyChart.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public static partial class Modify
[Description("Modifies a dataset by adding representation fragments to define a view of the data.")]
[Input("view", "The configuration properties for the view representation.")]
[Input("dataset", "Dataset of a BH.oM.Analytical.Elements.Graph where Graph.Entities are one element of type BHoMGroup in Dataset.Data and Graph.Relations are another element of type BHoMGroup in Dataset.Data.")]
public static void View(this DependencyChart view, Dataset dataset)
public static void DependencyChart(this DependencyChart view, Dataset dataset)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed method breaks dynamic dispatch for DependencyChart views

High Severity

Renaming View to DependencyChart breaks the BHoM dynamic dispatch pattern. The IView dispatcher in View.cs calls View(view as dynamic, dataset), which at runtime resolves by method name. Since the method is no longer named View, the DLR will never find it and will silently fall through to the no-op fallback View(this IView, Dataset). The DependencyChart view processing becomes completely non-functional.

Fix in Cursor Fix in Web

{
if (view == null || dataset == null)
{
Expand Down
2 changes: 1 addition & 1 deletion Search_Engine/Compute/Ratios/FuzzyMatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
[Input("compare", "The string to compare against.")]
[Input("scorer", "The method to use to score the strings when compared.")]
[Output("r", "The ratio of similarity between the two strings.")]
public static int MatchScore(string text, string compare, Scorer scorer = Scorer.DefaultRatio)
public static int FuzzyMatch(string text, string compare, Scorer scorer = Scorer.DefaultRatio)
{
switch (scorer)
{
Expand Down Expand Up @@ -82,7 +82,7 @@
/***************************************************/

[Description("Returns the scorer method to be used in FuzzyMatching methods.")]
[Input("scorer", "The scorer input type")]

Check warning on line 85 in Search_Engine/Compute/Ratios/FuzzyMatch.cs

View check run for this annotation

BHoMBot-CI / documentation-compliance

Search_Engine/Compute/Ratios/FuzzyMatch.cs#L85

Documentation attribute should end with grammatically correct punctuation (., !, or ?) - For more information see https://bhom.xyz/documentation/DevOps/Code%20Compliance%20and%20CI/Compliance%20Checks/AttributeHasEndingPunctuation
[Output("o", "The scorer method.")]
private static IRatioScorer GetScorer(Scorer scorer)
{
Expand Down
Loading