New! Speckle 2.0 AutoCAD / Civil3D đź“Ł suggestions

Also @g.tsak and @JdB @dirksliepenbeek :slight_smile:

1 Like

Hi @clrkng!

Thanks for sharing. Great to see these connectors being developed :star_struck:

As a follow up on our community meetup discussion on the Rhino/AutoCAD connector, I’d like to share some (random) thoughts.

I was charmed by the feature you are developing for the Rhino connector to upgrade Rhino geometry to specific Speckle types using Rhino user attributes and/or layer names.

However, I can see some limitations using this method:

  • It somewhat enforces users to hack layer names/user attributes outside of their purpose, cluttering up the native document with Speckle specific props, with some risks involved.
  • Rhino has the feature to add user attributes, most other CAD software doesn’t (iirc :crazy_face: e.g. AutoCAD,Sketchup). So this won’t work for those packages.

To some extent, I think this functionality can be added to the client UI in a specific selection & mapping form for layer based CAD software as follows (powerpoint extravaganza incoming):

The core principle is that this loads the available Speckletype objects and the geometry filter dynamically informs the speckletype dropdown list (i.e. showing what you can convert a line to). In addition:

  • Could work for AutoCAD, Sketchup, and any other non-BIM CAD package (Unity, Blender, Illustrator??).
  • Perhaps have an option to save/load mapping configuration locally.
  • Allows non-BIM teams to collaborate with BIM teams

As I am looking at the image, I do realize that it has a limitation to not subgroup within a layer (i.e. select beams and colums from the structure layer). But this could be managed in the native document.

I wrote this from a user POV, so apologies if this is impossible to develop! :sweat_smile: I hope it’s a bit clear.

5 Likes

@Guus All great points, and wow :boom: that powerpoint mockup!

We are definitely planning a more sophisticated interface for schema mapping post beta, with potential UI integration pending mac support.

As you’ve identified, the core challenge is scoping out the most useful filtering method based on sort hierarchies & geometry type. This would inevitably influence file organization & user workflows for each non-visual programming application: easy for apps that primarily use Layers to sort, but needs :thinking: for apps with multiple sort mechanisms like Blocks, Filters, Selection Sets, etc.

For now, schema conversion for AutoCAD could be implemented via command to set object XData, similar to Rhino (:warning: pseudocode):

 [CommandMethod("SpeckleSchema", CommandFlags.UsePickSet)]
 public static void SetSchema()
 {
   // get user selected objects, could add selection filters
   var ids = new List<ObjectId>();
   PromptSelectionResult selection = Doc.Editor.GetSelection();
   ids = selection.Value.GetObjectIds().ToList();

   foreach (var id in ids)
   {
     // decide schema here, by assumption or another user input prompt
     string schema = "";
     switch (id.ObjectClass.DxfName)
     {
       case "LINE":
         schema = "MaybeAColumn"; break;
     }

     // add schema to object XData
     using (Transaction tr = Doc.TransactionManager.StartTransaction())
     {
       DBObject obj = tr.GetObject(id, OpenMode.ForWrite);
       obj.XData = new ResultBuffer(new TypedValue(Convert.ToInt32(DxfCode.Text), schema));
       tr.Commit();
     }
   }
 }

And schema properties would be checked on conversion before sending the stream:

public Base ConvertToSpeckle(object obj)
{
  switch (obj)
  {
    case DBObject o:
      // check for speckle schema xdata
      string schema = GetSpeckleSchema(o.XData);
      if (schema != null)
        return ObjectToSpeckleBuiltElement(o);
      else return ObjectToSpeckle(o);
  }
}

Great feedback, the schema builder feature might need a whole other thread to itself!

2 Likes

Great stuff!

@gleeuwdrent: interesting to have a look at this.

1 Like

Featurelines as mentioned earlier, Alignments is a must. I see it in the same category as Featureline

I think it’s interesting to bring pipe networks/pressure pipe networks data to Speckle. Especially if you work with with non-precast structures. Extend exchange to hydraulic calculations, Structural detailing of a Manhole to Revit and structural calculations to calculations software.

Also what can C3D retrieve back from other programs, then I think elements from other software to blocks. Example piles to blocks or v.v. Linear elements like railing to a 3D polyline or solids export.

4 Likes

Would there be some way to manage shared coordinates through Speckle? Revit has lots of trouble with this when encountering many different (legitimate) things surveyors do in AutoCAD or Civil3D files.

I would see this being implemented as a transformation that is performed on geometry as it’s streamed to one platform or another. So each stream would have to store a transformation relative to a known point that is coordinated between each of the files. This is probably a lot of thinking for a pretty narrow use case, but for architects at least this is a big unsolved problem.

1 Like

This is definitely a common pain point, glad you brought it up Nick! Pinning this as an issue when we move towards developing project management features after the beta. We could potentially store an origin point on a project / team level so that the correct transformation matrix can be automatically applied to all child streams :slightly_smiling_face:

3 Likes

Quick intermission to say that, currently, transformations relative to Revit’s Base point are applied when receiving and sending. Not sure how AutoCAD deals with it, but we should definitely align :slight_smile:

A post was split to a new topic: AutoCAD connector fatal error

Adding Solids with propertysets to connector functionality is urgent as well.
When you want to communicate on other software, e.g. Revit or Rhino, but also navisworks solids are the main medium for communication.

Why to the revit project basepoint and not the Internal Origin?

With that justification, we’ll see if we can bump solids up and support them sooner! Will keep you updated on this thread :+1:

2 Likes

Hi @Dickels112 , we’re applying transformations relative to the Revit project basepoint as we’ve found that would produce the most predictable results when collaborating with other software sice that’s what is used by surveyors etc.
I do see use cases where the internal origin could be preferable, but hopefully they are limited!

Did we get this wrong, or is this a deal breaker for you?

At some point we could have a setting letting people decide which one to use, but for now we’d like to keep things simple…

Sorry for the late reply.
(speaking from Civil Engineering standpoint):
The problem with Project basepoint and internal origin is that the project basepoint is meant to be used in the same way as a “UCS” in AutoCAD, while the Internal Origin is actually used to calculate all coordinate positions in the model from. this means everything, including the geometry extents is defined by the internal origin. not the project basepoint. The project basepoint also allows you to rotate model geometry with regards to “project north”, so by default this can give problems with recalculating/repositioning geometry. For me, when transferring geometry from Civil3D to Revit, I use the relative position to the interal origin because of the flexible meaning of the project basepoint itself.

With regards to survey: this is what the survey point is actually meant for, but no-one is using it in that way.

1 Like

I suspect that the best solution to the c3d/revit basepoint issue is to by default use the internal origin, while including the base point and survey point in project information. These variables could be stored in a stream’s globals branch, and included as a toggle option for receive operations to handle geometry transformations - that way we aren’t biasing towards users who care about the base point vs users who care about the survey or internal origin.

Implementation of this could be difficult at the moment, but I’m curious to hear what others think :slightly_smiling_face:

3 Likes

Hi @clrkng, we are starting to look at this as well. I agree that we should separate consideration of 1. what data we send and 2. what transformations the connectors apply by default.

Given that the base point and survey point may change as a project is developed (it shouldn’t but, let be realistic :slight_smile:), it may be better to tag them on the base commit object rather than the stream globals.

1 Like

I’ve spoken to some colleagues, and we try to keep the Internal Origin and Base point aligned, so exporting relative to the internal origin makes sense.

Here are some workflows we are thinking about:

  1. Revit → GIS: If the stream contains the Survey point, the receiving connector should be able to directly place the model in the right spot.
  2. Rhino → GIS: so it turns out you can geo-locate Rhino models! Who knew? This is similar to the Revit → GIS case.
  3. Microstation / Civil3D → GIS: These ones are a bit tricky, because road and rail alignments are big enough to generate projection errors if we aren’t careful. The sending connectors would have to send the Coordinate Reference System (e.g. EPSG code), which would be easily understood by GIS applications.
  4. Microstation / Civil3D ⟷ Revit: There would have to be some mediation between the two different mechanisms for georeferencing (CRS vs. Survey Point), but I suppose if we’ve sorted out the first three items, this wouldn’t be too hard.

One other concept to consider is Revit’s Shared Coordinates. My understanding is that Autodesk gave up on getting people to properly geo-locate their models and developed the Shared Coordinate system to allow manual determination of the transform between two specific files. Perhaps Speckle could do something similar: when importing a stream, allow users to set the insertion point, and then retain that information for future imports. It’s not as ideologically pure as properly geo-locating each stream, but it lines up nicely with what people know and expect today.

2 Likes

@daviddekoning your understanding about Autodesk is correct, though if you set-up your templates correctly, the information is almost always automatically positionned over correctly (except for IFC files), with no manual work.

This is the key. It’s the situations where someone (usually from a company outside yours) provides a file that isn’t set up right where shared coordinates provides a safety valve. I agree that most of the time, proper set up deals with the issue correctly.

So I tried to load in solids through the speckle alpha connector, and it works! (whoow). One. major. downside.
It is positioned in revit on absolute coordinates in relation to the project basepoint… So my solids appear now around 400k too far from the internal origin. This is why it is important to use Shared coordinates or shared sites to position to. Is there a workaround known?