AnsweredAssumed Answered

The 30th SOLIDWORKS Power-User Challenge - Macro Sweep Feature (Programming Challenge)

Question asked by Alin Vargatu on Oct 29, 2020
Latest reply on Nov 10, 2020 by Alin Vargatu

UPDATE: An example of using Standard SOLIDWORKS functionality has been attached. It uses a Swept-Boss feature based on a Face Curve, patterned by a Variable Pattern.

 

-------------------------------------------------------------------------------------

 

Hello SOLIDWORKS Power-Users and welcome to the 30th SWPUC (which is also the 6th Programming Challenge).

 

This week we endeavor to add the missing 1% functionality to SOLIDWORKS. In the past years, SOLIDWORKS has added great functionality for sketches, equations, surfaces and structural members, but, unfortunately, the existing functionality goes only 99% of the way to completing this challenge.

 

For 10,000 points and eternal glory, write the best macro to generate a parametric solid feature that applies a swept circular profile on all sketch entities of an existing 3D Sketch.

 

A special award of 3,000 points will be awarded to the participant who will post the first macro that solves this problem

 

The problem is apparently simple: "Create a "macro" sweep feature, using a circular profile, based on all curves (lines, arcs, splines) of an existing 3D Sketch".

 

Example:

Note: The 2020 file version of the model pictured below is attached, but you do not need it for solving the challenge

 

1. Existing 3D Sketch (any 3D Sketch would do) used as input. In this example, the sketch is based on the Face Curves of a Boundary Surface.

2. Macro Swept-Boss Feature:

Note that the feature should result in separate bodies. Having a checkbox to merge the bodies or not is a plus, but it is not essential. 

 

3. If the 3D Sketch changes in any way (curves added or deleted), the Macro Swept-Boss feature updates parametrically, by simply re-applying a circular profile on all the sketch entities of the 3D Sketch.

 

 

Please submit your macros before 12 pm ET, on Friday, the 6th of November, 2020.

Note that any macro submitted to this challenge will be considered donated to the SOLIDWORKS Community. 

 

Judging criteria, in no particular order:

1. Efficiency. Does the macro follow the workflow listed above?

2. Robustness (remember the rebuild expectations)

3. Speed of execution

4. UX (User Experience)

  • Elegant property manager (or other input methods)
  • Minimize mouse travel
  • Minimize user interactions

5. Efficient code

6. Elegant code

7. Fully annotated code

8. Originality

9. Using SOLIDWORKS functions in a new, unexpected way.

10. Speed. Be the first to post a functional macro and get an award.

 

Comments/ Enhancement Requests (I can add more if you suggest more):

1. Add a "Thicken Sketch" command. It would have as the input:

  • Select one or more 2D or 3D Sketches 
  • Have radio buttons to select the profile: 
    • Circle - input Diameter
    • Polygon - input number of sides and the diameter of the inscribed or circumscribed circle
  • Have a Merge checkbox

   The result will be a mesh with the selected profile following the input sketches. 

 

2. Allow the number of face curves to be driven by equations

 

3. Allow the Structure System to accept a full sketch as the input for a member

 

4. Allow Vary Patterns to pattern disconnected bodies and to work with any type of entity in the tree

 

5. Allow Swept-Boss features with a circular profile to use multiple paths based on multiple sketches to create multiple bodies.

 

6. Ability for the Face Curves to accept a Sketch containing points as an input for generating the Face Curves. If the sketch changes (points are added or removed) the 3D Sketch containing the Face Curves will update parametrically.

Outcomes