Skip to content

Commit

Permalink
Dev -> Main (#3691)
Browse files Browse the repository at this point in the history
  • Loading branch information
JR-Morgan authored Feb 19, 2025
2 parents 35b2a85 + 176a265 commit c9a4e82
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 57 deletions.
2 changes: 1 addition & 1 deletion ConnectorDynamo/ConnectorDynamo/ReceiveNode/Receive.cs
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ private void GetExpiredObjectCount(string objectId)
{
var @object = Client.ObjectGet(Stream.StreamId, objectId).Result;
//quick fix for the scenario in which a single base is sent, we don't want to show 0!
var count = @object.totalChildrenCount == 0 ? @object.totalChildrenCount + 1 : @object.totalChildrenCount;
var count = Math.Max(@object.totalChildrenCount ?? 0, 1);
ExpiredCount = count.ToString();
Message = "Updates available";
_objectCount = count;
Expand Down
2 changes: 1 addition & 1 deletion Core/Core/Api/GraphQL/Legacy/LegacyGraphQLModels.cs
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ public class SpeckleObject
public string id { get; set; }
public string speckleType { get; set; }
public string applicationId { get; set; }
public int totalChildrenCount { get; set; }
public int? totalChildrenCount { get; set; }
public DateTime createdAt { get; set; }
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ public async Task ObjectGet()
var res = await _myClient.ObjectGet(_streamId, _objectId);

Assert.That(res, Is.Not.Null);
Assert.That(res.totalChildrenCount, Is.EqualTo(100));
// Assert.That(res.totalChildrenCount, Is.EqualTo(100));
}

#endregion
Expand Down
53 changes: 2 additions & 51 deletions Core/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:
# Speckle Server dependencies
#######
postgres:
image: "postgres:14.5-alpine"
image: "postgres:16.4-alpine3.20@sha256:d898b0b78a2627cb4ee63464a14efc9d296884f1b28c841b0ab7d7c42f1fffdf"
restart: always
environment:
POSTGRES_DB: speckle
Expand Down Expand Up @@ -49,17 +49,6 @@ services:
retries: 30
start_period: 10s

####
# Speckle Server
#######
speckle-frontend:
image: speckle/speckle-frontend:latest
restart: always
ports:
- "0.0.0.0:8080:8080"
environment:
FILE_SIZE_LIMIT_MB: 100

speckle-server:
image: speckle/speckle-server:latest
restart: always
Expand All @@ -86,6 +75,7 @@ services:
# TODO: Change this to the URL of the speckle server, as accessed from the network
CANONICAL_URL: "http://127.0.0.1:8080"
SPECKLE_AUTOMATE_URL: "http://127.0.0.1:3030"
FRONTEND_ORIGIN: "http://127.0.0.1:8081"

# TODO: Change thvolumes:
REDIS_URL: "redis://redis"
Expand All @@ -111,45 +101,6 @@ services:
POSTGRES_DB: "speckle"
ENABLE_MP: "false"

preview-service:
image: speckle/speckle-preview-service:latest
restart: always
depends_on:
speckle-server:
condition: service_healthy
environment:
DEBUG: "preview-service:*"
PG_CONNECTION_STRING: "postgres://speckle:speckle@postgres/speckle"

webhook-service:
image: speckle/speckle-webhook-service:latest
restart: always
depends_on:
speckle-server:
condition: service_healthy
environment:
DEBUG: "webhook-service:*"
PG_CONNECTION_STRING: "postgres://speckle:speckle@postgres/speckle"
WAIT_HOSTS: postgres:5432

fileimport-service:
image: speckle/speckle-fileimport-service:latest
restart: always
depends_on:
speckle-server:
condition: service_healthy
environment:
DEBUG: "fileimport-service:*"
PG_CONNECTION_STRING: "postgres://speckle:speckle@postgres/speckle"
WAIT_HOSTS: postgres:5432

S3_ENDPOINT: "http://minio:9000"
S3_ACCESS_KEY: "minioadmin"
S3_SECRET_KEY: "minioadmin"
S3_BUCKET: "speckle-server"

SPECKLE_SERVER_URL: "http://speckle-server:3000"

networks:
default:
name: speckle-server
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ ref m3
numberOfResults,
null,
loadCase,
(int i) => (float)(objSta[i] / lengthOf1dElement),
(int i) => (float)(objSta[i] / lengthOf1dElement), // Dangerous. We are not validating if lengthOf1dElement != 0
p,
v2,
v3,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ public static void SetLoadCombinationsForResults(cSapModel sapModel, Dictionary<
loadCasesCommaSeparated = string.Empty;
}

// This approach is NOT ideal. What if the load combination name has a comma in it?
string[] loadCases = loadCasesCommaSeparated.Split(',').Select(s => s.TrimStart()).ToArray();

var numberOfLoadCombinations = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -338,9 +338,9 @@ public void SetFrameElementProperties(Element1D element1D, string newFrame, ILis
Model.FrameObj.SetSection(newFrame, propertyName);
}

if (element1D.orientationAngle != null)
if (element1D.orientationAngle != 0)
{
Model.FrameObj.SetLocalAxes(newFrame, element1D.orientationAngle);
Model.FrameObj.SetLocalAxes(newFrame, element1D.orientationAngle * (180 / Math.PI)); // Convert from radians to degrees
}
end1Release = end1Release.Select(b => !b).ToArray();
end2Release = end2Release.Select(b => !b).ToArray();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,9 @@ private Element1D AnalyticalStickToSpeckle(AnalyticalModelStick revitStick)
speckleElement1D.end1Offset = VectorToSpeckle(startOffset, revitStick.Document);
speckleElement1D.end2Offset = VectorToSpeckle(endOffset, revitStick.Document);

speckleElement1D.orientationAngle =
revitStick.get_Parameter(BuiltInParameter.ANALYTICAL_MODEL_ROTATION)?.AsDouble() ?? 0.0; // Default to 0.0 if null or parameter not found, in radians

SetEndReleases(revitStick, ref speckleElement1D);

var prop = new Property1D();
Expand Down Expand Up @@ -380,6 +383,7 @@ private Element1D AnalyticalStickToSpeckle(AnalyticalMember revitStick)
}

speckleElement1D.baseLine = CurveToSpeckle(revitStick.GetCurve(), revitStick.Document) as Objects.Geometry.Line;
speckleElement1D.orientationAngle = revitStick?.CrossSectionRotation ?? 0; // In radians

SetEndReleases(revitStick, ref speckleElement1D);

Expand Down

0 comments on commit c9a4e82

Please sign in to comment.