Surfacing add ons for Solidworks

KQuigley
Posts: 42
Joined: Sat Mar 13, 2021 8:24 am
Answers: 0
x 1
x 85

Surfacing add ons for Solidworks

Unread post by KQuigley »

It's been a while since I've been on here!
I have a question for some of the old timer SolidWorks users here (and I include myself in that!).
An old customer of mine (no names sorry) is part of a large global enterprise (made up of lots of smaller companies). The entire organisation was Creo based but have recently switched to Solidworks. I know why but that is not for public consumption.
So I had a call out the blue from them a few days ago asking for help as they are trying to get the same surfacing quality from Solidowrks as they could in Creoo (with Style). You could take the attitude "that ain't going to happen" but I am (contrary to popular opinion) a glass half full person and as I've designed a lot of the products in this company's range, using Solidworks, I know you can do it, but it is not easy.

So we are looking at add ons for Solidworks specifically for surfacing. I use XNurbs and Power Surfacing in house so I know those. The one I've never used is https://www.cadcamcomponents.com/gw3dfeatures.html

Does anyone here have any experience of this product? The website is a bit opaque on the benefits. In what way is it better that standard Solidworks surfacing tools or Xnurbs/Power Surfacing? Does it give you Creo Style (ISDX in old money) levels of control and surface quality? Are the surface evaluation tools any better than standard SolidWorks?

I seem to recall a thread about this one on the old Soldiworks forum but as that is dead now and no living person exists on the new one I figured this would be the place to ask!
User avatar
zxys001
Posts: 1050
Joined: Fri Apr 02, 2021 10:08 am
Answers: 4
Location: Scotts Valley, Ca.
x 2263
x 962
Contact:

Re: Surfacing add ons for Solidworks

Unread post by zxys001 »

Hello Kevin,
I had a temp GW3D license many years ago before SW started to get better at some of the surfacing and I found that most of my data was going to be shared/used by my clients.. which means, they would also need a GW3D license... so, no go.
GW3D has a s#@t load of options for surfacing and curve creation... so, if you like to geek out and that is your thing,... yeah.. it reminds me of older tech or Pro/e and Rhino3D and some of the ship building surfacing tools.
One guy who did a lot of videos on GW3D is Mark Landsaat and he also does comparisons with XNurbs, Rhino3D,.. and others - https://www.youtube.com/@marklandsaat3696/videos
"Democracies aren't overthrown; they're given away." -George Lucas
“We only protect what we love, we only love what we understand, and we only understand what we are taught.” - Jacques Cousteau
KQuigley
Posts: 42
Joined: Sat Mar 13, 2021 8:24 am
Answers: 0
x 1
x 85

Re: Surfacing add ons for Solidworks

Unread post by KQuigley »

Thanks Paul!
Mark Landsatt! That was who used to post about it. Thanks.
User avatar
Arthur NY
Posts: 185
Joined: Sat Mar 27, 2021 12:32 pm
Answers: 0
x 34
x 166

Re: Surfacing add ons for Solidworks

Unread post by Arthur NY »

This is one area that Solidworks has sloooooooooooooowed down in tremendously in. Even with the "new" G3 constraints the condition under which they don't go haywire is REALLY quite a P.I.T.A!!!! You could still go through Matt's Surfacing Bible that was put out more than 12 years ago and still gain enough of an understanding of what Solidworks is capable of as a whole. I don't know if it's because of the whole transition to 3DXP but this area is still in need of some real TLC!!!

I too use both Power Surfacing and xNurbs along with Rhino and at times I look back to my days in Alias on SGI computers and still ponder how today's CAD software's aren't at that level.

Ok, getting off my soap box...... The addition of the Style Spline, Conics, along with a few other tidbits have been a welcomed aspect of the software. One thing I always tell users is download a model from Paul's, GrabCAD,, or other websites with Solidworks models and roll back the history. Like the Audi A8 model or the F16 fighter Plane.... go through the history tree and see how it was made. This isn't to say that it was made 100% correctly or done in an optimized way but it does give a lot of insight as to where the software can go.

Also the presentation from Andrew Lowe and Ed Eaton are still just as amazing today as when they presented them over the course of the past 15+ years.

Last but not least if you ever just need a sounding board I'd be interested in being of help. Stuff like this gets my CAD geeky side going.
KQuigley
Posts: 42
Joined: Sat Mar 13, 2021 8:24 am
Answers: 0
x 1
x 85

Re: Surfacing add ons for Solidworks

Unread post by KQuigley »

It's an interesting one this. The team doing these products now are very capable. They know Creo and use Creo to model and validate the geometry. It is the validation part that concerns them most. The way you build these products is pretty much the same in Creo as it is in Solidworks. Yes creo (with Style) is probably more capable but in reality the surface quality is similar, and in many respects there are more options in Solidworks - and that is the issue I think. The Creo approach is very rigid. Solidworks lets the user loose whan maybe they should be more rigid. The fact is a good user in Creo is pretty much the same as a good user in Solidworks.

But where Creo is better is in surface validation. This is the area they are really bothered about as they need to sign off data for tooling and right now the validation tools in Solidworks just don't cut the mustard (compared to the ones in creo).
XNurbs doesn't really do validation, but GeometryWorks seems to, so I've pointed them to that as well.

If that doesn't work then they need to go back to the HQ and beg to retain Creo for this business. I've given some suggestions on options for structuring this - as my number one rule for any business switching CAD platforms is "Always retain at least 1 license of the old system". There are always ways around these things but this is the corporate sector so sense doesn't always prevail in the C suite.
User avatar
Arthur NY
Posts: 185
Joined: Sat Mar 27, 2021 12:32 pm
Answers: 0
x 34
x 166

Re: Surfacing add ons for Solidworks

Unread post by Arthur NY »

@KQuigley When you say validate the surface, are they going down the route of looking at surface continuity, zebra stripes, curvature continuity? or is this analysis of CAD to mesh data?
gristle
Posts: 20
Joined: Wed Apr 07, 2021 5:17 pm
Answers: 0
Location: New Zealand
x 17
x 17
Contact:

Re: Surfacing add ons for Solidworks

Unread post by gristle »

KQuigley wrote: Wed Oct 18, 2023 11:05 am
But where Creo is better is in surface validation. This is the area they are really bothered about as they need to sign off data for tooling and right now the validation tools in Solidworks just don't cut the mustard (compared to the ones in creo).
XNurbs doesn't really do validation, but GeometryWorks seems to, so I've pointed them to that as well.
100% agree there. Zebra and curvature can be quite poor in SW, as the user has little control over the analysis mesh that SW generates.
I have a macro set up to dump out any selected faces/bodies into Rhino where it runs a zebra analysis using explicit mesh settings.
It also means you can use the global edge analysis tool in Rhino, which gives you G0/1/2 info, with tolerances etc.
Cheers, Andrew Jackson.
KQuigley
Posts: 42
Joined: Sat Mar 13, 2021 8:24 am
Answers: 0
x 1
x 85

Re: Surfacing add ons for Solidworks

Unread post by KQuigley »

Arthur NY wrote: Wed Oct 18, 2023 7:31 pm @KQuigley When you say validate the surface, are they going down the route of looking at surface continuity, zebra stripes, curvature continuity? or is this analysis of CAD to mesh data?
Validating the surface for tooling - so looking at continuity, flow, divergence etc.
gristle wrote: Mon Oct 23, 2023 3:41 pm
100% agree there. Zebra and curvature can be quite poor in SW, as the user has little control over the analysis mesh that SW generates.
I have a macro set up to dump out any selected faces/bodies into Rhino where it runs a zebra analysis using explicit mesh settings.
It also means you can use the global edge analysis tool in Rhino, which gives you G0/1/2 info, with tolerances etc.
[/quote]

That's exactly what I've recommended they do if they can't continue to use Creo. They have Rhino (seems to get around the corporate issues).
I've also pointed them to setting up a bespoke zebra analysis using a Solidworks macro - as detailed here

gristle
Posts: 20
Joined: Wed Apr 07, 2021 5:17 pm
Answers: 0
Location: New Zealand
x 17
x 17
Contact:

Re: Surfacing add ons for Solidworks

Unread post by gristle »

KQuigley wrote: Tue Oct 24, 2023 11:54 am Validating the surface for tooling - so looking at continuity, flow, divergence etc.



100% agree there. Zebra and curvature can be quite poor in SW, as the user has little control over the analysis mesh that SW generates.
I have a macro set up to dump out any selected faces/bodies into Rhino where it runs a zebra analysis using explicit mesh settings.
It also means you can use the global edge analysis tool in Rhino, which gives you G0/1/2 info, with tolerances etc.
That's exactly what I've recommended they do if they can't continue to use Creo. They have Rhino (seems to get around the corporate issues).
I've also pointed them to setting up a bespoke zebra analysis using a Solidworks macro - as detailed here


[/quote]

That's my hacked tool to add isophote lines using draft evaluation. It seems to work quite well, except the draft analysis mesh has similar issues to the other analysis tools. If you crank the image quality setting up, then it improves for a bit, until you edit a feature.

Here's my vid on setting up a macro to send surfaces to Rhino. If it's just a few surfaces, they appear in Rhino with little delay. I have it set up so Rhino comes to the front as well, once the surface has been imported. You only need to change the zebra settings once per session (have not figured out how to control the zebra settings from the SW macro). You can also use the Rhino curvature analysis tools, except do so with the expectation that your SW surfaces are not going to look too flash :) This macro works with the Rhino evaluation install, so no commercial seat needed.

Cheers, Andrew Jackson.
User avatar
mgibeault
Posts: 49
Joined: Thu Nov 17, 2022 9:07 am
Answers: 1
x 78
x 44

Re: Surfacing add ons for Solidworks

Unread post by mgibeault »

gristle wrote: Tue Oct 24, 2023 4:18 pm ...
Here's my vid on setting up a macro to send surfaces to Rhino. If it's just a few surfaces, they appear in Rhino with little delay. I have it set up so Rhino comes to the front as well, once the surface has been imported. You only need to change the zebra settings once per session (have not figured out how to control the zebra settings from the SW macro). You can also use the Rhino curvature analysis tools, except do so with the expectation that your SW surfaces are not going to look too flash :) This macro works with the Rhino evaluation install, so no commercial seat needed.

Hi,
I'm quite interested in this tool, looks a lot of fun! And something I often do manually near the end of a project.
I can't get your macro to work though... I get the error "Run-time error '424' - Object required for the line with " Set objRhinoScript = Rhino.GetScriptObject"
Maybe I missed something while copying it from the video... ;)
User avatar
mgibeault
Posts: 49
Joined: Thu Nov 17, 2022 9:07 am
Answers: 1
x 78
x 44

Re: Surfacing add ons for Solidworks

Unread post by mgibeault »

For the mesh settings, to have a good evaluation, you could insert this script that works well for a document in inches:
-Properties Object RenderMeshSettings Object AdvancedOptions Angle 15 AspectRatio 0 Distance 0 Density 1 Grid 16 MaxEdgeLength 0.015 MinEdgeLength 0.005
Enter Enter Enter Enter

For a document in mm:
-Properties Object RenderMeshSettings Object AdvancedOptions Angle 15 AspectRatio 0 Distance 0 Density 1 Grid 16 MaxEdgeLength 0.15 MinEdgeLength 0.05
Enter Enter Enter Enter
gristle
Posts: 20
Joined: Wed Apr 07, 2021 5:17 pm
Answers: 0
Location: New Zealand
x 17
x 17
Contact:

Re: Surfacing add ons for Solidworks

Unread post by gristle »

mgibeault wrote: Fri Oct 27, 2023 1:45 pm For the mesh settings, to have a good evaluation, you could insert this script that works well for a document in inches:
-Properties Object RenderMeshSettings Object AdvancedOptions Angle 15 AspectRatio 0 Distance 0 Density 1 Grid 16 MaxEdgeLength 0.015 MinEdgeLength 0.005
Enter Enter Enter Enter

For a document in mm:
-Properties Object RenderMeshSettings Object AdvancedOptions Angle 15 AspectRatio 0 Distance 0 Density 1 Grid 16 MaxEdgeLength 0.15 MinEdgeLength 0.05
Enter Enter Enter Enter
Good stuff, save having to enter settings each time you start a session. I tend to use edge-surf deviation setting quite a bit as well. 0.0001mm if its a few surfs on a handheld sized product.

I've had several issues trying to get this to run. At first, It would open Rhino, but then something changed somewhere on my system, and I had to have Rhino opened first before running. I'm a macro/API beginner!
Cheers, Andrew Jackson.
User avatar
mgibeault
Posts: 49
Joined: Thu Nov 17, 2022 9:07 am
Answers: 1
x 78
x 44

Re: Surfacing add ons for Solidworks

Unread post by mgibeault »

gristle wrote: Fri Oct 27, 2023 2:59 pm ...
I've had several issues trying to get this to run. At first, It would open Rhino, but then something changed somewhere on my system, and I had to have Rhino opened first before running. I'm a macro/API beginner!
Would you mind showing the first lines of the macro? I might miss some.
gristle
Posts: 20
Joined: Wed Apr 07, 2021 5:17 pm
Answers: 0
Location: New Zealand
x 17
x 17
Contact:

Re: Surfacing add ons for Solidworks

Unread post by gristle »

mgibeault wrote: Fri Oct 27, 2023 3:43 pm Would you mind showing the first lines of the macro? I might miss some.
There is a link to a .txt file of the macro in the video description, have you had a look at that?
Also may be differences between needed versions of Rhino (6, 7, 8)?
Cheers, Andrew Jackson.
User avatar
mgibeault
Posts: 49
Joined: Thu Nov 17, 2022 9:07 am
Answers: 1
x 78
x 44

Re: Surfacing add ons for Solidworks

Unread post by mgibeault »

gristle wrote: Fri Oct 27, 2023 5:45 pm There is a link to a .txt file of the macro in the video description, have you had a look at that?
Also may be differences between needed versions of Rhino (6, 7, 8)?
Sorry, I missed that because I watched the embeded video here.
And it works!
I changed "Rhino.Interface.7" for "Rhino.Interface.8" since I'm on v8.

Thanks!
Halasox
Posts: 14
Joined: Mon Nov 28, 2022 7:10 am
Answers: 0
x 9
x 9

Re: Surfacing add ons for Solidworks

Unread post by Halasox »

gristle wrote: Fri Oct 27, 2023 2:59 pm Good stuff, save having to enter settings each time you start a session. I tend to use edge-surf deviation setting quite a bit as well. 0.0001mm if its a few surfs on a handheld sized product.

I've had several issues trying to get this to run. At first, It would open Rhino, but then something changed somewhere on my system, and I had to have Rhino opened first before running. I'm a macro/API beginner!
I cleaned up the code a bit as I had some errors due to the obsolete saveAs3! UU

Code: Select all


Option Explicit

Dim swApp As SldWorks.SldWorks
Dim swModel As SldWorks.ModelDoc2
Dim swModelDocExt As SldWorks.ModelDocExtension
Dim opt As Long
Dim lErrors As Long
Dim lWarnings As Long
Dim Units As SldWorks.UserUnit

Const fileName As String = "C:\temp\analysisSurfaces.STEP"

Dim Rhino As Object
Dim objRhinoScript As Object

Sub Main()
    On Error Resume Next
    
    ' Initialize SolidWorks
    Set swApp = Application.SldWorks
    Set swModel = swApp.ActiveDoc
    Set swModelDocExt = swModel.Extension

    If swApp Is Nothing Then
        MsgBox "SolidWorks is not running.", vbExclamation
        Exit Sub
    End If
    
    ' Check if a document is open in SolidWorks
    Set swModel = swApp.ActiveDoc
    If swModel Is Nothing Then
        MsgBox "No active document in SolidWorks.", vbExclamation
        Exit Sub
    End If
    
    ' Export selected surfaces from SolidWorks to Rhino
    If ExportSelectedToRhino() Then
        'MsgBox "Export to Rhino completed successfully.", vbInformation
    Else
        MsgBox "Failed to export to Rhino.", vbCritical
    End If
End Sub

Function ExportSelectedToRhino() As Boolean
    ' Save As STEP file
    If swModelDocExt.SaveAs2(fileName, 0, opt, Nothing, "", False, lErrors, lWarnings) Then
        Set Rhino = CreateObject("Rhino.Interface")
        If Rhino Is Nothing Then
            MsgBox "Failed to create Rhino object.", vbCritical
            ExportSelectedToRhino = False
            Exit Function
        End If
        
        Rhino.Visible = True
        Set objRhinoScript = Rhino.GetScriptObject
        If objRhinoScript Is Nothing Then
            MsgBox "Failed to get RhinoScript object.", vbCritical
            ExportSelectedToRhino = False
            Exit Function
        End If
        
        ' Execute Rhino commands to import STEP file and manipulate view
        With objRhinoScript
            .Command "_Cancel _Enter"
            .Command "_SelAll _Delete"
            .Command "_-Import " & fileName & " _EnterEnd"
            .Command "_SelAll _Zoom _Selected _SetMaximizedViewport Perspective"
            .Command "_-Zebra _SelNone"
        End With
        
        ' Set mesh settings based on document units
        Set Units = swModel.GetUserUnit(swLengthUnit)
        'Debug.Print "  Unit type as defined in swUserUnitsType_e: " & Units.SpecificUnitType
        
        If Units.SpecificUnitType = 3 Then
            ' Document in inches
            With objRhinoScript
                .Command "_-SelAll"
                .Command "_-Properties _Object _RenderMeshSettings _Object _AdvancedOptions " & _
                "Angle=15 AspectRatio=0 Distance=0 Density=1 Grid=16 MaxEdgeLength=0.015 MinEdgeLength=0.005 _Enter _Enter _Enter _Enter"
                .Command "_-Zebra _SelNone"
            End With
        ElseIf Units.SpecificUnitType = 0 Then
            ' Document in millimeters
            With objRhinoScript
                .Command "_-SelAll"
                .Command "_-Properties _Object _RenderMeshSettings _Object _AdvancedOptions " & _
                    "Angle=15 _Enter AspectRatio=0 Distance=0 Density=1 Grid=16 MaxEdgeLength=0.15 MinEdgeLength=0.05 _Enter _Enter _Enter _Enter"
                .Command "_-Zebra _SelNone"
            End With
        Else
            MsgBox "Document units not recognized.", vbCritical
            ExportSelectedToRhino = False
            Exit Function
        End If
        
        Rhino.BringToTop
        ExportSelectedToRhino = True
    Else
        MsgBox "Failed to save SolidWorks document as STEP file.", vbCritical
        ExportSelectedToRhino = False
    End If
End Function








gristle
Posts: 20
Joined: Wed Apr 07, 2021 5:17 pm
Answers: 0
Location: New Zealand
x 17
x 17
Contact:

Re: Surfacing add ons for Solidworks

Unread post by gristle »

Thanks for doing that!
Halasox wrote: Mon Mar 11, 2024 11:35 am I cleaned up the code a bit as I had some errors due to the obsolete saveAs3! UU

Code: Select all


Option Explicit

Dim swApp As SldWorks.SldWorks
Dim swModel As SldWorks.ModelDoc2
Dim swModelDocExt As SldWorks.ModelDocExtension
Dim opt As Long
Dim lErrors As Long
Dim lWarnings As Long
Dim Units As SldWorks.UserUnit

Const fileName As String = "C:\temp\analysisSurfaces.STEP"

Dim Rhino As Object
Dim objRhinoScript As Object

Sub Main()
    On Error Resume Next
    
    ' Initialize SolidWorks
    Set swApp = Application.SldWorks
    Set swModel = swApp.ActiveDoc
    Set swModelDocExt = swModel.Extension

    If swApp Is Nothing Then
        MsgBox "SolidWorks is not running.", vbExclamation
        Exit Sub
    End If
    
    ' Check if a document is open in SolidWorks
    Set swModel = swApp.ActiveDoc
    If swModel Is Nothing Then
        MsgBox "No active document in SolidWorks.", vbExclamation
        Exit Sub
    End If
    
    ' Export selected surfaces from SolidWorks to Rhino
    If ExportSelectedToRhino() Then
        'MsgBox "Export to Rhino completed successfully.", vbInformation
    Else
        MsgBox "Failed to export to Rhino.", vbCritical
    End If
End Sub

Function ExportSelectedToRhino() As Boolean
    ' Save As STEP file
    If swModelDocExt.SaveAs2(fileName, 0, opt, Nothing, "", False, lErrors, lWarnings) Then
        Set Rhino = CreateObject("Rhino.Interface")
        If Rhino Is Nothing Then
            MsgBox "Failed to create Rhino object.", vbCritical
            ExportSelectedToRhino = False
            Exit Function
        End If
        
        Rhino.Visible = True
        Set objRhinoScript = Rhino.GetScriptObject
        If objRhinoScript Is Nothing Then
            MsgBox "Failed to get RhinoScript object.", vbCritical
            ExportSelectedToRhino = False
            Exit Function
        End If
        
        ' Execute Rhino commands to import STEP file and manipulate view
        With objRhinoScript
            .Command "_Cancel _Enter"
            .Command "_SelAll _Delete"
            .Command "_-Import " & fileName & " _EnterEnd"
            .Command "_SelAll _Zoom _Selected _SetMaximizedViewport Perspective"
            .Command "_-Zebra _SelNone"
        End With
        
        ' Set mesh settings based on document units
        Set Units = swModel.GetUserUnit(swLengthUnit)
        'Debug.Print "  Unit type as defined in swUserUnitsType_e: " & Units.SpecificUnitType
        
        If Units.SpecificUnitType = 3 Then
            ' Document in inches
            With objRhinoScript
                .Command "_-SelAll"
                .Command "_-Properties _Object _RenderMeshSettings _Object _AdvancedOptions " & _
                "Angle=15 AspectRatio=0 Distance=0 Density=1 Grid=16 MaxEdgeLength=0.015 MinEdgeLength=0.005 _Enter _Enter _Enter _Enter"
                .Command "_-Zebra _SelNone"
            End With
        ElseIf Units.SpecificUnitType = 0 Then
            ' Document in millimeters
            With objRhinoScript
                .Command "_-SelAll"
                .Command "_-Properties _Object _RenderMeshSettings _Object _AdvancedOptions " & _
                    "Angle=15 _Enter AspectRatio=0 Distance=0 Density=1 Grid=16 MaxEdgeLength=0.15 MinEdgeLength=0.05 _Enter _Enter _Enter _Enter"
                .Command "_-Zebra _SelNone"
            End With
        Else
            MsgBox "Document units not recognized.", vbCritical
            ExportSelectedToRhino = False
            Exit Function
        End If
        
        Rhino.BringToTop
        ExportSelectedToRhino = True
    Else
        MsgBox "Failed to save SolidWorks document as STEP file.", vbCritical
        ExportSelectedToRhino = False
    End If
End Function








Cheers, Andrew Jackson.
Post Reply