Skip to content

Commit

Permalink
feat(Tekla Structures + Revit) Tekla structures mesh conversion revit (
Browse files Browse the repository at this point in the history
…#1421)

* WIP Convert direct meshes from Tekla To Revit

* no message

* commit save for T4 for csproj

* xml gen working

* T4 xml file generation working for Tekla Structures

* fully functioning objects for direct mesh conversion if direct mesh exist

* WIP (feat) Tekla Structures recieving Meshes

* Finish Tekla Recieving Meshes Direct Shapes

* Fixes for receiving as direct mesh in Tekla Structures

* Method to set OST category of DirectMesh

* fix merge

Co-authored-by: Alan Rynne <[email protected]>
Co-authored-by: Erron Estrado <[email protected]>
  • Loading branch information
3 people authored Jul 19, 2022
1 parent b7875ec commit 65ea643
Show file tree
Hide file tree
Showing 19 changed files with 612 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public override List<ISetting> GetSettings()
new ListBoxSetting {Slug = "reference-point", Name = "Reference Point", Icon ="LocationSearching", Values = referencePoints, Description = "Sends or receives stream objects in relation to this document point"},
new CheckBoxSetting {Slug = "linkedmodels-send", Name = "Send Linked Models", Icon ="Link", IsChecked= false, Description = "Include Linked Models in the selection filters when sending"},
new CheckBoxSetting {Slug = "linkedmodels-receive", Name = "Receive Linked Models", Icon ="Link", IsChecked= false, Description = "Include Linked Models when receiving NOTE: elements from linked models will be received in the current document"},
new CheckBoxSetting {Slug = "recieve-objects-mesh", Name = "Receive Objects as Direct Mesh", Icon = "Link", IsChecked = false, Description = "Recieve the stream as a Meshes only"},
new MultiSelectBoxSetting { Slug = "disallow-join", Name = "Disallow Join For Elements", Icon = "CallSplit", Description = "Determine which objects should not be allowed to join by default when receiving",
Values = new List<string>() { ArchitecturalWalls, StructuralWalls, StructuralFraming } },
new ListBoxSetting {Slug = "pretty-mesh", Name = "Mesh Import Method", Icon ="ChartTimelineVarient", Values = prettyMeshOptions, Description = "Determines the display style of imported meshes"},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ private List<ApplicationPlaceholderObject> ConvertReceivedObjects(List<Base> obj
var receiveLinkedModelsSetting = (CurrentSettings.FirstOrDefault(x => x.Slug == "linkedmodels-receive") as CheckBoxSetting);
var receiveLinkedModels = receiveLinkedModelsSetting != null ? receiveLinkedModelsSetting.IsChecked : false;


foreach (var @base in objects)
{
if (progress.CancellationTokenSource.Token.IsCancellationRequested)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,19 @@
<Content Include="et_element_Speckle.ConnectorTeklaStructures.bmp">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Manifest.xml" />
<Content Include="ManifestGenerator.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<LastGenOutput>ManifestGenerator.xml</LastGenOutput>
</Content>
<Content Include="ManifestGenerator.xml">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>ManifestGenerator.tt</DependentUpon>
</Content>
</ItemGroup>
<ItemGroup>
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
</ItemGroup>
<Import Project="..\ConnectorTeklaStructuresShared\ConnectorTeklaStructuresShared.projitems" Label="Shared" />
<Import Project="..\..\Objects\Converters\ConverterTeklaStructures\ConverterTeklaStructuresShared\ConverterTeklaStructuresShared.projitems" Label="Shared" />
Expand Down
38 changes: 38 additions & 0 deletions ConnectorTeklaStructures/ConnectorTeklaStructures2021/Manifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<TEP Version="1.0">

<Product Id="SpeckleTeklaConnector" UpgradeCode="B61394A0-BFC9-4A5A-9F85-F4FB89F6E857" Version="2.6" Language="1033"
Name="Speckle Connector Tekla Structures" Manufacturer="Speckle" Description= "This extension adds Speckle"
IconPath="%TEPDEFINITIONFILEFOLDER%\logo.png" Type = "Environment">
<TeklaVersions>
<TeklaVersion Name="2099.1"/>
<MinTeklaVersion Name="2020.0"/>
<MaxTeklaVersion Name="2099.1"/>
</TeklaVersions>
</Product>

<SourcePathVariables>
<SourcePathVariable Id="TepOutputFolder" Value="%TEPDEFINITIONFILEFOLDER%\output" Comment="This provides the location where the package builder is to save the package."/>
<SourcePathVariable Id="BinariesFolder" Value="%TEPDEFINITIONFILEFOLDER%\ConnectorTeklaStructures2021\bin\Release"/>
</SourcePathVariables>

<TargetPathVariables>
<PathVariable Id="ModelPluginsDirectory" Value="%ENVDIR%\extensions\plugins\tekla\model\"/>
<PathVariable Id="ModelApplicationsDirectory" Value="%ENVDIR%\extensions\applications\tekla\model\"/>
<PathVariable Id="ExtensionsDir" Value="%commonEnvFolder%\extensions\"/>
<PathVariable Id="BinariesTargetDirectory" Value="%ExtensionsDir%\Speckle2Tekla\"/>
<PathVariable Id="BitmapsDirectory" Value="%ENVDIR%\..\bitmaps\"/>
<PathVariable Id="AttributeFileDirectory" Value="%commonEnvFolder%\system\"/>
<PathVariable Id="CommonMacroDirectory" Value="%commonEnvFolder%\macros\modeling\"/>
</TargetPathVariables>

<Component Id="TheExtensionComponent" Guid="7709FE25-5293-4BBF-AB37-13F72C6F6CCB">
<File Id="Icon" Source="%BinariesFolder%\et_element_Speckle.ConnectorTeklaStructures.bmp" Target="%BitmapsDirectory%"/>
<File Id="SpeckleConnectorTeklaStructures" Source="%BinariesFolder%\SpeckleConnectorTeklaStructures.dll" Target="%BinariesTargetDirectory%"/>
</Component>

<Feature Id="TheExtensionFeature" Title="ExtensionFeature">
<ComponentRef ReferenceId="TheExtensionComponent" />
</Feature>

</TEP>
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<#@ template language="C#" #>
<#@ output extension=".xml"#>
<#@ assembly name="System.Core" #>
<#@ import namespace="System.Linq" #>
<#@ import namespace="System.Text" #>
<#@ import namespace="System.Collections.Generic" #>
<#@ import namespace="System.IO" #>
<#
var buildPath = $@".\bin\Debug";
var files = Directory.EnumerateFiles(buildPath, "*.dll");
var x = 4;

#><?xml version="1.0" encoding="utf-8"?>
<TEP Version="1.0">

<Product Id="SpeckleTeklaConnector" UpgradeCode="B61394A0-BFC9-4A5A-9F85-F4FB89F6E857" Version="2.6" Language="1033"
Name="Speckle Connector Tekla Structures" Manufacturer="Speckle" Description= "This extension adds Speckle"
IconPath="%TEPDEFINITIONFILEFOLDER%\logo.png" Type = "Environment">
<TeklaVersions>
<TeklaVersion Name="2099.1"/>
<MinTeklaVersion Name="2020.0"/>
<MaxTeklaVersion Name="2099.1"/>
</TeklaVersions>
</Product>

<SourcePathVariables>
<SourcePathVariable Id="TepOutputFolder" Value="%TEPDEFINITIONFILEFOLDER%\output" Comment="This provides the location where the package builder is to save the package."/>
<SourcePathVariable Id="BinariesFolder" Value="%TEPDEFINITIONFILEFOLDER%\ConnectorTeklaStructures2021\bin\Release"/>
</SourcePathVariables>

<TargetPathVariables>
<PathVariable Id="ModelPluginsDirectory" Value="%ENVDIR%\extensions\plugins\tekla\model\"/>
<PathVariable Id="ModelApplicationsDirectory" Value="%ENVDIR%\extensions\applications\tekla\model\"/>
<PathVariable Id="ExtensionsDir" Value="%commonEnvFolder%\extensions\"/>
<PathVariable Id="BinariesTargetDirectory" Value="%ExtensionsDir%\Speckle2Tekla\"/>
<PathVariable Id="BitmapsDirectory" Value="%ENVDIR%\..\bitmaps\"/>
<PathVariable Id="AttributeFileDirectory" Value="%commonEnvFolder%\system\"/>
<PathVariable Id="CommonMacroDirectory" Value="%commonEnvFolder%\macros\modeling\"/>
</TargetPathVariables>

<Component Id="TheExtensionComponent" Guid="7709FE25-5293-4BBF-AB37-13F72C6F6CCB">
<File Id="Icon" Source="%BinariesFolder%\et_element_Speckle.ConnectorTeklaStructures.bmp" Target="%BitmapsDirectory%"/>
<#
foreach (var path in files)
{
#>
<File Id="<#= Path.GetFileName(path) #>" Source="<#= "%BinariesFolder%\\" + Path.GetFileName(path) #>" Target="%BinariesTargetDirectory%"/>
<#
}
#> </Component>

<Feature Id="TheExtensionFeature" Title="ExtensionFeature">
<ComponentRef ReferenceId="TheExtensionComponent" />
</Feature>

</TEP>
Loading

0 comments on commit 65ea643

Please sign in to comment.