What's new

sketcher - insert nodes onto sketch entity, equally spaced

cdub

Member
sketcher - insert nodes onto sketch entity, equally spaced

Is there a good way in sketcher to add say 120 nodes equally spaced to an arbitrary spline?

In acad, there is a divide command, and you pick the entity then enter in how many points to add. I want something similar to this.

Any help would be appreciated.
 

wfpelletier

Senior Member


I tried giving this a shot, but I couldn't figure out a way to do this in Alibre. As far as I know, there is no equivalent in Alibre to the AutoCad 'Divide' command (I think that's the command you'd be looking for, but I'm not sure!)

One thing I tried doing was drawing a bunch of connected reference lines, applying the 'equal' constraint to them, and then drawing a spline through the endpoints of the line. (I did not try this with 120 reference line segments, however!) I found that the spline did not seem to be constrained to the reference line endpoints (at least not in any way that I found useful.) Even if this method worked, it would be very painful to apply to 120 nodes, and it would be at best a close approximation of what you really want to do.

The only other method I could think of would be even more painful and extremely tedious, but it would be a pretty good approximation if it worked. If instead of a spline, you created a series of tangent arcs, you could constrain the endpoints of a chain of reference lines to the arcs. Then, if the reference lines had an 'equal' constrain applied to them, this might create something pretty close to a spline 'divided' into a series of equal segments. Like I said, I do not consider this a practical solution to your problem, only a theoretical solution at best! (And I am not even sure about that.)

This might be something you can suggest to Alibre as an enhancement. Good luck, and I hope you find some sort of workable solution to your question.

wfpelletier
 

indesign

Alibre Super User


Could this be done using a spreadsheet? If so, what steps would their need to be taken?


I have not yet done the spreadsheet driven design but I think this would be a good option.

Also, if there is no other way then maybe a script could be done.
 

cdub

Member
spreadsheet

I messed with this some, but the calculation of where the points would be on the spiral in either an X-Y or polar coordinate system was too much work. There is some information in the alibre help about how to use a spreadsheet to locate a bunch of points on a 3D sketch.

I've tried a couple things in the meantime -
I used the helix command to make a solid model of a spiral (advanced tab). This way, it was easy to play with it to get something that looks right.

I created a 2d sketch, and projected one of the "spiral" edges as a reference feature to the sketch. Then, the tedious part, I put on (coincident to the reference spline) 118 points. Then I used the dimensioning tool and equation editor to equally space them. The advantage of this is that at least the end product is somewhat parametric (which is what we pay the money for right?)

The other thing I've been playing with is exporting that spiral sketch as a dwg and pulling it up in ProgeCAD LT (free acad knockoff). It has a divide command. This works fine, but I ran into the issue that Alibre's dwg importer wont bring in points.

This raises another question (sorry this is rambling). How do you call something a "dwg import" if you can't bring in the most simple data? It should be called something else, like "partial dwg import".

Since this is for a personal (fun) project, I'm not too worked up, but this something that should be addressed.

Have fun
 

rbrian

Senior Member
Re:

indesign said:
I was also told that the dxf importer was for 2D only not 3D.
Available in the Import Menu = both dxf & dwg. I am no AutoCAD guy - - but - - is there a difference?
Like dxf (I think - older) = 2D, and dwg (is this one not a newer file type?) = 2D + 3D? Robert
 

MilesH

Alibre Super User
Re: spreadsheet

cdub said:
This raises another question (sorry this is rambling). How do you call something a "dwg import" if you can't bring in the most simple data? It should be called something else, like "partial dwg import".

Since this is for a personal (fun) project, I'm not too worked up, but this something that should be addressed.

I believe this is likely to be addressed in V9. Until then, the workaround is to convert Points to Point Blocks and then Explode them (Blocks won't import either, yet...)

Miles
 

MilesH

Alibre Super User
Re:

rbrian said:
indesign said:
I was also told that the dxf importer was for 2D only not 3D.
Available in the Import Menu = both dxf & dwg. I am no AutoCAD guy - - but - - is there a difference?
Like dxf (I think - older) = 2D, and dwg (is this one not a newer file type?) = 2D + 3D? Robert

Robert,

There's no difference, in this respect - both DWG and DXF are 2D/3D formats. AD will only import 2D DWG/DXF information, though. If you want to import ACIS solids, you can use the SAT importer.

AFAIK, Megalodesk created the DXF format, for exchange of data, so that they could keep a tighter rein on their proprietary DWG 'industry standard' format....

Miles
 

cdub

Member
points to point blocks

My ACAD is a bit rusty, what do you do to convert the points to point blocks?

I'm familiar w/ making a block. Are you saying to create a block w/ all of the points, then explode it?
 

MilesH

Alibre Super User


Sorry, I wasn't very clear there.

Just create a 'Block' in the form of an 'X'. Add one of these 'X' 'Blocks' to each of the 'Divide' 'Points' on your spline. 'Explode' all of the 'X' 'Blocks' and import into Alibre.

Hope this helps,

Miles
 

alexfranke

Senior Member


The original question about evenly placed points on a b-spline sounds interesting... The spline is defined by control points, a knot vector, a ploynomial order and weights, which means there's a bit of calculation that goes into placing the points of the line in the right places to begin with. (Changing any variable changes the shape of the line, and would most likely affect show evenly spaced points are spaced.

Are we *always* talking about dividing a spline here? Is that what AutoCAD does? Is it literally "pick the entity then enter in how many points to add"?

I can work on an API utility that evenly divides lines pretty easily (if that's even needed), but the spline issue sounds a lot like multivariable calculus. I'll have to dig out the textbook and give this some thought... Sounds like a fun challenge.

-Alex
 

indesign

Alibre Super User


An interesting point here is that the divide command in autocad does not actually divide the spline or alter it. It simple makes points evenly spaced along the spline. These points are not tied to the spline and will not change if the spline is edited.
 

MilesH

Alibre Super User


Lines you can do already. A tool for curves, including Splines, would be incredibly useful, even if it wasn't associative....
 

indesign

Alibre Super User
Re:

alexfranke said:
..... but the spline issue sounds a lot like multivariable calculus. I'll have to dig out the textbook and give this some thought... Sounds like a fun challenge.

-Alex


FUN! :shock: I thought I was crazy.
 

alexfranke

Senior Member


Hi all -- just wanted to let you know that I haven't forgotten about this spline division problem, which I find very interesting. I posed the problem to my son's play group and I have a couple ideas. (Huh? :shock: Yes, I said "my son's play group" -- there is a freakishly high concentration of mathematicians and computer scientists among the parents at his play group.)

In any case we're talking about approximating the divisions of the b-spline, so I guess my questions are:
* Do the splines need to be split or is it enough to simply add a point where each division should occur?
* Must the points be somehow "attached" to the spline at their relative arc length positions (so that if the spline is modified the division points are also), or is it enough to just throw the old points away and recompute the divisions?
* In any case we're talking about something that functions like this: "Divide b-spline X into Y equal arc-length parts." Is this correct or must it also join multiple b-splines/polylines and then do the dividing?

I'm a novice at CAD and I don't know the application of this, so pardon my ignorance if the answers to these questions seem obvious. (They may be to you, but ther're not to me!)

Thanks,
Alex
 

indesign

Alibre Super User


Not sure what others may have need for but I get a few design on airfoils that need these points to enter into a spreadsheet for transfer to other calculating and cad invironements.

Other than this type I have needed to redraw spline for contour controls and to duplicate them you need the data controlling them. Others may wish to use this data to determine machining positions but that is why I enter the data into other cad/cam software.
 

alexfranke

Senior Member


Thanks, indesign...

There may be two needs here: (1) If you need the values that define the actual shape of the b-spline curve so you can import that into another CAD program, then the problem is a bit easier -- see below. (2) If you need the points that define equal arc-length segments, irregardless of the values that make up the shape of the curve, then it's a bit harder. (This is actually what I'm working on.)

It sounds like you need #1, but let me explain what those values are and you can tell me if it makes sense for your application. Essentially having all of these values is the only way accurately import a b-spline curve into another CAD program, unless of course it doesn't support b-spline curves. (I'd image that most do.)

* Control Points - A list of points (most of which are not on the curve) that define the general shape of the curve.
* Knot Vector - A list of non-decreasing values of an arbitrary range that define the positions of the line that are "pulled" toward the control points, they usually range from 0 to 1, but AD tends to space them out as integers.
* Degree - An integer -- usually 3 or 4 -- that describes how many knots are "pulled" by each control point.
* Weights - for NURBS, this is basically the amount of "pulling" force a particular control point has on the knots it affects.

Are these the values you're transferring to a spreadsheet or other cad programs? If not, you must be transferring an approximation (maybe a polyline?) of the curve -- is this correct?

Is there also a need to import b-splines into AD with the data described above?

Thanks for you input!
-Alex
 

indesign

Alibre Super User


The trouble is most people I work with and all software used here do not allow for the spline deffinitions to be actually entered. Instead they are a little like Alibre in that they want simple points entered and then define the spline from those.

Also the companies who transfers this data to us does it the same way.
(Not sure what program uses the actual defined properties to generate a spline but I bet it costs a lot.)

Anyhow the cad/cam programs I use do not have a way to enter most of the fields required to properly define a spline but only require points and some require a tangency angle for the start and end of the spline (data I normally never have but I use the points before and after as reference).
 

cdub

Member
need for bspline points

alexfranke -

What I was originally after was just something that would place an aribitrary number of points on a spline in an equally spaced manner. They could be attached or not, and could "divide" the line or not. The thing I was really interested in was the points.

I second indesign's comment that most people and other programs just want simple points. The software will then "shoot" a spline "through" them.

That sounds like a heck of a play group.

Have fun,
 
Top