goniz88 Posted December 15, 2013 Posted December 15, 2013 Hi guys, I am a beginner of solidworks api and I should build a macro that can divide a curve (line, arch, spline, etc...) in a number of points (decided by me) equally spaced. Could you help me? Thanks a lot Quote
goniz88 Posted December 16, 2013 Author Posted December 16, 2013 Thanks but I need to know ho I can use in SolidWorks. Do you know something about it? Quote
ReMark Posted December 16, 2013 Posted December 16, 2013 (edited) Have you posted this question at the Solidworks forum over at Dassault Systemes? Would that be the same as creating points at a curve's intersections? Edited December 16, 2013 by ReMark Quote
JD Mather Posted December 16, 2013 Posted December 16, 2013 Thanks but I need to know ho I can use in SolidWorks. Do you know something about it? It is almost always better to pattern a feature rather than a sketch in a parametric modeler. What is it exactly that you are trying to pattern (attach your sldprt file here)? Insert>Feature>Pattern>Curve Driven Pattern Quote
goniz88 Posted December 16, 2013 Author Posted December 16, 2013 (edited) I am trying to divide a curve in several points. I have a 3D sketch in which I created a trajectory. Now I am trying to create a macro that is able to divide this trajectory in a number of points (for example 100) decided by me. I post the SLDPRT file to give you an example of what is the trajectory. Parte1.SLDPRT I have already begin to write the macro but I am not able to write the function (inside my macro) that divide my trajectory in n points. Edited December 16, 2013 by goniz88 Quote
goniz88 Posted December 16, 2013 Author Posted December 16, 2013 Have you posted this question at the Solidworks forum over at Dassault Systemes? Yes but I did'nt recieve any answers! Would that be the same as creating points at a curve's intersections? It could be similar, but I need to create several ponts (like a pattern along the curve) Quote
bhamze Posted December 17, 2013 Posted December 17, 2013 Unless you have other ideas in mind you really don't need a macro for this. Below is the procedure for creating evenly spaced points on a curve. Step1- Edit your 3d sketch. Select Tools/Spline Tools/Fit Spline. Select all sketch entities. Uncheck closed spine in property manager and click ok. Exit sketch. Step2- Select Insert/Reference Geometry/Point. Under reference entities select the curve we created in step1. Select icon named "Along curve distance or multiple reference point". Select evenly distribute and enter the desired number (100 in your case). Click ok. Points have been evenly distributed on selected curve. Hope this helps. Quote
goniz88 Posted December 17, 2013 Author Posted December 17, 2013 Unless you have other ideas in mind you really don't need a macro for this I know that SolidWorks can do this without a macro, but I need to write a macro because my macro has to do a lot of things: one of these things is "divide a curve in a number of points". Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.