Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mating to point leads to exception #4

Open
dariomangoni opened this issue Sep 16, 2024 · 1 comment
Open

Mating to point leads to exception #4

dariomangoni opened this issue Sep 16, 2024 · 1 comment
Assignees

Comments

@dariomangoni
Copy link
Member

When a mate involves a ReferenceGeometry>Point the following exception is thrown:


************** Testo dell'eccezione **************
Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: Impossibile convertire in modo implicito il tipo 'System.Reflection.TypeInfo' in 'int'
   in CallSite.Target(Closure , CallSite , Object )
   in System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet](CallSite site, T0 arg0)
   in ChronoEngineAddin.ChModelExporter.GetLinkParameters(Feature& swMateFeature, LinkParams& link_params, MathTransform& roottrasf, Component2& assemblyofmates) in C:\workspace\chrono-solidworks\ChronoSolidworksAddIn\ChModelExporter.cs:riga 410
   in ChronoEngineAddin.ChModelExporterCpp.ConvertMate(Feature& swMateFeature, MathTransform& roottrasf, Component2& assemblyofmates) in C:\workspace\chrono-solidworks\ChronoSolidworksAddIn\ChModelExporterCpp.cs:riga 198
   in ChronoEngineAddin.ChModelExporter.TraverseFeaturesForLinks(Feature swFeat, Int64 nLevel, MathTransform& rootTransform, Component2& assemblyOfMates) in C:\workspace\chrono-solidworks\ChronoSolidworksAddIn\ChModelExporter.cs:riga 112
   in ChronoEngineAddin.ChModelExporterCpp.ExportCpp() in C:\workspace\chrono-solidworks\ChronoSolidworksAddIn\ChModelExporterCpp.cs:riga 160
   in ChronoEngineAddin.ChModelExporterCpp.Export() in C:\workspace\chrono-solidworks\ChronoSolidworksAddIn\ChModelExporterCpp.cs:riga 182
   in ChronoEngine_SwAddin.SWTaskpaneHost.ExportClick(Object sender, EventArgs e) in C:\workspace\chrono-solidworks\ChronoSolidworksAddIn\SidePanel.cs:riga 137
   in System.Windows.Forms.Control.OnClick(EventArgs e)
   in System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   in System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   in System.Windows.Forms.Control.WndProc(Message& m)
   in System.Windows.Forms.ButtonBase.WndProc(Message& m)
   in System.Windows.Forms.Button.WndProc(Message& m)
   in System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
@rnadgar
Copy link

rnadgar commented Oct 30, 2024

A valid workaround I found was to use ReferenceGeometry>CoordinateSystem instead of a Point. May be helpful for others if they need similar functionality until this is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants