GithubHelp home page GithubHelp logo

Comments (4)

jmwright avatar jmwright commented on May 28, 2024

from cadquery.

danieledapo avatar danieledapo commented on May 28, 2024

@jmwright thanks for your quick reply! I didn't think about aligning the path and profile!

I'm trying a simpler example where the profile and the path are aligned before the sweep and it works for a simple vertical line, but as soon as I add a non vertical segment I get the same broken results. I've also tried to pass isFrenet=True and makeSolid=True but it does not change much.

import cadquery as cq

path = [
# it work fine with only these two points
 (113.47905083333333, 63.6478376481315),
 (113.47905083333333, 34.1383424990766),
 
 # if I add this point it breaks
 (113.4432471548529, 33.091593949277176),
 ]

poly = cq.Workplane("XY").polyline(path)
profile = cq.Workplane("XZ").rect(5,5).translate(path[0])
swept = profile.sweep(poly)

image

from cadquery.

jmwright avatar jmwright commented on May 28, 2024

Try this code (notice the multisection parameter):

import cadquery as cq

path = [
# it work fine with only these two points
 (113.47905083333333, 63.6478376481315),
 (113.47905083333333, 34.1383424990766),
 (113.4432471548529, 33.091593949277176),
 ]

poly = cq.Workplane("XY").polyline(path)
profile = cq.Workplane("XZ").rect(5,5).translate(path[0])
swept = profile.sweep(poly, multisection=True)

show_object(swept)

from cadquery.

danieledapo avatar danieledapo commented on May 28, 2024

That seems to work! I completely overlooked that parameter!

I'm closing the issue then. Thank you!

from cadquery.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.